| 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_mosaic_display.h $ |
|---|
| 39 | * $brcm_Revision: 7 $ |
|---|
| 40 | * $brcm_Date: 5/25/11 2:30p $ |
|---|
| 41 | * |
|---|
| 42 | * Module Description: |
|---|
| 43 | * |
|---|
| 44 | * Revision History: |
|---|
| 45 | * |
|---|
| 46 | * $brcm_Log: /nexus/modules/display/7400/include/nexus_mosaic_display.h $ |
|---|
| 47 | * |
|---|
| 48 | * 7 5/25/11 2:30p erickson |
|---|
| 49 | * SW7420-1148: add destructor attr for NEXUS_VideoWindow_OpenMosaic |
|---|
| 50 | * |
|---|
| 51 | * 6 2/19/10 1:23p erickson |
|---|
| 52 | * SW7405-3625: add NEXUS_VideoWindowMosaicSettings for backendMosaic |
|---|
| 53 | * support |
|---|
| 54 | * |
|---|
| 55 | * 5 12/9/09 3:10p erickson |
|---|
| 56 | * SW7405-3394: refactor mosaic mode API |
|---|
| 57 | * |
|---|
| 58 | * 4 7/24/09 9:46a erickson |
|---|
| 59 | * PR35457: improve comments |
|---|
| 60 | * |
|---|
| 61 | * 3 1/23/08 9:22p vobadm |
|---|
| 62 | * PR35457: update docs |
|---|
| 63 | * |
|---|
| 64 | * 2 1/23/08 2:39p erickson |
|---|
| 65 | * PR35457: update docs |
|---|
| 66 | * |
|---|
| 67 | * 1 1/18/08 2:20p jgarrett |
|---|
| 68 | * PR 38808: Merging to main branch |
|---|
| 69 | * |
|---|
| 70 | * Nexus_Devel/1 11/8/07 9:16a erickson |
|---|
| 71 | * PR36802: added mosaic mode |
|---|
| 72 | * |
|---|
| 73 | ***************************************************************************/ |
|---|
| 74 | #ifndef NEXUS_MOSAIC_DISPLAY_H__ |
|---|
| 75 | #define NEXUS_MOSAIC_DISPLAY_H__ |
|---|
| 76 | |
|---|
| 77 | #include "nexus_display.h" |
|---|
| 78 | |
|---|
| 79 | #ifdef __cplusplus |
|---|
| 80 | extern "C" { |
|---|
| 81 | #endif |
|---|
| 82 | |
|---|
| 83 | /*=**************** |
|---|
| 84 | In mosaic mode, the video decoder timeslices its main decoder in order to decoder several lower resolution streams |
|---|
| 85 | (e.g. CIF or QCIF sized). Each mosaic stream is routed to a special mosaic video window. |
|---|
| 86 | |
|---|
| 87 | You must call NEXUS_VideoWindow_AddInput for one, not all, of the mosaic VideoDecoders. |
|---|
| 88 | |
|---|
| 89 | See nexus/modules/video_decoder/CHIP/include/nexus_mosaic_video_decoder.h for the mosaic mode video decoder API. |
|---|
| 90 | |
|---|
| 91 | See nexus/examples/video/mosaic_decode.c for an example of how to use the mosaic decode and display API's. |
|---|
| 92 | */ |
|---|
| 93 | |
|---|
| 94 | /** |
|---|
| 95 | Summary: |
|---|
| 96 | Open a mosaic window |
|---|
| 97 | |
|---|
| 98 | Description: |
|---|
| 99 | Only a subset of VideoWindow functionality is available for mosaics that is: |
|---|
| 100 | NEXUS_VideoWindowSettings.position |
|---|
| 101 | NEXUS_VideoWindowSettings.zorder |
|---|
| 102 | NEXUS_VideoWindowSettings.visible |
|---|
| 103 | NEXUS_VideoWindow_AddInput |
|---|
| 104 | |
|---|
| 105 | You must connect a mosaic VideoDecoder to a mosaic VideoWindow. |
|---|
| 106 | All mosaic VideoDecoder instances must be part of the same parent VideoDecoder. |
|---|
| 107 | **/ |
|---|
| 108 | NEXUS_VideoWindowHandle NEXUS_VideoWindow_OpenMosaic( /* attr{destructor=NEXUS_VideoWindow_Close} */ |
|---|
| 109 | NEXUS_VideoWindowHandle parentWindow, |
|---|
| 110 | unsigned mosaicIndex |
|---|
| 111 | ); |
|---|
| 112 | |
|---|
| 113 | /** |
|---|
| 114 | Summary: |
|---|
| 115 | Mosaic-only window settings |
|---|
| 116 | **/ |
|---|
| 117 | typedef struct NEXUS_VideoWindowMosaicSettings |
|---|
| 118 | { |
|---|
| 119 | struct { |
|---|
| 120 | bool enabled; /* Set to true if the decoder is not in mosaic mode and you want the display module to |
|---|
| 121 | manually cut up the picture into mosaics. This will be done using backendMosaic.clipRect and backendMosaic.baseRect. |
|---|
| 122 | This must be set before NEXUS_VideoWindow_AddInput is called for any mosaic window. |
|---|
| 123 | This is used for 3DTV decoding support. */ |
|---|
| 124 | NEXUS_Rect clipRect; |
|---|
| 125 | NEXUS_Rect clipBase; |
|---|
| 126 | } backendMosaic; |
|---|
| 127 | } NEXUS_VideoWindowMosaicSettings; |
|---|
| 128 | |
|---|
| 129 | /** |
|---|
| 130 | Summary: |
|---|
| 131 | **/ |
|---|
| 132 | void NEXUS_VideoWindow_GetMosaicSettings( |
|---|
| 133 | NEXUS_VideoWindowHandle window, |
|---|
| 134 | NEXUS_VideoWindowMosaicSettings *pSettings /* [out] */ |
|---|
| 135 | ); |
|---|
| 136 | |
|---|
| 137 | /** |
|---|
| 138 | Summary: |
|---|
| 139 | **/ |
|---|
| 140 | NEXUS_Error NEXUS_VideoWindow_SetMosaicSettings( |
|---|
| 141 | NEXUS_VideoWindowHandle window, |
|---|
| 142 | const NEXUS_VideoWindowMosaicSettings *pSettings |
|---|
| 143 | ); |
|---|
| 144 | |
|---|
| 145 | #ifdef __cplusplus |
|---|
| 146 | } |
|---|
| 147 | #endif |
|---|
| 148 | |
|---|
| 149 | #endif |
|---|
| 150 | |
|---|