![]() |
![]() |
00001 /* --COPYRIGHT--,BSD 00002 * Copyright (c) 2010, Texas Instruments Incorporated 00003 * All rights reserved. 00004 * 00005 * Redistribution and use in source and binary forms, with or without 00006 * modification, are permitted provided that the following conditions 00007 * are met: 00008 * 00009 * * Redistributions of source code must retain the above copyright 00010 * notice, this list of conditions and the following disclaimer. 00011 * 00012 * * Redistributions in binary form must reproduce the above copyright 00013 * notice, this list of conditions and the following disclaimer in the 00014 * documentation and/or other materials provided with the distribution. 00015 * 00016 * * Neither the name of Texas Instruments Incorporated nor the names of 00017 * its contributors may be used to endorse or promote products derived 00018 * from this software without specific prior written permission. 00019 * 00020 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00021 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 00022 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00023 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 00024 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00025 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00026 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 00027 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 00028 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 00029 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 00030 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00031 * --/COPYRIGHT--*/ 00032 00063 #ifndef ti_sdo_dmai_Capture_h_ 00064 #define ti_sdo_dmai_Capture_h_ 00065 00066 #include <xdc/std.h> 00067 00068 #include <ti/sdo/dmai/Dmai.h> 00069 #include <ti/sdo/dmai/BufTab.h> 00070 #include <ti/sdo/dmai/VideoStd.h> 00071 #include <ti/sdo/dmai/BufferGfx.h> 00072 #include <ti/sdo/dmai/ColorSpace.h> 00073 00076 00080 typedef enum { 00082 Capture_Input_SVIDEO = 0, 00083 00085 Capture_Input_COMPOSITE, 00086 00088 Capture_Input_COMPONENT, 00089 00093 Capture_Input_CAMERA, 00094 00095 Capture_Input_COUNT 00096 } Capture_Input; 00097 00104 typedef struct Capture_Attrs { 00107 Int numBufs; 00108 00110 Capture_Input videoInput; 00111 00115 Int32 cropWidth; 00116 00119 Int32 cropHeight; 00120 00123 Int32 cropX; 00124 00127 Int32 cropY; 00128 00133 Char *captureDevice; 00134 00141 Bool smoothPad; 00142 00146 VideoStd_Type videoStd; 00147 00159 Int decoderIdx; 00160 00165 ColorSpace_Type colorSpace; 00166 00173 BufferGfx_Dimensions *captureDimension; 00174 00185 Bool onTheFly; 00186 } Capture_Attrs; 00187 00191 typedef struct Capture_Object *Capture_Handle; 00192 00211 extern const Capture_Attrs Capture_Attrs_DM6446_DM355_DEFAULT; 00212 00231 extern const Capture_Attrs Capture_Attrs_DM6467_DEFAULT; 00232 00251 extern const Capture_Attrs Capture_Attrs_DM365_DEFAULT; 00252 00271 extern const Capture_Attrs Capture_Attrs_OMAPL138_DEFAULT; 00272 00291 extern const Capture_Attrs Capture_Attrs_OMAP3530_DEFAULT; 00292 00293 #if defined (__cplusplus) 00294 extern "C" { 00295 #endif 00296 00310 extern Capture_Handle Capture_create(BufTab_Handle hBufTab, 00311 Capture_Attrs *attrs); 00312 00329 extern Int Capture_detectVideoStd(Capture_Handle hCapture, 00330 VideoStd_Type *videoStdPtr, 00331 Capture_Attrs *attrs); 00343 extern Int Capture_get(Capture_Handle hCapture, Buffer_Handle *hBufPtr); 00344 00357 extern Int Capture_put(Capture_Handle hCapture, Buffer_Handle hBuf); 00358 00369 extern Int Capture_delete(Capture_Handle hCapture); 00370 00381 extern VideoStd_Type Capture_getVideoStd(Capture_Handle hCapture); 00382 00393 extern BufTab_Handle Capture_getBufTab(Capture_Handle hCapture); 00394 00395 #if defined (__cplusplus) 00396 } 00397 #endif 00398 00401 #endif /* ti_sdo_dmai_Capture_h_ */