25 #define HEADER_SIZE 24
46 const uint8_t *bytestream = p->
buf+i;
48 if(bytestream_get_le16(&bytestream) != HEADER_SIZE)
50 width = bytestream_get_le16(&bytestream);
51 height = bytestream_get_le16(&bytestream);
52 if(!(width==320 && height==240) && !(width==160 && height==120))
56 fourcc = bytestream_get_le32(&bytestream);
57 if(fourcc !=
MKTAG(
'M',
'L',
'2',
'0'))
106 uint32_t
size, timestamp;
122 pkt->
pts = timestamp;
123 pkt->
dts = timestamp;
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
AVInputFormat ff_msnwc_tcp_demuxer
unsigned int avio_rl32(AVIOContext *s)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void av_log(void *avcl, int level, const char *fmt,...)
AVStream * avformat_new_stream(AVFormatContext *s, AVCodec *c)
Add a new stream to a media file.
int flags
A combination of AV_PKT_FLAG values.
int avio_r8(AVIOContext *s)
AVCodecContext * codec
codec context
int buf_size
Size of buf except extra allocated bytes.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
static av_always_inline int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
static int msnwc_tcp_read_packet(AVFormatContext *ctx, AVPacket *pkt)
enum AVMediaType codec_type
static int msnwc_tcp_probe(AVProbeData *p)
main external API structure.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
This structure contains the data a format has to probe a file.
unsigned int avio_rl16(AVIOContext *s)
int eof_reached
true if eof reached
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed...
#define MKTAG(a, b, c, d)
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
static int msnwc_tcp_read_header(AVFormatContext *ctx, AVFormatParameters *ap)