diff --git a/ChangeLog b/ChangeLog index f324d0f4c2..7bad61004c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2005-07-06 Wim Taymans + + * ext/theora/theoradec.c: (theora_dec_src_getcaps), + (theora_dec_push), (theora_handle_data_packet): + Prepare for better timestamp fix later. + + * gst/audioconvert/gstaudioconvert.c: + List most accurate caps first + + * gst/videotestsrc/gstvideotestsrc.c: (gst_videotestsrc_loop): + Use proper pad task function. + + * sys/xvimage/xvimagesink.c: (gst_xvimagesink_xvimage_new), + (gst_xvimagesink_show_frame): + Fix deadlock when alloc failed. + 2005-07-05 Andy Wingo * ext/gnomevfs/gstgnomevfssrc.c: diff --git a/ext/theora/theoradec.c b/ext/theora/theoradec.c index 97a7912cab..3fae8282b3 100644 --- a/ext/theora/theoradec.c +++ b/ext/theora/theoradec.c @@ -571,13 +571,12 @@ theora_dec_src_getcaps (GstPad * pad) GstCaps *caps; GST_LOCK (pad); - caps = GST_PAD_CAPS (pad); + if (!(caps = GST_PAD_CAPS (pad))) + caps = (GstCaps *) gst_pad_get_pad_template_caps (pad); + caps = gst_caps_ref (caps); GST_UNLOCK (pad); - if (caps) - return gst_caps_ref (caps); - else - return gst_caps_ref ((GstCaps *) gst_pad_get_pad_template_caps (pad)); + return caps; } static gboolean @@ -790,6 +789,16 @@ header_read_error: } } +static GstFlowReturn +theora_dec_push (GstTheoraDec * dec, GstBuffer * buf) +{ + GstFlowReturn result; + + result = gst_pad_push (dec->srcpad, buf); + + return result; +} + static GstFlowReturn theora_handle_data_packet (GstTheoraDec * dec, ogg_packet * packet, GstClockTime outtime) @@ -893,7 +902,7 @@ theora_handle_data_packet (GstTheoraDec * dec, ogg_packet * packet, dec->info.fps_numerator; GST_BUFFER_TIMESTAMP (out) = outtime; - result = gst_pad_push (dec->srcpad, out); + result = theora_dec_push (dec, out); return result; diff --git a/gst/audioconvert/gstaudioconvert.c b/gst/audioconvert/gstaudioconvert.c index 4f2825e7b8..5d1ed55650 100644 --- a/gst/audioconvert/gstaudioconvert.c +++ b/gst/audioconvert/gstaudioconvert.c @@ -100,19 +100,18 @@ GST_BOILERPLATE_FULL (GstAudioConvert, gst_audio_convert, GstElement, #define STATIC_CAPS \ GST_STATIC_CAPS ( \ + "audio/x-raw-float, " \ + "rate = (int) [ 1, MAX ], " \ + "channels = (int) [ 1, 8 ], " \ + "endianness = (int) BYTE_ORDER, " \ + "width = (int) 32, " \ + "buffer-frames = (int) [ 0, MAX ];" \ "audio/x-raw-int, " \ "rate = (int) [ 1, MAX ], " \ "channels = (int) [ 1, 8 ], " \ "endianness = (int) { LITTLE_ENDIAN, BIG_ENDIAN }, " \ - "width = (int) 8, " \ - "depth = (int) [ 1, 8 ], " \ - "signed = (boolean) { true, false }; " \ - "audio/x-raw-int, " \ - "rate = (int) [ 1, MAX ], " \ - "channels = (int) [ 1, 8 ], " \ - "endianness = (int) { LITTLE_ENDIAN, BIG_ENDIAN }, " \ - "width = (int) 16, " \ - "depth = (int) [ 1, 16 ], " \ + "width = (int) 32, " \ + "depth = (int) [ 1, 32 ], " \ "signed = (boolean) { true, false }; " \ "audio/x-raw-int, " \ "rate = (int) [ 1, MAX ], " \ @@ -125,15 +124,16 @@ GST_STATIC_CAPS ( \ "rate = (int) [ 1, MAX ], " \ "channels = (int) [ 1, 8 ], " \ "endianness = (int) { LITTLE_ENDIAN, BIG_ENDIAN }, " \ - "width = (int) 32, " \ - "depth = (int) [ 1, 32 ], " \ + "width = (int) 16, " \ + "depth = (int) [ 1, 16 ], " \ "signed = (boolean) { true, false }; " \ - "audio/x-raw-float, " \ + "audio/x-raw-int, " \ "rate = (int) [ 1, MAX ], " \ "channels = (int) [ 1, 8 ], " \ - "endianness = (int) BYTE_ORDER, " \ - "width = (int) 32, " \ - "buffer-frames = (int) [ 0, MAX ]" \ + "endianness = (int) { LITTLE_ENDIAN, BIG_ENDIAN }, " \ + "width = (int) 8, " \ + "depth = (int) [ 1, 8 ], " \ + "signed = (boolean) { true, false } " \ ) static GstAudioChannelPosition *supported_positions; diff --git a/gst/videotestsrc/gstvideotestsrc.c b/gst/videotestsrc/gstvideotestsrc.c index 8677a71164..469acacf61 100644 --- a/gst/videotestsrc/gstvideotestsrc.c +++ b/gst/videotestsrc/gstvideotestsrc.c @@ -660,7 +660,7 @@ gst_videotestsrc_loop (GstPad * pad) need_pause: { - gst_task_pause (GST_PAD_TASK (pad)); + gst_pad_pause_task (pad); } } diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c index 4dace527c5..95bcfb832f 100644 --- a/sys/xvimage/xvimagesink.c +++ b/sys/xvimage/xvimagesink.c @@ -404,12 +404,13 @@ gst_xvimagesink_xvimage_new (GstXvImageSink * xvimagesink, XSync (xvimagesink->xcontext->disp, FALSE); } succeeded = TRUE; - g_mutex_unlock (xvimagesink->x_lock); GST_BUFFER_DATA (xvimage) = (guchar *) xvimage->xvimage->data; GST_BUFFER_SIZE (xvimage) = xvimage->size; beach: + g_mutex_unlock (xvimagesink->x_lock); + if (!succeeded) { gst_xvimage_buffer_free (xvimage); xvimage = NULL; @@ -1547,6 +1548,7 @@ no_image: { /* No image available. That's very bad ! */ gst_buffer_unref (buf); + GST_DEBUG ("could not create image"); GST_ELEMENT_ERROR (xvimagesink, CORE, NEGOTIATION, (NULL), ("Failed creating an XvImage in xvimagesink chain function.")); return GST_FLOW_ERROR;