| OLD | NEW |
| 1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ENC_INCLUDES | 1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ENC_INCLUDES |
| 2 #define VPX_CODEC_DISABLE_COMPAT 1 | 2 #define VPX_CODEC_DISABLE_COMPAT 1 |
| 3 #include "vpx/vpx_encoder.h" | 3 #include "vpx/vpx_encoder.h" |
| 4 #include "vpx/vp8cx.h" | 4 #include "vpx/vp9cx.h" |
| 5 #define interface (vpx_codec_vp8_cx()) | 5 #define interface (vpx_codec_vp8_cx()) |
| 6 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ENC_INCLUDES | 6 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ENC_INCLUDES |
| 7 | 7 |
| 8 | 8 |
| 9 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DIE_CODEC | 9 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DIE_CODEC |
| 10 static void die_codec(vpx_codec_ctx_t *ctx, const char *s) { | 10 static void die_codec(vpx_codec_ctx_t *ctx, const char *s) { |
| 11 const char *detail = vpx_codec_error_detail(ctx); | 11 const char *detail = vpx_codec_error_detail(ctx); |
| 12 | 12 |
| 13 printf("%s: %s\n", s, vpx_codec_error(ctx)); | 13 printf("%s: %s\n", s, vpx_codec_error(ctx)); |
| 14 if(detail) | 14 if(detail) |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 outfile); | 65 outfile); |
| 66 break; | 66 break; |
| 67 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PROCESS_FRAME | 67 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PROCESS_FRAME |
| 68 | 68 |
| 69 | 69 |
| 70 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DESTROY | 70 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DESTROY |
| 71 vpx_img_free(&raw); | 71 vpx_img_free(&raw); |
| 72 if(vpx_codec_destroy(&codec)) | 72 if(vpx_codec_destroy(&codec)) |
| 73 die_codec(&codec, "Failed to destroy codec"); | 73 die_codec(&codec, "Failed to destroy codec"); |
| 74 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DESTROY | 74 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DESTROY |
| OLD | NEW |