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

#include <media_decoder.h>

Collaboration diagram for jami::MediaDemuxer:
Collaboration graph

Public Types

enum class  CurrentState { Demuxing , Finished }
 
enum class  Status {
  Success , EndOfFile , ReadBufferOverflow , ReadError ,
  FallBack , RestartRequired
}
 
using StreamCallback = std::function< DecodeStatus(AVPacket &)>
 

Public Member Functions

Status decode ()
 
Status demuxe ()
 
bool emitFrame (bool isAudio)
 
void findStreamInfo ()
 
MediaDemuxer::CurrentState getCurrentState ()
 
int64_t getDuration () const
 
AVStreamgetStream (unsigned stream)
 
 MediaDemuxer ()
 
int openInput (const DeviceParams &)
 
bool seekFrame (int stream_index, int64_t timestamp)
 
int selectStream (AVMediaType type)
 
void setFileFinishedCb (std::function< void(bool)> cb)
 
void setInterruptCallback (int(*cb)(void *), void *opaque)
 
void setIOContext (MediaIOHandle *ioctx)
 
void setNeedFrameCb (std::function< void()> cb)
 
void setStreamCallback (unsigned stream, StreamCallback cb={})
 
void updateCurrentState (MediaDemuxer::CurrentState state)
 
 ~MediaDemuxer ()
 

Static Public Member Functions

static const chargetStatusStr (Status status)
 

Detailed Description

Definition at line 85 of file media_decoder.h.

Member Typedef Documentation

◆ StreamCallback

Definition at line 103 of file media_decoder.h.

Member Enumeration Documentation

◆ CurrentState

Enumerator
Demuxing 
Finished 

Definition at line 102 of file media_decoder.h.

◆ Status

Enumerator
Success 
EndOfFile 
ReadBufferOverflow 
ReadError 
FallBack 
RestartRequired 

Definition at line 91 of file media_decoder.h.

Constructor & Destructor Documentation

◆ MediaDemuxer()

jami::MediaDemuxer::MediaDemuxer ( )

Definition at line 53 of file media_decoder.cpp.

◆ ~MediaDemuxer()

jami::MediaDemuxer::~MediaDemuxer ( )

Definition at line 58 of file media_decoder.cpp.

References jami::emitSignal().

Here is the call graph for this function:

Member Function Documentation

◆ decode()

◆ demuxe()

MediaDemuxer::Status jami::MediaDemuxer::demuxe ( )

Definition at line 325 of file media_decoder.cpp.

References av_packet_free(), jami::emitSignal(), EndOfFile, jami::libav_utils::getError(), JAMI_ERR, ReadBufferOverflow, ReadError, and Success.

Here is the call graph for this function:

◆ emitFrame()

bool jami::MediaDemuxer::emitFrame ( bool  isAudio)

Definition at line 284 of file media_decoder.cpp.

References jami::emitSignal().

Here is the call graph for this function:

◆ findStreamInfo()

void jami::MediaDemuxer::findStreamInfo ( )

Definition at line 217 of file media_decoder.cpp.

References jami::emitSignal(), jami::libav_utils::getError(), and JAMI_ERR.

Here is the call graph for this function:

◆ getCurrentState()

MediaDemuxer::CurrentState jami::MediaDemuxer::getCurrentState ( )
inline

Definition at line 124 of file media_decoder.h.

◆ getDuration()

int64_t jami::MediaDemuxer::getDuration ( ) const

Definition at line 201 of file media_decoder.cpp.

◆ getStatusStr()

const char * jami::MediaDemuxer::getStatusStr ( Status  status)
static

◆ getStream()

AVStream * jami::MediaDemuxer::getStream ( unsigned  stream)
inline

Definition at line 126 of file media_decoder.h.

References JAMI_ERR.

◆ openInput()

int jami::MediaDemuxer::openInput ( const DeviceParams params)

◆ seekFrame()

bool jami::MediaDemuxer::seekFrame ( int  stream_index,
int64_t  timestamp 
)

Definition at line 207 of file media_decoder.cpp.

References jami::emitSignal().

Here is the call graph for this function:

◆ selectStream()

int jami::MediaDemuxer::selectStream ( AVMediaType  type)

Definition at line 230 of file media_decoder.cpp.

References jami::emitSignal(), and JAMI_DBG.

Here is the call graph for this function:

◆ setFileFinishedCb()

void jami::MediaDemuxer::setFileFinishedCb ( std::function< void(bool)>  cb)

Definition at line 261 of file media_decoder.cpp.

References jami::emitSignal().

Here is the call graph for this function:

◆ setInterruptCallback()

void jami::MediaDemuxer::setInterruptCallback ( int(*)(void *)  cb,
void opaque 
)

Definition at line 245 of file media_decoder.cpp.

References jami::emitSignal().

Here is the call graph for this function:

◆ setIOContext()

void jami::MediaDemuxer::setIOContext ( MediaIOHandle ioctx)

Definition at line 367 of file media_decoder.cpp.

References jami::emitSignal().

Here is the call graph for this function:

◆ setNeedFrameCb()

void jami::MediaDemuxer::setNeedFrameCb ( std::function< void()>  cb)

Definition at line 255 of file media_decoder.cpp.

References jami::emitSignal().

Here is the call graph for this function:

◆ setStreamCallback()

void jami::MediaDemuxer::setStreamCallback ( unsigned  stream,
StreamCallback  cb = {} 
)
inline

Definition at line 113 of file media_decoder.h.

◆ updateCurrentState()

void jami::MediaDemuxer::updateCurrentState ( MediaDemuxer::CurrentState  state)
inline

Definition at line 120 of file media_decoder.h.


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