00001 /* copyright (C) 2003 by Jens zechlin*/ 00002 00003 #ifndef SubGraphSH_H 00004 #define SubGraphSH_H 00005 00006 #include "sh/SH.h" 00007 #include "sh/SHAttr.h" 00008 #include "sh/SHGraphManager.h" 00009 #include "sh/SHEndpoint.h" 00010 #include "sh/SHEndpointSpec.h" 00011 00012 00013 00014 namespace SH 00015 { 00016 00017 typedef Attr<__LINE__,int32> SA_TRANS_SCREENWIDTH; 00018 typedef Attr<__LINE__,int32> SA_TRANS_SCREENHEIGHT; 00019 00020 00021 class SubGraphSH; 00022 00023 00028 class SubGraphSH : public Base, public SHGraphManager { 00029 00030 //SA_RTP_RTP_PAYLOAD_TYPE _rtp_pt; // indicates RTP packet header pt 00031 SA_RTP_INT_PAYLOAD_TYPE _int_pt; // indicates true pt 00032 SA_TRANS_SCREENWIDTH _screenWidth; 00033 SA_TRANS_SCREENWIDTH _screenHeight; 00034 00035 public: 00036 SubGraphSH( SHGraphManager* mgr, 00037 u_int32_t runtimeId, 00038 MNSelector& sel ); 00039 00040 virtual ~SubGraphSH(); 00041 00042 private: 00047 SubGraphSH( const SubGraphSH& ); 00048 00053 SubGraphSH& operator=( const SubGraphSH& ); 00054 00055 public: 00057 virtual SH_RC initSH()=0; 00059 virtual SH_RC uninitSH()=0; 00061 virtual SH_RC startStreaming()=0; 00063 virtual SH_RC stopStreaming()=0; 00065 virtual bool graphManNotify (int idx, SH::Base *caller, SH::Notification attribute, void *msg)=0; 00066 00067 virtual u_int32_t getDelay() const =0; 00068 virtual void pushReport( Report* report, Direction d ); 00069 00070 protected: 00071 00072 SHGraphManager* myGraphManager; 00073 00077 bool setInAnchorSH(Base *sh); 00078 00082 bool setOutAnchorSH(Base *sh); 00083 00084 00085 /******************************************************************/ 00086 /* functions required for SH::Spec */ 00087 /******************************************************************/ 00088 protected: 00089 SinkEndpoint* in_ep_a[10]; 00090 SourceEndpoint* out_ep_a[10]; 00091 00092 virtual SinkEndpoint** getSinkSpecs(); 00093 virtual SourceEndpoint** getSourceSpecs(); 00094 00095 /******************************************************************/ 00096 /* functions required for SHStatus */ 00097 /******************************************************************/ 00107 virtual bool isConnected() const; 00108 00109 }; 00110 00112 00113 }; // namespace SH 00114 #endif /* SubGraphSH_H */