Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(326)

Side by Side Diff: source/libvpx/ivfdec.h

Issue 168343002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: libvpx: Pull from upstream Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « source/libvpx/examples/vpx_temporal_scalable_patterns.c ('k') | source/libvpx/ivfdec.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 IVFDEC_H_ 10 #ifndef IVFDEC_H_
11 #define IVFDEC_H_ 11 #define IVFDEC_H_
12 12
13 #include "./tools_common.h" 13 #include "./tools_common.h"
14 14
15 #ifdef __cplusplus 15 #ifdef __cplusplus
16 extern "C" { 16 extern "C" {
17 #endif 17 #endif
18 18
19 int file_is_ivf(struct VpxInputContext *input); 19 int file_is_ivf(struct VpxInputContext *input);
20 20
21 int ivf_read_frame(FILE *infile, uint8_t **buffer, 21 int ivf_read_frame(FILE *infile, uint8_t **buffer,
22 size_t *bytes_read, size_t *buffer_size); 22 size_t *bytes_read, size_t *buffer_size);
23 23
24 // The following code is work in progress. It is going to be in a separate file
25 // and support transparent reading of IVF and Y4M formats. Right now only IVF
26 // format is supported for simplicity. The main goal the API is to be
27 // simple and easy to use in example code (and probably in vpxenc/vpxdec later).
28 // All low-level details like memory buffer management are hidden from API
29 // users.
30 struct vpx_video;
31 typedef struct vpx_video vpx_video_t;
32
33 // Opens the input file and inspects it to determine file type. Returns an
34 // opaque vpx_video_t* upon success, or NULL upon failure.
35 vpx_video_t *vpx_video_open_file(FILE *file);
36
37 // Frees all resources associated with vpx_video_t returned from
38 // vpx_video_open_file() call
39 void vpx_video_close(vpx_video_t *video);
40
41 int vpx_video_get_width(vpx_video_t *video);
42 int vpx_video_get_height(vpx_video_t *video);
43 unsigned int vpx_video_get_fourcc(vpx_video_t *video);
44
45 // Reads video frame bytes from the file and stores them into internal buffer.
46 int vpx_video_read_frame(vpx_video_t *video);
47
48 // Returns the pointer to internal memory buffer with frame bytes read from
49 // last call to vpx_video_read_frame().
50 const unsigned char *vpx_video_get_frame(vpx_video_t *video, size_t *size);
51
52 #ifdef __cplusplus 24 #ifdef __cplusplus
53 } /* extern "C" */ 25 } /* extern "C" */
54 #endif 26 #endif
55 27
56 #endif // IVFDEC_H_ 28 #endif // IVFDEC_H_
OLDNEW
« no previous file with comments | « source/libvpx/examples/vpx_temporal_scalable_patterns.c ('k') | source/libvpx/ivfdec.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698