X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FProtocols%2FDVB%2FDVBDemuxHandles.hh;h=9b4b73a3852fa0b3763c196d85c18f2adf2e28f9;hb=9428e2877c15dac640efdb075d40cafea554cc88;hp=59fd81ab61565611b8517b2b0900ed62bda49585;hpb=5ed1fa1c42763aebad06c1e4ac8fc5a19e15519a;p=senf.git diff --git a/Socket/Protocols/DVB/DVBDemuxHandles.hh b/Socket/Protocols/DVB/DVBDemuxHandles.hh index 59fd81a..9b4b73a 100644 --- a/Socket/Protocols/DVB/DVBDemuxHandles.hh +++ b/Socket/Protocols/DVB/DVBDemuxHandles.hh @@ -1,8 +1,8 @@ // $Id$ // // Copyright (C) 2007 -// Fraunhofer Institute for Open Communication Systems (FOKUS) -// Competence Center NETwork research (NET), St. Augustin, GERMANY +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY // Thorsten Horstmann // // This program is free software; you can redistribute it and/or modify @@ -23,17 +23,20 @@ /** \file \brief DVBDemuxHandles public header */ -#ifndef HH_DVBDemuxHandles_ -#define HH_DVBDemuxHandles_ 1 +#ifndef HH_SENF_Socket_Protocols_DVB_DVBDemuxHandles_ +#define HH_SENF_Socket_Protocols_DVB_DVBDemuxHandles_ 1 // Custom includes #include "../../../Socket/FramingPolicy.hh" #include "../../../Socket/CommunicationPolicy.hh" #include "../../../Socket/ReadWritePolicy.hh" #include "../../../Socket/ProtocolClientSocketHandle.hh" -#include "DVBDemuxProtocol.hh" +#include "DVBDemuxSocketProtocol.hh" //#include "DVBDemuxHandles.mpp" +#include +#include +#include ///////////////////////////////hh.p//////////////////////////////////////// namespace senf { @@ -42,19 +45,48 @@ namespace senf { /// @{ typedef MakeSocketPolicy< - NoAddressingPolicy, + NoAddressingPolicy, DatagramFramingPolicy, UnconnectedCommunicationPolicy, ReadablePolicy, NotWriteablePolicy >::policy DVBDemux_Policy; ///< Socket Policy for xxxx - /** \brief xxx + /** \brief Baseclass of various DVBProtocolWrappers which are defined in DVBProtocolWrapper.hh */ - class DVBDemuxSectionProtocol - : public ConcreteSocketProtocol, - public DVBDemuxProtocol + class DVBProtocolWrapper :public boost::enable_shared_from_this { + public: + DVBProtocolWrapper(){} + virtual ~DVBProtocolWrapper(){} + }; + /** \brief Baseclass for DVBSocketProtocols which want use Wrappers for console. + */ + class DVBSocketProtocol : public virtual SocketProtocol { +private: + boost::shared_ptr wrap_; +public: + DVBSocketProtocol() {} + ~DVBSocketProtocol() {} + + void addWrapper(boost::shared_ptr wrap)/**< Binds a wrapper to a DVBProtocol, + so if it is closed the functionality of the wrapper is automatically removed from console.*/ + { + wrap_ = wrap; + } + virtual void close(){ + wrap_.reset(); + SocketProtocol::close(); + + } + }; + + + class DVBDemuxSectionSocketProtocol + : public ConcreteSocketProtocol, + public DVBDemuxSocketProtocol, + public DVBSocketProtocol { + public: /////////////////////////////////////////////////////////////////////////// // internal interface @@ -73,22 +105,27 @@ namespace senf { unsigned available() const; - std::auto_ptr clone() const; - ///@} - void setSectionFilter(struct dmx_sct_filter_params *filter) const; + void setSectionFilter(unsigned short int pid, + unsigned char filter= 0x3e, + unsigned int flags= DMX_IMMEDIATE_START | DMX_CHECK_CRC, + unsigned char mask = 0xff, + unsigned char mode =0x00, + unsigned int timeout =0x00) const; + }; - typedef ProtocolClientSocketHandle DVBDemuxSectionHandle; + typedef ProtocolClientSocketHandle DVBDemuxSectionHandle; // ---------------------------------------------------------------- /** \brief xxx */ - class DVBDemuxPESProtocol - : public ConcreteSocketProtocol, - public DVBDemuxProtocol + class DVBDemuxPESSocketProtocol + : public ConcreteSocketProtocol, + public DVBDemuxSocketProtocol, + public DVBSocketProtocol { public: /////////////////////////////////////////////////////////////////////////// @@ -108,14 +145,12 @@ namespace senf { unsigned available() const; - std::auto_ptr clone() const; - ///@} - void setPESFilter(struct dmx_pes_filter_params *filter) const; + void setPESFilter(unsigned short int pid, dmx_input_t input, dmx_output_t output, dmx_pes_type_t pesType, unsigned int flags)const; }; - typedef ProtocolClientSocketHandle DVBDemuxPESHandle; + typedef ProtocolClientSocketHandle DVBDemuxPESHandle; // ---------------------------------------------------------------- @@ -123,9 +158,9 @@ namespace senf { /** \brief xxx */ - class DVBDvrProtocol - : public ConcreteSocketProtocol, - public DVBDemuxProtocol + class DVBDvrSocketProtocol + : public ConcreteSocketProtocol, + public DVBDemuxSocketProtocol { public: /////////////////////////////////////////////////////////////////////////// @@ -145,12 +180,10 @@ namespace senf { unsigned available() const; - std::auto_ptr clone() const; - ///@} }; - typedef ProtocolClientSocketHandle DVBDvrHandle; + typedef ProtocolClientSocketHandle DVBDvrHandle; ///@}