aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarinarayan Bhatta2014-09-08 06:34:10 -0500
committerHarinarayan Bhatta2014-09-08 06:34:10 -0500
commit6ca21aa3ec8b88b051013af503ef6b702d3c5477 (patch)
tree44fa00757d238626dc89d05f15e1a97de40d143e
parentcc0acccadc5a606a39dffd87520b6d87d62f6c22 (diff)
downloadgst-plugin-ducati-gst-0.10.tar.gz
gst-plugin-ducati-gst-0.10.tar.xz
gst-plugin-ducati-gst-0.10.zip
mpeg4dec: Workaround: Artifacts when frame-drop logic is activatedgst-0.10
mpeg4videoparse element does not correctly mark key frames vs non key frames for frame drop logic in gst-ducati to work. As a workaround, frame drops are disabled for mpeg4. Signed-off-by: Harinarayan Bhatta <harinarayan@ti.com>
-rw-r--r--src/gstducatimpeg4dec.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gstducatimpeg4dec.c b/src/gstducatimpeg4dec.c
index 212a4b8..8d38378 100644
--- a/src/gstducatimpeg4dec.c
+++ b/src/gstducatimpeg4dec.c
@@ -63,6 +63,19 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
63 63
64/* GstDucatiVidDec vmethod implementations */ 64/* GstDucatiVidDec vmethod implementations */
65 65
66static gboolean
67gst_ducati_mpeg4dec_can_drop_frame (GstDucatiVidDec * self, GstBuffer * buf,
68 gint64 diff)
69{
70 /* The mpeg4 video parser element (mpeg4videoparse) does not do a correct job
71 in identifying key-frames for some interlaced streams.
72 This produces undesirable artifacts when frames are dropped due to QOS.
73 This workaround asks the base class to not drop (avoid decoding) any mpeg4
74 frames based on buffer flags.
75 TODO: Implement a parser to check if a frame is skippable or not
76 */
77 return FALSE;
78}
66static void 79static void
67gst_ducati_mpeg4dec_update_buffer_size (GstDucatiVidDec * self) 80gst_ducati_mpeg4dec_update_buffer_size (GstDucatiVidDec * self)
68{ 81{
@@ -352,6 +365,8 @@ gst_ducati_mpeg4dec_class_init (GstDucatiMpeg4DecClass * klass)
352 bclass->allocate_params = 365 bclass->allocate_params =
353 GST_DEBUG_FUNCPTR (gst_ducati_mpeg4dec_allocate_params); 366 GST_DEBUG_FUNCPTR (gst_ducati_mpeg4dec_allocate_params);
354 bclass->push_input = GST_DEBUG_FUNCPTR (gst_ducati_mpeg4dec_push_input); 367 bclass->push_input = GST_DEBUG_FUNCPTR (gst_ducati_mpeg4dec_push_input);
368 bclass->can_drop_frame =
369 GST_DEBUG_FUNCPTR (gst_ducati_mpeg4dec_can_drop_frame);
355} 370}
356 371
357static void 372static void