38 #define RIFF_TAG MKTAG('R', 'I', 'F', 'F')
39 #define CDXA_TAG MKTAG('C', 'D', 'X', 'A')
41 #define RAW_CD_SECTOR_SIZE 2352
42 #define RAW_CD_SECTOR_DATA_SIZE 2304
43 #define VIDEO_DATA_CHUNK_SIZE 0x7E0
44 #define VIDEO_DATA_HEADER_SIZE 0x38
45 #define RIFF_HEADER_SIZE 0x2C
47 #define CDXA_TYPE_MASK 0x0E
48 #define CDXA_TYPE_DATA 0x08
49 #define CDXA_TYPE_AUDIO 0x04
50 #define CDXA_TYPE_VIDEO 0x02
52 #define STR_MAGIC (0x80010160)
69 static const uint8_t sync_header[12] = {0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00};
92 if (sector[0x11] >= 32)
98 int current_sector =
AV_RL16(§or[0x1C]);
99 int sector_count =
AV_RL16(§or[0x1E]);
103 && current_sector < sector_count
118 if(sector[0x13]&0x2A)
123 if(sector[0x12] & CDXA_TYPE_MASK)
131 else if(vid+aud)
return 1;
178 channel = sector[0x11];
188 int current_sector =
AV_RL16(§or[0x1C]);
189 int sector_count =
AV_RL16(§or[0x1E]);
193 && current_sector < sector_count
195 av_log(s,
AV_LOG_ERROR,
"Invalid parameters %d %d %d\n", current_sector, sector_count, frame_size);
224 memset(pkt->
data, 0, sector_count*VIDEO_DATA_CHUNK_SIZE);
231 memcpy(pkt->
data + current_sector*VIDEO_DATA_CHUNK_SIZE,
233 VIDEO_DATA_CHUNK_SIZE);
235 if (current_sector == sector_count-1) {
241 #if FF_API_DESTRUCT_PACKET
254 int fmt = sector[0x13];
283 memcpy(pkt->
data,sector+24,2304);