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)
 
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 (Muxer *mux, OutputStream *ost, AVPacket *pkt)
 
static int submit_packet (Muxer *mux, AVPacket *pkt, OutputStream *ost)
 
void of_output_packet (OutputFile *of, AVPacket *pkt, OutputStream *ost, int eof)
 
static int thread_stop (Muxer *mux)
 
static void pkt_move (void *dst, void *src)
 
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)
 
int of_write_trailer (OutputFile *of)
 
static void ost_free (OutputStream **post)
 
static void fc_close (AVFormatContext **pfc)
 
void of_close (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 
)
static

Definition at line 157 of file ffmpeg_mux.c.

Referenced by muxer_thread().

◆ thread_set_name()

static void thread_set_name ( OutputFile of)
static

Definition at line 182 of file ffmpeg_mux.c.

Referenced by muxer_thread().

◆ muxer_thread()

static void* muxer_thread ( void *  arg)
static

Definition at line 189 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 239 of file ffmpeg_mux.c.

Referenced by submit_packet(), and thread_start().

◆ queue_packet()

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

Definition at line 261 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 303 of file ffmpeg_mux.c.

Referenced by of_output_packet().

◆ of_output_packet()

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

◆ thread_stop()

static int thread_stop ( Muxer mux)
static

Definition at line 376 of file ffmpeg_mux.c.

Referenced by of_close(), and of_write_trailer().

◆ pkt_move()

static void pkt_move ( void *  dst,
void *  src 
)
static

Definition at line 393 of file ffmpeg_mux.c.

Referenced by thread_start().

◆ thread_start()

static int thread_start ( Muxer mux)
static

Definition at line 398 of file ffmpeg_mux.c.

Referenced by mux_check_init().

◆ print_sdp()

static int print_sdp ( void  )
static

Definition at line 444 of file ffmpeg_mux.c.

Referenced by mux_check_init().

◆ mux_check_init()

int mux_check_init ( Muxer mux)

Definition at line 500 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 549 of file ffmpeg_mux.c.

Referenced by of_stream_init().

◆ of_stream_init()

int of_stream_init ( OutputFile of,
OutputStream ost 
)

Definition at line 579 of file ffmpeg_mux.c.

Referenced by init_output_stream().

◆ of_write_trailer()

int of_write_trailer ( OutputFile of)

Definition at line 600 of file ffmpeg_mux.c.

Referenced by transcode().

◆ ost_free()

static void ost_free ( OutputStream **  post)
static

Definition at line 638 of file ffmpeg_mux.c.

Referenced by of_close().

◆ fc_close()

static void fc_close ( AVFormatContext **  pfc)
static

Definition at line 692 of file ffmpeg_mux.c.

Referenced by of_close().

◆ of_close()

void of_close ( OutputFile **  pof)

Definition at line 706 of file ffmpeg_mux.c.

Referenced by ffmpeg_cleanup().

◆ of_filesize()

int64_t of_filesize ( OutputFile of)

Definition at line 733 of file ffmpeg_mux.c.

Referenced by 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().