FFmpeg
Data Structures | Functions
ffmpeg_demux.c File Reference
#include "ffmpeg.h"
#include "libavutil/avassert.h"
#include "libavutil/error.h"
#include "libavutil/time.h"
#include "libavutil/timestamp.h"
#include "libavutil/thread.h"
#include "libavutil/threadmessage.h"
#include "libavcodec/packet.h"
#include "libavformat/avformat.h"

Go to the source code of this file.

Data Structures

struct  DemuxMsg
 

Functions

static void report_new_stream (InputFile *file, const AVPacket *pkt)
 
static void ifile_duration_update (InputFile *f, InputStream *ist, int64_t last_duration)
 
static int seek_to_start (InputFile *ifile)
 
static void ts_fixup (InputFile *ifile, AVPacket *pkt, int *repeat_pict)
 
static void * input_thread (void *arg)
 
static void free_input_thread (int i)
 
void free_input_threads (void)
 
static int init_input_thread (int i)
 
int init_input_threads (void)
 
int ifile_get_packet (InputFile *f, AVPacket **pkt)
 Get next input packet from the demuxer. More...
 

Function Documentation

◆ report_new_stream()

static void report_new_stream ( InputFile file,
const AVPacket pkt 
)
static

Definition at line 40 of file ffmpeg_demux.c.

Referenced by input_thread().

◆ ifile_duration_update()

static void ifile_duration_update ( InputFile f,
InputStream ist,
int64_t  last_duration 
)
static

Definition at line 54 of file ffmpeg_demux.c.

Referenced by seek_to_start().

◆ seek_to_start()

static int seek_to_start ( InputFile ifile)
static

Definition at line 71 of file ffmpeg_demux.c.

Referenced by input_thread().

◆ ts_fixup()

static void ts_fixup ( InputFile ifile,
AVPacket pkt,
int repeat_pict 
)
static

Definition at line 120 of file ffmpeg_demux.c.

Referenced by input_thread().

◆ input_thread()

static void* input_thread ( void *  arg)
static

Definition at line 180 of file ffmpeg_demux.c.

Referenced by init_input_thread().

◆ free_input_thread()

static void free_input_thread ( int  i)
static

Definition at line 279 of file ffmpeg_demux.c.

Referenced by free_input_threads().

◆ free_input_threads()

void free_input_threads ( void  )

Definition at line 295 of file ffmpeg_demux.c.

Referenced by ffmpeg_cleanup(), and transcode().

◆ init_input_thread()

static int init_input_thread ( int  i)
static

Definition at line 303 of file ffmpeg_demux.c.

Referenced by init_input_threads().

◆ init_input_threads()

int init_input_threads ( void  )

Definition at line 349 of file ffmpeg_demux.c.

Referenced by transcode().

◆ ifile_get_packet()

int ifile_get_packet ( InputFile f,
AVPacket **  pkt 
)

Get next input packet from the demuxer.

Parameters
pktthe packet is written here when this function returns 0
Returns
  • 0 when a packet has been read successfully
  • 1 when stream end was reached, but the stream is looped; caller should flush decoders and read from this demuxer again
  • a negative error code on failure

Definition at line 361 of file ffmpeg_demux.c.

Referenced by process_input().