mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
gst/matroska/matroska-mux.c: Use GST_DEBUG_FUNCPTR; activate request pad before returning it.
Original commit message from CVS: * gst/matroska/matroska-mux.c: (gst_matroska_mux_class_init), (gst_matroska_mux_request_new_pad): Use GST_DEBUG_FUNCPTR; activate request pad before returning it. * tests/check/elements/matroskamux.c: (setup_src_pad), (setup_sink_pad), (GST_START_TEST): Activate pads before using them.
This commit is contained in:
parent
6b16453ab4
commit
f441440a43
3 changed files with 22 additions and 5 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
2006-11-16 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
|
* gst/matroska/matroska-mux.c: (gst_matroska_mux_class_init),
|
||||||
|
(gst_matroska_mux_request_new_pad):
|
||||||
|
Use GST_DEBUG_FUNCPTR; activate request pad before returning it.
|
||||||
|
|
||||||
|
* tests/check/elements/matroskamux.c: (setup_src_pad),
|
||||||
|
(setup_sink_pad), (GST_START_TEST):
|
||||||
|
Activate pads before using them.
|
||||||
|
|
||||||
2006-11-16 Tim-Philipp Müller <tim at centricular dot net>
|
2006-11-16 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
* gst/avi/gstavidemux.c: (gst_avi_demux_stream_scan):
|
* gst/avi/gstavidemux.c: (gst_avi_demux_stream_scan):
|
||||||
|
|
|
@ -218,9 +218,12 @@ gst_matroska_mux_class_init (GstMatroskaMuxClass * klass)
|
||||||
"This parameter determines what matroska features can be used.",
|
"This parameter determines what matroska features can be used.",
|
||||||
1, 2, 1, G_PARAM_READWRITE));
|
1, 2, 1, G_PARAM_READWRITE));
|
||||||
|
|
||||||
gstelement_class->change_state = gst_matroska_mux_change_state;
|
gstelement_class->change_state =
|
||||||
gstelement_class->request_new_pad = gst_matroska_mux_request_new_pad;
|
GST_DEBUG_FUNCPTR (gst_matroska_mux_change_state);
|
||||||
gstelement_class->release_pad = gst_matroska_mux_release_pad;
|
gstelement_class->request_new_pad =
|
||||||
|
GST_DEBUG_FUNCPTR (gst_matroska_mux_request_new_pad);
|
||||||
|
gstelement_class->release_pad =
|
||||||
|
GST_DEBUG_FUNCPTR (gst_matroska_mux_release_pad);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1128,6 +1131,7 @@ gst_matroska_mux_request_new_pad (GstElement * element,
|
||||||
GST_DEBUG_FUNCPTR (gst_matroska_mux_handle_sink_event));
|
GST_DEBUG_FUNCPTR (gst_matroska_mux_handle_sink_event));
|
||||||
|
|
||||||
gst_pad_set_setcaps_function (newpad, setcapsfunc);
|
gst_pad_set_setcaps_function (newpad, setcapsfunc);
|
||||||
|
gst_pad_set_active (newpad, TRUE);
|
||||||
gst_element_add_pad (element, newpad);
|
gst_element_add_pad (element, newpad);
|
||||||
|
|
||||||
return newpad;
|
return newpad;
|
||||||
|
|
|
@ -65,6 +65,7 @@ setup_src_pad (GstElement * element,
|
||||||
srcpad = gst_pad_new_from_static_template (template, "src");
|
srcpad = gst_pad_new_from_static_template (template, "src");
|
||||||
fail_if (srcpad == NULL, "Could not create a srcpad");
|
fail_if (srcpad == NULL, "Could not create a srcpad");
|
||||||
ASSERT_OBJECT_REFCOUNT (srcpad, "srcpad", 1);
|
ASSERT_OBJECT_REFCOUNT (srcpad, "srcpad", 1);
|
||||||
|
gst_pad_set_active (srcpad, TRUE);
|
||||||
|
|
||||||
sinkpad = gst_element_get_pad (element, "audio_%d");
|
sinkpad = gst_element_get_pad (element, "audio_%d");
|
||||||
fail_if (sinkpad == NULL, "Could not get sink pad from %s",
|
fail_if (sinkpad == NULL, "Could not get sink pad from %s",
|
||||||
|
@ -117,6 +118,7 @@ setup_sink_pad (GstElement * element, GstStaticPadTemplate * template,
|
||||||
sinkpad = gst_pad_new_from_static_template (template, "sink");
|
sinkpad = gst_pad_new_from_static_template (template, "sink");
|
||||||
|
|
||||||
fail_if (sinkpad == NULL, "Could not create a sinkpad");
|
fail_if (sinkpad == NULL, "Could not create a sinkpad");
|
||||||
|
gst_pad_set_active (sinkpad, TRUE);
|
||||||
|
|
||||||
srcpad = gst_element_get_pad (element, "src");
|
srcpad = gst_element_get_pad (element, "src");
|
||||||
fail_if (srcpad == NULL, "Could not get source pad from %s",
|
fail_if (srcpad == NULL, "Could not get source pad from %s",
|
||||||
|
@ -213,7 +215,8 @@ GST_START_TEST (test_ebml_header)
|
||||||
ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
|
ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
|
||||||
fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
|
fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
|
||||||
num_buffers = g_list_length (buffers);
|
num_buffers = g_list_length (buffers);
|
||||||
fail_unless (num_buffers >= 5);
|
fail_unless (num_buffers >= 5,
|
||||||
|
"expected at least 5 buffers, but got only %d", num_buffers);
|
||||||
|
|
||||||
for (i = 0; i < num_buffers; ++i) {
|
for (i = 0; i < num_buffers; ++i) {
|
||||||
outbuffer = GST_BUFFER (buffers->data);
|
outbuffer = GST_BUFFER (buffers->data);
|
||||||
|
@ -331,7 +334,7 @@ GST_START_TEST (test_block_group)
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
|
ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
|
||||||
|
|
||||||
fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
|
fail_unless_equals_int (gst_pad_push (mysrcpad, inbuffer), GST_FLOW_OK);
|
||||||
num_buffers = g_list_length (buffers);
|
num_buffers = g_list_length (buffers);
|
||||||
|
|
||||||
for (i = 0; i < num_buffers; ++i) {
|
for (i = 0; i < num_buffers; ++i) {
|
||||||
|
|
Loading…
Reference in a new issue