source: svn/trunk/newcon3bcm2_21bu/magnum/portinginterface/xvd/7552/bxvd_userdata.h

Last change on this file was 2, checked in by jglee, 11 years ago

first commit

  • Property svn:executable set to *
File size: 9.5 KB
Line 
1/***************************************************************************
2 *    Copyright (c) 2004-2010, Broadcom Corporation
3 *    All Rights Reserved
4 *    Confidential Property of Broadcom Corporation
5 *
6 *  THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE
7 *  AGREEMENT  BETWEEN THE USER AND BROADCOM.  YOU HAVE NO RIGHT TO USE OR
8 *  EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT.
9 *
10 * $brcm_Workfile: bxvd_userdata.h $
11 * $brcm_Revision: Hydra_Software_Devel/18 $
12 * $brcm_Date: 3/3/10 5:27p $
13 *
14 * Module Description:
15 *       This module controls and returns the User Data coming in the stream
16 * and captured by the decoder.
17 *
18 * Revision History:
19 *
20 * $brcm_Log: /magnum/portinginterface/xvd/7401/bxvd_userdata.h $
21 *
22 * Hydra_Software_Devel/18   3/3/10 5:27p davidp
23 * SW7400-2704: Add SEI message frame packing support.
24 *
25 * Hydra_Software_Devel/17   4/3/08 4:33p pblanco
26 * PR41311: Made queue depth and item size runtime settable parameters
27 *
28 * Hydra_Software_Devel/16   1/17/07 12:36p pblanco
29 * PR27168: Incorporated changes suggested in code review on 16-Jan-2007
30 *
31 * Hydra_Software_Devel/15   10/25/06 8:28a pblanco
32 * PR20017: Fix c++ ifdef. It didn't span the entire header.
33 *
34 * Hydra_Software_Devel/14   6/9/06 3:15p pblanco
35 * PR20017: Fixed error return value in the documentation. We return
36 * BXVD_ERR_USERDATA_NONE instead of the value originally stated.
37 *
38 * Hydra_Software_Devel/13   6/9/06 1:16p pblanco
39 * PR20017: Removed unused parameters from uninstall callback function.
40 *
41 * Hydra_Software_Devel/12   6/9/06 8:54a pblanco
42 * PR20017: Remove reference to unused BXVD_FlagReadDone function.
43 *
44 * Hydra_Software_Devel/11   3/23/06 2:43p pblanco
45 * PR19877: Cleaned up userdata settings structure so DocJet will catch
46 * it.
47 *
48 * Hydra_Software_Devel/10   3/10/06 9:36a pblanco
49 * PR20080: Added missing parameter direction tags to prototypes.
50 *
51 * Hydra_Software_Devel/9   12/14/05 10:00a pblanco
52 * PR16052: Changed install/uninstall callback function protoypes to
53 * reflect tha changes made to the API functions.
54 *
55 * Hydra_Software_Devel/8   11/22/05 9:42a pblanco
56 * PR16052: Added third parameter to userdata callback to make it XVD
57 * callback compliant.
58 *
59 * Hydra_Software_Devel/7   11/18/05 9:21a pblanco
60 * PR16052: Fixed API argument for read call. Was void *, now
61 * BAVC_USERDATA_info *
62 *
63 * Hydra_Software_Devel/5   11/2/05 9:44a pblanco
64 * PR16052: Added function prototypes for install/uninstall interrupt
65 * callback.
66 *
67 * Hydra_Software_Devel/4   7/7/05 4:13p pblanco
68 * PR16052: Check in after fixing CC problems.
69 *
70 * Hydra_Software_Devel/3   6/23/05 5:50p maivu
71 * PR 15894: Modifications based on feedback from XVD API review for
72 * Phase1
73 *
74 * Hydra_Software_Devel/2   6/21/05 2:36p maivu
75 * PR 15894: Removed userdata install/uninstall functions, added generic
76 * interrupt install/uninstall function instead. Added modifications to
77 * be more compatible with mvd.
78 *
79 * Hydra_Software_Devel/1   6/17/05 11:37a maivu
80 * PR 15894: Initial revision
81 *
82  ***************************************************************************/
83#ifndef BXVD_USERDATA_H__
84#define BXVD_USERDATA_H__
85
86#include "bfmt.h"                  /* Video timing format */
87#include "bavc.h"                  /* Analog Video Common */
88
89
90#ifdef __cplusplus
91extern "C" {
92#endif
93
94/* SEI message T35 */
95#define BXVD_USERDATA_H264_TYPE_REGISTERED           4
96#define BXVD_USERDATA_H264_TYPE_UNREGISTERED         5
97#define BXVD_USERDATA_H264_TYPE_FRAME_PACK          45
98
99/***************************************************************************
100Summary:
101        User Data Handle
102
103Description:
104        An opaque handle for each channel
105****************************************************************************/
106typedef struct BXVD_P_UserDataContext *BXVD_Userdata_Handle;
107
108/***************************************************************************
109Summary:
110        User Data default settings structure
111
112Description:
113        Contains the maximum userdata buffer size and any other default settings as
114 required. The maximum userdata default size is 4K.
115
116****************************************************************************/
117typedef struct BXVD_Userdata_Settings
118{
119      int maxDataSize;      /* Default is 4K */
120      int maxQueueDepth;    /* Default is 64 entries */
121      int maxQueueItemSize; /* Default is 512 bytes */
122} BXVD_Userdata_Settings;
123
124/***************************************************************************
125Summary:
126        Returns default User data settings
127
128Returns:
129        BERR_SUCCESS - If function is successful.
130
131See Also:
132        BXVD_Userdata_Open
133       
134****************************************************************************/
135BERR_Code BXVD_Userdata_GetDefaultSettings (
136        BXVD_Userdata_Settings *pDefSettings    /* [out] default User Data settings */
137);
138
139/***************************************************************************
140Summary:
141        Opens user data channel
142
143Description:
144        This function initializes data structures for collecting user
145        data present in the stream. In MPEG stream user data can come
146        after sequence header, after gop header and after picture
147        header. This function initializes user data handle for the
148        channel passed. This handle should be used to make subsequent
149        calls to other user data APIs.
150
151Returns:
152        BERR_SUCCESS - If function is successful.
153
154See Also:
155        BXVD_Userdata_CloseUserData
156       
157****************************************************************************/
158BERR_Code BXVD_Userdata_Open(
159        BXVD_ChannelHandle            hXVDCh,      /* [in] XVD Channel handle */
160        BXVD_Userdata_Handle         *phUserData,  /* [out] User data handle */
161        const BXVD_Userdata_Settings *pDefSettings /* [in] default User Data settings */
162);
163
164/***************************************************************************
165Summary:
166        Closes user data channel
167
168Description:
169        This function closes the user data channel. It frees any
170        resources acquired by the channel and disables User Data extraction .
171
172Returns:
173        BERR_SUCCESS - If function is successful.
174
175See Also:
176        BXVD_Userdata_Open
177       
178****************************************************************************/
179BERR_Code BXVD_Userdata_Close (
180        BXVD_Userdata_Handle   hUserData /* [In] User data handle */
181);
182
183
184/***************************************************************************
185Summary:
186        Read buffer information
187
188Description:
189        This function returns the next available packet of User Data. This is called
190 from the application's userdata callback function.
191
192Returns:
193        BERR_SUCCESS              - If function is successful.
194        BXVD_ERR_USERDATA_NONE    - Returns an error if no user data is available in
195                             the buffer.
196 BXVD_ERR_USERDATA_INVALID - The userdata buffer contains invalid data
197
198See Also:
199        BXVD_Userdata_InstallInterruptCallback
200        BXVD_Userdata_UninstallInterruptCallback
201****************************************************************************/
202BERR_Code BXVD_Userdata_Read(
203        BXVD_Userdata_Handle   hUserData,      /* [In] User data handle */
204        BAVC_USERDATA_info *pUserDataInfo  /* [Out] User data buffer info */
205);
206
207
208/***************************************************************************
209Summary:
210        Read buffer information from an Isr
211
212Description:
213        See description of BXVD_Userdata_Read()
214
215Returns:
216        BERR_SUCCESS - If function is successful.
217        BXVD_ERR_USERDATA_NONE - Returns an error if no user data is
218                available in the buffer.
219
220See Also:
221        BXVD_USerdata_Read
222****************************************************************************/
223BERR_Code BXVD_Userdata_Read_isr(
224        BXVD_Userdata_Handle   hUserData,     /* [In] User data handle */
225        BAVC_USERDATA_info     *pUserDataInfo  /* [Out] User data buffer info */
226);
227
228/***************************************************************************
229Summary:
230        Enable/Disable user data capture
231
232Description:
233        This function enables or disables the capture of user data
234
235Returns:
236        BERR_SUCCESS - If opened XVD is successful.
237
238See Also:
239       
240****************************************************************************/
241BERR_Code BXVD_Userdata_Enable (
242        BXVD_Userdata_Handle  hUserData, /* [In] User data handle */
243        bool                  bEnable    /* [In] Enable/disable userdata */
244        );
245
246/***************************************************************************
247Summary:
248  Install user data callback
249
250Description:
251  This function installs a callback to the application that occurs when
252  user data is available.
253
254Returns:
255  BERR_SUCCESS - If call is successful
256
257See Also:
258        BXVD_Userdata_UninstallInterruptCallback
259                BXVD_Userdata_Read
260****************************************************************************/
261BERR_Code BXVD_Userdata_InstallInterruptCallback
262(
263 BXVD_Userdata_Handle hUserData, /* [in] XVD userdata handle */
264 BINT_CallbackFunc    xvdInterruptCallBack, /* [in] user's callback function */
265 void                   *pParm1, /* [in] unused */
266 int                     parm2  /* [in] unused */
267 );
268
269/***************************************************************************
270Summary:
271  Uninstall user data callback
272
273Description:
274  This function uninstalls an interrupt callback installed by
275  BXVD_UserData_InstallInterruptCallback.
276
277Returns:
278  BERR_SUCCESS - If call was successful
279
280See Also:
281  BXVD_Userdata_InstallInterruptCallback
282  BXVD_Userdata_Read
283****************************************************************************/
284BERR_Code BXVD_Userdata_UninstallInterruptCallback
285(
286 BXVD_Userdata_Handle    hUserData, /* [in] XVD userdata handle */
287 BINT_CallbackFunc       xvdInterruptCallBack /* [in] callback to uninstall */
288 );
289
290/* Function Prototypes }}} */
291
292#ifdef __cplusplus
293}
294#endif
295
296#endif /* BXVD_USERDATA_H__ */
297/* End of file. */
298 
299
300
Note: See TracBrowser for help on using the repository browser.