Skip to content

Instantly share code, notes, and snippets.

@leandromoreira
Created August 2, 2019 21:41
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save leandromoreira/e1fc582949ee428ea77ded2eab1f0d70 to your computer and use it in GitHub Desktop.
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