[vlc-commits] [Git][videolan/vlc][3.0.x] macosx: use VLC as CFBundleName
Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC Commits: 6f813f37 by Marvin Scholz at 2024-05-06T06:06:22+00:00 macosx: use VLC as CFBundleName Fix #28432 (cherry picked from commit 63d44f046a59f0090954022a9b44903f114152b0) Signed-off-by: Marvin Scholz- - - - - 1 changed file: - share/Info.plist.in Changes: = share/Info.plist.in = @@ -1396,7 +1396,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleName - VLC media player + VLC CFBundleDisplayName VLC CFBundleShortVersionString View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/6f813f37e989d43da625fcdf8e63a28b06ca5bdb -- View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/6f813f37e989d43da625fcdf8e63a28b06ca5bdb 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] 18 commits: contrib: qtbase: disable feature `movie`
Steve Lhomme pushed to branch master at VideoLAN / VLC Commits: 4494e8b2 by Fatih Uzunoglu at 2024-05-06T05:20:31+00:00 contrib: qtbase: disable feature `movie` - - - - - 07e44f28 by Fatih Uzunoglu at 2024-05-06T05:20:31+00:00 contrib: qtbase: disable feature `pdf` - - - - - 8caeb648 by Fatih Uzunoglu at 2024-05-06T05:20:31+00:00 contrib: qtbase: disable feature `whatsthis` - - - - - a7bbd0be by Fatih Uzunoglu at 2024-05-06T05:20:31+00:00 contrib: qtbase: disable feature `style-fusion` on windows Windows Vista or Windows 11 style is used on Windows. Fusion style is not necessary. - - - - - 6bde59b8 by Fatih Uzunoglu at 2024-05-06T05:20:31+00:00 contrib: qtbase: disable feature `lcdnumber` - - - - - e815ce07 by Fatih Uzunoglu at 2024-05-06T05:20:31+00:00 contrib: qtbase: disable feature `syntaxhighlighter` - - - - - 93037e17 by Fatih Uzunoglu at 2024-05-06T05:20:31+00:00 contrib: qtbase: disable feature `undoview` - - - - - 51356167 by Fatih Uzunoglu at 2024-05-06T05:20:31+00:00 contrib: qtbase: disable feature `splashscreen` - - - - - 1fe394cd by Fatih Uzunoglu at 2024-05-06T05:20:31+00:00 contrib: qtbase: disable feature `dockwidget` - - - - - e7a748ba by Fatih Uzunoglu at 2024-05-06T05:20:31+00:00 contrib: qtbase: disable feature `mdiarea` - - - - - b5f17789 by Fatih Uzunoglu at 2024-05-06T05:20:31+00:00 contrib: qtbase: disable feature `statusbar` - - - - - b3ac4574 by Fatih Uzunoglu at 2024-05-06T05:20:31+00:00 contrib: qtbase: disable feature `statustip` - - - - - b91b8482 by Fatih Uzunoglu at 2024-05-06T05:20:31+00:00 contrib: qtbase: disable feature `keysequenceedit` - - - - - 719eb06d by Fatih Uzunoglu at 2024-05-06T05:20:31+00:00 contrib: qtdeclarative: disable feature `quick-animatedimage` - - - - - e710da4c by Fatih Uzunoglu at 2024-05-06T05:20:31+00:00 contrib: qtdeclarative: disable feature `quick-flipable` - - - - - d2d6068b by Fatih Uzunoglu at 2024-05-06T05:20:31+00:00 contrib: qtdeclarative: disable feature `quick-sprite` - - - - - 1f994ae6 by Fatih Uzunoglu at 2024-05-06T05:20:31+00:00 contrib: qtdeclarative: disable feature `quick-canvas` - - - - - 98a99a04 by Fatih Uzunoglu at 2024-05-06T05:20:31+00:00 contrib: qtdeclarative: disable feature `quicktemplates2-calendar` - - - - - 2 changed files: - contrib/src/qt/rules.mak - contrib/src/qtdeclarative/rules.mak Changes: = contrib/src/qt/rules.mak = @@ -60,10 +60,18 @@ ifdef HAVE_CROSS_COMPILE QTBASE_PLATFORM := -device-option CROSS_COMPILE=$(HOST)- endif +ifdef HAVE_WIN32 +QTBASE_CONFIG += -no-feature-style-fusion +endif + QTBASE_CONFIG += -static -opensource -confirm-license -opengl desktop -no-pkg-config -no-openssl \ -no-gif -no-dbus -no-feature-zstd -no-feature-concurrent -no-feature-androiddeployqt \ -no-feature-sql -no-feature-testlib -system-freetype -system-harfbuzz -system-libjpeg \ -no-feature-xml -no-feature-printsupport -system-libpng -system-zlib -no-feature-network \ + -no-feature-movie -no-feature-pdf -no-feature-whatsthis -no-feature-lcdnumber \ + -no-feature-syntaxhighlighter -no-feature-undoview -no-feature-splashscreen \ + -no-feature-dockwidget -no-feature-mdiarea -no-feature-statusbar -no-feature-statustip \ + -no-feature-keysequenceedit \ -nomake examples -prefix $(PREFIX) -qt-host-path $(BUILDPREFIX) \ -- -DCMAKE_TOOLCHAIN_FILE=$(abspath toolchain.cmake) = contrib/src/qtdeclarative/rules.mak = @@ -63,7 +63,12 @@ QT_DECLARATIVE_COMMON_CONFIG := \ -DFEATURE_quickcontrols2_universal=OFF \ -DFEATURE_quickcontrols2_macos=OFF \ -DFEATURE_quickcontrols2_ios=OFF \ - -DFEATURE_qml_network=OFF + -DFEATURE_qml_network=OFF \ + -DFEATURE_quick_animatedimage=OFF \ + -DFEATURE_quick_flipable=OFF \ + -DFEATURE_quick_sprite=OFF \ + -DFEATURE_quick_canvas=OFF \ + -DFEATURE_quicktemplates2_calendar=OFF QT_DECLARATIVE_CONFIG := $(QT_DECLARATIVE_COMMON_CONFIG) \ -DCMAKE_TOOLCHAIN_FILE=$(PREFIX)/lib/cmake/Qt6/qt.toolchain.cmake \ View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/6497bee48a9d7844532a715759b0b65a1bae7363...98a99a04428607685d04ded890b1728e44cf9387 -- View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/6497bee48a9d7844532a715759b0b65a1bae7363...98a99a04428607685d04ded890b1728e44cf9387 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] 4 commits: freetype: darwin: fix font index issue
Jean-Baptiste Kempf pushed to branch 3.0.x at VideoLAN / VLC Commits: 2a2eaf62 by Jiepeng Huang at 2024-05-06T02:07:49+02:00 freetype: darwin: fix font index issue In macOS/iOS/tvOS, font collection file contains multiple fonts. The 0 index should not be used by default, but the corresponding index should be used. This will fix some font rendering bugs and fallback font bugs. (manual cherry picked from commit 2e3c0fb6bc38fdad5f894611b3b9eaa0ace2c746) Signed-off-by: Marvin Scholz- - - - - f6f11faf by Jiepeng Huang at 2024-05-06T02:07:49+02:00 freetype: darwin: ignore case whe comparing The `psz_lcname` is lowercase, so we need to use `strcasecmp` instead. (cherry picked from commit c52066f20458165436ff9c8831869fa783d12a30) Signed-off-by: Marvin Scholz - - - - - a072f541 by Jiepeng Huang at 2024-05-06T02:21:10+02:00 text_renderer: improve code style in darwin.c (cherry picked from commit 96ae876dc8523939a1092bfdbb31138eb8f99e69) Signed-off-by: Marvin Scholz - - - - - 6c952047 by Jiepeng Huang at 2024-05-06T02:21:10+02:00 text_renderer: change -1 to kCFNotFound (cherry picked from commit 6497bee48a9d7844532a715759b0b65a1bae7363) Signed-off-by: Marvin Scholz - - - - - 1 changed file: - modules/text_renderer/freetype/fonts/darwin.c Changes: = modules/text_renderer/freetype/fonts/darwin.c = @@ -41,7 +41,7 @@ #include "../platform_fonts.h" char* getPathForFontDescription(CTFontDescriptorRef fontDescriptor); -void addNewFontToFamily(filter_t *p_filter, CTFontDescriptorRef iter, char *path, vlc_family_t *family); +void addNewFontToFamily(filter_t *p_filter, CTFontDescriptorRef iter, char *path, vlc_family_t *family, int index); char* getPathForFontDescription(CTFontDescriptorRef fontDescriptor) @@ -60,7 +60,52 @@ char* getPathForFontDescription(CTFontDescriptorRef fontDescriptor) return retPath; } -void addNewFontToFamily(filter_t *p_filter, CTFontDescriptorRef iter, char *path, vlc_family_t *p_family) +static CFIndex getFontIndexInFontFile(const char* psz_filePath, const char* psz_family) { +CFIndex index = kCFNotFound; +CFURLRef url = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, (const UInt8 *)psz_filePath, strlen(psz_filePath), false); +if (url == NULL) { +return kCFNotFound; +} +CFArrayRef fontDescriptors = CTFontManagerCreateFontDescriptorsFromURL(url); +if (fontDescriptors == NULL) { +CFRelease(url); +return kCFNotFound; +} +CFIndex numberOfFontDescriptors = CFArrayGetCount(fontDescriptors); +CFStringRef targetFontName = CFStringCreateWithCString(kCFAllocatorDefault, psz_family, kCFStringEncodingUTF8); +if (targetFontName == NULL) { +CFRelease(fontDescriptors); +CFRelease(url); +return kCFNotFound; +} + +for (CFIndex i = 0; i < numberOfFontDescriptors; i++) { +CTFontDescriptorRef descriptor = (CTFontDescriptorRef)CFArrayGetValueAtIndex(fontDescriptors, i); +CFStringRef familyName = (CFStringRef)CTFontDescriptorCopyAttribute(descriptor, kCTFontFamilyNameAttribute); +CFStringRef fontName = (CFStringRef)CTFontDescriptorCopyAttribute(descriptor, kCTFontNameAttribute); +CFStringRef displayName = (CFStringRef)CTFontDescriptorCopyAttribute(descriptor, kCTFontDisplayNameAttribute); + +if (CFStringCompare(targetFontName, familyName, kCFCompareCaseInsensitive) == kCFCompareEqualTo || +CFStringCompare(targetFontName, fontName, kCFCompareCaseInsensitive) == kCFCompareEqualTo || +CFStringCompare(targetFontName, displayName, kCFCompareCaseInsensitive) == kCFCompareEqualTo) { +index = i; +} + +CFRelease(familyName); +CFRelease(fontName); +CFRelease(displayName); + +if (index != kCFNotFound) { +break; +} +} +CFRelease(targetFontName); +CFRelease(fontDescriptors); +CFRelease(url); +return index; +} + +void addNewFontToFamily(filter_t *p_filter, CTFontDescriptorRef iter, char *path, vlc_family_t *family, int index) { bool b_bold = false; bool b_italic = false; @@ -79,7 +124,7 @@ void addNewFontToFamily(filter_t *p_filter, CTFontDescriptorRef iter, char *path #else VLC_UNUSED(p_filter); #endif -NewFont(path, 0, b_bold, b_italic, p_family); +NewFont(path, index, b_bold, b_italic, family); CFRelease(fontTraits); } @@ -166,7 +211,14 @@ const vlc_family_t *CoreText_GetFamily(filter_t *p_filter, const char *psz_famil continue; } -addNewFontToFamily(p_filter, iter, path, p_family); +/* get the index of the font family in the font file */ +CFIndex fontIndex = getFontIndexInFontFile(path, psz_lc); +if (fontIndex == kCFNotFound) { +FREENULL(path); +c
[vlc-commits] [Git][videolan/vlc][master] 2 commits: text_renderer: improve code style in darwin.c
Marvin Scholz pushed to branch master at VideoLAN / VLC Commits: 96ae876d by Jiepeng Huang at 2024-05-05T23:07:57+00:00 text_renderer: improve code style in darwin.c - - - - - 6497bee4 by Jiepeng Huang at 2024-05-05T23:07:57+00:00 text_renderer: change -1 to kCFNotFound - - - - - 1 changed file: - modules/text_renderer/freetype/fonts/darwin.c Changes: = modules/text_renderer/freetype/fonts/darwin.c = @@ -56,62 +56,48 @@ static char* getPathForFontDescription(CTFontDescriptorRef fontDescriptor) return retPath; } -int getFontIndexInFontFile(const char* psz_filePath, const char* psz_family) { -CFStringRef cfFilePath = CFStringCreateWithCString(kCFAllocatorDefault, psz_filePath, kCFStringEncodingUTF8); -if (cfFilePath == NULL) { -return -1; -} -CFURLRef url = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, cfFilePath, kCFURLPOSIXPathStyle, false); +CFIndex getFontIndexInFontFile(const char* psz_filePath, const char* psz_family) { +CFIndex index = kCFNotFound; +CFURLRef url = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, (const UInt8 *)psz_filePath, strlen(psz_filePath), false); if (url == NULL) { -CFRelease(cfFilePath); -return -1; +return kCFNotFound; } CFArrayRef fontDescriptors = CTFontManagerCreateFontDescriptorsFromURL(url); if (fontDescriptors == NULL) { -CFRelease(cfFilePath); CFRelease(url); -return -1; +return kCFNotFound; } CFIndex numberOfFontDescriptors = CFArrayGetCount(fontDescriptors); - -int index = 0; +CFStringRef targetFontName = CFStringCreateWithCString(kCFAllocatorDefault, psz_family, kCFStringEncodingUTF8); +if (targetFontName == NULL) { +CFRelease(fontDescriptors); +CFRelease(url); +return kCFNotFound; +} for (CFIndex i = 0; i < numberOfFontDescriptors; i++) { CTFontDescriptorRef descriptor = (CTFontDescriptorRef)CFArrayGetValueAtIndex(fontDescriptors, i); CFStringRef familyName = (CFStringRef)CTFontDescriptorCopyAttribute(descriptor, kCTFontFamilyNameAttribute); CFStringRef fontName = (CFStringRef)CTFontDescriptorCopyAttribute(descriptor, kCTFontNameAttribute); CFStringRef displayName = (CFStringRef)CTFontDescriptorCopyAttribute(descriptor, kCTFontDisplayNameAttribute); -char* familyNameStr = FromCFString(familyName, kCFStringEncodingUTF8); -char* fontNameStr = FromCFString(fontName, kCFStringEncodingUTF8); -char* displayNameStr = FromCFString(displayName, kCFStringEncodingUTF8); -if (!strcasecmp(familyNameStr, psz_family) || !strcasecmp(fontNameStr, psz_family) || !strcasecmp(displayNameStr, psz_family)) { +if (CFStringCompare(targetFontName, familyName, kCFCompareCaseInsensitive) == kCFCompareEqualTo || +CFStringCompare(targetFontName, fontName, kCFCompareCaseInsensitive) == kCFCompareEqualTo || +CFStringCompare(targetFontName, displayName, kCFCompareCaseInsensitive) == kCFCompareEqualTo) { index = i; -FREENULL(familyNameStr); -FREENULL(fontNameStr); -FREENULL(displayNameStr); -CFRelease(familyName); -CFRelease(fontName); -CFRelease(displayName); -break; } -FREENULL(familyNameStr); -FREENULL(fontNameStr); -FREENULL(displayNameStr); CFRelease(familyName); CFRelease(fontName); CFRelease(displayName); + +if (index != kCFNotFound) { +break; +} } -if (fontDescriptors != NULL) { -CFRelease(fontDescriptors); -} -if (url != NULL) { -CFRelease(url); -} -if (cfFilePath != NULL) { -CFRelease(cfFilePath); -} +CFRelease(targetFontName); +CFRelease(fontDescriptors); +CFRelease(url); return index; } @@ -301,8 +287,8 @@ int CoreText_GetFamily(vlc_font_select_t *fs, const char *psz_lcname, } /* get the index of the font family in the font file */ -int fontIndex = getFontIndexInFontFile(path, psz_lcname); -if (fontIndex < 0) { +CFIndex fontIndex = getFontIndexInFontFile(path, psz_lcname); +if (fontIndex == kCFNotFound) { FREENULL(path); continue; } @@ -395,8 +381,8 @@ int CoreText_GetFallbacks(vlc_font_select_t *fs, const char *psz_lcname, } /* get the index of the font family in the font file */ -int fontIndex = getFontIndexInFontFile(psz_fontPath, psz_fallbackFamilyName); -if (fontIndex < 0) { +CFIndex fontIndex = getFontIndexInFontFile(psz_fontPath, psz_fallbackFamilyName); +if (fontIndex == kCFNotFound) { goto done; } View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/259c50c2bdb6a27c8d3319832f155fd2
[vlc-commits] [Git][videolan/vlc][master] qt: fix memory leak in NetworkDeviceModel
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC Commits: 259c50c2 by Prince Gupta at 2024-05-05T21:03:30+00:00 qt: fix memory leak in NetworkDeviceModel *GetMediaSource returns a strong reference which must be released by vlc_media_source_Release (see vlc_media_source_provider_GetMediaSource), store the returned referenced in appropriate RAII handler so it can be automatically removed at the end of scope - - - - - 1 changed file: - modules/gui/qt/network/networkdevicemodel.cpp Changes: = modules/gui/qt/network/networkdevicemodel.cpp = @@ -220,8 +220,10 @@ public: q->m_name += q->m_name.isEmpty() ? qfu( meta->longname ) : ", " + qfu( meta->longname ); emit q->nameChanged(); -auto mediaSource = vlc_media_source_provider_GetMediaSource( provider, - meta->name ); +MediaSourcePtr mediaSource( +vlc_media_source_provider_GetMediaSource(provider, meta->name) +, false ); + if ( mediaSource == nullptr ) continue; std::unique_ptr l{ new MediaTreeListener( View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/259c50c2bdb6a27c8d3319832f155fd2d3e448cb -- View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/259c50c2bdb6a27c8d3319832f155fd2d3e448cb 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: Added shuffle tooltip
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC Commits: 92123ac2 by Aakarsh MJ at 2024-05-05T20:27:53+00:00 qt: Added shuffle tooltip Fixes #28595 Signed-off-by: Aakarsh MJ- - - - - 1 changed file: - modules/gui/qt/playlist/qml/PlaylistToolbar.qml Changes: = modules/gui/qt/playlist/qml/PlaylistToolbar.qml = @@ -74,7 +74,7 @@ RowLayout { checked: MainPlaylistController.random font.pixelSize: VLCStyle.icon_playlist -Accessible.name: qsTr("Shuffle") +description: qsTr("Shuffle") text: VLCIcons.shuffle onClicked: MainPlaylistController.toggleRandom() focusPolicy: Qt.NoFocus View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/92123ac20990b6768a277f9aacc707898e8ef652 -- View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/92123ac20990b6768a277f9aacc707898e8ef652 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] 5 commits: qt: make MLPlaylistListModel::getItemId() invokable
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC Commits: 7fd37aac by Fatih Uzunoglu at 2024-05-05T18:00:33+00:00 qt: make MLPlaylistListModel::getItemId() invokable - - - - - e13f300d by Fatih Uzunoglu at 2024-05-05T18:00:33+00:00 qt: asynchronous method should not return a boolean in MLPlaylistListModel - - - - - 6b1622d0 by Fatih Uzunoglu at 2024-05-05T18:00:33+00:00 qt: allow appending input item into MLPlaylistListModel - - - - - e2d32aeb by Fatih Uzunoglu at 2024-05-05T18:00:33+00:00 qml: enable dropping in PlaylistMediaList With this patch, it is now possible to drag media library and input items directly into a playlist. New input item is created for an unknown source. So, actions such as dragging from file browser should also be supported as long as the drag event contains URLs. It is also possible to append a playlist into another playlist. Previously, it was only possible to first load the playlist in order to add items. Now, in the playlist view (the view where all the playlists are listed) items can be dropped in to the playlists. - - - - - d5c19a4f by Fatih Uzunoglu at 2024-05-05T18:00:33+00:00 qml: allow dropping items to background in PlaylistMediaList If items are dropped to background rather than into a playlist that is available, then a new playlist is created with the dropped items as its sole content. - - - - - 3 changed files: - modules/gui/qt/medialibrary/mlplaylistlistmodel.cpp - modules/gui/qt/medialibrary/mlplaylistlistmodel.hpp - modules/gui/qt/medialibrary/qml/PlaylistMediaList.qml Changes: = modules/gui/qt/medialibrary/mlplaylistlistmodel.cpp = @@ -27,6 +27,7 @@ #include "qt.hpp" #include "util/vlctick.hpp" #include "dialogs/dialogs_provider.hpp" +#include "playlist/playlist_controller.hpp" // MediaLibrary includes #include "mlhelper.hpp" @@ -116,48 +117,64 @@ void appendMediaIntoPlaylist(vlc_medialibrary_t* ml, int64_t playlistId, const s }); } -/* Q_INVOKABLE */ bool MLPlaylistListModel::append(const MLItemId & playlistId, +/* Q_INVOKABLE */ void MLPlaylistListModel::append(const MLItemId & playlistId, const QVariantList & ids) { assert(m_mediaLib); +assert(ids.size() > 0); if (unlikely(m_transactionPending)) -return false; +return; m_transactionPending = true; -bool result = true; -std::vector itemList; -for (const QVariant & id : ids) -{ -if (id.canConvert() == false) +m_mediaLib->runOnMLThread(this, +//ML thread +[playlistId, ids](vlc_medialibrary_t* ml) { +std::vector mlItemIdVector; +mlItemIdVector.reserve(ids.size()); + +if (ids.at(0).canConvert()) { -result = false; -continue; -} +for (const QVariant& id : ids) +{ +// Do not mix types. This is currently not possible +// in the application anyway. +assert(id.canConvert()); -const MLItemId & itemId = id.value(); +mlItemIdVector.push_back(id.value()); +} -if (itemId.id == 0) -{ -result = false; -continue; +appendMediaIntoPlaylist(ml, playlistId.id, mlItemIdVector); } -itemList.push_back(itemId); -} +else +{ +QVector medias = vlc::playlist::toMediaList(ids); -m_mediaLib->runOnMLThread(this, -//ML thread -[playlistId, itemList](vlc_medialibrary_t* ml) -{ -appendMediaIntoPlaylist(ml, playlistId.id, itemList); +for (const auto& media : medias) +{ +assert(media.raw()); + +const char * const uri = media.raw()->psz_uri; + +vlc_ml_media_t * ml_media = vlc_ml_get_media_by_mrl(ml, uri); + +if (ml_media == nullptr) +{ +ml_media = vlc_ml_new_external_media(ml, uri); +if (ml_media == nullptr) +continue; +} + +vlc_ml_playlist_append(ml, playlistId.id, ml_media->i_id); +vlc_ml_media_release(ml_media); +} +} }, //UI thread [this]() { endTransaction(); }); - -return result; } /* Q_INVOKABLE */ bool MLPlaylistListModel::deletePlaylists(const QVariantList & ids) = modules/gui/qt/medialibrary/mlplaylistlistmodel.hpp = @@ -64,13 +64,13 @@ public: public: // Interface Q_INVOKABLE void create(const QString & name, const QVariantList& initialItems); -Q_INVOKABLE bool append(const MLItemId & playlistId, const QVariantList & ids); +Q_INVOKABLE void append(const MLItemId & playlistId, const QVariantList & ids); Q_INVOKABLE boo
[vlc-commits] [Git][videolan/vlc][master] 9 commits: macosx: Add NSImage extension method to get thumbnail from localUrl asynchronously
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC Commits: 530a8554 by Claudio Cambra at 2024-05-05T17:15:36+00:00 macosx: Add NSImage extension method to get thumbnail from localUrl asynchronously Signed-off-by: Claudio Cambra- - - - - ab2e9a10 by Claudio Cambra at 2024-05-05T17:15:36+00:00 macosx: Make getting thumbnail image for input item async Signed-off-by: Claudio Cambra - - - - - 8ee07689 by Claudio Cambra at 2024-05-05T17:15:36+00:00 macosx: Enforce use of async thumbnailing Signed-off-by: Claudio Cambra - - - - - 64ae7930 by Claudio Cambra at 2024-05-05T17:15:36+00:00 macosx: Actually fetch the thumbnail in QuickLook thumbnail generator Signed-off-by: Claudio Cambra - - - - - 0444ac77 by Claudio Cambra at 2024-05-05T17:15:36+00:00 macosx: Fix check for stream in input item thumbnail generation Signed-off-by: Claudio Cambra - - - - - 5dc72cd2 by Claudio Cambra at 2024-05-05T17:15:36+00:00 macosx: Store async input item thumbnail in image cache Signed-off-by: Claudio Cambra - - - - - 0a46015f by Claudio Cambra at 2024-05-05T17:15:36+00:00 macosx: Just use folder icon for the input node path control item Signed-off-by: Claudio Cambra - - - - - b11661f1 by Claudio Cambra at 2024-05-05T17:15:36+00:00 macosx: Be more permissive with QL thumbnail representations Signed-off-by: Claudio Cambra - - - - - 3634ea93 by Claudio Cambra at 2024-05-05T17:15:36+00:00 macosx: Set image on cache for input item thumbnail on main queue Signed-off-by: Claudio Cambra - - - - - 10 changed files: - modules/gui/macosx/Makefile.am - modules/gui/macosx/extensions/NSImage+VLCAdditions.h - modules/gui/macosx/extensions/NSImage+VLCAdditions.m - modules/gui/macosx/library/VLCInputItem.h - modules/gui/macosx/library/VLCInputItem.m - modules/gui/macosx/library/VLCInputNodePathControlItem.m - modules/gui/macosx/library/VLCLibraryHeroView.m - modules/gui/macosx/library/VLCLibraryImageCache.h - modules/gui/macosx/library/VLCLibraryImageCache.m - modules/gui/macosx/panels/VLCInformationWindowController.m Changes: = modules/gui/macosx/Makefile.am = @@ -48,6 +48,7 @@ libmacosx_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(guidir)' \ -Wl,-framework,ScriptingBridge \ -Wl,-framework,WebKit \ -Wl,-framework,QuickLook \ + -Wl,-framework,QuickLookThumbnailing \ -Wl,-weak_framework,MediaPlayer if HAVE_SPARKLE = modules/gui/macosx/extensions/NSImage+VLCAdditions.h = @@ -26,6 +26,12 @@ NS_ASSUME_NONNULL_BEGIN @interface NSImage (VLCAdditions) ++ (void)quickLookPreviewForLocalPath:(NSString *)path +withSize:(NSSize)size + completionHandler:(void (^)(NSImage * _Nullable))completionHandler; ++ (void)quickLookPreviewForLocalURL:(NSURL *)url + withSize:(NSSize)size + completionHandler:(void (^)(NSImage * _Nullable))completionHandler; + (instancetype)quickLookPreviewForLocalPath:(NSString*)path withSize:(NSSize)size; + (instancetype)quickLookPreviewForLocalURL:(NSURL*)url withSize:(NSSize)size; + (instancetype)compositeImageWithImages:(NSArray * const)images = modules/gui/macosx/extensions/NSImage+VLCAdditions.m = @@ -23,9 +23,51 @@ #import "NSImage+VLCAdditions.h" #import +#import @implementation NSImage(VLCAdditions) ++ (void)quickLookPreviewForLocalPath:(NSString *)path +withSize:(NSSize)size + completionHandler:(void (^)(NSImage *))completionHandler +{ +NSURL * const pathUrl = [NSURL fileURLWithPath:path]; +[self quickLookPreviewForLocalURL:pathUrl withSize:size completionHandler:completionHandler]; +} + ++ (void)quickLookPreviewForLocalURL:(NSURL *)url + withSize:(NSSize)size + completionHandler:(void (^)(NSImage *))completionHandler +{ +if (@available(macOS 10.15, *)) { +const QLThumbnailGenerationRequestRepresentationTypes type = +QLThumbnailGenerationRequestRepresentationTypeAll; +QLThumbnailGenerator * const generator = QLThumbnailGenerator.sharedGenerator; +QLThumbnailGenerationRequest * const request = +[[QLThumbnailGenerationRequest alloc] initWithFileAtURL:url + size:size + scale:1. +representationTypes:type]; +[generator generateBe
[vlc-commits] [Git][videolan/vlc][master] Revert "qml: force "Segoe UI" as default font on windows"
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC Commits: bcd5247f by Fatih Uzunoglu at 2024-05-05T16:24:50+00:00 Revert "qml: force "Segoe UI" as default font on windows" This reverts commit 654edb763fbb56c9cdf2f0ab23612a409e90f5ed. Qt 6 should use Segoe UI font by default on windows. See QTBUG-58610. - - - - - 3 changed files: - modules/gui/qt/Makefile.am - − modules/gui/qt/pixmaps/windows-theme.conf - modules/gui/qt/windows.qrc Changes: = modules/gui/qt/Makefile.am = @@ -870,7 +870,7 @@ libqt_plugin_la_RES = \ pixmaps/sd/unknown.svg if HAVE_WIN32 -libqt_plugin_la_RES += pixmaps/windows-theme.conf \ +libqt_plugin_la_RES += \ pixmaps/win7/pause.svg \ pixmaps/win7/prev.svg \ pixmaps/win7/next.svg \ = modules/gui/qt/pixmaps/windows-theme.conf deleted = @@ -1,2 +0,0 @@ -[Default] -Font\Family=Segoe UI = modules/gui/qt/windows.qrc = @@ -1,8 +1,5 @@ - -pixmaps/windows-theme.conf - pixmaps/win7/pause.svg pixmaps/win7/prev.svg View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/bcd5247fb75f7c56ce02e4adaf927bbfcd61fce1 -- View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/bcd5247fb75f7c56ce02e4adaf927bbfcd61fce1 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: use function for signal handlers
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC Commits: 65e0e215 by Pierre Lamot at 2024-05-05T16:02:59+00:00 qml: use function for signal handlers qt will warn about parameter injection otherwise - - - - - 21 changed files: - modules/gui/qt/dialogs/dialogs/qml/WindowDialog.qml - modules/gui/qt/dialogs/toolbar/qml/ToolbarEditorDialog.qml - modules/gui/qt/maininterface/qml/BannerSources.qml - modules/gui/qt/medialibrary/qml/MusicAlbums.qml - modules/gui/qt/medialibrary/qml/MusicArtist.qml - modules/gui/qt/medialibrary/qml/MusicGenres.qml - modules/gui/qt/medialibrary/qml/PlaylistMedia.qml - modules/gui/qt/medialibrary/qml/VideoAll.qml - modules/gui/qt/medialibrary/qml/VideoAllSubDisplay.qml - modules/gui/qt/medialibrary/qml/VideoGridDisplay.qml - modules/gui/qt/medialibrary/qml/VideoRecentVideos.qml - modules/gui/qt/network/qml/BrowseDeviceView.qml - modules/gui/qt/network/qml/BrowseDisplay.qml - modules/gui/qt/network/qml/BrowseTreeDisplay.qml - modules/gui/qt/player/qml/Player.qml - modules/gui/qt/player/qml/TopBar.qml - modules/gui/qt/playlist/qml/PlaylistDelegate.qml - modules/gui/qt/playlist/qml/PlaylistToolbar.qml - modules/gui/qt/widgets/qml/CSDTitlebarTapNDrapHandler.qml - modules/gui/qt/widgets/qml/GridItem.qml - modules/gui/qt/widgets/qml/SortControl.qml Changes: = modules/gui/qt/dialogs/dialogs/qml/WindowDialog.qml = @@ -49,7 +49,10 @@ Window { signal reset() onAccepted: hide() -onRejected: if (byButton) hide() +onRejected: (byButton) => { +if (byButton) +hide() +} onApplied: hide() onDiscarded: hide() onReset: hide() = modules/gui/qt/dialogs/toolbar/qml/ToolbarEditorDialog.qml = @@ -49,7 +49,7 @@ WindowDialog { unload() } -onRejected: { +onRejected: (byButton) => { // Load saved to discard the changes MainCtx.controlbarProfileModel.reload() unload() = modules/gui/qt/maininterface/qml/BannerSources.qml = @@ -287,10 +287,12 @@ T.ToolBar { sortKey: MainCtx.sort.criteria sortOrder: MainCtx.sort.order -onSortSelected: { +onSortSelected: (key) => { MainCtx.sort.criteria = key } -onSortOrderSelected: MainCtx.sort.order = type +onSortOrderSelected: (type) => { +MainCtx.sort.order = type +} } } = modules/gui/qt/medialibrary/qml/MusicAlbums.qml = @@ -233,7 +233,7 @@ MainInterface.MainViewLoader { model: albumModelId selectionModel: root.selectionModel -onActionForSelection: _actionAtIndex(selection[0]); +onActionForSelection: (selection) => _actionAtIndex(selection[0]) Navigation.parentItem: root section.property: "title_first_symbol" header: root.header = modules/gui/qt/medialibrary/qml/MusicArtist.qml = @@ -433,7 +433,7 @@ FocusScope { clip: true // content may overflow if not enough space is provided model: trackModel -onActionForSelection: { +onActionForSelection: (selection) => { model.addAndPlay(selection) } = modules/gui/qt/medialibrary/qml/MusicGenres.qml = @@ -270,7 +270,7 @@ MainInterface.MainViewLoader { selectionModel: root.selectionModel focus: true -onActionForSelection: _actionAtIndex(selection) +onActionForSelection: (selection) => _actionAtIndex(selection) Navigation.parentItem: root dragItem: genreDragItem rowHeight: VLCStyle.tableCoverRow_height = modules/gui/qt/medialibrary/qml/PlaylistMedia.qml = @@ -122,8 +122,8 @@ MainInterface.MainTableView { // Events //- -onActionForSelection: model.addAndPlay( selection ) -onItemDoubleClicked: MediaLib.addAndPlay(model.id) +onActionForSelection: (selection) => model.addAndPlay( selection ) +onItemDoubleClicked: (index, model) => MediaLib.addAndPlay(model.id) onDropEntered: (delegate, index, drag, before) => { ==