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(uid);
105 return mVideoService->getStreamerServices();
110 mVideoService->setActiveVideoSource(uid);
115 return mVideoService->getActiveVideoSource();
120 return mVideoService->getVideoSources();
125 mVideoService->setConnectionMethod(connectionMethod);
130 return mVideoService->getConnectionMethod();
135 mVideoService->openConnection();
140 mVideoService->closeConnection();
145 return mVideoService->isConnected();
150 mVideoService->setPlaybackMode(controller);
155 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 std::vector< VideoSourcePtr > getVideoSources()
boost::shared_ptr< class PlaybackTime > PlaybackTimePtr
virtual StreamerServicePtr getStreamerService(QString uid)
virtual void closeConnection()
boost::shared_ptr< class VideoSource > VideoSourcePtr
virtual QList< StreamerServicePtr > getStreamerServices()
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)
boost::shared_ptr< class StreamerService > StreamerServicePtr
virtual bool isConnected() const
void activeVideoSourceChanged()
VideoServiceProxy(ctkPluginContext *pluginContext)