class mpegator: public video_thread


Inheritance:


Public Methods

mpegator( int argc, char **argv )
virtual void init()
virtual ~mpegator()
virtual void shutdown()
virtual bool is_shutdown_performed()
virtual void start_capture()
virtual void stop_capture()
stop
virtual void check_for_new_data()

Private Fields

IMtrCapture* mpeg
instance of the mpegator OLE
bool captureStarted
flag
mutex mpeg_ops_mutex
mutex to lock all operations on mpegator: do not lock it for a while!
bool wait_forobject_next_time
mpegator have some synchronization issues: if you ask the driver is new data available, get negative reply and then immediately try to repeat the query it reply with "yes" but in fact data are not there yet
char video_buffer[100000]
just video buffer
unsigned video_data_size
is related to the buffer above

Inherited from video_thread:

Public Methods

static video_thread* create_instance( int argc, char **argv )
static void video_thread_entry_func( void *_instance )
void reschedule_broadcast_target( broadcast_target *target )
virtual void shutdown_requested()
void add_broadcast_target( int pushserv_id, const Sockaddr &control_addr, const Sockaddr &data_addr )
void new_text_data( text_data *data )

Protected Fields

bool shutdown_now
bool shutdown_performed
mutex shutdown_mutex
typedef std::list < broadcast_target * > broadcast_targetsT
broadcast_targetsT broadcast_targets
typedef std::queue < broadcast_target * > add_target_queueT
add_target_queueT add_target_q
Timeval target_reconnect_time
typedef std::queue < Sockaddr > target_queueT
target_queueT drop_target_q
mutex add_drop_target_mutex
std::queue < text_data * > new_text
mutex lock_new_text

Protected Methods

virtual void loop()
void check_for_add_drop_targets()

Documentation

IMtrCapture* mpeg
instance of the mpegator OLE

bool captureStarted
flag

mutex mpeg_ops_mutex
mutex to lock all operations on mpegator: do not lock it for a while!

bool wait_forobject_next_time
mpegator have some synchronization issues: if you ask the driver is new data available, get negative reply and then immediately try to repeat the query it reply with "yes" but in fact data are not there yet

char video_buffer[100000]
just video buffer. This code was modified several times. The first approach was to call StreamGetPtr/send to network/StreamReleasePtr. That does not work because send to network call corrupts something inside mpegator driver and output is junk. Then i did try to copy data into small buffer, release the stream pointer and immediately send data to the network. That does not work, because computer resources were exhausted and significant percent of data was lost. Finally i made data to be copied into large buffer and send happens once per few calls of check_for_new_data()

unsigned video_data_size
is related to the buffer above

mpegator( int argc, char **argv )

virtual void init()

virtual ~mpegator()

virtual void shutdown()

virtual bool is_shutdown_performed()

virtual void start_capture()

virtual void stop_capture()
stop

virtual void check_for_new_data()


This class has no child classes.

alphabetic index html hierarchy of classes or java



This page was generated with the help of DOC++.