H263plusVideoSource Class Reference

#include <H263plusVideoSource.hh>

Collaboration diagram for H263plusVideoSource:

Collaboration graph
[legend]
List of all members.

Detailed Description

This class will take IplImages from a video source and then will encode them into h263+ packets, incapsulating then into RTPs frames. This class will subclass the event-driven library LiveMedia. Derives FramedSource.

Definition at line 50 of file H263plusVideoSource.hh.

Static Public Member Functions

static H263plusVideoSourcecreateNew (UsageEnvironment &env, BaseInputVideo *input_video, int stream_id=0, int frame_rate=25, int encoder_internal_buf_size=1000000)
 Static method.

Protected Member Functions

 H263plusVideoSource (UsageEnvironment &env, BaseInputVideo *input_video, int stream_id, int frame_rate, int encoder_internal_buf_size)
 Constructor.
virtual ~H263plusVideoSource ()

Private Member Functions

void doGetNextFrame ()
 Inherited function. Used to process next frame to send.
void deliverFrame ()
 Provides RTP encapsulation.
void startCapture ()
 Captures a IplImage and encode it to a h263+ buffer.

Private Attributes

bool _initialized
 Specify whether the class is initialized or not.
int _fps
 Frames per second.
int _frame_rate_millis
 Equals at 1000/frame_rate.
unsigned int fPreferredFrameSize
 size of current frame to send
const unsigned char * _encoded_frame
 Holds the pointer of the internal_buffer of OStreamVideoEncoder.
timeval fLastCaptureTime
 Contains the last capture time.
int _encoder_internal_buf_size
 Size of the internal buffer used for encoding.
int _stream_id
 Stream id.
BaseInputVideo_input_video
 BaseInputVideo class instance pointer.
OStreamVideoEncoder_video_encoder
 OStreamVideoEncoder class instance pointer.
int Idunno


Constructor & Destructor Documentation

H263plusVideoSource::H263plusVideoSource ( UsageEnvironment &  env,
BaseInputVideo input_video,
int  stream_id,
int  frame_rate,
int  encoder_internal_buf_size 
) [protected]

See also:
createNew

Definition at line 29 of file H263plusVideoSource.cpp.

References _frame_rate_millis, _initialized, _input_video, _video_encoder, BaseInputVideo::init_device(), NULL, and OUTPUT_PACKET_BUFFER_MAXSIZE.

Referenced by createNew().

Here is the call graph for this function:

Here is the caller graph for this function:

H263plusVideoSource::~H263plusVideoSource (  )  [protected, virtual]

Definition at line 50 of file H263plusVideoSource.cpp.

References _initialized, _video_encoder, and NULL.


Member Function Documentation

H263plusVideoSource * H263plusVideoSource::createNew ( UsageEnvironment &  env,
BaseInputVideo input_video,
int  stream_id = 0,
int  frame_rate = 25,
int  encoder_internal_buf_size = 1000000 
) [static]

Parameters:
env UsageEnvironment, see LiveMedia doc. here http://www.live555.com/liveMedia/public/doxygen/html
input_video A BaseInputVideo class, can be a MultiVideoSource or a SingleVideoSource kind of class.
stream_id Stream id that will identify this H263plusVideoSource incapsulator class. It defaults to 0.
frame_rate Frames Per Second value. Number of frames per time unit.
encoder_internal_buf_size Encoder internal buffer size. Memory to alloc for encoding purposes. Defaults to 1000000.
Returns:
New instance of H263plusVideoSource.
See also:
MJPEGVideoSource

Definition at line 23 of file H263plusVideoSource.cpp.

References H263plusVideoSource().

Referenced by OStreamOnDemandSMS::createNewStreamSource().

Here is the call graph for this function:

Here is the caller graph for this function:

void H263plusVideoSource::deliverFrame (  )  [private]

Definition at line 124 of file H263plusVideoSource.cpp.

References _encoded_frame, _input_video, DEBUG_PRINT, fLastCaptureTime, fPreferredFrameSize, BaseInputVideo::is_multi_stream(), NULL, and startCapture().

Referenced by doGetNextFrame().

Here is the call graph for this function:

Here is the caller graph for this function:

void H263plusVideoSource::doGetNextFrame (  )  [private]

Definition at line 114 of file H263plusVideoSource.cpp.

References _frame_rate_millis, CV_WAIT_KEY, and deliverFrame().

Here is the call graph for this function:

void H263plusVideoSource::startCapture (  )  [private]

Definition at line 60 of file H263plusVideoSource.cpp.

References _encoded_frame, _encoder_internal_buf_size, _fps, _input_video, _stream_id, _video_encoder, DEBUG_PRINT, OStreamVideoEncoder::encode_video_frame(), fLastCaptureTime, fPreferredFrameSize, BaseInputVideo::get_next_frame(), BaseInputVideo::get_next_frame_by_stream_id(), Idunno, BaseInputVideo::is_multi_stream(), NULL, and OSTREAM_ENCODING_H263P.

Referenced by deliverFrame().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

const unsigned char* H263plusVideoSource::_encoded_frame [private]

In this particular H263plus case it will contain a varying packet size before it's sending.

Definition at line 111 of file H263plusVideoSource.hh.

Referenced by deliverFrame(), and startCapture().

int H263plusVideoSource::_encoder_internal_buf_size [private]

Definition at line 117 of file H263plusVideoSource.hh.

Referenced by startCapture().

int H263plusVideoSource::_fps [private]

Definition at line 98 of file H263plusVideoSource.hh.

Referenced by startCapture().

int H263plusVideoSource::_frame_rate_millis [private]

Definition at line 101 of file H263plusVideoSource.hh.

Referenced by doGetNextFrame(), and H263plusVideoSource().

bool H263plusVideoSource::_initialized [private]

Definition at line 95 of file H263plusVideoSource.hh.

Referenced by H263plusVideoSource(), and ~H263plusVideoSource().

BaseInputVideo* H263plusVideoSource::_input_video [private]

Definition at line 123 of file H263plusVideoSource.hh.

Referenced by deliverFrame(), H263plusVideoSource(), and startCapture().

int H263plusVideoSource::_stream_id [private]

Definition at line 120 of file H263plusVideoSource.hh.

Referenced by startCapture().

OStreamVideoEncoder* H263plusVideoSource::_video_encoder [private]

Definition at line 126 of file H263plusVideoSource.hh.

Referenced by H263plusVideoSource(), startCapture(), and ~H263plusVideoSource().

struct timeval H263plusVideoSource::fLastCaptureTime [private]

Useful for internal packet ordering.

Definition at line 114 of file H263plusVideoSource.hh.

Referenced by deliverFrame(), and startCapture().

unsigned int H263plusVideoSource::fPreferredFrameSize [private]

Definition at line 104 of file H263plusVideoSource.hh.

Referenced by deliverFrame(), and startCapture().

int H263plusVideoSource::Idunno [private]

Definition at line 131 of file H263plusVideoSource.hh.

Referenced by startCapture().


The documentation for this class was generated from the following files:
Generated on Tue Dec 26 10:36:41 2006 for Omnimeeting by  doxygen 1.4.7