mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
gst/switch/gstswitch.c: whoever that was: DO NOT IMPORT PRIVATE SYMBOLS THAT ARE NOT IN
Original commit message from CVS: * gst/switch/gstswitch.c: (gst_switch_release_pad), (gst_switch_request_new_pad), (gst_switch_poll_sinkpads), (gst_switch_loop), (gst_switch_get_type): whoever that was: DO NOT IMPORT PRIVATE SYMBOLS THAT ARE NOT IN HEADERS. Had to be said.
This commit is contained in:
parent
08499d6af3
commit
97a4cb6bb8
2 changed files with 20 additions and 14 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2004-05-11 Benjamin Otte <in7y118@public.uni-hamburg.de>
|
||||||
|
|
||||||
|
* gst/switch/gstswitch.c: (gst_switch_release_pad),
|
||||||
|
(gst_switch_request_new_pad), (gst_switch_poll_sinkpads),
|
||||||
|
(gst_switch_loop), (gst_switch_get_type):
|
||||||
|
whoever that was: DO NOT IMPORT PRIVATE SYMBOLS THAT ARE NOT IN
|
||||||
|
HEADERS. Had to be said.
|
||||||
|
|
||||||
2004-05-10 David Schleef <ds@schleef.org>
|
2004-05-10 David Schleef <ds@schleef.org>
|
||||||
|
|
||||||
* configure.ac: Add prototype Dirac support.
|
* configure.ac: Add prototype Dirac support.
|
||||||
|
|
|
@ -31,8 +31,7 @@ enum
|
||||||
ARG_ACTIVE_SOURCE
|
ARG_ACTIVE_SOURCE
|
||||||
};
|
};
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_EXTERN (GST_CAT_ELEMENT_PADS);
|
GST_DEBUG_CATEGORY_STATIC (switch_debug);
|
||||||
GST_DEBUG_CATEGORY_EXTERN (GST_CAT_DATAFLOW);
|
|
||||||
|
|
||||||
/* ElementFactory information */
|
/* ElementFactory information */
|
||||||
static GstElementDetails gst_switch_details = GST_ELEMENT_DETAILS ("Switch",
|
static GstElementDetails gst_switch_details = GST_ELEMENT_DETAILS ("Switch",
|
||||||
|
@ -65,8 +64,7 @@ gst_switch_release_pad (GstElement * element, GstPad * pad)
|
||||||
|
|
||||||
gstswitch = GST_SWITCH (element);
|
gstswitch = GST_SWITCH (element);
|
||||||
|
|
||||||
GST_CAT_LOG_OBJECT (GST_CAT_ELEMENT_PADS, gstswitch,
|
GST_LOG_OBJECT (gstswitch, "releasing requested pad %p", pad);
|
||||||
"releasing requested pad %p", pad);
|
|
||||||
|
|
||||||
sinkpads = gstswitch->sinkpads;
|
sinkpads = gstswitch->sinkpads;
|
||||||
|
|
||||||
|
@ -114,8 +112,7 @@ gst_switch_request_new_pad (GstElement * element,
|
||||||
|
|
||||||
/* We only provide requested sink pads */
|
/* We only provide requested sink pads */
|
||||||
if (templ->direction != GST_PAD_SINK) {
|
if (templ->direction != GST_PAD_SINK) {
|
||||||
GST_CAT_LOG_OBJECT (GST_CAT_ELEMENT_PADS, gstswitch,
|
GST_LOG_OBJECT (gstswitch, "requested a non sink pad");
|
||||||
"requested a non sink pad");
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -170,8 +167,7 @@ gst_switch_poll_sinkpads (GstSwitch * gstswitch)
|
||||||
/* We only pull from usable pads and non EOS pads */
|
/* We only pull from usable pads and non EOS pads */
|
||||||
if (GST_PAD_IS_USABLE (switchpad->sinkpad) && !switchpad->eos) {
|
if (GST_PAD_IS_USABLE (switchpad->sinkpad) && !switchpad->eos) {
|
||||||
|
|
||||||
GST_CAT_LOG_OBJECT (GST_CAT_DATAFLOW, gstswitch,
|
GST_LOG_OBJECT (gstswitch, "polling pad %p", switchpad->sinkpad);
|
||||||
"polling pad %p", switchpad->sinkpad);
|
|
||||||
|
|
||||||
/* We loose the reference to the data we stored */
|
/* We loose the reference to the data we stored */
|
||||||
if (switchpad->data) {
|
if (switchpad->data) {
|
||||||
|
@ -187,7 +183,7 @@ gst_switch_poll_sinkpads (GstSwitch * gstswitch)
|
||||||
switchpad->data = gst_pad_pull (switchpad->sinkpad);
|
switchpad->data = gst_pad_pull (switchpad->sinkpad);
|
||||||
|
|
||||||
if (!switchpad->data) {
|
if (!switchpad->data) {
|
||||||
GST_CAT_LOG_OBJECT (GST_CAT_DATAFLOW, gstswitch,
|
GST_LOG_OBJECT (gstswitch,
|
||||||
"received NULL data from pad %p", switchpad->sinkpad);
|
"received NULL data from pad %p", switchpad->sinkpad);
|
||||||
} else {
|
} else {
|
||||||
gst_data_ref (switchpad->data);
|
gst_data_ref (switchpad->data);
|
||||||
|
@ -197,13 +193,13 @@ gst_switch_poll_sinkpads (GstSwitch * gstswitch)
|
||||||
means we won't try to pull more data from that pad */
|
means we won't try to pull more data from that pad */
|
||||||
if (GST_IS_EVENT (switchpad->data) &&
|
if (GST_IS_EVENT (switchpad->data) &&
|
||||||
(GST_EVENT_TYPE (GST_EVENT (switchpad->data)) == GST_EVENT_EOS)) {
|
(GST_EVENT_TYPE (GST_EVENT (switchpad->data)) == GST_EVENT_EOS)) {
|
||||||
GST_CAT_LOG_OBJECT (GST_CAT_DATAFLOW, gstswitch,
|
GST_LOG_OBJECT (gstswitch,
|
||||||
"received EOS event on pad %p", switchpad->sinkpad);
|
"received EOS event on pad %p", switchpad->sinkpad);
|
||||||
switchpad->eos = TRUE;
|
switchpad->eos = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
GST_CAT_LOG_OBJECT (GST_CAT_DATAFLOW, gstswitch,
|
GST_LOG_OBJECT (gstswitch,
|
||||||
"not pulling from pad %s (eos is %d)",
|
"not pulling from pad %s (eos is %d)",
|
||||||
gst_pad_get_name (switchpad->sinkpad), switchpad->eos);
|
gst_pad_get_name (switchpad->sinkpad), switchpad->eos);
|
||||||
}
|
}
|
||||||
|
@ -237,19 +233,19 @@ gst_switch_loop (GstElement * element)
|
||||||
gst_data_unref (switchpad->data);
|
gst_data_unref (switchpad->data);
|
||||||
switchpad->data = NULL;
|
switchpad->data = NULL;
|
||||||
|
|
||||||
GST_CAT_LOG_OBJECT (GST_CAT_DATAFLOW, gstswitch,
|
GST_LOG_OBJECT (gstswitch,
|
||||||
"using data from active pad %p", switchpad->sinkpad);
|
"using data from active pad %p", switchpad->sinkpad);
|
||||||
|
|
||||||
if (GST_IS_EVENT (data)) {
|
if (GST_IS_EVENT (data)) {
|
||||||
GstEvent *event = GST_EVENT (data);
|
GstEvent *event = GST_EVENT (data);
|
||||||
|
|
||||||
GST_CAT_LOG_OBJECT (GST_CAT_DATAFLOW, gstswitch,
|
GST_LOG_OBJECT (gstswitch,
|
||||||
"handling event from active pad %p", switchpad->sinkpad);
|
"handling event from active pad %p", switchpad->sinkpad);
|
||||||
/* Handling event */
|
/* Handling event */
|
||||||
gst_pad_event_default (switchpad->sinkpad, event);
|
gst_pad_event_default (switchpad->sinkpad, event);
|
||||||
} else {
|
} else {
|
||||||
/* Pushing active sinkpad data to srcpad */
|
/* Pushing active sinkpad data to srcpad */
|
||||||
GST_CAT_LOG_OBJECT (GST_CAT_DATAFLOW, gstswitch,
|
GST_LOG_OBJECT (gstswitch,
|
||||||
"pushing data from active pad %p to %p",
|
"pushing data from active pad %p to %p",
|
||||||
switchpad->sinkpad, gstswitch->srcpad);
|
switchpad->sinkpad, gstswitch->srcpad);
|
||||||
gst_pad_push (gstswitch->srcpad, data);
|
gst_pad_push (gstswitch->srcpad, data);
|
||||||
|
@ -481,6 +477,8 @@ gst_switch_get_type (void)
|
||||||
|
|
||||||
switch_type = g_type_register_static (GST_TYPE_ELEMENT,
|
switch_type = g_type_register_static (GST_TYPE_ELEMENT,
|
||||||
"GstSwitch", &switch_info, 0);
|
"GstSwitch", &switch_info, 0);
|
||||||
|
|
||||||
|
GST_DEBUG_CATEGORY_INIT (switch_debug, "switch", 0, "the switch element");
|
||||||
}
|
}
|
||||||
|
|
||||||
return switch_type;
|
return switch_type;
|
||||||
|
|
Loading…
Reference in a new issue