FFmpeg
Data Structures | Macros | Typedefs | Enumerations | Functions
ffmpeg_sched.h File Reference
#include <stddef.h>
#include <stdint.h>
#include "ffmpeg_utils.h"

Go to the source code of this file.

Data Structures

struct  SchedulerNode
 

Macros

#define SCH_DSTREAM(file, stream)
 
#define SCH_MSTREAM(file, stream)
 
#define SCH_DEC_IN(decoder)
 
#define SCH_DEC_OUT(decoder, out_idx)
 
#define SCH_ENC(encoder)
 
#define SCH_FILTER_IN(filter, input)
 
#define SCH_FILTER_OUT(filter, output)
 
#define DEFAULT_PACKET_THREAD_QUEUE_SIZE   8
 Default size of a packet thread queue. More...
 
#define DEFAULT_FRAME_THREAD_QUEUE_SIZE   8
 Default size of a frame thread queue. More...
 

Typedefs

typedef int(* SchThreadFunc) (void *arg)
 

Enumerations

enum  SchedulerNodeType {
  SCH_NODE_TYPE_NONE = 0, SCH_NODE_TYPE_DEMUX, SCH_NODE_TYPE_MUX, SCH_NODE_TYPE_DEC,
  SCH_NODE_TYPE_ENC, SCH_NODE_TYPE_FILTER_IN, SCH_NODE_TYPE_FILTER_OUT
}
 
enum  DemuxSendFlags { DEMUX_SEND_STREAMCOPY_EOF = (1 << 0) }
 

Functions

Schedulersch_alloc (void)
 
void sch_free (Scheduler **sch)
 
int sch_start (Scheduler *sch)
 
int sch_stop (Scheduler *sch, int64_t *finish_ts)
 
int sch_wait (Scheduler *sch, uint64_t timeout_us, int64_t *transcode_ts)
 Wait until transcoding terminates or the specified timeout elapses. More...
 
int sch_add_demux (Scheduler *sch, SchThreadFunc func, void *ctx)
 Add a demuxer to the scheduler. More...
 
int sch_add_demux_stream (Scheduler *sch, unsigned demux_idx)
 Add a demuxed stream for a previously added demuxer. More...
 
int sch_add_dec (Scheduler *sch, SchThreadFunc func, void *ctx, int send_end_ts)
 Add a decoder to the scheduler. More...
 
int sch_add_dec_output (Scheduler *sch, unsigned dec_idx)
 Add another output to decoder (e.g. More...
 
int sch_add_filtergraph (Scheduler *sch, unsigned nb_inputs, unsigned nb_outputs, SchThreadFunc func, void *ctx)
 Add a filtergraph to the scheduler. More...
 
int sch_add_mux (Scheduler *sch, SchThreadFunc func, int(*init)(void *), void *ctx, int sdp_auto, unsigned thread_queue_size)
 Add a muxer to the scheduler. More...
 
int sch_add_mux_stream (Scheduler *sch, unsigned mux_idx)
 Add a muxed stream for a previously added muxer. More...
 
void sch_mux_stream_buffering (Scheduler *sch, unsigned mux_idx, unsigned stream_idx, size_t data_threshold, int max_packets)
 Configure limits on packet buffering performed before the muxer task is started. More...
 
int sch_mux_stream_ready (Scheduler *sch, unsigned mux_idx, unsigned stream_idx)
 Signal to the scheduler that the specified muxed stream is initialized and ready. More...
 
int sch_sdp_filename (Scheduler *sch, const char *sdp_filename)
 Set the file path for the SDP. More...
 
int sch_add_enc (Scheduler *sch, SchThreadFunc func, void *ctx, int(*open_cb)(void *func_arg, const struct AVFrame *frame))
 Add an encoder to the scheduler. More...
 
int sch_add_sq_enc (Scheduler *sch, uint64_t buf_size_us, void *logctx)
 Add an pre-encoding sync queue to the scheduler. More...
 
int sch_sq_add_enc (Scheduler *sch, unsigned sq_idx, unsigned enc_idx, int limiting, uint64_t max_frames)
 
int sch_connect (Scheduler *sch, SchedulerNode src, SchedulerNode dst)
 
int sch_demux_send (Scheduler *sch, unsigned demux_idx, struct AVPacket *pkt, unsigned flags)
 Called by demuxer tasks to communicate with their downstreams. More...
 
int sch_dec_receive (Scheduler *sch, unsigned dec_idx, struct AVPacket *pkt)
 Called by decoder tasks to receive a packet for decoding. More...
 
int sch_dec_send (Scheduler *sch, unsigned dec_idx, unsigned out_idx, struct AVFrame *frame)
 Called by decoder tasks to send a decoded frame downstream. More...
 
int sch_filter_receive (Scheduler *sch, unsigned fg_idx, unsigned *in_idx, struct AVFrame *frame)
 Called by filtergraph tasks to obtain frames for filtering. More...
 
void sch_filter_receive_finish (Scheduler *sch, unsigned fg_idx, unsigned in_idx)
 Called by filter tasks to signal that a filter input will no longer accept input. More...
 
int sch_filter_send (Scheduler *sch, unsigned fg_idx, unsigned out_idx, struct AVFrame *frame)
 Called by filtergraph tasks to send a filtered frame or EOF to consumers. More...
 
int sch_filter_command (Scheduler *sch, unsigned fg_idx, struct AVFrame *frame)
 
int sch_enc_receive (Scheduler *sch, unsigned enc_idx, struct AVFrame *frame)
 Called by encoder tasks to obtain frames for encoding. More...
 
int sch_enc_send (Scheduler *sch, unsigned enc_idx, struct AVPacket *pkt)
 Called by encoder tasks to send encoded packets downstream. More...
 
int sch_mux_receive (Scheduler *sch, unsigned mux_idx, struct AVPacket *pkt)
 Called by muxer tasks to obtain packets for muxing. More...
 
void sch_mux_receive_finish (Scheduler *sch, unsigned mux_idx, unsigned stream_idx)
 Called by muxer tasks to signal that a stream will no longer accept input. More...
 
int sch_mux_sub_heartbeat_add (Scheduler *sch, unsigned mux_idx, unsigned stream_idx, unsigned dec_idx)
 
int sch_mux_sub_heartbeat (Scheduler *sch, unsigned mux_idx, unsigned stream_idx, const AVPacket *pkt)
 

Macro Definition Documentation

◆ SCH_DSTREAM

#define SCH_DSTREAM (   file,
  stream 
)
Value:
.idx = file, .idx_stream = stream }

Definition at line 111 of file ffmpeg_sched.h.

◆ SCH_MSTREAM

#define SCH_MSTREAM (   file,
  stream 
)
Value:
.idx = file, .idx_stream = stream }

Definition at line 114 of file ffmpeg_sched.h.

◆ SCH_DEC_IN

#define SCH_DEC_IN (   decoder)
Value:
.idx = decoder }

Definition at line 117 of file ffmpeg_sched.h.

◆ SCH_DEC_OUT

#define SCH_DEC_OUT (   decoder,
  out_idx 
)
Value:
.idx = decoder, .idx_stream = out_idx }

Definition at line 120 of file ffmpeg_sched.h.

◆ SCH_ENC

#define SCH_ENC (   encoder)
Value:
.idx = encoder }

Definition at line 123 of file ffmpeg_sched.h.

◆ SCH_FILTER_IN

#define SCH_FILTER_IN (   filter,
  input 
)
Value:
.idx = filter, .idx_stream = input }

Definition at line 126 of file ffmpeg_sched.h.

◆ SCH_FILTER_OUT

#define SCH_FILTER_OUT (   filter,
  output 
)
Value:
.idx = filter, .idx_stream = output }

Definition at line 129 of file ffmpeg_sched.h.

◆ DEFAULT_PACKET_THREAD_QUEUE_SIZE

#define DEFAULT_PACKET_THREAD_QUEUE_SIZE   8

Default size of a packet thread queue.

For muxing this can be overridden by the thread_queue_size option as passed to a call to sch_add_mux().

Definition at line 255 of file ffmpeg_sched.h.

◆ DEFAULT_FRAME_THREAD_QUEUE_SIZE

#define DEFAULT_FRAME_THREAD_QUEUE_SIZE   8

Default size of a frame thread queue.

Definition at line 260 of file ffmpeg_sched.h.

Typedef Documentation

◆ SchThreadFunc

typedef int(* SchThreadFunc) (void *arg)

Definition at line 109 of file ffmpeg_sched.h.

Enumeration Type Documentation

◆ SchedulerNodeType

Enumerator
SCH_NODE_TYPE_NONE 
SCH_NODE_TYPE_DEMUX 
SCH_NODE_TYPE_MUX 
SCH_NODE_TYPE_DEC 
SCH_NODE_TYPE_ENC 
SCH_NODE_TYPE_FILTER_IN 
SCH_NODE_TYPE_FILTER_OUT 

Definition at line 93 of file ffmpeg_sched.h.

◆ DemuxSendFlags

Enumerator
DEMUX_SEND_STREAMCOPY_EOF 

Treat the packet as an EOF for SCH_NODE_TYPE_MUX destinations send normally to other types.

Definition at line 333 of file ffmpeg_sched.h.

Function Documentation

◆ sch_alloc()

Scheduler* sch_alloc ( void  )

Definition at line 585 of file ffmpeg_sched.c.

Referenced by main().

◆ sch_free()

void sch_free ( Scheduler **  sch)

Definition at line 467 of file ffmpeg_sched.c.

Referenced by main(), and sch_alloc().

◆ sch_start()

int sch_start ( Scheduler sch)

Definition at line 1599 of file ffmpeg_sched.c.

Referenced by transcode().

◆ sch_stop()

int sch_stop ( Scheduler sch,
int64_t finish_ts 
)

Definition at line 2581 of file ffmpeg_sched.c.

Referenced by sch_free(), sch_start(), and transcode().

◆ sch_wait()

int sch_wait ( Scheduler sch,
uint64_t  timeout_us,
int64_t transcode_ts 
)

Wait until transcoding terminates or the specified timeout elapses.

Parameters
timeout_usAmount of time in microseconds after which this function will timeout.
transcode_tsCurrent transcode timestamp in AV_TIME_BASE_Q, for informational purposes only.
Return values
0waiting timed out, transcoding is not finished
1transcoding is finished

Definition at line 1665 of file ffmpeg_sched.c.

Referenced by transcode().

◆ sch_add_demux()

int sch_add_demux ( Scheduler sch,
SchThreadFunc  func,
void *  ctx 
)

Add a demuxer to the scheduler.

Parameters
funcFunction executed as the demuxer task.
ctxDemuxer state; will be passed to func and used for logging.
Return values
>=0Index of the newly-created demuxer.
<0Error code.

Definition at line 688 of file ffmpeg_sched.c.

Referenced by ifile_open().

◆ sch_add_demux_stream()

int sch_add_demux_stream ( Scheduler sch,
unsigned  demux_idx 
)

Add a demuxed stream for a previously added demuxer.

Parameters
demux_idxindex previously returned by sch_add_demux()
Return values
>=0Index of the newly-created demuxed stream.
<0Error code.

Definition at line 715 of file ffmpeg_sched.c.

Referenced by ist_use().

◆ sch_add_dec()

int sch_add_dec ( Scheduler sch,
SchThreadFunc  func,
void *  ctx,
int  send_end_ts 
)

Add a decoder to the scheduler.

Parameters
funcFunction executed as the decoder task.
ctxDecoder state; will be passed to func and used for logging.
send_end_tsThe decoder will return an end timestamp after flush packets are delivered to it. See documentation for sch_dec_receive() for more details.
Return values
>=0Index of the newly-created decoder.
<0Error code.

Definition at line 748 of file ffmpeg_sched.c.

Referenced by dec_alloc().

◆ sch_add_dec_output()

int sch_add_dec_output ( Scheduler sch,
unsigned  dec_idx 
)

Add another output to decoder (e.g.

for multiview video).

Return values
>=0Index of the newly-added decoder output.
<0Error code.

Definition at line 727 of file ffmpeg_sched.c.

Referenced by dec_request_view(), and sch_add_dec().

◆ sch_add_filtergraph()

int sch_add_filtergraph ( Scheduler sch,
unsigned  nb_inputs,
unsigned  nb_outputs,
SchThreadFunc  func,
void *  ctx 
)

Add a filtergraph to the scheduler.

Parameters
nb_inputsNumber of filtergraph inputs.
nb_outputsnumber of filtergraph outputs
funcFunction executed as the filtering task.
ctxFilter state; will be passed to func and used for logging.
Return values
>=0Index of the newly-created filtergraph.
<0Error code.

Definition at line 829 of file ffmpeg_sched.c.

Referenced by fg_create().

◆ sch_add_mux()

int sch_add_mux ( Scheduler sch,
SchThreadFunc  func,
int(*)(void *)  init,
void *  ctx,
int  sdp_auto,
unsigned  thread_queue_size 
)

Add a muxer to the scheduler.

Note that muxer thread startup is more complicated than for other components, because

  • muxer streams fed by audio/video encoders become initialized dynamically at runtime, after those encoders receive their first frame and initialize themselves, followed by calling sch_mux_stream_ready()
  • the header can be written after all the streams for a muxer are initialized
  • we may need to write an SDP, which must happen
    • AFTER all the headers are written
    • BEFORE any packets are written by any muxer
    • with all the muxers quiescent To avoid complicated muxer-thread synchronization dances, we postpone starting the muxer threads until after the SDP is written. The sequence of events is then as follows:
  • After sch_mux_stream_ready() is called for all the streams in a given muxer, the header for that muxer is written (care is taken that headers for different muxers are not written concurrently, since they write file information to stderr). If SDP is not wanted, the muxer thread then starts and muxing begins.
  • When SDP is wanted, no muxer threads start until the header for the last muxer is written. After that, the SDP is written, after which all the muxer threads are started at once.

In order for the above to work, the scheduler needs to be able to invoke just writing the header, which is the reason the init parameter exists.

Parameters
funcFunction executed as the muxing task.
initCallback that is called to initialize the muxer and write the header. Called after sch_mux_stream_ready() is called for all the streams in the muxer.
ctxMuxer state; will be passed to func/init and used for logging.
sdp_autoDetermines automatic SDP writing - see sch_sdp_filename().
thread_queue_sizenumber of packets that can be buffered before sending to the muxer blocks
Return values
>=0Index of the newly-created muxer.
<0Error code.

Definition at line 632 of file ffmpeg_sched.c.

Referenced by of_open().

◆ sch_add_mux_stream()

int sch_add_mux_stream ( Scheduler sch,
unsigned  mux_idx 
)

Add a muxed stream for a previously added muxer.

Parameters
mux_idxindex previously returned by sch_add_mux()
Return values
>=0Index of the newly-created muxed stream.
<0Error code.

Definition at line 656 of file ffmpeg_sched.c.

Referenced by ost_add().

◆ sch_mux_stream_buffering()

void sch_mux_stream_buffering ( Scheduler sch,
unsigned  mux_idx,
unsigned  stream_idx,
size_t  data_threshold,
int  max_packets 
)

Configure limits on packet buffering performed before the muxer task is started.

Parameters
mux_idxindex previously returned by sch_add_mux()
stream_idx_idxindex previously returned by sch_add_mux_stream()
data_thresholdTotal size of the buffered packets' data after which max_packets applies.
max_packetsmaximum Maximum number of buffered packets after data_threshold is reached.

Definition at line 1205 of file ffmpeg_sched.c.

Referenced by ost_add().

◆ sch_mux_stream_ready()

int sch_mux_stream_ready ( Scheduler sch,
unsigned  mux_idx,
unsigned  stream_idx 
)

Signal to the scheduler that the specified muxed stream is initialized and ready.

Muxing is started once all the streams are ready.

Definition at line 1221 of file ffmpeg_sched.c.

Referenced by of_stream_init().

◆ sch_sdp_filename()

int sch_sdp_filename ( Scheduler sch,
const char *  sdp_filename 
)

Set the file path for the SDP.

The SDP is written when either of the following is true:

  • this function is called at least once
  • sdp_auto=1 is passed to EVERY call of sch_add_mux()

Definition at line 619 of file ffmpeg_sched.c.

Referenced by opt_sdp_file().

◆ sch_add_enc()

int sch_add_enc ( Scheduler sch,
SchThreadFunc  func,
void *  ctx,
int(*)(void *func_arg, const struct AVFrame *frame open_cb 
)

Add an encoder to the scheduler.

Parameters
funcFunction executed as the encoding task.
ctxEncoder state; will be passed to func and used for logging.
open_cbThis callback, if specified, will be called when the first frame is obtained for this encoder. For audio encoders with a fixed frame size (which use a sync queue in the scheduler to rechunk frames), it must return that frame size on success. Otherwise (non-audio, variable frame size) it should return 0.
Return values
>=0Index of the newly-created encoder.
<0Error code.

◆ sch_add_sq_enc()

int sch_add_sq_enc ( Scheduler sch,
uint64_t  buf_size_us,
void *  logctx 
)

Add an pre-encoding sync queue to the scheduler.

Parameters
buf_size_usSync queue buffering size, passed to sq_alloc().
logctxLogging context for the sync queue. passed to sq_alloc().
Return values
>=0Index of the newly-created sync queue.
<0Error code.

Definition at line 871 of file ffmpeg_sched.c.

Referenced by setup_sync_queues().

◆ sch_sq_add_enc()

int sch_sq_add_enc ( Scheduler sch,
unsigned  sq_idx,
unsigned  enc_idx,
int  limiting,
uint64_t  max_frames 
)

Definition at line 896 of file ffmpeg_sched.c.

Referenced by setup_sync_queues().

◆ sch_connect()

int sch_connect ( Scheduler sch,
SchedulerNode  src,
SchedulerNode  dst 
)

◆ sch_demux_send()

int sch_demux_send ( Scheduler sch,
unsigned  demux_idx,
struct AVPacket pkt,
unsigned  flags 
)

Called by demuxer tasks to communicate with their downstreams.

The following may be sent:

  • a demuxed packet for the stream identified by pkt->stream_index;
  • demuxer discontinuity/reset (e.g. after a seek) - this is signalled by an empty packet with stream_index=-1.
Parameters
demux_idxdemuxer index
pktA demuxed packet to send. When flushing (i.e. pkt->stream_index=-1 on entry to this function), on successful return pkt->pts/pkt->time_base will be set to the maximum end timestamp of any decoded audio stream, or AV_NOPTS_VALUE if no decoded audio streams are present.
Return values
non-negative valuesuccess
AVERROR_EOFall consumers for the stream are done
AVERROR_EXITall consumers are done, should terminate demuxing
anoter negative error codeother failure

Definition at line 2039 of file ffmpeg_sched.c.

Referenced by do_send(), and input_thread().

◆ sch_dec_receive()

int sch_dec_receive ( Scheduler sch,
unsigned  dec_idx,
struct AVPacket pkt 
)

Called by decoder tasks to receive a packet for decoding.

Parameters
dec_idxdecoder index
pktInput packet will be written here on success.
       An empty packet signals that the decoder should be flushed, but
       more packets will follow (e.g. after seeking). When a decoder
       created with send_end_ts=1 receives a flush packet, it must write
       the end timestamp of the stream after flushing to
       pkt->pts/time_base on the next call to this function (if any).
Return values
non-negative valuesuccess
AVERROR_EOFno more packets will arrive, should terminate decoding
another negative error codeother failure

Definition at line 2167 of file ffmpeg_sched.c.

Referenced by decoder_thread().

◆ sch_dec_send()

int sch_dec_send ( Scheduler sch,
unsigned  dec_idx,
unsigned  out_idx,
struct AVFrame frame 
)

Called by decoder tasks to send a decoded frame downstream.

Parameters
dec_idxDecoder index previously returned by sch_add_dec().
frameDecoded frame; on success it is consumed and cleared by this function
Return values
>=0success
AVERROR_EOFall consumers are done, should terminate decoding
another negative error codeother failure

Definition at line 2243 of file ffmpeg_sched.c.

Referenced by decoder_thread(), packet_decode(), process_subtitle(), and transcode_subtitles().

◆ sch_filter_receive()

int sch_filter_receive ( Scheduler sch,
unsigned  fg_idx,
unsigned *  in_idx,
struct AVFrame frame 
)

Called by filtergraph tasks to obtain frames for filtering.

Will wait for a frame to become available and return it in frame.

Filtergraphs that contain lavfi sources and do not currently require new input frames should call this function as a means of rate control - then in_idx should be set equal to nb_inputs on entry to this function.

Parameters
fg_idxFiltergraph index previously returned by sch_add_filtergraph().
[in,out]in_idxOn input contains the index of the input on which a frame is most desired. May be set to nb_inputs to signal that the filtergraph does not need more input currently.

On success, will be replaced with the input index of the actually returned frame or EOF timestamp.

Return values
>=0Frame data or EOF timestamp was delivered into frame, in_idx contains the index of the input it belongs to.
AVERROR(EAGAIN)No frame was returned, the filtergraph should resume filtering. May only be returned when in_idx=nb_inputs on entry to this function.
AVERROR_EOFNo more frames will arrive, should terminate filtering.

Definition at line 2405 of file ffmpeg_sched.c.

Referenced by filter_thread().

◆ sch_filter_receive_finish()

void sch_filter_receive_finish ( Scheduler sch,
unsigned  fg_idx,
unsigned  in_idx 
)

Called by filter tasks to signal that a filter input will no longer accept input.

Parameters
fg_idxFiltergraph index previously returned from sch_add_filtergraph().
in_idxIndex of the input to finish.

Definition at line 2449 of file ffmpeg_sched.c.

Referenced by filter_thread().

◆ sch_filter_send()

int sch_filter_send ( Scheduler sch,
unsigned  fg_idx,
unsigned  out_idx,
struct AVFrame frame 
)

Called by filtergraph tasks to send a filtered frame or EOF to consumers.

Parameters
fg_idxFiltergraph index previously returned by sch_add_filtergraph().
out_idxIndex of the output which produced the frame.
frameThe frame to send to consumers. When NULL, signals that no more frames will be produced for the specified output. When non-NULL, the frame is consumed and cleared by this function on success.
Return values
non-negative valuesuccess
AVERROR_EOFall consumers are done
anoter negative error codeother failure

Definition at line 2470 of file ffmpeg_sched.c.

Referenced by close_output(), and fg_output_frame().

◆ sch_filter_command()

int sch_filter_command ( Scheduler sch,
unsigned  fg_idx,
struct AVFrame frame 
)

Definition at line 2515 of file ffmpeg_sched.c.

Referenced by fg_send_command().

◆ sch_enc_receive()

int sch_enc_receive ( Scheduler sch,
unsigned  enc_idx,
struct AVFrame frame 
)

Called by encoder tasks to obtain frames for encoding.

Will wait for a frame to become available and return it in frame.

Parameters
enc_idxEncoder index previously returned by sch_add_enc().
frameNewly-received frame will be stored here on success. Must be clean on entrance to this function.
Return values
0A frame was successfully delivered into frame.
AVERROR_EOFNo more frames will be delivered, the encoder should flush everything and terminate.

Definition at line 2312 of file ffmpeg_sched.c.

Referenced by encoder_thread().

◆ sch_enc_send()

int sch_enc_send ( Scheduler sch,
unsigned  enc_idx,
struct AVPacket pkt 
)

Called by encoder tasks to send encoded packets downstream.

Parameters
enc_idxEncoder index previously returned by sch_add_enc().
pktAn encoded packet; it will be consumed and cleared by this function on success.
Return values
0success
<0Error code.

Definition at line 2356 of file ffmpeg_sched.c.

Referenced by do_subtitle_out(), and encode_frame().

◆ sch_mux_receive()

int sch_mux_receive ( Scheduler sch,
unsigned  mux_idx,
struct AVPacket pkt 
)

Called by muxer tasks to obtain packets for muxing.

Will wait for a packet for any muxed stream to become available and return it in pkt.

Parameters
mux_idxMuxer index previously returned by sch_add_mux().
pktNewly-received packet will be stored here on success. Must be clean on entrance to this function.
Return values
0A packet was successfully delivered into pkt. Its stream_index corresponds to a stream index previously returned from sch_add_mux_stream().
AVERROR_EOFWhen pkt->stream_index is non-negative, this signals that no more packets will be delivered for this stream index. Otherwise this indicates that no more packets will be delivered for any stream and the muxer should therefore flush everything and terminate.

Definition at line 2083 of file ffmpeg_sched.c.

Referenced by muxer_thread().

◆ sch_mux_receive_finish()

void sch_mux_receive_finish ( Scheduler sch,
unsigned  mux_idx,
unsigned  stream_idx 
)

Called by muxer tasks to signal that a stream will no longer accept input.

Parameters
stream_idxStream index previously returned from sch_add_mux_stream().

Definition at line 2096 of file ffmpeg_sched.c.

Referenced by muxer_thread().

◆ sch_mux_sub_heartbeat_add()

int sch_mux_sub_heartbeat_add ( Scheduler sch,
unsigned  mux_idx,
unsigned  stream_idx,
unsigned  dec_idx 
)

Definition at line 1246 of file ffmpeg_sched.c.

Referenced by create_streams().

◆ sch_mux_sub_heartbeat()

int sch_mux_sub_heartbeat ( Scheduler sch,
unsigned  mux_idx,
unsigned  stream_idx,
const AVPacket pkt 
)

Definition at line 2114 of file ffmpeg_sched.c.

Referenced by mux_packet_filter().

SCH_NODE_TYPE_ENC
@ SCH_NODE_TYPE_ENC
Definition: ffmpeg_sched.h:98
output
filter_frame For filters that do not use the this method is called when a frame is pushed to the filter s input It can be called at any time except in a reentrant way If the input frame is enough to produce output
Definition: filter_design.txt:225
SCH_NODE_TYPE_MUX
@ SCH_NODE_TYPE_MUX
Definition: ffmpeg_sched.h:96
filter
void(* filter)(uint8_t *src, int stride, int qscale)
Definition: h263dsp.c:29
decoder
static const chunk_decoder decoder[8]
Definition: dfa.c:331
SCH_NODE_TYPE_DEMUX
@ SCH_NODE_TYPE_DEMUX
Definition: ffmpeg_sched.h:95
SCH_NODE_TYPE_FILTER_OUT
@ SCH_NODE_TYPE_FILTER_OUT
Definition: ffmpeg_sched.h:100
input
and forward the test the status of outputs and forward it to the corresponding return FFERROR_NOT_READY If the filters stores internally one or a few frame for some input
Definition: filter_design.txt:172
SCH_NODE_TYPE_FILTER_IN
@ SCH_NODE_TYPE_FILTER_IN
Definition: ffmpeg_sched.h:99
SchedulerNode
Definition: ffmpeg_sched.h:103
SCH_NODE_TYPE_DEC
@ SCH_NODE_TYPE_DEC
Definition: ffmpeg_sched.h:97