mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
Small cleanups.
Original commit message from CVS: * ext/cdparanoia/gstcdparanoiasrc.c: (gst_cd_paranoia_src_read_sector): * gst-libs/gst/audio/gstbaseaudiosrc.c: (gst_base_audio_src_create): Small cleanups. * ext/theora/theoradec.c: (theora_dec_sink_event): Fix typo. * gst-libs/gst/rtp/gstbasertpdepayload.c: (gst_base_rtp_depayload_set_gst_timestamp): Add some FIXME * gst/playback/gstdecodebin.c: (queue_underrun_cb): And some debug info when a FIXME path is hit.
This commit is contained in:
parent
7ace85992a
commit
9b188adc27
6 changed files with 52 additions and 17 deletions
18
ChangeLog
18
ChangeLog
|
@ -1,3 +1,21 @@
|
||||||
|
2007-05-21 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
|
* ext/cdparanoia/gstcdparanoiasrc.c:
|
||||||
|
(gst_cd_paranoia_src_read_sector):
|
||||||
|
* gst-libs/gst/audio/gstbaseaudiosrc.c:
|
||||||
|
(gst_base_audio_src_create):
|
||||||
|
Small cleanups.
|
||||||
|
|
||||||
|
* ext/theora/theoradec.c: (theora_dec_sink_event):
|
||||||
|
Fix typo.
|
||||||
|
|
||||||
|
* gst-libs/gst/rtp/gstbasertpdepayload.c:
|
||||||
|
(gst_base_rtp_depayload_set_gst_timestamp):
|
||||||
|
Add some FIXME
|
||||||
|
|
||||||
|
* gst/playback/gstdecodebin.c: (queue_underrun_cb):
|
||||||
|
And some debug info when a FIXME path is hit.
|
||||||
|
|
||||||
2007-05-21 Wim Taymans <wim@fluendo.com>
|
2007-05-21 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
* gst-libs/gst/rtp/gstbasertpaudiopayload.c:
|
* gst-libs/gst/rtp/gstbasertpaudiopayload.c:
|
||||||
|
|
|
@ -327,13 +327,9 @@ gst_cd_paranoia_src_read_sector (GstCddaBaseSrc * cddabasesrc, gint sector)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (src->next_sector == -1 || src->next_sector != sector) {
|
if (src->next_sector == -1 || src->next_sector != sector) {
|
||||||
if (paranoia_seek (src->p, sector, SEEK_SET) == -1) {
|
if (paranoia_seek (src->p, sector, SEEK_SET) == -1)
|
||||||
GST_WARNING_OBJECT (src, "seek to sector %d failed!", sector);
|
goto seek_failed;
|
||||||
GST_ELEMENT_ERROR (src, RESOURCE, SEEK,
|
|
||||||
(_("Could not seek CD.")),
|
|
||||||
("paranoia_seek to %d failed: %s", sector, g_strerror (errno)));
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
GST_DEBUG_OBJECT (src, "successfully seeked to sector %d", sector);
|
GST_DEBUG_OBJECT (src, "successfully seeked to sector %d", sector);
|
||||||
src->next_sector = sector;
|
src->next_sector = sector;
|
||||||
}
|
}
|
||||||
|
@ -357,13 +353,8 @@ gst_cd_paranoia_src_read_sector (GstCddaBaseSrc * cddabasesrc, gint sector)
|
||||||
cdda_buf = paranoia_read (src->p, gst_cd_paranoia_dummy_callback);
|
cdda_buf = paranoia_read (src->p, gst_cd_paranoia_dummy_callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cdda_buf == NULL) {
|
if (cdda_buf == NULL)
|
||||||
GST_WARNING_OBJECT (src, "read at sector %d failed!", sector);
|
goto read_failed;
|
||||||
GST_ELEMENT_ERROR (src, RESOURCE, READ,
|
|
||||||
(_("Could not read CD.")),
|
|
||||||
("paranoia_read at %d failed: %s", sector, g_strerror (errno)));
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
buf = gst_buffer_new_and_alloc (CD_FRAMESIZE_RAW);
|
buf = gst_buffer_new_and_alloc (CD_FRAMESIZE_RAW);
|
||||||
memcpy (GST_BUFFER_DATA (buf), cdda_buf, CD_FRAMESIZE_RAW);
|
memcpy (GST_BUFFER_DATA (buf), cdda_buf, CD_FRAMESIZE_RAW);
|
||||||
|
@ -372,6 +363,24 @@ gst_cd_paranoia_src_read_sector (GstCddaBaseSrc * cddabasesrc, gint sector)
|
||||||
++src->next_sector;
|
++src->next_sector;
|
||||||
|
|
||||||
return buf;
|
return buf;
|
||||||
|
|
||||||
|
/* ERRORS */
|
||||||
|
seek_failed:
|
||||||
|
{
|
||||||
|
GST_WARNING_OBJECT (src, "seek to sector %d failed!", sector);
|
||||||
|
GST_ELEMENT_ERROR (src, RESOURCE, SEEK,
|
||||||
|
(_("Could not seek CD.")),
|
||||||
|
("paranoia_seek to %d failed: %s", sector, g_strerror (errno)));
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
read_failed:
|
||||||
|
{
|
||||||
|
GST_WARNING_OBJECT (src, "read at sector %d failed!", sector);
|
||||||
|
GST_ELEMENT_ERROR (src, RESOURCE, READ,
|
||||||
|
(_("Could not read CD.")),
|
||||||
|
("paranoia_read at %d failed: %s", sector, g_strerror (errno)));
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -695,7 +695,7 @@ theora_dec_sink_event (GstPad * pad, GstEvent * event)
|
||||||
gst_segment_set_newsegment_full (&dec->segment, update,
|
gst_segment_set_newsegment_full (&dec->segment, update,
|
||||||
rate, arate, format, start, stop, time);
|
rate, arate, format, start, stop, time);
|
||||||
|
|
||||||
/* iWe don't forward this unless/until the decoder is initialised */
|
/* We don't forward this unless/until the decoder is initialised */
|
||||||
if (dec->have_header) {
|
if (dec->have_header) {
|
||||||
ret = gst_pad_push_event (dec->srcpad, event);
|
ret = gst_pad_push_event (dec->srcpad, event);
|
||||||
dec->sent_newsegment = TRUE;
|
dec->sent_newsegment = TRUE;
|
||||||
|
|
|
@ -538,6 +538,7 @@ gst_base_audio_src_create (GstBaseSrc * bsrc, guint64 offset, guint length,
|
||||||
gint bps;
|
gint bps;
|
||||||
GstRingBuffer *ringbuffer;
|
GstRingBuffer *ringbuffer;
|
||||||
guint read;
|
guint read;
|
||||||
|
GstClockTime timestamp;
|
||||||
|
|
||||||
ringbuffer = src->ringbuffer;
|
ringbuffer = src->ringbuffer;
|
||||||
|
|
||||||
|
@ -566,6 +567,8 @@ gst_base_audio_src_create (GstBaseSrc * bsrc, guint64 offset, guint length,
|
||||||
sample = gst_base_audio_src_get_offset (src);
|
sample = gst_base_audio_src_get_offset (src);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GST_DEBUG_OBJECT (src, "reading from sample %" G_GUINT64_FORMAT, sample);
|
||||||
|
|
||||||
/* get the number of samples to read */
|
/* get the number of samples to read */
|
||||||
samples = length / bps;
|
samples = length / bps;
|
||||||
|
|
||||||
|
@ -605,8 +608,10 @@ gst_base_audio_src_create (GstBaseSrc * bsrc, guint64 offset, guint length,
|
||||||
* where we are slaved to another clock. We currently refuse to accept
|
* where we are slaved to another clock. We currently refuse to accept
|
||||||
* any other clock than the one we provide, so this code is fine for
|
* any other clock than the one we provide, so this code is fine for
|
||||||
* now. */
|
* now. */
|
||||||
GST_BUFFER_TIMESTAMP (buf) = gst_util_uint64_scale_int (sample,
|
timestamp =
|
||||||
GST_SECOND, ringbuffer->spec.rate);
|
gst_util_uint64_scale_int (sample, GST_SECOND, ringbuffer->spec.rate);
|
||||||
|
|
||||||
|
GST_BUFFER_TIMESTAMP (buf) = timestamp;
|
||||||
src->next_sample = sample + samples;
|
src->next_sample = sample + samples;
|
||||||
GST_BUFFER_DURATION (buf) = gst_util_uint64_scale_int (src->next_sample,
|
GST_BUFFER_DURATION (buf) = gst_util_uint64_scale_int (src->next_sample,
|
||||||
GST_SECOND, ringbuffer->spec.rate) - GST_BUFFER_TIMESTAMP (buf);
|
GST_SECOND, ringbuffer->spec.rate) - GST_BUFFER_TIMESTAMP (buf);
|
||||||
|
|
|
@ -485,6 +485,8 @@ gst_base_rtp_depayload_set_gst_timestamp (GstBaseRTPDepayload * filter,
|
||||||
if (priv->clock_base == -1)
|
if (priv->clock_base == -1)
|
||||||
priv->clock_base = timestamp;
|
priv->clock_base = timestamp;
|
||||||
|
|
||||||
|
/* FIXME, timestamp wraparound */
|
||||||
|
|
||||||
/* rtp timestamps are based on the clock_rate
|
/* rtp timestamps are based on the clock_rate
|
||||||
* gst timesamps are in nanoseconds */
|
* gst timesamps are in nanoseconds */
|
||||||
ts = gst_util_uint64_scale_int (timestamp, GST_SECOND, filter->clock_rate);
|
ts = gst_util_uint64_scale_int (timestamp, GST_SECOND, filter->clock_rate);
|
||||||
|
|
|
@ -1173,6 +1173,7 @@ queue_underrun_cb (GstElement * queue, GstDecodeBin * decode_bin)
|
||||||
* list) and the overrun signals that are signalled from the
|
* list) and the overrun signals that are signalled from the
|
||||||
* demuxer thread.
|
* demuxer thread.
|
||||||
*/
|
*/
|
||||||
|
GST_DEBUG_OBJECT (decode_bin, "got underrun");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure we don't have a full queue and empty queue situation */
|
/* Make sure we don't have a full queue and empty queue situation */
|
||||||
|
|
Loading…
Reference in a new issue