if (G_UNLIKELY (*buffer && gst_buffer_get_size (*buffer) != size)) {
GST_WARNING_OBJECT (demux,
- "partial pull got %u when expecting %u from offset %" G_GUINT64_FORMAT,
- gst_buffer_get_size (*buffer), size, offset);
+ "partial pull got %" G_GSIZE_FORMAT " when expecting %u from offset %"
+ G_GUINT64_FORMAT, gst_buffer_get_size (*buffer), size, offset);
gst_buffer_unref (*buffer);
ret = GST_FLOW_EOS;
*buffer = NULL;
gboolean ret;
GST_DEBUG_OBJECT (demux,
- "Handling partition pack of size %u at offset %"
+ "Handling partition pack of size %" G_GSIZE_FORMAT " at offset %"
G_GUINT64_FORMAT, gst_buffer_get_size (buffer), demux->offset);
for (l = demux->partitions; l; l = l->next) {
gboolean ret;
GST_DEBUG_OBJECT (demux,
- "Handling primer pack of size %u at offset %"
+ "Handling primer pack of size %" G_GSIZE_FORMAT " at offset %"
G_GUINT64_FORMAT, gst_buffer_get_size (buffer), demux->offset);
if (G_UNLIKELY (!demux->current_partition)) {
for (i = 0; i < demux->preface->content_storage->n_packages; i++) {
if (demux->preface->content_storage->packages[i] &&
- MXF_IS_METADATA_MATERIAL_PACKAGE (demux->preface->
- content_storage->packages[i])) {
+ MXF_IS_METADATA_MATERIAL_PACKAGE (demux->preface->content_storage->
+ packages[i])) {
ret =
- MXF_METADATA_GENERIC_PACKAGE (demux->preface->
- content_storage->packages[i]);
+ MXF_METADATA_GENERIC_PACKAGE (demux->preface->content_storage->
+ packages[i]);
break;
}
}
essence_container);
if (track->parent.type == MXF_METADATA_TRACK_PICTURE_ESSENCE) {
- if (MXF_IS_METADATA_GENERIC_PICTURE_ESSENCE_DESCRIPTOR (track->
- parent.descriptor[0]))
+ if (MXF_IS_METADATA_GENERIC_PICTURE_ESSENCE_DESCRIPTOR (track->parent.
+ descriptor[0]))
mxf_ul_to_string (&MXF_METADATA_GENERIC_PICTURE_ESSENCE_DESCRIPTOR
(track->parent.descriptor[0])->picture_essence_coding,
essence_compression);
g_strdup_printf ("video/x-mxf-%s-%s", essence_container,
essence_compression);
} else if (track->parent.type == MXF_METADATA_TRACK_SOUND_ESSENCE) {
- if (MXF_IS_METADATA_GENERIC_SOUND_ESSENCE_DESCRIPTOR (track->
- parent.descriptor[0]))
+ if (MXF_IS_METADATA_GENERIC_SOUND_ESSENCE_DESCRIPTOR (track->parent.
+ descriptor[0]))
mxf_ul_to_string (&MXF_METADATA_GENERIC_SOUND_ESSENCE_DESCRIPTOR
(track->parent.descriptor[0])->sound_essence_compression,
essence_compression);
g_strdup_printf ("audio/x-mxf-%s-%s", essence_container,
essence_compression);
} else if (track->parent.type == MXF_METADATA_TRACK_DATA_ESSENCE) {
- if (MXF_IS_METADATA_GENERIC_DATA_ESSENCE_DESCRIPTOR (track->
- parent.descriptor[0]))
+ if (MXF_IS_METADATA_GENERIC_DATA_ESSENCE_DESCRIPTOR (track->parent.
+ descriptor[0]))
mxf_ul_to_string (&MXF_METADATA_GENERIC_DATA_ESSENCE_DESCRIPTOR
(track->parent.descriptor[0])->data_essence_coding,
essence_compression);
type = GST_READ_UINT16_BE (key->u + 13);
GST_DEBUG_OBJECT (demux,
- "Handling metadata of size %u at offset %"
+ "Handling metadata of size %" G_GSIZE_FORMAT " at offset %"
G_GUINT64_FORMAT " of type 0x%04x", gst_buffer_get_size (buffer),
demux->offset, type);
type = GST_READ_UINT24_BE (key->u + 13);
GST_DEBUG_OBJECT (demux,
- "Handling descriptive metadata of size %u at offset %"
+ "Handling descriptive metadata of size %" G_GSIZE_FORMAT " at offset %"
G_GUINT64_FORMAT " with scheme 0x%02x and type 0x%06x",
gst_buffer_get_size (buffer), demux->offset, scheme, type);
const MXFUL * key, GstBuffer * buffer)
{
GST_DEBUG_OBJECT (demux,
- "Handling generic container system item of size %u"
+ "Handling generic container system item of size %" G_GSIZE_FORMAT
" at offset %" G_GUINT64_FORMAT, gst_buffer_get_size (buffer),
demux->offset);
pad->current_component_index);
pad->current_component =
- MXF_METADATA_SOURCE_CLIP (sequence->
- structural_components[pad->current_component_index]);
+ MXF_METADATA_SOURCE_CLIP (sequence->structural_components[pad->
+ current_component_index]);
if (pad->current_component == NULL) {
GST_ERROR_OBJECT (demux, "No such structural component");
return GST_FLOW_ERROR;
if (!pad->current_component->source_package
|| !pad->current_component->source_package->top_level
- || !MXF_METADATA_GENERIC_PACKAGE (pad->
- current_component->source_package)->tracks) {
+ || !MXF_METADATA_GENERIC_PACKAGE (pad->current_component->
+ source_package)->tracks) {
GST_ERROR_OBJECT (demux, "Invalid component");
return GST_FLOW_ERROR;
}
gboolean keyframe = TRUE;
GST_DEBUG_OBJECT (demux,
- "Handling generic container essence element of size %u"
+ "Handling generic container essence element of size %" G_GSIZE_FORMAT
" at offset %" G_GUINT64_FORMAT, gst_buffer_get_size (buffer),
demux->offset);
pad->position += GST_BUFFER_DURATION (outbuf);
GST_DEBUG_OBJECT (demux,
- "Pushing buffer of size %u for track %u: timestamp %" GST_TIME_FORMAT
- " duration %" GST_TIME_FORMAT, gst_buffer_get_size (outbuf),
- pad->material_track->parent.track_id,
+ "Pushing buffer of size %" G_GSIZE_FORMAT " for track %u: timestamp %"
+ GST_TIME_FORMAT " duration %" GST_TIME_FORMAT,
+ gst_buffer_get_size (outbuf), pad->material_track->parent.track_id,
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)),
GST_TIME_ARGS (GST_BUFFER_DURATION (outbuf)));
gboolean ret;
GST_DEBUG_OBJECT (demux,
- "Handling random index pack of size %u at offset %"
+ "Handling random index pack of size %" G_GSIZE_FORMAT " at offset %"
G_GUINT64_FORMAT, gst_buffer_get_size (buffer), demux->offset);
if (demux->random_index_pack) {
gboolean ret;
GST_DEBUG_OBJECT (demux,
- "Handling index table segment of size %u at offset %"
+ "Handling index table segment of size %" G_GSIZE_FORMAT " at offset %"
G_GUINT64_FORMAT, gst_buffer_get_size (buffer), demux->offset);
if (!demux->current_partition->primer.mappings) {
if (!mxf_is_mxf_packet (key)) {
GST_WARNING_OBJECT (demux,
- "Skipping non-MXF packet of size %u at offset %"
+ "Skipping non-MXF packet of size %" G_GSIZE_FORMAT " at offset %"
G_GUINT64_FORMAT ", key: %s", gst_buffer_get_size (buffer),
demux->offset, mxf_ul_to_string (key, key_str));
} else if (mxf_is_partition_pack (key)) {
ret = gst_mxf_demux_handle_index_table_segment (demux, key, buffer);
} else if (mxf_is_fill (key)) {
GST_DEBUG_OBJECT (demux,
- "Skipping filler packet of size %u at offset %"
+ "Skipping filler packet of size %" G_GSIZE_FORMAT " at offset %"
G_GUINT64_FORMAT, gst_buffer_get_size (buffer), demux->offset);
} else {
GST_DEBUG_OBJECT (demux,
- "Skipping unknown packet of size %u at offset %"
+ "Skipping unknown packet of size %" G_GSIZE_FORMAT " at offset %"
G_GUINT64_FORMAT ", key: %s", gst_buffer_get_size (buffer),
demux->offset, mxf_ul_to_string (key, key_str));
}
demux = GST_MXF_DEMUX (parent);
- GST_LOG_OBJECT (demux, "received buffer of %u bytes at offset %"
+ GST_LOG_OBJECT (demux,
+ "received buffer of %" G_GSIZE_FORMAT " bytes at offset %"
G_GUINT64_FORMAT, gst_buffer_get_size (inbuf), GST_BUFFER_OFFSET (inbuf));
if (demux->src->len > 0) {
for (i = 0; i < p->material_track->parent.sequence->n_structural_components;
i++) {
clip =
- MXF_METADATA_SOURCE_CLIP (p->material_track->parent.
- sequence->structural_components[i]);
+ MXF_METADATA_SOURCE_CLIP (p->material_track->parent.sequence->
+ structural_components[i]);
if (clip->parent.duration <= 0)
break;
if (format != GST_FORMAT_TIME)
goto wrong_format;
- flush = ! !(flags & GST_SEEK_FLAG_FLUSH);
- keyframe = ! !(flags & GST_SEEK_FLAG_KEY_UNIT);
+ flush = !!(flags & GST_SEEK_FLAG_FLUSH);
+ keyframe = !!(flags & GST_SEEK_FLAG_KEY_UNIT);
/* Work on a copy until we are sure the seek succeeded. */
memcpy (&seeksegment, &demux->segment, sizeof (GstSegment));
if (rate <= 0.0)
goto wrong_rate;
- flush = ! !(flags & GST_SEEK_FLAG_FLUSH);
- keyframe = ! !(flags & GST_SEEK_FLAG_KEY_UNIT);
+ flush = !!(flags & GST_SEEK_FLAG_FLUSH);
+ keyframe = !!(flags & GST_SEEK_FLAG_KEY_UNIT);
if (flush) {
GstEvent *e;
* <refsect2>
* <title>Example launch line</title>
* |[
- * gst-launch -v filesrc location=/path/to/audio ! decodebin2 ! queue ! mxfmux name=m ! filesink location=file.mxf filesrc location=/path/to/video ! decodebin2 ! queue ! m.
+ * gst-launch -v filesrc location=/path/to/audio ! decodebin2 ! queue ! mxfmux name=m ! filesink location=file.mxf filesrc location=/path/to/video ! decodebin2 ! queue ! m.
* ]| This pipeline muxes an audio and video file into a single MXF file.
* </refsect2>
*/
for (i = 0; i < mux->preface->content_storage->n_packages; i++) {
MXFMetadataSourcePackage *package;
- if (!MXF_IS_METADATA_SOURCE_PACKAGE (mux->preface->
- content_storage->packages[i]))
+ if (!MXF_IS_METADATA_SOURCE_PACKAGE (mux->preface->content_storage->
+ packages[i]))
continue;
package =
- MXF_METADATA_SOURCE_PACKAGE (mux->preface->
- content_storage->packages[i]);
+ MXF_METADATA_SOURCE_PACKAGE (mux->preface->content_storage->
+ packages[i]);
if (!package->descriptor)
continue;
if (p->parent.n_tracks == 1) {
p->descriptor = (MXFMetadataGenericDescriptor *) cpad->descriptor;
} else {
- MXF_METADATA_MULTIPLE_DESCRIPTOR (p->
- descriptor)->sub_descriptors[n] =
+ MXF_METADATA_MULTIPLE_DESCRIPTOR (p->descriptor)->
+ sub_descriptors[n] =
(MXFMetadataGenericDescriptor *) cpad->descriptor;
}
g_new0 (MXFMetadataEssenceContainerData *, 1);
cstorage->essence_container_data[0] = (MXFMetadataEssenceContainerData *)
g_object_new (MXF_TYPE_METADATA_ESSENCE_CONTAINER_DATA, NULL);
- mxf_uuid_init (&MXF_METADATA_BASE (cstorage->essence_container_data[0])->
- instance_uid, mux->metadata);
+ mxf_uuid_init (&MXF_METADATA_BASE (cstorage->
+ essence_container_data[0])->instance_uid, mux->metadata);
g_hash_table_insert (mux->metadata,
&MXF_METADATA_BASE (cstorage->essence_container_data[0])->instance_uid,
cstorage->essence_container_data[0]);
if (buf) {
GST_DEBUG_OBJECT (cpad->collect.pad,
- "Handling buffer of size %u for track %u at position %" G_GINT64_FORMAT,
- gst_buffer_get_size (buf), cpad->source_track->parent.track_id,
- cpad->pos);
+ "Handling buffer of size %" G_GSIZE_FORMAT " for track %u at position %"
+ G_GINT64_FORMAT, gst_buffer_get_size (buf),
+ cpad->source_track->parent.track_id, cpad->pos);
} else {
flush = TRUE;
GST_DEBUG_OBJECT (cpad->collect.pad,
gst_buffer_unref (buf);
- GST_DEBUG_OBJECT (cpad->collect.pad, "Pushing buffer of size %u for track %u",
- map.size, cpad->source_track->parent.track_id);
+ GST_DEBUG_OBJECT (cpad->collect.pad,
+ "Pushing buffer of size %" G_GSIZE_FORMAT " for track %u", map.size,
+ cpad->source_track->parent.track_id);
gst_buffer_unmap (packet, &map);
if ((ret = gst_mxf_mux_push (mux, packet)) != GST_FLOW_OK) {
/* Update durations */
cpad->source_track->parent.sequence->duration = cpad->pos;
- MXF_METADATA_SOURCE_CLIP (cpad->source_track->parent.
- sequence->structural_components[0])->parent.duration = cpad->pos;
+ MXF_METADATA_SOURCE_CLIP (cpad->source_track->parent.sequence->
+ structural_components[0])->parent.duration = cpad->pos;
for (i = 0; i < mux->preface->content_storage->packages[0]->n_tracks; i++) {
MXFMetadataTimelineTrack *track;
- if (!MXF_IS_METADATA_TIMELINE_TRACK (mux->preface->
- content_storage->packages[0]->tracks[i])
- || !MXF_IS_METADATA_SOURCE_CLIP (mux->preface->
- content_storage->packages[0]->tracks[i]->sequence->
- structural_components[0]))
+ if (!MXF_IS_METADATA_TIMELINE_TRACK (mux->preface->content_storage->
+ packages[0]->tracks[i])
+ || !MXF_IS_METADATA_SOURCE_CLIP (mux->preface->content_storage->
+ packages[0]->tracks[i]->sequence->structural_components[0]))
continue;
track =
- MXF_METADATA_TIMELINE_TRACK (mux->preface->
- content_storage->packages[0]->tracks[i]);
- if (MXF_METADATA_SOURCE_CLIP (track->parent.
- sequence->structural_components[0])->source_track_id ==
+ MXF_METADATA_TIMELINE_TRACK (mux->preface->content_storage->
+ packages[0]->tracks[i]);
+ if (MXF_METADATA_SOURCE_CLIP (track->parent.sequence->
+ structural_components[0])->source_track_id ==
cpad->source_track->parent.track_id) {
track->parent.sequence->structural_components[0]->duration = cpad->pos;
track->parent.sequence->duration = cpad->pos;
/* Update timecode track duration */
{
MXFMetadataTimelineTrack *track =
- MXF_METADATA_TIMELINE_TRACK (mux->preface->
- content_storage->packages[0]->tracks[0]);
+ MXF_METADATA_TIMELINE_TRACK (mux->preface->content_storage->
+ packages[0]->tracks[0]);
MXFMetadataSequence *sequence = track->parent.sequence;
MXFMetadataTimecodeComponent *component =
MXF_METADATA_TIMECODE_COMPONENT (sequence->structural_components[0]);