[vlc-commits] [Git][videolan/vlc][master] qml: cleanup video recent view

2022-03-08 Thread Jean-Baptiste Kempf (@jbk)


Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
d8f6e988 by Prince Gupta at 2022-03-08T23:11:04+00:00
qml: cleanup video recent view

also fixes Video caption not visible when recent model is empty

- - - - -


3 changed files:

- modules/gui/qt/medialibrary/qml/VideoAll.qml
- modules/gui/qt/medialibrary/qml/VideoAllSubDisplay.qml
- modules/gui/qt/medialibrary/qml/VideoDisplayRecentVideos.qml


Changes:

=
modules/gui/qt/medialibrary/qml/VideoAll.qml
=
@@ -140,10 +140,8 @@ FocusScope {
 
 function _onNavigationUp() {
 // NOTE: We are calling the header focus function when we have one.
-if (headerItem && headerItem.visible
-&&
-(typeof headerItem.setCurrentItemFocus === "function"))
-headerItem.setCurrentItemFocus(Qt.TabFocusReason)
+if (headerItem && headerItem.focus)
+headerItem.forceActiveFocus(Qt.TabFocusReason)
 else
 Navigation.defaultNavigationUp()
 }
@@ -312,10 +310,11 @@ FocusScope {
 Component {
 id: list
 
-VideoListDisplay
-{
+VideoListDisplay {
 id: listView
 
+readonly property real contentMargin: VLCStyle.margin_normal
+
 // Settings
 
 model: root.model


=
modules/gui/qt/medialibrary/qml/VideoAllSubDisplay.qml
=
@@ -83,8 +83,8 @@ VideoAll {
 // VideoAll reimplementation
 
 function setCurrentItemFocus(reason) {
-if (modelRecent.count)
-headerItem.setCurrentItemFocus(reason)
+if (headerItem && headerItem.focus)
+headerItem.forceActiveFocus(reason)
 else
 _currentView.setCurrentItemFocus(reason)
 }
@@ -187,78 +187,17 @@ VideoAll {
 }
 }
 
-// Children
-
-MLRecentsVideoModel {
-id: modelRecent
-
-ml: MediaLib
-}
-
-header: Column {
-property Item focusItem: (loader.status === Loader.Ready) ? 
loader.item.focusItem
-  : null
-
-property alias loader: loader
-
+header: VideoDisplayRecentVideos {
 width: root.width
 
-topPadding: VLCStyle.margin_normal
-bottomPadding: VLCStyle.margin_normal
-
-// NOTE: We want the header to be visible when we have at least one 
media visible.
-//   Otherwise it overlaps the default caption.
-visible: (root.model.count && modelRecent.count)
-
-function setCurrentItemFocus(reason) {
-var item = loader.item;
-
-if (item)
-item.setCurrentItemFocus(reason);
-}
-
-Loader {
-id: loader
-
-anchors.left : parent.left
-anchors.right: parent.right
+// NOTE: We want grid items to be visible on the sides.
+leftPadding: root.contentMargin
 
-anchors.margins: root.contentMargin
+Navigation.parentItem: root
 
-height: (status === Loader.Ready) ? item.implicitHeight : 0
-
-active: (modelRecent.count)
-
-visible: active
-
-sourceComponent: VideoDisplayRecentVideos {
-id: component
-
-width: parent.width
-
-// NOTE: We want grid items to be visible on the sides.
-displayMargins: root.contentMargin
-
-model: modelRecent
-
-focus: true
-
-Navigation.parentItem: root
-
-Navigation.downAction: function() {
-_currentView.setCurrentItemFocus(Qt.TabFocusReason);
-}
-}
+Navigation.downAction: function() {
+_currentView.setCurrentItemFocus(Qt.TabFocusReason);
 }
 
-Widgets.SubtitleLabel {
-anchors.left: loader.left
-anchors.right: loader.right
-
-// NOTE: We want this to be properly aligned with the grid items.
-anchors.leftMargin: VLCStyle.margin_normal
-
-text: I18n.qtr("Videos")
-}
 }
 }


=
modules/gui/qt/medialibrary/qml/VideoDisplayRecentVideos.qml
=
@@ -30,35 +30,17 @@ import "qrc:///style/"
 FocusScope {
 id: root
 
-// Properties
-
-property Item focusItem: listView
-
-property alias currentIndex: listView.currentIndex
-
-property alias model: listView.model
-
-// Properties
-
-property int displayMargins: 0
+property alias leftPadding: recentVideosColumn.leftPadding
+property alias rightPadding: recentVideosColumn.rightPadding
 
 // Settings
 
 implicitHeight: recentVideosColumn.height
 
-// Events
-
-onFocusChanged: {
-if (activeFocus && root.currentIndex === -1 && root.model.count > 0)
-

[vlc-commits] [Git][videolan/vlc][master] share: fix appdata.xml rules

2022-03-08 Thread @Courmisch


Rémi Denis-Courmont pushed to branch master at VideoLAN / VLC


Commits:
d64976fd by Rémi Denis-Courmont at 2022-03-08T21:16:13+00:00
share: fix appdata.xml rules

- - - - -


1 changed file:

- share/Makefile.am


Changes:

=
share/Makefile.am
=
@@ -7,8 +7,7 @@ if !HAVE_WIN32
 if !HAVE_DARWIN
 desktop_DATA = vlc.desktop vlc-openbd.desktop vlc-opendvd.desktop 
vlc-openvcd.desktop vlc-opencda.desktop
 appdatadir = $(datarootdir)/metainfo
-appdata_DATA = $(appdata_in_files:.xml.in=.xml)
-appdata_in_files = vlc.appdata.xml.in
+appdata_DATA = vlc.appdata.xml
 endif
 endif
 
@@ -25,7 +24,10 @@ CLEANFILES += $(desktop_DATA) $(appdata_DATA)
$(AM_V_at)mv -f tmp-$@ $@
 
 vlc.appdata.xml: vlc.appdata.xml.in
-   $(AM_V_GEN)$(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@ || 
cp $< $@
+   $(AM_V_GEN)$(MSGFMT) --xml --template "$<" -d "$(top_srcdir)/po" \
+   -o "$@.tmp" || \
+   cp $< $@.tmp
+   $(AM_V_at)mv -f "$@.tmp" "$@"
 
 iconsdatadir = $(datadir)/icons/hicolor
 icons16dir = $(iconsdatadir)/16x16/apps



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/d64976fd7e4f3b6abb4b9aa8903a43db1ecb5135

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/d64976fd7e4f3b6abb4b9aa8903a43db1ecb5135
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

[vlc-commits] [Git][videolan/vlc] Pushed new tag 3.0.17.2

2022-03-08 Thread @chouquette


Hugo Beauzée-Luyssen pushed new tag 3.0.17.2 at VideoLAN / VLC

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/tree/3.0.17.2
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

[vlc-commits] [Git][videolan/vlc][3.0.x] 2 commits: Update NEWS

2022-03-08 Thread @chouquette


Hugo Beauzée-Luyssen pushed to branch 3.0.x at VideoLAN / VLC


Commits:
762136b6 by Hugo Beauzée-Luyssen at 2022-03-08T11:36:39+00:00
Update NEWS

- - - - -
c4ab31d5 by Hugo Beauzée-Luyssen at 2022-03-08T11:36:39+00:00
On the road to 3.0.17.2

- - - - -


2 changed files:

- NEWS
- configure.ac


Changes:

=
NEWS
=
@@ -1,3 +1,12 @@
+Changes between 3.0.17 and 3.0.17.2:
+--
+
+Interface:
+ * Qt: Fix right click support on video
+
+Misc:
+ * Update YouTube script
+
 Changes between 3.0.16 and 3.0.17:
 --
 


=
configure.ac
=
@@ -2,11 +2,11 @@ dnl Autoconf settings for vlc
 
 AC_COPYRIGHT([Copyright 1999-2022 VLC authors and VideoLAN])
 
-AC_INIT(vlc, 3.0.17)
+AC_INIT(vlc, 3.0.17.2)
 VERSION_MAJOR=3
 VERSION_MINOR=0
 VERSION_REVISION=17
-VERSION_EXTRA=0
+VERSION_EXTRA=2
 VERSION_DEV=
 
 PKGDIR="vlc"



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/8dc979d5787032a1bc38c5b09544db1e0556d9db...c4ab31d5f0d5d0ba298706241d5b67ae49215935

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/8dc979d5787032a1bc38c5b09544db1e0556d9db...c4ab31d5f0d5d0ba298706241d5b67ae49215935
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

[vlc-commits] [Git][videolan/vlc][3.0.x] codec: avcodec: use filtered/best effort pts

2022-03-08 Thread Jean-Baptiste Kempf (@jbk)


Jean-Baptiste Kempf pushed to branch 3.0.x at VideoLAN / VLC


Commits:
8dc979d5 by Francois Cartegnie at 2022-03-08T11:18:16+00:00
codec: avcodec: use filtered/best effort pts

fixes playback/stuttering with wrong mux/monotonically
increasing pts on frames that must be reordered.

no change for regular pts.

(cherry picked from commit 0834d39352a299f1ada6b319fff43f3c34b9d52a)

- - - - -


1 changed file:

- modules/codec/avcodec/video.c


Changes:

=
modules/codec/avcodec/video.c
=
@@ -1117,7 +1117,11 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t 
**pp_block, bool *error
 
 /* Compute the PTS */
 #if LIBAVCODEC_VERSION_CHECK(57, 24, 0, 61, 100)
+# if LIBAVCODEC_VERSION_MICRO >= 100
+mtime_t i_pts = frame->best_effort_timestamp;
+# else
 mtime_t i_pts = frame->pts;
+# endif
 #else
 mtime_t i_pts = frame->pkt_pts;
 #endif



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/8dc979d5787032a1bc38c5b09544db1e0556d9db

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/8dc979d5787032a1bc38c5b09544db1e0556d9db
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

[vlc-commits] [Git][videolan/vlc][3.0.x] qt: fix typo in mouse event handling

2022-03-08 Thread @chouquette


Hugo Beauzée-Luyssen pushed to branch 3.0.x at VideoLAN / VLC


Commits:
e63e7a06 by Thomas Guillem at 2022-03-08T10:22:59+00:00
qt: fix typo in mouse event handling

Fixes #26684

Regression from d5e53764ba89d36ca5c300e0cc0f5261b0abe8ac

- - - - -


1 changed file:

- modules/gui/qt/components/interface_widgets.cpp


Changes:

=
modules/gui/qt/components/interface_widgets.cpp
=
@@ -341,7 +341,7 @@ void VideoWidget::mouseReleaseEvent( QMouseEvent *event )
 
 void VideoWidget::mousePressEvent( QMouseEvent* event )
 {
-if ( !p_window || enable_mouse_events )
+if ( !p_window || !enable_mouse_events )
 {
 event->ignore();
 return;



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/e63e7a06341ed8eac34fabc30da43d5bf34b4255

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/e63e7a06341ed8eac34fabc30da43d5bf34b4255
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

[vlc-commits] [Git][videolan/vlc][3.0.x] youtube.lua: update "n" descrambling function name parsing

2022-03-08 Thread @chouquette


Hugo Beauzée-Luyssen pushed to branch 3.0.x at VideoLAN / VLC


Commits:
2c31361c by Pierre Ynard at 2022-03-08T10:03:32+00:00
youtube.lua: update "n" descrambling function name parsing

The descrambling function is now called through an intermediate array
variable. This change has also added two extra ways to recover the
function name. Add support to parse and resolve any of them.

Fixes #26574

(cherry picked from commit 3df28fc51ef2ea46084aef1785ded18afa31ef9e)
Signed-off-by: Jean-Baptiste Kempf 

- - - - -


1 changed file:

- share/lua/playlist/youtube.lua


Changes:

=
share/lua/playlist/youtube.lua
=
@@ -1,7 +1,7 @@
 --[[
  $Id$
 
- Copyright © 2007-2021 the VideoLAN team
+ Copyright © 2007-2022 the VideoLAN team
 
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
@@ -119,8 +119,37 @@ function n_descramble( nparam, js )
 end
 
 -- Look for the descrambler function's name
--- a.D&&(b=a.get("n"))&&(b=lha(b),a.set("n",b))}};
-local descrambler = js_extract( js, '[=%(,&|](...?)%(.%),.%.set%("n",' )
+-- a.C&&(b=a.get("n"))&&(b=Bpa[0](b),a.set("n",b),Bpa.length||iha(""))}};
+-- var Bpa=[iha];
+local callsite = js_extract( js, '[^;]*%.set%("n",[^};]*' )
+if not callsite then
+vlc.msg.dbg( "Couldn't extract YouTube video throttling parameter 
descrambling function name" )
+return nil
+end
+
+-- Try direct function name from following clause
+local descrambler = string.match( callsite, 
'%.set%("n",.%),...?%.length||(...?)%(' )
+local itm = nil
+if not descrambler then
+-- Try from main call site
+descrambler = string.match( callsite, 
'[=%(,&|]([a-zA-Z0-9_$%[%]]+)%(.%),.%.set%("n",' )
+if descrambler then
+-- Check if this is only an intermediate variable
+itm = string.match( descrambler, '^([^%[%]]+)%[' )
+if itm then
+descrambler = nil
+end
+else
+-- Last chance: intermediate variable in following clause
+itm = string.match( callsite, '%.set%("n",.%),(...?)%.length' )
+end
+end
+
+if not descrambler and itm then
+-- Resolve intermediate variable
+descrambler = js_extract( js, 'var '..itm..'=%[(...?)[%],]' )
+end
+
 if not descrambler then
 vlc.msg.dbg( "Couldn't extract YouTube video throttling parameter 
descrambling function name" )
 return nil



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/2c31361c347b0f31b6818a28d4fe94f9543aad56

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/2c31361c347b0f31b6818a28d4fe94f9543aad56
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

[vlc-commits] [Git][videolan/vlc][3.0.x] 2 commits: nfs: fix pf_read return values

2022-03-08 Thread Thomas Guillem (@tguillem)


Thomas Guillem pushed to branch 3.0.x at VideoLAN / VLC


Commits:
4063c515 by Thomas Guillem at 2022-03-07T09:20:04+01:00
nfs: fix pf_read return values

0 should be returned in case of EOS or error, -1 means EAGAIN.

/me blames me for not reading the documentation.

(cherry picked from commit 59a3d85dd2bf642a81c95f91ef320cf4164d5671)
Signed-off-by: Thomas Guillem 

- - - - -
8bff7178 by Thomas Guillem at 2022-03-07T09:21:03+01:00
smb2: fix pf_read return values

0 should be returned in case of EOS or error, -1 means EAGAIN.

/me blames me for not reading the documentation.

(cherry picked from commit 249a76b921b1a742ae9d4fa459ea7107bca08482)
Signed-off-by: Thomas Guillem 

- - - - -


2 changed files:

- modules/access/nfs.c
- modules/access/smb2.c


Changes:

=
modules/access/nfs.c
=
@@ -214,11 +214,11 @@ FileRead(stream_t *p_access, void *p_buf, size_t i_len)
p_access) < 0)
 {
 msg_Err(p_access, "nfs_read_async failed");
-return -1;
+return 0;
 }
 
 if (vlc_nfs_mainloop(p_access, nfs_read_finished_cb) < 0)
-return -1;
+return 0;
 
 return p_sys->res.read.i_len;
 }


=
modules/access/smb2.c
=
@@ -283,10 +283,7 @@ FileRead(stream_t *access, void *buf, size_t len)
 {
 struct access_sys *sys = access->p_sys;
 
-if (sys->error_status != 0)
-return -1;
-
-if (sys->eof)
+if (sys->eof || sys->error_status != 0)
 return 0;
 
 /* Limit the read size since smb2_read_async() will complete only after
@@ -300,11 +297,11 @@ FileRead(stream_t *access, void *buf, size_t len)
 smb2_read_cb, access) < 0)
 {
 VLC_SMB2_SET_ERROR(access, "smb2_read_async", 1);
-return -1;
+return 0;
 }
 
 if (vlc_smb2_mainloop(access, false) < 0)
-return -1;
+return 0;
 
 return sys->res.read.len;
 }



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/583426556280120843d8de5d5986663a3b43568f...8bff7178c720dd0c4df56a8dc34bd86fac7801e8

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/583426556280120843d8de5d5986663a3b43568f...8bff7178c720dd0c4df56a8dc34bd86fac7801e8
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits