blob: b792199dc3d87f5fe067d03a99c34d18bc4b7e7e [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001/************************************************************************
2 * °æÈ¨ËùÓÐ (C)2007,ÖÐÐËͨѶ¹É·ÝÓÐÏÞ¹«Ë¾¡£
3 * Ä£¿éÃû £º Á÷ýÌåÄ£¿é
4 * ÎļþÃû³Æ£º Zte_stream.h
5 * Îļþ±êʶ£º
6 * ÄÚÈÝÕªÒª£º Ö÷Òª¶¨ÒåÁ÷ýÌåÄ£¿éµÄºê¶¨Òå¡¢³£Á¿¡¢È«¾Ö±äÁ¿ÒÔ¼°º¯ÊýµÄÉùÃ÷
7 *
8 * ÐÞ¸ÄÈÕÆÚ °æ±¾ºÅ Ð޸ıê¼Ç ÐÞ¸ÄÈË ÐÞ¸ÄÄÚÈÝ
9 * ----------------------------------------------------------------------
10 * 2009/06/08 1.0 ½¯±¾±ø ´´½¨
11 ************************************************************************/
12
13#ifndef ZTE_STREAM_H
14#define ZTE_STREAM_H
15
16#ifdef __cplusplus
17extern "C"
18{
19#endif
20
21/**************************************************************************
22 * Í·Îļþ°üº¬ *
23 **************************************************************************/
24
25/**************************************************************************
26 * ³£Á¿ *
27 **************************************************************************/
28typedef enum
29{
30 DD_STREAMING_NONE = 0,
31 DD_STREAMING_MP3 = 0x80,
32 DD_STREAMING_MIDI,
33 DD_STREAMING_ONE,
34 DD_STREAMING_AMR_NB,
35 DD_STREAMING_AAC,
36 DD_STREAMING_DRA,
37 DD_STREAMING_UNKNOW
38}DD_STEAMING_AUDIO;
39
40/**************************************************************************
41 * ºê¶¨Òå *
42 **************************************************************************/
43
44/**************************************************************************
45 * Êý¾ÝÀàÐÍ *
46 **************************************************************************/
47
48
49typedef struct _DD_AUDIO_STREAM_AAC_PARAM_
50{
51 UINT32 headerLength;
52 UINT8 *headerAddr;
53}DD_AUDIO_STREAM_AAC_PARAM;
54
55typedef struct DD_STREAM_AUDIO_SET_
56{
57
58 UINT8 *bConfig;
59 DD_AUDIO_STREAM_AAC_PARAM dd_aac;
60
61}DD_STREAM_AUDIO_SET;
62
63typedef struct STREAM_AUDIO_PARAM_
64{
65
66 DD_STEAMING_AUDIO stream_audio_type;
67
68 DD_STREAM_AUDIO_SET stream_param_set;
69
70
71}STREAM_AUDIO_PARAM;
72
73typedef STREAM_AUDIO_PARAM *STREAM_AUDIO_HANDLE;
74
75/* ÊÓÆµ¸ñʽ */
76typedef enum
77{
78 STREAM_VIDEO_NONE =0,
79 STREAM_VIDEO_H263, /* H263 */
80 STREAM_VIDEO_H264, /* H264 */
81 STREAM_VIDEO_MP4, /* MP4 */
82 STREAM_VIDEO_MAX
83}STREAM_VIDEO_FORMAT;
84
85/**************************************************************************
86 * È«¾Ö±äÁ¿ÉùÃ÷ *
87 **************************************************************************/
88
89/**************************************************************************
90 * È«¾Öº¯ÊýÔ­ÐÍ *
91 **************************************************************************/
92/**
93 * º¯ÊýÃû³Æ£º Stream_Video_Open
94 * ¹¦ÄÜÃèÊö£º ´ò¿ªÁ÷ýÌåÊÓÆµÉ豸¡£
95 * ²ÎÊý˵Ã÷£º ÎÞ
96 * ·µ »Ø Öµ£º ´ò¿ªÉ豸³É¹¦·µ»ØDCAMERA_OP_SUCCESS;·ñÔò·µ»ØDCAMERA_OP_ERROR¡£
97 * ÆäËü˵Ã÷£º
98 */
99DCAMERA_RETURN_VALUE_E Stream_Video_Open(void);
100
101/**
102 * º¯ÊýÃû³Æ£º Stream_Video_Close
103 * ¹¦ÄÜÃèÊö£º ÊÍ·ÅÁ÷ýÌå´ò¿ªµÄÊÓÆµÉ豸¡£
104 * ²ÎÊý˵Ã÷£º ÎÞ
105 * ·µ »Ø Öµ£º ÊÍ·ÅÉ豸³É¹¦·µ»ØDCAMERA_OP_SUCCESS;·ñÔò·µ»ØDCAMERA_OP_ERROR¡£
106 * ÆäËü˵Ã÷£º
107 */
108DCAMERA_RETURN_VALUE_E Stream_Video_Close(void);
109
110/**
111 * º¯ÊýÃû³Æ£º Stream_Video_Init
112 * ¹¦ÄÜÃèÊö£º Á÷ýÌåÄ£¿é³õʼ»¯¡£
113 * ²ÎÊý˵Ã÷£º ÎÞ
114 * ·µ »Ø Öµ£º ³É¹¦·µ»ØDCAMERA_OP_SUCCESS;·ñÔò·µ»ØDCAMERA_OP_ERROR¡£
115 * ÆäËü˵Ã÷£º
116 */
117DCAMERA_RETURN_VALUE_E Stream_Video_Init(STREAM_VIDEO_FORMAT eStreamVideoType);
118
119/**
120 * º¯ÊýÃû³Æ£º Stream_Video_Release
121 * ¹¦ÄÜÃèÊö£º ÊÍ·ÅÁ÷ýÌåÄ£¿é×ÊÔ´¡£
122 * ²ÎÊý˵Ã÷£º ÎÞ
123 * ·µ »Ø Öµ£º ³É¹¦·µ»ØDCAMERA_OP_SUCCESS;·ñÔò·µ»ØDCAMERA_OP_ERROR¡£
124 * ÆäËü˵Ã÷£º Óë³õʼ»¯º¯Êý³É¶ÔʹÓÃ
125 */
126DCAMERA_RETURN_VALUE_E Stream_Video_Release(void);
127
128/**
129 * º¯ÊýÃû³Æ£º Stream_Video_Decode
130 * ¹¦ÄÜÃèÊö£º Á÷ýÌåÊÓÆµ½âÂë¡¢Êä³ö¡£
131 * ²ÎÊý˵Ã÷£º (IN)param:ÊÓÆµÊý¾Ý½á¹¹Ö¸Õ룬°üÀ¨Êý¾ÝÖ¸ÕëÓ볤¶È
132 * ·µ »Ø Öµ£º ³É¹¦·µ»ØDCAMERA_OP_SUCCESS;·ñÔò·µ»ØDCAMERA_OP_ERROR¡£
133 * ÆäËü˵Ã÷£º ¸Ãº¯Êý²»½öÌṩ½âÂë¶øÇÒ°üÀ¨½âÂëºóµÄÊÓÆµÊä³ö¹¦ÄÜ
134 */
135DCAMERA_RETURN_VALUE_E Stream_Video_Decode(STREAM_DATA *param);
136
137/**
138 * º¯ÊýÃû³Æ£º Stream_Video_SetParam
139 * ¹¦ÄÜÃèÊö£º Á÷ýÌåÊÓÆµÉèÖá£
140 * ²ÎÊý˵Ã÷£º (IN)param:ÉèÖòÎÊý£¬ÉèÖÃÊÓÆµÏÔʾµÄÇøÓò¼°Ðýת½Ç¶È
141 * ·µ »Ø Öµ£º ³É¹¦·µ»ØDCAMERA_OP_SUCCESS;·ñÔò·µ»ØDCAMERA_OP_ERROR¡£
142 * ÆäËü˵Ã÷£º
143 */
144DCAMERA_RETURN_VALUE_E Stream_Video_SetParam(STREAM_SET_PARAM *param);
145
146/**
147 * º¯ÊýÃû³Æ£ºStream_Audio_Open
148 * ¹¦ÄÜÃèÊö£º´ò¿ªÁ÷ýÌåÒôƵÉ豸¡£
149 * ²ÎÊý˵Ã÷£º(IN)data_type:Á÷ýÌåÊý¾ÝÀàÐÍ
150 * (IN)stream_param:ÉèÖòÎÊý
151 * ·µ »Ø Öµ£º ³É¹¦·µ»ØÁ÷ýÌåÒôƵ²¥·Å¾ä±ú;·ñÔò·µ»ØNULL¡£
152 * ÆäËü˵Ã÷£º
153 */
154STREAM_AUDIO_HANDLE Stream_Audio_Open(DD_STEAMING_AUDIO data_type, DD_STREAM_AUDIO_SET *stream_param);
155
156/**
157 * º¯ÊýÃû³Æ£ºStream_Audio_Close
158 * ¹¦ÄÜÃèÊö£º¹Ø±ÕÁ÷ýÌåÒôƵÉ豸¡£
159 * ²ÎÊý˵Ã÷£º(IN)handle:Á÷ýÌåÒôƵ²¥·Å¾ä±ú
160 * ·µ »Ø Öµ£º ³É¹¦·µ»ØAUDIO_NO_ERROR;·ñÔò·µ»ØÏàÓ¦µÄ´íÎóÂë¡£
161 * ÆäËü˵Ã÷£º
162 */
163AUDIO_RESULT_E Stream_Audio_Close(STREAM_AUDIO_HANDLE handle);
164
165/**
166 * º¯ÊýÃû³Æ£ºStream_Audio_Open
167 * ¹¦ÄÜÃèÊö£ºÁ÷ýÌåÒôƵÊý¾Ý½âÂëÊä³ö¡£
168 * ²ÎÊý˵Ã÷£º(IN)handle:Á÷ýÌåÒôƵ²¥·Å¾ä±ú
169 * (IN)buffer:ÒôƵÊý¾ÝÖ¸Õë
170 * (IN)buffer_size:ÒôƵÊý¾Ý³¤¶È
171 * ·µ »Ø Öµ£º ³É¹¦·µ»ØAUDIO_NO_ERROR;·ñÔò·µ»ØÏàÓ¦µÄ´íÎóÂë¡£
172 * ÆäËü˵Ã÷£º
173 */
174AUDIO_RESULT_E Stream_Audio_Decode(STREAM_AUDIO_HANDLE handle,
175 UINT32 *buffer,
176 UINT32 buffer_size);
177
178#ifdef __cplusplus
179}
180#endif
181
182#endif /* ZTE_STREAM_H */
183