diff options
author | brijesh.singh <brijesh.singh@24075187-2e39-4e88-bbb8-bc8aa768f540> | 2011-03-12 17:00:20 +0000 |
---|---|---|
committer | brijesh.singh <brijesh.singh@24075187-2e39-4e88-bbb8-bc8aa768f540> | 2011-03-12 17:00:20 +0000 |
commit | 9a4dae797bb9fcdfa8473a50968e6d30889857e1 (patch) | |
tree | 4c4a8c8fc52d32a6af6a9175decc26817024f760 | |
parent | 84629a0e2033baf67b87e95dc52e210c3245cb77 (diff) |
adding dmaiperf in decode pipeline either corrupts video or fails to init sink. Below pipeline does not work :
... ! TIViddec2 ! dmaiperf ! TIDmaiVideoSink ....
root cause: dmaivideosink supports peer buffer and since dmaiperf is based on transform class it sends peer alloc request to downstream
and as expected dmaivideosink responds to its event but if padAlloc is not enabled on TIViddec2 then sink will not able to share the buffer
between TIViddec2 and TIDmaiVideoSink.
soln: like other tranform elements (e.g identity, tividderesizer) implement prepare_output_buffer function.
git-svn-id: https://gstreamer.ti.com/svn/gstreamer_ti/trunk@918 24075187-2e39-4e88-bbb8-bc8aa768f540
-rw-r--r-- | gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaiperf.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaiperf.c b/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaiperf.c index 4303f09..bf72a17 100644 --- a/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaiperf.c +++ b/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaiperf.c @@ -195,6 +195,14 @@ gst_dmaiperf_base_init (gpointer gclass) gst_element_class_set_details (element_class, &element_details); } +static GstFlowReturn +gst_dmaiperf_prepare_output_buffer (GstBaseTransform * trans, + GstBuffer * in_buf, gint out_size, GstCaps * out_caps, GstBuffer ** out_buf) +{ + *out_buf = gst_buffer_ref (in_buf); + return GST_FLOW_OK; +} + /****************************************************************************** * gst_dmaiperf_class_init * Initializes the Dmaiperf class. @@ -213,6 +221,7 @@ gst_dmaiperf_class_init (GstDmaiperfClass * klass) trans_class = (GstBaseTransformClass *) klass; trans_class->transform_ip = GST_DEBUG_FUNCPTR (gst_dmaiperf_transform_ip); + trans_class->prepare_output_buffer = GST_DEBUG_FUNCPTR (gst_dmaiperf_prepare_output_buffer); trans_class->start = GST_DEBUG_FUNCPTR (gst_dmaiperf_start); trans_class->stop = GST_DEBUG_FUNCPTR (gst_dmaiperf_stop); @@ -228,6 +237,7 @@ gst_dmaiperf_class_init (GstDmaiperfClass * klass) g_param_spec_boolean ("print-arm-load", "print-arm-load", "Print the CPU load info", FALSE, G_PARAM_WRITABLE)); + GST_LOG ("initialized class init\n"); } |