[vlc-commits] [Git][videolan/vlc][master] qt: do not use double precision in settings

2024-06-01 Thread Steve Lhomme (@robUx4)


Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
05134504 by Fatih Uzunoglu at 2024-06-02T06:23:07+00:00
qt: do not use double precision in settings

The docs state that:

> Note that INI files lose the distinction
between numeric data and the strings used
to encode them, so values written as numbers
shall be read back as QString. The numeric
value can be recovered using QString::toInt(),
QString::toDouble() and related functions.

Currently, double-precision numbers can not
be reconstructed properly due to QString's
way of handling dp numbers.

Since they are read back as QString, we
should save these numbers according to the
precision that QString is comfortable with,
so that they are parsed properly when the
application starts.

- - - - -


1 changed file:

- modules/gui/qt/maininterface/mainctx.cpp


Changes:

=
modules/gui/qt/maininterface/mainctx.cpp
=
@@ -235,12 +235,12 @@ MainCtx::~MainCtx()
 settings->beginGroup("MainWindow");
 settings->setValue( "pl-dock-status", b_playlistDocked );
 settings->setValue( "ShowRemainingTime", m_showRemainingTime );
-settings->setValue( "interface-scale", m_intfUserScaleFactor );
+settings->setValue( "interface-scale", QString::number( 
m_intfUserScaleFactor ) );
 
 /* Save playlist state */
 settings->setValue( "playlist-visible", m_playlistVisible );
-settings->setValue( "playlist-width-factor", m_playlistWidthFactor);
-settings->setValue( "player-playlist-width-factor", 
m_playerPlaylistWidthFactor);
+settings->setValue( "playlist-width-factor", QString::number( 
m_playlistWidthFactor ) );
+settings->setValue( "player-playlist-width-factor", QString::number( 
m_playerPlaylistWidthFactor ) );
 
 settings->setValue( "grid-view", m_gridView );
 settings->setValue( "grouping", m_grouping );



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

-- 
This project does not include diff previews in email notifications.
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/05134504b0dd59100db6327acd2ad7b06b149cb2
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][master] 3 commits: qt: add `inputItem()` method to PlaylistItem

2024-06-01 Thread @fkuehne


Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
95d26c79 by Fatih Uzunoglu at 2024-06-01T16:58:54+00:00
qt: add `inputItem()` method to PlaylistItem

- - - - -
0d83ffab by Fatih Uzunoglu at 2024-06-01T16:58:54+00:00
qt: accept `PlaylistItem` in `vlc::playlist::toMediaList()`

- - - - -
29cde5f9 by Fatih Uzunoglu at 2024-06-01T16:58:54+00:00
qml: make ArtworkInfoWidget draggable

Dragging this toolbar control is now
possible and is equivalent to dragging
the current playlist item.

- - - - -


4 changed files:

- modules/gui/qt/player/qml/controlbarcontrols/ArtworkInfoWidget.qml
- modules/gui/qt/playlist/playlist_controller.cpp
- modules/gui/qt/playlist/playlist_item.cpp
- modules/gui/qt/playlist/playlist_item.hpp


Changes:

=
modules/gui/qt/player/qml/controlbarcontrols/ArtworkInfoWidget.qml
=
@@ -84,13 +84,42 @@ AbstractButton {
 
 onClicked: History.push(["player"])
 
+// Children
+
+Widgets.DragItem {
+id: dragItem
+
+onRequestData: (_, resolve, reject) => {
+resolve([{
+"title": Player.title,
+"cover": (!!Player.artwork && Player.artwork.toString() !== 
"") ? Player.artwork
+   
 : VLCStyle.noArtAlbumCover
+}])
+}
+
+onRequestInputItems: (indexes, data, resolve, reject) => {
+resolve([MainPlaylistController.currentItem])
+}
+
+indexes: [0]
+}
+
+DragHandler {
+target: null
+onActiveChanged: {
+if (active) {
+dragItem.Drag.active = true
+} else {
+dragItem.Drag.drop()
+}
+}
+}
+
 background: Widgets.AnimatedBackground {
 enabled: theme.initialized
 border.color: visualFocus ? theme.visualFocus : "transparent"
 }
 
-// Children
-
 contentItem: RowLayout {
 spacing: VLCStyle.margin_xsmall
 


=
modules/gui/qt/playlist/playlist_controller.cpp
=
@@ -80,10 +80,15 @@ QVector toMediaList(const QVariantList &sources)
 mrl = resolveWinSymlinks(mrl);
 
 return Media(mrl.toString(QUrl::FullyEncoded), mrl.fileName());
-} else if (value.canConvert())
+}
+else if (value.canConvert())
 {
 return Media(value.value().get());
 }
+else if (value.canConvert())
+{
+return Media(value.value().inputItem());
+}
 return Media{};
 });
 


=
modules/gui/qt/playlist/playlist_item.cpp
=
@@ -72,7 +72,8 @@ QUrl PlaylistItem::getUrl() const
 }
 
 void PlaylistItem::sync() {
-input_item_t *media = vlc_playlist_item_GetMedia(d->item.get());
+input_item_t *media = inputItem();
+assert(media);
 vlc_mutex_locker locker(&media->lock);
 d->duration = media->i_duration;
 d->url  = media->psz_uri;


=
modules/gui/qt/playlist/playlist_item.hpp
=
@@ -64,6 +64,13 @@ public:
 return d ? d->item.get() : nullptr;
 }
 
+input_item_t *inputItem() const {
+if (const auto item = raw())
+return vlc_playlist_item_GetMedia(item);
+else
+return nullptr;
+}
+
 bool isSelected() const;
 void setSelected(bool selected);
 



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/8fffc6e248d88104f338d26c64ef3a3c0c5e82bc...29cde5f95dc4bcac0c57a9f09a128768754a0253

-- 
This project does not include diff previews in email notifications.
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/8fffc6e248d88104f338d26c64ef3a3c0c5e82bc...29cde5f95dc4bcac0c57a9f09a128768754a0253
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][master] 3 commits: qml: only signal itemClicked on pressing left button in GridItem

2024-06-01 Thread @fkuehne


Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
3606e0c5 by Prince Gupta at 2024-06-01T16:28:26+00:00
qml: only signal itemClicked on pressing left button in GridItem

- - - - -
2d905951 by Prince Gupta at 2024-06-01T16:28:26+00:00
qml: remove unused params from signal itemClicked of GridItem

- - - - -
8fffc6e2 by Prince Gupta at 2024-06-01T16:28:26+00:00
qml: remove unused params from itemDoubleClicked signal of GridItem

- - - - -


10 changed files:

- modules/gui/qt/medialibrary/qml/MusicAlbums.qml
- modules/gui/qt/medialibrary/qml/MusicAllArtists.qml
- modules/gui/qt/medialibrary/qml/MusicArtist.qml
- modules/gui/qt/medialibrary/qml/MusicGenres.qml
- modules/gui/qt/medialibrary/qml/PlaylistMediaList.qml
- modules/gui/qt/medialibrary/qml/VideoGridDisplay.qml
- modules/gui/qt/network/qml/BrowseDeviceView.qml
- modules/gui/qt/network/qml/BrowseTreeDisplay.qml
- modules/gui/qt/network/qml/ServicesSources.qml
- modules/gui/qt/widgets/qml/GridItem.qml


Changes:

=
modules/gui/qt/medialibrary/qml/MusicAlbums.qml
=
@@ -110,9 +110,9 @@ MainInterface.MainViewLoader {
 
 opacity: gridView_id.expandIndex !== -1 && 
gridView_id.expandIndex !== audioGridItem.index ? .7 : 1
 dragItem: albumDragItem
-onItemClicked : (_,_,modifier) => { 
gridView_id.leftClickOnItem(modifier, index) }
+onItemClicked : (modifier) => { 
gridView_id.leftClickOnItem(modifier, index) }
 
-onItemDoubleClicked: (_,_,modifier) => {
+onItemDoubleClicked: {
 gridView_id.switchExpandItem(index)
 }
 


=
modules/gui/qt/medialibrary/qml/MusicAllArtists.qml
=
@@ -120,9 +120,9 @@ MainInterface.MainViewLoader {
 width: VLCStyle.colWidth(1)
 dragItem: artistsDragItem
 
-onItemClicked: (_,_, modifier) => { 
artistGrid.leftClickOnItem(modifier, index) }
+onItemClicked: (modifier) => { 
artistGrid.leftClickOnItem(modifier, index) }
 
-onItemDoubleClicked: (_,_, modifier) => { 
root.requestArtistAlbumView(Qt.MouseFocusReason) }
+onItemDoubleClicked: 
root.requestArtistAlbumView(Qt.MouseFocusReason)
 
 onContextMenuButtonClicked: (_, globalMousePos) => {
 artistGrid.rightClickOnItem(index)


=
modules/gui/qt/medialibrary/qml/MusicArtist.qml
=
@@ -189,7 +189,7 @@ FocusScope {
 onPlayClicked: play()
 onItemDoubleClicked: play()
 
-onItemClicked: (_,_, modifier) => {
+onItemClicked: (modifier) => {
 albumsList.selectionModel.updateSelection( 
modifier , albumsList.currentIndex, index )
 albumsList.currentIndex = index
 albumsList.forceActiveFocus()
@@ -355,7 +355,7 @@ FocusScope {
 opacity: gridView_id.expandIndex !== -1 && 
gridView_id.expandIndex !== audioGridItem.index ? .7 : 1
 dragItem: albumDragItem
 
-onItemClicked : (_,_,modifier) => {
+onItemClicked : (modifier) => {
 gridView_id.leftClickOnItem(modifier, index)
 }
 


=
modules/gui/qt/medialibrary/qml/MusicGenres.qml
=
@@ -36,7 +36,7 @@ MainInterface.MainViewLoader {
 readonly property var currentIndex: currentItem?.currentIndex ?? - 1
 
 property Component header: null
-
+
 readonly property int contentLeftMargin: currentItem?.contentLeftMargin ?? 0
 readonly property int contentRightMargin: currentItem?.contentRightMargin 
?? 0
 
@@ -145,8 +145,8 @@ MainInterface.MainViewLoader {
 playCoverBorderWidth: VLCStyle.dp(3, VLCStyle.scale)
 dragItem: genreDragItem
 
-onItemDoubleClicked: (_,_,modifier) => { 
root.showAlbumView(model.id, model.name, Qt.MouseFocusReason) }
-onItemClicked: (_,_,modifier) => { 
gridView_id.leftClickOnItem(modifier, genreGridDelegate.index) }
+onItemDoubleClicked: root.showAlbumView(model.id, model.name, 
Qt.MouseFocusReason)
+onItemClicked: (modifier) => { 
gridView_id.leftClickOnItem(modifier, item.index) }
 
 onPlayClicked: {
 if (model.id)


=
modules/gui/qt/medialibrary/qml/PlaylistMediaList.qml
=
@@ -295,9 +295,9 @@ MainInterface.MainViewLoader {
 
//-
 // Events
 
-  

[vlc-commits] [Git][videolan/vlc][master] 7 commits: qt: ensure FBO exists before destroying them in X11 compositor

2024-06-01 Thread @fkuehne


Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
27bc33a6 by Pierre Lamot at 2024-06-01T15:53:38+00:00
qt: ensure FBO exists before destroying them in X11 compositor

- - - - -
d6ab5c09 by Fatih Uzunoglu at 2024-06-01T15:53:38+00:00
qt: use destroyFbo() in CompositorX11UISurface::resizeFbo()

- - - - -
255030b1 by Fatih Uzunoglu at 2024-06-01T15:53:38+00:00
qt: remove unused member in CompositorX11UISurface

- - - - -
eeea8dde by Pierre Lamot at 2024-06-01T15:53:38+00:00
qt: fix freeze after minimizing window with X11 compositor

The expose event is emitted after a resize, thus this not necessary to monitor
width/height events on the main window

- - - - -
81a2cbc6 by Pierre Lamot at 2024-06-01T15:53:38+00:00
qt: fix out of bound checking of xcb properties

- - - - -
65dc0343 by Pierre Lamot at 2024-06-01T15:53:38+00:00
qt: fix race condition when closing interface while video is opening with X11

- - - - -
5afeb5aa by Pierre Lamot at 2024-06-01T15:53:38+00:00
qt: fix deadlock when quitting qt application with X11 compositor

Under some circumstances, the application won't close after a quit event.
Using an `exit` in `triggerQuit` callback ensure that the application won't
prevent the mainloop to quit. At this point, both the gui and vout are stopped

- - - - -


7 changed files:

- modules/gui/qt/maininterface/compositor_x11_renderclient.cpp
- modules/gui/qt/maininterface/compositor_x11_renderclient.hpp
- modules/gui/qt/maininterface/compositor_x11_renderwindow.cpp
- modules/gui/qt/maininterface/compositor_x11_uisurface.cpp
- modules/gui/qt/maininterface/compositor_x11_uisurface.hpp
- modules/gui/qt/maininterface/compositor_x11_utils.cpp
- modules/gui/qt/qt.cpp


Changes:

=
modules/gui/qt/maininterface/compositor_x11_renderclient.cpp
=
@@ -22,12 +22,11 @@
 
 using namespace vlc;
 
-CompositorX11RenderClient::CompositorX11RenderClient(qt_intf_t* p_intf, 
xcb_connection_t* conn,  QWindow* window, QObject *parent)
+CompositorX11RenderClient::CompositorX11RenderClient(qt_intf_t* p_intf, 
xcb_connection_t* conn,  xcb_window_t wid, QObject *parent)
 : QObject(parent)
 , m_intf(p_intf)
-, m_window(window)
 , m_conn(conn)
-, m_wid(window->winId())
+, m_wid(wid)
 , m_pixmap(m_conn)
 , m_picture(m_conn)
 {
@@ -65,9 +64,6 @@ 
CompositorX11RenderClient::CompositorX11RenderClient(qt_intf_t* p_intf, xcb_conn
 xcb_change_property(m_conn, XCB_PROP_MODE_REPLACE, m_wid,
 _NET_WM_BYPASS_COMPOSITOR, XCB_ATOM_CARDINAL, 32, 
1, &val);
 }
-
-connect(window, &QWindow::widthChanged, this, 
&CompositorX11RenderClient::resetPixmap);
-connect(window, &QWindow::heightChanged, this, 
&CompositorX11RenderClient::resetPixmap);
 }
 
 CompositorX11RenderClient::~CompositorX11RenderClient()
@@ -78,7 +74,7 @@ CompositorX11RenderClient::~CompositorX11RenderClient()
 
 xcb_drawable_t CompositorX11RenderClient::getWindowXid() const
 {
-return m_window->winId();
+return m_wid;
 }
 
 void CompositorX11RenderClient::createPicture()


=
modules/gui/qt/maininterface/compositor_x11_renderclient.hpp
=
@@ -43,7 +43,7 @@ class CompositorX11RenderClient : public QObject
 public:
 CompositorX11RenderClient(
 qt_intf_t* p_intf, xcb_connection_t* conn,
-QWindow* window,
+xcb_window_t wid,
 QObject* parent = nullptr);
 
 ~CompositorX11RenderClient();
@@ -58,7 +58,6 @@ public slots:
 
 private:
 qt_intf_t* m_intf;
-QWindow* m_window = nullptr;
 
 xcb_connection_t* m_conn = 0;
 xcb_window_t m_wid = 0;


=
modules/gui/qt/maininterface/compositor_x11_renderwindow.cpp
=
@@ -531,7 +531,9 @@ void CompositorX11RenderWindow::setVideoWindow( QWindow* 
window)
 {
 //ensure Qt x11 pending operation have been forwarded to the server
 
xcb_flush(qGuiApp->nativeInterface()->connection());
-m_videoClient = std::make_unique(m_intf, 
m_conn, window);
+m_videoClient = std::make_unique(m_intf, 
m_conn, window->winId());
+connect(window, &QWindow::widthChanged, m_videoClient.get(), 
&CompositorX11RenderClient::resetPixmap);
+connect(window, &QWindow::heightChanged, m_videoClient.get(), 
&CompositorX11RenderClient::resetPixmap);
 m_videoPosition = QRect(0,0,0,0);
 m_videoWindow = window;
 emit videoSurfaceChanged(m_videoClient.get());
@@ -539,11 +541,19 @@ void CompositorX11RenderWindow::setVideoWindow( QWindow* 
window)
 
 void CompositorX11RenderWindow::enableVideoWindow()
 {
+//if we stop the rendering, m_videoWindow may be null
+if (!m_videoWindow)
+return;
+
 emit registerVideoWindow(m_videoWindow->winId());
 }
 
 void CompositorX11RenderWindow::disableVideoWindow()
 {
+//if we stop the rendering, m_videoWindow may be null

[vlc-commits] [Git][videolan/vlc][master] 2 commits: test: tls: use test_setup() for VLC_PLUGIN_PATH

2024-06-01 Thread Jean-Baptiste Kempf (@jbk)


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


Commits:
d2e4baf0 by Alexandre Janniaux at 2024-06-01T11:18:30+00:00
test: tls: use test_setup() for VLC_PLUGIN_PATH

test_setup() will setup the VLC_PLUGIN_PATH in a reliable way.

- - - - -
61d8527f by Alexandre Janniaux at 2024-06-01T11:18:30+00:00
test: tls: switch to TOP_SRCDIR

TOP_SRCDIR is an absolute path, meaning that the result of the test
will not depend from where the test is run.

- - - - -


1 changed file:

- test/modules/misc/tls.c


Changes:

=
test/modules/misc/tls.c
=
@@ -34,6 +34,8 @@
 #endif
 #include 
 
+#include "../../libvlc/test.h"
+
 #include 
 #include 
 #include 
@@ -113,7 +115,7 @@ static vlc_tls_t *securepair(vlc_thread_t *th,
 return client;
 }
 
-#define CERTDIR SRCDIR "/samples/certs"
+#define CERTDIR TOP_SRCDIR "/test/samples/certs"
 #define CERTFILE CERTDIR "/certkey.pem"
 
 static const char *const test_cert_argv[] = {
@@ -131,7 +133,7 @@ int main(void)
 char *alp;
 int val;
 
-setenv("VLC_PLUGIN_PATH", "../modules", 1);
+test_setup();
 
 /*** Tests with normal certs database - server cert not acceptable. ***/
 vlc = libvlc_new(0, NULL);



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/0acc38bf27a65d1155b8611dacce700bad44f679...61d8527f544030f79e5301c8281abda1c8abdbaa

-- 
This project does not include diff previews in email notifications.
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/0acc38bf27a65d1155b8611dacce700bad44f679...61d8527f544030f79e5301c8281abda1c8abdbaa
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][master] 3 commits: Revert "buildsystem: qt: read the qpaths as json"

2024-06-01 Thread Steve Lhomme (@robUx4)


Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
318f9526 by Steve Lhomme at 2024-06-01T09:43:04+00:00
Revert "buildsystem: qt: read the qpaths as json"

This reverts commit 40d21f1f0b85bf3d6b25ae93b7cb504688e4cd98.

- - - - -
08b0fffa by Steve Lhomme at 2024-06-01T09:43:04+00:00
Revert "configure: use qtpaths6 instead of qmake6"

This reverts commit 8ce83d83ae81df05ec848907380388be6ca9ac47.

- - - - -
0acc38bf by Steve Lhomme at 2024-06-01T09:43:04+00:00
buildsystem: favor QT_INSTALL_XXX to find qmlimportscanner

When providing a qtconf file, the HOST parts seems to come from hardocded 
values in qmake.

- - - - -


2 changed files:

- buildsystem/check_qml_module.py
- configure.ac


Changes:

=
buildsystem/check_qml_module.py
=
@@ -77,12 +77,12 @@ class QmlModuleChecker:
 return ret
 
 
-def getInstallInfo(self, qtpaths, qtconf):
-qtpaths_cmd = [ qtpaths, "--query", "--query-format", "json" ]
+def getInstallInfo(self, qmake, qtconf):
+qmake_cmd = [ qmake, "-query" ]
 if qtconf:
-qtpaths_cmd += [ "--qtconf", qtconf ]
+qmake_cmd += [ "-qtconf", qtconf ]
 ret = subprocess.run(
-qtpaths_cmd,
+qmake_cmd,
 stdout=subprocess.PIPE, stderr=subprocess.PIPE,
 encoding="utf8"
 )
@@ -91,22 +91,26 @@ class QmlModuleChecker:
 print(ret.stderr.strip())
 return False
 
-# Qt 6.6 outputs invalid json, try to fix it
-qpaths_json = str(ret.stdout)
-if ',\n}' in qpaths_json:
-qpaths_json = qpaths_json.replace(',\n}', '\n}')
-elif ',\r\n}' in qpaths_json:
-qpaths_json = qpaths_json.replace(',\r\n}', '\r\n}')
-
-qtjson = json.loads(qpaths_json)
-binpath = qtjson["QT_HOST_BINS"]
-libexec = qtjson["QT_HOST_LIBEXECS"]
-self.qmlpath = qtjson["QT_INSTALL_QML"]
-qmlversion = qtjson["QT_VERSION"]
-if qmlversion:
-qtmajor = qmlversion.split(".")[0]
-else:
-qtmajor = ""
+binpath_host = None
+libexec_host = None
+binpath_install = None
+libexec_install = None
+qtmajor = ""
+for l in ret.stdout.splitlines():
+l.strip()
+if l.startswith("QT_HOST_BINS:"):
+binpath_host = l.split(":", 1)[1]
+elif l.startswith("QT_HOST_LIBEXECS:"):
+libexec_host = l.split(":", 1)[1]
+elif l.startswith("QT_INSTALL_BINS:"):
+binpath_install = l.split(":", 1)[1]
+elif l.startswith("QT_INSTALL_LIBEXECS:"):
+libexec_install = l.split(":", 1)[1]
+elif l.startswith("QT_INSTALL_QML:"):
+self.qmlpath = l.split(":", 1)[1]
+elif l.startswith("QT_VERSION:"):
+qmlversion = l.split(":", 1)[1]
+qtmajor = qmlversion.split(".")[0]
 
 if qtmajor == "6":
 self.qt5 = False
@@ -115,12 +119,21 @@ class QmlModuleChecker:
 print("Qml path {} not found".format(self.qmlpath))
 return False
 
-self.qmlimportscanner = findProgram(binpath, "qmlimportscanner")
+self.qmlimportscanner = findProgram(binpath_install, 
"qmlimportscanner")
 if self.qmlimportscanner is not None:
 return True
 
-#Qt6 may place qmlimportscanner in libexec
-self.qmlimportscanner = findProgram(libexec, "qmlimportscanner")
+#Qt6 may place qmlimportscanner in libexec_host
+self.qmlimportscanner = findProgram(libexec_install, 
"qmlimportscanner")
+if self.qmlimportscanner is not None:
+return True
+
+self.qmlimportscanner = findProgram(binpath_host, "qmlimportscanner")
+if self.qmlimportscanner is not None:
+return True
+
+#Qt6 may place qmlimportscanner in libexec_host
+self.qmlimportscanner = findProgram(libexec_host, "qmlimportscanner")
 if self.qmlimportscanner is not None:
 return True
 
@@ -140,12 +153,12 @@ class KeyValue(argparse.Action):
 def main():
 parser = argparse.ArgumentParser("check for qml runtime dependencies")
 parser.add_argument(
-"--qtpaths", type=str, required=True,
-help="native qtpaths path")
+"--qmake", type=str, required=True,
+help="native qmake path")
 
 parser.add_argument(
 "--qtconf", type=str, required=False,
-help="qtpaths qtconf path")
+help="qmake qtconf path")
 
 parser.add_argument(
 "--modules", nargs="+", action=KeyValue, required=True,
@@ -154,7 +167,7 @@ def main():
 args = parser.parse_args()
 
 moduleChecker = QmlModuleChecker()
-if not moduleChecker.getInstallInfo(args.qtpaths, args.qtconf):
+if not moduleChecker.getInstallInfo(args.qmake, args.qtconf):
 exit(-1)
 
  

[vlc-commits] [Git][videolan/vlc][master] 2 commits: vpx_alpha: don't lock while the decoders are flushing

2024-06-01 Thread Steve Lhomme (@robUx4)


Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
a6d32f4f by Steve Lhomme at 2024-06-01T08:45:45+00:00
vpx_alpha: don't lock while the decoders are flushing

They may call FormatUpdate (lavc) and other things that lock.
We don't need a lock on the decoder as it cannot change during the
lifetime of our pseudo-decoder.

- - - - -
b09808a6 by Steve Lhomme at 2024-06-01T08:45:45+00:00
vpx_alpha: handle bitstreams with intermittent alpha content

It seems some sources set the alpha flag but don't always attach an alpha 
layer to each frame.

Ref #28653

- - - - -


1 changed file:

- modules/codec/vpx_alpha.c


Changes:

=
modules/codec/vpx_alpha.c
=
@@ -45,6 +45,8 @@ typedef struct
 vlc_video_context *vctx;
 picture_t *(*pf_combine)(decoder_t *, picture_t *opaque, picture_t *alpha, 
vlc_video_context *);
 
+struct VLC_VECTOR(vlc_tick_t) missing_alpha;
+
 picture_pool_t*pool;
 } vpx_alpha;
 
@@ -63,14 +65,15 @@ struct cpu_alpha_context
 {
 picture_context_t  ctx;
 picture_t  *opaque;
-picture_t  *alpha;
+picture_t  *alpha; // may be NULL if the alpha layer was missing
 };
 
 static void cpu_alpha_destroy(picture_context_t *ctx)
 {
 struct cpu_alpha_context *pctx = container_of(ctx, struct 
cpu_alpha_context, ctx);
 picture_Release(pctx->opaque);
-picture_Release(pctx->alpha);
+if (pctx->alpha)
+picture_Release(pctx->alpha);
 free(pctx);
 }
 
@@ -82,10 +85,21 @@ static picture_context_t *cpu_alpha_copy(picture_context_t 
*src)
 return NULL;
 alpha_ctx->ctx = *src;
 alpha_ctx->opaque = picture_Hold(pctx->opaque);
-alpha_ctx->alpha  = picture_Hold(pctx->alpha);
+alpha_ctx->alpha  = alpha_ctx->alpha ? picture_Hold(pctx->alpha) : NULL;
 return &alpha_ctx->ctx;
 }
 
+struct pic_alpha_plane
+{
+plane_t p;
+uint8_t buffer[];
+};
+
+static void DestroyPoolPic(picture_t *pic)
+{
+free(pic->p_sys);
+}
+
 static picture_t *CombinePicturesCPU(decoder_t *bdec, picture_t *opaque, 
picture_t *alpha, vlc_video_context *vctx)
 {
 assert(vctx == NULL); VLC_UNUSED(vctx);
@@ -104,12 +118,42 @@ static picture_t *CombinePicturesCPU(decoder_t *bdec, 
picture_t *opaque, picture
 cpu_alpha_destroy, cpu_alpha_copy, NULL
 };
 alpha_ctx->opaque = picture_Hold(opaque);
-alpha_ctx->alpha  = picture_Hold(alpha);
+alpha_ctx->alpha  = alpha ? picture_Hold(alpha) : NULL;
 out->context = &alpha_ctx->ctx;
 
 for (int i=0; ii_planes; i++)
 out->p[i] = opaque->p[i];
-out->p[opaque->i_planes] = alpha->p[0];
+if (alpha)
+out->p[opaque->i_planes] = alpha->p[0];
+else
+{
+// use the dummy opaque plane attached in the picture p_sys
+struct pic_alpha_plane *p = out->p_sys;
+if (out->p_sys == NULL)
+{
+int plane_size = bdec->fmt_out.video.i_width * 
bdec->fmt_out.video.i_height;
+p = malloc(sizeof(*p) + plane_size);
+if (likely(p != NULL))
+{
+p->p.i_lines = bdec->fmt_out.video.i_height;
+p->p.i_visible_lines = bdec->fmt_out.video.i_y_offset + 
bdec->fmt_out.video.i_visible_height;
+
+p->p.i_pitch = bdec->fmt_out.video.i_width;
+p->p.i_visible_pitch = bdec->fmt_out.video.i_x_offset + 
bdec->fmt_out.video.i_visible_width;
+p->p.i_pixel_pitch = 1;
+p->p.p_pixels = p->buffer;
+memset(p->p.p_pixels, 0xFF, plane_size);
+
+out->p_sys = p;
+}
+}
+if (unlikely(p == NULL))
+{
+picture_Release(out);
+return NULL;
+}
+out->p[opaque->i_planes] = p->p;
+}
 return out;
 }
 
@@ -127,7 +171,8 @@ static int SetupCPU(decoder_t *bdec)
 
 for (; ifmt_out.video, 
&(picture_resource_t){0});
+picture_resource_t res = { .pf_destroy = DestroyPoolPic };
+pics[i] = picture_NewFromResource(&bdec->fmt_out.video, &res);
 if (pics[i] == NULL)
 goto error;
 }
@@ -187,7 +232,9 @@ static int FormatUpdate( decoder_t *dec, vlc_video_context 
*vctx )
 // not ready
 bdec->fmt_out.video.i_chroma = bdec->fmt_out.i_codec = 
dec->fmt_out.video.i_chroma;
 p_sys->pf_combine = CombineKeepOpaque;
-goto done;
+if (p_sys->missing_alpha.size == 0)
+goto done;
+// we need to send pictures without waiting for the alpha
 }
 }
 es_format_Clean(&bdec->fmt_out);
@@ -255,15 +302,44 @@ done:
 return res;
 }
 
+static bool CheckMissingAlpha(decoder_t *bdec, vlc_tick_t pts)
+{
+vpx_alpha *p_sys = bdec->p_sys;
+vlc_tick_t missing_pts;
+vlc_vector_foreach(missing_pts, &p_sys->missing_alpha)
+{
+if (missing_pts == pts)
+return true;
+if (missing_pts < pts)

[vlc-commits] [Git][videolan/vlc][master] 3 commits: macosx: Do not register VLCLibraryCollectionViewAudioGroupSupplementaryDetailView

2024-06-01 Thread Steve Lhomme (@robUx4)


Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
65aea094 by Claudio Cambra at 2024-06-01T08:21:56+00:00
macosx: Do not register 
VLCLibraryCollectionViewAudioGroupSupplementaryDetailView

Signed-off-by: Claudio Cambra 

- - - - -
fdbfca6b by Claudio Cambra at 2024-06-01T08:21:56+00:00
macosx: Remove handling for 
VLCLibraryCollectionViewAudioGroupSupplementaryDetailView in 
VLCLibraryCollectionViewFlowLayout

Signed-off-by: Claudio Cambra 

- - - - -
78a76724 by Claudio Cambra at 2024-06-01T08:21:56+00:00
macosx: Remove VLCLibraryCollectionViewAudioGroupSupplementaryDetailView

Signed-off-by: Claudio Cambra 

- - - - -


7 changed files:

- extras/package/macosx/VLC.xcodeproj/project.pbxproj
- modules/gui/macosx/Makefile.am
- − 
modules/gui/macosx/UI/VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.xib
- modules/gui/macosx/library/VLCLibraryCollectionViewFlowLayout.m
- modules/gui/macosx/library/audio-library/VLCLibraryAudioDataSource.m
- − 
modules/gui/macosx/library/audio-library/VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.h
- − 
modules/gui/macosx/library/audio-library/VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.m


Changes:

=
extras/package/macosx/VLC.xcodeproj/project.pbxproj
=
@@ -102,7 +102,6 @@
536283F3291146BC00640C15 /* VLCLibraryNavigationStack.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 536283E2291146BC00640C15 /* 
VLCLibraryNavigationStack.m */; };
536283F4291146BC00640C15 /* 
VLCLibraryCollectionViewMediaItemSupplementaryDetailView.m in Sources */ = {isa 
= PBXBuildFile; fileRef = 536283E3291146BC00640C15 /* 
VLCLibraryCollectionViewMediaItemSupplementaryDetailView.m */; };
536283F5291146BC00640C15 /* 
VLCLibraryCollectionViewSupplementaryDetailView.m in Sources */ = {isa = 
PBXBuildFile; fileRef = 536283E5291146BC00640C15 /* 
VLCLibraryCollectionViewSupplementaryDetailView.m */; };
-   536283F6291146BC00640C15 /* 
VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 536283E9291146BC00640C15 /* 
VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.m */; };
536283F7291146BC00640C15 /* VLCLibraryNavigationState.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 536283EB291146BC00640C15 /* 
VLCLibraryNavigationState.m */; };
536283F8291146BC00640C15 /* VLCLibrarySongTableCellView.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 536283EC291146BC00640C15 /* 
VLCLibrarySongTableCellView.m */; };
536283F9291146BC00640C15 /* 
VLCLibraryCollectionViewFlowLayout.m in Sources */ = {isa = PBXBuildFile; 
fileRef = 536283EE291146BC00640C15 /* VLCLibraryCollectionViewFlowLayout.m */; 
};
@@ -332,9 +331,7 @@
536283E4291146BC00640C15 /* VLCLibraryNavigationState.h */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
path = VLCLibraryNavigationState.h; sourceTree = ""; };
536283E5291146BC00640C15 /* 
VLCLibraryCollectionViewSupplementaryDetailView.m */ = {isa = PBXFileReference; 
fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = 
VLCLibraryCollectionViewSupplementaryDetailView.m; sourceTree = ""; };
536283E6291146BC00640C15 /* 
VLCLibraryCollectionViewSupplementaryDetailView.h */ = {isa = PBXFileReference; 
fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
VLCLibraryCollectionViewSupplementaryDetailView.h; sourceTree = ""; };
-   536283E7291146BC00640C15 /* 
VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.h; sourceTree = 
""; };
536283E8291146BC00640C15 /* 
VLCLibraryCollectionViewAlbumSupplementaryDetailView.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
VLCLibraryCollectionViewAlbumSupplementaryDetailView.h; sourceTree = ""; 
};
-   536283E9291146BC00640C15 /* 
VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.m; sourceTree = 
""; };
536283EA291146BC00640C15 /* 
VLCLibraryCollectionViewMediaItemSupplementaryDetailView.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
VLCLibraryCollectionViewMediaItemSupplementaryDetailView.h; sourceTree = 
""; };
536283EB291146BC00640C15 /* VLCLibraryNavigationState.m */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.objc; path = VLCLibraryNavigationState.m; sourceTree = 

[vlc-commits] [Git][videolan/vlc][master] VLCLibraryHomeViewController: refactor notifications

2024-06-01 Thread Steve Lhomme (@robUx4)


Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
79ff6c37 by Alexandre Janniaux at 2024-06-01T07:07:56+00:00
VLCLibraryHomeViewController: refactor notifications

NSNotificationCenter was used repeatedly with repeated allocation to the
autorelease pool in order to setup the suffix addition for the
notification name.

This commit uses a for-loop releasing the local autorelease allocations
and create the notification names on-the-fly to avoid repetition.

- - - - -


1 changed file:

- modules/gui/macosx/library/home-library/VLCLibraryHomeViewController.m


Changes:

=
modules/gui/macosx/library/home-library/VLCLibraryHomeViewController.m
=
@@ -69,64 +69,33 @@
 [self setupHomeLibraryViews];
 
 NSNotificationCenter *notificationCenter = 
NSNotificationCenter.defaultCenter;
-[notificationCenter addObserver:self
-   selector:@selector(libraryModelUpdated:)
-   name:VLCLibraryModelVideoMediaListReset
- object:nil];
-[notificationCenter addObserver:self
-   selector:@selector(libraryModelUpdated:)
-   name:VLCLibraryModelVideoMediaItemDeleted
- object:nil];
-[notificationCenter addObserver:self
-   selector:@selector(libraryModelUpdated:)
-   name:VLCLibraryModelAudioMediaListReset
- object:nil];
-[notificationCenter addObserver:self
-   selector:@selector(libraryModelUpdated:)
-   name:VLCLibraryModelAudioMediaItemDeleted
- object:nil];
-
-NSString * const videoMediaResetLongLoadStartNotification = 
[VLCLibraryModelVideoMediaListReset 
stringByAppendingString:VLCLongNotificationNameStartSuffix];
-NSString * const videoMediaResetLongLoadFinishNotification = 
[VLCLibraryModelVideoMediaListReset 
stringByAppendingString:VLCLongNotificationNameFinishSuffix];
-NSString * const audioMediaResetLongLoadStartNotification = 
[VLCLibraryModelAudioMediaListReset 
stringByAppendingString:VLCLongNotificationNameStartSuffix];
-NSString * const audioMediaResetLongLoadFinishNotification = 
[VLCLibraryModelAudioMediaListReset 
stringByAppendingString:VLCLongNotificationNameFinishSuffix];
-NSString * const videoMediaDeletedLongLoadStartNotification = 
[VLCLibraryModelVideoMediaItemDeleted 
stringByAppendingString:VLCLongNotificationNameStartSuffix];
-NSString * const videoMediaDeletedLongLoadFinishNotification = 
[VLCLibraryModelVideoMediaItemDeleted 
stringByAppendingString:VLCLongNotificationNameFinishSuffix];
-NSString * const audioMediaDeletedLongLoadStartNotification = 
[VLCLibraryModelAudioMediaItemDeleted 
stringByAppendingString:VLCLongNotificationNameStartSuffix];
-NSString * const audioMediaDeletedLongLoadFinishNotification = 
[VLCLibraryModelAudioMediaItemDeleted 
stringByAppendingString:VLCLongNotificationNameFinishSuffix];
-
-[notificationCenter addObserver:self
-   selector:@selector(libraryModelLongLoadStarted:)
-   
name:videoMediaResetLongLoadStartNotification
- object:nil];
-[notificationCenter addObserver:self
-   
selector:@selector(libraryModelLongLoadFinished:)
-   
name:videoMediaResetLongLoadFinishNotification
- object:nil];
-[notificationCenter addObserver:self
-   selector:@selector(libraryModelLongLoadStarted:)
-   
name:audioMediaResetLongLoadStartNotification
- object:nil];
-[notificationCenter addObserver:self
-   
selector:@selector(libraryModelLongLoadFinished:)
-   
name:audioMediaResetLongLoadFinishNotification
- object:nil];
-[notificationCenter addObserver:self
-   selector:@selector(libraryModelLongLoadStarted:)
-   
name:videoMediaDeletedLongLoadStartNotification
- object:nil];
-[notificationCenter addObserver:self
-   
selector:@selector(libraryModelLongLoadFinished:)
-   
name:videoMediaDeletedLongLoadFinishNotification
- object:nil];
-[notificationCenter addObserver:self
-   selector:@selector(libraryModelLongLoadStarted:)
-   
name:audioMediaDeletedLongLoadStartNotification

[vlc-commits] [Git][videolan/vlc][master] 4 commits: meson: don't use -Werror=return-type

2024-06-01 Thread Steve Lhomme (@robUx4)


Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
d684480b by Steve Lhomme at 2024-06-01T06:48:36+00:00
meson: don't use -Werror=return-type

Similar to 239eafa8b1a9a8f3e9d830232e09fba4675d705a

- - - - -
0c7add09 by Steve Lhomme at 2024-06-01T06:48:36+00:00
cli: mark CLI thread as never returning

The thread never exits on its own. It's cancelable during net_Accept().

Ref. #28650

- - - - -
2f7dec93 by Steve Lhomme at 2024-06-01T06:48:36+00:00
posix: remove unused stdnoreturn.h

Since 7ca3c3640b503af5f2315c5421f395bea89a3090

- - - - -
9183d89c by Steve Lhomme at 2024-06-01T06:48:36+00:00
android: remove unused stdnoreturn.h

Since 7ca3c3640b503af5f2315c5421f395bea89a3090

- - - - -


4 changed files:

- meson.build
- modules/control/cli/cli.c
- src/android/thread.c
- src/posix/thread.c


Changes:

=
meson.build
=
@@ -490,7 +490,6 @@ if get_option('extra_checks')
 add_project_arguments(cc.get_supported_arguments([
 '-Werror=missing-field-initializers',
 '-Werror=format',
-'-Werror=return-type',
 '-Werror=return-mismatch'
 ]), language: ['c', 'cpp'])
 add_project_arguments(cc.get_supported_arguments([


=
modules/control/cli/cli.c
=
@@ -543,7 +543,7 @@ static void cli_client_delete(struct cli_client *cl)
 free(cl);
 }
 
-static void *Run(void *data)
+_Noreturn static void *Run(void *data)
 {
 intf_thread_t *intf = data;
 intf_sys_t *sys = intf->p_sys;


=
src/android/thread.c
=
@@ -35,7 +35,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 


=
src/posix/thread.c
=
@@ -34,7 +34,6 @@
 #include "libvlc.h"
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/c2e35afd5bbca671c12af00bb1264c5d401efbac...9183d89c55107a3a38e62a6e80c530ed4bd71fb5

-- 
This project does not include diff previews in email notifications.
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/c2e35afd5bbca671c12af00bb1264c5d401efbac...9183d89c55107a3a38e62a6e80c530ed4bd71fb5
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