📄 play_capture_common.h
字号:
/* * * Copyright (c) 2001-2007 Sigma Designs, Inc. * All Rights Reserved. Proprietary and Confidential. * *//** @file play_capture_common.h @brief header file holing various macros and defines for all play_capture_... files @author Christian Wolff Sean.Sekwon.Choi*/#ifndef __PLAY_CAPTURE_COMMON_H__#define __PLAY_CAPTURE_COMMON_H__#if 1#define FUNCNAME ENABLE#else#define FUNCNAME DISABLE#endif// zoom helper defines and functions#define ZOOM_0 4096 // 0% zoom position#define ZOOM_1 8192 // 100% zoom position#define MAX_NUMBER_OF_VIDEO_CHIPS 3#define MAX_NUMBER_OF_AUDIO_CHIPS 3enum capsam_access_type { capsam_access_type_none = 0, capsam_access_type_hdmi, capsam_access_type_analog, capsam_access_type_last};enum capsam_board { capsam_kissjamoplasma, capsam_sigma775avinput, capsam_sigma760e1hdref, capsam_sigma760e2hdlcd, capsam_sigma844e1dtv, capsam_pioneer809e1video, capsam_sigmaDTV8634,};enum capsam_chip { capsam_chip_none = 0, capsam_chip_SiI9031, capsam_chip_AD9380, capsam_chip_AD9883, capsam_chip_ADV7402, capsam_chip_SAA7119, capsam_chip_WM8775, capsam_chip_MSP34x5, capsam_chip_TW9919, capsam_chip_last,};enum capsam_input { capsam_input_none = 0, capsam_input_tuner1, capsam_input_tuner2, capsam_input_cvbs1, capsam_input_cvbs2, capsam_input_svideo1, capsam_input_svideo2, capsam_input_component1, capsam_input_component2, capsam_input_scart1, capsam_input_scart2, capsam_input_vga, capsam_input_dvi, capsam_input_hdmi, capsam_input_last,};/* struct of all necessary information to access a certain input on a certain capture chip */struct capsam_access { RMuint32 APIVersion; // set to 1 enum capsam_access_type access_type; // digital or analog enum capsam_chip chip; // capture chip specification enum capsam_input input; // input type RMuint32 input_number; // arbitrary number to select one specific input of the specified type RMuint32 I2CModuleID; // emhwlib Module ID of the I2C bus access struct EMhwlibI2CDeviceParameter I2CDevice; // pI2CDevice.DevAddr contains the primaty I2C device address of the chip, the other members need to match the board specific environment RMuint32 XtalClock;};struct capsam_board_config{ RMuint32 APIVersion; RMuint32 XtalClock; enum capsam_board board; struct capsam_access chip_hdmi_config; struct capsam_access chip_analog_video_config; struct capsam_access chip_analog_audio_config; struct capsam_access chip_analog_audio_config2;};// choi added startenum capsam_video_input { capsam_video_input_none = 0, capsam_video_input_tuner1, capsam_video_input_tuner2, capsam_video_input_cvbs1, capsam_video_input_cvbs2, capsam_video_input_svideo1, capsam_video_input_svideo2, capsam_video_input_component1, capsam_video_input_component2, capsam_video_input_scart1, capsam_video_input_scart2, capsam_video_input_vga, capsam_video_input_dvi, capsam_video_input_hdmi1, capsam_video_input_hdmi2, capsam_video_input_hdmi3, capsam_video_input_last,};enum capsam_audio_input { capsam_audio_input_none = 0, capsam_audio_input_tuner1, capsam_audio_input_tuner2, capsam_audio_input_stereo1, capsam_audio_input_stereo2, capsam_audio_input_stereo3, capsam_audio_input_hdmi1, capsam_audio_input_hdmi2, capsam_audio_input_hdmi3, capsam_audio_input_last,};struct capsam_video_input_map{ enum capsam_video_input input; enum capsam_chip chip;};struct capsam_audio_input_map{ enum capsam_audio_input input; enum capsam_chip chip;};struct capsam_chip_info{ enum capsam_chip chip; RMuint32 I2CModuleID; struct EMhwlibI2CDeviceParameter I2CDevice; };struct capsam_board_info{ enum capsam_board board; RMuint32 clock; struct capsam_video_input_map* p_video_input_map; struct capsam_chip_info* p_video_chip_info; struct capsam_chip_info* p_audio_chip_info; };// choi added endstruct capsam_update { RMuint32 APIVersion; // set to 1 // Application process updates RMbool VideoUpdate; // video mode needs to be updated by main app (detect and setup cycle) RMbool VideoRestart; // video capture process needs to be restarted by main app RMbool VideoOff; // video capture process needs to be stopped RMbool AudioUpdate; // audio needs to be updated by main app (detect and setup cycle) RMbool AudioRestart; // audio pass through needs to be restarted by main app RMbool AudioOff; // audio pass through needs to be stopped // Input (DispVideoInput or DispGraphicInput) settings RMbool TVStandardValid; // TVStandard is valid RMbool TVStandardUpdate; // TVStandard needs to be updated on current emhwlib input module enum EMhwlibTVStandard TVStandard; RMbool TVFormatValid; // TVFormat is valid RMbool TVFormatUpdate; // TVFormat needs to be updated on current emhwlib input module struct EMhwlibGenericTVFormat TVFormat; RMbool PictureAspectRatioValid; // PictureAspectRatio is valid RMbool PictureAspectRatioUpdate; // PictureAspectRatio needs to be updated on current emhwlib input module struct EMhwlibAspectRatio PictureAspectRatio; RMbool PixelAspectRatioValid; // PixelAspectRatio is valid RMbool PixelAspectRatioUpdate; // PixelAspectRatio needs to be updated on current emhwlib input module struct EMhwlibAspectRatio PixelAspectRatio; RMbool InputColorSpaceValid; // InputColorSpace is valid RMbool InputColorSpaceUpdate; // InputColorSpace needs to be updated on current emhwlib input module enum EMhwlibColorSpace InputColorSpace; RMbool InputColorFormatValid; // InputColorFormat is valid RMbool InputColorFormatUpdate; // InputColorFormat needs to be updated on current emhwlib input module enum EMhwlibInputColorFormat InputColorFormat; // Scaler (DispXXXScaler) settings RMbool FlushScaler; // scaler needs to be flushed RMbool ZoomValid; // Zoom values are valid RMbool ZoomUpdate; // Zoom needs to be updated on current emhwlib scaler module RMuint32 ZoomX; RMuint32 ZoomY; RMuint32 ZoomW; RMuint32 ZoomH; RMbool ContentAFDValid; // ContentAFD is valid RMbool ContentAFDUpdate; // ContentAFD needs to be updated on current emhwlib scaler module struct EMhwlibActiveFormatDescription ContentAFD; // ContentAFD.FrameAspectRatio should match PictureAspectRatio RMbool ContentBarInfoValid; // ContentBarInfo is valid RMbool ContentBarInfoUpdate; // ContentBarInfo needs to be updated on current emhwlib scaler module struct EMhwlibActiveFormatBarInfo ContentBarInfo; RMbool ContentScanInfoValid; // ContentScanInfo is valid RMbool ContentScanInfoUpdate; // ContentScanInfo needs to be updated on current emhwlib scaler module enum EMhwlibScanInfo ContentScanInfo; // Mixer (DispXXXMixer) settings RMbool MixerColorSpaceValid; // MixerColorSpace is valid RMbool MixerColorSpaceUpdate; // MixerColorSpace needs to be updated on current emhwlib mixer module enum EMhwlibColorSpace MixerColorSpace; // Output (DispXXXOut) settings RMbool OutputTVStandardValid; // TVStandard is valid RMbool OutputTVStandardUpdate; // TVStandard needs to be updated on current emhwlib input module enum EMhwlibTVStandard OutputTVStandard; RMbool OutputAFDValid; // AFD is valid RMbool OutputAFDUpdate; // AFD needs to be updated on current emhwlib input module struct EMhwlibActiveFormatDescription OutputAFD; // AFD.FrameAspectRatio should match PictureAspectRatio // Video Input to Capture Chip Standard Selection. detected by capture chip, but can be overriden by user RMbool InputTVStandardValid; // TVStandard is valid RMbool InputTVStandardUpdate; // TVStandard needs to be updated on current emhwlib input module enum EMhwlibTVStandard InputTVStandard; // Audio Settings RMbool AudioSampleRateValid; RMbool AudioSampleRateUpdate; RMuint32 AudioSampleRate; RMbool AudioMclkFactorValid; RMbool AudioMclkFactorUpdate; enum MClkFactor AudioMclkFactor; // capture chip specific information RMbool SAA7119CG2Valid; RMbool SAA7119CG2Update; RMbool SAA7119UseCG2; };enum audio_state { audio_state_off, // no audio present audio_state_request, // request audio, wait 200 mSec for stable clock audio_state_on // audio is running};#define IsNTSC(TVStandard, isNTSC) do { \ switch (TVStandard) { \ case EMhwlibTVStandard_PAL_60: \ case EMhwlibTVStandard_PAL_M: \ case EMhwlibTVStandard_PAL_60_714: \ case EMhwlibTVStandard_PAL_M_714: \ case EMhwlibTVStandard_ITU_Bt656_625: \ case EMhwlibTVStandard_ITU_Bt656_288p: \ case EMhwlibTVStandard_PAL_BG: \ case EMhwlibTVStandard_PAL_N: \ case EMhwlibTVStandard_576p50: \ case EMhwlibTVStandard_PAL_BG_702: \ case EMhwlibTVStandard_PAL_N_702: \ case EMhwlibTVStandard_576p50_702: \ case EMhwlibTVStandard_PAL_BG_704: \ case EMhwlibTVStandard_PAL_N_704: \ case EMhwlibTVStandard_576p50_704: \ isNTSC = FALSE; \ break; \ case EMhwlibTVStandard_ITU_Bt656_525: \ case EMhwlibTVStandard_ITU_Bt656_240p: \ case EMhwlibTVStandard_NTSC_M_Japan: \ case EMhwlibTVStandard_NTSC_M: \ case EMhwlibTVStandard_480p59: \ case EMhwlibTVStandard_NTSC_M_Japan_714: \ case EMhwlibTVStandard_NTSC_M_714: \ case EMhwlibTVStandard_480p59_714: \ default: \ isNTSC = TRUE; \ break; \ } \ }while(0)#endif // __PLAY_CAPTURE_COMMON_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -