Ring Daemon 16.0.0
Loading...
Searching...
No Matches
jami::video::VideoReceiveThread Class Reference

#include <video_receive_thread.h>

Inheritance diagram for jami::video::VideoReceiveThread:
Inheritance graph
Collaboration diagram for jami::video::VideoReceiveThread:
Collaboration graph

Public Member Functions

void addIOContext (SocketPair &socketPair)
 
void decodeFrame ()
 
int getHeight () const
 
MediaStream getInfo () const
 
AVPixelFormat getPixelFormat () const
 
std::shared_ptr< SinkClient > & getSink ()
 
int getWidth () const
 
void setRecorderCallback (const std::function< void(const MediaStream &ms)> &cb)
 
void setRequestKeyFrameCallback (std::function< void(void)> cb)
 
void setRotation (int angle)
 Set angle of rotation to apply to the video by the decoder.
 
void setSuccessfulSetupCb (const std::function< void(MediaType, bool)> &cb)
 
void startLoop ()
 
void startSink ()
 
void stopLoop ()
 
void stopSink ()
 
 VideoReceiveThread (const std::string &id, bool useSink, const std::string &sdp, uint16_t mtu)
 
 ~VideoReceiveThread ()
 
- Public Member Functions inherited from jami::video::VideoGenerator
void flushFrames ()
 
VideoFramegetNewFrame ()
 
std::shared_ptr< VideoFrameobtainLastFrame ()
 
void publishFrame ()
 
void publishFrame (std::shared_ptr< VideoFrame >)
 
 VideoGenerator ()
 
- Public Member Functions inherited from jami::Observable< std::shared_ptr< MediaFrame > >
bool attach (Observer< std::shared_ptr< MediaFrame > > *o)
 
void attachPriorityObserver (std::shared_ptr< Observer< std::shared_ptr< MediaFrame > > > o)
 
bool detach (Observer< std::shared_ptr< MediaFrame > > *o)
 
void detachPriorityObserver (Observer< std::shared_ptr< MediaFrame > > *o)
 
size_t getObserversCount ()
 
 Observable ()
 
virtual ~Observable ()
 ~Observable Detach all observers to avoid making them call this observable when destroyed
 

Additional Inherited Members

- Protected Member Functions inherited from jami::Observable< std::shared_ptr< MediaFrame > >
void notify (std::shared_ptr< MediaFrame > data)
 
- Protected Attributes inherited from jami::Observable< std::shared_ptr< MediaFrame > >
std::mutex mutex_
 
std::set< Observer< std::shared_ptr< MediaFrame > > * > observers_
 
std::list< std::weak_ptr< Observer< std::shared_ptr< MediaFrame > > > > priority_observers_
 

Detailed Description

Definition at line 48 of file video_receive_thread.h.

Constructor & Destructor Documentation

◆ VideoReceiveThread()

jami::video::VideoReceiveThread::VideoReceiveThread ( const std::string &  id,
bool  useSink,
const std::string &  sdp,
uint16_t  mtu 
)

Definition at line 39 of file video_receive_thread.cpp.

References JAMI_DBG.

◆ ~VideoReceiveThread()

jami::video::VideoReceiveThread::~VideoReceiveThread ( )

Definition at line 58 of file video_receive_thread.cpp.

References JAMI_DBG, and jami::ThreadLoop::join().

Here is the call graph for this function:

Member Function Documentation

◆ addIOContext()

void jami::video::VideoReceiveThread::addIOContext ( SocketPair socketPair)

Definition at line 188 of file video_receive_thread.cpp.

References jami::emitSignal().

Here is the call graph for this function:

◆ decodeFrame()

◆ getHeight()

int jami::video::VideoReceiveThread::getHeight ( ) const
virtual

Implements jami::video::VideoGenerator.

Definition at line 303 of file video_receive_thread.cpp.

◆ getInfo()

MediaStream jami::video::VideoReceiveThread::getInfo ( ) const

Definition at line 317 of file video_receive_thread.cpp.

Referenced by setRecorderCallback().

◆ getPixelFormat()

AVPixelFormat jami::video::VideoReceiveThread::getPixelFormat ( ) const
virtual

Implements jami::video::VideoGenerator.

Definition at line 309 of file video_receive_thread.cpp.

◆ getSink()

std::shared_ptr< SinkClient > & jami::video::VideoReceiveThread::getSink ( )
inline

Definition at line 64 of file video_receive_thread.h.

◆ getWidth()

int jami::video::VideoReceiveThread::getWidth ( ) const
virtual

Implements jami::video::VideoGenerator.

Definition at line 297 of file video_receive_thread.cpp.

◆ setRecorderCallback()

void jami::video::VideoReceiveThread::setRecorderCallback ( const std::function< void(const MediaStream &ms)> &  cb)

Definition at line 194 of file video_receive_thread.cpp.

References jami::emitSignal(), and getInfo().

Here is the call graph for this function:

◆ setRequestKeyFrameCallback()

void jami::video::VideoReceiveThread::setRequestKeyFrameCallback ( std::function< void(void)>  cb)
inline

Definition at line 58 of file video_receive_thread.h.

References jami::emitSignal().

Here is the call graph for this function:

◆ setRotation()

void jami::video::VideoReceiveThread::setRotation ( int  angle)

Set angle of rotation to apply to the video by the decoder.

Parameters
angleAngle of rotation in degrees (counterclockwise)

Definition at line 325 of file video_receive_thread.cpp.

References jami::emitSignal().

Here is the call graph for this function:

◆ setSuccessfulSetupCb()

void jami::video::VideoReceiveThread::setSuccessfulSetupCb ( const std::function< void(MediaType, bool)> &  cb)
inline

Definition at line 79 of file video_receive_thread.h.

References jami::emitSignal().

Here is the call graph for this function:

◆ startLoop()

void jami::video::VideoReceiveThread::startLoop ( )

Definition at line 65 of file video_receive_thread.cpp.

References JAMI_DBG, and jami::ThreadLoop::start().

Here is the call graph for this function:

◆ startSink()

void jami::video::VideoReceiveThread::startSink ( )

Definition at line 285 of file video_receive_thread.cpp.

References jami::Observable< std::shared_ptr< MediaFrame > >::attach(), jami::emitSignal(), jami::ThreadLoop::isRunning(), and JAMI_DBG.

Here is the call graph for this function:

◆ stopLoop()

void jami::video::VideoReceiveThread::stopLoop ( )

Definition at line 72 of file video_receive_thread.cpp.

References jami::ThreadLoop::isStopping(), JAMI_DBG, jami::ThreadLoop::join(), and jami::ThreadLoop::stop().

Here is the call graph for this function:

◆ stopSink()

void jami::video::VideoReceiveThread::stopSink ( )

Definition at line 273 of file video_receive_thread.cpp.

References jami::Observable< std::shared_ptr< MediaFrame > >::detach(), jami::ThreadLoop::isRunning(), and JAMI_DBG.

Here is the call graph for this function:

The documentation for this class was generated from the following files: