ext/libvisual/visual.c: change some char* into char[]
authorStefan Kost <ensonic@users.sourceforge.net>
Fri, 16 Dec 2005 22:00:07 +0000 (22:00 +0000)
committerStefan Kost <ensonic@users.sourceforge.net>
Fri, 16 Dec 2005 22:00:07 +0000 (22:00 +0000)
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

ChangeLog
common
ext/libvisual/visual.c
gst/audiotestsrc/gstaudiotestsrc.c
gst/audiotestsrc/gstaudiotestsrc.h

index 868933d..a86438a 100644 (file)
--- a/ChangeLog
+++ b/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>
 
        * tests/check/generic/states.c: (GST_START_TEST):
diff --git a/common b/common
index 4edc214..d1911d4 160000 (submodule)
--- a/common
+++ b/common
@@ -1 +1 @@
-Subproject commit 4edc214072fe07d2aade96bc336493425654d7b4
+Subproject commit d1911d4b3d6267f9cd9dfb68fcef2afe4d098092
index b7e6360..b691e52 100644 (file)
@@ -507,7 +507,7 @@ make_valid_name (char *name)
   /*
    * Replace invalid chars with _ in the type name
    */
-  static const gchar *extra_chars = "-_+";
+  static const gchar extra_chars[] = "-_+";
   gchar *p = name;
 
   for (; *p; p++) {
index 3be8308..6aa66a2 100644 (file)
@@ -543,6 +543,18 @@ gst_audio_test_src_do_seek (GstBaseSrc * basesrc, GstSegment * segment)
 
   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;
 }
 
@@ -583,6 +595,16 @@ gst_audio_test_src_create (GstBaseSrc * basesrc, guint64 offset,
   GST_BUFFER_TIMESTAMP (buf) = src->timestamp_offset + src->running_time;
   /* offset is the number of 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;
   GST_BUFFER_OFFSET_END (buf) = src->n_samples;
   next_time = src->n_samples * GST_SECOND / src->samplerate;
index ff326cd..5a8cd60 100644 (file)
@@ -90,6 +90,11 @@ struct _GstAudioTestSrc {
   GstClockTimeDiff timestamp_offset;    /* base offset */
   GstClockTime running_time;            /* total running time */
   gint64 n_samples;                     /* total samples sent */
+  /*
+  gint64 n_samples_stop;
+  gboolean check_seek_stop;
+  GstSeekFlags seek_flags;
+  */
   
   /* waveform specific context data */
   GstPinkNoise pink;