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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 // --------------------- | 43 // --------------------- |
44 // Use the `simple_encoder` example to encode a sample with a cut scene. | 44 // Use the `simple_encoder` example to encode a sample with a cut scene. |
45 // Determine the frame number of the cut scene by looking for a generated | 45 // Determine the frame number of the cut scene by looking for a generated |
46 // key-frame (indicated by a 'K'). Supply that frame number as an argument | 46 // key-frame (indicated by a 'K'). Supply that frame number as an argument |
47 // to this example, and observe that no key-frame is generated. | 47 // to this example, and observe that no key-frame is generated. |
48 | 48 |
49 #include <stdio.h> | 49 #include <stdio.h> |
50 #include <stdlib.h> | 50 #include <stdlib.h> |
51 #include <string.h> | 51 #include <string.h> |
52 | 52 |
53 #define VPX_CODEC_DISABLE_COMPAT 1 | |
54 #include "vpx/vp8cx.h" | 53 #include "vpx/vp8cx.h" |
55 #include "vpx/vpx_encoder.h" | 54 #include "vpx/vpx_encoder.h" |
56 | 55 |
57 #include "./tools_common.h" | 56 #include "./tools_common.h" |
58 #include "./video_writer.h" | 57 #include "./video_writer.h" |
59 | 58 |
60 static const char *exec_name; | 59 static const char *exec_name; |
61 | 60 |
62 void usage_exit() { | 61 void usage_exit() { |
63 fprintf(stderr, "Usage: %s <width> <height> <infile> <outfile> <frame>\n", | 62 fprintf(stderr, "Usage: %s <width> <height> <infile> <outfile> <frame>\n", |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 printf("Processed %d frames.\n", frame_count); | 185 printf("Processed %d frames.\n", frame_count); |
187 | 186 |
188 vpx_img_free(&raw); | 187 vpx_img_free(&raw); |
189 if (vpx_codec_destroy(&codec)) | 188 if (vpx_codec_destroy(&codec)) |
190 die_codec(&codec, "Failed to destroy codec."); | 189 die_codec(&codec, "Failed to destroy codec."); |
191 | 190 |
192 vpx_video_writer_close(writer); | 191 vpx_video_writer_close(writer); |
193 | 192 |
194 return EXIT_SUCCESS; | 193 return EXIT_SUCCESS; |
195 } | 194 } |
OLD | NEW |