[gstreamermm: 14/167] fixed audiosrc
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gstreamermm: 14/167] fixed audiosrc
- Date: Tue, 3 Sep 2013 19:20:15 +0000 (UTC)
commit 2abaa2a4ebb12277131e8e6b429743142a4756a8
Author: Marcin Kolny at Flytronic <marcin kolny flytronic pl>
Date: Wed Jul 24 13:05:45 2013 +0200
fixed audiosrc
gstreamer/src/audiosrc.ccg | 12 ++++++------
gstreamer/src/audiosrc.hg | 12 ++++++------
.../extra_defs_gen/generate_plugin_gmmproc_file.cc | 4 ++--
3 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/gstreamer/src/audiosrc.ccg b/gstreamer/src/audiosrc.ccg
index 9d04530..0524491 100644
--- a/gstreamer/src/audiosrc.ccg
+++ b/gstreamer/src/audiosrc.ccg
@@ -64,7 +64,7 @@ gboolean AudioSrc_Class::prepare_vfunc_callback(GstAudioSrc* self, GstAudioRingB
typedef gboolean RType;
return RType();
}
-bool Gst::AudioSrc::prepare_vfunc(Gst::RingBufferSpec& spec)
+bool Gst::AudioSrc::prepare_vfunc(Gst::AudioRingBufferSpec& spec)
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class
(The original underlying C class).
@@ -76,7 +76,7 @@ bool Gst::AudioSrc::prepare_vfunc(Gst::RingBufferSpec& spec)
typedef bool RType;
return RType();
}
-guint AudioSrc_Class::read_vfunc_callback(GstAudioSrc* self, gpointer data, guint length)
+guint AudioSrc_Class::read_vfunc_callback(GstAudioSrc* self, gpointer data, guint length, ClockTime*
timestamp)
{
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
@@ -94,7 +94,7 @@ guint AudioSrc_Class::read_vfunc_callback(GstAudioSrc* self, gpointer data, guin
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
// Call the virtual member method, which derived classes might override.
- return obj->read_vfunc(data, length);
+ return obj->read_vfunc(data, length, timestamp);
}
catch(...)
{
@@ -109,20 +109,20 @@ guint AudioSrc_Class::read_vfunc_callback(GstAudioSrc* self, gpointer data, guin
// Call the original underlying C function:
if(base && base->read)
- return (*base->read)(self, data, length);
+ return (*base->read)(self, data, length, timestamp);
typedef guint RType;
return RType();
}
-guint Gst::AudioSrc::read_vfunc(const void* data, guint length)
+guint Gst::AudioSrc::read_vfunc(const void* data, guint length, ClockTime* timestamp)
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class
(The original underlying C class).
);
if(base && base->read)
- return (*base->read)(gobj(),const_cast<void*>(data),length);
+ return (*base->read)(gobj(),const_cast<void*>(data),length, timestamp);
typedef guint RType;
return RType();
diff --git a/gstreamer/src/audiosrc.hg b/gstreamer/src/audiosrc.hg
index 717b283..3b201aa 100644
--- a/gstreamer/src/audiosrc.hg
+++ b/gstreamer/src/audiosrc.hg
@@ -17,9 +17,9 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include <gstreamermm/audioringbuffer.h>
#include <gst/audio/gstaudiosrc.h>
#include <gstreamermm/audiobasesrc.h>
-#include <gstreamermm/audioringbuffer.h>
_DEFS(gstreamermm,gst)
@@ -40,16 +40,16 @@ namespace Gst
* - close_vfunc() - Close the device.
*
* All scheduling of samples and timestamps is done in this base class together
- * with Gst::BaseAudioSrc using a default implementation of a
+ * with Gst::AudioBaseSrc using a default implementation of a
* Gst::RingBuffer that uses threads.
*
* Last reviewed on 2006-09-27 (0.10.12)
*
* @ingroup GstBaseClasses
*/
-class AudioSrc : public Gst::BaseAudioSrc
+class AudioSrc : public Gst::AudioBaseSrc
{
- _CLASS_GOBJECT(AudioSrc, GstAudioSrc, GST_AUDIO_SRC, Gst::BaseAudioSrc, GstBaseAudioSrc)
+ _CLASS_GOBJECT(AudioSrc, GstAudioSrc, GST_AUDIO_SRC, Gst::AudioBaseSrc, GstAudioBaseSrc)
public:
/** vfunc to open the device.
@@ -70,7 +70,7 @@ public:
/** vfunc to read samples to the audio device.
*/
- virtual guint read_vfunc(const void* data, guint length);
+ virtual guint read_vfunc(const void* data, guint length, ClockTime* timestamp);
/** vfunc to get the number of samples queued in the device.
*/
@@ -87,7 +87,7 @@ protected:
klass->read = &read_vfunc_callback;
_SECTION(SECTION_PH_VFUNCS)
static gboolean prepare_vfunc_callback(GstAudioSrc* self, GstAudioRingBufferSpec* spec);
- static guint read_vfunc_callback(GstAudioSrc* self, gpointer data, guint length);
+ static guint read_vfunc_callback(GstAudioSrc* self, gpointer data, guint length, ClockTime* timestamp);
_POP()
#m4end
};
diff --git a/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
b/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
index 550c488..7e00f80 100644
--- a/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
+++ b/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
@@ -47,7 +47,7 @@ static const char *const wrappedBaseClasses[] =
"GstAudioSink",
"GstAudioSrc",
"GstAudioBaseSink",
- "GstBaseAudioSrc",
+ "GstAudioBaseSrc",
"GstBaseSink",
"GstBaseSrc",
"GstBaseTransform",
@@ -905,7 +905,7 @@ int main(int argc, char** argv)
cppParentTypeName.compare("AudioSink") == 0 ||
cppParentTypeName.compare("AudioSrc") == 0 ||
cppParentTypeName.compare("AudioBaseSink") == 0 ||
- cppParentTypeName.compare("BaseAudioSrc") == 0 ||
+ cppParentTypeName.compare("AudioBaseSrc") == 0 ||
cppParentTypeName.compare("BaseSink") == 0 ||
cppParentTypeName.compare("BaseSrc") == 0 ||
cppParentTypeName.compare("BaseTransform") == 0 ||
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]