| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 |
| 11 #include <stdlib.h> | 11 #include <stdlib.h> |
| 12 #include <string.h> | 12 #include <string.h> |
| 13 | 13 |
| 14 #include "./ivfdec.h" | 14 #include "./ivfdec.h" |
| 15 #include "./video_reader.h" | 15 #include "./video_reader.h" |
| 16 | 16 |
| 17 #include "vpx_ports/mem_ops.h" |
| 18 |
| 17 static const char *const kIVFSignature = "DKIF"; | 19 static const char *const kIVFSignature = "DKIF"; |
| 18 | 20 |
| 19 struct VpxVideoReaderStruct { | 21 struct VpxVideoReaderStruct { |
| 20 VpxVideoInfo info; | 22 VpxVideoInfo info; |
| 21 FILE *file; | 23 FILE *file; |
| 22 uint8_t *buffer; | 24 uint8_t *buffer; |
| 23 size_t buffer_size; | 25 size_t buffer_size; |
| 24 size_t frame_size; | 26 size_t frame_size; |
| 25 }; | 27 }; |
| 26 | 28 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 if (size) | 74 if (size) |
| 73 *size = reader->frame_size; | 75 *size = reader->frame_size; |
| 74 | 76 |
| 75 return reader->buffer; | 77 return reader->buffer; |
| 76 } | 78 } |
| 77 | 79 |
| 78 const VpxVideoInfo *vpx_video_reader_get_info(VpxVideoReader *reader) { | 80 const VpxVideoInfo *vpx_video_reader_get_info(VpxVideoReader *reader) { |
| 79 return &reader->info; | 81 return &reader->info; |
| 80 } | 82 } |
| 81 | 83 |
| OLD | NEW |