mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
ext/faad/gstfaad.c: Oops, remove debug.
Original commit message from CVS: * ext/faad/gstfaad.c: (gst_faad_srcconnect), (gst_faad_chain): Oops, remove debug.
This commit is contained in:
parent
a1c9362f69
commit
6184e5e3fd
2 changed files with 7 additions and 16 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2004-12-01 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||||
|
|
||||||
|
* ext/faad/gstfaad.c: (gst_faad_srcconnect), (gst_faad_chain):
|
||||||
|
Oops, remove debug.
|
||||||
|
|
||||||
2004-12-01 Sebastien Cote <sc5@hermes.usherb.ca>
|
2004-12-01 Sebastien Cote <sc5@hermes.usherb.ca>
|
||||||
|
|
||||||
Reviewed by: Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
Reviewed by: Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||||
|
|
|
@ -517,19 +517,17 @@ gst_faad_srcconnect (GstPad * pad, const GstCaps * caps)
|
||||||
if (fmt != -1) {
|
if (fmt != -1) {
|
||||||
faacDecConfiguration *conf;
|
faacDecConfiguration *conf;
|
||||||
|
|
||||||
g_print ("Set format %d\n", fmt);
|
|
||||||
conf = faacDecGetCurrentConfiguration (faad->handle);
|
conf = faacDecGetCurrentConfiguration (faad->handle);
|
||||||
conf->outputFormat = fmt;
|
conf->outputFormat = fmt;
|
||||||
g_print ("Trying to conf\n");
|
|
||||||
if (faacDecSetConfiguration (faad->handle, conf) == 0)
|
if (faacDecSetConfiguration (faad->handle, conf) == 0)
|
||||||
return GST_PAD_LINK_REFUSED;
|
return GST_PAD_LINK_REFUSED;
|
||||||
g_print ("Done\n");
|
|
||||||
/* FIXME: handle return value, how? */
|
/* FIXME: handle return value, how? */
|
||||||
faad->bps = depth / 8;
|
faad->bps = depth / 8;
|
||||||
|
|
||||||
return GST_PAD_LINK_OK;
|
return GST_PAD_LINK_OK;
|
||||||
}
|
}
|
||||||
g_print ("Format not recognized\n");
|
|
||||||
return GST_PAD_LINK_REFUSED;
|
return GST_PAD_LINK_REFUSED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -592,9 +590,7 @@ gst_faad_chain (GstPad * pad, GstData * data)
|
||||||
input_size = GST_BUFFER_SIZE (buf);
|
input_size = GST_BUFFER_SIZE (buf);
|
||||||
info->bytesconsumed = input_size;
|
info->bytesconsumed = input_size;
|
||||||
while (input_size >= FAAD_MIN_STREAMSIZE && info->bytesconsumed > 0) {
|
while (input_size >= FAAD_MIN_STREAMSIZE && info->bytesconsumed > 0) {
|
||||||
g_print ("Decoding %d bytes of data\n", input_size);
|
|
||||||
out = faacDecDecode (faad->handle, info, input_data, input_size);
|
out = faacDecDecode (faad->handle, info, input_data, input_size);
|
||||||
g_print ("done, rec. %p\n", out);
|
|
||||||
if (info->error) {
|
if (info->error) {
|
||||||
GST_ELEMENT_ERROR (faad, STREAM, DECODE, (NULL),
|
GST_ELEMENT_ERROR (faad, STREAM, DECODE, (NULL),
|
||||||
("Failed to decode buffer: %s",
|
("Failed to decode buffer: %s",
|
||||||
|
@ -626,14 +622,6 @@ gst_faad_chain (GstPad * pad, GstData * data)
|
||||||
if (fmt_change) {
|
if (fmt_change) {
|
||||||
GstPadLinkReturn ret;
|
GstPadLinkReturn ret;
|
||||||
|
|
||||||
g_print ("Format change\n");
|
|
||||||
g_print ("To %ld Hz, %d chans, %d/%d/%d/%d/%d/%d\n",
|
|
||||||
info->samplerate, info->channels,
|
|
||||||
info->channel_position[0],
|
|
||||||
info->channel_position[1],
|
|
||||||
info->channel_position[2],
|
|
||||||
info->channel_position[3],
|
|
||||||
info->channel_position[4], info->channel_position[5]);
|
|
||||||
/* store new negotiation information */
|
/* store new negotiation information */
|
||||||
faad->samplerate = info->samplerate;
|
faad->samplerate = info->samplerate;
|
||||||
faad->channels = info->channels;
|
faad->channels = info->channels;
|
||||||
|
@ -653,11 +641,9 @@ gst_faad_chain (GstPad * pad, GstData * data)
|
||||||
|
|
||||||
/* play decoded data */
|
/* play decoded data */
|
||||||
if (info->samples > 0) {
|
if (info->samples > 0) {
|
||||||
g_print ("Playing %ld samples from buf %p\n", info->samples, out);
|
|
||||||
outbuf = gst_buffer_new_and_alloc (info->samples * faad->bps);
|
outbuf = gst_buffer_new_and_alloc (info->samples * faad->bps);
|
||||||
/* ugh */
|
/* ugh */
|
||||||
memcpy (GST_BUFFER_DATA (outbuf), out, GST_BUFFER_SIZE (outbuf));
|
memcpy (GST_BUFFER_DATA (outbuf), out, GST_BUFFER_SIZE (outbuf));
|
||||||
g_print ("done, to %p\n", GST_BUFFER_DATA (outbuf));
|
|
||||||
GST_BUFFER_TIMESTAMP (outbuf) = GST_BUFFER_TIMESTAMP (buf);
|
GST_BUFFER_TIMESTAMP (outbuf) = GST_BUFFER_TIMESTAMP (buf);
|
||||||
GST_BUFFER_DURATION (outbuf) = GST_BUFFER_DURATION (buf);
|
GST_BUFFER_DURATION (outbuf) = GST_BUFFER_DURATION (buf);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue