Created
August 2, 2019 21:41
-
-
Save leandromoreira/e1fc582949ee428ea77ded2eab1f0d70 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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