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

#include <video_input.h>

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

Public Member Functions

void configureFilePlayback (const std::string &path, std::shared_ptr< MediaDemuxer > &demuxer, int index)
 
void flushBuffers ()
 
const DeviceParamsgetConfig () const
 
int getHeight () const
 
MediaStream getInfo () const
 
const std::string & getName () const
 
std::shared_future< DeviceParamsgetParams () const
 
AVPixelFormat getPixelFormat () const
 
int getWidth () const
 
void restart ()
 Restart stopped video input.
 
void setPaused (bool paused)
 
void setRecorderCallback (const std::function< void(const MediaStream &ms)> &cb)
 
void setSeekTime (int64_t time)
 
void setSink (const std::string &sinkId)
 
void setSuccessfulSetupCb (const std::function< void(MediaType, bool)> &cb)
 
void setupSink (const int width, const int height)
 
void stopSink ()
 
void updateStartTime (int64_t startTime)
 
 VideoInput (VideoInputMode inputMode=VideoInputMode::Undefined, const std::string &resource="local", const std::string &sink="")
 
 ~VideoInput ()
 
- 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 50 of file video_input.h.

Constructor & Destructor Documentation

◆ VideoInput()

jami::video::VideoInput::VideoInput ( VideoInputMode  inputMode = VideoInputMode::Undefined,
const std::string &  resource = "local",
const std::string &  sink = "" 
)

Definition at line 54 of file video_input.cpp.

References jami::emitSignal(), jami::Manager::instance(), jami::video::ManagedByClient, jami::video::ManagedByDaemon, and jami::video::Undefined.

Here is the call graph for this function:

◆ ~VideoInput()

jami::video::VideoInput::~VideoInput ( )

Definition at line 72 of file video_input.cpp.

References jami::emitSignal(), jami::DeviceParams::input, and jami::ThreadLoop::join().

Here is the call graph for this function:

Member Function Documentation

◆ configureFilePlayback()

void jami::video::VideoInput::configureFilePlayback ( const std::string &  path,
std::shared_ptr< MediaDemuxer > &  demuxer,
int  index 
)

◆ flushBuffers()

void jami::video::VideoInput::flushBuffers ( )

Definition at line 220 of file video_input.cpp.

◆ getConfig()

const DeviceParams & jami::video::VideoInput::getConfig ( ) const
inline

Definition at line 64 of file video_input.h.

◆ getHeight()

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

Implements jami::video::VideoGenerator.

Definition at line 121 of file video_input.cpp.

References jami::DeviceParams::height.

◆ getInfo()

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

Definition at line 728 of file video_input.cpp.

References jami::emitSignal().

Referenced by setRecorderCallback().

Here is the call graph for this function:

◆ getName()

const std::string & jami::video::VideoInput::getName ( ) const
inline

Definition at line 59 of file video_input.h.

◆ getParams()

std::shared_future< DeviceParams > jami::video::VideoInput::getParams ( ) const
inline

Definition at line 67 of file video_input.h.

◆ getPixelFormat()

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

Implements jami::video::VideoGenerator.

Definition at line 130 of file video_input.cpp.

References jami::emitSignal(), and jami::DeviceParams::format.

Here is the call graph for this function:

◆ getWidth()

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

Implements jami::video::VideoGenerator.

Definition at line 112 of file video_input.cpp.

References jami::DeviceParams::width.

◆ restart()

void jami::video::VideoInput::restart ( )

Restart stopped video input.

Note
if a media is removed, then re-added in a conference, the loop will be stopped and this input must be restarted

Definition at line 657 of file video_input.cpp.

References jami::ThreadLoop::isStopping().

Here is the call graph for this function:

◆ setPaused()

void jami::video::VideoInput::setPaused ( bool  paused)
inline

Definition at line 79 of file video_input.h.

References jami::emitSignal().

Here is the call graph for this function:

◆ setRecorderCallback()

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

Definition at line 274 of file video_input.cpp.

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

Here is the call graph for this function:

◆ setSeekTime()

void jami::video::VideoInput::setSeekTime ( int64_t  time)

Definition at line 186 of file video_input.cpp.

References jami::emitSignal().

Here is the call graph for this function:

◆ setSink()

void jami::video::VideoInput::setSink ( const std::string &  sinkId)

Definition at line 755 of file video_input.cpp.

References jami::Manager::instance().

Here is the call graph for this function:

◆ setSuccessfulSetupCb()

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

Definition at line 86 of file video_input.h.

References jami::emitSignal().

Here is the call graph for this function:

◆ setupSink()

void jami::video::VideoInput::setupSink ( const int  width,
const int  height 
)

Definition at line 761 of file video_input.cpp.

◆ stopSink()

void jami::video::VideoInput::stopSink ( )

Definition at line 769 of file video_input.cpp.

References jami::Observable< std::shared_ptr< MediaFrame > >::detach().

Here is the call graph for this function:

◆ updateStartTime()

void jami::video::VideoInput::updateStartTime ( int64_t  startTime)

Definition at line 776 of file video_input.cpp.

References jami::emitSignal().

Here is the call graph for this function:

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