liboggplay  0.3.0
oggplay_tools.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 
41 #ifndef OGGPLAY_TOOLS_HEADER
42 #define OGGPLAY_TOOLS_HEADER
43 
44 #include <ogg/ogg.h>
45 
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49 
50 #ifdef WIN32
51 #include <time.h>
52 #else
53 #include <sys/time.h>
54 #include <time.h>
55 #endif
56 
58 typedef struct {
59  unsigned char * ptry;
60  unsigned char * ptru;
61  unsigned char * ptrv;
62  int y_width;
63  int y_height;
64  int uv_width;
65  int uv_height;
67 
69 typedef struct {
70  unsigned char * ptro;
71  int rgb_width;
72  int rgb_height;
74 
75 
76 void
77 oggplay_yuv2rgba(const OggPlayYUVChannels *yuv, OggPlayRGBChannels * rgb);
78 
79 void
80 oggplay_yuv2bgra(const OggPlayYUVChannels* yuv, OggPlayRGBChannels * rgb);
81 
82 void
83 oggplay_yuv2argb(const OggPlayYUVChannels *yuv, OggPlayRGBChannels * rgb);
84 
85 ogg_int64_t
86 oggplay_sys_time_in_ms(void);
87 
88 void
89 oggplay_millisleep(long ms);
90 
91 #ifdef __cplusplus
92 }
93 #endif
94 
95 #endif /* OGGPLAY_TOOLS_HEADER */
96 
unsigned char * ptro
the RGB stream in the requested packaging format
Definition: oggplay_tools.h:70
int rgb_height
height of the RGB frame
Definition: oggplay_tools.h:72
unsigned char * ptrv
V channel.
Definition: oggplay_tools.h:61
int y_width
the width of the Y plane
Definition: oggplay_tools.h:62
int y_height
the height of the Y plane
Definition: oggplay_tools.h:63
structure holds pointers to y, u, v channels
Definition: oggplay_tools.h:58
int uv_width
the width of the U/V plane
Definition: oggplay_tools.h:64
int rgb_width
width of the RGB frame
Definition: oggplay_tools.h:71
unsigned char * ptry
Y channel.
Definition: oggplay_tools.h:59
unsigned char * ptru
U channel.
Definition: oggplay_tools.h:60
structure holds pointers to RGB packets
Definition: oggplay_tools.h:69
int uv_height
the height of the U/V plane
Definition: oggplay_tools.h:65