Go to the documentation of this file.
30 #define LXF_MAX_PACKET_HEADER_SIZE 256
31 #define LXF_HEADER_DATA_SIZE 120
32 #define LXF_IDENT "LEITCH\0"
33 #define LXF_IDENT_LENGTH 8
34 #define LXF_SAMPLERATE 48000
75 for (x = 0; x <
size; x += 4)
131 version = bytestream_get_le32(&p);
132 header_size = bytestream_get_le32(&p);
136 if (header_size < (
version ? 72 : 60) ||
145 header_size - (p -
header))) !=
146 header_size - (p -
header))
160 ret = bytestream_get_le32(&p);
163 (int64_t)(uint32_t)
AV_RL32(p + 12));
167 if (
s->nb_streams < 2) {
174 audio_format = bytestream_get_le32(&p);
176 track_size = bytestream_get_le32(&p);
209 "video doesn't seem to be PAL or NTSC. guessing PAL\n");
221 tmp = bytestream_get_le32(&p);
222 ret = bytestream_get_le32(&p);
238 uint32_t video_params, disk_params;
239 uint16_t record_date, expiration_date;
257 video_params =
AV_RL32(&header_data[40]);
258 record_date =
AV_RL16(&header_data[56]);
259 expiration_date =
AV_RL16(&header_data[58]);
260 disk_params =
AV_RL32(&header_data[116]);
269 record_date, 1900 + (record_date & 0x7F), (record_date >> 7) & 0xF,
270 (record_date >> 11) & 0x1F);
273 expiration_date, 1900 + (expiration_date & 0x7F), (expiration_date >> 7) & 0xF,
274 (expiration_date >> 11) & 0x1F);
276 if ((video_params >> 22) & 1)
279 if ((lxf->
channels = 1 << (disk_params >> 4 & 3) + 1)) {
309 "got packet with illegal stream index %"PRIu32
"\n", stream);
313 if (stream == 1 &&
s->nb_streams < 2) {
#define AV_LOG_WARNING
Something somehow does not look correct.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
enum AVMediaType codec_type
General type of the encoded data.
#define AVERROR_EOF
End of file.
@ AV_CODEC_ID_PCM_S32LE_PLANAR
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
int nb_channels
Number of channels in this layout.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
@ AV_CODEC_ID_PCM_S16LE_PLANAR
int64_t duration
Decoding: duration of the stream, in stream time base.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_RL16
int frame_number
current video frame
static int lxf_read_packet(AVFormatContext *s, AVPacket *pkt)
#define LXF_MAX_PACKET_HEADER_SIZE
enum AVStreamParseType need_parsing
AVCodecParameters * codecpar
Codec parameters associated with this stream.
static int read_header(FFV1Context *f)
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
This structure contains the data a format has to probe a file.
static int check_checksum(const uint8_t *header, int size)
Verify the checksum of an LXF packet header.
AVChannelLayout ch_layout
Audio only.
int sample_rate
Audio only.
@ AV_CODEC_ID_PCM_S24LE_PLANAR
static int lxf_sync(AVFormatContext *s, uint8_t *header)
Read input until we find the next ident.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static const AVCodecTag lxf_tags[]
void avpriv_report_missing_feature(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
static const uint8_t header[24]
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed.
int avio_r8(AVIOContext *s)
int channels
number of audio channels. zero means no audio
int flags
A combination of AV_PKT_FLAG values.
#define AV_LOG_INFO
Standard information.
#define FFERROR_REDO
Returned by demuxers to indicate that data was consumed but discarded (ignored streams or junk data).
const AVInputFormat ff_lxf_demuxer
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
static int lxf_read_header(AVFormatContext *s)
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
Filter the word “frame” indicates either a video frame or a group of audio samples
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
int bits_per_coded_sample
The number of bits per sample in the codedwords.
#define avpriv_request_sample(...)
static int lxf_probe(const AVProbeData *p)
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
This structure stores compressed data.
int64_t bit_rate
The average bitrate of the encoded data (in bits per second).
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static int get_packet_header(AVFormatContext *s)
Read and checksum the next packet header.
@ AV_CODEC_ID_MPEG2VIDEO
preferred ID for MPEG-1/2 video decoding
#define LXF_HEADER_DATA_SIZE
int avio_feof(AVIOContext *s)
Similar to feof() but also returns nonzero on read errors.