FFmpeg
Functions | Variables
ffmpeg_mux.c File Reference
#include <stdatomic.h>
#include <stdio.h>
#include <string.h>
#include "ffmpeg.h"
#include "ffmpeg_mux.h"
#include "objpool.h"
#include "sync_queue.h"
#include "thread_queue.h"
#include "libavutil/fifo.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/log.h"
#include "libavutil/mem.h"
#include "libavutil/timestamp.h"
#include "libavutil/thread.h"
#include "libavcodec/packet.h"
#include "libavformat/avformat.h"
#include "libavformat/avio.h"

Go to the source code of this file.

Functions

static Muxermux_from_of (OutputFile *of)
 
static int64_t filesize (AVIOContext *pb)
 
static int write_packet (Muxer *mux, OutputStream *ost, AVPacket *pkt)
 
static int sync_queue_process (Muxer *mux, OutputStream *ost, AVPacket *pkt, int *stream_eof)
 
static void thread_set_name (OutputFile *of)
 
static void * muxer_thread (void *arg)
 
static int thread_submit_packet (Muxer *mux, OutputStream *ost, AVPacket *pkt)
 
static int queue_packet (OutputStream *ost, AVPacket *pkt)
 
static int submit_packet (Muxer *mux, AVPacket *pkt, OutputStream *ost)
 
int of_output_packet (OutputFile *of, OutputStream *ost, AVPacket *pkt)
 
int of_streamcopy (OutputStream *ost, const AVPacket *pkt, int64_t dts)
 
static int thread_stop (Muxer *mux)
 
static int thread_start (Muxer *mux)
 
static int print_sdp (void)
 
int mux_check_init (Muxer *mux)
 
static int bsf_init (MuxStream *ms)
 
int of_stream_init (OutputFile *of, OutputStream *ost)
 
static int check_written (OutputFile *of)
 
static void mux_final_stats (Muxer *mux)
 
int of_write_trailer (OutputFile *of)
 
static void ost_free (OutputStream **post)
 
static void fc_close (AVFormatContext **pfc)
 
void of_free (OutputFile **pof)
 
int64_t of_filesize (OutputFile *of)
 

Variables

int want_sdp = 1
 

Function Documentation

◆ mux_from_of()

static Muxer* mux_from_of ( OutputFile of)
static

◆ filesize()

static int64_t filesize ( AVIOContext pb)
static

◆ write_packet()

static int write_packet ( Muxer mux,
OutputStream ost,
AVPacket pkt 
)
static

Definition at line 61 of file ffmpeg_mux.c.

Referenced by avio_alloc_context(), ffio_init_context(), and sync_queue_process().

◆ sync_queue_process()

static int sync_queue_process ( Muxer mux,
OutputStream ost,
AVPacket pkt,
int stream_eof 
)
static

Definition at line 170 of file ffmpeg_mux.c.

Referenced by muxer_thread().

◆ thread_set_name()

static void thread_set_name ( OutputFile of)
static

Definition at line 205 of file ffmpeg_mux.c.

Referenced by muxer_thread().

◆ muxer_thread()

static void* muxer_thread ( void *  arg)
static

Definition at line 212 of file ffmpeg_mux.c.

Referenced by thread_start().

◆ thread_submit_packet()

static int thread_submit_packet ( Muxer mux,
OutputStream ost,
AVPacket pkt 
)
static

Definition at line 266 of file ffmpeg_mux.c.

Referenced by submit_packet(), and thread_start().

◆ queue_packet()

static int queue_packet ( OutputStream ost,
AVPacket pkt 
)
static

Definition at line 288 of file ffmpeg_mux.c.

Referenced by submit_packet().

◆ submit_packet()

static int submit_packet ( Muxer mux,
AVPacket pkt,
OutputStream ost 
)
static

Definition at line 330 of file ffmpeg_mux.c.

Referenced by of_output_packet().

◆ of_output_packet()

int of_output_packet ( OutputFile of,
OutputStream ost,
AVPacket pkt 
)

Definition at line 349 of file ffmpeg_mux.c.

Referenced by enc_subtitle(), encode_frame(), of_streamcopy(), and process_input().

◆ of_streamcopy()

int of_streamcopy ( OutputStream ost,
const AVPacket pkt,
int64_t  dts 
)
Parameters
dtspredicted packet dts in AV_TIME_BASE_Q

Definition at line 406 of file ffmpeg_mux.c.

Referenced by process_input_packet().

◆ thread_stop()

static int thread_stop ( Muxer mux)
static

Definition at line 475 of file ffmpeg_mux.c.

Referenced by of_free(), and of_write_trailer().

◆ thread_start()

static int thread_start ( Muxer mux)
static

Definition at line 492 of file ffmpeg_mux.c.

Referenced by mux_check_init().

◆ print_sdp()

static int print_sdp ( void  )
static

Definition at line 534 of file ffmpeg_mux.c.

Referenced by mux_check_init().

◆ mux_check_init()

int mux_check_init ( Muxer mux)

Definition at line 590 of file ffmpeg_mux.c.

Referenced by of_open(), and of_stream_init().

◆ bsf_init()

static int bsf_init ( MuxStream ms)
static

Definition at line 637 of file ffmpeg_mux.c.

Referenced by of_stream_init().

◆ of_stream_init()

int of_stream_init ( OutputFile of,
OutputStream ost 
)

Definition at line 671 of file ffmpeg_mux.c.

Referenced by enc_open(), and init_output_stream_nofilter().

◆ check_written()

static int check_written ( OutputFile of)
static

Definition at line 694 of file ffmpeg_mux.c.

Referenced by of_write_trailer().

◆ mux_final_stats()

static void mux_final_stats ( Muxer mux)
static

Definition at line 733 of file ffmpeg_mux.c.

Referenced by of_write_trailer().

◆ of_write_trailer()

int of_write_trailer ( OutputFile of)

Definition at line 799 of file ffmpeg_mux.c.

Referenced by transcode().

◆ ost_free()

static void ost_free ( OutputStream **  post)
static

Definition at line 839 of file ffmpeg_mux.c.

Referenced by of_free().

◆ fc_close()

static void fc_close ( AVFormatContext **  pfc)
static

Definition at line 906 of file ffmpeg_mux.c.

Referenced by of_free().

◆ of_free()

void of_free ( OutputFile **  pof)

Definition at line 920 of file ffmpeg_mux.c.

Referenced by ffmpeg_cleanup().

◆ of_filesize()

int64_t of_filesize ( OutputFile of)

Definition at line 947 of file ffmpeg_mux.c.

Referenced by mux_final_stats(), and print_report().

Variable Documentation

◆ want_sdp

int want_sdp = 1

Definition at line 41 of file ffmpeg_mux.c.

Referenced by mux_check_init(), and of_open().