| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 vpx_ctx->fourcc = VP8_FOURCC; | 101 vpx_ctx->fourcc = VP8_FOURCC; |
| 102 } else if (!strncmp(video_track->GetCodecId(), "V_VP9", 5)) { | 102 } else if (!strncmp(video_track->GetCodecId(), "V_VP9", 5)) { |
| 103 vpx_ctx->fourcc = VP9_FOURCC; | 103 vpx_ctx->fourcc = VP9_FOURCC; |
| 104 } else { | 104 } else { |
| 105 rewind_and_reset(webm_ctx, vpx_ctx); | 105 rewind_and_reset(webm_ctx, vpx_ctx); |
| 106 return 0; | 106 return 0; |
| 107 } | 107 } |
| 108 | 108 |
| 109 vpx_ctx->framerate.denominator = 0; | 109 vpx_ctx->framerate.denominator = 0; |
| 110 vpx_ctx->framerate.numerator = 0; | 110 vpx_ctx->framerate.numerator = 0; |
| 111 vpx_ctx->width = video_track->GetWidth(); | 111 vpx_ctx->width = static_cast<uint32_t>(video_track->GetWidth()); |
| 112 vpx_ctx->height = video_track->GetHeight(); | 112 vpx_ctx->height = static_cast<uint32_t>(video_track->GetHeight()); |
| 113 | 113 |
| 114 get_first_cluster(webm_ctx); | 114 get_first_cluster(webm_ctx); |
| 115 | 115 |
| 116 return 1; | 116 return 1; |
| 117 } | 117 } |
| 118 | 118 |
| 119 int webm_read_frame(struct WebmInputContext *webm_ctx, | 119 int webm_read_frame(struct WebmInputContext *webm_ctx, |
| 120 uint8_t **buffer, | 120 uint8_t **buffer, |
| 121 size_t *bytes_in_buffer, | 121 size_t *bytes_in_buffer, |
| 122 size_t *buffer_size) { | 122 size_t *buffer_size) { |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 webm_ctx->block_entry = NULL; | 210 webm_ctx->block_entry = NULL; |
| 211 webm_ctx->block_frame_index = 0; | 211 webm_ctx->block_frame_index = 0; |
| 212 webm_ctx->timestamp_ns = 0; | 212 webm_ctx->timestamp_ns = 0; |
| 213 | 213 |
| 214 return 0; | 214 return 0; |
| 215 } | 215 } |
| 216 | 216 |
| 217 void webm_free(struct WebmInputContext *webm_ctx) { | 217 void webm_free(struct WebmInputContext *webm_ctx) { |
| 218 reset(webm_ctx); | 218 reset(webm_ctx); |
| 219 } | 219 } |
| OLD | NEW |