Hello community,

here is the log from the commit of package phonon-backend-gstreamer for 
openSUSE:Factory checked in at 2014-10-25 08:32:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/phonon-backend-gstreamer (Old)
 and      /work/SRC/openSUSE:Factory/.phonon-backend-gstreamer.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "phonon-backend-gstreamer"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/phonon-backend-gstreamer/phonon-backend-gstreamer.changes
        2014-08-16 15:37:31.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.phonon-backend-gstreamer.new/phonon-backend-gstreamer.changes
   2014-10-25 08:32:27.000000000 +0200
@@ -1,0 +2,10 @@
+Sun Oct 19 18:01:21 UTC 2014 - [email protected]
+
+- Update to 4.8.0
+   * Use correct RGB color format in QWidgetVideoSink
+   * AudioDataOutput: flush m_pendingData when channels count changes,
+     kde#331916
+- Drop gstreamer_0.10 conditionals, pGST now only supports gstreamer
+  1.0 API
+
+-------------------------------------------------------------------

Old:
----
  phonon-backend-gstreamer-4.7.80.tar.xz

New:
----
  phonon-backend-gstreamer-4.8.0.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ phonon-backend-gstreamer.spec ++++++
--- /var/tmp/diff_new_pack.3AXQ5J/_old  2014-10-25 08:32:27.000000000 +0200
+++ /var/tmp/diff_new_pack.3AXQ5J/_new  2014-10-25 08:32:27.000000000 +0200
@@ -16,40 +16,30 @@
 #
 
 
-%define rversion 4.7.80
-%define _phonon_version 4.7.80
+%define _phonon_version 4.8.0
 
 Name:           phonon-backend-gstreamer
-Version:        4.7.80
+Version:        4.8.0
 Release:        0
 Summary:        Phonon Multimedia Platform Abstraction
 License:        LGPL-2.1 or LGPL-3.0
 Group:          System/GUI/KDE
 Url:            http://phonon.kde.org/
-Source:         
http://download.kde.org/unstable/phonon/%{name}/%{version}/%{name}-%{version}.tar.xz
+Source:         
http://download.kde.org/stable/phonon/%{name}/%{version}/%{name}-%{version}.tar.xz
+BuildRequires:  -post-build-checks
 BuildRequires:  alsa-devel
 BuildRequires:  automoc4
 BuildRequires:  cmake
 BuildRequires:  fdupes
-%if 0%{?suse_version} > 1310
-BuildRequires:  pkgconfig(gstreamer-1.0)
-BuildRequires:  pkgconfig(gstreamer-plugins-base-1.0)
-%else 
-BuildRequires:  gstreamer-0_10-plugins-base-devel
-%endif
-BuildRequires:  -post-build-checks
 BuildRequires:  kde4-filesystem
 BuildRequires:  phonon-devel
 BuildRequires:  update-desktop-files
 BuildRequires:  xz
+BuildRequires:  pkgconfig(gstreamer-1.0)
+BuildRequires:  pkgconfig(gstreamer-plugins-base-1.0)
 BuildRequires:  pkgconfig(libxml-2.0)
 Requires:       libphonon4 => %{_phonon_version}
-# WARNING if someone changes from gstreamer_0.10 to gstreamer-plugins for oS 
<= 13.1, make sure you build libQtWebkit4 with gst1.0.
-%if 0%{?suse_version} > 1310
 Supplements:    packageand(gstreamer-plugins-base:phonon)
-%else
-Supplements:    packageand(gstreamer-0_10-plugins-base:phonon)
-%endif
 Obsoletes:      phonon-backend-gstreamer-0_10 < %{version}
 Provides:       phonon-backend = %{version}
 Provides:       phonon-backend-gstreamer-0_10 = %{version}
@@ -62,7 +52,7 @@
 used.
 
 %prep
-%setup -q -n %{name}-%{rversion}
+%setup -q -n %{name}-%{version}
 
 %build
   %cmake_kde4 -d build

++++++ phonon-backend-gstreamer-4.7.80.tar.xz -> 
phonon-backend-gstreamer-4.8.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/phonon-backend-gstreamer-4.7.80/CMakeLists.txt 
new/phonon-backend-gstreamer-4.8.0/CMakeLists.txt
--- old/phonon-backend-gstreamer-4.7.80/CMakeLists.txt  2014-08-12 
20:25:41.000000000 +0200
+++ new/phonon-backend-gstreamer-4.8.0/CMakeLists.txt   2014-09-06 
18:13:59.000000000 +0200
@@ -6,8 +6,8 @@
 set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
 
 set(PHONON_GST_MAJOR_VERSION "4")
-set(PHONON_GST_MINOR_VERSION "7")
-set(PHONON_GST_PATCH_VERSION "80")
+set(PHONON_GST_MINOR_VERSION "8")
+set(PHONON_GST_PATCH_VERSION "0")
 set(PHONON_GST_VERSION 
"${PHONON_GST_MAJOR_VERSION}.${PHONON_GST_MINOR_VERSION}.${PHONON_GST_PATCH_VERSION}")
 
 add_definitions(-DPHONON_GST_VERSION="${PHONON_GST_VERSION}")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/phonon-backend-gstreamer-4.7.80/gstreamer/audiodataoutput.cpp 
new/phonon-backend-gstreamer-4.8.0/gstreamer/audiodataoutput.cpp
--- old/phonon-backend-gstreamer-4.7.80/gstreamer/audiodataoutput.cpp   
2014-08-12 20:25:41.000000000 +0200
+++ new/phonon-backend-gstreamer-4.8.0/gstreamer/audiodataoutput.cpp    
2014-09-06 18:13:59.000000000 +0200
@@ -96,7 +96,7 @@
     return 44100;
 }
 
-inline void AudioDataOutput::convertAndEmit()
+inline void AudioDataOutput::convertAndEmit(bool isEndOfMedia)
 {
     QMap<Phonon::AudioDataOutput::Channel, QVector<qint16> > map;
 
@@ -105,7 +105,34 @@
         Q_ASSERT(i == 0 || m_channelBuffers[i - 1].size() == 
m_channelBuffers[i].size());
     }
 
+    if (isEndOfMedia) {
+        emit endOfMedia(m_channelBuffers[0].size());
+    }
     emit dataReady(map);
+
+
+    for (int j = 0 ; j < m_channels ; ++j) {
+        // QVector::resize doesn't reallocate the buffer
+        m_channelBuffers[j].resize(0);
+    }
+}
+
+void AudioDataOutput::flushPendingData()
+{
+    if (m_pendingData.size() == 0) {
+        return;
+    }
+
+    // Since pendingData is a concatenation of buffers it must share its
+    // attribute of being a multiple of channelCount
+    Q_ASSERT((m_pendingData.size() % m_channels) == 0);
+    for (int i = 0; i < m_pendingData.size(); i += m_channels) {
+        for (int j = 0; j < m_channels; ++j) {
+            m_channelBuffers[j].append(m_pendingData[i + j]);
+        }
+    }
+
+    m_pendingData.resize(0);
 }
 
 void AudioDataOutput::processBuffer(GstElement*, GstBuffer* buffer, GstPad* 
pad, gpointer gThat)
@@ -119,12 +146,25 @@
         return;
     }
 
+    int channelsCount = 0;
+
     // determine the number of channels
     GstCaps *caps = gst_pad_get_current_caps(GST_PAD(pad));
     GstStructure *structure = gst_caps_get_structure(caps, 0);
-    gst_structure_get_int(structure, "channels", &that->m_channels);
+    gst_structure_get_int(structure, "channels", &channelsCount);
     gst_caps_unref(caps);
 
+    // Channels count have changed, so emit the pending data that have the old
+    // channels count, before we fill the buffer with new pending data
+    if (that->m_pendingData.size() > 0 && channelsCount != that->m_channels) {
+        const bool isEndOfMedia = (that->m_pendingData.size() / 
that->m_channels) == dataSize;
+        that->flushPendingData();
+        that->convertAndEmit(isEndOfMedia);
+    }
+
+    // Now update the channels count
+    that->m_channels = channelsCount;
+
     // Let's get the buffers
     gint16 *gstBufferData;
     guint gstBufferSize;
@@ -144,6 +184,10 @@
         return;
     }
 
+    if (that->m_pendingData.capacity() != dataSize) {
+        that->m_pendingData.reserve(dataSize);
+    }
+
     // I set the number of channels
     if (that->m_channelBuffers.size() != that->m_channels) {
         that->m_channelBuffers.resize(that->m_channels);
@@ -164,23 +208,8 @@
 
     // SENDING DATA
 
-    // 1) I empty the stored data
-    if (that->m_pendingData.size() != 0) {
-        // Since pendingData is a concatenation of buffers it must share its
-        // attribute of being a multiple of channelCount
-        Q_ASSERT((that->m_pendingData.size() % that->m_channels) == 0);
-        for (int i = 0; i < that->m_pendingData.size(); i += that->m_channels) 
{
-            for (int j = 0; j < that->m_channels; ++j) {
-                that->m_channelBuffers[j].append(that->m_pendingData[i+j]);
-            }
-        }
-
-        if (that->m_pendingData.capacity() != dataSize) {
-            that->m_pendingData.reserve(dataSize);
-        }
-
-        that->m_pendingData.resize(0);
-    }
+    // 1) I write pending data to buffers
+    that->flushPendingData();
 
     // 2) I fill with fresh data and send
     for (int i = 0 ; i < that->m_channels ; ++i) {
@@ -197,12 +226,7 @@
             }
         }
 
-        that->convertAndEmit();
-
-        for (int j = 0 ; j < that->m_channels ; ++j) {
-            // QVector::resize doesn't reallocate the buffer
-            that->m_channelBuffers[j].resize(0);
-        }
+        that->convertAndEmit(false);
     }
 
     // 3) I store the rest of data
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/phonon-backend-gstreamer-4.7.80/gstreamer/audiodataoutput.h 
new/phonon-backend-gstreamer-4.8.0/gstreamer/audiodataoutput.h
--- old/phonon-backend-gstreamer-4.7.80/gstreamer/audiodataoutput.h     
2014-08-12 20:25:41.000000000 +0200
+++ new/phonon-backend-gstreamer-4.8.0/gstreamer/audiodataoutput.h      
2014-09-06 18:13:59.000000000 +0200
@@ -73,7 +73,8 @@
     void endOfMedia(int remainingSamples);
 
 private:
-    void convertAndEmit();
+    void flushPendingData();
+    void convertAndEmit(bool isEndOfMedia);
 
     GstElement *m_queue;
     Phonon::AudioDataOutput *m_frontend;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/phonon-backend-gstreamer-4.7.80/gstreamer/qwidgetvideosink.cpp 
new/phonon-backend-gstreamer-4.8.0/gstreamer/qwidgetvideosink.cpp
--- old/phonon-backend-gstreamer-4.7.80/gstreamer/qwidgetvideosink.cpp  
2014-08-12 20:25:41.000000000 +0200
+++ new/phonon-backend-gstreamer-4.8.0/gstreamer/qwidgetvideosink.cpp   
2014-09-06 18:13:59.000000000 +0200
@@ -112,7 +112,16 @@
     GST_STATIC_PAD_TEMPLATE("sink",
                             GST_PAD_SINK,
                             GST_PAD_ALWAYS,
-                            GST_STATIC_CAPS(GST_VIDEO_CAPS_MAKE("xRGB"))
+                            GST_STATIC_CAPS(
+                                    "video/x-raw, "
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+                                    "format = (string) BGRx,"
+#else
+                                    "format = (string) xRGB,"
+#endif
+                                    "width = " GST_VIDEO_SIZE_RANGE ","
+                                    "height = " GST_VIDEO_SIZE_RANGE ","
+                                    "framerate = " GST_VIDEO_FPS_RANGE)
     );
 
 template <VideoFormat FMT>

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to