summaryrefslogtreecommitdiff
path: root/audio_codec/libraac/include/rm_stream.h (plain)
blob: 4728070e2fed510a15df9ce823835fbd02c45686
1/* ***** BEGIN LICENSE BLOCK *****
2 * Source last modified: $Id: rm_stream.h,v 1.1.1.1.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 RM_STREAM_H
39#define RM_STREAM_H
40
41#include "helix_types.h"
42#include "helix_result.h"
43#include "rm_property.h"
44
45#ifdef __cplusplus
46extern "C" {
47#endif /* #ifdef __cplusplus */
48
49 /*
50 * Stream header definition.
51 *
52 * Users are strongly encouraged to use the accessor
53 * functions below to retrieve information from the
54 * rm_stream_header struct, since the definition
55 * may change in the future.
56 */
57 typedef struct rm_stream_header_struct {
58 char* pMimeType;
59 char* pStreamName;
60 UINT32 ulStreamNumber;
61 UINT32 ulMaxBitRate;
62 UINT32 ulAvgBitRate;
63 UINT32 ulMaxPacketSize;
64 UINT32 ulAvgPacketSize;
65 UINT32 ulDuration;
66 UINT32 ulPreroll;
67 UINT32 ulStartTime;
68 UINT32 ulStartOffset;
69 UINT32 ulStreamSize;
70 UINT32 ulOpaqueDataLen;
71 BYTE* pOpaqueData;
72 UINT32 ulNumProperties;
73 rm_property* pProperty;
74 } rm_stream_header;
75
76 /*
77 * These are the accessor functions used to retrieve
78 * information from the stream header
79 */
80 UINT32 rm_stream_get_number(rm_stream_header* hdr);
81 UINT32 rm_stream_get_max_bit_rate(rm_stream_header* hdr);
82 UINT32 rm_stream_get_avg_bit_rate(rm_stream_header* hdr);
83 UINT32 rm_stream_get_max_packet_size(rm_stream_header* hdr);
84 UINT32 rm_stream_get_avg_packet_size(rm_stream_header* hdr);
85 UINT32 rm_stream_get_start_time(rm_stream_header* hdr);
86 UINT32 rm_stream_get_preroll(rm_stream_header* hdr);
87 UINT32 rm_stream_get_duration(rm_stream_header* hdr);
88 UINT32 rm_stream_get_data_offset(rm_stream_header* hdr);
89 UINT32 rm_stream_get_data_size(rm_stream_header* hdr);
90 const char* rm_stream_get_name(rm_stream_header* hdr);
91 const char* rm_stream_get_mime_type(rm_stream_header* hdr);
92 UINT32 rm_stream_get_properties(rm_stream_header* hdr, rm_property** ppProp);
93 HXBOOL rm_stream_is_realaudio(rm_stream_header* hdr);
94 HXBOOL rm_stream_is_realvideo(rm_stream_header* hdr);
95 HXBOOL rm_stream_is_realevent(rm_stream_header* hdr);
96 HXBOOL rm_stream_is_realaudio_mimetype(const char* pszStr);
97 HXBOOL rm_stream_is_realvideo_mimetype(const char* pszStr);
98 HXBOOL rm_stream_is_realevent_mimetype(const char* pszStr);
99 HXBOOL rm_stream_is_real_mimetype(const char* pszStr);
100 HX_RESULT rm_stream_get_property_int(rm_stream_header* hdr,
101 const char* pszStr,
102 UINT32* pulVal);
103 HX_RESULT rm_stream_get_property_buf(rm_stream_header* hdr,
104 const char* pszStr,
105 BYTE** ppBuf,
106 UINT32* pulLen);
107 HX_RESULT rm_stream_get_property_str(rm_stream_header* hdr,
108 const char* pszStr,
109 char** ppszStr);
110
111#ifdef __cplusplus
112}
113#endif /* #ifdef __cplusplus */
114
115#endif /* #ifndef RM_STREAM_H */
116