mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
ext/libvisual/visual.c: change some char* into char[]
Original commit message from CVS: * ext/libvisual/visual.c: (make_valid_name): change some char* into char[] * gst/audiotestsrc/gstaudiotestsrc.c: (gst_audio_test_src_class_init), (gst_audio_test_src_do_seek), (gst_audio_test_src_create): * gst/audiotestsrc/gstaudiotestsrc.h: prepare to handle EOS and SEGMENT_DONE
This commit is contained in:
parent
93bbbddaf4
commit
90736bc6e7
5 changed files with 39 additions and 2 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
2005-12-16 Stefan Kost <ensonic@users.sf.net>
|
||||||
|
|
||||||
|
* ext/libvisual/visual.c: (make_valid_name):
|
||||||
|
change some char* into char[]
|
||||||
|
* gst/audiotestsrc/gstaudiotestsrc.c:
|
||||||
|
(gst_audio_test_src_class_init), (gst_audio_test_src_do_seek),
|
||||||
|
(gst_audio_test_src_create):
|
||||||
|
* gst/audiotestsrc/gstaudiotestsrc.h:
|
||||||
|
prepare to handle EOS and SEGMENT_DONE
|
||||||
|
|
||||||
2005-12-16 Tim-Philipp Müller <tim at centricular dot net>
|
2005-12-16 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
* tests/check/generic/states.c: (GST_START_TEST):
|
* tests/check/generic/states.c: (GST_START_TEST):
|
||||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
||||||
Subproject commit 4edc214072fe07d2aade96bc336493425654d7b4
|
Subproject commit d1911d4b3d6267f9cd9dfb68fcef2afe4d098092
|
|
@ -507,7 +507,7 @@ make_valid_name (char *name)
|
||||||
/*
|
/*
|
||||||
* Replace invalid chars with _ in the type name
|
* Replace invalid chars with _ in the type name
|
||||||
*/
|
*/
|
||||||
static const gchar *extra_chars = "-_+";
|
static const gchar extra_chars[] = "-_+";
|
||||||
gchar *p = name;
|
gchar *p = name;
|
||||||
|
|
||||||
for (; *p; p++) {
|
for (; *p; p++) {
|
||||||
|
|
|
@ -543,6 +543,18 @@ gst_audio_test_src_do_seek (GstBaseSrc * basesrc, GstSegment * segment)
|
||||||
|
|
||||||
g_assert (src->running_time <= time);
|
g_assert (src->running_time <= time);
|
||||||
|
|
||||||
|
/*
|
||||||
|
if (GST_CLOCK_TIME_IS_VALID (segment->stop)) {
|
||||||
|
time = segment->stop;
|
||||||
|
src->n_samples_stop = time * src->samplerate / GST_SECOND;
|
||||||
|
src->check_seek_stop = true;
|
||||||
|
src->seek_flags = segment.flags;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
src->check_seek_stop = false;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -583,6 +595,16 @@ gst_audio_test_src_create (GstBaseSrc * basesrc, guint64 offset,
|
||||||
GST_BUFFER_TIMESTAMP (buf) = src->timestamp_offset + src->running_time;
|
GST_BUFFER_TIMESTAMP (buf) = src->timestamp_offset + src->running_time;
|
||||||
/* offset is the number of samples */
|
/* offset is the number of samples */
|
||||||
GST_BUFFER_OFFSET (buf) = src->n_samples;
|
GST_BUFFER_OFFSET (buf) = src->n_samples;
|
||||||
|
/*
|
||||||
|
if (src->check_seek_stop &&
|
||||||
|
(src->n_samples_stop > src->n_samples) &&
|
||||||
|
(src->n_samples_stop < src->n_samples + src->samples_per_buffer)) {
|
||||||
|
src->n_samples = src->n_samples_stop;
|
||||||
|
@todo: calculate only partial buffer!
|
||||||
|
@todo: send EOS or SEGMENT_DONE depending on segment.flags&GST_SEEK_FLAG_SEGMENT
|
||||||
|
}
|
||||||
|
else
|
||||||
|
*/
|
||||||
src->n_samples += src->samples_per_buffer;
|
src->n_samples += src->samples_per_buffer;
|
||||||
GST_BUFFER_OFFSET_END (buf) = src->n_samples;
|
GST_BUFFER_OFFSET_END (buf) = src->n_samples;
|
||||||
next_time = src->n_samples * GST_SECOND / src->samplerate;
|
next_time = src->n_samples * GST_SECOND / src->samplerate;
|
||||||
|
|
|
@ -90,6 +90,11 @@ struct _GstAudioTestSrc {
|
||||||
GstClockTimeDiff timestamp_offset; /* base offset */
|
GstClockTimeDiff timestamp_offset; /* base offset */
|
||||||
GstClockTime running_time; /* total running time */
|
GstClockTime running_time; /* total running time */
|
||||||
gint64 n_samples; /* total samples sent */
|
gint64 n_samples; /* total samples sent */
|
||||||
|
/*
|
||||||
|
gint64 n_samples_stop;
|
||||||
|
gboolean check_seek_stop;
|
||||||
|
GstSeekFlags seek_flags;
|
||||||
|
*/
|
||||||
|
|
||||||
/* waveform specific context data */
|
/* waveform specific context data */
|
||||||
GstPinkNoise pink;
|
GstPinkNoise pink;
|
||||||
|
|
Loading…
Reference in a new issue