FFmpeg
Data Structures | Functions
ffmpeg_mux.c File Reference
#include <stdatomic.h>
#include <stdio.h>
#include <string.h>
#include "ffmpeg.h"
#include "ffmpeg_mux.h"
#include "ffmpeg_utils.h"
#include "sync_queue.h"
#include "libavutil/avstring.h"
#include "libavutil/fifo.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/log.h"
#include "libavutil/mem.h"
#include "libavutil/time.h"
#include "libavutil/timestamp.h"
#include "libavcodec/packet.h"
#include "libavformat/avformat.h"
#include "libavformat/avio.h"

Go to the source code of this file.

Data Structures

struct  MuxThreadContext
 

Functions

static Muxermux_from_of (OutputFile *of)
 
static int64_t filesize (AVIOContext *pb)
 
static void mux_log_debug_ts (OutputStream *ost, const AVPacket *pkt)
 
static int mux_fixup_ts (Muxer *mux, MuxStream *ms, AVPacket *pkt)
 
static int write_packet (Muxer *mux, OutputStream *ost, AVPacket *pkt)
 
static int sync_queue_process (Muxer *mux, MuxStream *ms, AVPacket *pkt, int *stream_eof)
 
static int of_streamcopy (OutputFile *of, OutputStream *ost, AVPacket *pkt)
 
static int mux_packet_filter (Muxer *mux, MuxThreadContext *mt, OutputStream *ost, AVPacket *pkt, int *stream_eof)
 
static void thread_set_name (OutputFile *of)
 
static void mux_thread_uninit (MuxThreadContext *mt)
 
static int mux_thread_init (MuxThreadContext *mt)
 
int muxer_thread (void *arg)
 
int print_sdp (const char *filename)
 
int mux_check_init (void *arg)
 
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 enc_stats_uninit (EncStats *es)
 
static void ost_free (OutputStream **post)
 
static void fc_close (AVFormatContext **pfc)
 
void of_free (OutputFile **pof)
 
int64_t of_filesize (OutputFile *of)
 

Function Documentation

◆ mux_from_of()

static Muxer* mux_from_of ( OutputFile of)
static

Definition at line 46 of file ffmpeg_mux.c.

Referenced by of_filesize(), of_free(), of_stream_init(), of_write_trailer(), and print_sdp().

◆ filesize()

static int64_t filesize ( AVIOContext pb)
static

◆ mux_log_debug_ts()

static void mux_log_debug_ts ( OutputStream ost,
const AVPacket pkt 
)
static

Definition at line 64 of file ffmpeg_mux.c.

Referenced by mux_fixup_ts().

◆ mux_fixup_ts()

static int mux_fixup_ts ( Muxer mux,
MuxStream ms,
AVPacket pkt 
)
static

Definition at line 138 of file ffmpeg_mux.c.

Referenced by write_packet().

◆ write_packet()

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

Definition at line 209 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,
MuxStream ms,
AVPacket pkt,
int stream_eof 
)
static

Definition at line 250 of file ffmpeg_mux.c.

Referenced by mux_packet_filter().

◆ of_streamcopy()

static int of_streamcopy ( OutputFile of,
OutputStream ost,
AVPacket pkt 
)
static

Definition at line 460 of file ffmpeg_mux.c.

Referenced by mux_packet_filter().

◆ mux_packet_filter()

static int mux_packet_filter ( Muxer mux,
MuxThreadContext mt,
OutputStream ost,
AVPacket pkt,
int stream_eof 
)
static

Definition at line 288 of file ffmpeg_mux.c.

Referenced by muxer_thread().

◆ thread_set_name()

static void thread_set_name ( OutputFile of)
static

Definition at line 373 of file ffmpeg_mux.c.

Referenced by muxer_thread().

◆ mux_thread_uninit()

static void mux_thread_uninit ( MuxThreadContext mt)
static

Definition at line 380 of file ffmpeg_mux.c.

Referenced by mux_thread_init(), and muxer_thread().

◆ mux_thread_init()

static int mux_thread_init ( MuxThreadContext mt)
static

Definition at line 388 of file ffmpeg_mux.c.

Referenced by muxer_thread().

◆ muxer_thread()

int muxer_thread ( void *  arg)

Definition at line 407 of file ffmpeg_mux.c.

Referenced by of_open().

◆ print_sdp()

int print_sdp ( const char *  filename)

Definition at line 507 of file ffmpeg_mux.c.

Referenced by mux_init().

◆ mux_check_init()

int mux_check_init ( void *  arg)

Definition at line 553 of file ffmpeg_mux.c.

Referenced by of_open().

◆ bsf_init()

static int bsf_init ( MuxStream ms)
static

Definition at line 575 of file ffmpeg_mux.c.

Referenced by of_stream_init().

◆ of_stream_init()

int of_stream_init ( OutputFile of,
OutputStream ost 
)

Definition at line 609 of file ffmpeg_mux.c.

Referenced by enc_open(), and of_open().

◆ check_written()

static int check_written ( OutputFile of)
static

Definition at line 633 of file ffmpeg_mux.c.

Referenced by of_write_trailer().

◆ mux_final_stats()

static void mux_final_stats ( Muxer mux)
static

Definition at line 672 of file ffmpeg_mux.c.

Referenced by of_write_trailer().

◆ of_write_trailer()

int of_write_trailer ( OutputFile of)

Definition at line 738 of file ffmpeg_mux.c.

Referenced by transcode().

◆ enc_stats_uninit()

static void enc_stats_uninit ( EncStats es)
static

Definition at line 776 of file ffmpeg_mux.c.

Referenced by ost_free().

◆ ost_free()

static void ost_free ( OutputStream **  post)
static

Definition at line 787 of file ffmpeg_mux.c.

Referenced by of_free().

◆ fc_close()

static void fc_close ( AVFormatContext **  pfc)
static

Definition at line 836 of file ffmpeg_mux.c.

Referenced by of_free().

◆ of_free()

void of_free ( OutputFile **  pof)

Definition at line 850 of file ffmpeg_mux.c.

Referenced by ffmpeg_cleanup().

◆ of_filesize()

int64_t of_filesize ( OutputFile of)

Definition at line 876 of file ffmpeg_mux.c.

Referenced by mux_final_stats(), and print_report().