source: svn/newcon3bcm2_21bu/nexus/modules/display/7552/include/nexus_ccir656_input.h

Last change on this file was 76, checked in by megakiss, 10 years ago

1W 대기전력을 만족시키기 위하여 POWEROFF시 튜너를 Standby 상태로 함

  • Property svn:executable set to *
File size: 7.7 KB
Line 
1/***************************************************************************
2 *     (c)2007-2011 Broadcom Corporation
3 *
4 *  This program is the proprietary software of Broadcom Corporation and/or its licensors,
5 *  and may only be used, duplicated, modified or distributed pursuant to the terms and
6 *  conditions of a separate, written license agreement executed between you and Broadcom
7 *  (an "Authorized License").  Except as set forth in an Authorized License, Broadcom grants
8 *  no license (express or implied), right to use, or waiver of any kind with respect to the
9 *  Software, and Broadcom expressly reserves all rights in and to the Software and all
10 *  intellectual property rights therein.  IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU
11 *  HAVE NO RIGHT TO USE THIS SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY
12 *  NOTIFY BROADCOM AND DISCONTINUE ALL USE OF THE SOFTWARE.
13 *
14 *  Except as expressly set forth in the Authorized License,
15 *
16 *  1.     This program, including its structure, sequence and organization, constitutes the valuable trade
17 *  secrets of Broadcom, and you shall use all reasonable efforts to protect the confidentiality thereof,
18 *  and to use this information only in connection with your use of Broadcom integrated circuit products.
19 *
20 *  2.     TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
21 *  AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, REPRESENTATIONS OR
22 *  WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO
23 *  THE SOFTWARE.  BROADCOM SPECIFICALLY DISCLAIMS ANY AND ALL IMPLIED WARRANTIES
24 *  OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE,
25 *  LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION
26 *  OR CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT OF
27 *  USE OR PERFORMANCE OF THE SOFTWARE.
28 *
29 *  3.     TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR ITS
30 *  LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR
31 *  EXEMPLARY DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO YOUR
32 *  USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM HAS BEEN ADVISED OF
33 *  THE POSSIBILITY OF SUCH DAMAGES; OR (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT
34 *  ACTUALLY PAID FOR THE SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE
35 *  LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF
36 *  ANY LIMITED REMEDY.
37 *
38 * $brcm_Workfile: nexus_ccir656_input.h $
39 * $brcm_Revision: 5 $
40 * $brcm_Date: 5/13/11 12:17p $
41 *
42 * Module Description:
43 *
44 * Revision History:
45 *
46 * $brcm_Log: /nexus/modules/display/7400/include/nexus_ccir656_input.h $
47 *
48 * 5   5/13/11 12:17p erickson
49 * SW7420-1873: remove shutdown attribute
50 *
51 * 4   2/28/11 4:54p erickson
52 * SW7405-5146: move attr{null_allowed=y}
53 *
54 * 3   2/28/11 11:45a vsilyaev
55 * SW7405-5146: Allow NULL arguments in  NEXUS_Ccir656Input_Open
56 *
57 * 2   3/27/09 2:36p erickson
58 * PR53453: add 656 vbi support
59 *
60 * 1   6/11/08 12:44p vsilyaev
61 * PR 43491: Added support for CCIR-656 input
62 *
63 *
64 **************************************************************************/
65#ifndef NEXUS_CCIR656_INPUT_H__
66#define NEXUS_CCIR656_INPUT_H__
67
68#include "nexus_types.h"
69#include "nexus_display_types.h"
70
71#ifdef __cplusplus
72extern "C" {
73#endif
74
75/**
76Summary:
77The supported methods for encapsulating VBI data into ITU-R 656 bitstreams
78**/
79typedef enum NEXUS_Ccir656VbiFormat
80{
81    NEXUS_Ccir656VbiFormat_eSaa7113 = 0,
82    NEXUS_Ccir656VbiFormat_eModifiedSaa7113,
83    NEXUS_Ccir656VbiFormat_eSaa7114,
84    NEXUS_Ccir656VbiFormat_eSaa7114A,
85    NEXUS_Ccir656VbiFormat_eSaa7114B,
86    NEXUS_Ccir656VbiFormat_eSaa7114C,
87    NEXUS_Ccir656VbiFormat_eSaa7115,
88    NEXUS_Ccir656VbiFormat_eSmpte291,
89    NEXUS_Ccir656VbiFormat_eMax
90} NEXUS_Ccir656VbiFormat;
91
92
93/**
94Summary:
95Settings for Ccir656Input input
96**/
97typedef struct NEXUS_Ccir656InputSettings {
98    NEXUS_VideoFormat format; /* If autoFormatMode is false, format will be set as the video format. */
99    struct {
100        NEXUS_Ccir656VbiFormat format;
101        unsigned bufferSize;    /* Size of 656 ancillary ring buffer in bytes. Default is zero.
102                                   You will also need to set NEXUS_DisplayModuleSettings.vbi.ccir656InputBufferSize. */
103        bool longHeader; /* If true, then incomping SMPTE 291M packets are expected to have the three
104                            byte "component stream" header 00 FF FF.  Otherwise, packets are expected to have
105                            the one byte "composite stream" header FF.  Default is false. */
106        bool brokenDataCount; /* If true, then the incoming SMPTE 291M packets are expected to be in the
107                                 historical, incorrect format produced by Broadcom ITU-R 656 encoders.  In particular,
108                                 the packet DATA COUNT field counts bytes instead of DWORDs, and the accompanying
109                                 parity bits are not present. Default is true. */
110        NEXUS_CallbackDesc dataReady;
111    } vbi;
112} NEXUS_Ccir656InputSettings;
113
114/**
115Summary:
116Handle for the Ccir656 input interface
117**/
118typedef struct NEXUS_Ccir656Input *NEXUS_Ccir656InputHandle;
119
120/**
121Summary:
122Get default settings for the structure.
123
124Description:
125This is required in order to make application code resilient to the addition of new strucutre members in the future.
126**/
127void NEXUS_Ccir656Input_GetDefaultSettings(
128    NEXUS_Ccir656InputSettings *pSettings /* [out] */
129    );
130
131/**
132Summary:
133Open a new Ccir656 Input.
134
135**/
136NEXUS_Ccir656InputHandle NEXUS_Ccir656Input_Open( /* attr{destructor=NEXUS_Ccir656Input_Close} */
137    unsigned index,
138    const NEXUS_Ccir656InputSettings *pSettings /* attr{null_allowed=y} */
139    );
140
141/**
142Summary:
143Close a Ccir656 Input.
144**/
145void NEXUS_Ccir656Input_Close(
146    NEXUS_Ccir656InputHandle ccir656Input
147    );
148
149/**
150Summary:
151This function is used to get current configuration
152**/
153void NEXUS_Ccir656Input_GetSettings(
154    NEXUS_Ccir656InputHandle ccir656Input,
155    NEXUS_Ccir656InputSettings *pSettings /* [out] */
156    );
157
158/**
159Summary:
160This function is used to set new configuration
161**/
162NEXUS_Error NEXUS_Ccir656Input_SetSettings(
163    NEXUS_Ccir656InputHandle ccir656Input,
164    const NEXUS_Ccir656InputSettings *pSettings
165    );
166
167/**
168Summary:
169Returns the abstract NEXUS_VideoInput connector for the video input.
170This connector is passed to an NEXUS_AnalogVideoDecoder to digitize the analog video.
171
172Description:
173Assign to NEXUS_AnalogVideoDecoderSettings.videoInput
174**/
175NEXUS_VideoInput NEXUS_Ccir656Input_GetConnector(
176    NEXUS_Ccir656InputHandle ccir656Input
177    );
178
179/**
180Summary:
181Header for 656 ancillary data packets in the ring buffer
182**/
183typedef struct NEXUS_Ccir656InputVbiHeader
184{
185    bool topField;
186    uint8_t dataId;
187    uint8_t secondId;
188    unsigned payload; /* size of payload following this header in bytes */
189} NEXUS_Ccir656InputVbiHeader;
190
191/**
192Summary:
193Get pointer to data in the 656 ancillary data ring buffer
194
195Description:
196The application is responsible for parsing the header and the payload correctly.
197Nexus will always atomically add a header plus all of its payload.
198Application must handle wrap around. Wraparound could occur in the header or in the payload.
199**/
200NEXUS_Error NEXUS_Ccir656Input_GetBuffer(
201    NEXUS_Ccir656InputHandle ccir656Input,
202    void **pBuffer, /* [out] attr{memory=cached} pointer to data. size of data determined by size. */
203    unsigned *pSize /* [out] */
204    );
205
206/**
207Summary:
208Update amount consumed from last NEXUS_Ccir656Input_GetBuffer call.
209**/
210NEXUS_Error NEXUS_Ccir656Input_ReadComplete(
211    NEXUS_Ccir656InputHandle ccir656Input,
212    unsigned sizeConsumed
213    );
214
215/**
216Summary:
217Flush 656 ancillary data ring buffer
218**/
219void NEXUS_Ccir656Input_Flush(
220    NEXUS_Ccir656InputHandle ccir656Input
221    );
222
223#ifdef __cplusplus
224}
225#endif
226
227#endif /* NEXUS_CCIR656_INPUT_H__ */
228
Note: See TracBrowser for help on using the repository browser.