[SCM] vlc/master: Upstream patches to fix resume playback

sramacher at users.alioth.debian.org sramacher at users.alioth.debian.org
Sun Mar 13 20:13:51 UTC 2016


The following commit has been merged in the master branch:
commit b27eace809b3ddc4d8bd0e007b5abfcc42ea0f46
Author: Sebastian Ramacher <sramacher at debian.org>
Date:   Sun Mar 13 21:12:38 2016 +0100

    Upstream patches to fix resume playback

diff --git a/debian/patches/qt4-Fix-resume-where-you-left-off.patch b/debian/patches/qt4-Fix-resume-where-you-left-off.patch
new file mode 100644
index 0000000..00ed795
--- /dev/null
+++ b/debian/patches/qt4-Fix-resume-where-you-left-off.patch
@@ -0,0 +1,70 @@
+From f44922c97b20d1978623766b15a73675777f5323 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo at beauzee.fr>
+Date: Tue, 16 Feb 2016 17:20:03 +0100
+Subject: [PATCH 19/60] qt4: Fix "resume where you left off"
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+fix #16593
+
+(cherry picked from commit 60399fdf58f7ad61c6e561e0f81cb736cb5413b0)
+Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
+---
+ modules/gui/qt4/input_manager.cpp | 29 ++++++++++++++---------------
+ 1 file changed, 14 insertions(+), 15 deletions(-)
+
+diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
+index 707f114..6734bfd 100644
+--- a/modules/gui/qt4/input_manager.cpp
++++ b/modules/gui/qt4/input_manager.cpp
+@@ -127,11 +127,11 @@ void InputManager::setInput( input_thread_t *_p_input )
+         p_item = input_GetItem( p_input );
+         emit rateChanged( var_GetFloat( p_input, "rate" ) );
+ 
+-        char *uri = input_item_GetURI( p_item );
+-
+         /* Get Saved Time */
+         if( p_item->i_type == ITEM_TYPE_FILE )
+         {
++            char *uri = input_item_GetURI( p_item );
++
+             int i_time = RecentsMRL::getInstance( p_intf )->time( qfu(uri) );
+             if( i_time > 0 && qfu( uri ) != lastURI &&
+                     !var_GetFloat( p_input, "run-time" ) &&
+@@ -140,20 +140,19 @@ void InputManager::setInput( input_thread_t *_p_input )
+             {
+                 emit resumePlayback( (int64_t)i_time * 1000 );
+             }
++            playlist_Lock( THEPL );
++            // Add root items only
++            playlist_item_t* p_node = playlist_CurrentPlayingItem( THEPL );
++            if ( p_node != NULL && ( p_node->p_parent == NULL || p_node->i_children == -1 ) )
++            {
++                // Save the latest URI to avoid asking to restore the
++                // position on the same input file.
++                lastURI = qfu( uri );
++                RecentsMRL::getInstance( p_intf )->addRecent( lastURI );
++            }
++            playlist_Unlock( THEPL );
++            free( uri );
+         }
+-
+-        playlist_Lock( THEPL );
+-        // Add root items only
+-        playlist_item_t* p_node = playlist_CurrentPlayingItem( THEPL );
+-        if ( p_node != NULL && p_node->p_parent == NULL )
+-        {
+-            // Save the latest URI to avoid asking to restore the
+-            // position on the same input file.
+-            lastURI = qfu( uri );
+-            RecentsMRL::getInstance( p_intf )->addRecent( lastURI );
+-        }
+-        playlist_Unlock( THEPL );
+-        free( uri );
+     }
+     else
+     {
+-- 
+2.7.0
+
diff --git a/debian/patches/qt4-input_manager-Always-reset-lastURI-when-stopping.patch b/debian/patches/qt4-input_manager-Always-reset-lastURI-when-stopping.patch
new file mode 100644
index 0000000..36a3f2e
--- /dev/null
+++ b/debian/patches/qt4-input_manager-Always-reset-lastURI-when-stopping.patch
@@ -0,0 +1,41 @@
+From 748b744594dbbdc0ec52149c2b6c4b3aca0a22c4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo at beauzee.fr>
+Date: Thu, 18 Feb 2016 18:12:43 +0100
+Subject: [PATCH 20/60] qt4: input_manager: Always reset lastURI when stopping
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This allow the resume where you left off feature to kick in when
+starting the playback again, but not when cycling through a playlist
+refs #11704
+
+(cherry picked from commit 285a3efcbb4f64ea4d9812d1f94605cef7c65083)
+Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
+---
+ modules/gui/qt4/input_manager.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
+index 6734bfd..89f8ba4 100644
+--- a/modules/gui/qt4/input_manager.cpp
++++ b/modules/gui/qt4/input_manager.cpp
+@@ -157,6 +157,7 @@ void InputManager::setInput( input_thread_t *_p_input )
+     else
+     {
+         p_item = NULL;
++        lastURI.clear();
+         assert( !p_input_vbi );
+         emit rateChanged( var_InheritFloat( p_intf, "rate" ) );
+     }
+@@ -1122,7 +1123,6 @@ void MainInputManager::probeCurrentInput()
+ void MainInputManager::stop()
+ {
+    playlist_Stop( THEPL );
+-   getIM()->lastURI.clear();
+ }
+ 
+ void MainInputManager::next()
+-- 
+2.7.0
+

-- 
VLC media player packaging



More information about the pkg-multimedia-commits mailing list