32 #define GXF_AUDIO_PACKET_SIZE 65536
34 #define GXF_TIMECODE(c, d, h, m, s, f) \
35 ((c) << 30 | (d) << 29 | (h) << 24 | (m) << 16 | (s) << 8 | (f))
118 #define SERVER_PATH "EXT:/PDR/default/"
119 #define ES_NAME_PATTERN "EXT:/PDR/default/ES."
126 for (i = 0; i < 6; ++i) {
137 for (; to_pad > 0; to_pad--) {
185 int size, starting_line;
208 size =
snprintf(buffer,
sizeof(buffer),
"Ver 1\nBr %.6f\nIpg 1\nPpi %d\nBpiop %d\n"
209 "Pix 0\nCf %d\nCg %d\nSl %d\nnl16 %d\nVi 1\nf1 1\n",
295 const char *filename = strrchr(s->
filename,
'/');
305 len = strlen(filename);
393 int fields_per_flt = (gxf->
nb_fields+1) / 1000 + 1;
394 int flt_entries = gxf->
nb_fields / fields_per_flt;
403 for (i = 0; i < flt_entries; i++)
407 for (; i < 1000; i++)
417 int timecode_base = gxf->
time_base.
den == 60000 ? 60 : 50;
418 int64_t timestamp = 0;
421 uint32_t timecode_in;
422 uint32_t timecode_out;
432 gxf->
tc.
hh * (timecode_base * 3600) +
433 gxf->
tc.
mm * (timecode_base * 60) +
434 gxf->
tc.
ss * timecode_base +
438 nb_fields / (timecode_base * 3600) % 24,
439 nb_fields / (timecode_base * 60) % 60,
440 nb_fields / timecode_base % 60,
441 nb_fields % timecode_base);
541 for (i = 0; i < 8; i++) {
569 int64_t startpos, curpos;
662 if (sscanf(tcstr,
"%d:%d:%d%c%d", &tc->
hh, &tc->
mm, &tc->
ss, &c, &tc->
ff) != 5) {
664 "syntax: hh:mm:ss[:;.]ff\n");
683 int i, media_info = 0;
687 av_log(s,
AV_LOG_ERROR,
"gxf muxer does not support streamed output, patch welcome\n");
691 gxf->
flags |= 0x00080000;
721 gxf->
flags |= 0x04000000;
732 gxf->
flags |= 0x00000080;
738 gxf->
flags |= 0x00000040;
742 "gxf muxer only accepts PAL or NTSC resolutions currently\n");
758 gxf->
flags |= 0x00004000;
770 gxf->
flags |= 0x00008000;
777 gxf->
flags |= 0x00002000;
781 gxf->
flags |= 0x00001000;
791 sc->
media_info = media_info<<8 | (
'0'+tracks[media_info]++);
802 gxf->
flags |= 0x200000;
858 for(i=0; i<size-4 && c!=0x100; i++){
863 return (buf[i+1]>>3)&7;
920 int packet_start_offset =
avio_tell(pb) / 1024;
924 padding = 4 - pkt->
size % 4;
965 for (i = 0; i < 2; i++) {
973 field_nb[i] = pkt[i]->
dts;
976 return field_nb[1] > field_nb[0] ||
977 (field_nb[1] == field_nb[0] && sc[1]->
order > sc[0]->
order);