| 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 #ifndef WEBMDEC_H_ | 10 #ifndef WEBMDEC_H_ |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 struct WebmInputContext { | 21 struct WebmInputContext { |
| 22 void *reader; | 22 void *reader; |
| 23 void *segment; | 23 void *segment; |
| 24 uint8_t *buffer; | 24 uint8_t *buffer; |
| 25 const void *cluster; | 25 const void *cluster; |
| 26 const void *block_entry; | 26 const void *block_entry; |
| 27 const void *block; | 27 const void *block; |
| 28 int block_frame_index; | 28 int block_frame_index; |
| 29 int video_track_index; | 29 int video_track_index; |
| 30 uint64_t timestamp_ns; | 30 uint64_t timestamp_ns; |
| 31 int is_key_frame; |
| 31 }; | 32 }; |
| 32 | 33 |
| 33 // Checks if the input is a WebM file. If so, initializes WebMInputContext so | 34 // Checks if the input is a WebM file. If so, initializes WebMInputContext so |
| 34 // that webm_read_frame can be called to retrieve a video frame. | 35 // that webm_read_frame can be called to retrieve a video frame. |
| 35 // Returns 1 on success and 0 on failure or input is not WebM file. | 36 // Returns 1 on success and 0 on failure or input is not WebM file. |
| 36 // TODO(vigneshv): Refactor this function into two smaller functions specific | 37 // TODO(vigneshv): Refactor this function into two smaller functions specific |
| 37 // to their task. | 38 // to their task. |
| 38 int file_is_webm(struct WebmInputContext *webm_ctx, | 39 int file_is_webm(struct WebmInputContext *webm_ctx, |
| 39 struct VpxInputContext *vpx_ctx); | 40 struct VpxInputContext *vpx_ctx); |
| 40 | 41 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 63 struct VpxInputContext *vpx_ctx); | 64 struct VpxInputContext *vpx_ctx); |
| 64 | 65 |
| 65 // Resets the WebMInputContext. | 66 // Resets the WebMInputContext. |
| 66 void webm_free(struct WebmInputContext *webm_ctx); | 67 void webm_free(struct WebmInputContext *webm_ctx); |
| 67 | 68 |
| 68 #ifdef __cplusplus | 69 #ifdef __cplusplus |
| 69 } // extern "C" | 70 } // extern "C" |
| 70 #endif | 71 #endif |
| 71 | 72 |
| 72 #endif // WEBMDEC_H_ | 73 #endif // WEBMDEC_H_ |
| OLD | NEW |