Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@sugarlabs.org>2012-08-19 12:10:59 (GMT)
committer Aleksey Lim <alsroot@sugarlabs.org>2012-08-19 12:12:00 (GMT)
commit7075e8b9ad881368046e49b3de7516dbd9645bc2 (patch)
tree8a970561736888ebda2a4b36f35079b854866aae
parentf2d64cb48af1d6f766de63888d0c3d4e4e2d3961 (diff)
Count gst buffers in time (Daniel Narvaez)
It seems to produce more results, eg, for: gst-launch-1.0 espeak text='1 2 3' ! alsasink Maybe not not all buffer properties were set for GST_FORMAT_DEFAULT
-rw-r--r--src/espeak.c1
-rw-r--r--src/gstespeak.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/espeak.c b/src/espeak.c
index b1df263..bc8131b 100644
--- a/src/espeak.c
+++ b/src/espeak.c
@@ -263,6 +263,7 @@ GstBuffer *play (Econtext * self, Espin * spin, gsize size_to_play) {
spin->sound_offset, size_to_play, NULL, NULL);
GST_BUFFER_OFFSET (out) = spin->sound_offset;
+ GST_BUFFER_OFFSET_END (out) = spin->sound_offset + size_to_play;
GST_BUFFER_TIMESTAMP (out) = spin->audio_position;
spin->audio_position =
gst_util_uint64_scale_int (event->audio_position, GST_SECOND, 1000);
diff --git a/src/gstespeak.c b/src/gstespeak.c
index 4560512..1dd097e 100644
--- a/src/gstespeak.c
+++ b/src/gstespeak.c
@@ -152,7 +152,7 @@ static void gst_espeak_init (GstEspeak * self) {
"rate", G_TYPE_INT, espeak_get_sample_rate (),
"channels", G_TYPE_INT, 1, NULL);
- gst_base_src_set_format (GST_BASE_SRC (self), GST_FORMAT_DEFAULT);
+ gst_base_src_set_format (GST_BASE_SRC (self), GST_FORMAT_TIME);
}
static void gst_espeak_finalize (GObject * self_) {