annotate tmv.c @ 6304:50b1c5de4b71 libavformat

In mpegts muxer, fix rbsp trailing bits in AUD nal, fixes issue #2122
author bcoudurier
date Fri, 23 Jul 2010 00:27:17 +0000
parents 178de7695c6c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4910
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
1 /*
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
2 * 8088flex TMV file demuxer
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
3 * Copyright (c) 2009 Daniel Verkamp <daniel at drv.nu>
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
4 *
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
5 * This file is part of FFmpeg.
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
6 *
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
7 * FFmpeg is free software; you can redistribute it and/or
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
8 * modify it under the terms of the GNU Lesser General Public
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
9 * License as published by the Free Software Foundation; either
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
10 * version 2.1 of the License, or (at your option) any later version.
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
11 *
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
12 * FFmpeg is distributed in the hope that it will be useful,
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
15 * Lesser General Public License for more details.
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
16 *
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
17 * You should have received a copy of the GNU Lesser General Public
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
18 * License along with FFmpeg; if not, write to the Free Software
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
20 */
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
21
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
22 /**
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
23 * 8088flex TMV file demuxer
5969
178de7695c6c Remove explicit filename from Doxygen @file commands.
diego
parents: 5913
diff changeset
24 * @file
4910
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
25 * @author Daniel Verkamp
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
26 * @sa http://www.oldskool.org/pc/8088_Corruption
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
27 */
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
28
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
29 #include "libavutil/intreadwrite.h"
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
30 #include "avformat.h"
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
31
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
32 enum {
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
33 TMV_PADDING = 0x01,
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
34 TMV_STEREO = 0x02,
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
35 };
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
36
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
37 #define TMV_TAG MKTAG('T', 'M', 'A', 'V')
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
38
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
39 typedef struct TMVContext {
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
40 unsigned audio_chunk_size;
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
41 unsigned video_chunk_size;
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
42 unsigned padding;
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
43 unsigned stream_index;
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
44 } TMVContext;
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
45
5323
ed61c8ab8b08 Seek function for TMV
daniel
parents: 5322
diff changeset
46 #define TMV_HEADER_SIZE 12
ed61c8ab8b08 Seek function for TMV
daniel
parents: 5322
diff changeset
47
5269
bcd5ff60e3da Stricter TMV probe
daniel
parents: 4910
diff changeset
48 #define PROBE_MIN_SAMPLE_RATE 5000
bcd5ff60e3da Stricter TMV probe
daniel
parents: 4910
diff changeset
49 #define PROBE_MAX_FPS 120
bcd5ff60e3da Stricter TMV probe
daniel
parents: 4910
diff changeset
50 #define PROBE_MIN_AUDIO_SIZE (PROBE_MIN_SAMPLE_RATE / PROBE_MAX_FPS)
bcd5ff60e3da Stricter TMV probe
daniel
parents: 4910
diff changeset
51
4910
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
52 static int tmv_probe(AVProbeData *p)
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
53 {
5269
bcd5ff60e3da Stricter TMV probe
daniel
parents: 4910
diff changeset
54 if (AV_RL32(p->buf) == TMV_TAG &&
bcd5ff60e3da Stricter TMV probe
daniel
parents: 4910
diff changeset
55 AV_RL16(p->buf+4) >= PROBE_MIN_SAMPLE_RATE &&
bcd5ff60e3da Stricter TMV probe
daniel
parents: 4910
diff changeset
56 AV_RL16(p->buf+6) >= PROBE_MIN_AUDIO_SIZE &&
bcd5ff60e3da Stricter TMV probe
daniel
parents: 4910
diff changeset
57 !p->buf[8] && // compression method
bcd5ff60e3da Stricter TMV probe
daniel
parents: 4910
diff changeset
58 p->buf[9] && // char cols
bcd5ff60e3da Stricter TMV probe
daniel
parents: 4910
diff changeset
59 p->buf[10]) // char rows
5322
d09cb951c704 Parenthesize correctly in TMV probe
daniel
parents: 5270
diff changeset
60 return AVPROBE_SCORE_MAX /
d09cb951c704 Parenthesize correctly in TMV probe
daniel
parents: 5270
diff changeset
61 ((p->buf[9] == 40 && p->buf[10] == 25) ? 1 : 4);
4910
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
62 return 0;
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
63 }
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
64
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
65 static int tmv_read_header(AVFormatContext *s, AVFormatParameters *ap)
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
66 {
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
67 TMVContext *tmv = s->priv_data;
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
68 ByteIOContext *pb = s->pb;
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
69 AVStream *vst, *ast;
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
70 AVRational fps;
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
71 unsigned comp_method, char_cols, char_rows, features;
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
72
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
73 if (get_le32(pb) != TMV_TAG)
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
74 return -1;
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
75
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
76 if (!(vst = av_new_stream(s, 0)))
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
77 return AVERROR(ENOMEM);
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
78
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
79 if (!(ast = av_new_stream(s, 0)))
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
80 return AVERROR(ENOMEM);
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
81
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
82 ast->codec->sample_rate = get_le16(pb);
5270
80542fdaba5e Do not allow 0 sample rate in TMV demuxer
daniel
parents: 5269
diff changeset
83 if (!ast->codec->sample_rate) {
80542fdaba5e Do not allow 0 sample rate in TMV demuxer
daniel
parents: 5269
diff changeset
84 av_log(s, AV_LOG_ERROR, "invalid sample rate\n");
80542fdaba5e Do not allow 0 sample rate in TMV demuxer
daniel
parents: 5269
diff changeset
85 return -1;
80542fdaba5e Do not allow 0 sample rate in TMV demuxer
daniel
parents: 5269
diff changeset
86 }
80542fdaba5e Do not allow 0 sample rate in TMV demuxer
daniel
parents: 5269
diff changeset
87
4910
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
88 tmv->audio_chunk_size = get_le16(pb);
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
89 if (!tmv->audio_chunk_size) {
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
90 av_log(s, AV_LOG_ERROR, "invalid audio chunk size\n");
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
91 return -1;
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
92 }
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
93
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
94 comp_method = get_byte(pb);
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
95 if (comp_method) {
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
96 av_log(s, AV_LOG_ERROR, "unsupported compression method %d\n",
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
97 comp_method);
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
98 return -1;
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
99 }
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
100
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
101 char_cols = get_byte(pb);
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
102 char_rows = get_byte(pb);
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
103 tmv->video_chunk_size = char_cols * char_rows * 2;
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
104
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
105 features = get_byte(pb);
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
106 if (features & ~(TMV_PADDING | TMV_STEREO)) {
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
107 av_log(s, AV_LOG_ERROR, "unsupported features 0x%02x\n",
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
108 features & ~(TMV_PADDING | TMV_STEREO));
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
109 return -1;
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
110 }
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
111
5910
536e5527c1e0 Define AVMediaType enum, and use it instead of enum CodecType, which
stefano
parents: 5355
diff changeset
112 ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
4910
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
113 ast->codec->codec_id = CODEC_ID_PCM_U8;
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
114 ast->codec->channels = features & TMV_STEREO ? 2 : 1;
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
115 ast->codec->bits_per_coded_sample = 8;
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
116 ast->codec->bit_rate = ast->codec->sample_rate *
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
117 ast->codec->bits_per_coded_sample;
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
118 av_set_pts_info(ast, 32, 1, ast->codec->sample_rate);
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
119
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
120 fps.num = ast->codec->sample_rate * ast->codec->channels;
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
121 fps.den = tmv->audio_chunk_size;
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
122 av_reduce(&fps.num, &fps.den, fps.num, fps.den, 0xFFFFFFFFLL);
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
123
5910
536e5527c1e0 Define AVMediaType enum, and use it instead of enum CodecType, which
stefano
parents: 5355
diff changeset
124 vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
4910
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
125 vst->codec->codec_id = CODEC_ID_TMV;
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
126 vst->codec->pix_fmt = PIX_FMT_PAL8;
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
127 vst->codec->width = char_cols * 8;
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
128 vst->codec->height = char_rows * 8;
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
129 av_set_pts_info(vst, 32, fps.den, fps.num);
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
130
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
131 if (features & TMV_PADDING)
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
132 tmv->padding =
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
133 ((tmv->video_chunk_size + tmv->audio_chunk_size + 511) & ~511) -
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
134 (tmv->video_chunk_size + tmv->audio_chunk_size);
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
135
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
136 vst->codec->bit_rate = ((tmv->video_chunk_size + tmv->padding) *
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
137 fps.num * 8) / fps.den;
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
138
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
139 return 0;
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
140 }
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
141
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
142 static int tmv_read_packet(AVFormatContext *s, AVPacket *pkt)
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
143 {
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
144 TMVContext *tmv = s->priv_data;
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
145 ByteIOContext *pb = s->pb;
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
146 int ret, pkt_size = tmv->stream_index ?
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
147 tmv->audio_chunk_size : tmv->video_chunk_size;
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
148
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
149 if (url_feof(pb))
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
150 return AVERROR_EOF;
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
151
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
152 ret = av_get_packet(pb, pkt, pkt_size);
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
153
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
154 if (tmv->stream_index)
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
155 url_fskip(pb, tmv->padding);
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
156
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
157 pkt->stream_index = tmv->stream_index;
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
158 tmv->stream_index ^= 1;
5913
11bb10c37225 Replace all occurences of PKT_FLAG_KEY with AV_PKT_FLAG_KEY.
cehoyos
parents: 5910
diff changeset
159 pkt->flags |= AV_PKT_FLAG_KEY;
4910
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
160
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
161 return ret;
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
162 }
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
163
5323
ed61c8ab8b08 Seek function for TMV
daniel
parents: 5322
diff changeset
164 static int tmv_read_seek(AVFormatContext *s, int stream_index,
ed61c8ab8b08 Seek function for TMV
daniel
parents: 5322
diff changeset
165 int64_t timestamp, int flags)
ed61c8ab8b08 Seek function for TMV
daniel
parents: 5322
diff changeset
166 {
ed61c8ab8b08 Seek function for TMV
daniel
parents: 5322
diff changeset
167 TMVContext *tmv = s->priv_data;
ed61c8ab8b08 Seek function for TMV
daniel
parents: 5322
diff changeset
168 int64_t pos;
ed61c8ab8b08 Seek function for TMV
daniel
parents: 5322
diff changeset
169
ed61c8ab8b08 Seek function for TMV
daniel
parents: 5322
diff changeset
170 if (stream_index)
ed61c8ab8b08 Seek function for TMV
daniel
parents: 5322
diff changeset
171 return -1;
ed61c8ab8b08 Seek function for TMV
daniel
parents: 5322
diff changeset
172
ed61c8ab8b08 Seek function for TMV
daniel
parents: 5322
diff changeset
173 pos = timestamp *
ed61c8ab8b08 Seek function for TMV
daniel
parents: 5322
diff changeset
174 (tmv->audio_chunk_size + tmv->video_chunk_size + tmv->padding);
ed61c8ab8b08 Seek function for TMV
daniel
parents: 5322
diff changeset
175
ed61c8ab8b08 Seek function for TMV
daniel
parents: 5322
diff changeset
176 url_fseek(s->pb, pos + TMV_HEADER_SIZE, SEEK_SET);
ed61c8ab8b08 Seek function for TMV
daniel
parents: 5322
diff changeset
177 tmv->stream_index = 0;
ed61c8ab8b08 Seek function for TMV
daniel
parents: 5322
diff changeset
178 return 0;
ed61c8ab8b08 Seek function for TMV
daniel
parents: 5322
diff changeset
179 }
ed61c8ab8b08 Seek function for TMV
daniel
parents: 5322
diff changeset
180
4910
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
181 AVInputFormat tmv_demuxer = {
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
182 "tmv",
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
183 NULL_IF_CONFIG_SMALL("8088flex TMV"),
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
184 sizeof(TMVContext),
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
185 tmv_probe,
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
186 tmv_read_header,
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
187 tmv_read_packet,
5323
ed61c8ab8b08 Seek function for TMV
daniel
parents: 5322
diff changeset
188 NULL,
ed61c8ab8b08 Seek function for TMV
daniel
parents: 5322
diff changeset
189 tmv_read_seek,
4910
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
190 .flags = AVFMT_GENERIC_INDEX,
21f7970b66d4 Add 8088flex TMV file demuxer.
stefano
parents:
diff changeset
191 };