blob: ef39e6fe322343eb4ff612d02e01b59785bdf1ba
1 | /* ***** BEGIN LICENSE BLOCK ***** |
2 | * Source last modified: $Id: ra8lbr_decode.h,v 1.2.2.1 2005/05/04 18:21:53 hubbe Exp $ |
3 | * |
4 | * REALNETWORKS CONFIDENTIAL--NOT FOR DISTRIBUTION IN SOURCE CODE FORM |
5 | * Portions Copyright (c) 1995-2005 RealNetworks, Inc. |
6 | * All Rights Reserved. |
7 | * |
8 | * The contents of this file, and the files included with this file, |
9 | * are subject to the current version of the Real Format Source Code |
10 | * Porting and Optimization License, available at |
11 | * https://helixcommunity.org/2005/license/realformatsource (unless |
12 | * RealNetworks otherwise expressly agrees in writing that you are |
13 | * subject to a different license). You may also obtain the license |
14 | * terms directly from RealNetworks. You may not use this file except |
15 | * in compliance with the Real Format Source Code Porting and |
16 | * Optimization License. There are no redistribution rights for the |
17 | * source code of this file. Please see the Real Format Source Code |
18 | * Porting and Optimization License for the rights, obligations and |
19 | * limitations governing use of the contents of the file. |
20 | * |
21 | * RealNetworks is the developer of the Original Code and owns the |
22 | * copyrights in the portions it created. |
23 | * |
24 | * This file, and the files included with this file, is distributed and |
25 | * made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, |
26 | * EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL |
27 | * SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF |
28 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT |
29 | * OR NON-INFRINGEMENT. |
30 | * |
31 | * Technology Compatibility Kit Test Suite(s) Location: |
32 | * https://rarvcode-tck.helixcommunity.org |
33 | * |
34 | * Contributor(s): |
35 | * |
36 | * ***** END LICENSE BLOCK ***** */ |
37 | |
38 | #ifndef RA8LBR_DECODE_H |
39 | #define RA8LBR_DECODE_H |
40 | |
41 | #include "helix_types.h" |
42 | #include "helix_result.h" |
43 | #include "ra_decode.h" |
44 | |
45 | |
46 | #ifdef __cplusplus |
47 | extern "C" { |
48 | #endif /* #ifdef __cplusplus */ |
49 | |
50 | /* ra8lbr decode struct */ |
51 | typedef struct ra8lbr_decode_struct { |
52 | void* pDecoder; |
53 | UINT32 ulNumChannels; |
54 | UINT32 ulChannelMask; |
55 | UINT32 ulFrameSize; |
56 | UINT32 ulFramesPerBlock; |
57 | UINT32 ulSamplesPerFrame; |
58 | UINT32 ulSampleRate; |
59 | UINT32 ulDelayFrames; |
60 | UINT32 ulDelayRemaining; |
61 | UINT32 ulFramesToConceal; |
62 | UCHAR* pFlushData; |
63 | } ra8lbr_decode; |
64 | |
65 | /* ra8lbr opaque data struct */ |
66 | typedef struct ra8lbr_data_struct { |
67 | INT32 version; |
68 | INT16 nSamples; |
69 | INT16 nRegions; |
70 | INT32 delay; |
71 | UINT16 cplStart ; |
72 | UINT16 cplQBits ; |
73 | INT32 channelMask ; |
74 | } ra8lbr_data; |
75 | |
76 | /* ra8lbr decode interface */ |
77 | |
78 | /* |
79 | * ra8lbr_decode_init |
80 | */ |
81 | HX_RESULT ra8lbr_decode_init(void* pInitParams, |
82 | UINT32 ulInitParamsSize, |
83 | ra_format_info* pStreamInfo, |
84 | void** pDecode, |
85 | void* pUserMem, |
86 | rm_malloc_func_ptr fpMalloc, |
87 | rm_free_func_ptr fpFree); |
88 | |
89 | /* |
90 | * ra8lbr_decode_reset |
91 | */ |
92 | HX_RESULT ra8lbr_decode_reset(void* pDecode, |
93 | UINT16* pSamplesOut, |
94 | UINT32 ulNumSamplesAvail, |
95 | UINT32* pNumSamplesOut); |
96 | |
97 | /* |
98 | * ra8lbr_decode_conceal |
99 | */ |
100 | HX_RESULT ra8lbr_decode_conceal(void* pDecode, |
101 | UINT32 ulNumSamples); |
102 | |
103 | /* |
104 | * ra8lbr_decode_decode |
105 | */ |
106 | HX_RESULT ra8lbr_decode_decode(void* pDecode, |
107 | UINT8* pData, |
108 | UINT32 ulNumBytes, |
109 | UINT32* pNumBytesConsumed, |
110 | UINT16* pSamplesOut, |
111 | UINT32 ulNumSamplesAvail, |
112 | UINT32* pNumSamplesOut, |
113 | UINT32 ulFlags, |
114 | UINT32 ulTimeStamp); |
115 | |
116 | /* |
117 | * ra8lbr_decode_getmaxsize |
118 | */ |
119 | HX_RESULT ra8lbr_decode_getmaxsize(void* pDecode, |
120 | UINT32* pNumSamples); |
121 | |
122 | /* |
123 | * ra8lbr_decode_getchannels |
124 | */ |
125 | HX_RESULT ra8lbr_decode_getchannels(void* pDecode, |
126 | UINT32* pNumChannels); |
127 | |
128 | /* |
129 | * ra8lbr_decode_getchannelmask |
130 | */ |
131 | HX_RESULT ra8lbr_decode_getchannelmask(void* pDecode, |
132 | UINT32* pChannelMask); |
133 | |
134 | /* |
135 | * ra8lbr_decode_getrate |
136 | */ |
137 | HX_RESULT ra8lbr_decode_getrate(void* pDecode, |
138 | UINT32* pSampleRate); |
139 | |
140 | /* |
141 | * ra8lbr_decode_getdelay |
142 | */ |
143 | HX_RESULT ra8lbr_decode_getdelay(void* pDecode, |
144 | UINT32* pNumSamples); |
145 | |
146 | /* |
147 | * ra8lbr_decode_close |
148 | */ |
149 | HX_RESULT ra8lbr_decode_close(void* pDecode, |
150 | void* pUserMem, |
151 | rm_free_func_ptr fpFree); |
152 | |
153 | HX_RESULT ra8lbr_unpack_opaque_data(ra8lbr_data* pData, |
154 | UINT8* pBuf, |
155 | UINT32 ulLength); |
156 | |
157 | #ifdef __cplusplus |
158 | } |
159 | #endif /* #ifdef __cplusplus */ |
160 | |
161 | #endif /* #ifndef RA8LBR_DECODE_H */ |
162 |