1 /*
2 * Bitmap Brothers JV demuxer
3 * Copyright (c) 2005, 2011 Peter Ross <pross@xvid.org>
4 *
5 * This file is part of FFmpeg.
6 *
7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * FFmpeg is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with FFmpeg; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22 /**
23 * @file
24 * Bitmap Brothers JV demuxer
25 * @author Peter Ross <pross@xvid.org>
26 */
27
32
33 #define JV_PREAMBLE_SIZE 5
34
41
44 enum {
51
52 #define MAGIC " Compression by John M Phillips Copyright (C) 1995 The Bitmap Brothers Ltd."
53
55 {
59 return 0;
60 }
61
63 {
67 int64_t audio_pts = 0;
69 int i;
70
72
75 if (!ast || !vst)
77
87
89
97
99
103
107
112
113 /* total frame size including audio, video, palette data and padding */
118
128
131
133 }
134
135 jv->
state = JV_AUDIO;
136 return 0;
137 }
138
140 {
144
148
150 case JV_AUDIO:
158 return 0;
159 }
160 case JV_VIDEO:
166
171
177 return 0;
178 }
179 case JV_PADDING:
182 jv->
state = JV_AUDIO;
184 }
185 }
186
188 }
189
191 int64_t ts,
int flags)
192 {
195 int i;
196
199
200 switch(stream_index) {
201 case 0:
203 break;
204 case 1:
205 i = ts;
206 break;
207 default:
208 return 0;
209 }
210
212 return 0;
214 return -1;
215
216 jv->
state = JV_AUDIO;
218 return 0;
219 }
220
222 {
224
226
227 return 0;
228 }
229
239 };