Remove check legacy dvbapi version.
[vuplus_dvbapp] / lib / dvb / decoder.h
index 7610b65..405e363 100644 (file)
@@ -13,20 +13,12 @@ private:
        ePtr<eDVBDemux> m_demux;
        int m_fd, m_fd_demux, m_dev, m_is_freezed;
 public:
-       enum { aMPEG, aAC3, aDTS, aAAC, aAACHE, aLPCM, aDTSHD };
+       enum { aMPEG, aAC3, aDTS, aAAC, aAACHE, aLPCM, aDTSHD, aDDP  };
        eDVBAudio(eDVBDemux *demux, int dev);
        enum { aMonoLeft, aStereo, aMonoRight };
        void setChannel(int channel);
        void stop();
-#if HAVE_DVB_API_VERSION < 3
-       int setPid(int pid, int type);
-       int startPid();
-       int start();
-       int stopPid();
-       int setAVSync(int val);
-#else
        int startPid(int pid, int type);
-#endif
        void flush();
        void freeze();
        void unfreeze();
@@ -40,26 +32,17 @@ class eDVBVideo: public iObject, public Object
 private:
        ePtr<eDVBDemux> m_demux;
        int m_fd, m_fd_demux, m_dev;
-#if HAVE_DVB_API_VERSION < 3
-       m_fd_video;
-#endif
+       bool m_fcc_enable;
        int m_is_slow_motion, m_is_fast_forward, m_is_freezed;
        ePtr<eSocketNotifier> m_sn;
        void video_event(int what);
        Signal1<void, struct iTSMPEGDecoder::videoEvent> m_event;
        int m_width, m_height, m_framerate, m_aspect, m_progressive;
 public:
-       enum { MPEG2, MPEG4_H264, MPEG1, MPEG4_Part2, VC1, VC1_SM };
-       eDVBVideo(eDVBDemux *demux, int dev);
+       enum { MPEG2, MPEG4_H264, MPEG1, MPEG4_Part2, VC1, VC1_SM, H265_HEVC };
+       eDVBVideo(eDVBDemux *demux, int dev, bool fcc_enable=false);
        void stop();
-#if HAVE_DVB_API_VERSION < 3
-       int setPid(int pid);
-       int startPid();
-       int start();
-       int stopPid();
-#else
        int startPid(int pid, int type=MPEG2);
-#endif
        void flush();
        void freeze();
        int setSlowMotion(int repeat);
@@ -83,12 +66,7 @@ private:
        int m_fd_demux, m_dev;
 public:
        eDVBPCR(eDVBDemux *demux, int dev);
-#if HAVE_DVB_API_VERSION < 3
-       int setPid(int pid);
-       int startPid();
-#else
        int startPid(int pid);
-#endif
        void stop();
        virtual ~eDVBPCR();
 };
@@ -120,6 +98,16 @@ private:
        ePtr<eDVBPCR> m_pcr;
        ePtr<eDVBTText> m_text;
        int m_vpid, m_vtype, m_apid, m_atype, m_pcrpid, m_textpid;
+
+       int m_fcc_fd;
+       bool m_fcc_enable;
+       int m_fcc_state;
+
+       int m_fcc_feid;
+       int m_fcc_vpid;
+       int m_fcc_vtype;
+       int m_fcc_pcrpid;
+
        enum
        {
                changeVideo = 1, 
@@ -167,6 +155,7 @@ public:
                 - trickmode, highspeed reverse: data source fast forwards / reverses, decoder just displays frames as fast as it can
                 - slow motion: decoder displays frames multiple times
                */
+
        enum {
                stateStop,
                statePause,
@@ -195,6 +184,23 @@ public:
        int getVideoAspect();
        static RESULT setHwPCMDelay(int delay);
        static RESULT setHwAC3Delay(int delay);
+
+       enum 
+       {
+               fcc_state_stop,
+               fcc_state_ready,
+               fcc_state_decoding
+       };
+
+       RESULT prepareFCC(int fe_id, int vpid, int vtype, int pcrpid);
+       RESULT fccStart();
+       RESULT fccStop();
+       RESULT fccDecoderStart();
+       RESULT fccDecoderStop();
+       RESULT fccUpdatePids(int fe_id, int vpid, int vtype, int pcrpid);
+       RESULT fccSetPids(int fe_id, int vpid, int vtype, int pcrpid);
+       RESULT fccGetFD();
+       RESULT fccFreeFD();
 };
 
 #endif