summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2003-02-25 21:34:10 +0000
committerWim Taymans <wim.taymans@gmail.com>2003-02-25 21:34:10 +0000
commit7912d9becd1893d132f6f69af4875c726c40dc63 (patch)
tree9ca6203b043d0371005d77626fac06e66288ee20 /gst
parent2980087e6a4fe5264136de6d033f8bb729d20a85 (diff)
downloadgst-plugins-bad-7912d9becd1893d132f6f69af4875c726c40dc63.tar.gz
gst-plugins-bad-7912d9becd1893d132f6f69af4875c726c40dc63.tar.bz2
gst-plugins-bad-7912d9becd1893d132f6f69af4875c726c40dc63.zip
Forward events.
Original commit message from CVS: Forward events.
Diffstat (limited to 'gst')
-rw-r--r--gst/smpte/gstsmpte.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/gst/smpte/gstsmpte.c b/gst/smpte/gstsmpte.c
index c28f16a6..3a7d2f4e 100644
--- a/gst/smpte/gstsmpte.c
+++ b/gst/smpte/gstsmpte.c
@@ -318,20 +318,30 @@ gst_smpte_loop (GstElement *element)
ts = smpte->position * GST_SECOND / smpte->fps;
- if (GST_PAD_IS_USABLE (smpte->sinkpad1)) {
+ while (GST_PAD_IS_USABLE (smpte->sinkpad1) && in1 == NULL) {
in1 = gst_pad_pull (smpte->sinkpad1);
- ts = GST_BUFFER_TIMESTAMP (in1);
+ if (GST_IS_EVENT (in1)) {
+ gst_pad_push (smpte->srcpad, in1);
+ in1 = NULL;
+ }
+ else
+ ts = GST_BUFFER_TIMESTAMP (in1);
}
- else {
+ if (GST_PAD_IS_USABLE (smpte->sinkpad2) && in2 == NULL) {
+ in2 = gst_pad_pull (smpte->sinkpad2);
+ if (GST_IS_EVENT (in2)) {
+ gst_pad_push (smpte->srcpad, in2);
+ in2 = NULL;
+ }
+ else
+ ts = GST_BUFFER_TIMESTAMP (in2);
+ }
+
+ if (in1 == NULL) {
in1 = gst_buffer_new_and_alloc (smpte->width * smpte->height * 3);
fill_i420 (GST_BUFFER_DATA (in1), smpte->width, smpte->height, 7);
}
-
- if (GST_PAD_IS_USABLE (smpte->sinkpad2)) {
- in2 = gst_pad_pull (smpte->sinkpad2);
- ts = GST_BUFFER_TIMESTAMP (in2);
- }
- else {
+ if (in2 == NULL) {
in2 = gst_buffer_new_and_alloc (smpte->width * smpte->height * 3);
fill_i420 (GST_BUFFER_DATA (in2), smpte->width, smpte->height, 0);
}