| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 #include <stdlib.h> | 99 #include <stdlib.h> |
| 100 #include <string.h> | 100 #include <string.h> |
| 101 | 101 |
| 102 #include "vpx/vpx_encoder.h" | 102 #include "vpx/vpx_encoder.h" |
| 103 | 103 |
| 104 #include "../tools_common.h" | 104 #include "../tools_common.h" |
| 105 #include "../video_writer.h" | 105 #include "../video_writer.h" |
| 106 | 106 |
| 107 static const char *exec_name; | 107 static const char *exec_name; |
| 108 | 108 |
| 109 void usage_exit() { | 109 void usage_exit(void) { |
| 110 fprintf(stderr, | 110 fprintf(stderr, |
| 111 "Usage: %s <codec> <width> <height> <infile> <outfile> " | 111 "Usage: %s <codec> <width> <height> <infile> <outfile> " |
| 112 "<keyframe-interval> [<error-resilient>]\nSee comments in " | 112 "<keyframe-interval> [<error-resilient>]\nSee comments in " |
| 113 "simple_encoder.c for more information.\n", | 113 "simple_encoder.c for more information.\n", |
| 114 exec_name); | 114 exec_name); |
| 115 exit(EXIT_FAILURE); | 115 exit(EXIT_FAILURE); |
| 116 } | 116 } |
| 117 | 117 |
| 118 static int encode_frame(vpx_codec_ctx_t *codec, | 118 static int encode_frame(vpx_codec_ctx_t *codec, |
| 119 vpx_image_t *img, | 119 vpx_image_t *img, |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 printf("Processed %d frames.\n", frame_count); | 247 printf("Processed %d frames.\n", frame_count); |
| 248 | 248 |
| 249 vpx_img_free(&raw); | 249 vpx_img_free(&raw); |
| 250 if (vpx_codec_destroy(&codec)) | 250 if (vpx_codec_destroy(&codec)) |
| 251 die_codec(&codec, "Failed to destroy codec."); | 251 die_codec(&codec, "Failed to destroy codec."); |
| 252 | 252 |
| 253 vpx_video_writer_close(writer); | 253 vpx_video_writer_close(writer); |
| 254 | 254 |
| 255 return EXIT_SUCCESS; | 255 return EXIT_SUCCESS; |
| 256 } | 256 } |
| OLD | NEW |