liboggplay 0.3.0
oggplay.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
43#ifndef OGGPLAY_HEADER
44#define OGGPLAY_HEADER
45
46#ifdef __cplusplus
47extern "C" {
48#endif
49
52
56typedef struct OggPlay_ OggPlay;
57
62typedef struct OggPlayCallbackInfo_ OggPlayCallbackInfo;
63
76typedef int (OggPlayDataCallback) (OggPlay *player, int num_records,
77 OggPlayCallbackInfo **records, void *user);
78
83
95OggPlay *
97
105OggPlay *
107
108
129
143 void *user);
144
145
147oggplay_set_callback_num_frames(OggPlay *me, int stream, int frames);
148
150oggplay_set_callback_period(OggPlay *me, int stream, int milliseconds);
151
153oggplay_set_offset(OggPlay *me, int track, ogg_int64_t offset);
154
169oggplay_get_video_y_size(OggPlay *me, int track, int *y_width, int *y_height);
170
185oggplay_get_video_uv_size(OggPlay *me, int track, int *uv_width, int *uv_height);
186
200oggplay_get_audio_channels(OggPlay *me, int track, int *channels);
201
215oggplay_get_audio_samplerate(OggPlay *me, int track, int *samplerate);
216
231oggplay_get_video_fps(OggPlay *me, int track, int* fps_denom, int* fps_num);
232
234oggplay_get_video_aspect_ratio(OggPlay *me, int track, int* aspect_denom, int* aspect_num);
235
237oggplay_convert_video_to_rgb(OggPlay *me, int track, int convert, int swap_rgb);
238
240oggplay_get_kate_category(OggPlay *me, int track, const char** category);
241
243oggplay_get_kate_language(OggPlay *me, int track, const char** language);
244
246oggplay_set_kate_tiger_rendering(OggPlay *me, int track, int use_tiger, int swap_rgb, int default_width, int default_height);
247
249oggplay_overlay_kate_track_on_video(OggPlay *me, int kate_track, int video_track);
250
252oggplay_start_decoding(OggPlay *me);
253
271
295oggplay_use_buffer(OggPlay *player, int size);
296
306
322
323void
324oggplay_prepare_for_close(OggPlay *me);
325
335
336int
337oggplay_get_available(OggPlay *player);
338
346ogg_int64_t
348
349int
350oggplay_media_finished_retrieving(OggPlay * player);
351
352#ifdef __cplusplus
353}
354#endif
355
356#endif /* OGGPLAY_HEADER */
OggPlayErrorCode oggplay_get_video_fps(OggPlay *me, int track, int *fps_denom, int *fps_num)
Get the frame-per-second value the of a given video track.
OggPlayErrorCode oggplay_buffer_release(OggPlay *player, OggPlayCallbackInfo **track_info)
Release the given buffer item.
OggPlay * oggplay_new_with_reader(OggPlayReader *reader)
Create a new OggPlay handle associated with the given reader.
struct OggPlay_ OggPlay
This is returned by oggplay_open_with_reader() or oggplay_new_with_reader().
Definition: oggplay.h:56
OggPlayErrorCode oggplay_get_video_uv_size(OggPlay *me, int track, int *uv_width, int *uv_height)
Get the given video track's UV-plane's width and height.
OggPlay * oggplay_open_with_reader(OggPlayReader *reader)
Create an OggPlay handle associated with the given reader.
OggPlayErrorCode oggplay_get_video_y_size(OggPlay *me, int track, int *y_width, int *y_height)
Get the given video track's Y-plane's width and height.
OggPlayErrorCode oggplay_set_data_callback(OggPlay *me, OggPlayDataCallback callback, void *user)
Sets a user defined OggPlayDataCallback function for the OggPlay handle.
OggPlayErrorCode oggplay_get_audio_channels(OggPlay *me, int track, int *channels)
Get the number of channels of the audio track.
OggPlayErrorCode oggplay_use_buffer(OggPlay *player, int size)
Use the built-in OggPlayBuffer for buffering the decoded frames.
OggPlayErrorCode oggplay_step_decoding(OggPlay *me)
Decode the streams in the Ogg container until we find data that hasn't been presented,...
struct OggPlayCallbackInfo_ OggPlayCallbackInfo
A structure for storing the decoded frames for the various streams in the Ogg container.
Definition: oggplay.h:62
OggPlayErrorCode oggplay_close(OggPlay *player)
Destroys the OggPlay handle along with the associated OggPlayReader and clears out the buffer and shu...
int() OggPlayDataCallback(OggPlay *player, int num_records, OggPlayCallbackInfo **records, void *user)
This is the signature of a callback which you must provide for OggPlay to call whenever there's any u...
Definition: oggplay.h:76
ogg_int64_t oggplay_get_duration(OggPlay *player)
Get the duration of the Ogg content.
OggPlayErrorCode oggplay_initialise(OggPlay *me, int block)
Initialise the OggPlay handle.
OggPlayCallbackInfo ** oggplay_buffer_retrieve_next(OggPlay *player)
Retrive the next element in the buffer.
OggPlayErrorCode oggplay_get_audio_samplerate(OggPlay *me, int track, int *samplerate)
Get the sample rate of the of the audio track.
oggplay_callback_info.h
General constants used by liboggplay.
OggPlayErrorCode
Definitions of error return values.
Definition: oggplay_enums.h:48
oggplay_query.h
oggplay_reader.h
oggplay_seek.h
oggplay_tools.h
Definition: oggplay_reader.h:51