summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6a9a122)
raw | patch | inline | side by side (parent: 6a9a122)
author | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | |
Mon, 15 Oct 2012 11:53:36 +0000 (12:53 +0100) | ||
committer | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | |
Mon, 15 Oct 2012 11:53:36 +0000 (12:53 +0100) |
src/gstducatimpeg2dec.c | patch | blob | history |
index f8ae4d68583ab3d6f2e28619f5a16fa1fc049bc7..faf367a0018b60a34e82e716f05066f9d4e717f3 100644 (file)
--- a/src/gstducatimpeg2dec.c
+++ b/src/gstducatimpeg2dec.c
sizeof (IVIDDEC3_OutArgs));
if (ret)
- self->params->displayDelay = IVIDDEC3_DISPLAY_DELAY_1;
+ self->params->displayDelay = IVIDDEC3_DECODE_ORDER;
return ret;
}
return NULL;
}
+static gboolean
+gst_ducati_mpeg2dec_set_sink_caps (GstDucatiVidDec * self, GstCaps * caps)
+{
+ GstStructure *structure;
+ const gchar *profile;
+
+ GST_DEBUG_OBJECT (self, "set_sink_caps: %" GST_PTR_FORMAT, caps);
+
+ if (!GST_CALL_PARENT_WITH_DEFAULT (GST_DUCATIVIDDEC_CLASS, set_sink_caps,
+ (self, caps), TRUE))
+ return FALSE;
+
+ /* Simple profile does not have B frames */
+ structure = gst_caps_get_structure (caps, 0);
+ profile = gst_structure_get_string (structure, "profile");
+ if (!profile || strcmp (profile, "simple")) {
+ /* TODO: can a better bound be found from stream headers ? */
+ self->backlog_maxframes = MAX_BACKLOG_FRAMES;
+ }
+
+ return TRUE;
+}
+
+static GstFlowReturn
+gst_ducati_mpeg2dec_push_output (GstDucatiVidDec * self, GstBuffer * buf)
+{
+ GST_BUFFER_OFFSET_END (buf) = GST_BUFFER_TIMESTAMP (buf);
+ return parent_class->push_output (self, buf);
+}
+
/* GObject vmethod implementations */
static void
GST_DEBUG_FUNCPTR (gst_ducati_mpeg2dec_update_buffer_size);
bclass->allocate_params =
GST_DEBUG_FUNCPTR (gst_ducati_mpeg2dec_allocate_params);
- bclass->push_input =
- GST_DEBUG_FUNCPTR (gst_ducati_mpeg2dec_push_input);
+ bclass->push_input = GST_DEBUG_FUNCPTR (gst_ducati_mpeg2dec_push_input);
+ bclass->set_sink_caps = GST_DEBUG_FUNCPTR (gst_ducati_mpeg2dec_set_sink_caps);
+ bclass->push_output = GST_DEBUG_FUNCPTR (gst_ducati_mpeg2dec_push_output);
}
static void