[ekiga] Made the gstreamer code register a service (bug #569719)
- From: Julien Puydt <jpuydt src gnome org>
- To: svn-commits-list gnome org
- Subject: [ekiga] Made the gstreamer code register a service (bug #569719)
- Date: Sat, 13 Jun 2009 08:43:20 -0400 (EDT)
commit 93b702eae689f265121adf91f7bcd14d68ff87bc
Author: Julien Puydt <jpuydt gnome org>
Date: Sat Jun 13 14:42:55 2009 +0200
Made the gstreamer code register a service (bug #569719)
That's just pedantism.
lib/engine/components/gstreamer/gst-main.cpp | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/lib/engine/components/gstreamer/gst-main.cpp b/lib/engine/components/gstreamer/gst-main.cpp
index 5027ad5..1c0d7b2 100644
--- a/lib/engine/components/gstreamer/gst-main.cpp
+++ b/lib/engine/components/gstreamer/gst-main.cpp
@@ -46,6 +46,21 @@
#include "gst-audiooutput.h"
#include "gst-videoinput.h"
+class GStreamerService: public Ekiga::Service
+{
+public:
+
+ ~GStreamerService ()
+ { gst_deinit (); }
+
+ const std::string get_name () const
+ { return "gstreamer"; }
+
+ const std::string get_description () const
+ { return "\tGStreamer support"; }
+};
+
+
bool
gstreamer_init (Ekiga::ServiceCore& core,
int* argc,
@@ -58,15 +73,18 @@ gstreamer_init (Ekiga::ServiceCore& core,
= core.get ("audiooutput-core");
gmref_ptr<Ekiga::VideoInputCore> videoinput_core
= core.get ("videoinput-core");
+ Ekiga::ServicePtr service = core.get ("gstreamer");
- if (audioinput_core && audiooutput_core && videoinput_core) {
+ if (audioinput_core && audiooutput_core && videoinput_core && !service) {
if (gst_init_check (argc, argv, NULL)) {
GST::VideoInputManager* video = new GST::VideoInputManager ();
GST::AudioInputManager* audioin = new GST::AudioInputManager ();
GST::AudioOutputManager* audioout = new GST::AudioOutputManager ();
+ service = Ekiga::ServicePtr (new GStreamerService);
+ core.add (service);
audioinput_core->add_manager (*audioin);
audiooutput_core->add_manager (*audioout);
videoinput_core->add_manager (*video);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]