134 files changed, 31073 insertions, 30287 deletions
diff --git a/tvapi/libtv/tv/CAv.h b/tvapi/libtv/tv/CAv.h index 04a3cc9..b95b490 100644 --- a/tvapi/libtv/tv/CAv.h +++ b/tvapi/libtv/tv/CAv.h @@ -41,114 +41,114 @@ static const char *PATH_VIDEO_HEIGHT = "/sys/class/video/frame_height"; typedef enum VIDEO_3D_MODE_E { - VIDEO_3D_MODE_DISABLE, - VIDEO_3D_MODE_AUTO, - VIDEO_3D_MODE_LR, - VIDEO_3D_MODE_TB, - VIDEO_3D_MODE_LA, - VIDEO_3D_MODE_FA + VIDEO_3D_MODE_DISABLE, + VIDEO_3D_MODE_AUTO, + VIDEO_3D_MODE_LR, + VIDEO_3D_MODE_TB, + VIDEO_3D_MODE_LA, + VIDEO_3D_MODE_FA } VIDEO_3D_MODE_T; //end 3D=================================================================== typedef enum video_display_resolution_e { - VPP_DISPLAY_RESOLUTION_1366X768, - VPP_DISPLAY_RESOLUTION_1920X1080, - VPP_DISPLAY_RESOLUTION_3840X2160, - VPP_DISPLAY_RESOLUTION_MAX, + VPP_DISPLAY_RESOLUTION_1366X768, + VPP_DISPLAY_RESOLUTION_1920X1080, + VPP_DISPLAY_RESOLUTION_3840X2160, + VPP_DISPLAY_RESOLUTION_MAX, } video_display_resolution_t; class CAv { public: - CAv(); - ~CAv(); - //video screen_mode - static const int VIDEO_WIDEOPTION_NORMAL = 0; - static const int VIDEO_WIDEOPTION_FULL_STRETCH = 1; - static const int VIDEO_WIDEOPTION_4_3 = 2; - static const int VIDEO_WIDEOPTION_16_9 = 3; - static const int VIDEO_WIDEOPTION_NONLINEAR = 4; - static const int VIDEO_WIDEOPTION_NORMAL_NOSCALEUP = 5; - static const int VIDEO_WIDEOPTION_CROP_FULL = 6; - static const int VIDEO_WIDEOPTION_CROP = 7; - // - static const int DISABLE_VIDEO_COLOR_BLUE = 1; - static const int DISABLE_VIDEO_COLOR_BLACK = 2; - class AVEvent : public CTvEv { - public: - AVEvent(): CTvEv(CTvEv::TV_EVENT_AV) - { + CAv(); + ~CAv(); + //video screen_mode + static const int VIDEO_WIDEOPTION_NORMAL = 0; + static const int VIDEO_WIDEOPTION_FULL_STRETCH = 1; + static const int VIDEO_WIDEOPTION_4_3 = 2; + static const int VIDEO_WIDEOPTION_16_9 = 3; + static const int VIDEO_WIDEOPTION_NONLINEAR = 4; + static const int VIDEO_WIDEOPTION_NORMAL_NOSCALEUP = 5; + static const int VIDEO_WIDEOPTION_CROP_FULL = 6; + static const int VIDEO_WIDEOPTION_CROP = 7; + // + static const int DISABLE_VIDEO_COLOR_BLUE = 1; + static const int DISABLE_VIDEO_COLOR_BLACK = 2; + class AVEvent : public CTvEv { + public: + AVEvent(): CTvEv(CTvEv::TV_EVENT_AV) + { - }; - ~AVEvent() - {}; - static const int EVENT_AV_STOP = 1; - static const int EVENT_AV_RESUEM = 2; - static const int EVENT_AV_SCAMBLED = 3; - static const int EVENT_AV_UNSUPPORT = 4; - int type; - int param; - }; + }; + ~AVEvent() + {}; + static const int EVENT_AV_STOP = 1; + static const int EVENT_AV_RESUEM = 2; + static const int EVENT_AV_SCAMBLED = 3; + static const int EVENT_AV_UNSUPPORT = 4; + int type; + int param; + }; - class IObserver { - public: - IObserver() {}; - virtual ~IObserver() {}; - virtual void onEvent(const AVEvent &ev) = 0; - }; - //1 VS n - //int addObserver(IObserver* ob); - //int removeObserver(IObserver* ob); + class IObserver { + public: + IObserver() {}; + virtual ~IObserver() {}; + virtual void onEvent(const AVEvent &ev) = 0; + }; + //1 VS n + //int addObserver(IObserver* ob); + //int removeObserver(IObserver* ob); - //1 VS 1 - int setObserver(IObserver *ob) - { - mpObserver = ob; - return 0; - } + //1 VS 1 + int setObserver(IObserver *ob) + { + mpObserver = ob; + return 0; + } - int Open(); - int Close(); - int SetVideoWindow(int x, int y, int w, int h); - int GetVideoStatus(AM_AV_VideoStatus_t *status); - int SwitchTSAudio(int apid, AM_AV_AFormat_t afmt); - int ResetAudioDecoder(); - int SetTSSource(AM_AV_TSSource_t ts_source); - int StartTS(uint16_t vpid, uint16_t apid, AM_AV_VFormat_t vfmt, AM_AV_AFormat_t afmt); - int StopTS(); - int AudioGetOutputMode(AM_AOUT_OutputMode_t *mode); - int AudioSetOutputMode(AM_AOUT_OutputMode_t mode); - int SetVideoScreenColor (int vdin_blending_mask, int y, int u, int v); - int DisableVideoWithBlueColor(); - int DisableVideoWithBlackColor(); - int EnableVideoAuto(); - int EnableVideoNow(); - int EnableVideoWhenVideoPlaying(int minFrameCount = 8, int waitTime = 5000); - int WaittingVideoPlaying(int minFrameCount = 8, int waitTime = 5000); - int EnableVideoBlackout(); - int DisableVideoBlackout(); - int getVideoDisableValue(); - int SetVideoLayerDisable ( int value ); - int ClearVideoBuffer(); - bool videoIsPlaying(int minFrameCount = 8); - int setVideoScreenMode ( int value ); - int getVideoScreenMode(); - int setVideoAxis ( int h, int v, int width, int height ); - video_display_resolution_t getVideoDisplayResolution(); - //LR_switch: 1 is enable, 3D_TO_2D:1 is L , 2 is R - int set3DMode(VIDEO_3D_MODE_T mode, int LR_switch, int mode_3D_TO_2D); - // - int setLookupPtsForDtmb(int enable); - tvin_sig_fmt_t getVideoResolutionToFmt(); + int Open(); + int Close(); + int SetVideoWindow(int x, int y, int w, int h); + int GetVideoStatus(AM_AV_VideoStatus_t *status); + int SwitchTSAudio(int apid, AM_AV_AFormat_t afmt); + int ResetAudioDecoder(); + int SetTSSource(AM_AV_TSSource_t ts_source); + int StartTS(uint16_t vpid, uint16_t apid, AM_AV_VFormat_t vfmt, AM_AV_AFormat_t afmt); + int StopTS(); + int AudioGetOutputMode(AM_AOUT_OutputMode_t *mode); + int AudioSetOutputMode(AM_AOUT_OutputMode_t mode); + int SetVideoScreenColor (int vdin_blending_mask, int y, int u, int v); + int DisableVideoWithBlueColor(); + int DisableVideoWithBlackColor(); + int EnableVideoAuto(); + int EnableVideoNow(); + int EnableVideoWhenVideoPlaying(int minFrameCount = 8, int waitTime = 5000); + int WaittingVideoPlaying(int minFrameCount = 8, int waitTime = 5000); + int EnableVideoBlackout(); + int DisableVideoBlackout(); + int getVideoDisableValue(); + int SetVideoLayerDisable ( int value ); + int ClearVideoBuffer(); + bool videoIsPlaying(int minFrameCount = 8); + int setVideoScreenMode ( int value ); + int getVideoScreenMode(); + int setVideoAxis ( int h, int v, int width, int height ); + video_display_resolution_t getVideoDisplayResolution(); + //LR_switch: 1 is enable, 3D_TO_2D:1 is L , 2 is R + int set3DMode(VIDEO_3D_MODE_T mode, int LR_switch, int mode_3D_TO_2D); + // + int setLookupPtsForDtmb(int enable); + tvin_sig_fmt_t getVideoResolutionToFmt(); private: - static void av_evt_callback ( long dev_no, int event_type, void *param, void *user_data ); - int getVideoFrameCount(); - int mTvPlayDevId; - IObserver *mpObserver; - AVEvent mCurAvEvent; - int mCurVideoLayerMuteState; - int mCurDisableVideoColor; + static void av_evt_callback ( long dev_no, int event_type, void *param, void *user_data ); + int getVideoFrameCount(); + int mTvPlayDevId; + IObserver *mpObserver; + AVEvent mCurAvEvent; + int mCurVideoLayerMuteState; + int mCurDisableVideoColor; - int mFdAmVideo; + int mFdAmVideo; }; #endif |