mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
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:
parent
82fd840734
commit
a46a991d26
5 changed files with 50 additions and 23 deletions
16
ChangeLog
16
ChangeLog
|
@ -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>
|
2005-07-05 Andy Wingo <wingo@pobox.com>
|
||||||
|
|
||||||
* ext/gnomevfs/gstgnomevfssrc.c:
|
* ext/gnomevfs/gstgnomevfssrc.c:
|
||||||
|
|
|
@ -571,13 +571,12 @@ theora_dec_src_getcaps (GstPad * pad)
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
|
|
||||||
GST_LOCK (pad);
|
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);
|
GST_UNLOCK (pad);
|
||||||
|
|
||||||
if (caps)
|
return caps;
|
||||||
return gst_caps_ref (caps);
|
|
||||||
else
|
|
||||||
return gst_caps_ref ((GstCaps *) gst_pad_get_pad_template_caps (pad));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
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
|
static GstFlowReturn
|
||||||
theora_handle_data_packet (GstTheoraDec * dec, ogg_packet * packet,
|
theora_handle_data_packet (GstTheoraDec * dec, ogg_packet * packet,
|
||||||
GstClockTime outtime)
|
GstClockTime outtime)
|
||||||
|
@ -893,7 +902,7 @@ theora_handle_data_packet (GstTheoraDec * dec, ogg_packet * packet,
|
||||||
dec->info.fps_numerator;
|
dec->info.fps_numerator;
|
||||||
GST_BUFFER_TIMESTAMP (out) = outtime;
|
GST_BUFFER_TIMESTAMP (out) = outtime;
|
||||||
|
|
||||||
result = gst_pad_push (dec->srcpad, out);
|
result = theora_dec_push (dec, out);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
|
|
|
@ -100,19 +100,18 @@ GST_BOILERPLATE_FULL (GstAudioConvert, gst_audio_convert, GstElement,
|
||||||
|
|
||||||
#define STATIC_CAPS \
|
#define STATIC_CAPS \
|
||||||
GST_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, " \
|
"audio/x-raw-int, " \
|
||||||
"rate = (int) [ 1, MAX ], " \
|
"rate = (int) [ 1, MAX ], " \
|
||||||
"channels = (int) [ 1, 8 ], " \
|
"channels = (int) [ 1, 8 ], " \
|
||||||
"endianness = (int) { LITTLE_ENDIAN, BIG_ENDIAN }, " \
|
"endianness = (int) { LITTLE_ENDIAN, BIG_ENDIAN }, " \
|
||||||
"width = (int) 8, " \
|
"width = (int) 32, " \
|
||||||
"depth = (int) [ 1, 8 ], " \
|
"depth = (int) [ 1, 32 ], " \
|
||||||
"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 ], " \
|
|
||||||
"signed = (boolean) { true, false }; " \
|
"signed = (boolean) { true, false }; " \
|
||||||
"audio/x-raw-int, " \
|
"audio/x-raw-int, " \
|
||||||
"rate = (int) [ 1, MAX ], " \
|
"rate = (int) [ 1, MAX ], " \
|
||||||
|
@ -125,15 +124,16 @@ GST_STATIC_CAPS ( \
|
||||||
"rate = (int) [ 1, MAX ], " \
|
"rate = (int) [ 1, MAX ], " \
|
||||||
"channels = (int) [ 1, 8 ], " \
|
"channels = (int) [ 1, 8 ], " \
|
||||||
"endianness = (int) { LITTLE_ENDIAN, BIG_ENDIAN }, " \
|
"endianness = (int) { LITTLE_ENDIAN, BIG_ENDIAN }, " \
|
||||||
"width = (int) 32, " \
|
"width = (int) 16, " \
|
||||||
"depth = (int) [ 1, 32 ], " \
|
"depth = (int) [ 1, 16 ], " \
|
||||||
"signed = (boolean) { true, false }; " \
|
"signed = (boolean) { true, false }; " \
|
||||||
"audio/x-raw-float, " \
|
"audio/x-raw-int, " \
|
||||||
"rate = (int) [ 1, MAX ], " \
|
"rate = (int) [ 1, MAX ], " \
|
||||||
"channels = (int) [ 1, 8 ], " \
|
"channels = (int) [ 1, 8 ], " \
|
||||||
"endianness = (int) BYTE_ORDER, " \
|
"endianness = (int) { LITTLE_ENDIAN, BIG_ENDIAN }, " \
|
||||||
"width = (int) 32, " \
|
"width = (int) 8, " \
|
||||||
"buffer-frames = (int) [ 0, MAX ]" \
|
"depth = (int) [ 1, 8 ], " \
|
||||||
|
"signed = (boolean) { true, false } " \
|
||||||
)
|
)
|
||||||
|
|
||||||
static GstAudioChannelPosition *supported_positions;
|
static GstAudioChannelPosition *supported_positions;
|
||||||
|
|
|
@ -660,7 +660,7 @@ gst_videotestsrc_loop (GstPad * pad)
|
||||||
|
|
||||||
need_pause:
|
need_pause:
|
||||||
{
|
{
|
||||||
gst_task_pause (GST_PAD_TASK (pad));
|
gst_pad_pause_task (pad);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -404,12 +404,13 @@ gst_xvimagesink_xvimage_new (GstXvImageSink * xvimagesink,
|
||||||
XSync (xvimagesink->xcontext->disp, FALSE);
|
XSync (xvimagesink->xcontext->disp, FALSE);
|
||||||
}
|
}
|
||||||
succeeded = TRUE;
|
succeeded = TRUE;
|
||||||
g_mutex_unlock (xvimagesink->x_lock);
|
|
||||||
|
|
||||||
GST_BUFFER_DATA (xvimage) = (guchar *) xvimage->xvimage->data;
|
GST_BUFFER_DATA (xvimage) = (guchar *) xvimage->xvimage->data;
|
||||||
GST_BUFFER_SIZE (xvimage) = xvimage->size;
|
GST_BUFFER_SIZE (xvimage) = xvimage->size;
|
||||||
|
|
||||||
beach:
|
beach:
|
||||||
|
g_mutex_unlock (xvimagesink->x_lock);
|
||||||
|
|
||||||
if (!succeeded) {
|
if (!succeeded) {
|
||||||
gst_xvimage_buffer_free (xvimage);
|
gst_xvimage_buffer_free (xvimage);
|
||||||
xvimage = NULL;
|
xvimage = NULL;
|
||||||
|
@ -1547,6 +1548,7 @@ no_image:
|
||||||
{
|
{
|
||||||
/* No image available. That's very bad ! */
|
/* No image available. That's very bad ! */
|
||||||
gst_buffer_unref (buf);
|
gst_buffer_unref (buf);
|
||||||
|
GST_DEBUG ("could not create image");
|
||||||
GST_ELEMENT_ERROR (xvimagesink, CORE, NEGOTIATION, (NULL),
|
GST_ELEMENT_ERROR (xvimagesink, CORE, NEGOTIATION, (NULL),
|
||||||
("Failed creating an XvImage in xvimagesink chain function."));
|
("Failed creating an XvImage in xvimagesink chain function."));
|
||||||
return GST_FLOW_ERROR;
|
return GST_FLOW_ERROR;
|
||||||
|
|
Loading…
Reference in a new issue