35 #include <boost/bind.hpp>
36 #include <ctkPluginContext.h>
51 mPluginContext(pluginContext),
54 this->initServiceListener();
57 void VideoServiceProxy::initServiceListener()
61 boost::bind(&VideoServiceProxy::onVideoServiceAdded,
this, _1),
63 boost::bind(&VideoServiceProxy::onVideoServiceRemoved,
this, _1)
65 mVideoServiceListener->open();
68 void VideoServiceProxy::onVideoServiceAdded(VideoService* service)
70 mVideoService.reset(service, null_deleter());
80 void VideoServiceProxy::onVideoServiceRemoved(VideoService *service)
95 return mVideoService->isNull();
100 return mVideoService->getStreamerService(service);
105 return mVideoService->getStreamerServices();
112 mVideoService->setActiveVideoSource(uid);
117 return mVideoService->getActiveVideoSource();
122 return mVideoService->getVideoSources();
127 mVideoService->setConnectionMethod(connectionMethod);
132 return mVideoService->getConnectionMethod();
137 mVideoService->openConnection();
142 mVideoService->closeConnection();
147 return mVideoService->isConnected();
152 mVideoService->setPlaybackMode(controller);
157 return mVideoService->getPlaybackEvents();
boost::shared_ptr< class VideoService > VideoServicePtr
virtual VideoSourcePtr getActiveVideoSource()
virtual void openConnection()
virtual QString getConnectionMethod()
virtual void setPlaybackMode(PlaybackTimePtr controller)
virtual std::vector< TimelineEvent > getPlaybackEvents()
static VideoServicePtr create(ctkPluginContext *pluginContext)
virtual QList< StreamerService * > getStreamerServices()
virtual std::vector< VideoSourcePtr > getVideoSources()
virtual void closeConnection()
boost::shared_ptr< class VideoSource > VideoSourcePtr
virtual StreamerService * getStreamerService(QString service)
static VideoServicePtr getNullObject()
Helper class for listening to services being added, modified and removed.
Provides access to all video sources in the system, and connection stuff for the sources.
virtual void setConnectionMethod(QString connectionMethod)
virtual void setActiveVideoSource(QString uid)
virtual bool isConnected() const
Abstract class. Interface to Streamers.
boost::shared_ptr< class PlaybackTime > PlaybackTimePtr
void activeVideoSourceChanged()
VideoServiceProxy(ctkPluginContext *pluginContext)