#include "libavutil/common.h"#include "avformat.h"#include "internal.h"#include "gxf.h"Go to the source code of this file.
Data Structures | |
| struct | gxf_stream_info |
Defines | |
| #define | READ_ONE() |
Functions | |
| static int | parse_packet_header (AVIOContext *pb, GXFPktType *type, int *length) |
| parses a packet header, extracting type and length | |
| static int | gxf_probe (AVProbeData *p) |
| check if file starts with a PKT_MAP header | |
| static int | get_sindex (AVFormatContext *s, int id, int format) |
| gets the stream index for the track with the specified id, creates new stream if not found | |
| static void | gxf_material_tags (AVIOContext *pb, int *len, struct gxf_stream_info *si) |
| filters out interesting tags from material information. | |
| static AVRational | fps_tag2avr (int32_t fps) |
| convert fps tag value to AVRational fps | |
| static AVRational | fps_umf2avr (uint32_t flags) |
| convert UMF attributes flags to AVRational fps | |
| static void | gxf_track_tags (AVIOContext *pb, int *len, struct gxf_stream_info *si) |
| filters out interesting tags from track information. | |
| static void | gxf_read_index (AVFormatContext *s, int pkt_len) |
| read index from FLT packet into stream 0 av_index | |
| static int | gxf_header (AVFormatContext *s, AVFormatParameters *ap) |
| static int64_t | gxf_resync_media (AVFormatContext *s, uint64_t max_interval, int track, int timestamp) |
| resync the stream on the next media packet with specified properties | |
| static int | gxf_packet (AVFormatContext *s, AVPacket *pkt) |
| static int | gxf_seek (AVFormatContext *s, int stream_index, int64_t timestamp, int flags) |
| static int64_t | gxf_read_timestamp (AVFormatContext *s, int stream_index, int64_t *pos, int64_t pos_limit) |
Variables | |
| AVInputFormat | ff_gxf_demuxer |
| #define READ_ONE | ( | ) |
{ \
if (!max_interval-- || pb->eof_reached) \
goto out; \
tmp = tmp << 8 | avio_r8(pb); \
}
Definition at line 370 of file gxf.c.
Referenced by gxf_resync_media().
| static AVRational fps_tag2avr | ( | int32_t | fps | ) | [static] |
convert fps tag value to AVRational fps
| fps | fps value from tag |
Definition at line 187 of file gxf.c.
Referenced by gxf_track_tags().
| static AVRational fps_umf2avr | ( | uint32_t | flags | ) | [static] |
convert UMF attributes flags to AVRational fps
| flags | UMF flags to convert |
Definition at line 198 of file gxf.c.
Referenced by gxf_header().
| static int get_sindex | ( | AVFormatContext * | s, | |
| int | id, | |||
| int | format | |||
| ) | [static] |
gets the stream index for the track with the specified id, creates new stream if not found
| id | id of stream to find / add | |
| format | stream format identifier |
Definition at line 78 of file gxf.c.
Referenced by gxf_header(), and gxf_packet().
| static int gxf_header | ( | AVFormatContext * | s, | |
| AVFormatParameters * | ap | |||
| ) | [static] |
| static void gxf_material_tags | ( | AVIOContext * | pb, | |
| int * | len, | |||
| struct gxf_stream_info * | si | |||
| ) | [static] |
filters out interesting tags from material information.
| len | length of tag section, will be adjusted to contain remaining bytes | |
| si | struct to store collected information into |
Definition at line 161 of file gxf.c.
Referenced by gxf_header().
| static int gxf_packet | ( | AVFormatContext * | s, | |
| AVPacket * | pkt | |||
| ) | [static] |
| static int gxf_probe | ( | AVProbeData * | p | ) | [static] |
| static void gxf_read_index | ( | AVFormatContext * | s, | |
| int | pkt_len | |||
| ) | [static] |
read index from FLT packet into stream 0 av_index
Definition at line 234 of file gxf.c.
Referenced by gxf_header(), and gxf_packet().
| static int64_t gxf_read_timestamp | ( | AVFormatContext * | s, | |
| int | stream_index, | |||
| int64_t * | pos, | |||
| int64_t | pos_limit | |||
| ) | [static] |
| static int64_t gxf_resync_media | ( | AVFormatContext * | s, | |
| uint64_t | max_interval, | |||
| int | track, | |||
| int | timestamp | |||
| ) | [static] |
resync the stream on the next media packet with specified properties
| max_interval | how many bytes to search for matching packet at most | |
| track | track id the media packet must belong to, -1 for any | |
| timestamp | minimum timestamp (== field number) the packet must have, -1 for any |
Definition at line 384 of file gxf.c.
Referenced by gxf_read_timestamp(), and gxf_seek().
| static int gxf_seek | ( | AVFormatContext * | s, | |
| int | stream_index, | |||
| int64_t | timestamp, | |||
| int | flags | |||
| ) | [static] |
| static void gxf_track_tags | ( | AVIOContext * | pb, | |
| int * | len, | |||
| struct gxf_stream_info * | si | |||
| ) | [static] |
filters out interesting tags from track information.
| len | length of tag section, will be adjusted to contain remaining bytes | |
| si | struct to store collected information into |
Definition at line 210 of file gxf.c.
Referenced by gxf_header().
| static int parse_packet_header | ( | AVIOContext * | pb, | |
| GXFPktType * | type, | |||
| int * | length | |||
| ) | [static] |
parses a packet header, extracting type and length
| pb | AVIOContext to read header from | |
| type | detected packet type is stored here | |
| length | detected packet length, excluding header is stored here |
Definition at line 41 of file gxf.c.
Referenced by gxf_header(), gxf_packet(), and gxf_resync_media().
{
.name = "gxf",
.long_name = NULL_IF_CONFIG_SMALL("GXF format"),
.priv_data_size = sizeof(struct gxf_stream_info),
.read_probe = gxf_probe,
.read_header = gxf_header,
.read_packet = gxf_packet,
.read_seek = gxf_seek,
.read_timestamp = gxf_read_timestamp,
}