You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.5 KiB
48 lines
1.5 KiB
#ifndef __BASICMEDIASOURCE_H_INCL__
|
|
#define __BASICMEDIASOURCE_H_INCL__
|
|
|
|
#include "basicMediaDestination.h"
|
|
|
|
/**
|
|
* TODO: Add class description
|
|
*
|
|
* @author Gagua
|
|
*/
|
|
class basicMediaSource {
|
|
private:
|
|
protected:
|
|
basicMediaDestination *m_pMediaDestination;
|
|
MediaStateStatus m_eMediaStatus;
|
|
bool m_bStreamingSource;
|
|
public:
|
|
basicMediaSource();
|
|
virtual ~basicMediaSource();
|
|
bool attachDestination(basicMediaDestination *Viewer){
|
|
if (Viewer != NULL){
|
|
m_pMediaDestination = Viewer;
|
|
return true;
|
|
};
|
|
return false;
|
|
};
|
|
bool isAttached( void ) { return ( m_pMediaDestination != NULL ); };
|
|
void setStreaming( bool T ){ m_bStreamingSource = T; };
|
|
virtual bool _open( CSTR URI, bool ShowDeviceMenu = false, float framerate=-1.0f, int inputPin = -1, int width = -1, int height = -1 , int s_width=-1, int s_height=-1 ){ return false; };
|
|
virtual bool _close( void ){ return true; };
|
|
virtual bool _stop( void ){ return true; };
|
|
virtual bool _continue( void ){ return true; };
|
|
virtual bool _restart( void ){ return true; };
|
|
MediaStateStatus getStatus( void ){ return m_eMediaStatus; };
|
|
};
|
|
|
|
inline basicMediaSource::basicMediaSource(){
|
|
m_bStreamingSource = true;
|
|
m_pMediaDestination = NULL;
|
|
m_eMediaStatus = MS_UNDEFINED;
|
|
};
|
|
|
|
inline basicMediaSource::~basicMediaSource() {
|
|
};
|
|
|
|
typedef vector<basicMediaSource *> mediaSourceCollection;
|
|
|
|
#endif // __BASICMEDIASOURCE_H_INCL__
|