struct Codec | |
{ | |
*int (*encode)(*int); | |
*int (*decode)(*int); | |
}; | |
*int h264_encode(int *bytes) | |
{ | |
// ... | |
} | |
*int h264_decode(int *bytes) | |
{ | |
// ... | |
} | |
struct Codec av1 = | |
{ | |
.encode = av1_encode, | |
.decode = av1_decode | |
}; | |
struct Codec h264 = | |
{ | |
.encode = h264_encode, | |
.decode = h264_decode | |
}; | |
int main(int argc, char *argv[]) | |
{ | |
h264.encode(argv[1]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment