FFmpeg
Data Fields
FFInputFormat Struct Reference

#include <demux.h>

Data Fields

AVInputFormat p
 The public AVInputFormat. More...
 
enum AVCodecID raw_codec_id
 Raw demuxers store their codec ID here. More...
 
int priv_data_size
 Size of private data so that it can be allocated in the wrapper. More...
 
int flags_internal
 Internal flags. More...
 
int(* read_probe )(const AVProbeData *)
 Tell if a given file has a chance of being parsed as this format. More...
 
int(* read_header )(struct AVFormatContext *)
 Read the format header and initialize the AVFormatContext structure. More...
 
int(* read_packet )(struct AVFormatContext *, AVPacket *pkt)
 Read one packet and put it in 'pkt'. More...
 
int(* read_close )(struct AVFormatContext *)
 Close the stream. More...
 
int(* read_seek )(struct AVFormatContext *, int stream_index, int64_t timestamp, int flags)
 Seek to a given timestamp relative to the frames in stream component stream_index. More...
 
int64_t(* read_timestamp )(struct AVFormatContext *s, int stream_index, int64_t *pos, int64_t pos_limit)
 Get the next timestamp in stream[stream_index].time_base units. More...
 
int(* read_set_state )(struct AVFormatContext *, enum FFInputFormatStreamState state)
 Change the stream state - only meaningful if using a network-based format (RTSP). More...
 
int(* handle_command )(struct AVFormatContext *, enum FFInputFormatCommandOption opt, enum AVFormatCommandID id, void *data)
 Handle demuxer commands This callback is used to either send a command to a demuxer (FF_INFMT_COMMAND_SUBMIT), or to retrieve the reply for a previously sent command (FF_INFMT_COMMAND_GET_REPLY). More...
 
int(* read_seek2 )(struct AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags)
 Seek to timestamp ts. More...
 
int(* get_device_list )(struct AVFormatContext *s, struct AVDeviceInfoList *device_list)
 Returns device list with it properties. More...
 

Detailed Description

Definition at line 66 of file demux.h.

Field Documentation

◆ p

AVInputFormat FFInputFormat::p

The public AVInputFormat.

See avformat.h for it.

Definition at line 70 of file demux.h.

Referenced by dvdvideo_subdemux_open(), LLVMFuzzerTestOneInput(), mpegts_read_header(), next_input(), and rdt_init().

◆ raw_codec_id

enum AVCodecID FFInputFormat::raw_codec_id

◆ priv_data_size

int FFInputFormat::priv_data_size

Size of private data so that it can be allocated in the wrapper.

Definition at line 80 of file demux.h.

Referenced by avformat_open_input(), and ff_alloc_input_device_context().

◆ flags_internal

int FFInputFormat::flags_internal

Internal flags.

See FF_INFMT_FLAG_* above and FF_FMT_FLAG_* in internal.h.

Definition at line 85 of file demux.h.

Referenced by avformat_find_stream_info(), avformat_open_input(), and is_id3v2_format().

◆ read_probe

int(* FFInputFormat::read_probe) (const AVProbeData *)

Tell if a given file has a chance of being parsed as this format.

The buffer provided is guaranteed to be AVPROBE_PADDING_SIZE bytes big so you do not have to check for that unless you need more.

Definition at line 92 of file demux.h.

Referenced by av_probe_input_format3(), ff_img_read_header(), and probe().

◆ read_header

int(* FFInputFormat::read_header) (struct AVFormatContext *)

Read the format header and initialize the AVFormatContext structure.

Return 0 if OK. 'avformat_new_stream' should be called to create new streams.

Definition at line 99 of file demux.h.

Referenced by avformat_open_input(), and ff_img_read_header().

◆ read_packet

int(* FFInputFormat::read_packet) (struct AVFormatContext *, AVPacket *pkt)

Read one packet and put it in 'pkt'.

pts and flags are also set. 'avformat_new_stream' can be called only if the flag AVFMTCTX_NOHEADER is used and only in the calling thread (not in a background thread).

Returns
0 on success, < 0 on error. Upon returning an error, pkt must be unreferenced by the caller.

Definition at line 109 of file demux.h.

Referenced by ff_img_read_packet(), and ff_read_packet().

◆ read_close

int(* FFInputFormat::read_close) (struct AVFormatContext *)

Close the stream.

The AVFormatContext and AVStreams are not freed by this function

Definition at line 115 of file demux.h.

Referenced by avformat_close_input(), and avformat_open_input().

◆ read_seek

int(* FFInputFormat::read_seek) (struct AVFormatContext *, int stream_index, int64_t timestamp, int flags)

Seek to a given timestamp relative to the frames in stream component stream_index.

Parameters
stream_indexMust not be -1.
flagsSelects which direction should be preferred if no exact match is available.
Returns
>= 0 on success (but not necessarily the new offset)

Definition at line 125 of file demux.h.

Referenced by av_seek_frame(), seek_frame_generic(), and seek_frame_internal().

◆ read_timestamp

int64_t(* FFInputFormat::read_timestamp) (struct AVFormatContext *s, int stream_index, int64_t *pos, int64_t pos_limit)

Get the next timestamp in stream[stream_index].time_base units.

Returns
the timestamp or AV_NOPTS_VALUE if an error occurred

Definition at line 132 of file demux.h.

Referenced by ff_seek_frame_binary(), and seek_frame_internal().

◆ read_set_state

int(* FFInputFormat::read_set_state) (struct AVFormatContext *, enum FFInputFormatStreamState state)

Change the stream state - only meaningful if using a network-based format (RTSP).

Definition at line 139 of file demux.h.

Referenced by av_read_pause(), and av_read_play().

◆ handle_command

int(* FFInputFormat::handle_command) (struct AVFormatContext *, enum FFInputFormatCommandOption opt, enum AVFormatCommandID id, void *data)

Handle demuxer commands This callback is used to either send a command to a demuxer (FF_INFMT_COMMAND_SUBMIT), or to retrieve the reply for a previously sent command (FF_INFMT_COMMAND_GET_REPLY).

Demuxers implementing this must return AVERROR(ENOTSUP) if the provided id is not handled by the demuxer. Demuxers should return AVERROR(EAGAIN) if they can handle a specific command but are not able to at the moment. When a reply is requested that is not available yet, the demuxer should also return AVERROR(EAGAIN).

Depending on opt, the data will be either a pointer to the command payload structure for the specified ID, or a pointer to the buffer for the command reply for the specified ID.

When a command is submitted, before a previous reply was requested from the demuxer, the demuxer should discard the old reply.

See also
avformat_send_command()
avformat_receive_command_reply()

Definition at line 167 of file demux.h.

Referenced by avformat_receive_command_reply(), and avformat_send_command().

◆ read_seek2

int(* FFInputFormat::read_seek2) (struct AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags)

Seek to timestamp ts.

Seeking will be done so that the point from which all active streams can be presented successfully will be closest to ts and within min/max_ts. Active streams are all streams that have AVStream.discard < AVDISCARD_ALL.

Definition at line 177 of file demux.h.

Referenced by av_seek_frame(), and avformat_seek_file().

◆ get_device_list

int(* FFInputFormat::get_device_list) (struct AVFormatContext *s, struct AVDeviceInfoList *device_list)

Returns device list with it properties.

See also
avdevice_list_devices() for more details.

Definition at line 183 of file demux.h.

Referenced by avdevice_list_devices().


The documentation for this struct was generated from the following file: