27 #define LXF_MAX_PACKET_HEADER_SIZE 256
28 #define LXF_HEADER_DATA_SIZE 120
29 #define LXF_IDENT "LEITCH\0"
30 #define LXF_IDENT_LENGTH 8
31 #define LXF_SAMPLERATE 48000
32 #define LXF_MAX_AUDIO_PACKET (8008*15*4)
73 for (x = 0; x <
size; x += 4)
116 uint32_t
version, audio_format, header_size, channels, tmp;
122 if ((ret =
sync(s, header)) < 0)
130 version = bytestream_get_le32(&p);
131 header_size = bytestream_get_le32(&p);
134 if (header_size < (version ? 72 : 60) ||
142 if ((ret =
avio_read(pb, header + (p - header),
143 header_size - (p - header))) !=
144 header_size - (p - header)) {
152 p += version ? 20 : 12;
159 ret = bytestream_get_le32(&p);
162 (int64_t)(uint32_t)
AV_RL32(p + 12));
171 if (version == 0) p += 8;
172 audio_format = bytestream_get_le32(&p);
173 channels = bytestream_get_le32(&p);
174 track_size = bytestream_get_le32(&p);
192 "only 16-, 20-, 24- and 32-bit PCM currently supported\n");
206 "video doesn't seem to be PAL or NTSC. guessing PAL\n");
212 ret = av_popcount(channels) * track_size;
216 tmp = bytestream_get_le32(&p);
217 ret = bytestream_get_le32(&p);
233 uint32_t video_params, disk_params;
234 uint16_t record_date, expiration_date;
252 video_params =
AV_RL32(&header_data[40]);
253 record_date =
AV_RL16(&header_data[56]);
254 expiration_date =
AV_RL16(&header_data[58]);
255 disk_params =
AV_RL32(&header_data[116]);
258 st->
codec->
bit_rate = 1000000 * ((video_params >> 14) & 0xFF);
263 record_date, 1900 + (record_date & 0x7F), (record_date >> 7) & 0xF,
264 (record_date >> 11) & 0x1F);
267 expiration_date, 1900 + (expiration_date & 0x7F), (expiration_date >> 7) & 0xF,
268 (expiration_date >> 11) & 0x1F);
270 if ((video_params >> 22) & 1)
273 if ((lxf->
channels = 1 << (disk_params >> 4 & 3) + 1)) {
307 if (stream == 1 && !(ast = s->
streams[1])) {