1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 |
| #include <stdlib.h> | #include <theora/theora.h> | int main(int argc, char *argv[]) | { | theora_info i; | theora_info_init(&i); | | void* internal_encode = malloc(256); | void* internal_decode = malloc(256); | theora_state t = { | .i = &i, | .granulepos = 1LL, | .internal_encode = internal_encode, | .internal_decode = internal_decode}; | unsigned char packet [] = { | 'A', | 'B', | 'C', | 'D', | '\0'}; | ogg_packet op = { | .packet = packet, | .bytes = 3L, | .b_o_s = 4L, | .e_o_s = 5L, | .granulepos = 6LL, | .packetno = 7LL}; | theora_encode_packetout(&t, 2, &op); //target call | return 0; | } |
|