[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog backend/sound_handler_gst.cpp s...
From: |
Tomas Groth |
Subject: |
[Gnash-commit] gnash ChangeLog backend/sound_handler_gst.cpp s... |
Date: |
Mon, 30 Jul 2007 09:05:52 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Tomas Groth <tgc> 07/07/30 09:05:51
Modified files:
. : ChangeLog
backend : sound_handler_gst.cpp
server/asobj : SoundGst.cpp
Log message:
* backend/sound_handler_gst.cpp: Use the audioconverter element
to get the current position, to avoid delay.
* server/asobj/SoundGst.cpp: Fixed some faulty conversions to
milliseconds.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3867&r2=1.3868
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/sound_handler_gst.cpp?cvsroot=gnash&r1=1.55&r2=1.56
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/SoundGst.cpp?cvsroot=gnash&r1=1.10&r2=1.11
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3867
retrieving revision 1.3868
diff -u -b -r1.3867 -r1.3868
--- ChangeLog 30 Jul 2007 08:45:29 -0000 1.3867
+++ ChangeLog 30 Jul 2007 09:05:51 -0000 1.3868
@@ -1,3 +1,10 @@
+2007-07-30 Sergio Costas
+
+ * backend/sound_handler_gst.cpp: Use the audioconverter element
+ to get the current position, to avoid delay.
+ * server/asobj/SoundGst.cpp: Fixed some faulty conversions to
+ milliseconds.
+
2007-07-30 Alexander Sack <address@hidden>
* server/asobj/NetStreamGst.cpp: Fix plugin loading
Index: backend/sound_handler_gst.cpp
===================================================================
RCS file: /sources/gnash/gnash/backend/sound_handler_gst.cpp,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -b -r1.55 -r1.56
--- backend/sound_handler_gst.cpp 27 Jul 2007 15:09:41 -0000 1.55
+++ backend/sound_handler_gst.cpp 30 Jul 2007 09:05:51 -0000 1.56
@@ -20,7 +20,7 @@
// Based on sound_handler_sdl.cpp by Thatcher Ulrich http://tulrich.com 2003
// which has been donated to the Public Domain.
-/* $Id: sound_handler_gst.cpp,v 1.55 2007/07/27 15:09:41 tgc Exp $ */
+/* $Id: sound_handler_gst.cpp,v 1.56 2007/07/30 09:05:51 tgc Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -641,19 +641,19 @@
sound_data* sounddata = m_sound_data[sound_handle];
// return the position of the last element added
- GstElement *pipeline,*audiosink;
+ GstElement *pipeline,*audioconvert;
GstStateChangeReturn ret;
GstState current, pending;
int64_t pos;
GstFormat fmt = GST_FORMAT_TIME;
-
pipeline=sounddata->m_gst_elements[sounddata->m_gst_elements.size()-1]->pipeline;
+ pipeline =
sounddata->m_gst_elements[sounddata->m_gst_elements.size()-1]->pipeline;
ret = gst_element_get_state (GST_ELEMENT (pipeline), ¤t,
&pending, 0);
if (current != GST_STATE_NULL) {
-
audiosink=sounddata->m_gst_elements[sounddata->m_gst_elements.size()-1]->audiosink;
- if (gst_element_query_position (pipeline, &fmt, &pos)) {
+ audioconvert =
sounddata->m_gst_elements[sounddata->m_gst_elements.size()-1]->audioconvert;
+ if (gst_element_query_position (audioconvert, &fmt, &pos)) {
return static_cast<unsigned int>(pos / GST_MSECOND);
} else {
return 0;
Index: server/asobj/SoundGst.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/SoundGst.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- server/asobj/SoundGst.cpp 27 Jul 2007 15:09:41 -0000 1.10
+++ server/asobj/SoundGst.cpp 30 Jul 2007 09:05:51 -0000 1.11
@@ -315,7 +315,7 @@
int64_t len;
if (pipeline && gst_element_query_duration (pipeline, &fmt, &len)) {
- return static_cast<unsigned int>(len*1000);
+ return static_cast<unsigned int>(len / GST_MSECOND);
} else {
return 0;
}
@@ -346,7 +346,7 @@
ret = gst_element_get_state (GST_ELEMENT (pipeline), ¤t,
&pending, 0);
if (current != GST_STATE_NULL && gst_element_query_position (pipeline,
&fmt, &pos)) {
- return static_cast<unsigned int>(pos * 1000);
+ return static_cast<unsigned int>(len / GST_MSECOND);
} else {
return 0;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog backend/sound_handler_gst.cpp s...,
Tomas Groth <=