blob: 28f77d9afd264f3cfc6a0501adfb05632c21a5f8
1 | /* ***** BEGIN LICENSE BLOCK ***** |
2 | * Source last modified: $Id: aac_decode.h,v 1.2.2.1 2005/05/04 18:21:58 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 AAC_DECODE_H |
39 | #define AAC_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 | /* aac decode struct */ |
51 | typedef struct aac_decode_struct { |
52 | void* pDecoder; |
53 | void* pFrameInfo; |
54 | UINT32 ulNumChannels; |
55 | UINT32 ulChannelMask; |
56 | UINT32 ulBlockSize; |
57 | UINT32 ulFrameSize; |
58 | UINT32 ulFramesPerBlock; |
59 | UINT32 ulSamplesPerFrame; |
60 | UINT32 ulSampleRateCore; |
61 | UINT32 ulSampleRateOut; |
62 | UINT32 ulDelayRemaining; |
63 | UINT32 ulSamplesToConceal; |
64 | HXBOOL bSBR; |
65 | } aac_decode; |
66 | |
67 | /* aac decode interface */ |
68 | |
69 | /* |
70 | * aac_decode_init |
71 | */ |
72 | HX_RESULT aac_decode_init(void* pInitParams, |
73 | UINT32 ulInitParamsSize, |
74 | ra_format_info* pStreamInfo, |
75 | void** pDecode, |
76 | void* pUserMem, |
77 | rm_malloc_func_ptr fpMalloc, |
78 | rm_free_func_ptr fpFree); |
79 | |
80 | /* |
81 | * aac_decode_reset |
82 | */ |
83 | HX_RESULT aac_decode_reset(void* pDecode, |
84 | UINT16* pSamplesOut, |
85 | UINT32 ulNumSamplesAvail, |
86 | UINT32* pNumSamplesOut); |
87 | |
88 | /* |
89 | * aac_decode_conceal |
90 | */ |
91 | HX_RESULT aac_decode_conceal(void* pDecode, |
92 | UINT32 ulNumSamples); |
93 | |
94 | /* |
95 | * aac_decode_decode |
96 | */ |
97 | HX_RESULT aac_decode_decode(void* pDecode, |
98 | UINT8* pData, |
99 | UINT32 ulNumBytes, |
100 | UINT32* pNumBytesConsumed, |
101 | UINT16* pSamplesOut, |
102 | UINT32 ulNumSamplesAvail, |
103 | UINT32* pNumSamplesOut, |
104 | UINT32 ulFlags, |
105 | UINT32 ulTimeStamp); |
106 | |
107 | /* |
108 | * aac_decode_getmaxsize |
109 | */ |
110 | HX_RESULT aac_decode_getmaxsize(void* pDecode, |
111 | UINT32* pNumSamples); |
112 | |
113 | /* |
114 | * aac_decode_getchannels |
115 | */ |
116 | HX_RESULT aac_decode_getchannels(void* pDecode, |
117 | UINT32* pNumChannels); |
118 | |
119 | /* |
120 | * aac_decode_getchannelmask |
121 | */ |
122 | HX_RESULT aac_decode_getchannelmask(void* pDecode, |
123 | UINT32* pChannelMask); |
124 | |
125 | /* |
126 | * aac_decode_getrate |
127 | */ |
128 | HX_RESULT aac_decode_getrate(void* pDecode, |
129 | UINT32* pSampleRate); |
130 | |
131 | /* |
132 | * aac_decode_getdelay |
133 | */ |
134 | HX_RESULT aac_decode_getdelay(void* pDecode, |
135 | UINT32* pNumSamples); |
136 | |
137 | /* |
138 | * aac_decode_close |
139 | */ |
140 | HX_RESULT aac_decode_close(void* pDecode, |
141 | void* pUserMem, |
142 | rm_free_func_ptr fpFree); |
143 | |
144 | #ifdef __cplusplus |
145 | } |
146 | #endif /* #ifdef __cplusplus */ |
147 | |
148 | #endif /* #ifndef AAC_DECODE_H */ |
149 |