[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/network/kcall
From:       George Kiagiadakis <gkiagiad () csd ! uoc ! gr>
Date:       2009-07-18 12:36:02
Message-ID: 1247920562.005625.32625.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 998732 by gkiagia:

Rewrite the whole farsight/gstreamer part of kcall using:
- libQtGstreamer: A qt-only library that implements basic Qt Gstreamer bindings.
- libkgstdevices: A kde-based library that implements device detection and \
configuration using Solid and QtGstreamer.
- libqtpfarsight: A wrapper around telepathy-farsight that provides a sane api for \
using it and also hides the G* ugliness by using QtGstreamer.

Real development of libQtGstreamer and libkgstdevices happens in separate git repos, \
but I will maintain local copies in kcall for the moment, built as static libs.

 M  +2 -0      CMakeLists.txt  
 M  +13 -5     kcall_handler/CMakeLists.txt  
 M  +2 -2      kcall_handler/abstractmediahandler.cpp  
 M  +2 -3      kcall_handler/abstractmediahandler.h  
 M  +6 -7      kcall_handler/callwindow.cpp  
 M  +2 -2      kcall_handler/callwindow.h  
 A             kcall_handler/farsight/audiobin.cpp   [License: LGPL (v2.1+)]
 A             kcall_handler/farsight/audiobin.h   \
kcall_handler/farsight/mediahandler.h#996736 [License: LGPL (v2.1+)]  A             \
kcall_handler/farsight/farsightmediahandler.cpp   [License: LGPL (v2.1+)]  A          \
kcall_handler/farsight/farsightmediahandler.h   [License: LGPL (v2.1+)]  D            \
kcall_handler/farsight/mediahandler.cpp    D             \
kcall_handler/farsight/mediahandler.h    M  +11 -10    kcall_handler/volumewidget.cpp \
  M  +1 -2      kcall_handler/volumewidget.h  
 M  +9 -12     libkgstdevices/CMakeLists.txt  
 A             libkgstdevices/audiodevicechooser.ui  
 A             libkgstdevices/devicechooser.cpp   [License: LGPL (v2.1+)]
 A             libkgstdevices/devicechooser.h   [License: LGPL (v2.1+)]
 A             libkgstdevices/devicechooser_p.h   [License: LGPL (v2.1+)]
 D             libkgstdevices/devicefactory.cpp  
 D             libkgstdevices/devicefactory.h  
 A             libkgstdevices/devicemanager.cpp   [License: LGPL (v2.1+)]
 A             libkgstdevices/devicemanager.h   [License: LGPL (v2.1+)]
 A             libkgstdevices/devicesmodel.cpp   [License: LGPL (v2.1+)]
 A             libkgstdevices/devicesmodel.h   [License: LGPL (v2.1+)]
 D             libkgstdevices/elementfactory_p.cpp  
 D             libkgstdevices/elementfactory_p.h  
 D             libkgstdevices/mediadevices.cpp  
 D             libkgstdevices/mediadevices.h  
 D             libkgstdevices/volumecontrolinterface.h  
 A             libqtgstreamer (directory)  
 A             libqtgstreamer/CMakeLists.txt  
 A             libqtgstreamer/qgstbin.cpp   [License: LGPL (v2.1+)]
 A             libqtgstreamer/qgstbin.h   \
kcall_handler/farsight/mediahandler.h#996736 [License: LGPL (v2.1+)]  A             \
libqtgstreamer/qgstbus.cpp   [License: LGPL (v2.1+)]  A             \
libqtgstreamer/qgstbus.h   kcall_handler/farsight/mediahandler.h#996736 [License: \
LGPL (v2.1+)]  A             libqtgstreamer/qgstelement.cpp   [License: LGPL (v2.1+)]
 A             libqtgstreamer/qgstelement.h   [License: LGPL (v2.1+)]
 A             libqtgstreamer/qgstelementfactory.cpp   [License: LGPL (v2.1+)]
 A             libqtgstreamer/qgstelementfactory.h   [License: LGPL (v2.1+)]
 A             libqtgstreamer/qgstghostpad.cpp   \
kcall_handler/abstractmediahandler.cpp#996736 [License: LGPL (v2.1+)]  A             \
libqtgstreamer/qgstghostpad.h   libkgstdevices/volumecontrolinterface.h#996736 \
[License: LGPL (v2.1+)]  A             libqtgstreamer/qgstglobal.cpp   \
kcall_handler/abstractmediahandler.cpp#996736 [License: LGPL (v2.1+)]  A             \
libqtgstreamer/qgstglobal.h   libkgstdevices/volumecontrolinterface.h#996736 \
[License: LGPL (v2.1+)]  A             libqtgstreamer/qgstobject.cpp   [License: LGPL \
(v2.1+)]  A             libqtgstreamer/qgstobject.h   [License: LGPL (v2.1+)]
 A             libqtgstreamer/qgstpad.cpp   [License: LGPL (v2.1+)]
 A             libqtgstreamer/qgstpad.h   \
kcall_handler/farsight/mediahandler.h#996736 [License: LGPL (v2.1+)]  A             \
libqtgstreamer/qgstpipeline.cpp   kcall_handler/abstractmediahandler.cpp#996736 \
[License: LGPL (v2.1+)]  A             libqtgstreamer/qgstpipeline.h   \
libkgstdevices/volumecontrolinterface.h#996736 [License: LGPL (v2.1+)]  A             \
libqtpfarsight (directory)    A             libqtpfarsight/CMakeLists.txt  
 A             libqtpfarsight/qtfchannel.cpp   [License: LGPL (v2.1+)]
 A             libqtpfarsight/qtfchannel.h   [License: LGPL (v2.1+)]


--- trunk/playground/network/kcall/CMakeLists.txt #998731:998732
@@ -63,7 +63,9 @@
 
 if ( BUILD_KCALL_HANDLER )
     add_subdirectory(libkgstvideowidget)
+    add_subdirectory(libqtgstreamer)
     add_subdirectory(libkgstdevices)
+    add_subdirectory(libqtpfarsight)
     add_subdirectory(kcall_handler)
     add_subdirectory(tests)
 endif ( BUILD_KCALL_HANDLER )
--- trunk/playground/network/kcall/kcall_handler/CMakeLists.txt #998731:998732
@@ -12,7 +12,8 @@
     abstractmediahandler.cpp
     dtmfhandler.cpp
     volumewidget.cpp
-    farsight/mediahandler.cpp
+    farsight/audiobin.cpp
+    farsight/farsightmediahandler.cpp
 )
 
 kde4_add_ui_files(kcall_handler_SRCS callwindow.ui)
@@ -20,13 +21,20 @@
 kde4_add_executable(kcall_handler ${kcall_handler_SRCS})
 target_link_libraries(kcall_handler ${KDE4_KDEUI_LIBS}
                                     ${TELEPATHY_QT4_LIBRARIES}
-                                    ${TELEPATHY_QT4_FARSIGHT_LIBRARIES}
+                                    kcallprivate
+                                    qtpfarsight
+                                    kgstdevices
+                                    kgstvideowidget
+                                    QtGstreamer
+                                    #extra dependencies of libQtGstreamer
                                     ${GSTREAMER_LIBRARIES}
                                     ${GOBJECT_LIBRARIES}
+                                    #extra dependencies of libqtpfarsight
+                                    ${TELEPATHY_QT4_FARSIGHT_LIBRARIES}
                                     ${TPFARSIGHT_LIBRARIES}
-                                    kcallprivate
-                                    kgstdevices
-                                    kgstvideowidget)
+                                    #extra dependencies of libkgstdevices
+                                    ${KDE4_SOLID_LIBS}
+)
 
 install(TARGETS kcall_handler ${INSTALL_TARGETS_DEFAULT_ARGS})
 install(FILES callwindowui.rc DESTINATION ${DATA_INSTALL_DIR}/kcall_handler)
--- trunk/playground/network/kcall/kcall_handler/abstractmediahandler.cpp \
#998731:998732 @@ -15,7 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 #include "abstractmediahandler.h"
-#include "farsight/mediahandler.h"
+#include "farsight/farsightmediahandler.h"
 
 AbstractMediaHandler::AbstractMediaHandler(QObject *parent)
     : QObject(parent)
@@ -26,7 +26,7 @@
 AbstractMediaHandler *AbstractMediaHandler::create(const Tp::StreamedMediaChannelPtr \
& channel,  QObject *parent)
 {
-    return new Farsight::MediaHandler(channel, parent);
+    return new FarsightMediaHandler(channel, parent);
 }
 
 #include "abstractmediahandler.moc"
--- trunk/playground/network/kcall/kcall_handler/abstractmediahandler.h \
#998731:998732 @@ -19,7 +19,6 @@
 
 #include "calllog.h"
 #include <TelepathyQt4/StreamedMediaChannel>
-class VolumeControlInterface;
 class VideoWidget;
 
 class AbstractMediaHandler : public QObject
@@ -30,10 +29,10 @@
                                         QObject *parent = 0);
 
 Q_SIGNALS:
-    void audioInputDeviceCreated(VolumeControlInterface *inputVolumeControl);
+    void audioInputDeviceCreated(QObject *inputVolumeControl);
     void audioInputDeviceDestroyed();
 
-    void audioOutputDeviceCreated(VolumeControlInterface *outputVolumeControl);
+    void audioOutputDeviceCreated(QObject *outputVolumeControl);
     void audioOutputDeviceDestroyed();
 
     void videoOutputWidgetCreated(VideoWidget *videoWidget, uint streamId);
--- trunk/playground/network/kcall/kcall_handler/callwindow.cpp #998731:998732
@@ -21,7 +21,6 @@
 #include "kcallhandlersettings.h"
 #include "../libkcallprivate/groupmembersmodel.h"
 #include "../libkcallprivate/kcallhandlersettingsdialog.h"
-#include "../libkgstdevices/volumecontrolinterface.h"
 #include "../libkgstvideowidget/videowidget.h"
 #include <QtCore/QMetaObject>
 #include <QtGui/QCloseEvent>
@@ -171,12 +170,12 @@
 
 void CallWindow::onMediaHandlerCreated(AbstractMediaHandler *handler)
 {
-    connect(handler, SIGNAL(audioInputDeviceCreated(VolumeControlInterface*)),
-            SLOT(onAudioInputDeviceCreated(VolumeControlInterface*)));
+    connect(handler, SIGNAL(audioInputDeviceCreated(QObject*)),
+            SLOT(onAudioInputDeviceCreated(QObject*)));
     connect(handler, SIGNAL(audioInputDeviceDestroyed()), \
SLOT(onAudioInputDeviceDestroyed()));  
-    connect(handler, SIGNAL(audioOutputDeviceCreated(VolumeControlInterface*)),
-            SLOT(onAudioOutputDeviceCreated(VolumeControlInterface*)));
+    connect(handler, SIGNAL(audioOutputDeviceCreated(QObject*)),
+            SLOT(onAudioOutputDeviceCreated(QObject*)));
     connect(handler, SIGNAL(audioOutputDeviceDestroyed()), \
SLOT(onAudioOutputDeviceDestroyed()));  
     connect(handler, SIGNAL(videoOutputWidgetCreated(VideoWidget*, uint)),
@@ -184,7 +183,7 @@
     connect(handler, SIGNAL(closeVideoOutputWidget(uint)), \
SLOT(onCloseVideoOutputWidget(uint)));  }
 
-void CallWindow::onAudioInputDeviceCreated(VolumeControlInterface *control)
+void CallWindow::onAudioInputDeviceCreated(QObject *control)
 {
     d->ui.microphoneGroupBox->setEnabled(true);
     d->ui.inputVolumeWidget->setVolumeControl(control);
@@ -195,7 +194,7 @@
     d->ui.microphoneGroupBox->setEnabled(false);
 }
 
-void CallWindow::onAudioOutputDeviceCreated(VolumeControlInterface *control)
+void CallWindow::onAudioOutputDeviceCreated(QObject *control)
 {
     d->ui.speakersGroupBox->setEnabled(true);
     d->ui.outputVolumeWidget->setVolumeControl(control);
--- trunk/playground/network/kcall/kcall_handler/callwindow.h #998731:998732
@@ -38,9 +38,9 @@
     void setState(ChannelHandler::State state);
     void setStatus(const QString & msg);
     void onMediaHandlerCreated(AbstractMediaHandler *handler);
-    void onAudioInputDeviceCreated(VolumeControlInterface *control);
+    void onAudioInputDeviceCreated(QObject *control);
     void onAudioInputDeviceDestroyed();
-    void onAudioOutputDeviceCreated(VolumeControlInterface *control);
+    void onAudioOutputDeviceCreated(QObject *control);
     void onAudioOutputDeviceDestroyed();
     void onVideoOutputWidgetCreated(VideoWidget *widget, uint id);
     void onCloseVideoOutputWidget(uint id);
--- trunk/playground/network/kcall/kcall_handler/volumewidget.cpp #998731:998732
@@ -15,14 +15,14 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 #include "volumewidget.h"
-#include "../libkgstdevices/volumecontrolinterface.h"
+#include <QtCore/QVariant>
 #include <QtGui/QSlider>
 #include <QtGui/QVBoxLayout>
 
 struct VolumeWidget::Private
 {
     QSlider *slider;
-    VolumeControlInterface *control;
+    QObject *control;
 };
 
 VolumeWidget::VolumeWidget(QWidget *parent)
@@ -44,16 +44,17 @@
     delete d;
 }
 
-void VolumeWidget::setVolumeControl(VolumeControlInterface *control)
+void VolumeWidget::setVolumeControl(QObject *control)
 {
     d->control = control;
 
-    if ( d->control && d->control->volumeControlIsAvailable() ) {
-        d->slider->setMinimum(d->control->minVolume());
-        d->slider->setMaximum(d->control->maxVolume());
-        d->slider->setValue(d->control->volume());
+    if ( d->control && d->control->property("volume").isValid() ) {
+        d->slider->setMinimum(d->control->property("minVolume").toInt());
+        d->slider->setMaximum(d->control->property("maxVolume").toInt());
+        d->slider->setValue(d->control->property("volume").toInt());
         d->slider->setTickPosition(QSlider::TicksAbove);
-        d->slider->setTickInterval((d->control->maxVolume() - \
d->control->minVolume())/10); +        \
d->slider->setTickInterval((d->control->property("maxVolume").toInt() - +             \
d->control->property("minVolume").toInt())/10);  setEnabled(true);
     } else {
         setEnabled(false);
@@ -63,8 +64,8 @@
 void VolumeWidget::onSliderValueChanged(int value)
 {
     Q_ASSERT(d->control);
-    d->control->setVolume(value);
-    d->slider->setValue(d->control->volume());
+    d->control->setProperty("volume", QVariant(value));
+    d->slider->setValue(d->control->property("volume").toInt());
 }
 
 #include "volumewidget.moc"
--- trunk/playground/network/kcall/kcall_handler/volumewidget.h #998731:998732
@@ -18,7 +18,6 @@
 #define VOLUMEWIDGET_H
 
 #include <QtGui/QWidget>
-class VolumeControlInterface;
 
 class VolumeWidget : public QWidget
 {
@@ -27,7 +26,7 @@
     VolumeWidget(QWidget *parent = 0);
     virtual ~VolumeWidget();
 
-    void setVolumeControl(VolumeControlInterface *control);
+    void setVolumeControl(QObject *control);
 
 private slots:
     void onSliderValueChanged(int value);
--- trunk/playground/network/kcall/libkgstdevices/CMakeLists.txt #998731:998732
@@ -1,16 +1,13 @@
+include_directories(${KDE4_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR})
+add_definitions(${KDE4_DEFINITIONS})
 
-include_directories(${GSTREAMER_INCLUDE_DIR} ${GLIB2_INCLUDE_DIR}
-                    ${LIBXML2_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
-
 set(kgstdevices_SRCS
-    elementfactory_p.cpp
-    devicefactory.cpp
-    mediadevices.cpp
+    devicemanager.cpp
+    devicesmodel.cpp
+    devicechooser.cpp
 )
 
-kde4_add_library(kgstdevices ${kgstdevices_SRCS})
-target_link_libraries(kgstdevices ${KDE4_KDECORE_LIBS}
-                                    ${GSTREAMER_LIBRARIES}
-                                    ${GOBJECT_LIBRARIES})
-
-#install(TARGETS kgstdevices ${INSTALL_TARGETS_DEFAULT_ARGS})
+kde4_add_ui_files(kgstdevices_SRCS audiodevicechooser.ui)
+kde4_add_library(kgstdevices STATIC ${kgstdevices_SRCS})
+#set_target_properties(kgstdevices PROPERTIES SOVERSION 0 VERSION 0.0.1)
+#target_link_libraries(kgstdevices ${KDE4_KDEUI_LIBS} ${KDE4_SOLID_LIBS} \
-lQtGstreamer)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic