ext/theora/theoradec.c: Prepare for better timestamp fix later.

Original commit message from CVS:
* 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.
This commit is contained in:
Wim Taymans 2005-07-06 15:14:38 +00:00
parent 82fd840734
commit a46a991d26
5 changed files with 50 additions and 23 deletions

View file

@ -1,3 +1,19 @@
2005-07-06 Wim Taymans <wim@fluendo.com>
* 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 <wingo@pobox.com>
* ext/gnomevfs/gstgnomevfssrc.c:

View file

@ -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;

View file

@ -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;

View file

@ -660,7 +660,7 @@ gst_videotestsrc_loop (GstPad * pad)
need_pause:
{
gst_task_pause (GST_PAD_TASK (pad));
gst_pad_pause_task (pad);
}
}

View file

@ -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;