FFmpeg
Data Structures | Functions | Variables
ffmpeg_mux.c File Reference
#include <stdatomic.h>
#include <stdio.h>
#include <string.h>
#include "ffmpeg.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.

Data Structures

struct  MuxStream
 
struct  Muxer
 

Functions

static int64_t filesize (AVIOContext *pb)
 
static int write_packet (OutputFile *of, OutputStream *ost, AVPacket *pkt)
 
static int sync_queue_process (OutputFile *of, OutputStream *ost, AVPacket *pkt)
 
static void * muxer_thread (void *arg)
 
static int submit_packet (OutputFile *of, OutputStream *ost, AVPacket *pkt)
 
static int queue_packet (OutputFile *of, OutputStream *ost, AVPacket *pkt)
 
int of_submit_packet (OutputFile *of, AVPacket *pkt, OutputStream *ost)
 
static int thread_stop (OutputFile *of)
 
static void pkt_move (void *dst, void *src)
 
static int thread_start (OutputFile *of)
 
static int print_sdp (void)
 
int of_check_init (OutputFile *of)
 
int of_write_trailer (OutputFile *of)
 
static void fc_close (AVFormatContext **pfc)
 
static void mux_free (Muxer **pmux)
 
void of_close (OutputFile **pof)
 
int of_muxer_init (OutputFile *of, AVFormatContext *fc, AVDictionary *opts, int64_t limit_filesize, int thread_queue_size)
 
int64_t of_filesize (OutputFile *of)
 
AVChapter *const * of_get_chapters (OutputFile *of, unsigned int *nb_chapters)
 

Variables

static int want_sdp = 1
 

Function Documentation

◆ filesize()

static int64_t filesize ( AVIOContext pb)
static

◆ write_packet()

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

Definition at line 90 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 ( OutputFile of,
OutputStream ost,
AVPacket pkt 
)
static

Definition at line 187 of file ffmpeg_mux.c.

Referenced by muxer_thread().

◆ muxer_thread()

static void* muxer_thread ( void *  arg)
static

Definition at line 210 of file ffmpeg_mux.c.

Referenced by thread_start().

◆ submit_packet()

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

Definition at line 258 of file ffmpeg_mux.c.

Referenced by of_submit_packet(), and thread_start().

◆ queue_packet()

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

Definition at line 281 of file ffmpeg_mux.c.

Referenced by of_submit_packet().

◆ of_submit_packet()

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

Definition at line 323 of file ffmpeg_mux.c.

Referenced by output_packet().

◆ thread_stop()

static int thread_stop ( OutputFile of)
static

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

Referenced by thread_start().

◆ thread_start()

static int thread_start ( OutputFile of)
static

Definition at line 364 of file ffmpeg_mux.c.

Referenced by of_check_init().

◆ print_sdp()

static int print_sdp ( void  )
static

Definition at line 411 of file ffmpeg_mux.c.

Referenced by of_check_init().

◆ of_check_init()

int of_check_init ( OutputFile of)

Definition at line 468 of file ffmpeg_mux.c.

Referenced by init_output_stream(), and of_muxer_init().

◆ of_write_trailer()

int of_write_trailer ( OutputFile of)

Definition at line 516 of file ffmpeg_mux.c.

Referenced by transcode().

◆ fc_close()

static void fc_close ( AVFormatContext **  pfc)
static

Definition at line 553 of file ffmpeg_mux.c.

Referenced by mux_free(), and of_muxer_init().

◆ mux_free()

static void mux_free ( Muxer **  pmux)
static

Definition at line 567 of file ffmpeg_mux.c.

Referenced by of_close(), and of_muxer_init().

◆ of_close()

void of_close ( OutputFile **  pof)

Definition at line 595 of file ffmpeg_mux.c.

Referenced by ffmpeg_cleanup().

◆ of_muxer_init()

int of_muxer_init ( OutputFile of,
AVFormatContext fc,
AVDictionary opts,
int64_t  limit_filesize,
int  thread_queue_size 
)

Definition at line 612 of file ffmpeg_mux.c.

Referenced by open_output_file().

◆ of_filesize()

int64_t of_filesize ( OutputFile of)

Definition at line 673 of file ffmpeg_mux.c.

Referenced by print_report().

◆ of_get_chapters()

AVChapter* const * of_get_chapters ( OutputFile of,
unsigned int nb_chapters 
)

Definition at line 679 of file ffmpeg_mux.c.

Referenced by parse_forced_key_frames().

Variable Documentation

◆ want_sdp

int want_sdp = 1
static

Definition at line 75 of file ffmpeg_mux.c.

Referenced by of_check_init(), and of_muxer_init().