X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FProtocols%2FDVB%2FDVBSocketController.hh;h=88750419513a33b9fd83a65aebaea08a828c487c;hb=532240d72e09e19e57fac9bb55c2560b9c9e5b97;hp=4576515e57045c0ef388728b870bfa2aad7fe19e;hpb=2cca421d9047b07c5789b32694c45c789d9c153d;p=senf.git diff --git a/Socket/Protocols/DVB/DVBSocketController.hh b/Socket/Protocols/DVB/DVBSocketController.hh index 4576515..8875041 100644 --- a/Socket/Protocols/DVB/DVBSocketController.hh +++ b/Socket/Protocols/DVB/DVBSocketController.hh @@ -30,6 +30,7 @@ #include "DVBFrontendHandle.hh" #include "DVBDemuxHandles.hh" #include "DVBConfigParser.hh" +#include "DVBProtocolWrapper.hh" #include "../../../Scheduler/Scheduler.hh" #include "../../../Utils/Console/Console.hh" @@ -52,17 +53,37 @@ namespace senf { You have to find out which parts of these functionality are implemented by your preferred device driver by your own. */ + + + class DVBSocketController : boost::noncopyable { public: + senf::console::ScopedDirectory dir; typedef boost::function Callback; ///< Callback which is called when an asynchronous tuning succeeds. - DVBSocketController(DVBFrontendHandle frontendHandle_ = DVBFrontendHandle(0,0), DVBDemuxSectionHandle sectionHandle_ = DVBDemuxSectionHandle(0,0), const Callback & cb = NULL); + DVBSocketController(DVBFrontendHandle frontendHandle_ = DVBFrontendHandle(0,0), const Callback & cb = NULL); ~DVBSocketController(); - + + senf::DVBDemuxSectionHandle createDVBDemuxSectionHandle( int adapternumber=0, int demuxnumber=0, bool addToConsole=false ); + senf::DVBDemuxPESHandle createDVBDemuxPESHandle( int adapternumber=0, int demuxnumber=0, bool addToConsole=false ); + + void addToConsole(senf::DVBDemuxSectionHandle sh); + ///< Adds an DVBDemuxSectionHandle to the console + /**< Allocates the functionality of DVBDemuxSectionProtocol into the folder + of the DVBSocketController. If the protocol is closed, or all handles are + discarded the console support will automatically removed. + \param[in] handle of a protocol*/ + void addToConsole(senf::DVBDemuxPESHandle sh); + ///< Adds an DVBDemuxPESHandle to the console + /**< Allocates the functionality of DVBDemuxPESProtocol into the folder + of the DVBSocketController. If the protocol is closed, or all handles are + discarded the console support will automatically removed. + \param[in] handle of a protocol*/ + void tuneToCMD( const std::string & input, const std::string & mode = "async"); ///< Tunes a DVB device given by the type of the DVBFrontendHandle /**< Tunes a DVB device by a channel name or complete @@ -189,25 +210,6 @@ public: specific driver implementation. In this case the output is random.*/ - void setSectionFilter(unsigned short int pid, - u_int8_t filter = MPE_TABLEID, - unsigned int flags = DMX_IMMEDIATE_START | DMX_CHECK_CRC, - u_int8_t mask = 0xff, - u_int8_t mode = 0, - unsigned int timeout = 0); - ///< Set the section filter - - void setBufferSize(unsigned long size); - ///< Set the size of the circular buffer used for filtered data. - /**< The default size is two maximum sized sections, i.e. if - this function is not called a buffer size of 2 * 4096 - bytes will be used. - \param[in] size Size of circular buffer. */ - - void startFiltering(); ///< Starts filtering - - void stopFiltering(); ///< Stops filtering - std::string getTuneInfo(const std::string & conf ="Ssbuf"); ///< Returns a string which shows actual tuning status /**<
"S" prints signal strength (in hex) @@ -221,12 +223,13 @@ public: an exception! */ private: DVBFrontendHandle frontendHandle; - senf::DVBDemuxSectionHandle sectionHandle; fe_type_t type; DVBConfigParser parser; Callback cb; + static unsigned int controllerNr; + unsigned int sectionNr; + unsigned int pesNr; senf::scheduler::FdEvent event; - void readEvent(int i); void initConsole(); };