[Kamoso] Review Request 118979: Porting to GStreamer-1.0 API and QtGStreamer-1.2

Diane Trout diane at ghic.org
Sat Jun 28 17:57:08 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/118979/#review61150
-----------------------------------------------------------


Some useful differences:

My version used a CMake variable for the gstreamer API. Not sure if that's needed.

-FIND_LIBRARY(GSTREAMER_LIBRARIES NAMES gstreamer-1.0
+FIND_LIBRARY(GSTREAMER_LIBRARIES NAMES gstreamer-${GSTREAMER_API_VERSION}

My version has the RGB caps... I'm not sure why.

@@ -131,7 +131,8 @@ void WebcamWidget::playFile(const Device &device)
     QByteArray pipe = basicPipe();
 
     //Set the right colorspace to convert to QImage
-    pipe += " ! videoconvert"
+    pipe += " ! videoconvert ! "
+            GST_VIDEO_CAPS_MAKE("RGB")
             " ! fakesink name=fakesink";

Potentially useful crash protection.

@@ -179,6 +180,9 @@ bool WebcamWidget::takePhoto(const KUrl &dest)
     }
     kDebug() << dest;
     d->destination = dest;
+    if (!d->m_bin) {
+        return false;
+    }
     d->m_bin->getElementByName("fakesink")->setProperty("signal-handoffs", true);
     QGlib::connect(d->m_bin->getElementByName("fakesink"), "handoff", this, &WebcamWidget::photoGstCallback);
     return true;

Didn't x-raw-int go away?
@@ -309,7 +301,7 @@ void WebcamWidget::recordVideo(bool sound)
         //Get the audio from alsa
         " ! mux. autoaudiosrc "
         //Sound type and quality
-        " ! audio/x-raw-int,rate=48000,channels=2,depth=16 "
+        " ! audio/x-raw,rate=48000,channels=2,depth=16 "
         //Encode sound as vorbis
         " ! queue ! audioconvert ! queue "
         " ! vorbisenc "


I like this differnce. using an extra variable makes this easier to read.
Though my comparison was to video/x-raw (though that was a total guess).
Is YUV more correct?

@@ -190,85 +194,73 @@ void WebcamWidget::photoGstCallback(QGst::BufferPtr buffer, QGst::PadPtr pad)
     height = structure.data()->value("height").get<int>();
+    QString format;
+    format = structure.data()->value("format").get<QString>();
     kDebug() << "We've got a caps in here";
     kDebug() << "Size: " << width << "x" << height;
     kDebug() << "Name: " << structure.data()->name();
+    kDebug() << "Format: " << format;
 
-    if (qstrcmp(structure.data()->name().toLatin1(), "video/x-raw") == 0) {
+    if (format == "YUV") {


- Diane Trout


On June 27, 2014, 2:04 p.m., Andreas Cord-Landwehr wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/118979/
> -----------------------------------------------------------
> 
> (Updated June 27, 2014, 2:04 p.m.)
> 
> 
> Review request for Kamoso, Àlex Fiestas, Aleix Pol Gonzalez, Diane Trout, and George Kiagiadakis.
> 
> 
> Repository: kamoso
> 
> 
> Description
> -------
> 
> This is the first iteration of a porting patch to upgrade Kamoso to work with GStreamer-1.x (in particular, 0.10 is deprecated and unmaintained by upstream). The patch in its current version does the following:
> * update the cmake find module to find the new version of gstreamer and qtgstreamer
> * fixes compilation with the new version
> I am quite sure that further changes at the pipelines are necessary to make it work at runtime, yet an area where I do not have much experience (hence, all these people you get the review request :)
> 
> In the big picture, I would like to have Kamoso ported asap, since with Artikulate a first KDE application switched to the new QtGStreamer version and the continiuous integration system can only support one qtgstreamer version for all. Also, it would be good to have all KDE applications ready for QtGStreamer-1.2 with the KDE SC 4.14 release to allow distros to upgrade all in one step.
> 
> 
> Diffs
> -----
> 
>   CMakeLists.txt 5d6bfb1 
>   cmake/FindGStreamer.cmake a1b6e33 
>   src/webcamwidget.cpp 62b7831 
> 
> Diff: https://git.reviewboard.kde.org/r/118979/diff/
> 
> 
> Testing
> -------
> 
> Compiles, but no runtime testing done.
> 
> 
> Thanks,
> 
> Andreas Cord-Landwehr
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-kamoso/attachments/20140628/1c71f980/attachment.html>


More information about the KDE-Kamoso mailing list