[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
This commit is contained in:
Jan Schmidt 2004-04-01 11:48:27 +00:00 committed by Jan Schmidt
parent 1beae4829c
commit caac59573c

View file

@ -148,21 +148,19 @@ gst_y4mencode_sinkconnect (GstPad * pad, const GstCaps * caps)
structure = gst_caps_get_structure (caps, 0); structure = gst_caps_get_structure (caps, 0);
gst_structure_get_int (structure, "width", &filter->width); if (!gst_structure_get_int (structure, "width", &filter->width) ||
gst_structure_get_int (structure, "height", &filter->height); !gst_structure_get_int (structure, "height", &filter->height) ||
gst_structure_get_double (structure, "framerate", &fps); !gst_structure_get_double (structure, "framerate", &fps))
return GST_PAD_LINK_REFUSED;
/* find fps idx */ /* find fps idx */
idx = 0;
for (i = 1; i < 9; i++) { for (i = 1; i < 9; i++) {
if (idx == -1) { gdouble old_diff = fabs (framerates[idx] - fps),
idx = i; new_diff = fabs (framerates[i] - fps);
} else {
gdouble old_diff = fabs (framerates[idx] - fps),
new_diff = fabs (framerates[i] - fps);
if (new_diff < old_diff) { if (new_diff < old_diff) {
idx = i; idx = i;
}
} }
} }
filter->fps_idx = idx; 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); GST_BUFFER_DATA (outbuf) = g_malloc (GST_BUFFER_SIZE (buf) + 256);
if (filter->init) { if (filter->init) {
header = "YUV4MPEG %d %d %d\nFRAME\n"; header = "YUV4MPEG W%d H%d I? %d\nFRAME\n";
filter->init = FALSE; filter->init = FALSE;
} else { } else {
header = "FRAME\n"; header = "FRAME\n";