* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "libavutil/intfloat_readwrite.h"
+#include "libavutil/intfloat.h"
#include "libavutil/mathematics.h"
#include "avformat.h"
+#include "internal.h"
#include "gxf.h"
#include "riff.h"
#include "audiointerleave.h"
int timecode_base = gxf->time_base.den == 60000 ? 60 : 50;
int64_t timestamp = 0;
AVDictionaryEntry *t;
+ uint32_t timecode;
-#if FF_API_TIMESTAMP
- if (s->timestamp)
- timestamp = s->timestamp;
- else
-#endif
if (t = av_dict_get(s->metadata, "creation_time", NULL, 0))
timestamp = ff_iso8601_to_unix_time(t->value);
// XXX drop frame
- uint32_t timecode =
+ timecode =
gxf->nb_fields / (timecode_base * 3600) % 24 << 24 | // hours
gxf->nb_fields / (timecode_base * 60) % 60 << 16 | // minutes
gxf->nb_fields / timecode_base % 60 << 8 | // seconds
static int gxf_write_umf_media_audio(AVIOContext *pb, GXFStreamContext *sc)
{
- avio_wl64(pb, av_dbl2int(1)); /* sound level to begin to */
- avio_wl64(pb, av_dbl2int(1)); /* sound level to begin to */
+ avio_wl64(pb, av_double2int(1)); /* sound level to begin to */
+ avio_wl64(pb, av_double2int(1)); /* sound level to begin to */
avio_wl32(pb, 0); /* number of fields over which to ramp up sound level */
avio_wl32(pb, 0); /* number of fields over which to ramp down sound level */
avio_wl32(pb, 0); /* reserved */
return 32;
}
-#if 0
-static int gxf_write_umf_media_mjpeg(AVIOContext *pb, GXFStreamContext *sc)
-{
- avio_wb64(pb, 0); /* FIXME FLOAT max chroma quant level */
- avio_wb64(pb, 0); /* FIXME FLOAT max luma quant level */
- avio_wb64(pb, 0); /* FIXME FLOAT min chroma quant level */
- avio_wb64(pb, 0); /* FIXME FLOAT min luma quant level */
- return 32;
-}
-#endif
-
static int gxf_write_umf_media_description(AVFormatContext *s)
{
GXFContext *gxf = s->priv_data;
}
sc->track_type = 2;
sc->sample_rate = st->codec->sample_rate;
- av_set_pts_info(st, 64, 1, sc->sample_rate);
+ avpriv_set_pts_info(st, 64, 1, sc->sample_rate);
sc->sample_size = 16;
sc->frame_rate_index = -2;
sc->lines_index = -2;
"gxf muxer only accepts PAL or NTSC resolutions currently\n");
return -1;
}
- av_set_pts_info(st, 64, gxf->time_base.num, gxf->time_base.den);
+ avpriv_set_pts_info(st, 64, gxf->time_base.num, gxf->time_base.den);
if (gxf_find_lines_index(st) < 0)
sc->lines_index = -1;
sc->sample_size = st->codec->bit_rate;
if (pkt && s->streams[pkt->stream_index]->codec->codec_type == AVMEDIA_TYPE_VIDEO)
pkt->duration = 2; // enforce 2 fields
return ff_audio_rechunk_interleave(s, out, pkt, flush,
- av_interleave_packet_per_dts, gxf_compare_field_nb);
+ ff_interleave_packet_per_dts, gxf_compare_field_nb);
}
AVOutputFormat ff_gxf_muxer = {