From: Jan Schmidt Date: Thu, 1 Apr 2004 11:48:27 +0000 (+0000) Subject: [MOVED FROM BAD] a52dec: Use a debug category, Output timestamps correctly X-Git-Tag: RELEASE-0.10.15~29 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=caac59573c8abd04595881b1397463ae1f0020d9;p=platform%2Fupstream%2Fgst-plugins-good.git [MOVED FROM BAD] a52dec: Use a debug category, Output timestamps correctly Original commit message from CVS: a52dec: Use a debug category, Output timestamps correctly Emit tag info, Handle events, tell liba52dec about cpu capabilities so it can use MMX etc. dvdec: Fix a crasher accessing invalid memory dvdnavsrc:Some support for byte-format seeking. Small fixes for still frames and menu button overlays mpeg2dec: Use a debug category. Adjust the report level of several items to LOG. Call mpeg2_custom_fbuf to mark our buffers as 'custom buffers' so it doesn't lose the GstBuffer pointer navseek: Add the navseek debug element for seeking back and forth in a video stream using arrow keys. mpeg2subt:Pretty much a complete rewrite. Now a loopbased element. May still require work to properly synchronise subtitle buffers. mpegdemux: dvddemux: Don't attempt to create subbuffers of size 0 Reduce a couple of error outputs to warnings. y4mencode:Output the y4m frame header correctly --- diff --git a/gst/y4m/gsty4mencode.c b/gst/y4m/gsty4mencode.c index 773f96b..25e1f94 100644 --- a/gst/y4m/gsty4mencode.c +++ b/gst/y4m/gsty4mencode.c @@ -148,21 +148,19 @@ gst_y4mencode_sinkconnect (GstPad * pad, const GstCaps * caps) structure = gst_caps_get_structure (caps, 0); - gst_structure_get_int (structure, "width", &filter->width); - gst_structure_get_int (structure, "height", &filter->height); - gst_structure_get_double (structure, "framerate", &fps); + if (!gst_structure_get_int (structure, "width", &filter->width) || + !gst_structure_get_int (structure, "height", &filter->height) || + !gst_structure_get_double (structure, "framerate", &fps)) + return GST_PAD_LINK_REFUSED; /* find fps idx */ + idx = 0; for (i = 1; i < 9; i++) { - if (idx == -1) { - idx = i; - } else { - gdouble old_diff = fabs (framerates[idx] - fps), - new_diff = fabs (framerates[i] - fps); + gdouble old_diff = fabs (framerates[idx] - fps), + new_diff = fabs (framerates[i] - fps); - if (new_diff < old_diff) { - idx = i; - } + if (new_diff < old_diff) { + idx = i; } } filter->fps_idx = idx; @@ -209,7 +207,7 @@ gst_y4mencode_chain (GstPad * pad, GstData * _data) GST_BUFFER_DATA (outbuf) = g_malloc (GST_BUFFER_SIZE (buf) + 256); if (filter->init) { - header = "YUV4MPEG %d %d %d\nFRAME\n"; + header = "YUV4MPEG W%d H%d I? %d\nFRAME\n"; filter->init = FALSE; } else { header = "FRAME\n";