liboggplay  0.3.0
oggplay_callback_info.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2003 Commonwealth Scientific and Industrial Research
3  Organisation (CSIRO) Australia
4 
5  Redistribution and use in source and binary forms, with or without
6  modification, are permitted provided that the following conditions
7  are met:
8 
9  - Redistributions of source code must retain the above copyright
10  notice, this list of conditions and the following disclaimer.
11 
12  - Redistributions in binary form must reproduce the above copyright
13  notice, this list of conditions and the following disclaimer in the
14  documentation and/or other materials provided with the distribution.
15 
16  - Neither the name of CSIRO Australia nor the names of its
17  contributors may be used to endorse or promote products derived from
18  this software without specific prior written permission.
19 
20  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
23  PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ORGANISATION OR
24  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32 
42 #ifndef OGGPLAY_CALLBACK_INFO_HEADER
43 #define OGGPLAY_CALLBACK_INFO_HEADER
44 
46 typedef struct {
47  unsigned char * y;
48  unsigned char * u;
49  unsigned char * v;
51 
53 typedef struct {
54  unsigned char * rgba;
55  unsigned char * rgb;
56  size_t width;
57  size_t height;
58  size_t stride;
60 
62 typedef void * OggPlayAudioData;
63 
65 typedef char OggPlayTextData;
66 
67 struct OggPlayDataHeader_;
69 typedef struct OggPlayDataHeader_ OggPlayDataHeader;
70 
80 
81 int
82 oggplay_callback_info_get_available(OggPlayCallbackInfo *info);
83 
84 
85 int
86 oggplay_callback_info_get_required(OggPlayCallbackInfo *info);
87 
97 
104 ogg_int64_t
106 
116 
126 
136 
146 
156 
157 
158 void
159 oggplay_callback_info_lock_item(OggPlayDataHeader *header);
160 
161 void
162 oggplay_callback_info_unlock_item(OggPlayDataHeader *header);
163 
170 long
172 
173 #endif /* OGGPLAY_CALLBACK_INFO_HEADER */
OggPlayDataType oggplay_callback_info_get_type(OggPlayCallbackInfo *info)
Get the data type of the given OggPlayCallbackInfo.
struct OggPlayDataHeader_ OggPlayDataHeader
Header for the various data formats.
Definition: oggplay_callback_info.h:69
OggPlayAudioData * oggplay_callback_info_get_audio_data(OggPlayDataHeader *header)
Extract the audio data from the supplied record.
OggPlayOverlayData * oggplay_callback_info_get_overlay_data(OggPlayDataHeader *header)
Extract the overlay data from the supplied record.
struct OggPlayCallbackInfo_ OggPlayCallbackInfo
A structure for storing the decoded frames for the various streams in the Ogg container.
Definition: oggplay.h:62
OggPlayDataHeader ** oggplay_callback_info_get_headers(OggPlayCallbackInfo *info)
Get the array of records stored in the OggPlayCallbackInfo.
structure for storing a YUV video frame
Definition: oggplay_callback_info.h:46
size_t height
height in pixels
Definition: oggplay_callback_info.h:57
structure for storing a video frame in RGB fromat
Definition: oggplay_callback_info.h:53
char OggPlayTextData
Type for representing text data.
Definition: oggplay_callback_info.h:65
unsigned char * y
Y-plane.
Definition: oggplay_callback_info.h:47
OggPlayTextData * oggplay_callback_info_get_text_data(OggPlayDataHeader *header)
Extract the text data from the supplied record.
long oggplay_callback_info_get_presentation_time(OggPlayDataHeader *header)
Get the presentation time of the given record.
unsigned char * rgba
may be NULL if no alpha
Definition: oggplay_callback_info.h:54
unsigned char * u
U-plane.
Definition: oggplay_callback_info.h:48
OggPlayVideoData * oggplay_callback_info_get_video_data(OggPlayDataHeader *header)
Extract the video frame from the supplied record.
OggPlayDataType
Definitions of the various record types.
Definition: oggplay_enums.h:81
void * OggPlayAudioData
Type for representing audio data.
Definition: oggplay_callback_info.h:62
unsigned char * v
V-plane.
Definition: oggplay_callback_info.h:49
ogg_int64_t oggplay_callback_info_get_record_size(OggPlayDataHeader *header)
Get the size of the given record.
size_t width
width in pixels
Definition: oggplay_callback_info.h:56
unsigned char * rgb
may be NULL if alpha
Definition: oggplay_callback_info.h:55
size_t stride
stride
Definition: oggplay_callback_info.h:58
OggPlayStreamInfo
Definitions of the various states of a stream.
Definition: oggplay_enums.h:95
OggPlayStreamInfo oggplay_callback_info_get_stream_info(OggPlayCallbackInfo *info)
Get the state of the stream.