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",
222 int64_t track_aux_data = 0;
227 track_aux_data |= 0x01;
228 track_aux_data |= 0x40000000;
314 const char *filename = strrchr(s->
filename,
'/');
324 len = strlen(filename);
413 int fields_per_flt = (gxf->
nb_fields+1) / 1000 + 1;
414 int flt_entries = gxf->
nb_fields / fields_per_flt;
423 for (i = 0; i < flt_entries; i++)
427 for (; i < 1000; i++)
437 int timecode_base = gxf->
time_base.
den == 60000 ? 60 : 50;
438 int64_t timestamp = 0;
441 uint32_t timecode_in;
442 uint32_t timecode_out;
452 gxf->
tc.
hh * (timecode_base * 3600) +
453 gxf->
tc.
mm * (timecode_base * 60) +
454 gxf->
tc.
ss * timecode_base +
458 nb_fields / (timecode_base * 3600) % 24,
459 nb_fields / (timecode_base * 60) % 60,
460 nb_fields / timecode_base % 60,
461 nb_fields % timecode_base);
596 int64_t startpos, curpos;
689 if (sscanf(tcstr,
"%d:%d:%d%c%d", &tc->
hh, &tc->
mm, &tc->
ss, &c, &tc->
ff) != 5) {
691 "syntax: hh:mm:ss[:;.]ff\n");
710 int i, media_info = 0;
715 av_log(s,
AV_LOG_ERROR,
"gxf muxer does not support streamed output, patch welcome\n");
719 gxf->
flags |= 0x00080000;
749 gxf->
flags |= 0x04000000;
760 gxf->
flags |= 0x00000080;
766 gxf->
flags |= 0x00000040;
770 "gxf muxer only accepts PAL or NTSC resolutions currently\n");
786 gxf->
flags |= 0x00004000;
798 gxf->
flags |= 0x00008000;
805 gxf->
flags |= 0x00002000;
809 gxf->
flags |= 0x00001000;
819 sc->
media_info = media_info<<8 | (
'0'+tracks[media_info]++);
830 gxf->
flags |= 0x200000;
890 for(i=0; i<size-4 && c!=0x100; i++){
895 return (buf[i+1]>>3)&7;
952 unsigned packet_start_offset =
avio_tell(pb) / 1024;
957 padding = 4 - pkt->
size % 4;
999 for (i = 0; i < 2; i++) {
1007 field_nb[i] = pkt[i]->
dts;
1010 return field_nb[1] > field_nb[0] ||
1011 (field_nb[1] == field_nb[0] && sc[1]->
order > sc[0]->
order);
1025 .extensions =
"gxf",