mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
collectpads: remove gst_collect_pads_add_pad_full
Rename gst_collect_pads_add_pad_full() to gst_collect_pads_add_pad() and fix all invocations.
This commit is contained in:
parent
f207edfc44
commit
27cd08ad95
7 changed files with 32 additions and 31 deletions
|
@ -2288,7 +2288,7 @@ gst_asf_mux_request_new_pad (GstElement * element,
|
|||
collect_size = sizeof (GstAsfVideoPad);
|
||||
}
|
||||
collect_pad = (GstAsfPad *)
|
||||
gst_collect_pads_add_pad_full (asfmux->collect, newpad, collect_size,
|
||||
gst_collect_pads_add_pad (asfmux->collect, newpad, collect_size,
|
||||
(GstCollectDataDestroyNotify) (gst_asf_mux_pad_reset), TRUE);
|
||||
|
||||
/* set up pad */
|
||||
|
|
|
@ -198,9 +198,9 @@ gst_compare_init (GstCompare * comp)
|
|||
gst_pad_set_query_function (comp->checkpad, gst_compare_query);
|
||||
gst_element_add_pad (GST_ELEMENT (comp), comp->checkpad);
|
||||
|
||||
gst_collect_pads_add_pad_full (comp->cpads, comp->sinkpad,
|
||||
gst_collect_pads_add_pad (comp->cpads, comp->sinkpad,
|
||||
sizeof (GstCollectData), NULL, TRUE);
|
||||
gst_collect_pads_add_pad_full (comp->cpads, comp->checkpad,
|
||||
gst_collect_pads_add_pad (comp->cpads, comp->checkpad,
|
||||
sizeof (GstCollectData), NULL, TRUE);
|
||||
|
||||
comp->srcpad = gst_pad_new_from_static_template (&src_factory, "src");
|
||||
|
|
|
@ -735,7 +735,7 @@ gst_frei0r_mixer_init (GstFrei0rMixer * self, GstFrei0rMixerClass * klass)
|
|||
gst_pad_set_query_function (self->sink0,
|
||||
GST_DEBUG_FUNCPTR (gst_frei0r_mixer_sink_query));
|
||||
gst_collect_pads_add_pad (self->collect, self->sink0,
|
||||
sizeof (GstCollectData));
|
||||
sizeof (GstCollectData), NULL, TRUE);
|
||||
self->collect_event = (GstPadEventFunction) GST_PAD_EVENTFUNC (self->sink0);
|
||||
gst_pad_set_event_function (self->sink0,
|
||||
GST_DEBUG_FUNCPTR (gst_frei0r_mixer_sink0_event));
|
||||
|
@ -751,7 +751,7 @@ gst_frei0r_mixer_init (GstFrei0rMixer * self, GstFrei0rMixerClass * klass)
|
|||
gst_pad_set_query_function (self->sink0,
|
||||
GST_DEBUG_FUNCPTR (gst_frei0r_mixer_sink_query));
|
||||
gst_collect_pads_add_pad (self->collect, self->sink1,
|
||||
sizeof (GstCollectData));
|
||||
sizeof (GstCollectData), NULL, TRUE);
|
||||
gst_element_add_pad (GST_ELEMENT_CAST (self), self->sink1);
|
||||
|
||||
if (klass->info->plugin_type == F0R_PLUGIN_TYPE_MIXER3) {
|
||||
|
@ -765,7 +765,7 @@ gst_frei0r_mixer_init (GstFrei0rMixer * self, GstFrei0rMixerClass * klass)
|
|||
gst_pad_set_query_function (self->sink0,
|
||||
GST_DEBUG_FUNCPTR (gst_frei0r_mixer_sink_query));
|
||||
gst_collect_pads_add_pad (self->collect, self->sink2,
|
||||
sizeof (GstCollectData));
|
||||
sizeof (GstCollectData), NULL, TRUE);
|
||||
gst_element_add_pad (GST_ELEMENT_CAST (self), self->sink2);
|
||||
}
|
||||
|
||||
|
|
|
@ -598,7 +598,7 @@ mpegpsmux_request_new_pad (GstElement * element,
|
|||
pad = gst_pad_new_from_template (templ, name);
|
||||
|
||||
pad_data = (MpegPsPadData *) gst_collect_pads_add_pad (mux->collect, pad,
|
||||
sizeof (MpegPsPadData));
|
||||
sizeof (MpegPsPadData), NULL, TRUE);
|
||||
if (pad_data == NULL)
|
||||
goto pad_failure;
|
||||
|
||||
|
|
|
@ -1218,7 +1218,7 @@ mpegtsmux_request_new_pad (GstElement * element, GstPadTemplate * templ,
|
|||
g_free (pad_name);
|
||||
|
||||
pad_data = (MpegTsPadData *)
|
||||
gst_collect_pads_add_pad_full (mux->collect, pad, sizeof (MpegTsPadData),
|
||||
gst_collect_pads_add_pad (mux->collect, pad, sizeof (MpegTsPadData),
|
||||
(GstCollectDataDestroyNotify) (mpegtsmux_pad_reset), TRUE);
|
||||
if (pad_data == NULL)
|
||||
goto pad_failure;
|
||||
|
|
|
@ -338,13 +338,13 @@ gst_mxf_mux_setcaps (GstPad * pad, GstCaps * caps)
|
|||
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;
|
||||
|
@ -420,7 +420,8 @@ gst_mxf_mux_request_new_pad (GstElement * element,
|
|||
pad = gst_pad_new_from_template (templ, name);
|
||||
g_free (name);
|
||||
cpad = (GstMXFMuxPad *)
|
||||
gst_collect_pads_add_pad (mux->collect, pad, sizeof (GstMXFMuxPad));
|
||||
gst_collect_pads_add_pad (mux->collect, pad, sizeof (GstMXFMuxPad), NULL,
|
||||
TRUE);
|
||||
cpad->last_timestamp = 0;
|
||||
cpad->adapter = gst_adapter_new ();
|
||||
cpad->writer = writer;
|
||||
|
@ -706,8 +707,8 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux)
|
|||
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;
|
||||
}
|
||||
|
||||
|
@ -929,8 +930,8 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux)
|
|||
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]);
|
||||
|
@ -1246,23 +1247,22 @@ gst_mxf_mux_handle_eos (GstMXFMux * mux)
|
|||
|
||||
/* 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;
|
||||
|
@ -1273,8 +1273,8 @@ gst_mxf_mux_handle_eos (GstMXFMux * mux)
|
|||
/* 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]);
|
||||
|
|
|
@ -1158,7 +1158,8 @@ gst_ssim_request_new_pad (GstElement * element, GstPadTemplate * templ,
|
|||
gst_pad_set_getcaps_function (newpad,
|
||||
GST_DEBUG_FUNCPTR (gst_ssim_sink_getcaps));
|
||||
gst_pad_set_setcaps_function (newpad, GST_DEBUG_FUNCPTR (gst_ssim_setcaps));
|
||||
gst_collect_pads_add_pad (ssim->collect, newpad, sizeof (GstCollectData));
|
||||
gst_collect_pads_add_pad (ssim->collect, newpad, sizeof (GstCollectData),
|
||||
NULL, TRUE);
|
||||
|
||||
/* FIXME: hacked way to override/extend the event function of
|
||||
* GstCollectPads; because it sets its own event function giving the
|
||||
|
|
Loading…
Reference in a new issue