[vlc-commits] [Git][videolan/vlc][master] macosx: Fix crash with hero view badly using just instantiated object's property

2024-10-08 Thread @fkuehne


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


Commits:
72b71432 by Claudio Cambra at 2024-10-08T08:41:09+00:00
macosx: Fix crash with hero view badly using just instantiated object's 
property

Signed-off-by: Claudio Cambra 

- - - - -


1 changed file:

- modules/gui/macosx/library/VLCLibraryHeroView.m


Changes:

=
modules/gui/macosx/library/VLCLibraryHeroView.m
=
@@ -199,7 +199,9 @@
 return;
 }
 
-VLCLibraryRepresentedItem * const item = [[VLCLibraryRepresentedItem 
alloc] initWithItem:mediaItem parentType:item.parentType];
+VLCLibraryRepresentedItem * const item =
+[[VLCLibraryRepresentedItem alloc] initWithItem:mediaItem
+ 
parentType:self.representedItem.parentType];
 self.representedItem = item;
 }
 



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

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/72b71432d2dd006491334be33fac72606995656e
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] 2 commits: macosx: Set library playlist mode to off by default

2024-10-08 Thread @fkuehne


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


Commits:
d70352cd by Claudio Cambra at 2024-10-08T07:31:28+00:00
macosx: Set library playlist mode to off by default

Signed-off-by: Claudio Cambra 

- - - - -
579b6c70 by Claudio Cambra at 2024-10-08T07:31:28+00:00
macosx: Store library playlist mode across app starts

Signed-off-by: Claudio Cambra 

- - - - -


2 changed files:

- modules/gui/macosx/playlist/VLCPlaylistController.h
- modules/gui/macosx/playlist/VLCPlaylistController.m


Changes:

=
modules/gui/macosx/playlist/VLCPlaylistController.h
=
@@ -104,7 +104,7 @@ extern NSString *VLCPlaylistItemsRemoved;
  */
 @property (readwrite, nonatomic) enum vlc_playlist_playback_order 
playbackOrder;
 
-@property (readwrite) BOOL libraryPlaylistMode;
+@property (readwrite, nonatomic) BOOL libraryPlaylistMode;
 
 /**
  * Define the action to perform after playback of the current media stopped 
(for any reason)


=
modules/gui/macosx/playlist/VLCPlaylistController.m
=
@@ -42,6 +42,8 @@ NSString *VLCPlaylistCurrentItemIndexChanged = 
@"VLCPlaylistCurrentItemIndexChan
 NSString *VLCPlaylistItemsAdded = @"VLCPlaylistItemsAdded";
 NSString *VLCPlaylistItemsRemoved = @"VLCPlaylistItemsRemoved";
 
+NSString * const VLCLibraryPlaylistModeDefaultsKey = @"VLCLibraryPlaylistMode";
+
 @interface VLCPlaylistController ()
 {
 NSNotificationCenter *_defaultNotificationCenter;
@@ -244,7 +246,8 @@ static const struct vlc_playlist_callbacks 
playlist_callbacks = {
 /* set initial values, further updates through callbacks */
 vlc_playlist_Lock(_p_playlist);
 _unsorted = YES;
-_libraryPlaylistMode = YES;
+_libraryPlaylistMode =
+[NSUserDefaults.standardUserDefaults 
boolForKey:VLCLibraryPlaylistModeDefaultsKey];
 _playbackOrder = vlc_playlist_GetPlaybackOrder(_p_playlist);
 _playbackRepeat = vlc_playlist_GetPlaybackRepeat(_p_playlist);
 _playlistListenerID = vlc_playlist_AddListener(_p_playlist,
@@ -586,6 +589,13 @@ static const struct vlc_playlist_callbacks 
playlist_callbacks = {
 vlc_playlist_Unlock(_p_playlist);
 }
 
+- (void)setLibraryPlaylistMode:(BOOL)libraryPlaylistMode
+{
+_libraryPlaylistMode = libraryPlaylistMode;
+[NSUserDefaults.standardUserDefaults setBool:libraryPlaylistMode
+  
forKey:VLCLibraryPlaylistModeDefaultsKey];
+}
+
 #pragma mark - properties
 
 - (VLCInputItem *)currentlyPlayingInputItem



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/6288393dce77e3e9b838c9f8da668c40a95f3def...579b6c70ad01ba75f7302042da6f771baeff2469

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/6288393dce77e3e9b838c9f8da668c40a95f3def...579b6c70ad01ba75f7302042da6f771baeff2469
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] 2 commits: macosx: Present a placeholder view in groups view controller when there are no groups

2024-10-08 Thread @fkuehne


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


Commits:
d5c1e55d by Claudio Cambra at 2024-10-08T06:42:42+00:00
macosx: Present a placeholder view in groups view controller when there are no 
groups

Signed-off-by: Claudio Cambra 

- - - - -
6288393d by Claudio Cambra at 2024-10-08T06:42:42+00:00
macosx: Fix configuration of placeholder image view constraints in groups view 
controller

Signed-off-by: Claudio Cambra 

- - - - -


1 changed file:

- modules/gui/macosx/library/groups-library/VLCLibraryGroupsViewController.m


Changes:

=
modules/gui/macosx/library/groups-library/VLCLibraryGroupsViewController.m
=
@@ -22,6 +22,8 @@
 
 #import "VLCLibraryGroupsViewController.h"
 
+#import "extensions/NSString+Helpers.h"
+
 #import "library/VLCLibraryCollectionViewDelegate.h"
 #import "library/VLCLibraryCollectionViewFlowLayout.h"
 #import "library/VLCLibraryCollectionViewItem.h"
@@ -40,6 +42,12 @@
 
 #import "main/VLCMain.h"
 
+@interface VLCLibraryGroupsViewController ()
+{
+NSArray 
*_internalPlaceholderImageViewSizeConstraints;
+}
+@end
+
 @implementation VLCLibraryGroupsViewController
 
 - (instancetype)initWithLibraryWindow:(VLCLibraryWindow *)libraryWindow
@@ -49,6 +57,7 @@
 [self setupDataSource];
 [self setupGridViewModeViews];
 [self setupListViewModeViews];
+[self setupPlaceholderView];
 }
 return self;
 }
@@ -189,13 +198,65 @@
 self.selectedGroupTableView.dataSource = self.dataSource;
 }
 
+- (void)setupPlaceholderView
+{
+_internalPlaceholderImageViewSizeConstraints = @[
+[NSLayoutConstraint constraintWithItem:self.placeholderImageView
+ attribute:NSLayoutAttributeWidth
+ relatedBy:NSLayoutRelationEqual
+toItem:nil
+ attribute:NSLayoutAttributeNotAnAttribute
+multiplier:0.f
+  constant:182.f],
+[NSLayoutConstraint constraintWithItem:self.placeholderImageView
+ attribute:NSLayoutAttributeHeight
+ relatedBy:NSLayoutRelationEqual
+toItem:nil
+ attribute:NSLayoutAttributeNotAnAttribute
+multiplier:0.f
+  constant:114.f],
+];
+}
+
 - (id)currentDataSource
 {
 return self.dataSource;
 }
 
+- (NSArray *)placeholderImageViewSizeConstraints
+{
+return _internalPlaceholderImageViewSizeConstraints;
+}
+
+- (void)presentPlaceholderGroupsView
+{
+NSArray * const oldViewPlaceholderConstraints =
+
self.libraryWindow.librarySegmentViewController.placeholderImageViewSizeConstraints;
+for (NSLayoutConstraint * const constraint in 
oldViewPlaceholderConstraints) {
+constraint.active = NO;
+}
+for (NSLayoutConstraint *constraint in 
self.placeholderImageViewSizeConstraints) {
+constraint.active = YES;
+}
+
+self.emptyLibraryView.translatesAutoresizingMaskIntoConstraints = NO;
+self.libraryTargetView.subviews = @[self.emptyLibraryView];
+NSView * const emptyLibraryView = self.emptyLibraryView;
+NSDictionary * const dict = 
NSDictionaryOfVariableBindings(emptyLibraryView);
+[self.libraryTargetView addConstraints:[NSLayoutConstraint 
constraintsWithVisualFormat:@"H:|[emptyLibraryView(>=572.)]|" options:0 
metrics:0 views:dict]];
+[self.libraryTargetView addConstraints:[NSLayoutConstraint 
constraintsWithVisualFormat:@"V:|[emptyLibraryView(>=444.)]|" options:0 
metrics:0 views:dict]];
+
+self.placeholderImageView.image = [NSImage 
imageNamed:@"placeholder-video"];
+self.placeholderLabel.stringValue = _NS("Your favorite groups will appear 
here.");
+}
+
 - (void)presentGroupsView
 {
+if (self.dataSource.libraryModel.numberOfGroups == 0) {
+[self presentPlaceholderGroupsView];
+return;
+}
+
 const VLCLibraryViewModeSegment viewModeSegment =
 
VLCLibraryWindowPersistentPreferences.sharedInstance.groupsLibraryViewMode;
 NSView *viewToPresent = nil;



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/0dd67938c02ed9a6cfe3f17fe314bc3c8fae...6288393dce77e3e9b838c9f8da668c40a95f3def

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/0dd67938c02ed9a6cfe3f17fe314bc3c8fae...6288393dce77e3e9b838c9f8da668c40a95f3def
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: macosx: Use same measurements for collection view and table view insets in media source view

2024-09-22 Thread @fkuehne


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


Commits:
a379ae1c by Claudio Cambra at 2024-09-23T04:40:59+00:00
macosx: Use same measurements for collection view and table view insets in 
media source view

Signed-off-by: Claudio Cambra 

- - - - -
5e0d746a by Claudio Cambra at 2024-09-23T04:40:59+00:00
macosx: Do not add spacing with path control/top parent view in media source 
views

Signed-off-by: Claudio Cambra 

- - - - -
f2993dd3 by Claudio Cambra at 2024-09-23T04:40:59+00:00
macosx: Fix scroller insets for media source base data source views

Signed-off-by: Claudio Cambra 

- - - - -


1 changed file:

- modules/gui/macosx/library/media-source/VLCMediaSourceBaseDataSource.m


Changes:

=
modules/gui/macosx/library/media-source/VLCMediaSourceBaseDataSource.m
=
@@ -464,20 +464,19 @@ referenceSizeForHeaderInSection:(NSInteger)section
 _pathControlVisualEffectView.hidden = !visible;
 
 const CGFloat pathControlVisualEffectViewHeight = 
_pathControlVisualEffectView.frame.size.height;
-const CGFloat scrollViewsTopSpace = visible ? 
pathControlVisualEffectViewHeight + VLCLibraryUIUnits.mediumSpacing : 
VLCLibraryUIUnits.mediumSpacing;
+const CGFloat scrollViewsTopSpace = visible ? 
pathControlVisualEffectViewHeight : 0;
 
-NSEdgeInsets collectionViewScrollViewInsets = 
VLCLibraryUIUnits.libraryViewScrollViewContentInsets;
-collectionViewScrollViewInsets.top += scrollViewsTopSpace;
-NSEdgeInsets collectionViewScrollerInsets = 
VLCLibraryUIUnits.libraryViewScrollViewScrollerInsets;
-collectionViewScrollerInsets.top += scrollViewsTopSpace;
+NSEdgeInsets scrollViewInsets = 
VLCLibraryUIUnits.libraryViewScrollViewContentInsets;
+scrollViewInsets.top += scrollViewsTopSpace;
+const NSEdgeInsets scrollerInsets = 
VLCLibraryUIUnits.libraryViewScrollViewScrollerInsets;
 
 _collectionViewScrollView.automaticallyAdjustsContentInsets = NO;
-_collectionViewScrollView.contentInsets = collectionViewScrollViewInsets;
-_collectionViewScrollView.scrollerInsets = collectionViewScrollerInsets;
+_collectionViewScrollView.contentInsets = scrollViewInsets;
+_collectionViewScrollView.scrollerInsets = scrollerInsets;
 
-NSEdgeInsets tableViewScrollViewInsets = 
VLCLibraryUIUnits.libraryViewScrollViewContentInsets;
-tableViewScrollViewInsets.top = scrollViewsTopSpace;
-_tableViewScrollView.contentInsets = tableViewScrollViewInsets;
+_tableViewScrollView.automaticallyAdjustsContentInsets = NO;
+_tableViewScrollView.contentInsets = scrollViewInsets;
+_tableViewScrollView.scrollerInsets = scrollerInsets;
 }
 
 - (void)returnHome



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/e5d0b63c5fd220e0f15ac14f58971d2769af6cf6...f2993dd38eeda96bbdef84e93cc415d483886e84

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/e5d0b63c5fd220e0f15ac14f58971d2769af6cf6...f2993dd38eeda96bbdef84e93cc415d483886e84
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] 2 commits: qml: fix new indicator in video views

2024-09-15 Thread @fkuehne


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


Commits:
d35922eb by Prince Gupta at 2024-09-15T10:14:28+00:00
qml: fix new indicator in video views

correctly place contentItem of GridItem otherwise this affects
adding new UI elements to it

- - - - -
01e229a6 by Prince Gupta at 2024-09-15T10:14:28+00:00
qml: remove redundant property

- - - - -


1 changed file:

- modules/gui/qt/widgets/qml/GridItem.qml


Changes:

=
modules/gui/qt/widgets/qml/GridItem.qml
=
@@ -254,8 +254,6 @@ T.ItemDelegate {
 contentItem: ColumnLayout {
 id: layout
 
-z: 1
-
 spacing: 0
 
 Widgets.MediaCover {
@@ -344,7 +342,6 @@ T.ItemDelegate {
 color: root.selected
 ? theme.fg.highlight
 : theme.fg.primary
-textFormat: Text.PlainText
 }
 }
 
@@ -357,7 +354,6 @@ T.ItemDelegate {
 color: root.selected
 ? theme.fg.highlight
 : theme.fg.secondary
-textFormat: Text.PlainText
 
 Layout.preferredWidth: Math.min(root.width, implicitWidth)
 Layout.alignment: root.textAlignHCenter ? Qt.AlignCenter : 
Qt.AlignLeft



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/1ddeb93b6751e96d88a6c99bef117e0c363bc3e1...01e229a67e382d6b1b7ea860ef75059f88de3d52

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/1ddeb93b6751e96d88a6c99bef117e0c363bc3e1...01e229a67e382d6b1b7ea860ef75059f88de3d52
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] 7 commits: qt: add "url" role to MLFoldersBaseModel

2024-09-15 Thread @fkuehne


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


Commits:
13c855a3 by Fatih Uzunoglu at 2024-09-15T10:01:15+00:00
qt: add "url" role to MLFoldersBaseModel

- - - - -
f788b1b7 by Fatih Uzunoglu at 2024-09-15T10:01:15+00:00
qt: add "url" role to MLAlbumTrackModel

- - - - -
e62abf09 by Fatih Uzunoglu at 2024-09-15T10:01:15+00:00
qt: add "url" role to NetworkMediaModel

- - - - -
dcf54f45 by Fatih Uzunoglu at 2024-09-15T10:01:15+00:00
qt: add "url" role to PlaylistListModel

- - - - -
86de5f77 by Fatih Uzunoglu at 2024-09-15T10:01:15+00:00
qt: add `url` property to PlayerController

- - - - -
5d328a68 by Fatih Uzunoglu at 2024-09-15T10:01:15+00:00
qt: add invokable `urlListToMimeData()` to MainCtx

- - - - -
1ddeb93b by Fatih Uzunoglu at 2024-09-15T10:01:15+00:00
qt: provide MIME data in DragItem with type "text/uri-list" as per 
RFC-2483

- - - - -


15 changed files:

- modules/gui/qt/maininterface/mainctx.cpp
- modules/gui/qt/maininterface/mainctx.hpp
- modules/gui/qt/medialibrary/mlalbumtrackmodel.cpp
- modules/gui/qt/medialibrary/mlalbumtrackmodel.hpp
- modules/gui/qt/medialibrary/mlfoldersmodel.cpp
- modules/gui/qt/network/networkmediamodel.cpp
- modules/gui/qt/network/networkmediamodel.hpp
- modules/gui/qt/player/player_controller.cpp
- modules/gui/qt/player/player_controller.hpp
- modules/gui/qt/player/player_controller_p.hpp
- modules/gui/qt/player/qml/controlbarcontrols/ArtworkInfoWidget.qml
- modules/gui/qt/playlist/playlist_model.cpp
- modules/gui/qt/playlist/playlist_model.hpp
- modules/gui/qt/playlist/qml/PlaylistListView.qml
- modules/gui/qt/widgets/qml/DragItem.qml


Changes:

=
modules/gui/qt/maininterface/mainctx.cpp
=
@@ -673,6 +673,50 @@ void 
MainCtx::setVideoSurfaceProvider(VideoSurfaceProvider* videoSurfaceProvider
 emit hasEmbededVideoChanged(m_videoSurfaceProvider && 
m_videoSurfaceProvider->hasVideoEmbed());
 }
 
+QJSValue MainCtx::urlListToMimeData(const QJSValue &array) {
+// NOTE: Due to a Qt regression since 17318c4
+//   (Nov 11, 2022), it is not possible to
+//   use RFC-2483 compliant string here.
+//   This regression was later corrected by
+//   c25f53b (Jul 31, 2024).
+// NOTE: Qt starts supporting string list since
+//   17318c4, so starting from 6.5.0 a string
+//   list can be used which is not affected
+//   by the said issue. For Qt versions below
+//   6.5.0, use byte array which is used as is
+//   by Qt.
+assert(array.property("length").toInt() > 0);
+
+QJSEngine* const engine = qjsEngine(this);
+assert(engine);
+
+QJSValue data;
+#if QT_VERSION < QT_VERSION_CHECK(6, 5, 0)
+QString string;
+for (int i = 0; i < array.property(QStringLiteral("length")).toInt(); ++i)
+{
+QString decodedUrl;
+const QJSValue element = array.property(i);
+if (element.isUrl())
+// QJSValue does not have `toUrl()`
+decodedUrl = QJSManagedValue(element, 
engine).toUrl().toString(QUrl::FullyEncoded);
+else if (element.isString())
+// If the element is string, we assume it is already encoded
+decodedUrl = element.toString();
+else
+Q_UNREACHABLE(); // Assertion failure in debug builds
+string += decodedUrl + QStringLiteral("\r\n");
+}
+string.chop(2);
+data = engine->toScriptValue(string);
+#else
+data = array;
+#endif
+QJSValue ret = engine->newObject();
+ret.setProperty(QStringLiteral("text/uri-list"), data);
+return ret;
+}
+
 VideoSurfaceProvider* MainCtx::getVideoSurfaceProvider() const
 {
 return m_videoSurfaceProvider;


=
modules/gui/qt/maininterface/mainctx.hpp
=
@@ -267,6 +267,8 @@ public:
(QT_VERSION >= QT_VERSION_CHECK(6, 4, 0));
 }
 
+Q_INVOKABLE QJSValue urlListToMimeData(const QJSValue& array);
+
 /**
  * @brief ask for the application to terminate
  * @return true if the application can be close right away, false if it 
will be delayed


=
modules/gui/qt/medialibrary/mlalbumtrackmodel.cpp
=
@@ -60,6 +60,8 @@ QVariant MLAlbumTrackModel::itemRoleData(MLItem *item, const 
int role) const
 return QVariant::fromValue( getFirstSymbol( ml_track->getAlbumTitle() 
) );
 case TRACK_ARTIST_FIRST_SYMBOL:
 return QVariant::fromValue( getFirstSymbol( ml_track->getArtist() ) );
+case TRACK_URL:
+return QUrl(ml_track->getMRL());
 default :
 return QVariant();
 }
@@ -80,6 +82,7 @@ QHash MLAlbumTrackModel::roleNames() const
 { TRACK_TITLE_FIRST_SYMBOL, "title_first_symbol"},
 { TRACK_ALBUM_FIRST_SYMBOL, "album_title_first_symbol"},
 { TRACK_ARTIST_FIRST_SYMBOL, "main_artist_first_symbol"},
+{ TRACK_URL, "url"

[vlc-commits] [Git][videolan/vlc][master] macosx: Change playlist icon to make it more media type-agnostic

2024-09-14 Thread @fkuehne


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


Commits:
9ffa52c9 by Claudio Cambra at 2024-09-14T15:20:56+00:00
macosx: Change playlist icon to make it more media type-agnostic

Can seem like playlists are for music and not general media

Signed-off-by: Claudio Cambra 

- - - - -


1 changed file:

- modules/gui/macosx/UI/VLCLibraryWindow.xib


Changes:

=
modules/gui/macosx/UI/VLCLibraryWindow.xib
=
@@ -361,12 +361,12 @@
 
 
 
-
+
 
 
 
 
-
+
 
 
 
@@ -1557,7 +1557,7 @@
 
 
 
-
+
 
 
 



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

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/9ffa52c9a0a365586fcb27764afee20a1f5dcfc4
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] 2 commits: qml: fix artist list background exceeding view boundaries

2024-09-14 Thread @fkuehne


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


Commits:
53fe909f by Fatih Uzunoglu at 2024-09-14T10:25:37+00:00
qml: fix artist list background exceeding view boundaries

It is not clear why this item was placed in the hierarchy.
Ideally, the view should be a pane and the `AcrylicBackground`
should be its background item. But for now, placing it
as its child with `z: -1` and anchoring to the parent (the
view) seems to suffice.

- - - - -
eaa2a651 by Fatih Uzunoglu at 2024-09-14T10:25:37+00:00
qml: provide the effective background color to the effect in TracksListPage

If "transparent" color is provided, fading edge can not do sub-pixel 
font
rendering. Translucent colors should be used only when absolutely necessary,
such as when window background needs to be shown for the backdrop blur
filter.

In this case, it already has a solid background due to `stackViewParent` in
`MainDisplay.qml`, that color should have been used instead.

- - - - -


2 changed files:

- modules/gui/qt/medialibrary/qml/MusicArtistsAlbums.qml
- modules/gui/qt/player/qml/TracksListPage.qml


Changes:

=
modules/gui/qt/medialibrary/qml/MusicArtistsAlbums.qml
=
@@ -119,18 +119,6 @@ FocusScope {
 model: artistModel
 }
 
-Widgets.AcrylicBackground {
-  id: artistListBackground
-
-  visible: artistList.visible
-  width: parent.width
-  height: parent.height + artistList.displayMarginEnd
-
-  tintColor: artistList.colorContext.bg.secondary
-
-  focus: false
-}
-
 RowLayout {
 anchors.fill: parent
 anchors.leftMargin: root.leftPadding
@@ -160,6 +148,17 @@ FocusScope {
 fadingEdge.backgroundColor: artistListBackground.usingAcrylic ? 
"transparent"
   : 
artistListBackground.alternativeColor
 
+Widgets.AcrylicBackground {
+id: artistListBackground
+
+z: -1
+
+anchors.fill: parent
+anchors.bottomMargin: -artistList.displayMarginEnd
+
+tintColor: artistList.colorContext.bg.secondary
+}
+
 // To get blur effect while scrolling in mainview
 displayMarginEnd: g_mainDisplay.displayMargin
 


=
modules/gui/qt/player/qml/TracksListPage.qml
=
@@ -36,7 +36,7 @@ RowLayout {
 readonly property ColorContext colorContext: ColorContext {
 id: theme
 
-colorSet: ColorContext.Window // copied from TracksPage, maybe use 
Pane?
+colorSet: ColorContext.View
 }
 
 //FIXME make TrackMenuController a proper type (see TrackMenu)
@@ -206,7 +206,7 @@ RowLayout {
 focus: true
 clip: true
 
-fadingEdge.backgroundColor: "transparent"
+fadingEdge.backgroundColor: theme.bg.primary
 
 Accessible.role: Accessible.List
 Accessible.name: qsTr("Track list")



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/c19d9d6940261170734b80df06a92881815c899c...eaa2a6510b9bbf29703e512c90e3572574fd9430

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/c19d9d6940261170734b80df06a92881815c899c...eaa2a6510b9bbf29703e512c90e3572574fd9430
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] 4 commits: qml: do not override application cursor in DragItem

2024-09-14 Thread @fkuehne


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


Commits:
fc618f3f by Fatih Uzunoglu at 2024-09-14T09:34:06+00:00
qml: do not override application cursor in DragItem

Since drag is a native drag, cursor change is not
no longer application's responsibility.

- - - - -
62a5a530 by Fatih Uzunoglu at 2024-09-14T09:34:06+00:00
qml: use busy cursor as soon as applicable in PlaylistMediaList

Although progress indicator is shown with a delay, the cursor
should be rather changed to busy cursor as soon as possible.
It is not really conventional to wait setting busy cursor
when the view is already busy.

- - - - -
6a473778 by Fatih Uzunoglu at 2024-09-14T09:34:06+00:00
qml: use busy cursor as soon as applicable in PlaylistMediaDisplay

Although progress indicator is shown with a delay, the cursor
should be rather changed to busy cursor as soon as possible.
It is not really conventional to wait setting busy cursor
when the view is already busy.

- - - - -
c19d9d69 by Fatih Uzunoglu at 2024-09-14T09:34:06+00:00
qml: do not override application cursor in playqueue button drop area

- - - - -


4 changed files:

- modules/gui/qt/maininterface/qml/BannerSources.qml
- modules/gui/qt/medialibrary/qml/PlaylistMediaDisplay.qml
- modules/gui/qt/medialibrary/qml/PlaylistMediaList.qml
- modules/gui/qt/widgets/qml/DragItem.qml


Changes:

=
modules/gui/qt/maininterface/qml/BannerSources.qml
=
@@ -422,17 +422,10 @@ T.ToolBar {
 anchors.fill: parent
 
 onContainsDragChanged: {
-if (containsDrag) {
+if (containsDrag)
 _timer.restart()
-
-if (plListView)
-
MainCtx.setCursor(Qt.DragCopyCursor)
-} else {
+else
 _timer.stop()
-
-if (plListView)
-MainCtx.restoreCursor()
-}
 }
 
 onEntered: (drag) => {


=
modules/gui/qt/medialibrary/qml/PlaylistMediaDisplay.qml
=
@@ -130,11 +130,13 @@ FocusScope {
 }
 
 onTransactionPendingChanged: {
-if (transactionPending)
+if (transactionPending) {
+MainCtx.setCursor(root, Qt.BusyCursor)
 visibilityTimer.start()
-else {
+} else {
 visibilityTimer.stop()
 progressIndicator.visible = false
+MainCtx.unsetCursor(root)
 }
 }
 }
@@ -151,13 +153,6 @@ FocusScope {
 
 text: qsTr("Processing...")
 
-onVisibleChanged: {
-if (visible)
-MainCtx.setCursor(root, Qt.BusyCursor)
-else
-MainCtx.unsetCursor(root)
-}
-
 Timer {
 id: visibilityTimer
 


=
modules/gui/qt/medialibrary/qml/PlaylistMediaList.qml
=
@@ -107,11 +107,13 @@ MainViewLoader {
 coverPrefix: (isMusic) ? "playlist-music" : "playlist-video"
 
 onTransactionPendingChanged: {
-if (transactionPending)
+if (transactionPending) {
+MainCtx.setCursor(root, Qt.BusyCursor)
 visibilityTimer.start()
-else {
+} else {
 visibilityTimer.stop()
 progressIndicator.visible = false
+MainCtx.unsetCursor(root)
 }
 }
 }
@@ -202,13 +204,6 @@ MainViewLoader {
 
 text: qsTr("Processing...")
 
-onVisibleChanged: {
-if (visible)
-MainCtx.setCursor(root, Qt.BusyCursor)
-else
-MainCtx.unsetCursor(root)
-}
-
 Timer {
 id: visibilityTimer
 


=
modules/gui/qt/widgets/qml/DragItem.qml
=
@@ -293,13 +293,9 @@ Item {
 dragItem._dropFailedCallback = null
 dragItem._dropCallback = null
 dragItem._inputItems = undefined
-
-MainCtx.setCursor(Qt.DragMoveCursor)
 }
 
 function exit() {
-MainCtx.restoreCursor()
-
 _pendingNativeDragStart = false
 }
 



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/b95e5673f4dd92fddb260dbe8f111eda7910214c...c19d9d6940261170734b80df06a92881815c899c

-- 
View it on GitLab: 
https://c

[vlc-commits] [Git][videolan/vlc][master] 2 commits: qml: fix possible race issue in ExpandGridView

2024-09-14 Thread @fkuehne


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


Commits:
d2582ac5 by Prince Gupta at 2024-09-14T09:11:51+00:00
qml: fix possible race issue in ExpandGridView

- - - - -
b95e5673 by Prince Gupta at 2024-09-14T09:11:51+00:00
qml: fix view change handling with size changes in ExpandGridView

- - - - -


1 changed file:

- modules/gui/qt/widgets/qml/ExpandGridView.qml


Changes:

=
modules/gui/qt/widgets/qml/ExpandGridView.qml
=
@@ -178,7 +178,10 @@ FocusScope {
 flickable.layout(true)
 }
 
-onHeightChanged: _anchoredLayout(false)
+// view needs to be relayout, since items may move
+onWidthChanged: Qt.callLater(_anchoredLayout, true)
+onHeightChanged: Qt.callLater(_anchoredLayout, true)
+
 onContentWidthChanged: _anchoredLayout(true)
 onContentHeightChanged: _anchoredLayout(true)
 
@@ -356,8 +359,11 @@ FocusScope {
 
 // layouts such that views indexes are preserved during a resize
 function _anchoredLayout(forceLayout) {
-if (_currentRange[0] === _currentRange[1])
+if (_currentRange[0] === _currentRange[1]) {
+// empty view, we may still need to update internal variables here
+flickable.layout(forceLayout)
 return
+}
 
 // anchoring and expand item animation conflicts
 // causing view range oscilate on two different values



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/16b31aa57e3919dbe661c213868dee4b8bc1e3bd...b95e5673f4dd92fddb260dbe8f111eda7910214c

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/16b31aa57e3919dbe661c213868dee4b8bc1e3bd...b95e5673f4dd92fddb260dbe8f111eda7910214c
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] 2 commits: dts_header: initialize SUBSTREAM_LBR size to 0

2024-09-14 Thread @fkuehne


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


Commits:
b23f09b2 by Thomas Guillem at 2024-09-14T08:58:11+00:00
dts_header: initialize SUBSTREAM_LBR size to 0

It's a substream and can't work alone, so a size of 0 is legitimate.

Fixes #28773 (Use of uninitialised value)

- - - - -
16b31aa5 by Thomas Guillem at 2024-09-14T08:58:11+00:00
packetizer: dts: check for frame_size for the first sync

Only substreams are allowed to have a frame_size of 0.

- - - - -


2 changed files:

- modules/packetizer/dts.c
- modules/packetizer/dts_header.c


Changes:

=
modules/packetizer/dts.c
=
@@ -207,7 +207,8 @@ static block_t *PacketizeBlock( decoder_t *p_dec, block_t 
**pp_block )
 
 /* Check if frame is valid and get frame info */
 if( vlc_dts_header_Parse( &p_sys->first, p_header,
-  VLC_DTS_HEADER_SIZE ) != VLC_SUCCESS )
+  VLC_DTS_HEADER_SIZE ) != VLC_SUCCESS
+ || p_sys->first.i_frame_size == 0 )
 {
 msg_Dbg( p_dec, "emulated sync word" );
 block_SkipByte( &p_sys->bytestream );


=
modules/packetizer/dts_header.c
=
@@ -341,6 +341,7 @@ static int dts_header_ParseLBRExtSubstream( 
vlc_dts_header_t *p_header,
 bs_skip( &s, 16 );
 uint16_t nLBRScaledBitRate_LSW = bs_read( &s, 16 );
 p_header->i_bitrate = nLBRScaledBitRate_LSW | ((nLBRBitRateMSnybbles & 
0xF0) << 12);
+p_header->i_frame_size = 0;
 return VLC_SUCCESS;
 }
 



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/4e64551d00d1f2ee3bbb58bcd42e4c13662534b5...16b31aa57e3919dbe661c213868dee4b8bc1e3bd

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/4e64551d00d1f2ee3bbb58bcd42e4c13662534b5...16b31aa57e3919dbe661c213868dee4b8bc1e3bd
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] 7 commits: macosx: Add vlc title segment type

2024-09-13 Thread @fkuehne


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


Commits:
6d934962 by Claudio Cambra at 2024-09-13T16:49:27+00:00
macosx: Add vlc title segment type

Signed-off-by: Claudio Cambra 

- - - - -
c58b63b7 by Claudio Cambra at 2024-09-13T16:49:27+00:00
macosx: Add VLCLibraryHeaderSegment

Signed-off-by: Claudio Cambra 

- - - - -
feea59c2 by Claudio Cambra at 2024-09-13T16:49:27+00:00
macosx: Properly handle new header segment types' selection

Signed-off-by: Claudio Cambra 

- - - - -
5b0cf3e4 by Claudio Cambra at 2024-09-13T16:49:27+00:00
macosx: Classify header segment types as group items

Signed-off-by: Claudio Cambra 

- - - - -
24064c19 by Claudio Cambra at 2024-09-13T16:49:27+00:00
macosx: Remove defaults from segment switches

Signed-off-by: Claudio Cambra 

- - - - -
c38e7326 by Claudio Cambra at 2024-09-13T16:49:27+00:00
macosx: Give library header segment an icon

Signed-off-by: Claudio Cambra 

- - - - -
4e64551d by Claudio Cambra at 2024-09-13T16:49:27+00:00
macosx: Fix switch case and return warnings in VLCLibrarySegment

Signed-off-by: Claudio Cambra 

- - - - -


4 changed files:

- modules/gui/macosx/library/VLCLibrarySegment.h
- modules/gui/macosx/library/VLCLibrarySegment.m
- modules/gui/macosx/library/VLCLibraryWindowNavigationSidebarViewController.m
- modules/gui/macosx/library/VLCLibraryWindowToolbarDelegate.m


Changes:

=
modules/gui/macosx/library/VLCLibrarySegment.h
=
@@ -29,6 +29,8 @@ extern NSString * const VLCLibraryBookmarkedLocationsChanged;
 
 typedef NS_ENUM(NSInteger, VLCLibrarySegmentType) {
 VLCLibraryLowSentinelSegment = -1,
+VLCLibraryVLCTitleSegment,
+VLCLibraryHeaderSegment,
 VLCLibraryHomeSegment,
 VLCLibraryVideoSegment,
 VLCLibraryShowsVideoSubSegment,


=
modules/gui/macosx/library/VLCLibrarySegment.m
=
@@ -42,6 +42,8 @@ NSString * const VLCLibraryBookmarkedLocationsChanged = 
@"VLCLibraryBookmarkedLo
 + (NSArray *)librarySegments
 {
 return @[
+[VLCLibrarySegment segmentWithSegmentType:VLCLibraryVLCTitleSegment],
+[VLCLibrarySegment segmentWithSegmentType:VLCLibraryHeaderSegment],
 [VLCLibrarySegment segmentWithSegmentType:VLCLibraryHomeSegment],
 [VLCLibrarySegment segmentWithSegmentType:VLCLibraryVideoSegment],
 [VLCLibrarySegment segmentWithSegmentType:VLCLibraryMusicSegment],
@@ -179,6 +181,10 @@ NSString * const VLCLibraryBookmarkedLocationsChanged = 
@"VLCLibraryBookmarkedLo
 - (NSString *)displayStringForType:(VLCLibrarySegmentType)segmentType
 {
 switch (segmentType) {
+case VLCLibraryVLCTitleSegment:
+return _NS("VLC");
+case VLCLibraryHeaderSegment:
+return _NS("Library");
 case VLCLibraryHomeSegment:
 return _NS("Home");
 case VLCLibraryMusicSegment:
@@ -213,8 +219,7 @@ NSString * const VLCLibraryBookmarkedLocationsChanged = 
@"VLCLibraryBookmarkedLo
 NSAssert(NO, @"displayStringForType should not be called for this 
segment type");
 case VLCLibraryLowSentinelSegment:
 case VLCLibraryHighSentinelSegment:
-default:
-NSAssert(true, @"Invalid segment value");
+NSAssert(NO, @"Invalid segment value");
 }
 return nil;
 }
@@ -222,6 +227,10 @@ NSString * const VLCLibraryBookmarkedLocationsChanged = 
@"VLCLibraryBookmarkedLo
 - (NSImage *)oldIconImageForType:(VLCLibrarySegmentType)segmentType
 {
 switch (segmentType) {
+case VLCLibraryVLCTitleSegment:
+return NSApp.applicationIconImage;
+case VLCLibraryHeaderSegment:
+return nil;
 case VLCLibraryHomeSegment:
 return [NSImage imageNamed:@"bw-home"];
 case VLCLibraryMusicSegment:
@@ -247,16 +256,24 @@ NSString * const VLCLibraryBookmarkedLocationsChanged = 
@"VLCLibraryBookmarkedLo
 case VLCLibraryGroupsSegment:
 case VLCLibraryGroupsGroupSubSegment:
 return [NSImage imageNamed:@"NSTouchBarTagIcon"];
-default:
-NSAssert(true, @"Invalid segment value");
+case VLCLibraryLowSentinelSegment:
+case VLCLibraryHighSentinelSegment:
+NSAssert(NO, @"Invalid segment value");
 return nil;
 }
+
+return nil;
 }
 
 - (NSImage *)newIconImageForType:(VLCLibrarySegmentType)segmentType
 {
 if (@available(macOS 11.0, *)) {
 switch (segmentType) {
+case VLCLibraryVLCTitleSegment:
+return NSApp.applicationIconImage;
+case VLCLibraryHeaderSegment:
+return [NSImage imageWithSystemSymbolName:@"books.vertical.fill"
+ accessibilityDescriptio

[vlc-commits] [Git][videolan/vlc][master] 3 commits: qt: provide wayland protocol `viewporter`

2024-09-13 Thread @fkuehne


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


Commits:
2f65308b by Fatih Uzunoglu at 2024-09-13T14:39:26+00:00
qt: provide wayland protocol `viewporter`

- - - - -
5d33c4ea by Fatih Uzunoglu at 2024-09-13T14:39:26+00:00
qt: support fractional scaling in wayland compositor

- - - - -
69ad3238 by Fatih Uzunoglu at 2024-09-13T14:39:26+00:00
qt: use `wl_surface_set_buffer_scale()` only when applicable

- - - - -


3 changed files:

- modules/gui/qt/Makefile.am
- modules/gui/qt/maininterface/compositor_wayland.cpp
- modules/gui/qt/maininterface/compositor_wayland_module.c


Changes:

=
modules/gui/qt/Makefile.am
=
@@ -605,6 +605,28 @@ libqt_wayland_plugin_la_SOURCES = \
maininterface/compositor_wayland_module.c \
maininterface/compositor_wayland_module.h
 
+#if WAYLAND_PROTOCOLS
+#if WAYLAND_SCANNER
+libqt_wayland_plugin_la_CFLAGS += -DQT_HAS_WAYLAND_PROTOCOLS 
-I$(builddir)/maininterface
+
+nodist_libqt_wayland_plugin_la_SOURCES = \
+   maininterface/viewporter-client-protocol.h \
+   maininterface/viewporter-protocol.c
+
+BUILT_SOURCES += $(nodist_libqt_wayland_plugin_la_SOURCES)
+
+maininterface/viewporter-client-protocol.h: \
+   $(WAYLAND_PROTOCOLS)/stable/viewporter/viewporter.xml
+   $(AM_V_GEN)$(WAYLAND_SCANNER) client-header $< $@
+
+maininterface/viewporter-protocol.c: \
+   $(WAYLAND_PROTOCOLS)/stable/viewporter/viewporter.xml \
+   maininterface/viewporter-client-protocol.h
+   $(AM_V_GEN)$(WAYLAND_SCANNER) private-code $< $@
+
+#endif
+#endif
+
 if ENABLE_QT
 gui_LTLIBRARIES += libqt_wayland_plugin.la
 endif


=
modules/gui/qt/maininterface/compositor_wayland.cpp
=
@@ -17,6 +17,8 @@
  */
 #include "compositor_wayland.hpp"
 
+#include 
+
 #include "maininterface/mainctx.hpp"
 #include "maininterface/interface_window_handler.hpp"
 
@@ -115,7 +117,7 @@ bool CompositorWayland::makeMainInterface(MainCtx* mainCtx)
 if (!interfaceSurface)
 return false;
 
-m_waylandImpl->setupInterface(m_waylandImpl, interfaceSurface, 
dprForWindow(m_qmlView.get()));
+m_waylandImpl->setupInterface(m_waylandImpl, interfaceSurface, 
std::ceil(dprForWindow(m_qmlView.get(;
 
 CompositorVideo::Flags flags = CompositorVideo::CAN_SHOW_PIP | 
CompositorVideo::HAS_ACRYLIC;
 


=
modules/gui/qt/maininterface/compositor_wayland_module.c
=
@@ -25,6 +25,10 @@
 #include 
 #include 
 
+#ifdef QT_HAS_WAYLAND_PROTOCOLS
+#include "viewporter-client-protocol.h"
+#endif
+
 #include 
 
 typedef struct
@@ -34,26 +38,38 @@ typedef struct
 struct wl_compositor* compositor;
 struct wl_subcompositor* subcompositor;
 
+#ifdef QT_HAS_WAYLAND_PROTOCOLS
+struct wp_viewport* viewport;
+struct wp_viewporter* viewporter;
+#endif
+
 struct wl_surface* interface_surface;
 
 struct wl_surface* video_surface;
 struct wl_subsurface* video_subsurface;
 
 int buffer_scale;
+
+uint32_t compositor_interface_version;
 } qtwayland_priv_t;
 
 static void registry_global_cb(void* data, struct wl_registry* registry,
uint32_t id, const char* iface, uint32_t 
version)
 {
-VLC_UNUSED(version);
-
 qtwayland_t* obj = (qtwayland_t*)data;
 qtwayland_priv_t* sys = (qtwayland_priv_t*)obj->p_sys;
 
 if (!strcmp(iface, "wl_subcompositor"))
 sys->subcompositor = (struct 
wl_subcompositor*)wl_registry_bind(registry, id, &wl_subcompositor_interface, 
version);
 if (!strcmp(iface, "wl_compositor"))
+{
+sys->compositor_interface_version = version;
 sys->compositor = (struct wl_compositor*)wl_registry_bind(registry, 
id, &wl_compositor_interface, version);
+}
+#ifdef QT_HAS_WAYLAND_PROTOCOLS
+if (!strcmp(iface, "wp_viewporter"))
+sys->viewporter = (struct wp_viewporter*)wl_registry_bind(registry, 
id, &wp_viewporter_interface, version);
+#endif
 }
 
 static void registry_global_remove_cb(void* data, struct wl_registry* 
registry, uint32_t id)
@@ -90,7 +106,29 @@ static int SetupVoutWindow(qtwayland_t* obj, vlc_window_t* 
wnd)
 if (!sys->video_surface)
 return VLC_EGENERIC;
 
-wl_surface_set_buffer_scale(sys->video_surface, sys->buffer_scale);
+#ifdef QT_HAS_WAYLAND_PROTOCOLS
+if (sys->viewporter)
+sys->viewport = wp_viewporter_get_viewport(sys->viewporter, 
sys->video_surface);
+else
+#endif
+{
+// The buffer scale must remain 1 when fractional scaling is used
+if (sys->buffer_scale != 1)
+{
+msg_Dbg(obj, "Viewporter protocol is not available, and scale is 
not 1." \
+ "Only integer scaling may be possible.");
+
+if (sys->compositor_interface_version >

[vlc-commits] [Git][videolan/vlc][master] 4 commits: qml: enable ability to customize drop indicator in ListViewExt

2024-09-13 Thread @fkuehne


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


Commits:
81a50fac by Fatih Uzunoglu at 2024-09-13T13:55:22+00:00
qml: enable ability to customize drop indicator in ListViewExt

In some cases, drop indicator may need to be customized. This
also allows disabling the indicator completely.

The way it works is by instantiating the drop indicator from
the component property once `itemContainsDrag`, which is an
optional property, changes.

- - - - -
43df33c6 by Fatih Uzunoglu at 2024-09-13T13:55:22+00:00
qml: fix invalid property accession in PlaylistDelegate

- - - - -
0174b492 by Fatih Uzunoglu at 2024-09-13T13:55:22+00:00
qml: consolidate `ListViewExt`'s drag and drop functionality over 
`TableViewExt`

This makes it possible to not re-invent drop indicator positioning, and also
allows rejecting the drag event when drop is not applicable.

In order to reject drag event when not applicable, there needs to be two
drop areas. This has been the case in `PlaylistListView/Delegate` but not
in `TableViewExt/Delegate`. With this patch, I followed the same approach
used in `PlaylistListView` which has a rather proven track record on drag
and drop functionality.

- - - - -
f482c601 by Fatih Uzunoglu at 2024-09-13T13:55:22+00:00
qml: factorize delegate vertical drop area layout in ListViewExt

- - - - -


6 changed files:

- modules/gui/qt/medialibrary/qml/PlaylistMedia.qml
- modules/gui/qt/medialibrary/qml/PlaylistMediaList.qml
- modules/gui/qt/playlist/qml/PlaylistDelegate.qml
- modules/gui/qt/widgets/qml/ListViewExt.qml
- modules/gui/qt/widgets/qml/TableViewDelegate.qml
- modules/gui/qt/widgets/qml/TableViewExt.qml


Changes:

=
modules/gui/qt/medialibrary/qml/PlaylistMedia.qml
=
@@ -98,8 +98,6 @@ MainTableView {
 
 rowHeight: VLCStyle.tableCoverRow_height
 
-acceptDrop: true
-
 sortModel: (availableRowWidth < VLCStyle.colWidth(4)) ? _modelSmall
   : _modelMedium
 
@@ -121,42 +119,6 @@ MainTableView {
 onActionForSelection: (selection) => model.addAndPlay( selection )
 onItemDoubleClicked: (index, model) => MediaLib.addAndPlay(model.id)
 
-
-onDropEntered: (delegate, index, drag, before) => {
-if (!root.model || root.model.transactionPending)
-{
-drag.accepted = false
-return
-}
-
-root._dropUpdatePosition(drag, index, delegate, before)
-}
-
-onDropUpdatePosition: (delegate, index, drag, before) => {
-root._dropUpdatePosition(drag, index, delegate, before)
-}
-
-onDropExited: (delegate, index, drag, before) => {
-root.hideLine(delegate)
-}
-
-onDropEvent: (delegate, index, drag, drop, before) => {
-root.applyDrop(drop, index, delegate, before)
-}
-
-
//-
-// Connections
-
//-
-
-Connections {
-target: root
-
-// NOTE: We want to hide the drop line when scrolling so its position 
stays relevant.
-function onContentYChanged() {
-hideLine(_item)
-}
-}
-
 
//-
 // Functions
 
//-
@@ -176,7 +138,7 @@ MainTableView {
 
 function applyDrop(drop, index, delegate, before) {
 if (listView.isDropAcceptableFunc(drop, index + (before ? 0 : 1)) === 
false) {
-root.hideLine(delegate)
+drop.accepted = false
 return Promise.resolve()
 }
 
@@ -188,14 +150,13 @@ MainTableView {
 if (dragItem === item) {
 model.move(selectionModel.selectedRows(), destinationIndex)
 root.forceActiveFocus()
-root.hideLine(delegate)
 // NOTE: Dropping medialibrary content into the playlist.
 } else if (Helpers.isValidInstanceOf(item, Widgets.DragItem)) {
 return item.getSelectedInputItem()
 .then(inputItems => {
 model.insert(inputItems, destinationIndex)
 })
-.then(() => { root.forceActiveFocus(); 
root.hideLine(delegate); })
+.then(() => { root.forceActiveFocus(); })
 } else if (drop.hasUrls) {
 const urlList = []
 for (let url in drop.urls)
@@ -204,48 +165,11 @@ MainTableView {
 model.insert(urlList, destinationIndex)
 
 root.forceActiveFocus()
-root.hideLine(delegate)
 }
 
 return Promise.resolve()
 }
 
-function _dropUpdatePosition(drag, index, delegate, before) {
-if (listView.isDropAcceptableFunc(dr

[vlc-commits] [Git][videolan/vlc][master] 8 commits: qt: fix race condition on the Qml playlist instance initialisation

2024-09-13 Thread @fkuehne


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


Commits:
4db4c7a9 by Pierre Lamot at 2024-09-13T13:17:01+00:00
qt: fix race condition on the Qml playlist instance initialisation

when loading the interface we wait for the onPlaylistInitialized signal but this
signal may be emitted before the interface is loaded, now we wait on a boolean
state instead

- - - - -
92f71ae8 by Pierre Lamot at 2024-09-13T13:17:01+00:00
qt: remove dependency on p_intf from ControlbarProfileModel

- - - - -
255f1c4b by Pierre Lamot at 2024-09-13T13:17:01+00:00
qt: move isCurrentItemSynced to private API of PlayerController

- - - - -
7185cd64 by Pierre Lamot at 2024-09-13T13:17:01+00:00
qt: move art fetch callbacks to the cpp side

- - - - -
ffb7d092 by Pierre Lamot at 2024-09-13T13:17:01+00:00
qt: remove unecessary includes from MainCtx

- - - - -
1b2afcd1 by Pierre Lamot at 2024-09-13T13:17:01+00:00
qt: inject playlist controller as a depency in MediaLib

- - - - -
0cd4f244 by Pierre Lamot at 2024-09-13T13:17:01+00:00
qt: don't store mlcustomcover instance in the medialibrary

we don't need to store the image provider inside the medialibray as 
it's only
useful to the QMLEngine. We only needed it fot crafting URL, but this can be
done with a stateless function.

- - - - -
3855b461 by Pierre Lamot at 2024-09-13T13:17:01+00:00
qt: make MLThreadRunner a disctinctive object from MediaLib

this allows to handle the part that requires the deleteLater within the MediaLib
class, this will allow us to handle the lifecycle of MediaLib like the other 
singletons

- - - - -


30 changed files:

- modules/gui/qt/dialogs/firstrun/firstrunwizard.cpp
- modules/gui/qt/dialogs/systray/systray.cpp
- modules/gui/qt/dialogs/toolbar/controlbar_profile_model.cpp
- modules/gui/qt/dialogs/toolbar/controlbar_profile_model.hpp
- modules/gui/qt/maininterface/compositor_dcomp_acrylicsurface.cpp
- modules/gui/qt/maininterface/compositor_win7.hpp
- modules/gui/qt/maininterface/compositor_x11.cpp
- modules/gui/qt/maininterface/interface_window_handler.cpp
- modules/gui/qt/maininterface/mainctx.cpp
- modules/gui/qt/maininterface/mainctx.hpp
- modules/gui/qt/maininterface/mainctx_win32.cpp
- modules/gui/qt/maininterface/mainctx_win32.hpp
- modules/gui/qt/maininterface/mainui.cpp
- modules/gui/qt/maininterface/qml/MainInterface.qml
- modules/gui/qt/medialibrary/medialib.cpp
- modules/gui/qt/medialibrary/medialib.hpp
- modules/gui/qt/medialibrary/mlcustomcover.cpp
- modules/gui/qt/medialibrary/mlcustomcover.hpp
- modules/gui/qt/medialibrary/mlfolder.cpp
- modules/gui/qt/medialibrary/mlfoldersmodel.cpp
- modules/gui/qt/medialibrary/mlgenremodel.cpp
- modules/gui/qt/medialibrary/mlplaylistlistmodel.cpp
- modules/gui/qt/medialibrary/mlvideofoldersmodel.cpp
- modules/gui/qt/medialibrary/mlvideogroupsmodel.cpp
- modules/gui/qt/menus/menus.cpp
- modules/gui/qt/menus/qml_menu_wrapper.cpp
- modules/gui/qt/menus/qml_menu_wrapper.hpp
- modules/gui/qt/network/networkmediamodel.cpp
- modules/gui/qt/player/player_controller.cpp
- modules/gui/qt/player/player_controller.hpp


The diff was not included because it is too large.


View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/592eab2abcb1895f288f7d1b1c44f1a211a74cdd...3855b4610654aa4b926061e0e9d66f64566ca6f4

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/592eab2abcb1895f288f7d1b1c44f1a211a74cdd...3855b4610654aa4b926061e0e9d66f64566ca6f4
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] 2 commits: qml: fix video group view loading

2024-09-13 Thread @fkuehne


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


Commits:
16645c50 by Prince Gupta at 2024-09-13T13:02:32+00:00
qml: fix video group view loading

add missing required property

- - - - -
592eab2a by Prince Gupta at 2024-09-13T13:02:32+00:00
qml: rename MediaGroupDisplay to VideoGroupDisplay

it's only suppose to handle videos

- - - - -


5 changed files:

- modules/gui/qt/Makefile.am
- modules/gui/qt/medialibrary/qml/VideoAllDisplay.qml
- modules/gui/qt/medialibrary/qml/MediaGroupDisplay.qml → 
modules/gui/qt/medialibrary/qml/VideoGroupDisplay.qml
- modules/gui/qt/meson.build
- po/POTFILES.in


Changes:

=
modules/gui/qt/Makefile.am
=
@@ -936,7 +936,7 @@ libqml_module_medialibrary_a_CPPFLAGS = 
$(libqt_plugin_la_CPPFLAGS)
 libqml_module_medialibrary_a_QML = \
medialibrary/qml/ArtistTopBanner.qml \
medialibrary/qml/AudioGridItem.qml \
-   medialibrary/qml/MediaGroupDisplay.qml \
+   medialibrary/qml/VideoGroupDisplay.qml \
medialibrary/qml/MusicAlbums.qml \
medialibrary/qml/MusicAlbumsDisplay.qml \
medialibrary/qml/MusicAlbumsGridExpandDelegate.qml \


=
modules/gui/qt/medialibrary/qml/VideoAllDisplay.qml
=
@@ -73,7 +73,7 @@ Widgets.PageLoader {
 Component {
 id: componentGroup
 
-MediaGroupDisplay {
+VideoGroupDisplay {
 id: group
 
 onCurrentIndexChanged: History.viewProp.initialIndex = currentIndex


=
modules/gui/qt/medialibrary/qml/MediaGroupDisplay.qml → 
modules/gui/qt/medialibrary/qml/VideoGroupDisplay.qml
=
@@ -40,6 +40,15 @@ VideoAll {
 // NOTE: The title of the group.
 property string title: ""
 
+sectionProperty: {
+switch (model.sortCriteria) {
+case "title":
+return "title_first_symbol"
+default:
+return ""
+}
+}
+
 // Children
 
 model: MLVideoModel {


=
modules/gui/qt/meson.build
=
@@ -601,7 +601,7 @@ qml_modules += {
 'sources': files(
 'medialibrary/qml/ArtistTopBanner.qml',
 'medialibrary/qml/AudioGridItem.qml',
-'medialibrary/qml/MediaGroupDisplay.qml',
+'medialibrary/qml/VideoGroupDisplay.qml',
 'medialibrary/qml/MusicAlbums.qml',
 'medialibrary/qml/MusicAlbumsDisplay.qml',
 'medialibrary/qml/MusicAlbumsGridExpandDelegate.qml',


=
po/POTFILES.in
=
@@ -781,7 +781,7 @@ modules/gui/qt/medialibrary/mlvideogroupsmodel.cpp
 modules/gui/qt/medialibrary/mlvideogroupsmodel.hpp
 modules/gui/qt/medialibrary/qml/ArtistTopBanner.qml
 modules/gui/qt/medialibrary/qml/AudioGridItem.qml
-modules/gui/qt/medialibrary/qml/MediaGroupDisplay.qml
+modules/gui/qt/medialibrary/qml/VideoGroupDisplay.qml
 modules/gui/qt/medialibrary/qml/MusicAlbums.qml
 modules/gui/qt/medialibrary/qml/MusicAlbumsDisplay.qml
 modules/gui/qt/medialibrary/qml/MusicAlbumsGridExpandDelegate.qml



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/e997e6ac87affbc708d9dbe9511d87272d7714b3...592eab2abcb1895f288f7d1b1c44f1a211a74cdd

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/e997e6ac87affbc708d9dbe9511d87272d7714b3...592eab2abcb1895f288f7d1b1c44f1a211a74cdd
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] video_output: fix Display Aspect Ratio initialization

2024-09-13 Thread @fkuehne


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


Commits:
e997e6ac by Steve Lhomme at 2024-09-13T12:35:22+00:00
video_output: fix Display Aspect Ratio initialization

The read value is correct when GetAspectRatio() returns true.
Bug introduced in 1a54ee461afda0126951ed568426f5577739815a.

- - - - -


1 changed file:

- src/video_output/video_output.c


Changes:

=
src/video_output/video_output.c
=
@@ -2253,7 +2253,7 @@ static void vout_InitSource(vout_thread_sys_t *vout)
 char *psz_ar = var_InheritString(&vout->obj, "aspect-ratio");
 if (psz_ar) {
 unsigned num, den;
-if (!GetAspectRatio(psz_ar, &num, &den))
+if (GetAspectRatio(psz_ar, &num, &den))
 vout_SetAspectRatio(vout, num, den);
 free(psz_ar);
 }



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

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/e997e6ac87affbc708d9dbe9511d87272d7714b3
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] qml: fix header view alignment in BrowseView

2024-09-13 Thread @fkuehne


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


Commits:
d3e4f339 by Prince Gupta at 2024-09-13T12:16:58+00:00
qml: fix header view alignment in BrowseView

closes #28586

- - - - -


1 changed file:

- modules/gui/qt/network/qml/BrowseTreeDisplay.qml


Changes:

=
modules/gui/qt/network/qml/BrowseTreeDisplay.qml
=
@@ -37,6 +37,11 @@ MainViewLoader {
 readonly property int contentLeftMargin: currentItem?.contentLeftMargin ?? 0
 readonly property int contentRightMargin: currentItem?.contentRightMargin 
?? 0
 
+readonly property int headerLeftPadding: (contentLeftMargin > 0)
+ ? contentLeftMargin : 
VLCStyle.dynamicAppMargins(width)
+readonly property int headerRightPadding: (contentRightMargin > 0)
+  ? contentRightMargin : 
VLCStyle.dynamicAppMargins(width)
+
 // fixme remove this
 property Item _currentView: currentItem
 
@@ -137,8 +142,8 @@ MainViewLoader {
 headerDelegate: BrowseTreeHeader {
 providerModel: root.model
 
-leftPadding: root.contentLeftMargin
-rightPadding: root.contentRightMargin
+leftPadding: root.headerLeftPadding
+rightPadding: root.headerRightPadding
 
 width: gridView.width
 
@@ -276,8 +281,8 @@ MainViewLoader {
 header: BrowseTreeHeader {
 providerModel: root.model
 
-leftPadding: root.contentLeftMargin
-rightPadding: root.contentRightMargin
+leftPadding: root.contentLeftPadding
+rightPadding: root.contentRightPadding
 
 width: tableView.width
 
@@ -411,6 +416,9 @@ MainViewLoader {
 
 focus: true
 
+leftPadding: root.headerLeftPadding
+rightPadding: root.headerRightPadding
+
 providerModel: root.model
 
 Layout.fillWidth: true



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

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/d3e4f3391a3ab40c8a78744c80b984c3cad7477f
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] 2 commits: test: decoder: use an owner for the packetizer

2024-09-13 Thread @fkuehne


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


Commits:
5f57257e by Thomas Guillem at 2024-09-13T09:49:49+00:00
test: decoder: use an owner for the packetizer

To access the fmt_in private member.

Regression from 08b24866dc443c30df8f9d5ee4f7e2045bf62956

Fixes #28770

- - - - -
0285de2a by Thomas Guillem at 2024-09-13T09:49:49+00:00
test: decoder: refactor decoder creation

- - - - -


1 changed file:

- test/src/input/decoder.c


Changes:

=
test/src/input/decoder.c
=
@@ -87,6 +87,14 @@ static void queue_sub(decoder_t *dec, subpicture_t *p_subpic)
 subpicture_Delete(p_subpic);
 }
 
+static decoder_t *decoder_create(vlc_object_t *parent)
+{
+struct decoder_owner *owner = vlc_object_create(parent, sizeof(*owner));
+if (unlikely(owner == NULL))
+return NULL;
+return &owner->dec;
+}
+
 static int decoder_load(decoder_t *decoder, bool is_packetizer,
  const es_format_t *restrict fmt)
 {
@@ -130,19 +138,17 @@ void test_decoder_destroy(decoder_t *decoder)
 decoder_t *test_decoder_create(vlc_object_t *parent, const es_format_t *fmt)
 {
 assert(parent && fmt);
-decoder_t *packetizer = NULL;
-decoder_t *decoder = NULL;
+decoder_t *packetizer = decoder_create(parent);
+decoder_t *decoder = decoder_create(parent);
 
-packetizer = vlc_object_create(parent, sizeof(*packetizer));
-struct decoder_owner *owner = vlc_object_create(parent, sizeof(*owner));
-
-if (packetizer == NULL || owner == NULL)
+if (packetizer == NULL || decoder == NULL)
 {
 if (packetizer)
 vlc_object_delete(packetizer);
 return NULL;
 }
-decoder = &owner->dec;
+
+struct decoder_owner *owner = dec_get_owner(decoder);
 owner->packetizer = packetizer;
 
 static const struct decoder_owner_callbacks dec_video_cbs =



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/0c0817fa7bb8d0ac6da51be4daa4f614be209135...0285de2a9ff669a30189d9c16dc8b951cbea4f38

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/0c0817fa7bb8d0ac6da51be4daa4f614be209135...0285de2a9ff669a30189d9c16dc8b951cbea4f38
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] 2 commits: qt: fix filter change regression

2024-09-13 Thread @fkuehne


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


Commits:
1ca33194 by Alaric Senat at 2024-09-13T09:18:46+00:00
qt: fix filter change regression

This was forgotten by 0be3282eb6d9a04a86160a74b780b2774e0252fa.
The filter options are now stored in the vout object instead of the
interface.

Fixes #28769

- - - - -
0c0817fa by Alaric Senat at 2024-09-13T09:18:46+00:00
filters: proxy: keep track of the proxied vars state

Since we now assume that the state of the filters parameters should be
stored in the vout (cf. 0be3282eb6d9a04a86160a74b780b2774e0252fa), the
state of the mapped variables should be kept between resets of the
filter chain.

The proxy functions used to create and destroy both the mappings and the
bound callbacks. In a perfect world, the mapping of the variables and
the binding of the callbacks should be decoupled. But for such a small
utility function, we can just stop destroying the state of the variables
between resets.

This patch also reworks the documentation of the modified functions
accordingly.

Refs #28769

- - - - -


3 changed files:

- include/vlc_filter.h
- modules/gui/qt/dialogs/extended/extended_panels.cpp
- src/misc/filter.c


Changes:

=
include/vlc_filter.h
=
@@ -365,8 +365,13 @@ static inline int filter_GetInputAttachments( filter_t 
*p_filter,
 }
 
 /**
- * This function duplicates every variables from the filter, and adds a proxy
- * callback to trigger filter events from obj.
+ * This function allow dynamically changing filter variables from a different
+ * object via VLC variables mapping.
+ *
+ * It maps the filter's variables on the proxy objects and bind them with a var
+ * callback that forwards changes to the filter.
+ * This is especially useful for manipulating filter chains via a single parent
+ * object.
  *
  * \param obj the object to add the callback proxy to
  * \param filter the filter object for which the callback will be proxified
@@ -379,8 +384,9 @@ VLC_API void filter_AddProxyCallbacks( vlc_object_t *obj, 
filter_t *filter,
 filter_AddProxyCallbacks(VLC_OBJECT(a), b, c)
 
 /**
- * This function removes the callbacks previously added to every duplicated
- * variables, and removes them afterward.
+ * This function unbind the callbacks from the proxy object.
+ *
+ * \note It does not remove the mapped variable to keep track of their state.
  *
  * \param obj the object to remove the callback proxy from
  * \param filter the filter object for which the callback was proxified


=
modules/gui/qt/dialogs/extended/extended_panels.cpp
=
@@ -297,7 +297,9 @@ void ExtVideo::clean()
 
 static QString ChangeFiltersString( qt_intf_t *p_intf, const char 
*psz_filter_type, const char *psz_name, bool b_add )
 {
-char* psz_chain = var_GetString( p_intf, psz_filter_type );
+char *psz_chain = nullptr;
+if (const auto vout = THEMIM->getVout(); vout != nullptr)
+psz_chain = var_GetString( vout.get(), psz_filter_type );
 
 QString const chain = QString( psz_chain ? psz_chain : "" );
 QStringList list = chain.split( ':', Qt::SkipEmptyParts );


=
src/misc/filter.c
=
@@ -56,13 +56,22 @@ void filter_AddProxyCallbacks( vlc_object_t *obj, filter_t 
*filter,
 {
 char *name = *pname;
 int var_type = var_Type(filter, name);
-if (var_Type(obj, name) || config_GetType(name) == 0)
+if (config_GetType(name) == 0)
 {
 free(name);
 continue;
 }
-var_Create(obj, name,
-   var_type | VLC_VAR_DOINHERIT | VLC_VAR_ISCOMMAND);
+
+/* Create a mapping variable of the filter value if it does not exist.
+ * These variables shouldn't be removed on proxy removal as they allow
+ * keeping track of the filter state between filter chain resets. */
+const bool not_mapped = (var_Type(obj, name) == 0);
+if (not_mapped)
+{
+var_Create(obj, name,
+   var_type | VLC_VAR_DOINHERIT | VLC_VAR_ISCOMMAND);
+}
+
 if ((var_type & VLC_VAR_ISCOMMAND))
 var_AddCallback(obj, name, TriggerFilterCallback, filter);
 else
@@ -94,7 +103,6 @@ void filter_DelProxyCallbacks( vlc_object_t *obj, filter_t 
*filter,
 var_DelCallback(obj, name, TriggerFilterCallback, filter);
 else if (filter_var_type)
 var_DelCallback(obj, name, restart_cb, obj);
-var_Destroy(obj, name);
 free(name);
 }
 free(names);



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/551b1bd8067087bb80be0194d3b617bd83fcd90c...0c0817fa7bb8d0ac6da51be4daa4f614be209135

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/551b1bd8067087bb80be0194d3b617bd83fcd90c...0c0817fa7bb8d0ac6da51be4daa4f614be209135
Y

[vlc-commits] [Git][videolan/vlc][master] video_window: use VLC_TICK_MIN to init last_left_press

2024-09-12 Thread @fkuehne


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


Commits:
551b1bd8 by Steve Lhomme at 2024-09-13T05:25:43+00:00
video_window: use VLC_TICK_MIN to init last_left_press

- - - - -


1 changed file:

- src/video_output/video_window.c


Changes:

=
src/video_output/video_window.c
=
@@ -146,7 +146,7 @@ static void vout_display_window_MouseEvent(vlc_window_t 
*window,
 {
 case VLC_WINDOW_MOUSE_MOVED:
 vlc_mouse_SetPosition(m, ev->x, ev->y);
-state->mouse.last_left_press = INT64_MIN;
+state->mouse.last_left_press = VLC_TICK_MIN;
 break;
 
 case VLC_WINDOW_MOUSE_PRESSED:
@@ -156,11 +156,11 @@ static void vout_display_window_MouseEvent(vlc_window_t 
*window,
 {
 const vlc_tick_t now = vlc_tick_now();
 
-if (state->mouse.last_left_press != INT64_MIN
+if (state->mouse.last_left_press != VLC_TICK_MIN
  && now - state->mouse.last_left_press < DOUBLE_CLICK_TIME)
 {
 m->b_double_click = true;
-state->mouse.last_left_press = INT64_MIN;
+state->mouse.last_left_press = VLC_TICK_MIN;
 }
 else
 state->mouse.last_left_press = now;
@@ -395,7 +395,7 @@ vlc_window_t *vout_display_window_New(vout_thread_t *vout)
 vlc_mutex_init(&state->lock);
 vlc_mouse_Init(&state->mouse.window);
 vlc_mouse_Init(&state->mouse.video);
-state->mouse.last_left_press = INT64_MIN;
+state->mouse.last_left_press = VLC_TICK_MIN;
 state->mouse.event = NULL;
 state->vout = vout;
 



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

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/551b1bd8067087bb80be0194d3b617bd83fcd90c
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] 2 commits: mux: mpeg: fix overflow handling

2024-09-12 Thread @fkuehne


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


Commits:
dba9bb94 by Alaric Senat at 2024-09-13T05:08:27+00:00
mux: mpeg: fix overflow handling

Fixes regressions from 3856f9fce93471c1d36bc6fdc34ad92484d79be2.

The previous barrier was using `i_count` as a **byte** count instead of
a **bit** count leading to the function bailing for legitimate writes.
This patches takes into account the remaining bits to write under the
buffer cursor in its overflow check.

- - - - -
4746ea56 by Alaric Senat at 2024-09-13T05:08:27+00:00
mux: mpeg: check overflow in bit alignment

Avoid an overflow when `bits_align` is called at the end of the
available size.

- - - - -


1 changed file:

- modules/mux/mpeg/bits.h


Changes:

=
modules/mux/mpeg/bits.h
=
@@ -21,6 +21,8 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  */
 
+#include 
+#include 
 #include 
 #include 
 
@@ -55,15 +57,22 @@ static inline void bits_align( bits_buffer_t *p_buffer )
 if( p_buffer->i_mask != 0x80 && p_buffer->i_data < p_buffer->i_size )
 {
 p_buffer->i_mask = 0x80;
-p_buffer->i_data++;
-p_buffer->p_data[p_buffer->i_data] = 0x00;
+if( ++p_buffer->i_data < p_buffer->i_size )
+p_buffer->p_data[p_buffer->i_data] = 0x00;
 }
 }
 
+static inline bool bits_will_overflow( const bits_buffer_t *buff, int count )
+{
+const int leftover = count - (stdc_trailing_zeros(buff->i_mask) + 1);
+const int byte_shift = (leftover + CHAR_BIT - 1) / CHAR_BIT;
+return buff->i_data + byte_shift >= buff->i_size;
+}
+
 static inline void bits_write( bits_buffer_t *p_buffer,
int i_count, uint64_t i_bits )
 {
-if (p_buffer->i_data + i_count < p_buffer->i_size)
+if( bits_will_overflow(p_buffer, i_count) )
 return;
 
 while( i_count > 0 )



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/b132d09580a85907e52a52624bd8d2a90da9629d...4746ea56dcf4e6a38dffdfdcade192fa6a21d8c7

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/b132d09580a85907e52a52624bd8d2a90da9629d...4746ea56dcf4e6a38dffdfdcade192fa6a21d8c7
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] 4 commits: vpx_alpha: add reference-counting to picture context

2024-09-12 Thread @fkuehne


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


Commits:
85a28e9a by Alexandre Janniaux at 2024-09-13T04:41:03+00:00
vpx_alpha: add reference-counting to picture context

The context is read-only and was currently copied for every picture, so
switch to reference counting to avoid this. It will also help when
moving planes stored in p_sys into the context, to determine when the
allocated plane should be released, and to copy/share the pointer
automatically.

- - - - -
a3054e86 by Alexandre Janniaux at 2024-09-13T04:41:03+00:00
vpx_alpha: use picture context to forward plane

p_sys is used by the pool to forward the picture pool context. Pictures
that are supporting copying should be using picture context instead,
which the vpx_alpha decoder was already doing.

This fixes a huge memory leak of picture data when playing VP9 videos.

STACK OF 1242 INSTANCES OF 'ROOT LEAK: malloc[2097152]':
9   libsystem_pthread.dylib   0x185e89d34 thread_start + 8
8   libsystem_pthread.dylib   0x185e8ef94 _pthread_start + 136
7   libvlccore.9.dylib0x1032606cc DecoderThread + 348  
decoder.c:1869
6   libvlccore.9.dylib0x103262c04 
DecoderThread_DecodeBlock + 256  decoder.c:1627
5   ???   0x107066034 0x7fff + 
9223372041267601461
4   ???   0x12a809674 0x7fff + 
9223372041862813301
3   ???   0x107065c70 0x7fff + 
9223372041267600497
2   ???   0x107066644 0x7fff + 
9223372041267603013
1   ???   0x1070662ec 0x7fff + 
9223372041267602157
0   libsystem_malloc.dylib0x185cc8a68 
_malloc_zone_malloc_instrumented_or_legacy + 148 

Instruments correctly indicates the following trace:

CombinePicturesCPU  
SendMergedLocked
QueuePic
ecoder_QueueVideo   
ecodeBlock  
DecodeVideo 
Decode  
DecoderThread_DecodeBlock   
DecoderThread   
_pthread_start  
thread_start

See ticket for details of the trace.

Fixes #28792

- - - - -
e3cad491 by Alexandre Janniaux at 2024-09-13T04:41:03+00:00
vpx_alpha: early-return during merging

Early return to avoid mixing the allocation path and the re-use path,
making two level of indentation useless.

Indentation is changed in the follow-up commit.

- - - - -
b132d095 by Alexandre Janniaux at 2024-09-13T04:41:03+00:00
vpx_alpha: reindent after last changes

- - - - -


1 changed file:

- modules/codec/vpx_alpha.c


Changes:

=
modules/codec/vpx_alpha.c
=
@@ -4,6 +4,7 @@
 // Copyright © 2023 VideoLabs, VLC authors and VideoLAN
 
 // Authors: Steve Lhomme 
+//  Alexandre Janniaux 
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -63,14 +64,21 @@ static vlc_decoder_device *GetDevice( decoder_t *dec )
 
 struct cpu_alpha_context
 {
+vlc_atomic_rc_trc;
 picture_context_t  ctx;
 picture_t  *opaque;
 picture_t  *alpha; // may be NULL if the alpha layer was missing
+struct pic_alpha_plane *plane;
 };
 
 static void cpu_alpha_destroy(picture_context_t *ctx)
 {
 struct cpu_alpha_context *pctx = container_of(ctx, struct 
cpu_alpha_context, ctx);
+
+if (!vlc_atomic_rc_dec(&pctx->rc))
+return;
+
+free(pctx->plane);
 picture_Release(pctx->opaque);
 if (pctx->alpha)
 picture_Release(pctx->alpha);
@@ -80,13 +88,9 @@ static void cpu_alpha_destroy(picture_context_t *ctx)
 static picture_context_t *cpu_alpha_copy(picture_context_t *src)
 {
 struct cpu_alpha_context *pctx = container_of(src, struct 
cpu_alpha_context, ctx);
-struct cpu_alpha_context *alpha_ctx = calloc(1, sizeof(*alpha_ctx));
-if (unlikely(alpha_ctx == NULL))
-return NULL;
-alpha_ctx->ctx = *src;
-alpha_ctx->opaque = picture_Hold(pctx->opaque);
-alpha_ctx->alpha  = alpha_ctx->alpha ? picture_Hold(pctx->alpha) : NULL;
-return &alpha_ctx->ctx;
+
+vlc_atomic_rc_inc(&pctx->rc);
+return &pctx->ctx;
 }
 
 struct pic_alpha_plane
@@ -114,6 +118,7 @@ static picture_t *CombinePicturesCPU(decoder_t *bdec, 
picture_t *opaque, picture
 picture_Release(out);
 return NULL;
 }
+vlc_atomic_rc_init(&alpha_ctx->rc);
 alpha_ctx->ctx = (picture_context_t) {
 cpu_alpha_destroy, cpu_alpha_copy, NULL
 };
@@ -123,37 +128,37 @@ static picture_t *CombinePicturesCPU(decoder_t *bdec, 
picture_t *opaque, picture
 
 for (int i=0; ii_planes; i++)
 out->p[i] = opaque->p[i];
+
 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 p

[vlc-commits] [Git][videolan/vlc][master] demux: ty: fix leak in case of error

2024-09-12 Thread @fkuehne


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


Commits:
02921db9 by Thomas Guillem at 2024-09-13T04:26:50+00:00
demux: ty: fix leak in case of error

- - - - -


1 changed file:

- modules/demux/ty.c


Changes:

=
modules/demux/ty.c
=
@@ -349,6 +349,7 @@ static int Open(vlc_object_t *p_this)
 
 if (probe_stream(p_demux) != VLC_SUCCESS) {
 //TyClose(p_demux);
+free(p_sys);
 return VLC_EGENERIC;
 }
 



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

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/02921db96886fd82f94efa72fbbe4c1b7f32e5c4
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] 23 commits: macosx: Add starter VLCLibraryAbstractSegmentViewController

2024-09-11 Thread @fkuehne


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


Commits:
ec0a766b by Claudio Cambra at 2024-09-12T04:38:00+00:00
macosx: Add starter VLCLibraryAbstractSegmentViewController

Signed-off-by: Claudio Cambra 

- - - - -
4d402730 by Claudio Cambra at 2024-09-12T04:38:00+00:00
macosx: Set up basic library window related properties in abstract segment view 
controller

Signed-off-by: Claudio Cambra 

- - - - -
035eac8d by Claudio Cambra at 2024-09-12T04:38:00+00:00
macosx: Subclass abstract segment view controller in groups view controller

Signed-off-by: Claudio Cambra 

- - - - -
afcc7bd9 by Claudio Cambra at 2024-09-12T04:38:00+00:00
macosx: Adapt audio view controller to subclass abstract segment view controller

Signed-off-by: Claudio Cambra 

- - - - -
d003c556 by Claudio Cambra at 2024-09-12T04:38:00+00:00
macosx: Adapt home view controller to abstract segment view controller

Signed-off-by: Claudio Cambra 

- - - - -
369cbef9 by Claudio Cambra at 2024-09-12T04:38:00+00:00
macosx: Adapt media source view controller to abstract segment view controller

Signed-off-by: Claudio Cambra 

- - - - -
dbecb8df by Claudio Cambra at 2024-09-12T04:38:00+00:00
macosx: Adapt playlist view controller to abstract segment view controller

Signed-off-by: Claudio Cambra 

- - - - -
472f7a25 by Claudio Cambra at 2024-09-12T04:38:00+00:00
macosx: Adapt library video view controller to subclass abstract segment view 
controller

Signed-off-by: Claudio Cambra 

- - - - -
55d3c507 by Claudio Cambra at 2024-09-12T04:38:00+00:00
macosx: Consolidate all segment view controller properties into one in library 
window, do not retain

Improve system usage by not keeping around segment view controllers and all of 
their dependents when they are not being used

Signed-off-by: Claudio Cambra 

- - - - -
6f1847d4 by Claudio Cambra at 2024-09-12T04:38:00+00:00
macosx: Remove unused segmentedTitleControl property in home view controller

Signed-off-by: Claudio Cambra 

- - - - -
6f81a739 by Claudio Cambra at 2024-09-12T04:38:00+00:00
macosx: Remove unused delegate property in home view base carousel container 
view

Signed-off-by: Claudio Cambra 

- - - - -
b6b5c9ae by Claudio Cambra at 2024-09-12T04:38:00+00:00
macosx: Use retained media source library view controller on segment property 
in library window

Signed-off-by: Claudio Cambra 

- - - - -
b0a7ca40 by Claudio Cambra at 2024-09-12T04:38:00+00:00
macosx: Keep weak reference to parent scroll view in vlc sub scroll view

Signed-off-by: Claudio Cambra 

- - - - -
587c1823 by Claudio Cambra at 2024-09-12T04:38:00+00:00
macosx: Mark IBOutlet type properties as weak

Signed-off-by: Claudio Cambra 

- - - - -
df502bcc by Claudio Cambra at 2024-09-12T04:38:00+00:00
macosx: Mark properties holding VLCLibraryWindow as weak

Signed-off-by: Claudio Cambra 

- - - - -
44516af4 by Claudio Cambra at 2024-09-12T04:38:00+00:00
macosx: Mark properties holding VLCLibraryModel as weak

Signed-off-by: Claudio Cambra 

- - - - -
ea1bcf40 by Claudio Cambra at 2024-09-12T04:38:00+00:00
macosx: Mark properties holding views in library data sources as weak

These views are always held by parent view controllers

Signed-off-by: Claudio Cambra 

- - - - -
badf2579 by Claudio Cambra at 2024-09-12T04:38:00+00:00
macosx: Mark properties holding references to library window-owned views in 
library segment view controllers as weak

Signed-off-by: Claudio Cambra 

- - - - -
6909e27a by Claudio Cambra at 2024-09-12T04:38:00+00:00
macosx: Expose internalScrollView as an IBOutlet in collection view 
supplementary view

Signed-off-by: Claudio Cambra 

- - - - -
5f215d12 by Claudio Cambra at 2024-09-12T04:38:00+00:00
macosx: Mark parent scroll view in collection view supplementary detail view 
property as weak

This is held by a parent view in use

Signed-off-by: Claudio Cambra 

- - - - -
8e18ef46 by Claudio Cambra at 2024-09-12T04:38:00+00:00
macosx: Separate setup of table views, videos data source and shows data source

Signed-off-by: Claudio Cambra 

- - - - -
fe14016d by Claudio Cambra at 2024-09-12T04:38:00+00:00
macosx: Do not keep around data sources that are not being used in video view 
controller

Signed-off-by: Claudio Cambra 

- - - - -
635ae6fc by Claudio Cambra at 2024-09-12T04:38:00+00:00
macosx: Fix crash due to visual constraint variable error in video view 
contr

[vlc-commits] [Git][videolan/vlc][master] macosx: Ensure all layout attributes used and modified from super class are...

2024-09-11 Thread @fkuehne


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


Commits:
d4d879a8 by Claudio Cambra at 2024-09-12T04:22:30+00:00
macosx: Ensure all layout attributes used and modified from super class are 
copied in collection view flow layout

Signed-off-by: Claudio Cambra 

- - - - -


1 changed file:

- modules/gui/macosx/library/VLCLibraryCollectionViewFlowLayout.m


Changes:

=
modules/gui/macosx/library/VLCLibraryCollectionViewFlowLayout.m
=
@@ -236,12 +236,12 @@ static CVReturn 
detailViewAnimationCallback(CVDisplayLinkRef displayLink,
 
 - (NSCollectionViewLayoutAttributes 
*)layoutAttributesForItemAtIndexPath:(NSIndexPath *)indexPath
 {
-NSCollectionViewLayoutAttributes *attributes = [super 
layoutAttributesForItemAtIndexPath:indexPath];
-
 if(_selectedIndexPath == nil || indexPath == _selectedIndexPath) {
-return attributes;
+return [super layoutAttributesForItemAtIndexPath:indexPath];
 }
 
+NSCollectionViewLayoutAttributes * const attributes =
+[super layoutAttributesForItemAtIndexPath:indexPath].copy;
 [attributes setFrame:[self frameForDisplacedAttributes:attributes]];
 return attributes;
 }
@@ -255,9 +255,10 @@ static CVReturn 
detailViewAnimationCallback(CVDisplayLinkRef displayLink,
 NSRect selectedItemFrame = [[self 
layoutAttributesForItemAtIndexPath:_selectedIndexPath] frame];
 
 // Computed attributes from parent
-NSMutableArray<__kindof NSCollectionViewLayoutAttributes *> 
*layoutAttributesArray = [[super layoutAttributesForElementsInRect:rect] 
mutableCopy];
+NSMutableArray<__kindof NSCollectionViewLayoutAttributes *> * const 
layoutAttributesArray =
+[super layoutAttributesForElementsInRect:rect].mutableCopy;
 for (int i = 0; i < layoutAttributesArray.count; i++) {
-NSCollectionViewLayoutAttributes * const attributes = 
layoutAttributesArray[i];
+NSCollectionViewLayoutAttributes * const attributes = 
layoutAttributesArray[i].copy;
 NSString * const elementKind = attributes.representedElementKind;
 
 if (@available(macOS 10.12, *)) {
@@ -328,8 +329,8 @@ static CVReturn 
detailViewAnimationCallback(CVDisplayLinkRef displayLink,
 }
 
 // Default attributes
-NSCollectionViewLayoutAttributes *attributes = [super 
layoutAttributesForSupplementaryViewOfKind:elementKind
-   
  atIndexPath:indexPath];
+NSCollectionViewLayoutAttributes * const attributes =
+[super layoutAttributesForSupplementaryViewOfKind:elementKind 
atIndexPath:indexPath].copy;
 [attributes setFrame:[self frameForDisplacedAttributes:attributes]];
 return attributes;
 }



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

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/d4d879a8ae340efaea47d4abf12597e81d652167
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] qml: let `grabToImage()` do the off-screen rendering in DragItem

2024-09-08 Thread @fkuehne


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


Commits:
54f953b3 by Fatih Uzunoglu at 2024-09-08T16:29:13+00:00
qml: let `grabToImage()` do the off-screen rendering in DragItem

Trying to use `grabToImage()` on an invisible item
reportedly caused issues, possibly due to lack of
polish call or children just not getting ready as
soon as they are made visible off-screen.

With Qt 6, this does not seem to apply anymore.
Instead of rendering off-screen manually, it should
be a better idea to just let `grabToImage()` do that
itself.

- - - - -


1 changed file:

- modules/gui/qt/widgets/qml/DragItem.qml


Changes:

=
modules/gui/qt/widgets/qml/DragItem.qml
=
@@ -132,10 +132,6 @@ Item {
 
 enabled: false
 
-// Offscreen render:
-layer.enabled: true
-layer.effect: Item { }
-
 function _setData(data) {
 console.assert(data.length === indexes.length)
 _data = data
@@ -191,11 +187,7 @@ Item {
 
 const requestId = ++dragItem._grabImageRequest
 
-visible = true
-
 const s = dragItem.grabToImage(function (result) {
-visible = false
-
 if (requestId !== dragItem._grabImageRequest
 || fsmDragInactive.active)
 return



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

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/54f953b3a0d6e8194dbebe0c518c970520248e05
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] qml: make playlist listview's background opaque in small screen mode

2024-09-08 Thread @fkuehne


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


Commits:
694d51a7 by Fatih Uzunoglu at 2024-09-08T16:06:03+00:00
qml: make playlist listview's background opaque in small screen mode

In small screen mode, playlist pane acts as an overlay. However, the
items that are stationed behind can not be seen since the background
directly reflects the window background in order to provide backdrop
blur effect.

In order to prevent confusion, the background is made opaque.

- - - - -


1 changed file:

- modules/gui/qt/maininterface/qml/MainDisplay.qml


Changes:

=
modules/gui/qt/maininterface/qml/MainDisplay.qml
=
@@ -371,6 +371,8 @@ FocusScope {
 topPadding: VLCStyle.layoutTitle_top_padding
 bottomPadding: VLCStyle.margin_normal + 
Math.max(VLCStyle.applicationVerticalMargin - g_mainDisplay.displayMargin, 0)
 
+useAcrylic: !VLCStyle.isScreenSmall
+
 Navigation.parentItem: mainColumn
 Navigation.upItem: sourcesBanner
 Navigation.downItem: miniPlayer.visible ? miniPlayer : null



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

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/694d51a775d1a6718e173b5eed7c114857edf905
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] 4 commits: modules: meson.build: remove QuartzText typo

2024-09-08 Thread @fkuehne


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


Commits:
26a5267e by Alexandre Janniaux at 2024-09-08T15:52:43+00:00
modules: meson.build: remove QuartzText typo

Copy-paste typo between QuartzCore and CoreText.

- - - - -
e49ad12a by Alexandre Janniaux at 2024-09-08T15:52:43+00:00
modules: meson.build: fix inverted condition

We want to actually enable those frameworks when the condition is true.

- - - - -
e080d55c by Alexandre Janniaux at 2024-09-08T15:52:43+00:00
video_chroma: meson.build: use enabled flag

This declares the modules unconditionnally to be able to use them in
the module_depends: key for tests, so as to disable the tests when the
matching module is disabled automatically and ensure the tests is built
and run after the module has been built.

- - - - -
9d84c7fa by Alexandre Janniaux at 2024-09-08T15:52:43+00:00
test: meson: simplify test depending on modules

Now that we can express module dependencies directly, there's no need to
remove the test if some of the modules are not present. In the future,
we'll be able to inject this module list to mark the test as skipped
instead of disabling it.

- - - - -


3 changed files:

- modules/meson.build
- modules/video_chroma/meson.build
- test/libvlc/meson.build


Changes:

=
modules/meson.build
=
@@ -90,7 +90,6 @@ framework_conditions = [
 'AudioToolbox',
 'IOKit',
 'QuartzCore',
-'QuartzText',
 'CoreText',
 'CoreAudio',
 'CoreImage',
@@ -118,7 +117,7 @@ framework_conditions = [
 
 foreach framework_spec : framework_conditions
 foreach framework_name : framework_spec['frameworks']
-if framework_spec['condition']
+if not framework_spec['condition']
 # Not-found dependency
 frameworks += { framework_name: disabler() }
 else


=
modules/video_chroma/meson.build
=
@@ -14,17 +14,16 @@ vlc_modules += {
 }
 
 swscale_dep = dependency('libswscale', version: '>= 0.5.0', required: 
get_option('swscale'))
-if swscale_dep.found()
-  vlc_modules += {
-  'name' : 'swscale',
-  'sources' : files(
-'swscale.c',
-'../codec/avcodec/chroma.c'
-  ),
-  'dependencies' : [swscale_dep, m_lib],
-  'link_args' : symbolic_linkargs
-  }
-endif
+vlc_modules += {
+'name' : 'swscale',
+'sources' : files(
+  'swscale.c',
+  '../codec/avcodec/chroma.c'
+),
+'dependencies' : [swscale_dep, m_lib],
+'link_args' : symbolic_linkargs,
+'enabled' : swscale_dep.found(),
+}
 
 vlc_modules += {
 'name' : 'grey_yuv',
@@ -81,28 +80,29 @@ vlc_modules += {
 'sources' : files('yuvp.c')
 }
 
-if have_sse2
-vlc_modules += {
-'name' : 'i420_rgb_sse2',
-'sources' : files(
-'i420_rgb.c',
-'i420_rgb16_x86.c'
-),
-'c_args' : ['-DPLUGIN_SSE2']
-}
-
-  vlc_modules += {
-  'name' : 'i420_yuy2_sse2',
-  'sources' : files('i420_yuy2.c'),
-  'c_args' : ['-DPLUGIN_SSE2']
-  }
-
-  vlc_modules += {
-  'name' : 'i422_yuy2_sse2',
-  'sources' : files('i422_yuy2.c'),
-  'c_args' : ['-DPLUGIN_SSE2']
-  }
-endif
+vlc_modules += {
+'name' : 'i420_rgb_sse2',
+'sources' : files(
+'i420_rgb.c',
+'i420_rgb16_x86.c'
+),
+'c_args' : ['-DPLUGIN_SSE2'],
+'enabled' : have_sse2,
+}
+
+vlc_modules += {
+'name' : 'i420_yuy2_sse2',
+'sources' : files('i420_yuy2.c'),
+'c_args' : ['-DPLUGIN_SSE2'],
+'enabled' : have_sse2,
+}
+
+vlc_modules += {
+'name' : 'i422_yuy2_sse2',
+'sources' : files('i422_yuy2.c'),
+'c_args' : ['-DPLUGIN_SSE2'],
+'enabled' : have_sse2,
+}
 
 vlc_modules += {
 'name' : 'orient',


=
test/libvlc/meson.build
=
@@ -27,23 +27,6 @@ vlc_tests += {
 'module_depends': ['imem'],
 }
 
-test_libvlc_media_thumbnail_modules = ['demux_mock']
-if avcodec_dep.found()
-test_libvlc_media_thumbnail_modules += ['avcodec']
-endif
-if swscale_dep.found()
-test_libvlc_media_thumbnail_modules += ['swscale']
-endif
-if jpeg_dep.found()
-test_libvlc_media_thumbnail_modules += ['jpeg']
-endif
-if png_dep.found()
-test_libvlc_media_thumbnail_modules += ['png']
-endif
-if vpx_dep.found()
-test_libvlc_media_thumbnail_modules += ['vpx']
-endif
-
 vlc_tests += {
 'name' : 'test_libvlc_media_thumbnail_argb',
 'sources' : files('media_thumbnail.c'),
@@ -53,7 +36,7 @@ vlc_tests += {
 '-DTEST_THUMB_TYPE=libvlc_picture_Argb',
 '-DTEST_REQUIRED_MODULES="avcodec"',
 ],
-'module_depends': test_libvlc_media_thumbnail_modules,
+'module_depends': ['demux_mock', 'swscale', 'avcodec'],
 }
 
 vlc_tests += {
@@ -65,7 +48,7 @@ vlc_tests += {
 '-DTEST_THUMB_TYPE=libvlc_picture_Jpg',
 '

[vlc-commits] [Git][videolan/vlc][master] 2 commits: macosx: VLCLibraryDataTypes: fix memory leak on medialibrary items

2024-09-07 Thread @fkuehne


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


Commits:
484f1497 by Alexandre Janniaux at 2024-09-08T04:43:55+00:00
macosx: VLCLibraryDataTypes: fix memory leak on medialibrary items

Stacktrace from the memory graph:

_malloc_zone_calloc_instrumented_or_legacy
vlc_ml_media_t* CreateAndConvert(medialibrary::IMedia const*)
MediaLibrary::Get(int, char*)
vlc_ml_get
lc_ml_get_media_by_mrl
+[VLCMediaLibraryMediaItem mediaItemForURL:]
-[VLCControlsBarCommon updateCurrentItemDisplayControls:]
-[VLCMainVideoViewControlsBar update]
-[VLCMainVideoViewController viewDidLoad]
-[NSViewController _sendViewDidLoad]
-[NSViewController _loadViewIfRequired]
__24-[NSViewController view]_block_invoke
NSPerformVisuallyAtomicChange
-[NSViewController view]
-[VLCLibraryWindow awakeFromNib]
...

- - - - -
da23e939 by Alexandre Janniaux at 2024-09-08T04:43:55+00:00
macosx: VLCExtensionsManager: unload extensions on dealloc

Fixes a memory leak with extension manager not being unloaded when the
application exits. Created from the following stacktrace:

generic_start
vlc_module_load
module_need
-[VLCExtensionsManager loadExtensions]
-[VLCExtensionsManager buildMenu:]
-[VLCMainMenu awakeFromNib]

- - - - -


2 changed files:

- modules/gui/macosx/library/VLCLibraryDataTypes.m
- modules/gui/macosx/windows/extensions/VLCExtensionsManager.m


Changes:

=
modules/gui/macosx/library/VLCLibraryDataTypes.m
=
@@ -989,11 +989,11 @@ static NSString 
*genreArrayDisplayString(NSArray * const
 return nil;
 }
 vlc_ml_media_t *p_mediaItem = vlc_ml_get_media(p_mediaLibrary, libraryID);
-VLCMediaLibraryMediaItem *returnValue = nil;
-if (p_mediaItem) {
-returnValue = [[VLCMediaLibraryMediaItem alloc] 
initWithMediaItem:p_mediaItem library:p_mediaLibrary];
-}
-return returnValue;
+if (p_mediaItem == NULL)
+return nil;
+VLCMediaLibraryMediaItem *media = [[VLCMediaLibraryMediaItem alloc] 
initWithMediaItem:p_mediaItem library:p_mediaLibrary];
+vlc_ml_media_release(p_mediaItem);
+return media;
 }
 
 + (nullable instancetype)mediaItemForURL:(NSURL *)url
@@ -1008,11 +1008,12 @@ static NSString 
*genreArrayDisplayString(NSArray * const
 }
 vlc_ml_media_t *p_mediaItem = vlc_ml_get_media_by_mrl(p_mediaLibrary,
   [[url 
absoluteString] UTF8String]);
-VLCMediaLibraryMediaItem *returnValue = nil;
-if (p_mediaItem) {
-returnValue = [[VLCMediaLibraryMediaItem alloc] 
initWithMediaItem:p_mediaItem library:p_mediaLibrary];
-}
-return returnValue;
+if (p_mediaItem == NULL)
+return nil;
+
+VLCMediaLibraryMediaItem *media = [[VLCMediaLibraryMediaItem alloc] 
initWithMediaItem:p_mediaItem library:p_mediaLibrary];
+vlc_ml_media_release(p_mediaItem);
+return media;
 }
 
 - (nullable instancetype)initWithMediaItem:(struct vlc_ml_media_t *)p_mediaItem


=
modules/gui/macosx/windows/extensions/VLCExtensionsManager.m
=
@@ -277,6 +277,7 @@
 intf_thread_t *p_intf = getIntf();
 msg_Dbg(p_intf, "Deinitializing extensions manager");
 
+[self unloadExtensions];
 _extensionDialogProvider = nil;
 if (p_extensions_manager)
 vlc_object_delete(p_extensions_manager);



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/581b4e8464cd9cc56e047ebbf6ac149da2d2a028...da23e939a5595de6fe123fb54a7d41a9833e0b3f

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/581b4e8464cd9cc56e047ebbf6ac149da2d2a028...da23e939a5595de6fe123fb54a7d41a9833e0b3f
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] compat: add missing errno on Winsock errors

2024-09-07 Thread @fkuehne


Felix Paul Kühne pushed to branch 3.0.x at VideoLAN / VLC


Commits:
2a9a5471 by Steve Lhomme at 2024-09-07T18:42:03+00:00
compat: add missing errno on Winsock errors

Some of the error codes [1] correspond to errno values [2]

[1] 
https://docs.microsoft.com/en-us/windows/win32/winsock/windows-sockets-error-codes-2
[2] https://docs.microsoft.com/en-us/cpp/c-runtime-library/errno-constants

(cherry picked from commit ddcc2cdcff84e6a83a4dfe581fddde6f524877aa)

- - - - -


2 changed files:

- compat/recvmsg.c
- compat/sendmsg.c


Changes:

=
compat/recvmsg.c
=
@@ -74,11 +74,51 @@ ssize_t recvmsg(int fd, struct msghdr *msg, int flags)
 return rcvd;
 }
 
-switch (WSAGetLastError())
+int err = WSAGetLastError();
+switch (err)
 {
 case WSAEWOULDBLOCK:
 errno = EAGAIN;
 break;
+case WSA_NOT_ENOUGH_MEMORY:
+errno = ENOMEM;
+break;
+case WSAEAFNOSUPPORT:
+errno = EAFNOSUPPORT;
+break;
+case WSAENOBUFS:
+errno = ENOBUFS;
+break;
+case WSAEINPROGRESS:
+errno = EINPROGRESS;
+break;
+case WSAEINTR:
+errno = EINTR;
+break;
+case WSAEBADF:
+errno = EBADF;
+break;
+case WSAEACCES:
+errno = EACCES;
+break;
+case WSAEFAULT:
+errno = EFAULT;
+break;
+case WSAEINVAL:
+errno = EINVAL;
+break;
+case WSAEMFILE:
+errno = EMFILE;
+break;
+case WSAEALREADY:
+errno = EALREADY;
+break;
+case WSAECONNRESET:
+errno = ECONNRESET;
+break;
+default:
+errno = err;
+break;
 }
 return -1;
 }


=
compat/sendmsg.c
=
@@ -64,11 +64,51 @@ ssize_t sendmsg(int fd, const struct msghdr *msg, int flags)
 if (ret == 0)
 return sent;
 
-switch (WSAGetLastError())
+int err = WSAGetLastError();
+switch (err)
 {
 case WSAEWOULDBLOCK:
 errno = EAGAIN;
 break;
+case WSA_NOT_ENOUGH_MEMORY:
+errno = ENOMEM;
+break;
+case WSAEAFNOSUPPORT:
+errno = EAFNOSUPPORT;
+break;
+case WSAENOBUFS:
+errno = ENOBUFS;
+break;
+case WSAEINPROGRESS:
+errno = EINPROGRESS;
+break;
+case WSAEINTR:
+errno = EINTR;
+break;
+case WSAEBADF:
+errno = EBADF;
+break;
+case WSAEACCES:
+errno = EACCES;
+break;
+case WSAEFAULT:
+errno = EFAULT;
+break;
+case WSAEINVAL:
+errno = EINVAL;
+break;
+case WSAEMFILE:
+errno = EMFILE;
+break;
+case WSAEALREADY:
+errno = EALREADY;
+break;
+case WSAECONNRESET:
+errno = ECONNRESET;
+break;
+default:
+errno = err;
+break;
 }
 return -1;
 }



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

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/2a9a547142db54cd3f5af6fa9caafc87ba06f66a
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] qml: do not push player view repeatedly in artwork info button

2024-09-07 Thread @fkuehne


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


Commits:
149faea3 by Fatih Uzunoglu at 2024-09-07T18:42:12+00:00
qml: do not push player view repeatedly in artwork info button

If player is visible, it should not push player again.

- - - - -


1 changed file:

- modules/gui/qt/player/qml/controlbarcontrols/ArtworkInfoWidget.qml


Changes:

=
modules/gui/qt/player/qml/controlbarcontrols/ArtworkInfoWidget.qml
=
@@ -79,14 +79,22 @@ AbstractButton {
 
 if (KeyHelper.matchOk(event)) {
 event.accepted = true
-
-History.push(["player"])
+clicked()
 }
 }
 
 // Events
 
-onClicked: History.push(["player"])
+onClicked: {
+if (History.match(History.viewPath, ["player"])) {
+if (MainCtx.mediaLibraryAvailable)
+History.push(["mc", "video"])
+else
+History.push(["mc", "home"])
+} else {
+History.push(["player"])
+}
+}
 
 // Children
 
@@ -117,7 +125,7 @@ AbstractButton {
 
 grabPermissions: TapHandler.CanTakeOverFromHandlersOfDifferentType 
| TapHandler.ApprovesTakeOverByAnything
 
-onTapped: History.push(["player"])
+onTapped: root.clicked()
 }
 
 DragHandler {



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

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/149faea34d4371a44dbbd4779c726f26690a42c5
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] contrib: sqlite: update to 3.46.1

2024-09-07 Thread @fkuehne


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


Commits:
37e2147d by Steve Lhomme at 2024-09-07T16:05:14+00:00
contrib: sqlite: update to 3.46.1

We don't have to patch it for Android anymore.

- - - - -


3 changed files:

- contrib/src/sqlite/SHA512SUMS
- − contrib/src/sqlite/e0a9935be1c506646566f6b7845eb381bb219e16.patch
- contrib/src/sqlite/rules.mak


Changes:

=
contrib/src/sqlite/SHA512SUMS
=
@@ -1 +1 @@
-adaa306ebacfbeeea6efe71aa964b1dee4a05ade794c55c7afad8693ed291354e9daa2449226c4dc50fbfa5919dfc9a17dea946f01171ff63d472af78cbed987
  sqlite-autoconf-3340100.tar.gz
+a5ba5af9c8d6440d39ba67e3d5903c165df3f1d111e299efbe7c1cca4876d4d5aecd722e0133670daa6eb5cbf8a85c6a3d9852ab507a393615fb5245a3e1a743
  sqlite-autoconf-3460100.tar.gz


=
contrib/src/sqlite/e0a9935be1c506646566f6b7845eb381bb219e16.patch deleted
=
@@ -1,32 +0,0 @@
-From e0a9935be1c506646566f6b7845eb381bb219e16 Mon Sep 17 00:00:00 2001
-From: stephan 
-Date: Mon, 19 Feb 2024 12:20:46 +
-Subject: [PATCH] Extend the strerror_r() result type discrepancy check in
- os_unix.c to include the Android NDK, as reported in [forum post
- 3f13857fa4062301|forum:3f13857fa4062301]. The NDK's strerror_r() signature is
- version-dependent, whereas this change assumes int return (POSIX semantic)
- across all versions.
-
-FossilOrigin-Name: 
f18b2524da6bbbcf372b292df52fbe6efa49fd6e1f1f13ef2447279d559f7a08

- sqlite3.c |  6 +-
- 3 files changed, 13 insertions(+), 9 deletions(-)
-
-diff --git a/sqlite3.c b/sqlite3.c
-index 4b3d63c2c1..4663c22d94 100644
 a/sqlite3.c
-+++ b/sqlite3.c
-@@ -1295,8 +1295,12 @@ static int unixLogErrorAtLine(
-   ** available, the error message will often be an empty string. Not a
-   ** huge problem. Incorrectly concluding that the GNU version is available
-   ** could lead to a segfault though.
-+  **
-+  ** Forum post 3f13857fa4062301 reports that the Android SDK may use
-+  ** int-type return, depending on its version.
-   */
--#if defined(STRERROR_R_CHAR_P) || defined(__USE_GNU)
-+#if (defined(STRERROR_R_CHAR_P) || defined(__USE_GNU)) \
-+  && !defined(ANDROID) && !defined(__ANDROID__)
-   zErr =
- # endif
-   strerror_r(iErrno, aErr, sizeof(aErr)-1);


=
contrib/src/sqlite/rules.mak
=
@@ -1,7 +1,7 @@
 # sqlite
 
-SQLITE_VERSION := 3340100
-SQLITE_URL := 
https://www.sqlite.org/2021/sqlite-autoconf-$(SQLITE_VERSION).tar.gz
+SQLITE_VERSION := 3460100
+SQLITE_URL := 
https://www.sqlite.org/2024/sqlite-autoconf-$(SQLITE_VERSION).tar.gz
 
 PKGS += sqlite
 
@@ -23,7 +23,6 @@ $(TARBALLS)/sqlite-autoconf-$(SQLITE_VERSION).tar.gz:
 sqlite: sqlite-autoconf-$(SQLITE_VERSION).tar.gz .sum-sqlite
$(UNPACK)
$(call update_autoconfig,.)
-   $(APPLY) $(SRC)/sqlite/e0a9935be1c506646566f6b7845eb381bb219e16.patch
$(call pkg_static, "sqlite3.pc.in")
$(MOVE)
 



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

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/37e2147d96eb58f4129c340f36e451852feab395
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] 11 commits: qt: dialog provider sub-dialogs don't need to be singletons

2024-09-07 Thread @fkuehne


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


Commits:
bffbee66 by Pierre Lamot at 2024-09-07T15:52:25+00:00
qt: dialog provider sub-dialogs don't need to be singletons

- - - - -
bcfec54b by Pierre Lamot at 2024-09-07T15:52:25+00:00
qt: separate model from view in UpdateDialog

this allows triggering the model without creating the dialog

- - - - -
ba794b0c by Pierre Lamot at 2024-09-07T15:52:25+00:00
qt: enforce strong types for OpenDialog tab and action flags

- - - - -
e3d45b34 by Pierre Lamot at 2024-09-07T15:52:25+00:00
qt: OpenDialog is always retrieved with b_rawInstance = false

no need to specify it explicitly

- - - - -
519cb4ad by Pierre Lamot at 2024-09-07T15:52:25+00:00
qt: remove redundant flag in OpenDialog

b_select is redundant with the ActionFlag

- - - - -
f68390fa by Pierre Lamot at 2024-09-07T15:52:25+00:00
qt: set action flag independently from constructor in OpenDialog

- - - - -
9c61a4f3 by Pierre Lamot at 2024-09-07T15:52:25+00:00
qt: OpenDialog is no longer a singleton

- - - - -
931093a6 by Pierre Lamot at 2024-09-07T15:52:25+00:00
qt: fix dialog leak in VLMDialog

- - - - -
97c656f3 by Pierre Lamot at 2024-09-07T15:52:25+00:00
qt: allow manually pushing errors in DialogErrorModel

- - - - -
23293fe0 by Pierre Lamot at 2024-09-07T15:52:25+00:00
qt: push preference save failure through the DialogErrorModel

- - - - -
cf2df443 by Pierre Lamot at 2024-09-07T15:52:25+00:00
qt: remove obsolete ErrorsDialog

errors are handled in the MessageDialog and in the Qml

- - - - -


29 changed files:

- modules/gui/qt/Makefile.am
- modules/gui/qt/dialogs/bookmarks/bookmarks.hpp
- modules/gui/qt/dialogs/dialogs/dialogmodel.cpp
- modules/gui/qt/dialogs/dialogs/dialogmodel.hpp
- modules/gui/qt/dialogs/dialogs_provider.cpp
- modules/gui/qt/dialogs/dialogs_provider.hpp
- modules/gui/qt/dialogs/epg/epg.hpp
- − modules/gui/qt/dialogs/errors/errors.cpp
- − modules/gui/qt/dialogs/errors/errors.hpp
- modules/gui/qt/dialogs/extended/extended.hpp
- modules/gui/qt/dialogs/firstrun/firstrunwizard.hpp
- modules/gui/qt/dialogs/gototime/gototime.hpp
- modules/gui/qt/dialogs/help/help.cpp
- modules/gui/qt/dialogs/help/help.hpp
- modules/gui/qt/dialogs/mediainfo/mediainfo.hpp
- modules/gui/qt/dialogs/messages/messages.hpp
- modules/gui/qt/dialogs/open/open.cpp
- modules/gui/qt/dialogs/open/open.hpp
- modules/gui/qt/dialogs/playlists/playlists.hpp
- modules/gui/qt/dialogs/plugins/plugins.hpp
- modules/gui/qt/dialogs/podcast/podcast_configuration.hpp
- modules/gui/qt/dialogs/preferences/preferences.cpp
- modules/gui/qt/dialogs/vlm/vlm.cpp
- modules/gui/qt/dialogs/vlm/vlm.hpp
- modules/gui/qt/maininterface/mainctx.cpp
- modules/gui/qt/maininterface/mainctx.hpp
- modules/gui/qt/meson.build
- modules/gui/qt/qt.cpp
- po/POTFILES.in


Changes:

=
modules/gui/qt/Makefile.am
=
@@ -97,7 +97,6 @@ libqt_plugin_la_SOURCES = \
dialogs/epg/EPGWidget.cpp \
dialogs/epg/EPGWidget.hpp \
dialogs/epg/epg.cpp dialogs/epg/epg.hpp \
-   dialogs/errors/errors.cpp dialogs/errors/errors.hpp \
dialogs/extended/extended.cpp dialogs/extended/extended.hpp \
dialogs/extended/extended_panels.cpp \
dialogs/extended/extended_panels.hpp \
@@ -372,7 +371,6 @@ nodist_libqt_plugin_la_SOURCES = \
dialogs/epg/EPGView.moc.cpp \
dialogs/epg/EPGWidget.moc.cpp \
dialogs/epg/epg.moc.cpp \
-   dialogs/errors/errors.moc.cpp \
dialogs/extended/extended.moc.cpp \
dialogs/extended/extended_panels.moc.cpp \
dialogs/extensions/extensions.moc.cpp \


=
modules/gui/qt/dialogs/bookmarks/bookmarks.hpp
=
@@ -25,21 +25,23 @@
 #define QVLC_BOOKMARKS_H_ 1
 
 #include "widgets/native/qvlcframe.hpp"
-#include "util/singleton.hpp"
 
 class QPushButton;
 class MLBookmarkModel;
 class QTreeView;
 
-class BookmarksDialog : public QVLCFrame, public Singleton
+class BookmarksDialog : public QVLCFrame
 {
 Q_OBJECT
+
 public:
-void toggleVisible();
-private:
 BookmarksDialog( qt_intf_t * );
 virtual ~BookmarksDialog();
 
+public:
+void toggleVisible();
+
+private:
 QTreeView *bookmarksList;
 QPushButton *clearButton;
 QPushButton *delButton;
@@ -53,8 +55,6 @@ private slots:
 void extract();
 void activateItem( const QModelIndex& index );
 void updateButtons();
-
-friend classSingleton;
 };
 
 #endif


=
modules/gui/qt/dialogs/dialogs/dialogmodel.cpp
=
@@ -99,6 +99,14 @@ void DialogErrorModel::onError(void * p_data,
 });
 }
 
+void DialogErrorModel::pushError(const QString & title, const QString& message)
+{
+DialogError error;
+error.title = title;
+error.text = message;
+pushError(error);
+}
+
 void DialogErrorModel::pushError(const DialogError & error)
 {
 int row = m_data.

[vlc-commits] [Git][videolan/vlc][master] qt: refactor styles combobox and print the default style

2024-09-06 Thread @fkuehne


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


Commits:
ac0545c6 by Fatih Uzunoglu at 2024-09-06T20:13:12+00:00
qt: refactor styles combobox and print the default style

- Currently style handling is handled in a really fragile
  manner. The order of keys provided by `QStyleFactory`
  is expected to directly match the combobox. At the
  same time, if the style is not overridden, then there
  should be no need to save this in the settings.
- Although the first entry is the default style, it does
  not provide what the style is. Now, the style itself is
  printed as well.

- - - - -


1 changed file:

- modules/gui/qt/dialogs/preferences/simple_preferences.cpp


Changes:

=
modules/gui/qt/dialogs/preferences/simple_preferences.cpp
=
@@ -192,29 +192,7 @@ static int getDefaultAudioVolume(const char *aout)
 return -1;
 }
 
-namespace
-{
-#if !defined( _WIN32)
-void fillStylesCombo( QComboBox *stylesCombo, const QString &initialStyle)
-{
-stylesCombo->addItem( qtr("System's default") );
-stylesCombo->addItems( QStyleFactory::keys() );
-stylesCombo->setCurrentIndex( stylesCombo->findText( initialStyle ) );
-stylesCombo->insertSeparator( 1 );
-if ( stylesCombo->currentIndex() < 0 )
-stylesCombo->setCurrentIndex( 0 ); /* default */
-}
-#endif
-
-QString getQStyleKey(const QComboBox *stylesCombo, const QString 
&defaultStyleName)
-{
-vlc_assert( stylesCombo );
-const int index = stylesCombo->currentIndex();
-if (stylesCombo->currentIndex() == 0)
-return defaultStyleName;
-return QStyleFactory::keys().at( index - 2 );
-}
-}
+static const QString styleSettingsKey = QStringLiteral("MainWindow/QtStyle");
 
 class PropertyResetter
 {
@@ -774,7 +752,25 @@ SPrefsPanel::SPrefsPanel( qt_intf_t *_p_intf, QWidget 
*_parent,
 }
 
 #if !defined( _WIN32)
-fillStylesCombo( ui.stylesCombo, getSettings()->value( 
"MainWindow/QtStyle", "" ).toString() );
+{
+// Populate styles combobox:
+assert(qApp->property("initialStyle").isValid());
+const QString& initialStyle = 
qApp->property("initialStyle").toString();
+ui.stylesCombo->addItem( qtr( "System's default (%1)" ).arg( 
initialStyle ), initialStyle );
+const QStringList& styles = QStyleFactory::keys();
+for ( const auto& i : styles )
+{
+ui.stylesCombo->addItem( i, i );
+}
+const auto style = getSettings()->value( styleSettingsKey );
+
+if ( style.isValid() && style.canConvert() )
+ui.stylesCombo->setCurrentText( style.toString() );
+ui.stylesCombo->insertSeparator( 1 );
+if ( ui.stylesCombo->currentIndex() < 0 )
+ui.stylesCombo->setCurrentIndex( 0 ); /* default */
+}
+
 m_resetters.push_back( std::make_unique( 
ui.stylesCombo, "currentIndex" ) );
 
 connect( ui.stylesCombo, 
QOverload::of(&QComboBox::currentIndexChanged),
@@ -1242,7 +1238,10 @@ void SPrefsPanel::apply()
 //if( m_interfaceUI.qt->isChecked() )
 config_PutPsz( "intf", "" );
 #if !defined( _WIN32)
-getSettings()->setValue( "MainWindow/QtStyle", getQStyleKey(  
m_interfaceUI.stylesCombo , "" ) );
+if ( m_interfaceUI.stylesCombo->currentIndex() > 0 )
+getSettings()->setValue( styleSettingsKey, 
m_interfaceUI.stylesCombo->currentData().toString() );
+else
+getSettings()->remove( styleSettingsKey );
 #endif
 
 #ifdef _WIN32
@@ -1350,14 +1349,13 @@ void SPrefsPanel::lastfm_Changed( int i_state )
 
 void SPrefsPanel::changeStyle()
 {
-const QString key = getQStyleKey( m_interfaceUI.stylesCombo,
-  
qApp->property("initialStyle").toString() );
+const QString style = m_interfaceUI.stylesCombo->currentData().toString();
 
-QMetaObject::invokeMethod( qApp, [key]() {
+QMetaObject::invokeMethod( qApp, [style]() {
 // Queue this call in order to prevent
 // updating the preferences dialog when
 // it is rejected:
-QApplication::setStyle( key );
+QApplication::setStyle( style );
 }, Qt::QueuedConnection );
 }
 



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

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/ac0545c6c51e18d7b5faf5a1d55bdab7e0bd6ac9
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] qt: fix drag and drop in `CompositorPlatform`

2024-09-06 Thread @fkuehne


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


Commits:
1b693143 by Fatih Uzunoglu at 2024-09-06T19:50:45+00:00
qt: fix drag and drop in `CompositorPlatform`

When the parent top-level window receive a drag or drop
event, Qt does not propagate the event through the child
windows.

All handling is done in `QQuickWindow`, so if I manually
forward the events to the quick window, drag and drop
works as expected.

- - - - -


2 changed files:

- modules/gui/qt/maininterface/compositor_platform.cpp
- modules/gui/qt/maininterface/compositor_platform.hpp


Changes:

=
modules/gui/qt/maininterface/compositor_platform.cpp
=
@@ -95,6 +95,8 @@ bool CompositorPlatform::makeMainInterface(MainCtx *mainCtx)
 m_quickWindow->setOpacity(0.0);
 m_quickWindow->setOpacity(1.0);
 
+m_rootWindow->installEventFilter(this);
+
 m_rootWindow->show();
 m_videoWindow->show();
 m_quickWindow->show();
@@ -153,6 +155,28 @@ QQuickItem *CompositorPlatform::activeFocusItem() const
 return m_quickWindow->activeFocusItem();
 }
 
+bool CompositorPlatform::eventFilter(QObject *watched, QEvent *event)
+{
+// Forward drag events to the child quick window,
+// as it is not done automatically by Qt with
+// nested windows:
+if (m_quickWindow && watched == m_rootWindow.get())
+{
+switch (event->type()) {
+case QEvent::DragEnter:
+case QEvent::DragLeave:
+case QEvent::DragMove:
+case QEvent::DragResponse:
+case QEvent::Drop:
+QApplication::sendEvent(m_quickWindow, event);
+return true;
+default:
+break;
+};
+}
+return false;
+}
+
 int CompositorPlatform::windowEnable(const vlc_window_cfg_t *)
 {
 commonWindowEnable();


=
modules/gui/qt/maininterface/compositor_platform.hpp
=
@@ -46,6 +46,8 @@ public:
 Type type() const override;
 QQuickItem * activeFocusItem() const override;
 
+bool eventFilter(QObject *watched, QEvent *event) override;
+
 private:
 int windowEnable(const vlc_window_cfg_t *) override;
 void windowDisable() override;



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

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/1b693143180a914ba54b4a87fbe1739e31e13fd1
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] qt: do not wait for scene graph initialization when probing the graphics api

2024-09-06 Thread @fkuehne


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


Commits:
3dff231e by Fatih Uzunoglu at 2024-09-06T19:25:13+00:00
qt: do not wait for scene graph initialization when probing the graphics api

It is documented that the static function `QQuickWindow::graphicsApi()` may
not yield the ultimate graphics API used by the scene graph and that the way
to get the "true, real result" is to wait until the scene graph is 
initialized.

However, at the same time, it is said that the result would be the 
"graphics
API that would be used by the scene graph if it was initialized at this point
in time". This is what is really necessary to know here, as we don't 
(and
should not) override the graphics API in compositors, rather the compositor
should tell if it is compatible with the graphics API. If the compositor is
not compatible (e.g. using QSGRendererInterface::OpenGL with compositor
dcomp), then it should fail at the earliest convenience so that the application
can try other compositors.

As of Qt 6.7, Qt Quick does not implement a fallback procedure in case the
initialization goes wrong due to the chosen graphics API that it tries a
different graphics API. In other words, Qt Quick does not have a cross-graphics
API fallback procedure unlike us. And the cross-graphics API fallback that
we use gets engaged earlier, so it can be assumed with certainty that the
graphics API would not change by the time scene graph is initialized.

Waiting for scene graph initialization has also become less relevant since
0dbfb4b9, where RHI probing and `QQuickWindow::setGraphicsApi()` became
being used in almost all cases. If we set the graphics API explicitly,
it means that the same API can be considered by the compositor directly
without getting concerned by scene graph initialization and it getting end
up with a different graphics API.

- - - - -


1 changed file:

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


Changes:

=
modules/gui/qt/maininterface/compositor_dcomp.cpp
=
@@ -138,6 +138,27 @@ bool CompositorDirectComposition::init()
 return false;
 }
 
+const QString& sceneGraphBackend = 
qEnvironmentVariable("QT_QUICK_BACKEND");
+if (!sceneGraphBackend.isEmpty() /* if empty, RHI is used */ &&
+sceneGraphBackend != QLatin1String("rhi"))
+{
+// No RHI means no D3D11 or D3D12, the graphics API check
+// below is only relevant when RHI is in use.
+// If QT_QUICK_BACKEND is set to software or openvg, then
+// `QQuickWindow::graphicsApi()` might still report D3D11 or
+// D3D12 until the scene graph is initialized.
+// Unlike `QQuickWindow::graphicsApi()`, `sceneGraphBackend()`
+// is only valid after the window is constructed, so instead
+// of using `QQuickWindow::sceneGraphBackend()`, simply probe
+// the environment variable.
+return false;
+}
+
+const auto graphicsApi = QQuickWindow::graphicsApi();
+if (graphicsApi != QSGRendererInterface::Direct3D11 &&
+graphicsApi != QSGRendererInterface::Direct3D12)
+return false;
+
 return true;
 }
 
@@ -225,53 +246,22 @@ bool 
CompositorDirectComposition::makeMainInterface(MainCtx* mainCtx)
 
 bool appropriateGraphicsApi = true;
 
-QEventLoop eventLoop;
 connect(quickViewPtr,
-&QQuickWindow::sceneGraphInitialized,
-&eventLoop,
-[&eventLoop, &appropriateGraphicsApi, quickViewPtr, this]() {
-if (QQuickWindow::graphicsApi() == 
QSGRendererInterface::Direct3D11 ||
-QQuickWindow::graphicsApi() == 
QSGRendererInterface::Direct3D12)
-{
-connect(quickViewPtr,
-&QQuickWindow::frameSwapped, // At this stage, we 
can be sure that QRhi and QRhiSwapChain are valid.
-this,
-[this, &eventLoop]() {
-setup();
-eventLoop.quit();
-},
-Qt::SingleShotConnection);
-}
-else
-{
-appropriateGraphicsApi = false;
-eventLoop.quit();
-}
-}, static_cast(Qt::SingleShotConnection | 
Qt::DirectConnection));
-
-connect(quickViewPtr,
-&QQuickWindow::sceneGraphError,
-&eventLoop,
-[&eventLoop, 
&appropriateGraphicsApi](QQuickWindow::SceneGraphError error, const QString 
&message) {
-qWarning() << "CompositorDComp: Scene Graph Error: " << error 
<< ", Message: " << message;
-appropriateGraphicsApi = false;
-eventLoop.quit();
-}, static_cast(Qt::SingleShotConnection | 
Qt::DirectConnection));
-
-CompositorVideo::Flags flags = CompositorVideo::CAN_SHOW_PIP | 
CompositorVideo::H

[vlc-commits] [Git][videolan/vlc][master] qt: fix lua interface extension not loading

2024-09-06 Thread @fkuehne


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


Commits:
a52a78e6 by Pierre Lamot at 2024-09-06T18:00:38+00:00
qt: fix lua interface extension not loading

extension_dialog_t is not a registered type in qt so the signal was failing.

It's usually dangerous to pass VLC C object in Qt signals regarding the 
lifetime
of these objects, so rather than registering the type, the object is passed
though lambda capture assumming that the current comment and code is correct.

- - - - -


2 changed files:

- modules/gui/qt/dialogs/extensions/extensions.cpp
- modules/gui/qt/dialogs/extensions/extensions.hpp


Changes:

=
modules/gui/qt/dialogs/extensions/extensions.cpp
=
@@ -54,9 +54,6 @@ ExtensionsDialogProvider::ExtensionsDialogProvider( qt_intf_t 
*_p_intf,
 assert(p_extensions_manager);
 
 vlc_dialog_provider_set_ext_callback( p_intf, DialogCallback, NULL );
-
-connect( this, &ExtensionsDialogProvider::SignalDialog,
- this, &ExtensionsDialogProvider::UpdateExtDialog );
 }
 
 ExtensionsDialogProvider::~ExtensionsDialogProvider()
@@ -144,7 +141,9 @@ void ExtensionsDialogProvider::ManageDialog( 
extension_dialog_t *p_dialog )
 ExtensionsManager *extMgr = ExtensionsManager::getInstance( p_intf );
 assert( extMgr != NULL );
 if( !extMgr->isUnloading() )
-emit SignalDialog( p_dialog ); // Safe because we signal Qt thread
+QMetaObject::invokeMethod(this, [this, p_dialog](){
+UpdateExtDialog( p_dialog );
+}); // Safe because we signal Qt thread
 else
 UpdateExtDialog( p_dialog ); // This is safe, we're already in Qt 
thread
 }


=
modules/gui/qt/dialogs/extensions/extensions.hpp
=
@@ -66,9 +66,6 @@ private slots:
 public:
 void ManageDialog( extension_dialog_t *p_dialog );
 
-signals:
-void SignalDialog( extension_dialog_t *p_dialog );
-
 private:
 ExtensionsDialogProvider( qt_intf_t *p_intf = nullptr,
  extensions_manager_t *p_mgr = nullptr );



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

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/a52a78e6cd05217939e29abbc6ba88b73891f3ff
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] qt: properly handle VLC_PLAYER_VOUT_STOPPED

2024-09-06 Thread @fkuehne


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


Commits:
e1560198 by Fatih Uzunoglu at 2024-09-06T17:34:53+00:00
qt: properly handle VLC_PLAYER_VOUT_STOPPED

When last vout stops, a dummy vout is created.
For the interface, this has no relevance and
"has video" property should be set to false.

- - - - -


2 changed files:

- modules/gui/qt/player/player_controller.cpp
- modules/gui/qt/player/player_controller_p.hpp


Changes:

=
modules/gui/qt/player/player_controller.cpp
=
@@ -205,11 +205,17 @@ void PlayerControllerPrivate::UpdateInfo( input_item_t 
*p_item )
 emit q->infoChanged( p_item );
 }
 
-void PlayerControllerPrivate::UpdateVouts(vout_thread_t **vouts, size_t 
i_vouts)
+void PlayerControllerPrivate::UpdateVouts(vout_thread_t **vouts, size_t 
i_vouts, enum vlc_player_vout_action action)
 {
 Q_Q(PlayerController);
 bool hadVideo = m_hasVideo;
-m_hasVideo = i_vouts > 0;
+
+if (action == VLC_PLAYER_VOUT_STARTED)
+++m_vout_ref;
+else if (action == VLC_PLAYER_VOUT_STOPPED)
+--m_vout_ref;
+assert(m_vout_ref >= 0);
+m_hasVideo = (m_vout_ref > 0);
 
 vout_thread_t* main_vout = nullptr;
 if (m_hasVideo)
@@ -777,7 +783,7 @@ static void on_player_subitems_changed(vlc_player_t *, 
input_item_t *, input_ite
 }
 
 
-static void on_player_vout_changed(vlc_player_t *player, enum 
vlc_player_vout_action,
+static void on_player_vout_changed(vlc_player_t *player, enum 
vlc_player_vout_action action,
 vout_thread_t *, enum vlc_vout_order order, vlc_es_id_t *es_id, void *data)
 {
 PlayerControllerPrivate* that = 
static_cast(data);
@@ -798,8 +804,8 @@ static void on_player_vout_changed(vlc_player_t *player, 
enum vlc_player_vout_ac
 });
 
 //call on object thread
-that->callAsync([that,voutsPtr,i_vout] () {
-that->UpdateVouts(voutsPtr.get(), i_vout);
+that->callAsync([that,voutsPtr,i_vout,action] () {
+that->UpdateVouts(voutsPtr.get(), i_vout, action);
 });
 break;
 }


=
modules/gui/qt/player/player_controller_p.hpp
=
@@ -45,7 +45,7 @@ public:
 void UpdateInfo( input_item_t *p_item );
 void UpdateStats( const input_stats_t& stats );
 void UpdateProgram(vlc_player_list_action action, const vlc_player_program 
*prgm);
-void UpdateVouts(vout_thread_t **vouts, size_t i_vouts);
+void UpdateVouts(vout_thread_t **vouts, size_t i_vouts, 
vlc_player_vout_action action);
 void UpdateTrackSelection(vlc_es_id_t *trackid, bool selected);
 void UpdateSpuOrder(vlc_es_id_t *es_id, enum vlc_vout_order spu_order);
 int interpolateTime(vlc_tick_t system_now);
@@ -148,6 +148,7 @@ public:
 boolm_hasVideo = false;
 boolm_fullscreen = false;
 boolm_wallpaperMode = false;
+int m_vout_ref = 0;
 
 //aout properties
 VLCVarChoiceModel m_audioStereoMode;



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

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/e1560198776438c3b75070159d5beaeb38240a57
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] aom: fix row-mt flag

2024-09-06 Thread @fkuehne


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


Commits:
29c13755 by Tristan Matthews at 2024-09-06T16:59:47+00:00
aom: fix row-mt flag

When using var_GetBool, "--sout-aom-row-mt" was a noop.

- - - - -


1 changed file:

- modules/codec/aom.c


Changes:

=
modules/codec/aom.c
=
@@ -496,7 +496,7 @@ static int OpenEncoder(vlc_object_t *p_this)
 int i_tile_rows = var_InheritInteger( p_enc, SOUT_CFG_PREFIX "tile-rows" );
 int i_tile_columns = var_InheritInteger( p_enc, SOUT_CFG_PREFIX 
"tile-columns" );
 #ifdef AOM_CTRL_AV1E_SET_ROW_MT
-bool b_row_mt = var_GetBool( p_enc, SOUT_CFG_PREFIX "row-mt" );
+bool b_row_mt = var_InheritBool( p_enc, SOUT_CFG_PREFIX "row-mt" );
 #endif
 
 /* TODO: implement higher profiles, bit depths and other pixformats. */



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

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/29c13755d16e6782ad48257b02192616610347e8
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] dav1d: add dav1d-all-layers flag

2024-09-06 Thread @fkuehne


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


Commits:
6ffede3f by Tristan Matthews at 2024-09-06T16:41:23+00:00
dav1d: add dav1d-all-layers flag

This will output all spatial layers if requested, defaults to false (the 
built-in dav1d
behavior would defaults this to true).

Fix suggested-by Maryla Ustarroz

Fixes #28776

- - - - -


1 changed file:

- modules/codec/dav1d.c


Changes:

=
modules/codec/dav1d.c
=
@@ -74,6 +74,7 @@ vlc_module_begin ()
 add_integer_with_range("dav1d-thread-tiles", 0, 0, DAV1D_MAX_TILE_THREADS,
 THREAD_TILES_TEXT, THREAD_TILES_LONGTEXT)
 #endif
+add_bool( "dav1d-all-layers", false, "Display all spatial layers", NULL )
 vlc_module_end ()
 
 /*
@@ -465,6 +466,7 @@ static int OpenDecoder(vlc_object_t *p_this)
 if (p_sys->s.n_frame_threads == 0)
 p_sys->s.n_frame_threads = __MAX(1, vlc_GetCPUCount());
 #endif
+p_sys->s.all_layers = var_InheritBool( p_this, "dav1d-all-layers" );
 p_sys->s.allocator.cookie = dec;
 p_sys->s.allocator.alloc_picture_callback = NewPicture;
 p_sys->s.allocator.release_picture_callback = FreePicture;



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

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/6ffede3f445586e5d368de93cabb84f6a16f
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] 6 commits: extras: macosx: return error when xcrun fails

2024-09-04 Thread @fkuehne


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


Commits:
48ce6937 by Alexandre Janniaux at 2024-09-04T16:06:27+00:00
extras: macosx: return error when xcrun fails

The `export a="$(cmd)` syntax will mask the return value of $(cmd),
which will not interrupt the script in case the xcrun command fails.

- - - - -
038c578f by Alexandre Janniaux at 2024-09-04T16:06:27+00:00
extras: xcode.sh: forward $HOME to build script

$HOME will be required to find default location like the default
$CARGO_HOME at $HOME/.cargo, but the script was ignoring the whole
environment and removing it.

- - - - -
96867630 by Alexandre Janniaux at 2024-09-04T16:06:27+00:00
configure.ac: remove check on rustc

Rustc and its behaviour is checked, but the buildsystem is not actually
using rustc, and instead let cargo use the correct variant of rustc for
the project.

- - - - -
aaa0b0f7 by Alexandre Janniaux at 2024-09-04T16:06:27+00:00
configure.ac: use CARGO_HOME with its default

CARGO_HOME defaults to $HOME/.cargo/, so the proper approach is to
define it when undefined, instead of only checking it when defined.

Note that it should be in %USERPROFILE%\.cargo\bin on Windows, which is
not handled by this patch.

- - - - -
12c9c09a by Alexandre Janniaux at 2024-09-04T16:06:27+00:00
configure.ac: add --with-rust-std parameter

The parameter is forwarded to Cargo to handle re-compiling the standard
library. This is required when targetting tier 3 targets like
aarch64-apple-tvos, where the standard library is not shipped with the
compiler binaries.

Initial design used --with-cargo-build-std which only triggered rebuild
of the std in cargo, but this new design for the option allows more
specification about what needs to be built, can be extended to support
--extern crate later when the std makes it easy to do so, and I felt it
was clearer to read the option, though finding it is a bit less easy.

Example:

--with-rust-std=build-std=std,panic_abort

- - - - -
a1dead92 by Alexandre Janniaux at 2024-09-04T16:06:27+00:00
contrib: get-rust-target: add support for tvOS

The compiler supports the triplet by default.

- - - - -


5 changed files:

- configure.ac
- contrib/src/get-rust-target.sh
- extras/package/apple/xcode.sh
- extras/package/macosx/env.build.sh
- modules/Makefile.am


Changes:

=
configure.ac
=
@@ -1886,6 +1886,16 @@ AM_CONDITIONAL([ENABLE_SOUT], [test "${enable_sout}" != 
"no"])
 dnl
 dnl Rust Modules
 dnl
+AC_ARG_WITH([rust-std],
+AS_HELP_STRING([--with-rust-std[=ARGS]],
+   [Specify how to find Rust standard library. If ARGS is 
build-std=STDARGS, it forwards parameters to Cargo as -Z build-std=STDARGS. 
(default auto)]))
+AS_CASE(["${with_rust_std}"],
+[build-std=*],  [cargo_build_std_args=-Z"${with_rust_std}"],
+[auto], [cargo_build_std_args=""],
+[""],   [cargo_build_std_args=""],
+[AC_MSG_ERROR([Unknown option ${with_rust_std} for --with-rust-std=])])
+AC_SUBST([CARGO_BUILD_STD], [${cargo_build_std_args}])
+
 AC_ARG_ENABLE([rust],
   AS_HELP_STRING([--enable-rust],
 [enable building Rust modules (default disabled)]))
@@ -1931,34 +1941,17 @@ AS_IF([test "${enable_rust}" = "yes"],[
 AC_MSG_ERROR([Unsupported Rust target for ${host}])
   ])
 
-  AS_IF([test -n "${CARGO_HOME}"],[
-AS_IF([test -x "${CARGO_HOME}/bin/cargo"],[
-  ac_cv_prog_CARGO="${CARGO_HOME}/bin/cargo"
-])
-AS_IF([test -x "${CARGO_HOME}/bin/rustc"],[
-  ac_cv_prog_RUSTC="${CARGO_HOME}/bin/rustc"
-])
-  ])
-
-  AC_CHECK_PROGS(RUSTC, [rustc], [no])
-  AS_IF([test "$RUSTC" = "no"],[
-AC_MSG_ERROR([rustc not found but required to build Rust modules])
+  AS_IF([test -z "${CARGO_HOME}"], [
+dnl CARGO_HOME default to the home folder
+dnl https://doc.rust-lang.org/cargo/guide/cargo-home.html
+CARGO_HOME="${HOME}/.cargo"
   ])
 
-  AC_MSG_CHECKING([Rust compiler supports ${rust_target}])
-  ac_try="echo 'fn main() {}' | \"${RUSTC}\" --target=${rust_target} 
--emit=dep-info - -o -"
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  AS_IF([test $ac_status = 0],[
-AC_MSG_RESULT([yes])
-  ],[
-AC_MSG_RESULT([no])
-AC_MSG_ERROR([Required target ${rust_target} missing])
-  ])
-  AC_CHECK_PROGS(CARGO, [cargo], [no])
+  AC_PATH_PROGS(CARGO, [cargo], [no], [${CARGO_HOME}/bin:${PATH}])
   AS_IF([test "$CARGO" = "no"],[
 AC_MSG_ERROR([cargo not found. cargo is required to build Rust modules])
   ])
+
   AC_DEFINE(ENABLE_RUST, 1, [Define to 1 for building rust modules.])
 ])
 AM_CONDITIONAL([HAVE_RUST], [test "${enable_rust}" = "yes"])


=
contrib/src/get-rust-target.sh
=
@@ -4,8 +4,9 @@
 #
 # Authors: Denis Charmet 
 #  Steve Lhomme 
+#  Alexandre Janniaux 
 #
-# Transform a compilation triplet into a Rust Tier 1 and Tier 2 target
+# Transform a compilation triplet from autoconf to 

[vlc-commits] [Git][videolan/vlc][master] 3 commits: macosx: Add and configure loading overlay view in playlist view controller

2024-08-26 Thread @fkuehne


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


Commits:
c55cb751 by Claudio Cambra at 2024-08-26T17:58:53+00:00
macosx: Add and configure loading overlay view in playlist view controller

Signed-off-by: Claudio Cambra 

- - - - -
7497d36a by Claudio Cambra at 2024-08-26T17:58:53+00:00
macosx: Present loading overlay view when long loads related to playlists start

Signed-off-by: Claudio Cambra 

- - - - -
a4aea586 by Claudio Cambra at 2024-08-26T17:58:53+00:00
macosx: Hide loading overlay view when dealing with long load finish 
notification for playlists

Signed-off-by: Claudio Cambra 

- - - - -


2 changed files:

- modules/gui/macosx/library/playlist-library/VLCLibraryPlaylistViewController.h
- modules/gui/macosx/library/playlist-library/VLCLibraryPlaylistViewController.m


Changes:

=
modules/gui/macosx/library/playlist-library/VLCLibraryPlaylistViewController.h
=
@@ -25,6 +25,7 @@
 NS_ASSUME_NONNULL_BEGIN
 
 @class VLCLibraryCollectionViewDelegate;
+@class VLCLoadingOverlayView;
 @class VLCLibraryMasterDetailViewTableViewDelegate;
 @class VLCLibraryPlaylistDataSource;
 @class VLCLibraryTableView;
@@ -42,6 +43,8 @@ NS_ASSUME_NONNULL_BEGIN
 @property (readonly) NSScrollView *collectionViewScrollView;
 @property (readonly) NSCollectionView *collectionView;
 @property (readonly) NSArray 
*placeholderImageViewConstraints;
+@property (readonly) VLCLoadingOverlayView *loadingOverlayView;
+@property (readonly) NSArray 
*loadingOverlayViewConstraints;
 
 @property (readonly) VLCLibraryPlaylistDataSource *dataSource;
 @property (readonly) VLCLibraryCollectionViewDelegate *collectionViewDelegate;


=
modules/gui/macosx/library/playlist-library/VLCLibraryPlaylistViewController.m
=
@@ -43,6 +43,8 @@
 
 #import "main/VLCMain.h"
 
+#import "views/VLCLoadingOverlayView.h"
+
 #import "windows/video/VLCMainVideoViewController.h"
 
 @implementation VLCLibraryPlaylistViewController
@@ -69,6 +71,28 @@
selector:@selector(libraryModelUpdated:)
name:VLCLibraryModelPlaylistDeleted
  object:nil];
+
+NSString * const playlistListResetLongLoadStartNotification = 
[VLCLibraryModelPlaylistListReset 
stringByAppendingString:VLCLongNotificationNameStartSuffix];
+NSString * const playlistListResetLongLoadFinishNotification = 
[VLCLibraryModelPlaylistListReset 
stringByAppendingString:VLCLongNotificationNameFinishSuffix];
+NSString * const playlistDeletedLongLoadStartNotification = 
[VLCLibraryModelPlaylistDeleted 
stringByAppendingString:VLCLongNotificationNameStartSuffix];
+NSString * const playlistDeletedLongLoadFinishNotification = 
[VLCLibraryModelPlaylistDeleted 
stringByAppendingString:VLCLongNotificationNameFinishSuffix];
+
+[notificationCenter addObserver:self
+   selector:@selector(libraryModelLongLoadStarted:)
+   
name:playlistListResetLongLoadStartNotification
+ object:nil];
+[notificationCenter addObserver:self
+   
selector:@selector(libraryModelLongLoadFinished:)
+   
name:playlistListResetLongLoadFinishNotification
+ object:nil];
+[notificationCenter addObserver:self
+   selector:@selector(libraryModelLongLoadStarted:)
+   
name:playlistDeletedLongLoadStartNotification
+ object:nil];
+[notificationCenter addObserver:self
+   
selector:@selector(libraryModelLongLoadFinished:)
+   
name:playlistDeletedLongLoadFinishNotification
+ object:nil];
 }
 
 return self;
@@ -192,6 +216,42 @@
 ];
 }
 
+- (void)setupLoadingOverlayView
+{
+_loadingOverlayView = [[VLCLoadingOverlayView alloc] init];
+self.loadingOverlayView.translatesAutoresizingMaskIntoConstraints = NO;
+_loadingOverlayViewConstraints = @[
+[NSLayoutConstraint constraintWithItem:self.loadingOverlayView
+ attribute:NSLayoutAttributeTop
+ relatedBy:NSLayoutRelationEqual
+toItem:self.libraryTargetView
+ attribute:NSLayoutAttributeTop
+multiplier:1
+  constant:0],
+[NSLayoutConstraint constraintWithItem:self.loadingOverlayView
+ attribute:NSLayoutAttributeRight
+ relatedBy:NSLayo

[vlc-commits] [Git][videolan/vlc][master] audiounit_ios: add @autoreleasepool to GetLatency

2024-08-26 Thread @fkuehne


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


Commits:
2e77112d by Alexandre Janniaux at 2024-08-26T17:23:38+00:00
audiounit_ios: add @autoreleasepool to GetLatency

GetLatency calls [AVAudioSession outputLatency] in the following
callstack:

 - _malloc_zone_malloc_instrumented_or_legacy
 - _Block_copy
 - -[_NSXPCDistantObject 
_initWithConnection:proxyNumber:generationCount:interface:options:error:]
 - -[NSXPCConnection synchronousRemoteObjectProxyWithErrorHandler:]
 - caulk::xpc::message __strong, 
objc_object* __strong, unsigned int>::sync_proxy()
 - GetPropertyXPC(std::__1::shared_ptr, 
unsigned int, NSString*, bool)
 - GetProperty(AVAudioSessionImpl*, NSString*, bool)
 - float GetProperty_DefaultToZeroXPC(AVAudioSessionImpl*, 
NSString*, bool)
 - -[AVAudioSession outputLatency]
 - GetLatency
 - GetLatency
 - ca_Render
 - RenderCallback
 - ausdk::AUInputElement::PullInput(unsigned int&, AudioTimeStamp 
const&, unsigned int, unsigned int)
 - AUInputFormatConverter2::InputProc(OpaqueAudioConverter*, unsigned int*, 
AudioBufferList*, AudioStreamPacketDescription**, void*)
 - caulk::expected 
caulk::function_ref 
(ACAudioSpan&)>::functor_invoker(caulk::details::erased_callable (ACAudioSpan&)> const&, ACAudioSpan&)
 - acv2::AudioConverterChain::ObtainInput(acv2::AudioConverterBase&, 
unsigned int)
 - acv2::CBRConverter::ProduceOutput(ACAudioSpan&)
 - 
acv2::AudioConverterChain::ProduceOutput(caulk::function_ref (ACAudioSpan&)>, ACBaseAudioSpan&)
 - acv2::AudioConverterV2::fillComplexBuffer(int (*)(OpaqueAudioConverter*, 
unsigned int*, AudioBufferList*, AudioStreamPacketDescription**, void*), void*, 
unsigned int*, AudioBufferList*, AudioStreamPacketDescription*, 
AudioStreamPacketDependencyInfo*)
 - with_resolved(OpaqueAudioConverter*, caulk::function_ref)
 - AudioConverterFillComplexBuffer
 - AUConverterBase::RenderBus(unsigned int&, AudioTimeStamp const&, 
unsigned int, unsigned int)
 - AURemoteIO::RenderBus(unsigned int&, AudioTimeStamp const&, unsigned 
int, unsigned int)
 - ausdk::AUBase::DoRender(unsigned int&, AudioTimeStamp const&, 
unsigned int, unsigned int, AudioBufferList&)
 - AURemoteIO::PerformIO(unsigned int, unsigned int, unsigned int, 
AudioTimeStamp const&, AudioTimeStamp const&, AudioBufferList const*, 
AudioBufferList*, int&)
 - _XPerformIO
 - mshMIGPerform
 - MSHMIGDispatchMessage
 - void* caulk::thread_proxy>>(void*)
 - _pthread_start
 - thread_start

The call to Objective-C function might generate objects released from
autoreleasepool, which seems to be the case with the call to
[NSXPConnection synchronousRemoteObjectProxyWithErrorHandler][^1].

I've not found where exactly `[[block copy] autorelease]` was called but
setting up the autoreleasepool before unwinding back to the C code
removes the accumulatoin of memory on this specify callstack.

[^1]: 
https://developer.apple.com/documentation/foundation/nsxpcconnection/2879410-synchronousremoteobjectproxywith?language=objc

- - - - -


1 changed file:

- modules/audio_output/apple/audiounit_ios.m


Changes:

=
modules/audio_output/apple/audiounit_ios.m
=
@@ -90,35 +90,37 @@ typedef struct
 static vlc_tick_t
 GetLatency(audio_output_t *p_aout)
 {
-aout_sys_t *p_sys = p_aout->sys;
+@autoreleasepool {
+aout_sys_t *p_sys = p_aout->sys;
 
-Float64 unit_s;
-vlc_tick_t latency_us = 0, us;
-bool changed = false;
+Float64 unit_s;
+vlc_tick_t latency_us = 0, us;
+bool changed = false;
 
-us = vlc_tick_from_sec([p_sys->avInstance outputLatency]);
-if (us != p_sys->output_latency_ticks)
-{
-msg_Dbg(p_aout, "Current device has a new outputLatency of %" PRId64 
"us", us);
-p_sys->output_latency_ticks = us;
-changed = true;
-}
-latency_us += us;
+us = vlc_tick_from_sec([p_sys->avInstance outputLatency]);
+if (us != p_sys->output_latency_ticks)
+{
+msg_Dbg(p_aout, "Current device has a new outputLatency of %" 
PRId64 "us", us);
+p_sys->output_latency_ticks = us;
+changed = true;
+}
+latency_us += us;
 
-us = vlc_tick_from_sec([p_sys->avInstance IOBufferDuration]);
-if (us != p_sys->io_buffer_duration_ticks)
-{
-

[vlc-commits] [Git][videolan/vlc][master] extras: apple: fix copy_plugins de-duplication

2024-08-24 Thread @fkuehne


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


Commits:
62782e9b by Alexandre Janniaux at 2024-08-25T06:18:10+00:00
extras: apple: fix copy_plugins de-duplication

The de-duplication was checking whether $plugin was in the PLUGINS array
already, but plugins like ts_plugin would match mux_ts_plugin and would
not be copied to the final application.

- - - - -


1 changed file:

- extras/package/apple/copy_plugins.sh


Changes:

=
extras/package/apple/copy_plugins.sh
=
@@ -28,7 +28,7 @@ function generate_info_plist()
 PLUGINS=()
 for arch in ${ARCHS}; do
   while read -r plugin; do
-if [[ ! "${PLUGINS[@]}" =~ "${plugin}" ]]; then
+if [[ ! " ${PLUGINS[*]} " =~ "[[:space:]]${plugin}[[:space:]]" ]]; then
   PLUGINS+=( "${plugin}" )
 fi
   done < 
"${BUILT_PRODUCTS_DIR}/build-${PLATFORM_NAME}-${arch}/build/modules/vlc_modules_list"



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

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/62782e9b7cb580bbeee3e7ea182e5e5664b27d89
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] 2 commits: macosx: Fix segment type set in libraryWindow showGroupsLibrary

2024-08-22 Thread @fkuehne


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


Commits:
1cff822e by Claudio Cambra at 2024-08-23T04:05:06+00:00
macosx: Fix segment type set in libraryWindow showGroupsLibrary

Signed-off-by: Claudio Cambra 

- - - - -
e48a4241 by Claudio Cambra at 2024-08-23T04:05:06+00:00
macosx: Remove redundant librarySegmentType internal variable in library window

Signed-off-by: Claudio Cambra 

- - - - -


1 changed file:

- modules/gui/macosx/library/VLCLibraryWindow.m


Changes:

=
modules/gui/macosx/library/VLCLibraryWindow.m
=
@@ -92,7 +92,6 @@ const NSUserInterfaceItemIdentifier 
VLCLibraryWindowIdentifier = @"VLCLibraryWin
 
 @interface VLCLibraryWindow ()
 {
-NSInteger _librarySegmentType;
 NSInteger _currentSelectedViewModeSegment;
 VLCVideoWindowCommon *_temporaryAudioDecorativeWindow;
 }
@@ -406,7 +405,7 @@ static void addShadow(NSImageView *__unsafe_unretained 
imageView)
 
 - (void)showGroupsLibrary
 {
-[self.toolbarDelegate layoutForSegment:self.librarySegmentType];
+[self.toolbarDelegate layoutForSegment:VLCLibraryGroupsSegment];
 [_libraryGroupsViewController presentGroupsView];
 }
 



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/7bd96dc6eee7cb2486cd3d6b9b140573e11b2c30...e48a42415a237aef92a371bbb95a7c69e8d7

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/7bd96dc6eee7cb2486cd3d6b9b140573e11b2c30...e48a42415a237aef92a371bbb95a7c69e8d7
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] 2 commits: macosx: Fix handling of clicked row in VLCLibraryTableView when there are no selections

2024-08-19 Thread @fkuehne


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


Commits:
ba831b9b by Claudio Cambra at 2024-08-19T14:41:52+00:00
macosx: Fix handling of clicked row in VLCLibraryTableView when there are no 
selections

Signed-off-by: Claudio Cambra 

- - - - -
feb88734 by Claudio Cambra at 2024-08-19T14:41:52+00:00
macosx: Reduce getter usage in VLCLibraryTableView by caching retrieved 
property values

Signed-off-by: Claudio Cambra 

- - - - -


1 changed file:

- modules/gui/macosx/library/VLCLibraryTableView.m


Changes:

=
modules/gui/macosx/library/VLCLibraryTableView.m
=
@@ -69,18 +69,30 @@
 
 - (void)menuNeedsUpdate:(NSMenu *)menu
 {
-NSIndexSet * const indices = self.selectedRowIndexes;
-if (indices.count == 0 || self.dataSource == nil || 
!_vlcDataSourceConforming) {
+const id dataSource = self.dataSource;
+if (dataSource == nil || !_vlcDataSourceConforming) {
 return;
 }
 
-if([self.dataSource 
conformsToProtocol:@protocol(VLCLibraryTableViewDataSource)]) {
+NSMutableIndexSet * const indices = self.selectedRowIndexes.mutableCopy;
+const NSUInteger hasSelectedIndices = indices.count > 0;
+const NSUInteger clickedRow = self.clickedRow;
+
+if (!hasSelectedIndices) {
+if (clickedRow == -1) {
+return;
+} else {
+[indices addIndex:clickedRow];
+}
+}
+
+if([dataSource 
conformsToProtocol:@protocol(VLCLibraryTableViewDataSource)]) {
 NSMutableArray * const representedItems = 
 NSMutableArray.array;
 const id vlcLibraryDataSource = 
-(id)self.dataSource;
+(id)dataSource;
 
-if ([indices containsIndex:self.clickedRow]) {
+if ([indices containsIndex:clickedRow]) {
 [indices enumerateIndexesUsingBlock:^(const NSUInteger index, BOOL 
* const stop) {
 const id mediaItem =
 [vlcLibraryDataSource libraryItemAtRow:index 
forTableView:self];
@@ -93,7 +105,7 @@
 }];
 } else {
 const id mediaItem = 
-[vlcLibraryDataSource libraryItemAtRow:self.clickedRow 
forTableView:self];
+[vlcLibraryDataSource libraryItemAtRow:clickedRow 
forTableView:self];
 const VLCMediaLibraryParentGroupType parentType = 
 vlcLibraryDataSource.currentParentType;
 VLCLibraryRepresentedItem * const representedItem = 
@@ -104,10 +116,10 @@
 
 _menuController.representedItems = representedItems;
 
-} else if (self.dataSource.class == VLCMediaSourceDataSource.class) {
+} else if (dataSource.class == VLCMediaSourceDataSource.class) {
 NSMutableArray * const mediaSourceInputItems = 
NSMutableArray.array;
 VLCMediaSourceDataSource * const mediaSourceDataSource = 
-(VLCMediaSourceDataSource*)self.dataSource;
+(VLCMediaSourceDataSource*)dataSource;
 NSAssert(mediaSourceDataSource != nil, @"This should be a valid 
pointer");
 
 [indices enumerateIndexesUsingBlock:^(const NSUInteger index, BOOL * 
const stop) {



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/f697fef56687a7191cca647b97a1c7d1b25a469b...feb88734eb114cfb4057235d7672a74a5793901b

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/f697fef56687a7191cca647b97a1c7d1b25a469b...feb88734eb114cfb4057235d7672a74a5793901b
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] macos: gui: Add Picture in Picture feature

2024-08-18 Thread @fkuehne


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


Commits:
f697fef5 by Maxime Chapelet at 2024-08-18T12:35:59+00:00
macos: gui: Add Picture in Picture feature

This adds system picture in picture support using private AVKit's 
PIPViewController.

A new button to enter picture in picture mode is added in the player controls 
overlay.

- - - - -


10 changed files:

- extras/package/macosx/VLC.xcodeproj/project.pbxproj
- modules/gui/macosx/Makefile.am
- modules/gui/macosx/UI/VLCMainVideoView.xib
- modules/gui/macosx/playlist/VLCPlayerController.h
- modules/gui/macosx/playlist/VLCPlayerController.m
- + modules/gui/macosx/private/PIPSPI.h
- modules/gui/macosx/windows/controlsbar/VLCControlsBarCommon.h
- modules/gui/macosx/windows/controlsbar/VLCControlsBarCommon.m
- modules/gui/macosx/windows/video/VLCMainVideoViewController.h
- modules/gui/macosx/windows/video/VLCMainVideoViewController.m


Changes:

=
extras/package/macosx/VLC.xcodeproj/project.pbxproj
=
@@ -669,6 +669,7 @@
6BF56C3D1FCF00AF004A411A /* audiotoolbox_midi.c */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = 
audiotoolbox_midi.c; path = ../../../modules/codec/audiotoolbox_midi.c; 
sourceTree = ""; };
6BF5C5021EFE66EF008A9C12 /* VLCHUDTableView.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
VLCHUDTableView.h; sourceTree = ""; };
6BF5C5031EFE66EF008A9C12 /* VLCHUDTableView.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= VLCHUDTableView.m; sourceTree = ""; };
+   6CEA55642C6BA1BE00CCC2E7 /* PIPSPI.h */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PIPSPI.h; 
sourceTree = ""; };
7D0A387820CBCC4D00D4BF3B /* videotoolbox.c */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name 
= videotoolbox.c; path = ../../../modules/codec/videotoolbox.c; sourceTree = 
""; };
7D0F5A992264EB410009C48A /* VLCHotkeysController.h */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.h; path = 
VLCHotkeysController.h; sourceTree = ""; };
7D0F5A9A2264EB410009C48A /* VLCHotkeysController.m */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = 
VLCHotkeysController.m; sourceTree = ""; };
@@ -990,6 +991,7 @@
1C1ED5032204A99400811EC0 /* panels */,
1C1ED5142205A96600811EC0 /* playlist */,
1C1ED5102204B06700811EC0 /* preferences */,
+   6CEA55632C6BA14300CCC2E7 /* private */,
1C1ED5062204AB7C00811EC0 /* views */,
1C1ED5072204AC5900811EC0 /* windows */,
);
@@ -1789,6 +1791,14 @@
name = codec;
sourceTree = "";
};
+   6CEA55632C6BA14300CCC2E7 /* private */ = {
+   isa = PBXGroup;
+   children = (
+   6CEA55642C6BA1BE00CCC2E7 /* PIPSPI.h */,
+   );
+   path = private;
+   sourceTree = "";
+   };
7D0A387620CBCC2F00D4BF3B /* aout */ = {
isa = PBXGroup;
children = (


=
modules/gui/macosx/Makefile.am
=
@@ -39,6 +39,7 @@ xib_verbose__0 = $(xib_verbose_0)
 
 libmacosx_plugin_la_OBJCFLAGS = $(AM_OBJCFLAGS) -fobjc-exceptions -fobjc-arc 
-I$(srcdir)/gui/macosx
 libmacosx_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(guidir)' \
+   -Wl,-framework,AVKit \
-Wl,-framework,AVFoundation \
-Wl,-framework,Cocoa \
-Wl,-framework,CoreAudio \


=
modules/gui/macosx/UI/VLCMainVideoView.xib
=
@@ -1,8 +1,8 @@
 
-
+
 
 
-
+
 
 
 
@@ -25,6 +25,7 @@
 
 
 
+
 
 
 
@@ -41,6 +42,8 @@
 
 
 
+
+
 
 
 
@@ -54,8 +57,19 @@
 
 
 
-
+
 
+
+
+
+
+
+
+
+
+
+
+
 
 
 
@@ -102,10 +116,10 @@
  

[vlc-commits] [Git][videolan/vlc][master] 11 commits: macosx: Add class method to acquire VLCMediaLibraryGroup via library ID

2024-08-17 Thread @fkuehne


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


Commits:
80c5ae09 by Claudio Cambra at 2024-08-17T17:53:35+00:00
macosx: Add class method to acquire VLCMediaLibraryGroup via library ID

Signed-off-by: Claudio Cambra 

- - - - -
c9735f22 by Claudio Cambra at 2024-08-17T17:53:35+00:00
macosx: Add group update notification name

Signed-off-by: Claudio Cambra 

- - - - -
04640abe by Claudio Cambra at 2024-08-17T17:53:35+00:00
macosx: Add group cache modification queue

Signed-off-by: Claudio Cambra 

- - - - -
5a3491fc by Claudio Cambra at 2024-08-17T17:53:35+00:00
macosx: Handle group update events granularly

Signed-off-by: Claudio Cambra 

- - - - -
a35c5564 by Claudio Cambra at 2024-08-17T17:53:35+00:00
macosx: Handle group deletion events granularly

Signed-off-by: Claudio Cambra 

- - - - -
66241e45 by Claudio Cambra at 2024-08-17T17:53:35+00:00
macosx: Use correct modification queue for playlist events

Signed-off-by: Claudio Cambra 

- - - - -
0e069f33 by Claudio Cambra at 2024-08-17T17:53:35+00:00
macosx: Respond to new group related notifications in sidebar view controller

Signed-off-by: Claudio Cambra 

- - - - -
4fe0cdea by Claudio Cambra at 2024-08-17T17:53:35+00:00
macosx: Handle new group update and deletions in data source

Signed-off-by: Claudio Cambra 

- - - - -
839e4b3b by Claudio Cambra at 2024-08-17T17:53:35+00:00
macosx: Granularly update group views when receiving update notification in 
data source

Signed-off-by: Claudio Cambra 

- - - - -
982961a8 by Claudio Cambra at 2024-08-17T17:53:35+00:00
macosx: Ensure we properly update the detail table view, maintain the selection 
post-update, and do so without unnecessary reloads

Signed-off-by: Claudio Cambra 

- - - - -
e9811999 by Claudio Cambra at 2024-08-17T17:53:35+00:00
macosx: Granularly handle deletions in groups data source

Signed-off-by: Claudio Cambra 

- - - - -


6 changed files:

- modules/gui/macosx/library/VLCLibraryDataTypes.h
- modules/gui/macosx/library/VLCLibraryDataTypes.m
- modules/gui/macosx/library/VLCLibraryModel.h
- modules/gui/macosx/library/VLCLibraryModel.m
- modules/gui/macosx/library/VLCLibraryWindowNavigationSidebarViewController.m
- modules/gui/macosx/library/groups-library/VLCLibraryGroupsDataSource.m


Changes:

=
modules/gui/macosx/library/VLCLibraryDataTypes.h
=
@@ -233,8 +233,6 @@ typedef NS_ENUM(NSUInteger, VLCMediaLibraryParentGroupType) 
{
 
 @interface VLCMediaLibraryGroup : VLCAbstractMediaLibraryItem
 
-- (instancetype)initWithGroup:(struct vlc_ml_group_t *)p_group;
-
 @property (readonly) NSString *name;
 @property (readonly) NSUInteger numberOfTotalItems;
 @property (readonly) NSUInteger numberOfVideoItems;
@@ -250,6 +248,9 @@ typedef NS_ENUM(NSUInteger, VLCMediaLibraryParentGroupType) 
{
 @property (readonly) NSDate *creationDate;
 @property (readonly) NSDate *lastModificationDate;
 
++ (nullable instancetype)groupWithID:(int64_t)libraryID;
+- (instancetype)initWithGroup:(struct vlc_ml_group_t *)p_group;
+
 @end
 
 @interface VLCMediaLibraryPlaylist : 
VLCAbstractMediaLibraryItem


=
modules/gui/macosx/library/VLCLibraryDataTypes.m
=
@@ -779,6 +779,16 @@ static NSString 
*genreArrayDisplayString(NSArray * const
 @synthesize primaryActionableDetailLibraryItem = 
_primaryActionableDetailLibraryItem;
 @synthesize secondaryActionableDetailLibraryItem = 
_secondaryActionableDetailLibraryItem;
 
++ (nullable instancetype)groupWithID:(int64_t)libraryID
+{
+vlc_medialibrary_t * const p_mediaLibrary = getMediaLibrary();
+if (!p_mediaLibrary) {
+return nil;
+}
+vlc_ml_group_t * const p_group = vlc_ml_get_group(p_mediaLibrary, 
libraryID);
+return p_group ? [[VLCMediaLibraryGroup alloc] initWithGroup:p_group] : 
nil;
+}
+
 - (instancetype)initWithGroup:(struct vlc_ml_group_t *)p_group
 {
 NSParameterAssert(p_group != NULL);


=
modules/gui/macosx/library/VLCLibraryModel.h
=
@@ -48,6 +48,7 @@ extern NSString * const 
VLCLibraryModelRecentAudioMediaItemDeleted;
 extern NSString * const VLCLibraryModelAlbumDeleted;
 extern NSString * const VLCLibraryModelArtistDeleted;
 extern NSString * const VLCLibraryModelGenreDeleted;
+extern NSString * const VLCLibraryModelGroupDeleted;
 extern NSString * const VLCLibraryModelPlaylistDeleted;
 
 extern NSString * const VLCLibraryModelAudioMediaItemUpdated;
@@ -57,6 +58,7 @@ extern NSString * const 
VLCLibraryModelRecentAudioMediaItemUpdated;
 extern NSString * const VLCLibraryModelAlbumUpdated;
 

[vlc-commits] [Git][videolan/vlc][master] 4 commits: qt: implement comparison operator in ControlListModel

2024-08-17 Thread @fkuehne


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


Commits:
6a2a9839 by Fatih Uzunoglu at 2024-08-17T08:44:25+00:00
qt: implement comparison operator in ControlListModel

- - - - -
5adf9db9 by Fatih Uzunoglu at 2024-08-17T08:44:25+00:00
qt: implement comparison operator in PlayerControlbarModel

- - - - -
1a7ac42f by Fatih Uzunoglu at 2024-08-17T08:44:25+00:00
qt: implement comparison operator in ControlbarProfile

- - - - -
749652de by Fatih Uzunoglu at 2024-08-17T08:44:25+00:00
qt: use deep comparison for control bar profile selection

... and promote DEFAULT_STYLE from being a pseudo style
to an actual style.

Addressable types that can not behave like a value type,
such as having an external "ID" field, bring considerable
problems and hinder maintenance. It becomes harder to
serialize which is a necessity since we want to save the
toolbar layout, and new tricky questions arise such as:
are two models that have exactly the same layout and
elements the "same", even if their IDs differ?

This partially reverts commit 09ca278c449b9fac7f90225971c5deb01a354e76,
and uses deep comparison instead of associating ID to the
model for selection purposes.

- - - - -


9 changed files:

- modules/gui/qt/dialogs/firstrun/firstrunwizard.cpp
- modules/gui/qt/dialogs/toolbar/controlbar_profile.cpp
- modules/gui/qt/dialogs/toolbar/controlbar_profile.hpp
- modules/gui/qt/dialogs/toolbar/controlbar_profile_model.cpp
- modules/gui/qt/dialogs/toolbar/controlbar_profile_model.hpp
- modules/gui/qt/dialogs/toolbar/qml/ToolbarEditorDialog.qml
- modules/gui/qt/player/control_list_model.hpp
- modules/gui/qt/player/player_controlbar_model.cpp
- modules/gui/qt/player/player_controlbar_model.hpp


Changes:

=
modules/gui/qt/dialogs/firstrun/firstrunwizard.cpp
=
@@ -141,12 +141,24 @@ void FirstRunWizard::finish()
 
 config_PutInt( "qt-pin-controls", ui.layoutGroup->checkedId() );
 
-ControlbarProfileModel* controlbarModel = 
p_intf->p_mi->controlbarProfileModel();
-assert(controlbarModel);
-if( ui.layoutGroup->checkedId() )
-
controlbarModel->setSelectedProfileFromId(ControlbarProfileModel::CLASSIC_STYLE);
-else
-
controlbarModel->setSelectedProfileFromId(ControlbarProfileModel::DEFAULT_STYLE);
+{
+ControlbarProfileModel* controlbarModel = 
p_intf->p_mi->controlbarProfileModel();
+assert(controlbarModel);
+
+ControlbarProfileModel::Style style;
+if( ui.layoutGroup->checkedId() )
+style = ControlbarProfileModel::Style::CLASSIC_STYLE;
+else
+style = ControlbarProfileModel::Style::DEFAULT_STYLE;
+
+std::unique_ptr profile( 
controlbarModel->generateProfileFromStyle( style ) );
+assert( profile );
+const std::optional index = controlbarModel->findModel( 
profile.get() );
+if( index )
+controlbarModel->setSelectedProfile( *index );
+else
+controlbarModel->insertProfile( std::move( profile ), true );
+}
 
 /* Commit changes to the scanned folders for the Media Library */
 if( vlc_ml_instance_get( p_intf ) && mlFoldersEditor )
@@ -311,7 +323,6 @@ void FirstRunWizard::reject()
 config_PutInt( "qt-menubar", 0 );
 config_PutInt( "qt-titlebar", 0 );
 p_intf->p_mi->setPinVideoControls( 0 );
-
p_intf->p_mi->controlbarProfileModel()->setSelectedProfileFromId(ControlbarProfileModel::DEFAULT_STYLE);
 
 /* Folders Page settings */
 if ( mlFoldersEditor )


=
modules/gui/qt/dialogs/toolbar/controlbar_profile.cpp
=
@@ -23,85 +23,9 @@
 #include "player/player_controlbar_model.hpp"
 
 
-decltype(ControlbarProfile::m_defaults)
-ControlbarProfile::m_defaults =
-{
-{
-PlayerControlbarModel::Videoplayer,
-{
-{
-{
-ControlListModel::LANG_BUTTON,
-ControlListModel::BOOKMARK_BUTTON,
-ControlListModel::EXTENDED_BUTTON,
-ControlListModel::NAVIGATION_BUTTONS
-},
-{
-ControlListModel::SKIP_BACK_BUTTON,
-ControlListModel::PREVIOUS_BUTTON,
-ControlListModel::PLAY_BUTTON,
-ControlListModel::NEXT_BUTTON,
-ControlListModel::SKIP_FW_BUTTON
-},
-{
-ControlListModel::VOLUME,
-ControlListModel::RENDERER_BUTTON,
-ControlListModel::FULLSCREEN_BUTTON
-}
-}
-}
-},
-{
-PlayerControlbarModel::Audioplayer,
-  

[vlc-commits] [Git][videolan/vlc][master] qt: do not delete QObject from potentially different thread

2024-08-17 Thread @fkuehne


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


Commits:
e61bab77 by Fatih Uzunoglu at 2024-08-17T08:10:42+00:00
qt: do not delete QObject from potentially different thread

In 2b0471c, a change was made to delete video surface provider
and video window handler when video window is destroyed. This
makes sense, since they are not necessary anymore (so no need
to keep them in memory) and also the connections would cease
to exist automatically.

However, turns out that this method may be called from a
different thread than the one these objects belong to.
Considering the following quote from Qt documentation, do not
delete them here but instead simply disconnect the signals.

> You must not delete the QObject directly if it exists in a
> different thread than the one currently executing.

- - - - -


1 changed file:

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


Changes:

=
modules/gui/qt/maininterface/compositor.cpp
=
@@ -212,11 +212,16 @@ void CompositorVideo::commonSetupVoutWindow(vlc_window_t* 
p_wnd, VoutDestroyCb d
 
 void CompositorVideo::windowDestroy()
 {
+// Current thread may not be the thread where
+// m_videoSurfaceProvider belongs to, so do not delete
+// it here:
+disconnect(m_videoSurfaceProvider.get(), 
&VideoSurfaceProvider::surfacePositionChanged,
+   this, &CompositorVideo::onSurfacePositionChanged);
+disconnect(m_videoSurfaceProvider.get(), 
&VideoSurfaceProvider::surfaceSizeChanged,
+   this, &CompositorVideo::onSurfaceSizeChanged);
+
 if (m_destroyCb)
 m_destroyCb(m_wnd);
-
-m_videoSurfaceProvider.reset();
-m_videoWindowHandler.reset();
 }
 
 void CompositorVideo::windowResize(unsigned width, unsigned height)
@@ -323,6 +328,8 @@ void CompositorVideo::commonGUIDestroy()
 
 void CompositorVideo::commonIntfDestroy()
 {
+m_videoWindowHandler.reset();
+m_videoSurfaceProvider.reset();
 unloadGUI();
 }
 



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

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/e61bab777f0f063575e63cb78de981697576192b
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] demux: asf: add missing subpayloads drain on EOF

2024-08-17 Thread @fkuehne


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


Commits:
6bf0a140 by François Cartegnie at 2024-08-17T07:57:55+00:00
demux: asf: add missing subpayloads drain on EOF

refs #28716

- - - - -


1 changed file:

- modules/demux/asf/asf.c


Changes:

=
modules/demux/asf/asf.c
=
@@ -242,7 +242,15 @@ static int Demux( demux_t *p_demux )
 msg_Warn( p_demux, "found a new ASF header" );
 }
 else
+{
 p_sys->b_eof = true;
+for ( int i=0; itrack[i];
+if ( tk && tk->info.p_frame )
+Packet_Enqueue( &p_sys->packet_sys, i, 
&tk->info.p_frame );
+}
+}
 }
 
 if ( p_sys->i_time == VLC_TICK_INVALID )



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

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/6bf0a1407b5b9aef792ef94a57142254d079e8fd
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] 4 commits: Revert "contrib: gcrypt: disable asm for macOS aarch64 for now"

2024-08-13 Thread @fkuehne


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


Commits:
5885e53a by Steve Lhomme at 2024-08-13T11:15:52+00:00
Revert "contrib: gcrypt: disable asm for macOS aarch64 for now"

This reverts commit 8edd1a300a429efb6fa518c600f62db532dba258.

It seems to build properly. Modern should support arm64 properly.

We also build ASM for iOS/tvOS/xrOS since HAVE_BSD is no longer
set for these (4bfdaf555b842d4426daf7e2f048eaaaf1784f6b).

- - - - -
23feca2c by Steve Lhomme at 2024-08-13T11:15:52+00:00
contrib: gcrypt: remove aesni-support disabling

It's automatically detecting if SSE3/AVX/AVX2 is supported
byt the compiler to use these.

It was originally added in 7c98e07cc07295b40f034a31c0fa35ed001434a0.

- - - - -
162ddaf3 by Steve Lhomme at 2024-08-13T11:15:52+00:00
contrib: gcrypt: enable ac_cv_sys_symbol_underscore on all Darwin platforms

Linking fails on arm64 if it's not set. It seems more coherent that way.

- - - - -
7ef9b254 by Steve Lhomme at 2024-08-13T11:15:52+00:00
contrib: gcrypt: enable hardware acceleration on BSD

There's no reason it should be disabled. It was picked from the iOS 
fallback before.

- - - - -


1 changed file:

- contrib/src/gcrypt/rules.mak


Changes:

=
contrib/src/gcrypt/rules.mak
=
@@ -48,19 +48,8 @@ GCRYPT_CONF += --disable-asm --disable-padlock-support
 endif
 endif
 ifdef HAVE_DARWIN_OS
-ifeq ($(ARCH),x86_64)
 GCRYPT_CONF += ac_cv_sys_symbol_underscore=yes
 endif
-endif
-ifdef HAVE_MACOSX
-GCRYPT_CONF += --disable-aesni-support
-ifeq ($(ARCH),aarch64)
-GCRYPT_CONF += --disable-asm --disable-arm-crypto-support
-endif
-endif
-ifdef HAVE_BSD
-GCRYPT_CONF += --disable-asm --disable-aesni-support
-endif
 ifdef HAVE_ANDROID
 ifeq ($(ANDROID_ABI), x86)
 GCRYPT_CONF += ac_cv_sys_symbol_underscore=no



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/e04bdb364062a46def18a7167d58e9baba0b5592...7ef9b254d2b9f0daae572998e2d127c8a31df7a8

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/e04bdb364062a46def18a7167d58e9baba0b5592...7ef9b254d2b9f0daae572998e2d127c8a31df7a8
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] 2 commits: avsb: move long operation to the open callback

2024-08-13 Thread @fkuehne


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


Commits:
fcfa2b5d by Thomas Guillem at 2024-08-13T07:06:06+00:00
avsb: move long operation to the open callback

- - - - -
e04bdb36 by Thomas Guillem at 2024-08-13T07:06:06+00:00
avsb: move sync setup call

- - - - -


1 changed file:

- modules/audio_output/apple/avsamplebuffer.m


Changes:

=
modules/audio_output/apple/avsamplebuffer.m
=
@@ -98,6 +98,26 @@ API_AVAILABLE(macos(MIN_MACOS), ios(MIN_IOS), tvos(MIN_TVOS) 
VISIONOS_API_AVAILA
 _outChain = NULL;
 _outChainLast = &_outChain;
 
+/* The first call to CMAudioFormatDescriptionCreate() might take some time
+ * (between 200 and 600ms) as it is initializing some static context/libs.
+ * Therefore, call it from the Open() callback with dummy params. Indeed,
+ * the playback is not yet started and a longer Open() call won't mess with
+ * playback timings. */
+static const AudioStreamBasicDescription dummyDesc = {
+.mSampleRate = 48000,
+.mFormatID = kAudioFormatLinearPCM,
+.mFormatFlags = kAudioFormatFlagsNativeFloatPacked,
+.mChannelsPerFrame = 2,
+.mFramesPerPacket = 1,
+.mBitsPerChannel = 32,
+};
+CMAudioFormatDescriptionRef dummyFmtDesc;
+OSStatus status =
+CMAudioFormatDescriptionCreate(kCFAllocatorDefault, &dummyDesc, 0, nil,
+   0, nil, nil, &dummyFmtDesc);
+if (status == noErr)
+CFRelease(dummyFmtDesc);
+
 self = [super init];
 if (self == nil)
 return nil;
@@ -295,8 +315,6 @@ customBlock_Free(void *refcon, void *doomedMemoryBlock, 
size_t sizeInBytes)
 CMTime hostTime = CMTimeAdd(CMClockGetTime(CMClockGetHostTimeClock()),
 CMTimeMake(delta, CLOCK_FREQ));
 CMTime time = CMTimeMake(_ptsSamples, _sampleRate);
-
-_sync.delaysRateChangeUntilHasSufficientMediaData = NO;
 [_sync setRate:1.0f time:time atHostTime:hostTime];
 }
 
@@ -445,6 +463,7 @@ customBlock_Free(void *refcon, void *doomedMemoryBlock, 
size_t sizeInBytes)
 goto error;
 }
 
+_sync.delaysRateChangeUntilHasSufficientMediaData = NO;
 [_sync addRenderer:_renderer];
 
 _ptsSamples = -1;



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/9b737741e3afa3cd58e6804e7a33283839276fb8...e04bdb364062a46def18a7167d58e9baba0b5592

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/9b737741e3afa3cd58e6804e7a33283839276fb8...e04bdb364062a46def18a7167d58e9baba0b5592
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] qt: make "Media Library" context menu action no longer checkable

2024-08-12 Thread @fkuehne


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


Commits:
b6a90210 by Fatih Uzunoglu at 2024-08-12T11:18:15+00:00
qt: make "Media Library" context menu action no longer checkable

... and adjust its title is properly such that:

- If already in player view, the title is "Show main view".
- If already in main view, the title is "Show player view".

Player view is currently considered another page, therefore
toggling does not make sense here (also considering the
navigation history). This button now always pushes into the
history.

- - - - -


11 changed files:

- modules/gui/qt/maininterface/mainctx.cpp
- modules/gui/qt/maininterface/mainctx.hpp
- modules/gui/qt/maininterface/qml/BannerSources.qml
- modules/gui/qt/maininterface/qml/MainInterface.qml
- modules/gui/qt/menus/menus.cpp
- modules/gui/qt/menus/menus.hpp
- modules/gui/qt/menus/qml/Menubar.qml
- modules/gui/qt/menus/qml_menu_wrapper.cpp
- modules/gui/qt/menus/qml_menu_wrapper.hpp
- modules/gui/qt/player/qml/TopBar.qml
- modules/gui/qt/player/qml/controlbarcontrols/MenuButton.qml


Changes:

=
modules/gui/qt/maininterface/mainctx.cpp
=
@@ -552,16 +552,6 @@ QString MainCtx::displayMRL(const QUrl &mrl) const
 return urlToDisplayString(mrl);
 }
 
-void MainCtx::setMediaLibraryVisible( bool visible )
-{
-if (m_mediaLibraryVisible == visible)
-return;
-
-m_mediaLibraryVisible = visible;
-
-emit mediaLibraryVisibleChanged(visible);
-}
-
 void MainCtx::setPlaylistDocked( bool docked )
 {
 b_playlistDocked = docked;


=
modules/gui/qt/maininterface/mainctx.hpp
=
@@ -95,8 +95,6 @@ class MainCtx : public QObject
 {
 Q_OBJECT
 
-Q_PROPERTY(bool mediaLibraryVisible READ isMediaLibraryVisible WRITE 
setMediaLibraryVisible
-   NOTIFY mediaLibraryVisibleChanged FINAL)
 Q_PROPERTY(bool playlistDocked READ isPlaylistDocked WRITE 
setPlaylistDocked NOTIFY playlistDockedChanged FINAL)
 Q_PROPERTY(bool playlistVisible READ isPlaylistVisible WRITE 
setPlaylistVisible NOTIFY playlistVisibleChanged FINAL)
 Q_PROPERTY(double playlistWidthFactor READ getPlaylistWidthFactor WRITE 
setPlaylistWidthFactor NOTIFY playlistWidthFactorChanged FINAL)
@@ -193,7 +191,6 @@ public:
 Q_ENUM(OsType)
 
 inline QWindow::Visibility interfaceVisibility() const { return 
m_windowVisibility; }
-bool isMediaLibraryVisible() { return m_mediaLibraryVisible; }
 bool isPlaylistDocked() { return b_playlistDocked; }
 bool isPlaylistVisible() { return m_playlistVisible; }
 inline double getPlaylistWidthFactor() const { return 
m_playlistWidthFactor; }
@@ -341,7 +338,6 @@ protected:
 QUrl m_dialogFilepath; /* Last path used in dialogs */
 
 /* States */
-bool m_mediaLibraryVisible = true;
 bool m_playlistVisible = false;   ///< Is the playlist 
visible ?
 double   m_playlistWidthFactor = 4.;   ///< playlist size: 
root.width / playlistScaleFactor
 double   m_playerPlaylistWidthFactor = 4.;
@@ -377,7 +373,6 @@ protected:
 public slots:
 void toggleToolbarMenu();
 void toggleInterfaceFullScreen();
-void setMediaLibraryVisible( bool );
 void setPlaylistDocked( bool );
 void setPlaylistVisible( bool );
 void setPlaylistWidthFactor( double );
@@ -421,7 +416,6 @@ signals:
 void askRaise();
 void kc_pressed(); /* easter eggs */
 
-void mediaLibraryVisibleChanged(bool);
 void playlistDockedChanged(bool);
 void playlistVisibleChanged(bool);
 void playlistWidthFactorChanged(double);
@@ -469,6 +463,9 @@ signals:
 void windowSuportExtendedFrameChanged();
 void windowExtendedMarginChanged(unsigned margin);
 
+void requestShowMainView();
+void requestShowPlayerView();
+
 private:
 void loadPrefs(bool callSignals);
 void loadFromSettingsImpl(bool callSignals);


=
modules/gui/qt/maininterface/qml/BannerSources.qml
=
@@ -475,6 +475,7 @@ T.ToolBar {
 Menus.QmlGlobalMenu {
 id: contextMenu
 ctx: MainCtx
+playerViewVisible: 
History.match(History.viewPath, ["player"])
 }
 }
 }


=
modules/gui/qt/maininterface/qml/MainInterface.qml
=
@@ -167,31 +167,21 @@ Item {
 Connections {
 target: MainCtx
 
-function onMediaLibraryVisibleChanged() {
-if (MainCtx.mediaLibraryVisible) {
-if (History.match(History.viewPath, ["mc"]))
-return
-
-// NOTE: Useful 

[vlc-commits] [Git][videolan/vlc][master] qt: check for QT_QUICK_BACKEND before applying the fallback procedure

2024-08-12 Thread @fkuehne


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


Commits:
15ba5b52 by Fatih Uzunoglu at 2024-08-12T09:32:25+00:00
qt: check for QT_QUICK_BACKEND before applying the fallback procedure

`QSG_RHI_BACKEND` determines the RHI backend, but software or OpenVG
are not part of RHI but rather independent backends.

We should not apply the fallback procedure if `QT_QUICK_BACKEND` is
specified, which might be `software` or `openvg`.

- - - - -


1 changed file:

- modules/gui/qt/qt.cpp


Changes:

=
modules/gui/qt/qt.cpp
=
@@ -902,7 +902,7 @@ static void *Thread( void *obj )
 //   Windows 7 and Windows 8, since it may not support
 //   the default graphics api (Direct3D 11.2).
 
-if (qEnvironmentVariableIsEmpty("QSG_RHI_BACKEND"))
+if (qEnvironmentVariableIsEmpty("QSG_RHI_BACKEND") && 
qEnvironmentVariableIsEmpty("QT_QUICK_BACKEND"))
 {
 if (QOperatingSystemVersion::current() < 
QOperatingSystemVersion::Windows8_1)
 {



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

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/15ba5b529cadbc36072212eb73037913a2e3c31c
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: input_clock: rework update arguments

2024-08-12 Thread @fkuehne


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


Commits:
583a6b8f by Thomas Guillem at 2024-08-12T09:07:26+00:00
input_clock: rework update arguments

Add a b_buffering argument (not to be confused with
extra_buffering_allowd).

- - - - -
88258ec1 by Thomas Guillem at 2024-08-12T09:07:26+00:00
input_clock: move origin_changed check

This fix the unlikely case where a backward discontinuity is not
detected just after the origin is changed.

- - - - -
f159466c by Thomas Guillem at 2024-08-12T09:07:26+00:00
input_clock: don't check for discontinuites while buffering

- - - - -


3 changed files:

- src/clock/input_clock.c
- src/clock/input_clock.h
- src/input/es_out.c


Changes:

=
src/clock/input_clock.c
=
@@ -220,12 +220,15 @@ void input_clock_AttachListener(input_clock_t *cl,
  *  i_ck_system: date in system clock
  */
 vlc_tick_t input_clock_Update( input_clock_t *cl, vlc_object_t *p_log,
- bool b_can_pace_control, bool b_buffering_allowed,
+ bool b_can_pace_control, bool b_buffering,
+ bool b_extra_buffering_allowed,
  vlc_tick_t i_ck_stream, vlc_tick_t i_ck_system )
 {
 bool b_reset_reference = false;
 bool discontinuity = false;
 
+b_can_pace_control |= b_buffering;
+
 assert( i_ck_stream != VLC_TICK_INVALID && i_ck_system != VLC_TICK_INVALID 
);
 
 if( !cl->b_has_reference )
@@ -233,8 +236,7 @@ vlc_tick_t input_clock_Update( input_clock_t *cl, 
vlc_object_t *p_log,
 /* */
 b_reset_reference= true;
 }
-/* Don't check discontinuities if the origin has just been changed */
-else if (cl->last.stream != VLC_TICK_INVALID && !cl->b_origin_changed)
+else if (!b_buffering && cl->last.stream != VLC_TICK_INVALID)
 {
 assert(cl->last.system != VLC_TICK_INVALID);
 
@@ -245,8 +247,9 @@ vlc_tick_t input_clock_Update( input_clock_t *cl, 
vlc_object_t *p_log,
 vlc_tick_t diff = stream_diff - system_diff;
 
 /* A discontinuity happen if stream timings increase much more than
- * system timings or if the stream is going backward. */
-if (diff > CR_MAX_GAP || stream_diff < 0)
+ * system timings or if the stream is going backward.
+ * Don't compare system timings if the origin has just been changed */
+if ((!cl->b_origin_changed && diff > CR_MAX_GAP) || stream_diff < 0)
 {
 /* Stream discontinuity, for which we haven't received a
  * warning from the stream control facilities (dd-edited
@@ -292,7 +295,7 @@ vlc_tick_t input_clock_Update( input_clock_t *cl, 
vlc_object_t *p_log,
 {
 cl->i_buffering_duration = 0;
 }
-else if( b_buffering_allowed )
+else if( b_extra_buffering_allowed )
 {
 /* Try to bufferize more than necessary by reading
  * CR_BUFFERING_RATE/256 faster until we have CR_BUFFERING_TARGET.
@@ -303,7 +306,7 @@ vlc_tick_t input_clock_Update( input_clock_t *cl, 
vlc_object_t *p_log,
 if( cl->i_buffering_duration > CR_BUFFERING_TARGET )
 cl->i_buffering_duration = CR_BUFFERING_TARGET;
 }
-//fprintf( stderr, "input_clock_Update: %d :: %lld\n", 
b_buffering_allowed, cl->i_buffering_duration/1000 );
+//fprintf( stderr, "input_clock_Update: %d :: %lld\n", 
b_extra_buffering_allowed, cl->i_buffering_duration/1000 );
 
 /* */
 cl->last = clock_point_Create( i_ck_system, i_ck_stream );


=
src/clock/input_clock.h
=
@@ -100,15 +100,17 @@ void input_clock_Delete(input_clock_t *);
  * \param clock the input clock object to update with the new point
  * \param p_log the logger object to use
  * \param b_can_pace_control whether the input can control the speed of 
playback
- * \param b_buffering_allowed tells if we are allowed to bufferize more data in
-  advanced (if possible).
+ * \param b_buffering whether the input is buffering
+ * \param b_extra_buffering_allowed tells if we are allowed to bufferize more
+ *data in advance (if possible).
  * \param i_clock the new clock reference value
  * \param i_system the timestmap at which the new reference has been reported
  *
  * \return clock update delay
  */
 vlc_tick_t input_clock_Update( input_clock_t *clock, vlc_object_t *p_log,
-bool b_can_pace_control, bool b_buffering_allowed,
+bool b_can_pace_control, bool b_buffering,
+bool b_extra_buffering_allowed,
 vlc_tick_t i_clock, vlc_tick_t i_system );
 
 /**


=
src/input/es_out.c
=
@@ -3365,7 +3365,7 @@ static int EsOutVaControlLocked(es_out_sys_t *p_sys, 
input_source_t *

[vlc-commits] [Git][videolan/vlc][master] avsb: restart in case of critical failure

2024-08-12 Thread @fkuehne


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


Commits:
4c13e010 by Thomas Guillem at 2024-08-12T08:41:53+00:00
avsb: restart in case of critical failure

Seen some crashes with the following error: "AVFoundationErrorDomain
Code=-11803". It means the OS daemon has crashed.

It could happen on dev branch when starting with screwed timings. But I
guess it could happen on nominal case too (but very unlikely).

Restart the aout in that case.

- - - - -


1 changed file:

- modules/audio_output/apple/avsamplebuffer.m


Changes:

=
modules/audio_output/apple/avsamplebuffer.m
=
@@ -298,6 +298,12 @@ customBlock_Free(void *refcon, void *doomedMemoryBlock, 
size_t sizeInBytes)
 
 vlc_cond_signal(&_bufferWait);
 vlc_mutex_unlock(&_bufferLock);
+
+if (_renderer.status == AVQueuedSampleBufferRenderingStatusFailed)
+{
+msg_Err(_aout, "AVQueuedSampleBufferRenderingStatusFailed, 
restarting");
+aout_RestartRequest(_aout, false);
+}
 }
 
 - (void)stopSyncRenderer



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

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/4c13e01089d324421562695c82444cb70c8aab1d
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] qt: fix pointer in non-pointer parameter

2024-07-23 Thread @fkuehne


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


Commits:
3ef0bda7 by Steve Lhomme at 2024-07-24T04:54:11+00:00
qt: fix pointer in non-pointer parameter

The 5th parameter of TrackPopupMenu() is an int, and the last parameter is a 
pointer.

- - - - -


1 changed file:

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


Changes:

=
modules/gui/qt/maininterface/mainctx_win32.cpp
=
@@ -172,7 +172,7 @@ public:
 
 const int action = TrackPopupMenu(hmenu, (TPM_RETURNCMD | alignment)
   , screenPoints.x(), screenPoints.y()
-  , NULL, hwnd, 0);
+  , 0, hwnd, nullptr);
 
 // unlike native system menu which sends WM_SYSCOMMAND, TrackPopupMenu 
sends WM_COMMAND
 // imitate native system menu by sending the action manually as 
WM_SYSCOMMAND



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

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/3ef0bda7b41a14c837ad94beb84d7e25462c2684
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] 2 commits: qml: do not set grab permissions in SliderBar tap handler

2024-07-21 Thread @fkuehne


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


Commits:
e7147dfb by Fatih Uzunoglu at 2024-07-21T13:21:48+00:00
qml: do not set grab permissions in SliderBar tap handler

It appears that setting the gesture policy is enough, and
setting grab permission to `CanTakeOverFromAnything` seems
to be conflicting with the drag handler.

- - - - -
dfc421a5 by Fatih Uzunoglu at 2024-07-21T13:21:48+00:00
qml: set proper states for the FSM in SliderBar tap handler

`tapped()` is a signal that is emitted on release, not press.
Therefore, currently the state is not set properly.

- - - - -


1 changed file:

- modules/gui/qt/player/qml/SliderBar.qml


Changes:

=
modules/gui/qt/player/qml/SliderBar.qml
=
@@ -228,14 +228,15 @@ T.ProgressBar {
 TapHandler {
 acceptedButtons: Qt.LeftButton
 
-grabPermissions: TapHandler.CanTakeOverFromAnything
-
 gesturePolicy: TapHandler.WithinBounds
 
-//clicked but not dragged
-onTapped: (point, button) => {
-fsm.pressControl(point.position.x / control.width, 
point.modifiers === Qt.ShiftModifier)
-fsm.releaseControl(point.position.x / control.width, 
point.modifiers === Qt.ShiftModifier)
+onPressedChanged: {
+if (pressed) {
+fsm.pressControl(point.position.x / control.width, 
point.modifiers === Qt.ShiftModifier)
+} else {
+// NOTE: Point is still valid at this point.
+fsm.releaseControl(point.position.x / control.width, 
point.modifiers === Qt.ShiftModifier)
+}
 }
 }
 



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/7d523406931ccf618ad83c5aa8f23118de3ddf40...dfc421a56b93ce980982a9a0bc6faada2610cb9e

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/7d523406931ccf618ad83c5aa8f23118de3ddf40...dfc421a56b93ce980982a9a0bc6faada2610cb9e
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] 48 commits: macosx: Remove unnecessary forward declarations in VLCLibraryModel header

2024-07-21 Thread @fkuehne


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


Commits:
b71219a2 by Claudio Cambra at 2024-07-21T10:54:15+00:00
macosx: Remove unnecessary forward declarations in VLCLibraryModel header

Signed-off-by: Claudio Cambra 

- - - - -
e5fc8f46 by Claudio Cambra at 2024-07-21T10:54:15+00:00
macosx: Add basic VLCMediaLibraryShow interface

Signed-off-by: Claudio Cambra 

- - - - -
382e8926 by Claudio Cambra at 2024-07-21T10:54:15+00:00
macosx: Add initialiser for show taking a vlc_ml_show_t pointer

Signed-off-by: Claudio Cambra 

- - - - -
ca7a4ef6 by Claudio Cambra at 2024-07-21T10:54:15+00:00
macosx: Set abstract base class properties in VLCMediaLibraryShow constructor

Signed-off-by: Claudio Cambra 

- - - - -
48019a9d by Claudio Cambra at 2024-07-21T10:54:15+00:00
macosx: Do not subclass VLCAbstractMediaLibraryItem in VLCMediaLibraryMediaItem

It is functionally different from the other classes that use this and it is 
potentially confusing to have this derive like the others

Signed-off-by: Claudio Cambra 

- - - - -
1d36d2a9 by Claudio Cambra at 2024-07-21T10:54:15+00:00
macosx: Implement some common functionality in abstract media library item class

Signed-off-by: Claudio Cambra 

- - - - -
2209ab0b by Claudio Cambra at 2024-07-21T10:54:15+00:00
macosx: Remove unnecessary duplicated implementations in abstract media library 
audio group class

Signed-off-by: Claudio Cambra 

- - - - -
e1d8c95c by Claudio Cambra at 2024-07-21T10:54:15+00:00
macosx: Fix init method of media library show

Signed-off-by: Claudio Cambra 

- - - - -
63c091bf by Claudio Cambra at 2024-07-21T10:54:15+00:00
macosx: Implement episodes/media items property of show data type

Signed-off-by: Claudio Cambra 

- - - - -
812e2e8d by Claudio Cambra at 2024-07-21T10:54:15+00:00
macosx: Add fetch (reset) method for list of shows in vlclibrarymodel

Signed-off-by: Claudio Cambra 

- - - - -
e7335548 by Claudio Cambra at 2024-07-21T10:54:15+00:00
macosx: Add show properties to VLCLibraryModel

Signed-off-by: Claudio Cambra 

- - - - -
230bffa0 by Claudio Cambra at 2024-07-21T10:54:15+00:00
macosx: Provide fetch-less list of shows count in library model

Signed-off-by: Claudio Cambra 

- - - - -
1743157e by Claudio Cambra at 2024-07-21T10:54:15+00:00
macosx: Implement custom getter for listOfShows like with other VLCLibraryModel 
array properties using cache

Signed-off-by: Claudio Cambra 

- - - - -
ca2302ac by Claudio Cambra at 2024-07-21T10:54:15+00:00
macosx: Reset cached list of shows where appropriate in VLCLibraryModel

Signed-off-by: Claudio Cambra 

- - - - -
d5271b8a by Claudio Cambra at 2024-07-21T10:54:15+00:00
macosx: Add starter VLCLibraryShowsViewController

Signed-off-by: Claudio Cambra 

- - - - -
6389e034 by Claudio Cambra at 2024-07-21T10:54:15+00:00
macosx: Add starter shows data source class

Signed-off-by: Claudio Cambra 

- - - - -
719ef507 by Claudio Cambra at 2024-07-21T10:54:15+00:00
macosx: Remove shows view controller

Signed-off-by: Claudio Cambra 

- - - - -
8b20f2c0 by Claudio Cambra at 2024-07-21T10:54:15+00:00
macosx: Move collection view configuration procedure out of video data source 
and into video library view controller

Signed-off-by: Claudio Cambra 

- - - - -
6fe1ffa2 by Claudio Cambra at 2024-07-21T10:54:15+00:00
macosx: Rename table view properties in shows data source to match usages here

Signed-off-by: Claudio Cambra 

- - - - -
0c23d1e5 by Claudio Cambra at 2024-07-21T10:54:15+00:00
macosx: Only act on assigned collection view and group tables in video data 
source if self is in fact their assigned data source

Signed-off-by: Claudio Cambra 

- - - - -
a85b89b1 by Claudio Cambra at 2024-07-21T10:54:15+00:00
macosx: Implement reloadData in shows data source

Signed-off-by: Claudio Cambra 

- - - - -
6edbdeb8 by Claudio Cambra at 2024-07-21T10:54:15+00:00
macosx: Implement connection/disconnection to core library model shows 
notification

Signed-off-by: Claudio Cambra 

- - - - -
b4edb446 by Claudio Cambra at 2024-07-21T10:54:15+00:00
macosx: Connect shows data source on init

Signed-off-by: Claudio Cambra 

- - - - -
099ba5c7 by Claudio Cambra at 2024-07-21T10:54:15+00:00
macox: Add indexOfItem convenience method to shows data source

Signed-off-by: Claudio Cambra 

- - - - -
b9263040 by Claudio Ca

[vlc-commits] [Git][videolan/vlc][master] 40 commits: macosx: Add method to navigation sidebar view controller to get number of...

2024-07-12 Thread @fkuehne


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


Commits:
d1b2428d by Claudio Cambra at 2024-07-13T04:18:20+00:00
macosx: Add method to navigation sidebar view controller to get number of media 
browsing default local paths, if available

Signed-off-by: Claudio Cambra 

- - - - -
81fe9c90 by Claudio Cambra at 2024-07-13T04:18:20+00:00
macosx: Use media sources to get local default locations

Signed-off-by: Claudio Cambra 

- - - - -
a69511ba by Claudio Cambra at 2024-07-13T04:18:20+00:00
macosx: Move default bookmark locations into VLCLibrarySegment

Signed-off-by: Claudio Cambra 

- - - - -
472e4847 by Claudio Cambra at 2024-07-13T04:18:20+00:00
macosx: Add a VLCLibraryBrowseBookmarkedLocationSubSegment

Signed-off-by: Claudio Cambra 

- - - - -
0eeda743 by Claudio Cambra at 2024-07-13T04:18:20+00:00
macosx: Add a VLCLibrarySegmentBookmarkedLocation descriptor object

Signed-off-by: Claudio Cambra 

- - - - -
739fb3d3 by Claudio Cambra at 2024-07-13T04:18:20+00:00
macosx: Support providing a bookmarked location descriptor into the represented 
object init of VLCLibrarySegment

Signed-off-by: Claudio Cambra 

- - - - -
79e74ddb by Claudio Cambra at 2024-07-13T04:18:20+00:00
macosx: Correctly provide display string in vlclibrarysegment for bookmarked 
location segments

Signed-off-by: Claudio Cambra 

- - - - -
3e5c7f6a by Claudio Cambra at 2024-07-13T04:18:20+00:00
macosx: Present bookmarked local locations as child nodes of the 
"browse" segment in sidebar

Signed-off-by: Claudio Cambra 

- - - - -
edbbd69c by Claudio Cambra at 2024-07-13T04:18:20+00:00
macosx: Move library segment bookmarked location class definition into own file

Signed-off-by: Claudio Cambra 

- - - - -
6e01b90f by Claudio Cambra at 2024-07-13T04:18:20+00:00
macosx: Fix library segment header comment name

Signed-off-by: Claudio Cambra 

- - - - -
46db6e22 by Claudio Cambra at 2024-07-13T04:18:20+00:00
macosx: Add VLCLibraryBrowseBookmarkedLocationSubSegment to toolbar delegate 
handling

Signed-off-by: Claudio Cambra 

- - - - -
c77eddbc by Claudio Cambra at 2024-07-13T04:18:20+00:00
macosx: Add init method to media source to initialise from a local folder MRL

Signed-off-by: Claudio Cambra 

- - - - -
9bad077a by Claudio Cambra at 2024-07-13T04:18:20+00:00
macosx: Add method to base media source data source to present a given local 
folder mrl

Signed-off-by: Claudio Cambra 

- - - - -
4e4d185f by Claudio Cambra at 2024-07-13T04:18:20+00:00
macosx: Add method to media source view controller to present a local folder 
via mrl

Signed-off-by: Claudio Cambra 

- - - - -
39a9ea1f by Claudio Cambra at 2024-07-13T04:18:20+00:00
macosx: Add go to local folder mrl method in library window

Signed-off-by: Claudio Cambra 

- - - - -
a97dbcc5 by Claudio Cambra at 2024-07-13T04:18:20+00:00
macosx: Correctly handle VLCLibraryBrowseBookmarkedLocationSubSegment in 
VLCLibraryWindow

Signed-off-by: Claudio Cambra 

- - - - -
88172f17 by Claudio Cambra at 2024-07-13T04:18:20+00:00
macosx: Properly handle VLCLibrarySegments with bookmarked locations as their 
represented objects in the nav sidebar view controller

Signed-off-by: Claudio Cambra 

- - - - -
da4b2287 by Claudio Cambra at 2024-07-13T04:18:20+00:00
macosx: Make sure to expand browse sidebar segment if a bookmark segment is 
selected

Signed-off-by: Claudio Cambra 

- - - - -
28109b07 by Claudio Cambra at 2024-07-13T04:18:20+00:00
macosx: Add method to get index of root segments in nav sidebar view controller

Signed-off-by: Claudio Cambra 

- - - - -
3898eb2d by Claudio Cambra at 2024-07-13T04:18:20+00:00
macosx: Find relevant segment type that needs to be expanded rather than 
assuming it will be at the same view index as its enum value

Signed-off-by: Claudio Cambra 

- - - - -
d3a33616 by Claudio Cambra at 2024-07-13T04:18:20+00:00
macosx: Adapt node index fetcher to get node object directly and do BFS of 
available nodes

Signed-off-by: Claudio Cambra 

- - - - -
fd51651f by Claudio Cambra at 2024-07-13T04:18:20+00:00
macosx: Don't append nodes to search if we already found a match

Signed-off-by: Claudio Cambra 

- - - - -
dede67da by Claudio Cambra at 2024-07-13T04:18:20+00:00
macosx: Swap nil checks for node search result for one nsassert

Since we should only search for nodes of segment types that exist, just assert 
if we couldn't find it


[vlc-commits] [Git][videolan/vlc][3.0.x] UPnP: remove SAT>IP channel list fallback

2024-07-08 Thread @fkuehne


Felix Paul Kühne pushed to branch 3.0.x at VideoLAN / VLC


Commits:
b54c0adc by Felix Paul Kühne at 2024-07-09T04:11:04+00:00
UPnP: remove SAT>IP channel list fallback

When introducing SAT>IP support, we added a fallback mechanism on
officially published channel lists in case the user neither specified
a custom list nor the used set-top box provided one.

With the end of the SAT>IP Alliance that was dissolved 3 years ago, the
fallback server is no longer available and there will be no replacement
so this feature was removed.

Fixes #28684

(cherry picked from commit 3df7b6e1187030591febd8e1bdd2712c0d6af132)

- - - - -


1 changed file:

- modules/services_discovery/upnp.cpp


Changes:

=
modules/services_discovery/upnp.cpp
=
@@ -73,14 +73,7 @@ const char* MEDIA_SERVER_DEVICE_TYPE = 
"urn:schemas-upnp-org:device:MediaServer:
 const char* CONTENT_DIRECTORY_SERVICE_TYPE = 
"urn:schemas-upnp-org:service:ContentDirectory:1";
 const char* SATIP_SERVER_DEVICE_TYPE = "urn:ses-com:device:SatIPServer:1";
 
-#define SATIP_CHANNEL_LIST N_("SAT>IP channel list")
 #define SATIP_CHANNEL_LIST_URL N_("Custom SAT>IP channel list URL")
-static const char *const ppsz_satip_channel_lists[] = {
-"auto", "ASTRA_19_2E", "ASTRA_28_2E", "ASTRA_23_5E", "MasterList", 
"ServerList", "CustomList"
-};
-static const char *const ppsz_readible_satip_channel_lists[] = {
-N_("Auto"), "Astra 19.2°E", "Astra 28.2°E", "Astra 23.5°E", N_("Master 
List"), N_("Server List"), N_("Custom List")
-};
 
 /*
  * VLC handle
@@ -128,9 +121,7 @@ vlc_module_begin()
 set_capability( "services_discovery", 0 );
 set_callbacks( SD::Open, SD::Close );
 
-add_string( "satip-channelist", "auto", SATIP_CHANNEL_LIST,
-SATIP_CHANNEL_LIST, false )
-change_string_list( ppsz_satip_channel_lists, 
ppsz_readible_satip_channel_lists )
+add_obsolete_string( "satip-channelist" ) /* since 3.0.22 */
 add_string( "satip-channellist-url", NULL, SATIP_CHANNEL_LIST_URL,
 SATIP_CHANNEL_LIST_URL, false )
 
@@ -606,114 +597,60 @@ MediaServerList::parseSatipServer( IXML_Element* 
p_device_element, const char *p
 {
 SD::MediaServerDesc* p_server = NULL;
 
-char *psz_satip_channellist = var_InheritString( m_sd, "satip-channelist");
-
-/* In Auto mode, default to MasterList list from satip.info */
-bool automode = false;
-if( !psz_satip_channellist || /* On lookup failure or empty string, use 
auto mode */
-strcmp(psz_satip_channellist, "auto") == 0 ||
-strcmp(psz_satip_channellist, "Auto") == 0 ) /* for backwards 
compatibility */
-{
-automode = true;
-if( psz_satip_channellist )
-free(psz_satip_channellist);
-psz_satip_channellist = strdup( "MasterList" );
-if( unlikely( !psz_satip_channellist ) )
-return;
-}
-
 vlc_url_t url;
 vlc_UrlParse( &url, psz_base_url );
 
 /* Part 1: a user may have provided a custom playlist url */
-if (strcmp(psz_satip_channellist, "CustomList") == 0) {
-char *psz_satip_playlist_url = var_InheritString( m_sd, 
"satip-channellist-url" );
-if ( psz_satip_playlist_url ) {
-p_server = new(std::nothrow) SD::MediaServerDesc( psz_udn, 
psz_friendly_name, psz_satip_playlist_url, iconUrl );
-
-if( likely( p_server ) ) {
-p_server->satIpHost = url.psz_host;
-p_server->isSatIp = true;
-if( !addServer( p_server ) ) {
-delete p_server;
-}
-}
+char *psz_satip_playlist_url = var_InheritString( m_sd, 
"satip-channellist-url" );
+if ( psz_satip_playlist_url ) {
+p_server = new(std::nothrow) SD::MediaServerDesc( psz_udn, 
psz_friendly_name, psz_satip_playlist_url, iconUrl );
 
-/* to comply with the SAT>IP specification, we don't fall back on 
another channel list if this path failed */
-free( psz_satip_channellist );
-free( psz_satip_playlist_url );
-vlc_UrlClean( &url );
-return;
+if ( likely( p_server ) ) {
+p_server->satIpHost = url.psz_host;
+p_server->isSatIp = true;
+if( !addServer( p_server ) ) {
+delete p_server;
+}
 }
+
+/* to comply with the SAT>IP specification, we don't fall back on 
another channel list if this path failed */
+free( psz_satip_playlist_url );
+vlc_UrlClean( &url );
+return;
 }
 
 /* Part 2: device playlist
  * In Automatic mode, or if requested by the user, check for a SAT>IP m3u 
list on the device */
-if (automode || strcmp(psz_satip_channellist, "ServerList") == 0) {
-const char* psz_m3u_url = xml_getChildElementValue( p_device_element, 
"satip:X_SATIPM3U" );
-if ( psz_m3u_url ) {
-if ( strncmp( "http", psz_m3u_url, 4) )
-

[vlc-commits] [Git][videolan/vlc][master] UPnP: remove SAT>IP channel list fallback

2024-07-07 Thread @fkuehne


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


Commits:
3df7b6e1 by Felix Paul Kühne at 2024-07-07T14:16:16+00:00
UPnP: remove SAT>IP channel list fallback

When introducing SAT>IP support, we added a fallback mechanism on
officially published channel lists in case the user neither specified
a custom list nor the used set-top box provided one.

With the end of the SAT>IP Alliance that was dissolved 3 years ago, the
fallback server is no longer available and there will be no replacement
so this feature was removed.

Fixes #28684

- - - - -


1 changed file:

- modules/services_discovery/upnp.cpp


Changes:

=
modules/services_discovery/upnp.cpp
=
@@ -56,7 +56,6 @@ const char* CONTENT_DIRECTORY_SERVICE_TYPE = 
"urn:schemas-upnp-org:service:Conte
 const char* SATIP_SERVER_DEVICE_TYPE = "urn:ses-com:device:SatIPServer:1";
 
 #define UPNP_SEARCH_TIMEOUT_SECONDS 15
-#define SATIP_CHANNEL_LIST N_("SAT>IP channel list")
 #define SATIP_CHANNEL_LIST_URL N_("Custom SAT>IP channel list URL")
 
 #define HTTP_PORT 7070
@@ -75,13 +74,6 @@ const char* SATIP_SERVER_DEVICE_TYPE = 
"urn:ses-com:device:SatIPServer:1";
 #define URL_TEXT N_("description URL")
 #define URL_LONGTEXT N_("The Url used to get the xml descriptor of the UPnP 
Renderer")
 
-static const char *const ppsz_satip_channel_lists[] = {
-"auto", "ASTRA_19_2E", "ASTRA_28_2E", "ASTRA_23_5E", "MasterList", 
"ServerList", "CustomList"
-};
-static const char *const ppsz_readible_satip_channel_lists[] = {
-N_("Auto"), "Astra 19.2°E", "Astra 28.2°E", "Astra 23.5°E", N_("SAT>IP 
Main List"), N_("Device List"), N_("Custom List")
-};
-
 namespace {
 
 /*
@@ -143,9 +135,7 @@ vlc_module_begin()
 set_capability( "services_discovery", 0 )
 set_callbacks( SD::OpenSD, SD::CloseSD )
 
-add_string( "satip-channelist", "auto", SATIP_CHANNEL_LIST,
-nullptr )
-change_string_list( ppsz_satip_channel_lists, 
ppsz_readible_satip_channel_lists )
+add_obsolete_string( "satip-channelist" ) /* since 3.0.22 */
 add_string( "satip-channellist-url", NULL, SATIP_CHANNEL_LIST_URL,
 nullptr )
 
@@ -662,114 +652,60 @@ MediaServerList::parseSatipServer( IXML_Element* 
p_device_element, const char *p
 {
 SD::MediaServerDesc* p_server = NULL;
 
-char *psz_satip_channellist = var_InheritString( m_sd, "satip-channelist");
-
-/* In Auto mode, default to MasterList list from satip.info */
-bool automode = false;
-if( !psz_satip_channellist || /* On lookup failure or empty string, use 
auto mode */
-strcmp(psz_satip_channellist, "auto") == 0 ||
-strcmp(psz_satip_channellist, "Auto") == 0 ) /* for backwards 
compatibility */
-{
-automode = true;
-if( psz_satip_channellist )
-free(psz_satip_channellist);
-psz_satip_channellist = strdup( "MasterList" );
-if( unlikely( !psz_satip_channellist ) )
-return;
-}
-
 vlc_url_t url;
 vlc_UrlParse( &url, psz_base_url );
 
 /* Part 1: a user may have provided a custom playlist url */
-if (strcmp(psz_satip_channellist, "CustomList") == 0) {
-char *psz_satip_playlist_url = var_InheritString( m_sd, 
"satip-channellist-url" );
-if ( psz_satip_playlist_url ) {
-p_server = new(std::nothrow) SD::MediaServerDesc( psz_udn, 
psz_friendly_name, psz_satip_playlist_url, iconUrl );
-
-if( likely( p_server ) ) {
-p_server->satIpHost = url.psz_host;
-p_server->isSatIp = true;
-if( !addServer( p_server ) ) {
-delete p_server;
-}
-}
+char *psz_satip_playlist_url = var_InheritString( m_sd, 
"satip-channellist-url" );
+if ( psz_satip_playlist_url ) {
+p_server = new(std::nothrow) SD::MediaServerDesc( psz_udn, 
psz_friendly_name, psz_satip_playlist_url, iconUrl );
 
-/* to comply with the SAT>IP specification, we don't fall back on 
another channel list if this path failed */
-free( psz_satip_channellist );
-free( psz_satip_playlist_url );
-vlc_UrlClean( &url );
-return;
+if ( likely( p_server ) ) {
+p_server->satIpHost = url.psz_host;
+p_server->isSatIp = true;
+if( !addServer( p_server ) ) {
+delete p_server;
+}
 }
+
+/* to comply with the SAT>IP specification, we don't fall back on 
another channel list if this path failed */
+free( psz_satip_playlist_url );
+vlc_UrlClean( &url );
+return;
 }
 
 /* Part 2: device playlist
  * In Automatic mode, or if requested by the user, check for a SAT>IP m3u 
list on the device */
-if (automode || strcmp(psz_satip_channellist, "ServerList") == 0) {
-const char* psz_m3u_url = xml_getChildElementValue( p_device_element, 
"satip:X_SATIPM

[vlc-commits] [Git][videolan/vlc][master] 2 commits: qt: provide more information when a window effects module is not instantiated

2024-07-01 Thread @fkuehne


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


Commits:
d0b4e96f by Fatih Uzunoglu at 2024-07-01T13:58:36+00:00
qt: provide more information when a window effects module is not instantiated

A window effects module is not instantiated does not necessarily mean that
there won't be background blur effect. On Windows with DirectComposition,
the effect is simulated in that case.

- - - - -
4b0dbf82 by Fatih Uzunoglu at 2024-07-01T13:58:36+00:00
qt: use `msg_Dbg` instead of `msg_Info` in `CompositorVideo::setBlurBehind()`

- - - - -


1 changed file:

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


Changes:

=
modules/gui/qt/maininterface/compositor.cpp
=
@@ -341,7 +341,9 @@ bool CompositorVideo::setBlurBehind(QWindow *window, const 
bool enable)
 m_windowEffectsModule->p_module = module_need(m_windowEffectsModule, 
"qtwindoweffects", nullptr, false);
 if (!m_windowEffectsModule->p_module)
 {
-msg_Info(m_intf, "A module providing window effects capability 
could not be instantiated. Background blur effect will not be available.");
+msg_Dbg(m_intf, "A module providing window effects capability 
could not be instantiated. " \
+"Native background blur effect will not be 
available. " \
+"The application may compensate this with a 
simulated effect on certain platform(s).");
 m_failedToLoadWindowEffectsModule = true;
 vlc_object_delete(m_windowEffectsModule);
 m_windowEffectsModule = nullptr;



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/7a7946821262aa5ccfc5ed0711a090888378a540...4b0dbf829d9761bc0d99e64b98c9c245983aeffd

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/7a7946821262aa5ccfc5ed0711a090888378a540...4b0dbf829d9761bc0d99e64b98c9c245983aeffd
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] 2 commits: qt: introduce platform compositor

2024-07-01 Thread @fkuehne


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


Commits:
2e82fbfe by Fatih Uzunoglu at 2024-07-01T13:42:56+00:00
qt: introduce platform compositor

If Qt QPA supports child window transparency,
make use of that.

- - - - -
7a794682 by Alexandre Janniaux at 2024-07-01T13:42:56+00:00
qt: compositor_platform: add darwin support

The integration works for video modules not requiring the main thread to
start displaying video.

- - - - -


7 changed files:

- modules/gui/qt/Makefile.am
- modules/gui/qt/maininterface/compositor.cpp
- modules/gui/qt/maininterface/compositor.hpp
- + modules/gui/qt/maininterface/compositor_platform.cpp
- + modules/gui/qt/maininterface/compositor_platform.hpp
- modules/gui/qt/meson.build
- modules/gui/qt/qt.cpp


Changes:

=
modules/gui/qt/Makefile.am
=
@@ -156,6 +156,8 @@ libqt_plugin_la_SOURCES = \
maininterface/compositor_accessibility.hpp \
maininterface/compositor_dummy.hpp \
maininterface/compositor_dummy.cpp \
+   maininterface/compositor_platform.hpp \
+   maininterface/compositor_platform.cpp \
maininterface/interface_window_handler.cpp \
maininterface/interface_window_handler.hpp \
maininterface/mainctx.cpp \
@@ -396,6 +398,7 @@ nodist_libqt_plugin_la_SOURCES = \
maininterface/compositor.moc.cpp \
maininterface/compositor_common.moc.cpp \
maininterface/compositor_dummy.moc.cpp \
+   maininterface/compositor_platform.moc.cpp \
maininterface/interface_window_handler.moc.cpp \
maininterface/mainctx.moc.cpp \
maininterface/mainctx_submodels.moc.cpp \


=
modules/gui/qt/maininterface/compositor.cpp
=
@@ -42,6 +42,8 @@
 
 #include "maininterface/windoweffects_module.hpp"
 
+#include "compositor_platform.hpp"
+
 #include 
 #include 
 
@@ -57,10 +59,13 @@ struct {
 const char* name;
 Compositor* (*instantiate)(qt_intf_t *p_intf);
 } static compositorList[] = {
-#ifdef _WIN32
-#ifdef HAVE_DCOMP_H
+#if defined(_WIN32) && defined(HAVE_DCOMP_H)
 {"dcomp", &instanciateCompositor },
 #endif
+#if defined(_WIN32) || defined(__APPLE__)
+{"platform", &instanciateCompositor },
+#endif
+#if defined(_WIN32)
 {"win7", &instanciateCompositor },
 #endif
 #ifdef QT_HAS_WAYLAND_COMPOSITOR


=
modules/gui/qt/maininterface/compositor.hpp
=
@@ -60,7 +60,8 @@ public:
 Win7Compositor,
 DirectCompositionCompositor,
 X11Compositor,
-WaylandCompositor
+WaylandCompositor,
+PlatformCompositor
 };
 
 typedef void (*VoutDestroyCb)(vlc_window_t *p_wnd);


=
modules/gui/qt/maininterface/compositor_platform.cpp
=
@@ -0,0 +1,171 @@
+/*
+ * Copyright (C) 2024 VLC authors and VideoLAN
+ *
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, 
USA.
+ */
+#include "compositor_platform.hpp"
+
+#include 
+#include 
+#include 
+
+#include 
+
+#ifdef __APPLE__
+#include 
+#endif
+
+using namespace vlc;
+
+
+CompositorPlatform::CompositorPlatform(qt_intf_t *p_intf, QObject *parent)
+: CompositorVideo(p_intf, parent)
+{
+
+}
+
+bool CompositorPlatform::init()
+{
+// TODO: For now only qwindows and qdirect2d
+//   running on Windows 8+, and cocoa
+//   platforms are supported.
+
+const QString& platformName = qApp->platformName();
+
+#ifdef _WIN32
+if (QOperatingSystemVersion::current() >= 
QOperatingSystemVersion::Windows8)
+{
+if (platformName == QLatin1String("windows") || platformName == 
QLatin1String("direct2d"))
+return true;
+}
+#endif
+
+#ifdef __APPLE__
+if (platformName == QLatin1String("cocoa"))
+return true;
+#endif
+
+return false;
+}
+
+bool CompositorPlatform::makeMainInterface(MainCtx *mainCtx)
+{
+m_mainCtx = mainCtx;
+
+m_rootWindow = std::make_unique();
+
+m_videoWindow = new QWindow(m_rootWindow.get());
+
+m_quickWindow = new QQui

[vlc-commits] [Git][videolan/vlc][master] 3 commits: qt: add url manipulation functions in MainCtx

2024-07-01 Thread @fkuehne


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


Commits:
41482cbe by Prince Gupta at 2024-07-01T12:49:28+00:00
qt: add url manipulation functions in MainCtx

- - - - -
2ced1495 by Prince Gupta at 2024-07-01T12:49:28+00:00
qt: add link based color in palette

- - - - -
e5d8a48c by Prince Gupta at 2024-07-01T12:49:28+00:00
qml: add option to open location of media in Video expand panel

- - - - -


4 changed files:

- modules/gui/qt/maininterface/mainctx.cpp
- modules/gui/qt/maininterface/mainctx.hpp
- modules/gui/qt/medialibrary/qml/VideoInfoExpandPanel.qml
- modules/gui/qt/style/systempalette.cpp


Changes:

=
modules/gui/qt/maininterface/mainctx.cpp
=
@@ -30,6 +30,7 @@
 
 #include "mainctx.hpp"
 #include "mainctx_submodels.hpp"
+#include "medialibrary/mlhelper.hpp"
 
 #include "compositor.hpp"
 #include "util/renderer_manager.hpp"
@@ -51,7 +52,6 @@
 
 #include "dialogs/toolbar/controlbar_profile_model.hpp"
 
-
 #include 
 
 #include 
@@ -533,6 +533,27 @@ WorkerThreadSet* MainCtx::workersThreads() const
 return m_workersThreads.get();
 }
 
+QUrl MainCtx::folderMRL(const QString &fileMRL) const
+{
+return folderMRL(QUrl::fromUserInput(fileMRL));
+}
+
+QUrl MainCtx::folderMRL(const QUrl &fileMRL) const
+{
+if (fileMRL.isLocalFile())
+{
+const QString f = fileMRL.toLocalFile();
+return QUrl::fromLocalFile(QFileInfo(f).absoluteDir().absolutePath());
+}
+
+return {};
+}
+
+QString MainCtx::displayMRL(const QUrl &mrl) const
+{
+return urlToDisplayString(mrl);
+}
+
 void MainCtx::setMediaLibraryVisible( bool visible )
 {
 if (m_mediaLibraryVisible == visible)


=
modules/gui/qt/maininterface/mainctx.hpp
=
@@ -280,6 +280,11 @@ public:
 
 WorkerThreadSet *workersThreads() const;
 
+Q_INVOKABLE QUrl folderMRL(const QString &fileMRL) const;
+Q_INVOKABLE QUrl folderMRL(const QUrl &fileMRL) const;
+
+Q_INVOKABLE QString displayMRL(const QUrl &mrl) const;
+
 protected:
 /* Systray */
 void createSystray();


=
modules/gui/qt/medialibrary/qml/VideoInfoExpandPanel.qml
=
@@ -204,12 +204,29 @@ FocusScope {
 }
 
 Widgets.MenuCaption {
-text: "" + qsTr("Path:") + " " + 
root.model.display_mrl
+
+readonly property string folderMRL: 
MainCtx.folderMRL(root.model?.mrl ?? "")
+
+text: {
+if (!!folderMRL)
+return "%1 %3"
+.arg(qsTr("Folder:"))
+.arg(folderMRL)
+.arg(MainCtx.displayMRL(folderMRL))
+
+return "" + qsTr("Path:") + " " + 
root.model.display_mrl
+}
+
+linkColor: theme.fg.link
 color: theme.fg.secondary
 topPadding: VLCStyle.margin_xsmall
 bottomPadding: VLCStyle.margin_large
 width: parent.width
 textFormat: Text.StyledText
+
+onLinkActivated: function (link) {
+Qt.openUrlExternally(link)
+}
 }
 
 Widgets.ButtonExt {


=
modules/gui/qt/style/systempalette.cpp
=
@@ -476,6 +476,7 @@ void SystemPalette::makeLightPalette()
 setColor(CS, C::Decoration, C::Shadow, C::Normal, 
setColorAlpha(Qt::black, 0.22));
 
 setColor(CS, C::Decoration, C::Accent, C::Normal, orange800);
+setColor(CS, C::Fg, C::Link, C::Normal, orange800 /* accent */);
 }
 
 //window banner & miniplayer
@@ -673,6 +674,7 @@ void SystemPalette::makeDarkPalette()
 setColor(CS, C::Decoration, C::Separator, C::Normal, darkGrey800);
 
 setColor(CS, C::Decoration, C::Accent, C::Normal, orange500);
+setColor(CS, C::Fg, C::Link, C::Normal, orange500);
 }
 
 //window banner & miniplayer



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/1a26d96f75b9308c3eb67a002cc08ac4fd6db0b9...e5d8a48c66d4a422dfb7713555275409830d2a1e

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/1a26d96f75b9308c3eb67a002cc08ac4fd6db0b9...e5d8a48c66d4a422dfb7713555275409830d2a1e
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] qt: prevent potential double COM library uninitialize in mainctx_win32

2024-07-01 Thread @fkuehne


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


Commits:
1a26d96f by Fatih Uzunoglu at 2024-07-01T12:20:32+00:00
qt: prevent potential double COM library uninitialize in mainctx_win32

- - - - -


2 changed files:

- modules/gui/qt/maininterface/mainctx_win32.cpp
- modules/gui/qt/maininterface/mainctx_win32.hpp


Changes:

=
modules/gui/qt/maininterface/mainctx_win32.cpp
=
@@ -556,7 +556,6 @@ WinTaskbarWidget::~WinTaskbarWidget()
 ImageList_Destroy( himl );
 if(p_taskbl)
 p_taskbl->Release();
-CoUninitialize();
 }
 
 Q_GUI_EXPORT HBITMAP qt_pixmapToWinHBITMAP(const QPixmap &p, int hbitmapFormat 
= 0);
@@ -580,16 +579,22 @@ void WinTaskbarWidget::createTaskBarButtons()
 if (!winId)
 return;
 
-HRESULT hr = CoInitializeEx( NULL, COINIT_APARTMENTTHREADED | 
COINIT_DISABLE_OLE1DDE );
-if( FAILED(hr) )
+try
+{
+m_comHolder = ComHolder();
+}
+catch( const std::exception& exception )
+{
+msg_Err( p_intf, "%s", exception.what() );
 return;
+}
 
 void *pv;
-hr = CoCreateInstance( CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER,
-   IID_ITaskbarList3, &pv);
+HRESULT hr = CoCreateInstance( CLSID_TaskbarList, NULL, 
CLSCTX_INPROC_SERVER,
+   IID_ITaskbarList3, &pv);
 if( FAILED(hr) )
 {
-CoUninitialize();
+m_comHolder.reset();
 return;
 }
 
@@ -604,7 +609,7 @@ void WinTaskbarWidget::createTaskBarButtons()
 {
 p_taskbl->Release();
 p_taskbl = NULL;
-CoUninitialize();
+m_comHolder.reset();
 return;
 }
 


=
modules/gui/qt/maininterface/mainctx_win32.hpp
=
@@ -28,6 +28,8 @@
 #include "interface_window_handler.hpp"
 #include 
 
+#include 
+
 class WinTaskbarWidget : public QObject, public QAbstractNativeEventFilter
 {
 Q_OBJECT
@@ -51,6 +53,22 @@ private:
 UINT taskbar_wmsg = 0;
 QWindow* m_window = nullptr;
 
+class ComHolder
+{
+public:
+ComHolder()
+{
+if (Q_UNLIKELY(FAILED(CoInitializeEx(NULL, 
COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE
+throw std::runtime_error("CoInitializeEx failed");
+}
+
+~ComHolder()
+{
+CoUninitialize();
+}
+};
+
+std::optional m_comHolder;
 };
 
 



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

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/1a26d96f75b9308c3eb67a002cc08ac4fd6db0b9
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] macosx: Reset collectionview's VLCLibraryCollectionViewFlowLayout when...

2024-07-01 Thread @fkuehne


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


Commits:
b48c3681 by Claudio Cambra at 2024-07-01T10:41:43+00:00
macosx: Reset collectionview's VLCLibraryCollectionViewFlowLayout when 
reloading data in VLCLibraryAudioGroupDataSource

Signed-off-by: Claudio Cambra 

- - - - -


1 changed file:

- modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupDataSource.m


Changes:

=
modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupDataSource.m
=
@@ -128,6 +128,10 @@
 {
 NSArray * const collectionViews = self.collectionViews;
 for (NSCollectionView * const collectionView in collectionViews) {
+NSCollectionViewLayout * const collectionViewLayout = 
collectionView.collectionViewLayout;
+if ([collectionViewLayout 
isKindOfClass:VLCLibraryCollectionViewFlowLayout.class]) {
+[(VLCLibraryCollectionViewFlowLayout *)collectionViewLayout 
resetLayout];
+}
 [collectionView reloadData];
 }
 }



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

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/b48c3681bf423e87843fc9c3a1b9360472203773
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] 6 commits: macosx: Add openContextMenu method to carousel view item view

2024-07-01 Thread @fkuehne


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


Commits:
f23a12e0 by Claudio Cambra at 2024-07-01T09:56:41+00:00
macosx: Add openContextMenu method to carousel view item view

Signed-off-by: Claudio Cambra 

- - - - -
cbd2b9c3 by Claudio Cambra at 2024-07-01T09:56:41+00:00
macosx: React to control clicks by trying to open clicked-on item's context 
menu in iCarousel

Signed-off-by: Claudio Cambra 

- - - - -
440f91e6 by Claudio Cambra at 2024-07-01T09:56:41+00:00
macosx: Implement right-click context menu for carousel items in iCarousel

Signed-off-by: Claudio Cambra 

- - - - -
6e287574 by Claudio Cambra at 2024-07-01T09:56:41+00:00
macosx: Add iCarouselItemView protocol

Signed-off-by: Claudio Cambra 

- - - - -
e986c667 by Claudio Cambra at 2024-07-01T09:56:41+00:00
macosx: Use iCarouselItemView protocol in VLCLibraryCarouselViewItemView

Signed-off-by: Claudio Cambra 

- - - - -
c5c00e56 by Claudio Cambra at 2024-07-01T09:56:41+00:00
macosx: Use iCarouselItemView protocol for context menu purposes in iCarousel

Signed-off-by: Claudio Cambra 

- - - - -


4 changed files:

- modules/gui/macosx/library/VLCLibraryCarouselViewItemView.h
- modules/gui/macosx/library/VLCLibraryCarouselViewItemView.m
- modules/gui/macosx/views/iCarousel/iCarousel.h
- modules/gui/macosx/views/iCarousel/iCarousel.m


Changes:

=
modules/gui/macosx/library/VLCLibraryCarouselViewItemView.h
=
@@ -22,13 +22,15 @@
 
 #import 
 
+#import "views/iCarousel/iCarousel.h"
+
 NS_ASSUME_NONNULL_BEGIN
 
 @class VLCImageView;
 @class VLCLinearProgressIndicator;
 @class VLCLibraryRepresentedItem;
 
-@interface VLCLibraryCarouselViewItemView : NSView
+@interface VLCLibraryCarouselViewItemView : NSView
 
 @property (readwrite, weak) IBOutlet VLCImageView *imageView;
 @property (readwrite, weak) IBOutlet NSTextField *annotationTextField;


=
modules/gui/macosx/library/VLCLibraryCarouselViewItemView.m
=
@@ -30,6 +30,7 @@
 #import "library/VLCLibraryController.h"
 #import "library/VLCLibraryDataTypes.h"
 #import "library/VLCLibraryImageCache.h"
+#import "library/VLCLibraryMenuController.h"
 #import "library/VLCLibraryRepresentedItem.h"
 
 #import "main/VLCMain.h"
@@ -37,6 +38,12 @@
 #import "views/VLCImageView.h"
 #import "views/VLCLinearProgressIndicator.h"
 
+@interface VLCLibraryCarouselViewItemView ()
+
+@property (readonly) VLCLibraryMenuController *menuController;
+
+@end
+
 @implementation VLCLibraryCarouselViewItemView
 
 + (instancetype)fromNibWithOwner:(id)owner
@@ -166,4 +173,14 @@
 [self.representedItem play];
 }
 
+- (void)openContextMenu:(NSEvent *)event
+{
+if (self.menuController == nil) {
+_menuController = [[VLCLibraryMenuController alloc] init];
+}
+
+self.menuController.representedItems = @[self.representedItem];
+[self.menuController popupMenuWithEvent:event forView:self];
+}
+
 @end


=
modules/gui/macosx/views/iCarousel/iCarousel.h
=
@@ -199,6 +199,13 @@ NS_ASSUME_NONNULL_BEGIN
 
 @end
 
+@protocol iCarouselItemView 
+
+@optional
+- (void)openContextMenu:(NSEvent *)event;
+
+@end
+
 NS_ASSUME_NONNULL_END
 
 #pragma clang diagnostic pop


=
modules/gui/macosx/views/iCarousel/iCarousel.m
=
@@ -2271,14 +2271,23 @@ NSComparisonResult compareViewDepth(UIView *view1, 
UIView *view2, iCarousel *sel
 if (!_didDrag)
 {
 //convert position to view
-CGPoint position = [theEvent locationInWindow];
-position = [self convertPoint:position 
fromView:self.window.contentView];
+const CGPoint position = [self convertPoint:theEvent.locationInWindow
+   fromView:self.window.contentView];
 
 //check for tapped view
-UIView *itemView = [self itemViewAtPoint:position];
-NSInteger index = itemView? [self indexOfItemView: itemView]: 
NSNotFound;
-if (index != NSNotFound)
-{
+UIView * const itemView = [self itemViewAtPoint:position];
+
+if (theEvent.modifierFlags & NSEventModifierFlagControl) {
+UIView * const carouselItemView =
+(UIView *)itemView;
+if ([carouselItemView 
respondsToSelector:@selector(openContextMenu:)]) {
+[carouselItemView openContextMenu:theEvent];
+}
+return;
+}
+
+const NSInteger index = itemView ? [self indexOfItemView: itemView] : 
NSNotFound;
+if (index != NSNotFound) {
 if (_centerItemWhenSelected && index != self.currentItemIndex)
 {
 [self scrollToItemAt

[vlc-commits] [Git][videolan/vlc][3.0.x] sftp: fix seek for large files on 32-bit OS

2024-07-01 Thread @fkuehne


Felix Paul Kühne pushed to branch 3.0.x at VideoLAN / VLC


Commits:
29ac3349 by Aleksey Vasenev at 2024-07-01T09:42:46+00:00
sftp: fix seek for large files on 32-bit OS

(cherry picked from commit 4698e0336447de8dc6f7214743082cc55b6ebd77)

- - - - -


1 changed file:

- modules/access/sftp.c


Changes:

=
modules/access/sftp.c
=
@@ -547,7 +547,7 @@ static int Seek( stream_t* p_access, uint64_t i_pos )
 {
 access_sys_t *sys = p_access->p_sys;
 
-libssh2_sftp_seek( sys->file, i_pos );
+libssh2_sftp_seek64( sys->file, i_pos );
 return VLC_SUCCESS;
 }
 



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

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/29ac334929847727e4041ba8d1aa3cb36c6be299
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] macosx: Add context menu to library hero view

2024-07-01 Thread @fkuehne


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


Commits:
644dd7f6 by Claudio Cambra at 2024-07-01T09:41:19+00:00
macosx: Add context menu to library hero view

Signed-off-by: Claudio Cambra 

- - - - -


1 changed file:

- modules/gui/macosx/library/VLCLibraryHeroView.m


Changes:

=
modules/gui/macosx/library/VLCLibraryHeroView.m
=
@@ -28,6 +28,7 @@
 #import "library/VLCLibraryController.h"
 #import "library/VLCLibraryDataTypes.h"
 #import "library/VLCLibraryImageCache.h"
+#import "library/VLCLibraryMenuController.h"
 #import "library/VLCLibraryModel.h"
 #import "library/VLCLibraryRepresentedItem.h"
 
@@ -35,6 +36,12 @@
 
 #import "views/VLCImageView.h"
 
+@interface VLCLibraryHeroView ()
+
+@property (readonly) VLCLibraryMenuController *menuController;
+
+@end
+
 @implementation VLCLibraryHeroView
 
 + (instancetype)fromNibWithOwner:(id)owner
@@ -207,4 +214,29 @@
 [self setOptimalRepresentedItem];
 }
 
+- (void)openContextMenu:(NSEvent *)event
+{
+if (self.menuController == nil) {
+_menuController = [[VLCLibraryMenuController alloc] init];
+}
+
+self.menuController.representedItems = @[self.representedItem];
+[self.menuController popupMenuWithEvent:event forView:self];
+}
+
+- (void)mouseDown:(NSEvent *)event
+{
+if (event.modifierFlags & NSEventModifierFlagControl) {
+[self openContextMenu:event];
+}
+
+[super mouseDown:event];
+}
+
+- (void)rightMouseDown:(NSEvent *)event
+{
+[self openContextMenu:event];
+[super rightMouseDown:event];
+}
+
 @end



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

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/644dd7f62cedabcfceb4bce1d5cc1ade350d838c
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] CI: rework Darwin jobs

2024-06-29 Thread @fkuehne


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


Commits:
482c5b4a by Felix Paul Kühne at 2024-06-30T04:49:20+00:00
CI: rework Darwin jobs

This updates the ARM64 job for macOS to use the latest SDK (14). The
existing x86_64 job is kept unchanged.

The tvOS job is updated to use tvOS 17.

The iOS ARM64 and x86_64 simulator jobs are updated to iOS 17.

The current iOS 15 armv7 job is kept.

All that is possible by adding a new runner with Xcode 15.4 on macOS
14.5 with a M1 architecture.

- - - - -


1 changed file:

- extras/ci/gitlab-ci.yml


Changes:

=
extras/ci/gitlab-ci.yml
=
@@ -503,8 +503,6 @@ raspbian-arm:
 extends:
 - .base-template
 - .ccache-common-apple
-tags:
-- monterey
 script: |
 if [ "${CI_JOB_NAME:0:8}" = "nightly-" ]; then
 NIGHTLY_EXTRA_BUILD_FLAGS="-i n"
@@ -527,10 +525,14 @@ raspbian-arm:
 
 macos-x86_64:
 extends: .macos-common
+tags:
+- monterey
 variables: *variables-macos-x86_64
 
 macos-arm64:
 extends: .macos-common
+tags:
+- macos-xcode15
 variables: *variables-macos-arm64
 
 .nightly-macos-common:
@@ -559,8 +561,6 @@ nightly-macos-arm64:
 #
 .apple-os-common:
 extends: .base-template
-tags:
-- monterey
 script: |
 export PATH="${VLC_PATH}:$PATH"
 mkdir build && cd build
@@ -574,18 +574,26 @@ nightly-macos-arm64:
 
 ios-arm64:
 extends: .apple-os-common
+tags:
+- macos-xcode15
 variables: *variables-ios-arm64
 
 ios-armv7:
 extends: .apple-os-common
+tags:
+- monterey
 variables: *variables-ios-armv7
 
 ios-simulator-x86_64:
 extends: .apple-os-common
+tags:
+- macos-xcode15
 variables: *variables-ios-simulator-x86_64
 
 tvos-arm64:
 extends: .apple-os-common
+tags:
+- macos-xcode15
 variables: *variables-tvos-arm64
 
 watchos-arm64_32:



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

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/482c5b4a3e972f5c0f4779ad44caacddca1d01e3
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] qt: support CSD shadows in compositor_wayland

2024-06-23 Thread @fkuehne


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


Commits:
062d5ba1 by Fatih Uzunoglu at 2024-06-23T15:31:45+00:00
qt: support CSD shadows in compositor_wayland

- - - - -


2 changed files:

- modules/gui/qt/maininterface/compositor_wayland.cpp
- modules/gui/qt/maininterface/compositor_wayland.hpp


Changes:

=
modules/gui/qt/maininterface/compositor_wayland.cpp
=
@@ -27,6 +27,10 @@
 #include 
 #include 
 
+#ifdef QT_WAYLAND_HAS_CUSTOM_MARGIN_SUPPORT
+#include 
+#endif
+
 #include 
 #include 
 
@@ -113,8 +117,25 @@ bool CompositorWayland::makeMainInterface(MainCtx* mainCtx)
 
 m_waylandImpl->setupInterface(m_waylandImpl, interfaceSurface, 
dprForWindow(m_qmlView.get()));
 
-const bool ret = commonGUICreate(m_qmlView.get(), m_qmlView.get(),
- CompositorVideo::CAN_SHOW_PIP | 
CompositorVideo::HAS_ACRYLIC);
+CompositorVideo::Flags flags = CompositorVideo::CAN_SHOW_PIP | 
CompositorVideo::HAS_ACRYLIC;
+
+#ifdef QT_WAYLAND_HAS_CUSTOM_MARGIN_SUPPORT
+connect(m_intf->p_mi, &MainCtx::windowExtendedMarginChanged, this, 
[this](const unsigned margin) {
+const auto quickViewPtr = m_qmlView.get();
+assert(quickViewPtr);
+connect(quickViewPtr, &QWindow::widthChanged, this, 
&CompositorWayland::adjustQuickWindowMask, Qt::UniqueConnection);
+connect(quickViewPtr, &QWindow::heightChanged, this, 
&CompositorWayland::adjustQuickWindowMask, Qt::UniqueConnection);
+
+const auto waylandWindow = 
dynamic_cast(quickViewPtr->handle());
+assert(waylandWindow);
+const QMargins margins(margin, margin, margin, margin);
+waylandWindow->setCustomMargins(margins);
+});
+
+flags |= CompositorVideo::HAS_EXTENDED_FRAME;
+#endif
+
+const bool ret = commonGUICreate(m_qmlView.get(), m_qmlView.get(), flags);
 
 if (ret)
 m_qmlView->show();
@@ -206,4 +227,17 @@ void CompositorWayland::onSurfaceSizeChanged(const QSizeF& 
size)
 size.height() / nativeDpr);
 }
 
+#ifdef QT_WAYLAND_HAS_CUSTOM_MARGIN_SUPPORT
+void CompositorWayland::adjustQuickWindowMask()
+{
+assert(m_intf);
+assert(m_intf->p_mi);
+unsigned maskMargin = 0;
+if (Q_LIKELY(static_cast(m_intf->p_mi->CSDBorderSize()) < 
m_intf->p_mi->windowExtendedMargin()))
+maskMargin = m_intf->p_mi->windowExtendedMargin() - 
m_intf->p_mi->CSDBorderSize();
+const QMargins maskMargins(maskMargin, maskMargin, maskMargin, maskMargin);
+m_qmlView->setMask(m_qmlView->geometry().marginsRemoved(maskMargins));
+}
+#endif
+
 }


=
modules/gui/qt/maininterface/compositor_wayland.hpp
=
@@ -25,6 +25,10 @@
 #include 
 #include "compositor.hpp"
 
+#if (QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)) && defined(QT_GUI_PRIVATE)
+#define QT_WAYLAND_HAS_CUSTOM_MARGIN_SUPPORT
+#endif
+
 class MainCtx;
 class QQuickView;
 class InterfaceWindowHandler;
@@ -77,7 +81,9 @@ public:
 protected slots:
 void onSurfacePositionChanged(const QPointF&) override;
 void onSurfaceSizeChanged(const QSizeF&) override;
-
+#ifdef QT_WAYLAND_HAS_CUSTOM_MARGIN_SUPPORT
+void adjustQuickWindowMask();
+#endif
 
 protected:
 std::unique_ptr m_qmlView;



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

-- 
This project does not include diff previews in email notifications.
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/062d5ba178179372d2a350c2fba5afa0fa081baf
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] qml: prevent unintentional background blending in player playqueue

2024-06-23 Thread @fkuehne


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


Commits:
46d9063b by Fatih Uzunoglu at 2024-06-23T12:18:42+00:00
qml: prevent unintentional background blending in player playqueue

- - - - -


2 changed files:

- modules/gui/qt/playlist/qml/PlaylistListView.qml
- modules/gui/qt/widgets/qml/FadingEdge.qml


Changes:

=
modules/gui/qt/playlist/qml/PlaylistListView.qml
=
@@ -263,8 +263,8 @@ T.Pane {
 value: false
 }
 
-fadingEdge.backgroundColor: root.background.usingAcrylic ? 
"transparent"
- : 
(root.background?.color ?? "transparent")
+fadingEdge.backgroundColor: (root.background && 
(root.background.color.a >= 1.0)) ? root.background.color
+   
  : "transparent"
 
 contentWidth: width
 


=
modules/gui/qt/widgets/qml/FadingEdge.qml
=
@@ -26,9 +26,9 @@ Item {
 // backgroundColor is only needed for sub-pixel
 // font rendering. Or, if the background color
 // needs to be known during rendering in general.
-// Ideally it should be fully opaque, but it is
-// still better than not providing any color
-// information.
+// Ideally it should be fully opaque, otherwise
+// the background here may blend with the actual
+// background.
 property alias backgroundColor: backgroundRect.color
 
 property alias sourceItem: shaderEffectSource.sourceItem



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

-- 
This project does not include diff previews in email notifications.
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/46d9063b2eefa792f4511bce2866894a7328dec6
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 subtitleDesc to mlvideo

2024-06-23 Thread @fkuehne


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


Commits:
1a2e3315 by Prince Gupta at 2024-06-23T11:47:06+00:00
qt: add subtitleDesc to mlvideo

- - - - -
4c349437 by Prince Gupta at 2024-06-23T11:47:06+00:00
qt: add subtitleDesc property to items of MLVideoModel

- - - - -
5068b5ab by Prince Gupta at 2024-06-23T11:47:06+00:00
qml: show subtitle tracks for media in video expand panel

- - - - -


5 changed files:

- modules/gui/qt/medialibrary/mlvideo.cpp
- modules/gui/qt/medialibrary/mlvideo.hpp
- modules/gui/qt/medialibrary/mlvideomodel.cpp
- modules/gui/qt/medialibrary/mlvideomodel.hpp
- modules/gui/qt/medialibrary/qml/VideoInfoExpandPanel.qml


Changes:

=
modules/gui/qt/medialibrary/mlvideo.cpp
=
@@ -119,6 +119,13 @@ MLVideo::MLVideo(const vlc_ml_media_t* data)
  QString::fromUtf8( track.psz_language ) ,
  track.v.i_fpsNum }
  );
+} else if ( track.i_type == VLC_ML_TRACK_TYPE_SUBTITLE )
+{
+m_subtitleDesc.emplaceBack( qfu(track.psz_codec)
+, qfu(track.psz_language)
+, qfu(track.psz_description)
+, qfu(track.s.psz_encoding)
+);
 }
 }
 
@@ -226,7 +233,41 @@ QList MLVideo::getVideoDesc() const
 return m_videoDesc;
 }
 
+QList MLVideo::getSubtitleDesc() const
+{
+return m_subtitleDesc;
+}
+
 QList MLVideo::getAudioDesc() const
 {
 return m_audioDesc;
 }
+
+SubtitleDescription::SubtitleDescription(const QString &codec, const QString 
&language
+ , const QString &description, const 
QString &encoding)
+: m_codec {codec}
+, m_language {language}
+, m_description {description}
+, m_encoding {encoding}
+{
+}
+
+QString SubtitleDescription::getCodec() const
+{
+return m_codec;
+}
+
+QString SubtitleDescription::getLanguage() const
+{
+return m_language;
+}
+
+QString SubtitleDescription::getDescription() const
+{
+return m_description;
+}
+
+QString SubtitleDescription::getEncoding() const
+{
+return m_encoding;
+}


=
modules/gui/qt/medialibrary/mlvideo.hpp
=
@@ -83,6 +83,32 @@ private:
 unsigned int m_sampleRate;
 };
 
+class SubtitleDescription
+{
+Q_GADGET
+
+Q_PROPERTY(QString codec READ getCodec CONSTANT FINAL)
+Q_PROPERTY(QString language READ getLanguage CONSTANT FINAL)
+Q_PROPERTY(QString description READ getDescription CONSTANT FINAL)
+Q_PROPERTY(QString encoding READ getEncoding CONSTANT FINAL)
+
+public:
+SubtitleDescription() = default;
+SubtitleDescription(const QString& codec, const QString& language
+ , const QString &description, const QString &encoding);
+
+QString getCodec() const;
+QString getLanguage() const;
+QString getDescription() const;
+QString getEncoding() const;
+
+private:
+QString m_codec;
+QString m_language;
+QString m_description;
+QString m_encoding;
+};
+
 class MLVideo : public MLItem
 {
 public:
@@ -106,6 +132,7 @@ public:
 VLCTick getProgressTime() const;
 QList getAudioDesc() const;
 QList getVideoDesc() const;
+QList getSubtitleDesc() const;
 
 private:
 bool m_isNew;
@@ -123,6 +150,7 @@ private:
 vlc_ml_thumbnail_status_t m_thumbnailStatus;
 QList m_audioDesc;
 QList m_videoDesc;
+QList m_subtitleDesc;
 };
 
 #endif // MLVIDEO_H


=
modules/gui/qt/medialibrary/mlvideomodel.cpp
=
@@ -143,6 +143,8 @@ QVariant MLVideoModel::itemRoleData(MLItem *item, int role) 
const
 return getVariantList( video->getVideoDesc() );
 case VIDEO_AUDIO_TRACK:
 return getVariantList( video->getAudioDesc() );
+case VIDEO_SUBTITLE_TRACK:
+return getVariantList( video->getSubtitleDesc() );
 case VIDEO_TITLE_FIRST_SYMBOL:
 return QVariant::fromValue( getFirstSymbol( video->getTitle() ) );
 
@@ -170,6 +172,7 @@ QHash MLVideoModel::roleNames() const
 { VIDEO_DISPLAY_MRL, "display_mrl" },
 { VIDEO_AUDIO_TRACK, "audioDesc" },
 { VIDEO_VIDEO_TRACK, "videoDesc" },
+{ VIDEO_SUBTITLE_TRACK, "subtitleDesc" },
 { VIDEO_TITLE_FIRST_SYMBOL, "title_first_symbol"},
 };
 }


=
modules/gui/qt/medialibrary/mlvideomodel.hpp
=
@@ -53,6 +53,7 @@ public:
 VIDEO_DISPLAY_MRL,
 VIDEO_VIDEO_TRACK,
 VIDEO_AUDIO_TRACK,
+VIDEO_SUBTITLE_TRACK,
 
 VIDEO_TITLE_FIRST_SYMBOL,
 };


=
modules/gui/qt/medialibrary/qml/VideoInfoExpandPanel.qml
==

[vlc-commits] [Git][videolan/vlc][master] qt: toggle pause on system tray icon middle click

2024-06-23 Thread @fkuehne


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


Commits:
7b2e9c21 by Fatih Uzunoglu at 2024-06-23T11:33:01+00:00
qt: toggle pause on system tray icon middle click

- - - - -


1 changed file:

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


Changes:

=
modules/gui/qt/maininterface/mainctx.cpp
=
@@ -695,9 +695,8 @@ void MainCtx::handleSystrayClick(
 #endif
 break;
 case QSystemTrayIcon::MiddleClick:
-sysTray->showMessage( qtr( "VLC media player" ),
-qtr( "Control menu for the player" ),
-QSystemTrayIcon::Information, 3000 );
+if (PlaylistController* const playlistController = 
p_intf->p_mainPlaylistController)
+playlistController->togglePlayPause();
 break;
 default:
 break;



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

-- 
This project does not include diff previews in email notifications.
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/7b2e9c21a0c15a98a9752d59e8cc7e64cfadd60a
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] qml: fix empty title in Music Album expand delegate

2024-06-23 Thread @fkuehne


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


Commits:
a524b256 by Prince Gupta at 2024-06-23T09:26:20+00:00
qml: fix empty title in Music Album expand delegate

?? returns left side if left side is empty string

- - - - -


1 changed file:

- modules/gui/qt/medialibrary/qml/MusicAlbumsGridExpandDelegate.qml


Changes:

=
modules/gui/qt/medialibrary/qml/MusicAlbumsGridExpandDelegate.qml
=
@@ -240,7 +240,7 @@ FocusScope {
 Widgets.SubtitleLabel {
 id: expand_infos_title_id
 
-text: root.model?.title ?? qsTr("Unknown title")
+text: root.model?.title || qsTr("Unknown title")
 
 color: theme.fg.primary
 
@@ -266,9 +266,10 @@ FocusScope {
 color: theme.fg.secondary
 
 width: parent.width
+
 text: qsTr("%1 - %2 - %3 - %4")
-.arg(root.model?.main_artist ?? qsTr("Unknown 
artist"))
-.arg(root.model?.release_year ?? "")
+.arg(root.model?.main_artist || qsTr("Unknown 
artist"))
+.arg(root.model?.release_year || "")
 .arg(_getStringTrack())
 .arg(root.model?.duration?.formatHMS() ?? 0)
 }



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

-- 
This project does not include diff previews in email notifications.
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/a524b256730bdb69896374fdcc8746a98dc42998
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] macosx: Fix brief menu offset shift

2024-06-23 Thread @fkuehne


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


Commits:
106756a0 by Dave Nicolson at 2024-06-23T08:44:40+00:00
macosx: Fix brief menu offset shift

- - - - -


1 changed file:

- modules/gui/macosx/menus/VLCMainMenu.m


Changes:

=
modules/gui/macosx/menus/VLCMainMenu.m
=
@@ -1901,27 +1901,25 @@ typedef NS_ENUM(NSInteger, VLCObjectType) {
 const int menuItemOffset = 14;
 const int menuItemOffsetWithActiveState = 24;
 
-dispatch_async(dispatch_get_main_queue(), ^{
-if (menu == self->_controlsMenu) {
-BOOL controlsMenuHasActiveState = NO;
-for (NSMenuItem *viewMenuItem in menu.itemArray) {
-if (viewMenuItem.state == NSControlStateValueOn) {
-controlsMenuHasActiveState = YES;
-}
-}
-
-if (controlsMenuHasActiveState) {
-self->_rate_view_offset_constraint.constant = 
menuItemOffsetWithActiveState;
-} else {
-self->_rate_view_offset_constraint.constant = 
menuItemOffset;
+if (menu == _controlsMenu) {
+BOOL controlsMenuHasActiveState = NO;
+for (NSMenuItem * const viewMenuItem in menu.itemArray) {
+if (viewMenuItem.state == NSControlStateValueOn) {
+controlsMenuHasActiveState = YES;
 }
 }
 
-if (menu == self->_subtitlesMenu) {
-self->_subtitle_bgopacity_view_offset_constraint.constant = 
menuItemOffset;
-self->_subtitleSizeViewOffsetConstraint.constant = 
menuItemOffset;
+if (controlsMenuHasActiveState) {
+_rate_view_offset_constraint.constant = 
menuItemOffsetWithActiveState;
+} else {
+_rate_view_offset_constraint.constant = menuItemOffset;
 }
-});
+}
+
+if (menu == _subtitlesMenu) {
+_subtitle_bgopacity_view_offset_constraint.constant = 
menuItemOffset;
+_subtitleSizeViewOffsetConstraint.constant = menuItemOffset;
+}
 }
 }
 



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

-- 
This project does not include diff previews in email notifications.
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/106756a06c3f5b8ef2b58daeae9d8929bf352fef
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] 11 commits: macosx: Modernise VLCSlider and VLCSliderCell code

2024-06-23 Thread @fkuehne


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


Commits:
913fa08b by Claudio Cambra at 2024-06-23T08:01:16+00:00
macosx: Modernise VLCSlider and VLCSliderCell code

Signed-off-by: Claudio Cambra 

- - - - -
1bfb7fd6 by Claudio Cambra at 2024-06-23T08:01:16+00:00
macosx: Constify things in VLCSliderCell

Signed-off-by: Claudio Cambra 

- - - - -
14b87f51 by Claudio Cambra at 2024-06-23T08:01:16+00:00
macosx: Reorder VLCSliderCell to match other classes with C-style callbacks 
into libvlc (e.g. VLCLibraryModel)

Signed-off-by: Claudio Cambra 

- - - - -
cb5040d3 by Claudio Cambra at 2024-06-23T08:01:16+00:00
macosx: Expose AB loop times and positions in player controller when ab loop 
state changes

Signed-off-by: Claudio Cambra 

- - - - -
8ac92701 by Claudio Cambra at 2024-06-23T08:01:16+00:00
macosx: Correctly initialise ab loop properties in player controller

Signed-off-by: Claudio Cambra 

- - - - -
84e240fc by Claudio Cambra at 2024-06-23T08:01:16+00:00
macosx: Add method to draw a tick mark at a given position on VLCSlider

Signed-off-by: Claudio Cambra 

- - - - -
f79b8908 by Claudio Cambra at 2024-06-23T08:01:16+00:00
macosx: Draw a and b position marks when A to B loop set

Signed-off-by: Claudio Cambra 

- - - - -
040d3337 by Claudio Cambra at 2024-06-23T08:01:16+00:00
macosx: Rename VLCSlider to VLCPlaybackProgressSlider

Since it is only used for this purpose, rename more accurately

Signed-off-by: Claudio Cambra 

- - - - -
4c9417e7 by Claudio Cambra at 2024-06-23T08:01:16+00:00
macosx: Remove unused custom colouring attributes and procedures in playback 
progress slider

Signed-off-by: Claudio Cambra 

- - - - -
a09effb3 by Claudio Cambra at 2024-06-23T08:01:16+00:00
macosx: React to ab loop change notifications rather than querying player 
controller every draw iteration in VLCPlaybackProgressSliderCell

Signed-off-by: Claudio Cambra 

- - - - -
56f36896 by Claudio Cambra at 2024-06-23T08:01:16+00:00
macosx: Clearly define slider tick thickness in VLCLibraryUIUnits, don't 
use magic numbers

Signed-off-by: Claudio Cambra 

- - - - -


17 changed files:

- extras/package/macosx/VLC.xcodeproj/project.pbxproj
- modules/gui/macosx/Makefile.am
- modules/gui/macosx/UI/VLCDetachedAudioWindow.xib
- modules/gui/macosx/UI/VLCLibraryWindow.xib
- modules/gui/macosx/UI/VLCMainVideoView.xib
- modules/gui/macosx/library/VLCLibraryUIUnits.h
- modules/gui/macosx/library/VLCLibraryUIUnits.m
- modules/gui/macosx/playlist/VLCPlayerController.h
- modules/gui/macosx/playlist/VLCPlayerController.m
- modules/gui/macosx/views/VLCDefaultValueSliderCell.m
- modules/gui/macosx/views/VLCSlider.h → 
modules/gui/macosx/views/VLCPlaybackProgressSlider.h
- modules/gui/macosx/views/VLCSlider.m → 
modules/gui/macosx/views/VLCPlaybackProgressSlider.m
- modules/gui/macosx/views/VLCSliderCell.h → 
modules/gui/macosx/views/VLCPlaybackProgressSliderCell.h
- modules/gui/macosx/views/VLCSliderCell.m → 
modules/gui/macosx/views/VLCPlaybackProgressSliderCell.m
- modules/gui/macosx/windows/controlsbar/VLCControlsBarCommon.h
- modules/gui/macosx/windows/controlsbar/VLCControlsBarCommon.m
- po/POTFILES.in


Changes:

=
extras/package/macosx/VLC.xcodeproj/project.pbxproj
=
@@ -142,8 +142,8 @@
53F0E930299B17DF00491D49 /* VLCInputNodePathControl.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 53F0E92F299B17DF00491D49 /* 
VLCInputNodePathControl.m */; };
53F399802AC6D6B400B86241 /* 
VLCLibraryHomeViewVideoCarouselContainerView.m in Sources */ = {isa = 
PBXBuildFile; fileRef = 53F3997F2AC6D6B400B86241 /* 
VLCLibraryHomeViewVideoCarouselContainerView.m */; };
6B0292E61F43256300A50082 /* VLCBottomBarView.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 6B0292E51F43256300A50082 /* VLCBottomBarView.m 
*/; };
-   6B0AB0F01F1AC8B3003A1B4E /* VLCSlider.m in Sources */ = {isa = 
PBXBuildFile; fileRef = 6B0AB0ED1F1AC8B3003A1B4E /* VLCSlider.m */; };
-   6B0AB0F11F1AC8B3003A1B4E /* VLCSliderCell.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 6B0AB0EF1F1AC8B3003A1B4E /* VLCSliderCell.m */; 
};
+   6B0AB0F01F1AC8B3003A1B4E /* VLCPlaybackProgressSlider.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 6B0AB0ED1F1AC8B3003A1B4E /* 
VLCPlaybackProgressSlider.m */; };
+   6B0AB0F11F1AC8B3003A1B4E /* VLCPlaybackProgressSliderCell.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 6B0AB0EF1F1AC8B3003A1B4E /* 
VLCPlaybackProgressSliderCell.m */; };
6B196852265E974400870512 /* window_macosx.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 6B19684F26

[vlc-commits] [Git][videolan/vlc][3.0.x] vlc_common: remove warnings on VLC_OBJECT

2024-06-22 Thread @fkuehne


Felix Paul Kühne pushed to branch 3.0.x at VideoLAN / VLC


Commits:
ac310b4b by Alexandre Janniaux at 2024-06-22T14:25:44+00:00
vlc_common: remove warnings on VLC_OBJECT

Fix an infinite amount of warnings on Darwin:

../../include/vlc_variables.h:563:5: warning: due to lvalue conversion of 
the controlling expression, association of type 'const struct 
vlc_common_members' will never be selected because it is qualified 
[-Wunreachable-code-generic-assoc]
var_Create( p_obj, psz_name, VLC_VAR_STRING | VLC_VAR_DOINHERIT
^
../../include/vlc_variables.h:122:39: note: expanded from macro 
'var_Create'
#define var_Create(a,b,c) var_Create( VLC_OBJECT(a), b, c )
  ^
../../include/vlc_common.h:481:15: note: expanded from macro 
'VLC_OBJECT'
const struct vlc_common_members: (const vlc_object_t 
*)(&(x)->obj) \

- - - - -


1 changed file:

- include/vlc_common.h


Changes:

=
include/vlc_common.h
=
@@ -477,8 +477,8 @@ struct vlc_common_members
 #if !defined(__cplusplus)
 # define VLC_OBJECT(x) \
 _Generic((x)->obj, \
-struct vlc_common_members: (vlc_object_t *)(&(x)->obj), \
-const struct vlc_common_members: (const vlc_object_t *)(&(x)->obj) \
+vlc_object_t: (vlc_object_t *)(&(x)->obj), \
+struct vlc_common_members: (vlc_object_t *)(x) \
 )
 #else
 # define VLC_OBJECT( x ) ((vlc_object_t *)&(x)->obj)



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

-- 
This project does not include diff previews in email notifications.
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/ac310b4b193bd86b741308393aa8d8833a1075ae
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] aout: rework reset before aout->stop

2024-06-22 Thread @fkuehne


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


Commits:
ef75cfe7 by Thomas Guillem at 2024-06-22T14:25:55+00:00
aout: rework reset before aout->stop

An asynchronous timing report would fail/assert after a stream_Reset().

This issue was hidden since, most of the time, vlc_aout_stream_Flush()
is called before vlc_aout_stream_Delete() but there are some rare case
where vlc_aout_stream_Delete() is called without a flush.

- - - - -


2 changed files:

- src/audio_output/dec.c
- src/audio_output/filters.c


Changes:

=
src/audio_output/dec.c
=
@@ -331,11 +331,14 @@ void vlc_aout_stream_Delete (vlc_aout_stream *stream)
 
 if (stream->mixer_format.i_format)
 {
-stream_Reset(stream);
 vlc_audio_meter_Reset(&owner->meter, NULL);
 if (stream->filters)
 aout_FiltersDelete (aout, stream->filters);
 aout_OutputDelete (aout);
+
+vlc_clock_Lock(stream->sync.clock);
+vlc_clock_Reset(stream->sync.clock);
+vlc_clock_Unlock(stream->sync.clock);
 }
 if (stream->volume != NULL)
 aout_volume_Delete(stream->volume);


=
src/audio_output/filters.c
=
@@ -144,7 +144,12 @@ static void aout_FiltersPipelineDestroy(struct aout_filter 
*tab, unsigned n)
 if (tab[i].vout != NULL)
 vout_Close(tab[i].vout);
 if (tab[i].clock != NULL)
+{
+vlc_clock_Lock(tab[i].clock);
+vlc_clock_Reset(tab[i].clock);
+vlc_clock_Unlock(tab[i].clock);
 vlc_clock_Delete(tab[i].clock);
+}
 }
 }
 



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

-- 
This project does not include diff previews in email notifications.
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/ef75cfe77765de7ac401729f7dd79e746a1a8d78
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] contrib: update dav1d to 1.4.3

2024-06-20 Thread @fkuehne


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


Commits:
900a4290 by Felix Paul Kühne at 2024-06-20T09:20:51+00:00
contrib: update dav1d to 1.4.3

1.4.3 is a very small release focused on security issues:
 - AArch64: Fix potential out of bounds access in DotProd H/HV filters
 - cli: Prevent buffer over-read

- - - - -


2 changed files:

- contrib/src/dav1d/SHA512SUMS
- contrib/src/dav1d/rules.mak


Changes:

=
contrib/src/dav1d/SHA512SUMS
=
@@ -1 +1 @@
-36f8e632f64212db63e126b9ed2ca95c2db930d2388c551cde0b13b783ae872edeab1b5dd2274684bb03e98536d0334552ddcba209cff08c3568d97321034920
  dav1d-1.4.2.tar.xz
+6f3233acfb7d248155ac4beb237fe48186fdfb378820f0b15a5ca54a5642a63ebae48446075f10c6be77a8b9a95ddf41c6709af21936af793f1bbc28a2ef4bd8
  dav1d-1.4.3.tar.xz


=
contrib/src/dav1d/rules.mak
=
@@ -1,6 +1,6 @@
 # libdav1d
 
-DAV1D_VERSION := 1.4.2
+DAV1D_VERSION := 1.4.3
 DAV1D_URL := $(VIDEOLAN)/dav1d/$(DAV1D_VERSION)/dav1d-$(DAV1D_VERSION).tar.xz
 
 PKGS += dav1d



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

-- 
This project does not include diff previews in email notifications.
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/900a4290b6ef251eccffadce02abda9bb0df5ad2
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] 2 commits: macosx: Separate updating of pin indicator image visibility with notification handler

2024-06-18 Thread @fkuehne


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


Commits:
713d1596 by Claudio Cambra at 2024-06-18T16:56:09+00:00
macosx: Separate updating of pin indicator image visibility with notification 
handler

Signed-off-by: Claudio Cambra 

- - - - -
54c32fc9 by Claudio Cambra at 2024-06-18T16:56:09+00:00
macosx: Update float on top indicator on view load

Signed-off-by: Claudio Cambra 

- - - - -


1 changed file:

- modules/gui/macosx/windows/video/VLCMainVideoViewController.m


Changes:

=
modules/gui/macosx/windows/video/VLCMainVideoViewController.m
=
@@ -172,6 +172,7 @@
 
 [self setupAudioDecorativeView];
 [self.controlsBar update];
+[self updateFloatOnTopIndicator];
 }
 
 - (void)updateDecorativeViewVisibilityOnControllerChange:(VLCPlayerController 
*)controller
@@ -233,11 +234,24 @@
 {
 VLCVideoWindowCommon * const videoWindow = (VLCVideoWindowCommon 
*)notification.object;
 NSAssert(videoWindow != nil, @"Received video window should not be nil!");
-NSDictionary * const userInfo = 
notification.userInfo;
-NSAssert(userInfo != nil, @"Received user info should not be nil!");
-NSNumber * const enabledNumberWrapper = 
userInfo[VLCWindowFloatOnTopEnabledNotificationKey];
-NSAssert(enabledNumberWrapper != nil, @"Received user info enabled wrapper 
should not be nil!");
-self.floatOnTopIndicatorImageView.hidden = !enabledNumberWrapper.boolValue;
+VLCVideoWindowCommon * const selfVideoWindow = (VLCVideoWindowCommon 
*)self.view.window;
+
+if (videoWindow != selfVideoWindow) {
+return;
+}
+
+[self updateFloatOnTopIndicator];
+}
+
+- (void)updateFloatOnTopIndicator
+{
+vout_thread_t * const voutThread = self.voutView.voutThread;
+if (voutThread == NULL) {
+return;
+}
+
+const bool floatOnTopEnabled = var_GetBool(voutThread, "video-on-top");
+self.floatOnTopIndicatorImageView.hidden = !floatOnTopEnabled;
 }
 
 - (BOOL)mouseOnControls



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/50aa68ea7e53420d008cc17131d7f8ef6be98fbd...54c32fc9eae608309d86c663eea8799deab1fde6

-- 
This project does not include diff previews in email notifications.
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/50aa68ea7e53420d008cc17131d7f8ef6be98fbd...54c32fc9eae608309d86c663eea8799deab1fde6
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] configure.ac: fix NO_COLOR handling in ./compile

2024-06-18 Thread @fkuehne


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


Commits:
50aa68ea by Alexandre Janniaux at 2024-06-18T13:37:29+00:00
configure.ac: fix NO_COLOR handling in ./compile

Quotes were interpreted by configure and $NO_COLOR was interpolated at
configure time, leading to incorrect script execution. Brackets were
also removed because of m4 expansion.

By switching to single quote string, we can better describe what needs
to be printed and what needs to be evaluated.

The m4 expansion problem is solved by escaping the whole string in a
bracket block.

The `echo` command is also changed for the more portable[^1] `printf`.

[^1]: 
https://unix.stackexchange.com/questions/65803/why-is-printf-better-than-echo

- - - - -


1 changed file:

- configure.ac


Changes:

=
configure.ac
=
@@ -4869,18 +4869,18 @@ if test -n $SHELL; then
 fi
 rm -f compile
 compile_top_srcdir=`sed -ne "s/^top_srcdir *= *//p" < Makefile`
-echo "#! $SHELL
-rm -f .error\$\$
+[printf '%s\n' '#! '"${SHELL}"'
+rm -f .error$$
 ERROR=0
-export PATH=\"$PATH\" LANG=C
-if [ "$NO_COLOR" = 1 ]; then
-($MAKE V=1 \$@ 2>&1 || touch .error\$\$)
+export PATH="$PATH" LANG=C
+if test "$NO_COLOR" = 1 ; then
+('"${MAKE}"' V=1 "$@" 2>&1 || touch .error$$)
 else
-($MAKE V=1 \$@ 2>&1 || touch .error\$\$)| 
$compile_top_srcdir/extras/buildsystem/make.pl
+('"${MAKE}"' V=1 "$@" 2>&1 || touch .error$$)| 
'"$compile_top_srcdir"'/extras/buildsystem/make.pl
 fi
-test -f .error\$\$ && ERROR=1
-rm -f .error\$\$
-exit \$ERROR" >compile
+test -f .error$$ && ERROR=1
+rm -f .error$$
+exit $ERROR'] >compile
 chmod a+x compile
 
 echo "



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

-- 
This project does not include diff previews in email notifications.
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/50aa68ea7e53420d008cc17131d7f8ef6be98fbd
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] 4 commits: macosx: Ensure the detail label is hidden in main video view controls bar if...

2024-06-18 Thread @fkuehne


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


Commits:
9d563e19 by Claudio Cambra at 2024-06-18T06:47:25+00:00
macosx: Ensure the detail label is hidden in main video view controls bar if 
not playing a media library media item

Signed-off-by: Claudio Cambra 

- - - - -
50cf7695 by Claudio Cambra at 2024-06-18T06:47:25+00:00
macosx: Separate notification handler and detail label update

Signed-off-by: Claudio Cambra 

- - - - -
f0335464 by Claudio Cambra at 2024-06-18T06:47:25+00:00
macosx: Separate notification handler and float on top button update

Signed-off-by: Claudio Cambra 

- - - - -
ee838b3c by Claudio Cambra at 2024-06-18T06:47:25+00:00
macosx: Override update method in main video view controls bar to update 
relevant components

Signed-off-by: Claudio Cambra 

- - - - -


1 changed file:

- modules/gui/macosx/windows/controlsbar/VLCMainVideoViewControlsBar.m


Changes:

=
modules/gui/macosx/windows/controlsbar/VLCMainVideoViewControlsBar.m
=
@@ -68,20 +68,50 @@
 
 NSNotificationCenter * const notificationCenter = 
NSNotificationCenter.defaultCenter;
 [notificationCenter addObserver:self
-   selector:@selector(updateDetailLabel:)
+   selector:@selector(currentMediaItemChanged:)
name:VLCPlayerCurrentMediaItemChanged
  object:nil];
 [notificationCenter addObserver:self
-   selector:@selector(updateFloatOnTopButton:)
+   selector:@selector(floatOnTopChanged:)
name:VLCWindowFloatOnTopChangedNotificationName
  object:nil];
+
+[self update];
+}
+
+- (void)update
+{
+[super update];
+[self updateDetailLabel];
+[self updateFloatOnTopButton];
+}
+
+- (void)currentMediaItemChanged:(NSNotification *)notification
+{
+[self updateDetailLabel];
+}
+
+- (void)floatOnTopChanged:(NSNotification *)notification
+{
+VLCVideoWindowCommon * const videoWindow = (VLCVideoWindowCommon 
*)notification.object;
+NSAssert(videoWindow != nil, @"Received video window should not be nil!");
+VLCVideoWindowCommon * const selfVideoWindow =
+(VLCVideoWindowCommon *)self.floatOnTopButton.window;
+
+if (videoWindow != selfVideoWindow) {
+return;
+}
+
+[self updateFloatOnTopButton];
 }
 
-- (void)updateDetailLabel:(NSNotification *)notification
+- (void)updateDetailLabel
 {
+VLCMediaLibraryMediaItem * const mediaItem =
+[VLCMediaLibraryMediaItem 
mediaItemForURL:_playerController.URLOfCurrentMediaItem];
 
-VLCMediaLibraryMediaItem * const mediaItem = [VLCMediaLibraryMediaItem 
mediaItemForURL:_playerController.URLOfCurrentMediaItem];
 if (!mediaItem) {
+self.detailLabel.hidden = YES;
 return;
 }
 
@@ -90,6 +120,29 @@
 _detailLabel.stringValue = mediaItem.primaryDetailString;
 }
 
+- (void)updateFloatOnTopButton
+{
+VLCVideoWindowCommon * const videoWindow = (VLCVideoWindowCommon 
*)self.floatOnTopButton.window;
+if (videoWindow == nil) {
+return;
+}
+
+VLCVoutView * const voutView = videoWindow.videoViewController.voutView;
+NSAssert(voutView != nil, @"Vout view should not be nil!");
+vout_thread_t * const voutThread = voutView.voutThread;
+
+if (voutThread == NULL) {
+return;
+}
+
+const bool floatOnTopEnabled = var_GetBool(voutThread, "video-on-top");
+
+if (@available(macOS 10.14, *)) {
+self.floatOnTopButton.contentTintColor =
+floatOnTopEnabled ? NSColor.controlAccentColor : 
NSColor.controlTextColor;
+}
+}
+
 - (IBAction)openBookmarks:(id)sender
 {
 [VLCMain.sharedInstance.bookmarks toggleWindow:sender];
@@ -125,19 +178,4 @@
 vout_Release(p_vout);
 }
 
-- (void)updateFloatOnTopButton:(NSNotification *)notification
-{
-VLCVideoWindowCommon * const videoWindow = (VLCVideoWindowCommon 
*)notification.object;
-NSAssert(videoWindow != nil, @"Received video window should not be nil!");
-NSDictionary * const userInfo = 
notification.userInfo;
-NSAssert(userInfo != nil, @"Received user info should not be nil!");
-NSNumber * const enabledNumberWrapper = 
userInfo[VLCWindowFloatOnTopEnabledNotificationKey];
-NSAssert(enabledNumberWrapper != nil, @"Received user info enabled wrapper 
should not be nil!");
-
-if (@available(macOS 10.14, *)) {
-self.floatOnTopButton.contentTintColor =
-enabledNumberWrapper.boolValue ? NSColor.controlAccentColor : 
NSColor.controlTextColor;
-}
-}
-
 @end



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/02c3a9e7fcc709ca84d993a9192ef0773d9b1e30...ee838b3c6a4e31565763ec6c7b9aa6b737beb629

-- 
This project does not include di

[vlc-commits] [Git][videolan/vlc][master] macosx: Fix library crash on video media library media item switch

2024-06-17 Thread @fkuehne


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


Commits:
02c3a9e7 by Claudio Cambra at 2024-06-18T06:31:10+00:00
macosx: Fix library crash on video media library media item switch

Signed-off-by: Claudio Cambra 

- - - - -


1 changed file:

- modules/gui/macosx/library/video-library/VLCLibraryVideoDataSource.m


Changes:

=
modules/gui/macosx/library/video-library/VLCLibraryVideoDataSource.m
=
@@ -251,7 +251,7 @@ NSString * const 
VLCLibraryVideoDataSourceDisplayedCollectionChangedNotification
 
 const NSInteger section = [self videoGroupToRow:group];
 NSSet * const indexPathSet = [rowIndexSet 
indexPathSetWithSection:section];
-[self.collectionView insertItemsAtIndexPaths:indexPathSet];
+[self.collectionView reloadItemsAtIndexPaths:indexPathSet];
 
 const NSInteger selectedTableViewVideoGroup = [self 
rowToVideoGroup:self.groupsTableView.selectedRow];
 if (selectedTableViewVideoGroup == group) {



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

-- 
This project does not include diff previews in email notifications.
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/02c3a9e7fcc709ca84d993a9192ef0773d9b1e30
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] avsamplebuffer: Fix unicode whitespace compile warning

2024-06-14 Thread @fkuehne


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


Commits:
b57700a4 by Claudio Cambra at 2024-06-14T18:43:11+00:00
avsamplebuffer: Fix unicode whitespace compile warning

Signed-off-by: Claudio Cambra 

- - - - -


1 changed file:

- modules/audio_output/apple/avsamplebuffer.m


Changes:

=
modules/audio_output/apple/avsamplebuffer.m
=
@@ -28,7 +28,7 @@
 #import 
 #import 
 
-#if TARGET_OS_IPHONE || TARGET_OS_TV || TARGET_OS_VISION
+#if TARGET_OS_IPHONE || TARGET_OS_TV || TARGET_OS_VISION
 #define HAS_AVAUDIOSESSION
 #import "avaudiosession_common.h"
 #endif



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

-- 
This project does not include diff previews in email notifications.
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/b57700a47b84c82981bea0bb9ad38852cc3523be
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: d3d11_scaler: fix AMD super scaler if the source has padding

2024-06-10 Thread @fkuehne


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


Commits:
29f6fd96 by Steve Lhomme at 2024-06-10T06:41:30+00:00
d3d11_scaler: fix AMD super scaler if the source has padding

It asserts in debug build and will keep the padding in release mode.

- - - - -
75e99006 by Steve Lhomme at 2024-06-10T06:41:30+00:00
d3d11_tonemap: log when the TrueHDR feature is not available

That is the case for win32 builds on win64.

- - - - -
94f7f48c by Steve Lhomme at 2024-06-10T06:41:30+00:00
d3d11_scaler: always read the staging size without the decoder padding

- - - - -


2 changed files:

- modules/video_output/win32/d3d11_scaler.cpp
- modules/video_output/win32/d3d11_tonemap.cpp


Changes:

=
modules/video_output/win32/d3d11_scaler.cpp
=
@@ -630,14 +630,17 @@ int D3D11_UpscalerScale(vlc_object_t *vd, d3d11_scaler 
*scaleProc, picture_sys_d
 auto packedStaging = 
scaleProc->amfInput->GetPlane(amf::AMF_PLANE_PACKED);
 ID3D11Texture2D *amfStaging = reinterpret_cast(packedStaging->GetNative());
 
-#ifndef NDEBUG
 D3D11_TEXTURE2D_DESC stagingDesc, inputDesc;
 amfStaging->GetDesc(&stagingDesc);
 p_sys->texture[KNOWN_DXGI_INDEX]->GetDesc(&inputDesc);
-assert(stagingDesc.Width == inputDesc.Width);
-assert(stagingDesc.Height == inputDesc.Height);
+assert(stagingDesc.Width <= inputDesc.Width);
+assert(stagingDesc.Height <= inputDesc.Height);
 assert(stagingDesc.Format == inputDesc.Format);
-#endif
+
+D3D11_BOX box = {};
+box.bottom = stagingDesc.Height,
+box.right = stagingDesc.Width,
+box.back = 1,
 
 // copy source into staging as it may not be shared
 d3d11_device_lock( scaleProc->d3d_dev );
@@ -646,7 +649,7 @@ int D3D11_UpscalerScale(vlc_object_t *vd, d3d11_scaler 
*scaleProc, picture_sys_d
 0, 0, 0,
 
p_sys->texture[KNOWN_DXGI_INDEX],
 p_sys->slice_index,
-NULL);
+&box);
 d3d11_device_unlock( scaleProc->d3d_dev );
 submitSurface = scaleProc->amfInput;
 


=
modules/video_output/win32/d3d11_tonemap.cpp
=
@@ -115,6 +115,7 @@ d3d11_tonemapper *D3D11_TonemapperCreate(vlc_object_t *vd, 
d3d11_device_t *d3d_d
 
 if (!available)
 {
+msg_Warn(vd, "True HDR not supported");
 d3d11_device_unlock(d3d_dev);
 goto error;
 }



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/ae6a59447187d09b09fe771b60bd6f27eb9c2021...94f7f48cc722326901f182408a5e2adb4995d761

-- 
This project does not include diff previews in email notifications.
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/ae6a59447187d09b09fe771b60bd6f27eb9c2021...94f7f48cc722326901f182408a5e2adb4995d761
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] avsamplebuffer: restart aout if configuration changes on visionOS

2024-06-09 Thread @fkuehne


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


Commits:
ae6a5944 by Felix Paul Kühne at 2024-06-10T05:32:30+00:00
avsamplebuffer: restart aout if configuration changes on visionOS

This solves an oversight in 492a9419.

- - - - -


1 changed file:

- modules/audio_output/apple/avsamplebuffer.m


Changes:

=
modules/audio_output/apple/avsamplebuffer.m
=
@@ -438,7 +438,7 @@ customBlock_Free(void *refcon, void *doomedMemoryBlock, 
size_t sizeInBytes)
 selector:@selector(flushedAutomatically:)
 
name:AVSampleBufferAudioRendererWasFlushedAutomaticallyNotification
   object:nil];
-if (@available(macOS 12.0, iOS 15.0, tvOS 15.0, *))
+if (@available(macOS 12.0, iOS 15.0, tvOS 15.0 VISIONOS_AVAILABLE, *))
 {
 [notifCenter addObserver:self
 selector:@selector(outputConfigurationChanged:)



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

-- 
This project does not include diff previews in email notifications.
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/ae6a59447187d09b09fe771b60bd6f27eb9c2021
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] macosx: Add separator between editable fields and location field in information window

2024-06-09 Thread @fkuehne


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


Commits:
d7207587 by Claudio Cambra at 2024-06-09T16:25:54+00:00
macosx: Add separator between editable fields and location field in information 
window

Makes it visually much clearer that the location cannot be changed and
saved in the information window

Signed-off-by: Claudio Cambra 

- - - - -


1 changed file:

- modules/gui/macosx/UI/VLCInformationWindow.xib


Changes:

=
modules/gui/macosx/UI/VLCInformationWindow.xib
=
@@ -466,6 +466,9 @@
 
 
 
+
+
+
 
 
 
@@ -506,12 +509,13 @@
 
 
 
+
+
 
 
 
 
 
-
 
 
 
@@ -552,6 +556,7 @@
 
 
 
+
 
 
 
@@ -567,6 +572,7 @@
 
 
 
+
 
 
 



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

-- 
This project does not include diff previews in email notifications.
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/d7207587d0b29bf643cabe0dab486f0a91660301
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] 4 commits: macosx: Handle case when right-clicked collection view item is not selected

2024-06-09 Thread @fkuehne


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


Commits:
6e000aec by Claudio Cambra at 2024-06-09T16:11:39+00:00
macosx: Handle case when right-clicked collection view item is not selected

Signed-off-by: Claudio Cambra 

- - - - -
16f59826 by Claudio Cambra at 2024-06-09T16:11:39+00:00
macosx: Ensure we correctly check if a collection view's item is selected

NSArray's indexOf: will just check if it is the same object in the NSArray.
Instead check for a matching libraryId.

Signed-off-by: Claudio Cambra 

- - - - -
47b1b312 by Claudio Cambra at 2024-06-09T16:11:39+00:00
macosx: Match right-click unselected collection view item behaviour with Finder

Signed-off-by: Claudio Cambra 

- - - - -
1f7ffcef by Claudio Cambra at 2024-06-09T16:11:39+00:00
macosx: Fix handling of clicked row vs selected row for library table view 
context menu

Signed-off-by: Claudio Cambra 

- - - - -


2 changed files:

- modules/gui/macosx/library/VLCLibraryCollectionViewItem.m
- modules/gui/macosx/library/VLCLibraryTableView.m


Changes:

=
modules/gui/macosx/library/VLCLibraryCollectionViewItem.m
=
@@ -296,8 +296,21 @@ const CGFloat 
VLCLibraryCollectionViewItemMaximumDisplayedProgress = 0.95;
 NSObject * const dataSource = 
 (NSObject 
*)collectionView.dataSource;
 NSSet * const indexPaths = 
collectionView.selectionIndexPaths;
-NSArray * const items = 
+NSArray * const selectedItems =
 [dataSource representedItemsAtIndexPaths:indexPaths 
forCollectionView:collectionView];
+const NSInteger representedItemIndex = [selectedItems 
indexOfObjectPassingTest:^BOOL(
+VLCLibraryRepresentedItem * const repItem, const NSUInteger idx, 
BOOL * const stop
+) {
+return repItem.item.libraryID == 
self.representedItem.item.libraryID;
+}];
+NSArray *items = nil;
+
+if (representedItemIndex == NSNotFound) {
+items = @[self.representedItem];
+} else {
+items = selectedItems;
+}
+
 _menuController.representedItems = items;
 } else {
 _menuController.representedItems = @[self.representedItem];


=
modules/gui/macosx/library/VLCLibraryTableView.m
=
@@ -80,15 +80,28 @@
 const id vlcLibraryDataSource = 
 (id)self.dataSource;
 
-[indices enumerateIndexesUsingBlock:^(const NSUInteger index, BOOL * 
const stop) {
+if ([indices containsIndex:self.clickedRow]) {
+[indices enumerateIndexesUsingBlock:^(const NSUInteger index, BOOL 
* const stop) {
+const id mediaItem =
+[vlcLibraryDataSource libraryItemAtRow:index 
forTableView:self];
+const VLCMediaLibraryParentGroupType parentType =
+vlcLibraryDataSource.currentParentType;
+VLCLibraryRepresentedItem * const representedItem =
+[[VLCLibraryRepresentedItem alloc] initWithItem:mediaItem
+ 
parentType:parentType];
+[representedItems addObject:representedItem];
+}];
+} else {
 const id mediaItem = 
-[vlcLibraryDataSource libraryItemAtRow:index 
forTableView:self];
+[vlcLibraryDataSource libraryItemAtRow:self.clickedRow 
forTableView:self];
 const VLCMediaLibraryParentGroupType parentType = 
 vlcLibraryDataSource.currentParentType;
 VLCLibraryRepresentedItem * const representedItem = 
-[[VLCLibraryRepresentedItem alloc] initWithItem:mediaItem 
parentType:parentType];
+[[VLCLibraryRepresentedItem alloc] initWithItem:mediaItem
+ parentType:parentType];
 [representedItems addObject:representedItem];
-}];
+}
+
 _menuController.representedItems = representedItems;
 
 } else if (self.dataSource.class == VLCMediaSourceDataSource.class) {



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/4156b1105c98d33b79c7d1155945d29f3bd95aee...1f7ffcef4d37c55eeaa0011bedc9a16ec5f0cddf

-- 
This project does not include diff previews in email notifications.
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/4156b1105c98d33b79c7d1155945d29f3bd95aee...1f7ffcef4d37c55eeaa0011bedc9a16ec5f0cddf
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] NEWS: update for 3.0.21

2024-06-05 Thread @fkuehne


Felix Paul Kühne pushed to branch 3.0.x at VideoLAN / VLC


Commits:
b28482b9 by Felix Paul Kühne at 2024-06-05T08:32:28+00:00
NEWS: update for 3.0.21

- - - - -


1 changed file:

- NEWS


Changes:

=
NEWS
=
@@ -1,43 +1,56 @@
 Changes between 3.0.20 and 3.0.21:
-
+--
 
 Decoders:
- - Improve Opus ambisonic support
- - Fix some ASS subtitle rendering issues
+ * Improve Opus ambisonic support
+ * Fix some ASS subtitle rendering issues
 
 Video Output:
- - Super Resolution scaling with AMD GPUs
- - Add D3D11 option to use NVIDIA TrueHDR to generate HDR from SDR sources
- - The D3D11 HDR option can also turn on/off HDR for all sources regardless of
+ * Super Resolution scaling with AMD GPUs
+ * Add D3D11 option to use NVIDIA TrueHDR to generate HDR from SDR sources
+ * The D3D11 HDR option can also turn on/off HDR for all sources regardless of
the display
+ * Improve subtitles rendering on Apple platforms of notably Asian languages
+   by correcting font fallback lookups
+
+Video Filter:
+ * New AMD VQ Enhancer filter
 
 Audio Output:
- - Fix regression on macOS causing crashes when using audio devices
+ * Fix regression on macOS causing crashes when using audio devices
with more than 9 channels
 
+Services Discovery:
+ * Fix exposed UPnP directory URL schemes to be compliant with RFC 3986
+
+Input:
+ * Add support for HTTP content range handling according to RFC 9110
+
 Contrib:
- - Update FFmpeg to 4.4.4
+ * Update FFmpeg to 4.4.4
+ * Update dav1d to 1.4.2
+ * Update libvpx to 1.14.1
 
 libVLC:
- - the HWND passed to libvlc_media_player_set_hwnd must have the 
WS_CLIPCHILDREN
+ * the HWND passed to libvlc_media_player_set_hwnd must have the 
WS_CLIPCHILDREN
style set.
 
 Changes between 3.0.19 and 3.0.20:
 --
 
 Video Output:
- - Fix green line in fullscreen in D3D11 video output
- - Fix crash with some AMD drivers old versions
- - Fix events propagation issue when double-clicking with mouse wheel
+ * Fix green line in fullscreen in D3D11 video output
+ * Fix crash with some AMD drivers old versions
+ * Fix events propagation issue when double-clicking with mouse wheel
 
 Decoders:
- - Fix crash when AV1 hardware decoder fails
+ * Fix crash when AV1 hardware decoder fails
 
 Interface:
- - Fix annoying disappearance of the Windows fullscreen controller
+ * Fix annoying disappearance of the Windows fullscreen controller
 
 Demuxers:
- - Fix potential security issue (OOB Write) on MMS:// by checking user size 
bounds
+ * Fix potential security issue (OOB Write) on MMS:// by checking user size 
bounds
 
 
 Changes between 3.0.18 and 3.0.19:



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

-- 
This project does not include diff previews in email notifications.
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/b28482b96b44559371c41107bd260d737682536a
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: contrib: dav1d: update to 1.4.1

2024-06-04 Thread @fkuehne


Felix Paul Kühne pushed to branch 3.0.x at VideoLAN / VLC


Commits:
56fec04c by Tristan Matthews at 2024-06-03T16:53:32+02:00
contrib: dav1d: update to 1.4.1

1.4.1 is a small release of dav1d, improving notably ARM and RISC-V speed

- Optimizations for 6tap filters for NEON (ARM)
- More RISC-V optimizations for itx (4x8, 8x4, 4x16, 16x4, 8x16, 16x8)
- Reduction of binary size on ARM64, ARM32 and RISC-V
- Fix out-of-bounds read in 8bpc SSE2/SSSE3 wiener_filter
- Msac optimizations

(cherry picked from commit 1d89e101ce8899035635f39c60d617965e39dc0e)

- - - - -
71d24338 by Tristan Matthews at 2024-06-03T16:53:41+02:00
contrib: dav1d: update to 1.4.2

Changes for 1.4.2 'Road Runner':


1.4.2 is a small release of dav1d, improving notably ARM, AVX-512 and PowerPC
 - AVX2 optimizations for 8-tap and new variants for 6-tap
 - AVX-512 optimizations for 8-tap and new variants for 6-tap
 - Improve entropy decoding on ARM64
 - New ARM64 optimizations for convolutions based on DotProd extension
 - New ARM64 optimizations for convolutions based on i8mm extension
 - New ARM64 optimizations for subpel and prep filters for i8mm

(cherry picked from commit 918e9a33fa2f9b828743efb9ab2f67257728a5f0)

- - - - -


2 changed files:

- contrib/src/dav1d/SHA512SUMS
- contrib/src/dav1d/rules.mak


Changes:

=
contrib/src/dav1d/SHA512SUMS
=
@@ -1 +1 @@
-32fcb1d19f35bec62c05637987e0204cf76880af192685e0acb08ea30cb9dac889ee89be0f847c79c6c51210c375031b26cf6e4aabc91480e44777e9fb3cbe02
  dav1d-1.4.0.tar.xz
+36f8e632f64212db63e126b9ed2ca95c2db930d2388c551cde0b13b783ae872edeab1b5dd2274684bb03e98536d0334552ddcba209cff08c3568d97321034920
  dav1d-1.4.2.tar.xz


=
contrib/src/dav1d/rules.mak
=
@@ -1,6 +1,6 @@
 # libdav1d
 
-DAV1D_VERSION := 1.4.0
+DAV1D_VERSION := 1.4.2
 DAV1D_URL := $(VIDEOLAN)/dav1d/$(DAV1D_VERSION)/dav1d-$(DAV1D_VERSION).tar.xz
 
 PKGS += dav1d



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/0229706f3f6f7686ea6701a769abc50f58e6516b...71d2433822747246f32a2bf5c4543882ba34cac2

-- 
This project does not include diff previews in email notifications.
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/0229706f3f6f7686ea6701a769abc50f58e6516b...71d2433822747246f32a2bf5c4543882ba34cac2
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: avsamplebuffer: enable for visionOS

2024-06-04 Thread @fkuehne


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


Commits:
492a9419 by Felix Paul Kühne at 2024-06-04T07:33:04+00:00
avsamplebuffer: enable for visionOS

- - - - -
6efd3de7 by Felix Paul Kühne at 2024-06-04T07:33:04+00:00
AVAudioSession: enable for visionOS

This also enables spatial audio if requested by the user

- - - - -
d7d6e180 by Felix Paul Kühne at 2024-06-04T07:33:04+00:00
AVAudioSession: set fixed spatial experience on visionOS

- - - - -


3 changed files:

- modules/audio_output/Makefile.am
- modules/audio_output/apple/avaudiosession_common.m
- modules/audio_output/apple/avsamplebuffer.m


Changes:

=
modules/audio_output/Makefile.am
=
@@ -125,6 +125,9 @@ endif
 if HAVE_TVOS
 libavsamplebuffer_plugin_la_SOURCES += 
audio_output/apple/avaudiosession_common.m
 endif
+if HAVE_XROS
+libavsamplebuffer_plugin_la_SOURCES += 
audio_output/apple/avaudiosession_common.m
+endif
 libavsamplebuffer_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(aoutdir)' \
-Wl,-framework,CoreMedia,-framework,Foundation,-framework,AVFoundation
 libavsamplebuffer_plugin_la_OBJCFLAGS = $(AM_OBJCFLAGS) -fobjc-arc


=
modules/audio_output/apple/avaudiosession_common.m
=
@@ -29,6 +29,16 @@
 #import 
 #import "avaudiosession_common.h"
 
+// work-around to fix compilation on older Xcode releases
+#if defined(TARGET_OS_VISION) && TARGET_OS_VISION
+#define MIN_VISIONOS 1.0
+#define VISIONOS_API_AVAILABLE , visionos(MIN_VISIONOS)
+#define VISIONOS_AVAILABLE , visionOS MIN_VISIONOS
+#else
+#define VISIONOS_API_AVAILABLE
+#define VISIONOS_AVAILABLE
+#endif
+
 void
 avas_PrepareFormat(audio_output_t *p_aout, AVAudioSession *instance,
audio_sample_format_t *fmt, bool spatial_audio)
@@ -61,7 +71,7 @@ avas_PrepareFormat(audio_output_t *p_aout, AVAudioSession 
*instance,
 
 if (spatial_audio)
 {
-if (@available(iOS 15.0, tvOS 15.0, *))
+if (@available(iOS 15.0, tvOS 15.0 VISIONOS_AVAILABLE, *))
 {
 /* Not mandatory, SpatialAudio can work without it. It just 
signals to
  * the user that he is playing spatial content */
@@ -117,21 +127,21 @@ avas_GetPortType(audio_output_t *p_aout, AVAudioSession 
*instance,
 return VLC_SUCCESS;
 }
 
-struct API_AVAILABLE(ios(11.0))
+struct API_AVAILABLE(ios(11.0) VISIONOS_API_AVAILABLE)
 role2policy
 {
 char role[sizeof("accessibility")];
 AVAudioSessionRouteSharingPolicy policy;
 };
 
-static int API_AVAILABLE(ios(11.0))
+static int API_AVAILABLE(ios(11.0) VISIONOS_API_AVAILABLE)
 role2policy_cmp(const void *key, const void *val)
 {
 const struct role2policy *entry = val;
 return strcmp(key, entry->role);
 }
 
-static AVAudioSessionRouteSharingPolicy API_AVAILABLE(ios(11.0))
+static AVAudioSessionRouteSharingPolicy API_AVAILABLE(ios(11.0) 
VISIONOS_API_AVAILABLE)
 GetRouteSharingPolicy(audio_output_t *p_aout)
 {
 #if __IPHONEOS_VERSION_MAX_ALLOWED < 13
@@ -144,7 +154,7 @@ GetRouteSharingPolicy(audio_output_t *p_aout)
 AVAudioSessionRouteSharingPolicy policy = 
AVAudioSessionRouteSharingPolicyLongFormAudio;
 AVAudioSessionRouteSharingPolicy video_policy;
 #if !TARGET_OS_TV
-if (@available(iOS 13.0, *))
+if (@available(iOS 13.0 VISIONOS_AVAILABLE, *))
 video_policy = AVAudioSessionRouteSharingPolicyLongFormVideo;
 else
 #endif
@@ -188,7 +198,7 @@ avas_SetActive(audio_output_t *p_aout, AVAudioSession 
*instance, bool active,
 
 if (active)
 {
-if (@available(iOS 11.0, tvOS 11.0, *))
+if (@available(iOS 11.0, tvOS 11.0 VISIONOS_AVAILABLE, *))
 {
 AVAudioSessionRouteSharingPolicy policy = 
GetRouteSharingPolicy(p_aout);
 
@@ -207,6 +217,11 @@ avas_SetActive(audio_output_t *p_aout, AVAudioSession 
*instance, bool active,
 /* Not AVAudioSessionRouteSharingPolicy on older devices */
 }
 ret = ret && [instance setActive:YES withOptions:options error:&error];
+#if TARGET_OS_VISION
+ret = ret && [instance 
setIntendedSpatialExperience:AVAudioSessionSpatialExperienceFixed
+options:nil
+  error:&error];
+#endif
 if (ret)
 vlc_atomic_rc_inc(&active_rc);
 } else {


=
modules/audio_output/apple/avsamplebuffer.m
=
@@ -28,7 +28,7 @@
 #import 
 #import 
 
-#if TARGET_OS_IPHONE || TARGET_OS_TV
+#if TARGET_OS_IPHONE || TARGET_OS_TV || TARGET_OS_VISION
 #define HAS_AVAUDIOSESSION
 #import "avaudiosession_common.h"
 #endif
@@ -40,9 +40,19 @@
 #define MIN_IOS 14.5
 #define MIN_TVOS 14.5
 
+// work-around to fix compilation on older Xcode releases
+#if defined(TARGET_OS_VISION) && TARGET_OS_VISION
+#define MIN_VISIONOS 1.0
+#define VISIONOS_API_AVAILABLE , visiono

[vlc-commits] [Git][videolan/vlc][master] iosvlc: add support for visionOS

2024-06-03 Thread @fkuehne


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


Commits:
fd6fa7ac by Felix Paul Kühne at 2024-06-03T09:36:48+00:00
iosvlc: add support for visionOS

This enables the pinch gesture and solves a problem with UIScreen being
unavailable on this platform

- - - - -


2 changed files:

- test/Makefile.am
- test/iosvlc.m


Changes:

=
test/Makefile.am
=
@@ -449,6 +449,10 @@ if HAVE_TVOS
 noinst_PROGRAMS += vlccoreios
 endif
 
+if HAVE_XROS
+noinst_PROGRAMS += vlccoreios
+endif
+
 vlc_window_SOURCES = vlc-window.c
 vlc_window_CPPFLAGS = $(AM_CPPFLAGS) -I../include/
 vlc_window_LDADD = ../lib/libvlc.la ../src/libvlccore.la ../compat/libcompat.la


=
test/iosvlc.m
=
@@ -46,7 +46,7 @@
 UIWindow *window;
 UIView *subview;
 
-#if TARGET_OS_IOS
+#if !TARGET_OS_TV
 UIPinchGestureRecognizer *_pinchRecognizer;
 #endif
 
@@ -58,7 +58,7 @@
 
 
 @implementation AppDelegate
-#if TARGET_OS_IOS
+#if !TARGET_OS_TV
 - (void)pinchRecognized:(UIPinchGestureRecognizer *)pinchRecognizer
 {
 UIGestureRecognizerState state = [pinchRecognizer state];
@@ -113,7 +113,12 @@
 return NO;
 
 /* Initialize main window */
+#if TARGET_OS_VISION
+/* UIScreen is unavailable so we need create a size on our own */
+window = [[UIWindow alloc] initWithFrame:CGRectMake(0., 0., 1200., 800.)];
+#else
 window = [[UIWindow alloc] initWithFrame:UIScreen.mainScreen.bounds];
+#endif
 window.rootViewController = [[UIViewController alloc] init];
 window.backgroundColor = [UIColor whiteColor];
 
@@ -122,7 +127,7 @@
 [window addSubview:subview];
 [window makeKeyAndVisible];
 
-#if TARGET_OS_IOS
+#if !TARGET_OS_TV
 _pinchRecognizer = [[UIPinchGestureRecognizer alloc]
 initWithTarget:self action:@selector(pinchRecognized:)];
 [window addGestureRecognizer:_pinchRecognizer];



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

-- 
This project does not include diff previews in email notifications.
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/fd6fa7ac1514821a96a34d455756ff5da1157702
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] 11 commits: macosx: Add clickable buttons for carousel base container view

2024-06-03 Thread @fkuehne


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


Commits:
d8c777d2 by Claudio Cambra at 2024-06-03T09:12:03+00:00
macosx: Add clickable buttons for carousel base container view

Signed-off-by: Claudio Cambra 

- - - - -
5921d482 by Claudio Cambra at 2024-06-03T09:12:03+00:00
macosx: Make left and right buttons in carousel view functional

Signed-off-by: Claudio Cambra 

- - - - -
9404a842 by Claudio Cambra at 2024-06-03T09:12:03+00:00
macosx: Clean up instantiation of buttons and images in carousel view

Signed-off-by: Claudio Cambra 

- - - - -
2ec631c4 by Claudio Cambra at 2024-06-03T09:12:03+00:00
macosx: Expose left and right buttons as properties of carousel view

Signed-off-by: Claudio Cambra 

- - - - -
f0c23ce3 by Claudio Cambra at 2024-06-03T09:12:03+00:00
macosx: Improve styling of left and right buttons in carousel view

Signed-off-by: Claudio Cambra 

- - - - -
bc3745c8 by Claudio Cambra at 2024-06-03T09:12:03+00:00
macosx: Improve left and right button sizing in carousel views

Signed-off-by: Claudio Cambra 

- - - - -
cffaefbd by Claudio Cambra at 2024-06-03T09:12:03+00:00
macosx: Add padding between carousel items and leading button

Signed-off-by: Claudio Cambra 

- - - - -
4a89acef by Claudio Cambra at 2024-06-03T09:12:03+00:00
macosx: Use circular buttons for carousel

Signed-off-by: Claudio Cambra 

- - - - -
e057cefe by Claudio Cambra at 2024-06-03T09:12:03+00:00
macosx: Update visibility of buttons depending on current button in carousel 
views

Signed-off-by: Claudio Cambra 

- - - - -
3b5b3b5d by Claudio Cambra at 2024-06-03T09:12:03+00:00
macosx: Remove leading padding for carousel in carousel view

Signed-off-by: Claudio Cambra 

- - - - -
c27a4b9d by Claudio Cambra at 2024-06-03T09:12:03+00:00
macosx: Do not show carousel buttons if only one item (or fewer)

Signed-off-by: Claudio Cambra 

- - - - -


2 changed files:

- 
modules/gui/macosx/library/home-library/VLCLibraryHomeViewBaseCarouselContainerView.h
- 
modules/gui/macosx/library/home-library/VLCLibraryHomeViewBaseCarouselContainerView.m


Changes:

=
modules/gui/macosx/library/home-library/VLCLibraryHomeViewBaseCarouselContainerView.h
=
@@ -33,6 +33,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 @property (readonly) NSTextField *titleView;
 @property (readonly) iCarousel *carouselView;
+@property (readonly) NSButton *leftButton;
+@property (readonly) NSButton *rightButton;
 @property (readonly) NSObject *delegate;
 @property (readonly) NSObject *dataSource;
 // We want the carousel view to be packed tight around the actual items and 
not have excess space.


=
modules/gui/macosx/library/home-library/VLCLibraryHomeViewBaseCarouselContainerView.m
=
@@ -109,10 +109,41 @@
 [self.bottomAnchor 
constraintEqualToAnchor:self.carouselView.bottomAnchor]
 ]];
 
+const CGFloat buttonWidth = VLCLibraryUIUnits.largeSpacing;
+const CGFloat buttonHeight = 
+VLCLibraryUIUnits.carouselViewItemViewHeight - 
VLCLibraryUIUnits.largeSpacing;
+
+NSImage * const leftImage = [NSImage imageNamed:@"NSGoLeftTemplate"];
+_leftButton = [[NSButton alloc] initWithFrame:NSZeroRect];
+self.leftButton.translatesAutoresizingMaskIntoConstraints = NO;
+self.leftButton.image = leftImage;
+self.leftButton.bezelStyle = NSBezelStyleCircular;
+self.leftButton.target = self;
+self.leftButton.action = @selector(scrollLeft:);
+[self addSubview:self.leftButton];
+[NSLayoutConstraint activateConstraints:@[
+[self.leftButton.leadingAnchor 
constraintEqualToAnchor:self.leadingAnchor],
+[self.leftButton.centerYAnchor 
constraintEqualToAnchor:self.carouselView.centerYAnchor]
+]];
+
+NSImage * const rightImage = [NSImage imageNamed:@"NSGoRightTemplate"];
+_rightButton = [[NSButton alloc] initWithFrame:NSZeroRect];
+self.rightButton.translatesAutoresizingMaskIntoConstraints = NO;
+self.rightButton.image = rightImage;
+self.rightButton.bezelStyle = NSBezelStyleCircular;
+self.rightButton.target = self;
+self.rightButton.action = @selector(scrollRight:);
+[self addSubview:self.rightButton];
+[NSLayoutConstraint activateConstraints:@[
+[self.rightButton.trailingAnchor 
constraintEqualToAnchor:self.carouselView.trailingAnchor],
+[self.rightButton.centerYAnchor 
constraintEqualToAnchor:self.carouselView.centerYAnchor]
+]];
+
 _itemHeight = VLCLibraryUIUnits.carouselViewItemViewHeight;
 
 [self updateCarouselViewHeight];
 [self updateCarouselOffset];
+[self updateCarouselButto

[vlc-commits] [Git][videolan/vlc][3.0.x] 5 commits: upnp: encode the object ID in the exposed URL

2024-06-03 Thread @fkuehne


Felix Paul Kühne pushed to branch 3.0.x at VideoLAN / VLC


Commits:
9b4bd076 by Alaric Senat at 2024-06-03T08:25:58+00:00
upnp: encode the object ID in the exposed URL

Object ID is not supposed to be URI-encoded by default and can be pretty
much any valid string. Since we add it to a valid encoded URL, we need
to encode it to preserve the URL validity.

(cherry picked from commit 5d5ccbc0fa309d2aa07ca840ab66e9403fd15b03)

- - - - -
dc82b76d by Alaric Senat at 2024-06-03T08:25:58+00:00
upnp: avoid double URL query start values

This patch completes ac99cee9f34fa17e0595d8b31a2dd1ff723c0719.
It avoids corrupting URLs with an already present query list.

(cherry picked from commit 0cba1475ba9c2d89b19c4e81a928e4305e6e97ad)

- - - - -
a5e97d74 by Alaric Senat at 2024-06-03T08:25:58+00:00
upnp: implement root MRL forging with std::string

Switching to std::string simplifies the next patch changing the URL
scheme.

(cherry picked from commit bc1d58c065d1a359863f3bc4216351b54c60e51d)

- - - - -
237ab100 by Alaric Senat at 2024-06-03T08:25:58+00:00
upnp: enforce HTTP(S) as the only supported protocols

In preparation for the next commit, explicitly refuse any protocols
that are not supported by libpupnp. It's unclear if it's needed and
pupnp probably already perform this check, but the next commit rely
heavily on the scheme matching "http" or "https" only.

(cherry picked from commit 44de051a61475a899f1bd71a3db0e737a481b41f)

- - - - -
0229706f by Alaric Senat at 2024-06-03T08:25:58+00:00
upnp: fix exposed directory URLs schemes

Previous implementation generated input item directories with URLs not
compliant with *RFC 3986* in an attempt to keep the original URL while
triggering the UPNP directory acces properly. Here's an exemple of a
previous upnp directory url:

> upnp://http://192.168.1.109:32469/cds?ObjectID=0

The stacking of schemes (`upnp://http://`) is problematic and leads to
most of the validators failing on those generated URLs (see the
referenced issue).

This patch fix the issue by simply replacing the original `http://`
scheme by `upnp://` instead of stacking both. To avoid any potential
regression with some obscure usage forcing https, a shortcut of the
directory access is introduced for https specificaly.

The example above would then be fixed like that:

> upnp://192.168.1.109:32469/cds?ObjectID=0

Potential use-cases with https would instead generate the following:

> upnps://192.168.1.109:32469/cds?ObjectID=0

Refs VLCKit#728

(cherry picked from commit 241fed315be92f4a12ced2afdffd79f5fd638ff4)

- - - - -


2 changed files:

- modules/services_discovery/upnp.cpp
- modules/services_discovery/upnp.hpp


Changes:

=
modules/services_discovery/upnp.cpp
=
@@ -139,6 +139,7 @@ vlc_module_begin()
 set_subcategory( SUBCAT_INPUT_ACCESS )
 set_callbacks( Access::Open, Access::Close )
 set_capability( "access", 0 )
+add_shortcut( "upnp", "upnps" )
 
 VLC_SD_PROBE_SUBMODULE
 vlc_module_end()
@@ -350,17 +351,31 @@ bool MediaServerList::addServer( MediaServerDesc* desc )
 free( psz_playlist_option );
 }
 } else {
-char* psz_mrl;
-// We might already have some options specified in the location.
-char opt_delim = desc->location.find( '?' ) == std::string::npos ? '?' 
: '&';
-if( asprintf( &psz_mrl, "upnp://%s%cObjectID=0", 
desc->location.c_str(), opt_delim ) < 0 )
+const auto loc_starts_with = [desc](const char *s) {
+return desc->location.compare(0, strlen(s), s) == 0;
+};
+
+if ( !loc_starts_with("http://";) && !loc_starts_with("https://";) )
+{
+msg_Warn( m_sd, "Unexpected underlying protocol, the UPNP module "
+  "fully supports HTTP and has partial support for HTTPS" 
);
 return false;
+} 
+
+std::string mrl = desc->location;
+
+// Replace the scheme to trigger the directory access.
+mrl.replace( 0, 4, "upnp" );
+
+// Forge a root object ID in the MRL, this is used in the dir access.
+if ( desc->location.find( '?' ) == std::string::npos )
+mrl += "?ObjectID=0";
+else 
+mrl += "&ObjectID=0";
 
-p_input_item = input_item_NewDirectory( psz_mrl,
+p_input_item = input_item_NewDirectory( mrl.c_str(),
 desc->friendlyName.c_str(),
 ITEM_NET );
-free( psz_mrl );
-
 if ( !p_input_item )
 return false;
 
@@ -953,8 +968,17 @@ namespace
 if ( objectID == NULL || title == NULL )
 return NULL;
 
+char *encoded_id = vlc_uri_encode( objectID );
+if ( unlikely(encoded_id == NULL) )
+return NULL;
+
+const char opt_delim = strrchr( psz_root, '?' ) == NULL ? '?' : 
'&';
+
 

[vlc-commits] [Git][videolan/vlc][master] 10 commits: macosx: Deduplicate context menu setup and presentation in VLCLibraryCollectionViewItem

2024-06-02 Thread @fkuehne


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


Commits:
8fa287ca by Claudio Cambra at 2024-06-02T11:57:18+00:00
macosx: Deduplicate context menu setup and presentation in 
VLCLibraryCollectionViewItem

Signed-off-by: Claudio Cambra 

- - - - -
8880dcce by Claudio Cambra at 2024-06-02T11:57:18+00:00
macosx: Replace deprecated NSControlKeyMask with NSEventModifierFlagControl in 
VLCLibraryCollectionViewItem

Signed-off-by: Claudio Cambra 

- - - - -
0f9d3db0 by Claudio Cambra at 2024-06-02T11:57:18+00:00
macosx: Add representedItemsAtIndexPaths method to 
VLCLibraryCollectionViewDataSource protocol

Signed-off-by: Claudio Cambra 

- - - - -
9b711f11 by Claudio Cambra at 2024-06-02T11:57:18+00:00
macosx: If possible, set a collection view's selected items as the 
represented items for a right-clicked colllection view item's menu

Signed-off-by: Claudio Cambra 

- - - - -
a755063b by Claudio Cambra at 2024-06-02T11:57:18+00:00
macosx: Set multiple selection to YES in collection views in library window XIB

Signed-off-by: Claudio Cambra 

- - - - -
4a7aa6cf by Claudio Cambra at 2024-06-02T11:57:18+00:00
macosx: Set multiple selection as allowed in library collection view's 
parent view controllers

Signed-off-by: Claudio Cambra 

- - - - -
656d3dc6 by Claudio Cambra at 2024-06-02T11:57:18+00:00
macosx: Fix collapse of supplementary detail view when multiple collection view 
items deselected

Signed-off-by: Claudio Cambra 

- - - - -
86453a3c by Claudio Cambra at 2024-06-02T11:57:18+00:00
macosx: Use XIBs as single source of truth on collection view selection settings

Signed-off-by: Claudio Cambra 

- - - - -
611c25ef by Claudio Cambra at 2024-06-02T11:57:18+00:00
macosx: Fix selectability of library collection view items in library window XIB

Signed-off-by: Claudio Cambra 

- - - - -
5b983caa by Claudio Cambra at 2024-06-02T11:57:18+00:00
macosx: Fix indentation in VLCLibraryCollectionViewItem rightMouseDown

Signed-off-by: Claudio Cambra 

- - - - -


11 changed files:

- modules/gui/macosx/UI/VLCLibraryWindow.xib
- modules/gui/macosx/library/VLCLibraryCollectionViewDataSource.h
- modules/gui/macosx/library/VLCLibraryCollectionViewDelegate.m
- modules/gui/macosx/library/VLCLibraryCollectionViewItem.m
- modules/gui/macosx/library/audio-library/VLCLibraryAudioDataSource.m
- modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupDataSource.m
- modules/gui/macosx/library/audio-library/VLCLibraryAudioViewController.m
- 
modules/gui/macosx/library/home-library/VLCLibraryHomeViewVideoContainerViewDataSource.m
- 
modules/gui/macosx/library/home-library/VLCLibraryHomeViewVideoGridContainerView.m
- modules/gui/macosx/library/video-library/VLCLibraryVideoDataSource.m
- modules/gui/macosx/library/video-library/VLCLibraryVideoViewController.m


Changes:

=
modules/gui/macosx/UI/VLCLibraryWindow.xib
=
@@ -626,8 +626,8 @@
 
 
 
-
-
+
+
 
 
 
@@ -852,7 +852,7 @@
 
 
 
-
+
 
 
 
@@ -993,7 +993,7 @@
 
 
 
-
+
 
 
 
@@ -1150,7 +1150,7 @@
 
 
 
-
+
 
 
 


=
modules/gui/macosx/library/VLCLibraryCollectionViewDataSource.h
=
@@ -24,6 +24,7 @@
 
 NS_ASSUME_NONNULL_BEGIN
 
+@class VLCLibraryRepresentedItem;
 @protocol VLCMediaLibraryItemProtocol;
 
 @protocol VLCLibraryCollectionViewDataSource 
@@ -31,6 +32,9 @@ NS_ASSUME_NONNULL_BEGIN
 - (id)libraryItemAtIndexPath:(NSIndexPath 
*)indexPath
 forCollectionView:(NSCollectionView 
*)collectionView;
 - (NSIndexPath 
*)indexPathForLibraryItem:(id)libraryItem;
+- (NSArray 
*)representedItemsAt

[vlc-commits] [Git][videolan/vlc][master] 2 commits: macosx: Fix reloadData breaking carousel item views in iCarousel

2024-06-02 Thread @fkuehne


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


Commits:
fb29981a by Claudio Cambra at 2024-06-02T08:00:53+00:00
macosx: Fix reloadData breaking carousel item views in iCarousel

Signed-off-by: Claudio Cambra 

- - - - -
009960d4 by Claudio Cambra at 2024-06-02T08:00:53+00:00
macosx: Remove autoscroll and wrapping in home view carousels

Signed-off-by: Claudio Cambra 

- - - - -


2 changed files:

- 
modules/gui/macosx/library/home-library/VLCLibraryHomeViewBaseCarouselContainerView.m
- modules/gui/macosx/views/iCarousel/iCarousel.m


Changes:

=
modules/gui/macosx/library/home-library/VLCLibraryHomeViewBaseCarouselContainerView.m
=
@@ -113,9 +113,6 @@
 
 [self updateCarouselViewHeight];
 [self updateCarouselOffset];
-
-self.carouselView.autoscroll = -.05;
-self.carouselView.reenablePostInteractAutoscrollTimeout = 3.;
 }
 
 - (void)connect
@@ -209,8 +206,6 @@
 const CGFloat desiredMultiple = desiredWidthWithSpacing / itemWidth;
 return desiredMultiple;
 }
-case iCarouselOptionWrap:
-return YES;
 default:
 return value;
 }


=
modules/gui/macosx/views/iCarousel/iCarousel.m
=
@@ -1372,6 +1372,11 @@ NSComparisonResult compareViewDepth(UIView *view1, 
UIView *view2, iCarousel *sel
 {
 [self scrollToItemAtIndex:0 animated:(_numberOfPlaceholders > 0)];
 }
+
+[self loadUnloadViews];
+[self pushAnimationState:NO];
+[self layOutItemViews];
+[self popAnimationState];
 }
 
 



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/05134504b0dd59100db6327acd2ad7b06b149cb2...009960d468e356fdb1e67b24ae9e2a4484311f59

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


  1   2   3   4   >