blob: d351c5b14721d372c6c8f49f25692e296ced2c22
1 | /* ***** BEGIN LICENSE BLOCK ***** |
2 | * Source last modified: $Id: ra_backend.h,v 1.2.2.1 2005/05/04 18:20:57 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 RA_BACKEND_H__ |
39 | #define RA_BACKEND_H__ |
40 | |
41 | /* Unified RealAudio decoder backend interface */ |
42 | |
43 | #include "helix_types.h" |
44 | #include "helix_result.h" |
45 | #include "rm_memory.h" |
46 | #include "ra_format_info.h" |
47 | |
48 | #ifdef __cplusplus |
49 | extern "C" { |
50 | #endif /* #ifdef __cplusplus */ |
51 | |
52 | /* ra decoder backend interface */ |
53 | |
54 | typedef HX_RESULT(*ra_decode_init_func_ptr)(void* pInitParams, |
55 | UINT32 ulInitParamsSize, |
56 | ra_format_info* pStreamInfo, |
57 | void** pDecode, |
58 | void* pUserMem, |
59 | rm_malloc_func_ptr fpMalloc, |
60 | rm_free_func_ptr fpFree); |
61 | typedef HX_RESULT(*ra_decode_reset_func_ptr)(void* pDecode, |
62 | UINT16* pSamplesOut, |
63 | UINT32 ulNumSamplesAvail, |
64 | UINT32* pNumSamplesOut); |
65 | typedef HX_RESULT(*ra_decode_conceal_func_ptr)(void* pDecode, |
66 | UINT32 ulNumSamples); |
67 | typedef HX_RESULT(*ra_decode_decode_func_ptr)(void* pDecode, |
68 | UINT8* pData, |
69 | UINT32 ulNumBytes, |
70 | UINT32* pNumBytesConsumed, |
71 | UINT16* pSamplesOut, |
72 | UINT32 ulNumSamplesAvail, |
73 | UINT32* pNumSamplesOut, |
74 | UINT32 ulFlags, |
75 | UINT32 ulTimeStamp); |
76 | typedef HX_RESULT(*ra_decode_getmaxsize_func_ptr)(void* pDecode, |
77 | UINT32* pNumSamples); |
78 | typedef HX_RESULT(*ra_decode_getchannels_func_ptr)(void* pDecode, |
79 | UINT32* pNumChannels); |
80 | typedef HX_RESULT(*ra_decode_getchannelmask_func_ptr)(void* pDecode, |
81 | UINT32* pChannelMask); |
82 | typedef HX_RESULT(*ra_decode_getrate_func_ptr)(void* pDecode, |
83 | UINT32* pSampleRate); |
84 | typedef HX_RESULT(*ra_decode_getdelay_func_ptr)(void* pDecode, |
85 | UINT32* pNumSamples); |
86 | typedef HX_RESULT(*ra_decode_close_func_ptr)(void* pDecode, |
87 | void* pUserMem, |
88 | rm_free_func_ptr fpFree); |
89 | |
90 | #ifdef __cplusplus |
91 | } |
92 | #endif |
93 | |
94 | #endif /* RA_BACKEND_H__ */ |
95 |