OPAL
Version 3.18.8
|
#include <opalmixer.h>
Data Structures | |
struct | VideoStream |
Public Types | |
enum | Styles { eSideBySideLetterbox, eSideBySideScaled, eStackedPillarbox, eStackedScaled, eGrid, eUser } |
![]() | |
typedef PString | Key_T |
Public Member Functions | |
OpalVideoMixer (Styles style, unsigned width, unsigned height, unsigned rate=15, bool pushThread=true) | |
~OpalVideoMixer () | |
unsigned | GetFrameWidth () const |
unsigned | GetFrameHeight () const |
unsigned | GetFrameRate () const |
virtual bool | SetFrameRate (unsigned rate) |
bool | SetFrameSize (unsigned width, unsigned height) |
![]() | |
OpalBaseMixer (bool pushThread, unsigned periodMS, unsigned periodTS) | |
virtual | ~OpalBaseMixer () |
virtual bool | AddStream (const Key_T &key) |
virtual void | RemoveStream (const Key_T &key) |
virtual void | RemoveAllStreams () |
virtual bool | WriteStream (const Key_T &key, const RTP_DataFrame &input) |
virtual RTP_DataFrame * | ReadMixed () |
virtual bool | ReadMixed (RTP_DataFrame &mixed) |
virtual bool | OnMixed (RTP_DataFrame *&mixed) |
virtual void | StartPushThread () |
virtual bool | OnPush () |
void | StopPushThread (bool lock=true) |
unsigned | GetPeriodMS () const |
unsigned | GetPeriodTS () const |
Protected Member Functions | |
virtual Stream * | CreateStream () |
virtual bool | MixStreams (RTP_DataFrame &frame) |
virtual size_t | GetOutputSize () const |
virtual bool | MixVideo () |
virtual bool | StartMix (unsigned &x, unsigned &y, unsigned &w, unsigned &h, unsigned &left) |
virtual bool | NextMix (unsigned &x, unsigned &y, unsigned &w, unsigned &h, unsigned &left) |
void | InsertVideoFrame (const StreamMap_T::iterator &it, unsigned x, unsigned y, unsigned w, unsigned h) |
![]() | |
void | PushThreadMain () |
PDECLARE_MUTEX (m_mutex) | |
Protected Attributes | |
Styles | m_style |
unsigned | m_width |
unsigned | m_height |
BYTE | m_bgFillRed |
BYTE | m_bgFillGreen |
BYTE | m_bgFillBlue |
PBYTEArray | m_frameStore |
size_t | m_lastStreamCount |
![]() | |
bool | m_pushThread |
unsigned | m_periodMS |
unsigned | m_periodTS |
StreamMap_T | m_inputStreams |
unsigned | m_outputTimestamp |
RTP_DataFrame * | m_pushFrame |
PThread * | m_workerThread |
bool | m_threadRunning |
Friends | |
struct | VideoStream |
Additional Inherited Members | |
![]() | |
typedef std::map< Key_T, Stream * > | StreamMap_T |
Video mixer. This takes raw YUV420P frames with a PluginCodec_Video_FrameHeader in the RTP data frames, scales them and places them in particular positions of the output data frame. A number of different patterns for positioning the sub images are available in the Styles enum.
OpalVideoMixer::OpalVideoMixer | ( | Styles | style, |
unsigned | width, | ||
unsigned | height, | ||
unsigned | rate = 15 , |
||
bool | pushThread = true |
||
) |
style | Style for mixing video |
width | Width of output frame |
height | Height of output frame |
rate | Frames per second for output |
pushThread | A push thread is to be created |
|
inline |
References OpalBaseMixer::StopPushThread().
|
protectedvirtual |
Implements OpalBaseMixer.
|
inline |
Get output video frame height.
References m_height.
|
inline |
Get output video frame rate (frames per second)
References OpalBaseMixer::m_periodMS.
|
inline |
Get output video frame width.
References m_width.
|
protectedvirtual |
Implements OpalBaseMixer.
|
protected |
|
protectedvirtual |
Implements OpalBaseMixer.
|
protectedvirtual |
|
protectedvirtual |
|
virtual |
Set output video frame rate. May be dynamically changed at any time.
Reimplemented in OpalVideoStreamMixer.
bool OpalVideoMixer::SetFrameSize | ( | unsigned | width, |
unsigned | height | ||
) |
Set the output video frame width and height. May be dynamically changed at any time.
width | New width |
height | new height |
|
protectedvirtual |
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by GetFrameHeight().
|
protected |
|
protected |
|
protected |
Referenced by GetFrameWidth().