[vlc-commits] [Git][videolan/vlc][master] 6 commits: macosx: Stop trying to always check if iTunes, Apple Music and Spotify are...
Felix Paul Kühne pushed to branch master at VideoLAN / VLC Commits: 6e7e23eb by Claudio Cambra at 2023-03-07T17:44:08+00:00 macosx: Stop trying to always check if iTunes, Apple Music and Spotify are available, fixing recurring freezing when player state changes Signed-off-by: Claudio Cambra develo...@claudiocambra.com - - - - - 35b57641 by Claudio Cambra at 2023-03-07T17:44:08+00:00 macosx: Name Apple Music related variables properly Signed-off-by: Claudio Cambra develo...@claudiocambra.com - - - - - 26b0657d by Claudio Cambra at 2023-03-07T17:44:08+00:00 macosx: Dont bother looking for Apple Music on macOS below 10.15, and conversely dont bother looking for iTunes on macOS above 10.15 Signed-off-by: Claudio Cambra develo...@claudiocambra.com - - - - - 364988df by Claudio Cambra at 2023-03-07T17:44:08+00:00 macosx: Asynchronously fetch other music apps on VLC launch and fully eliminate hiccups on clicking play Signed-off-by: Claudio Cambra develo...@claudiocambra.com - - - - - ef5da7f9 by Claudio Cambra at 2023-03-07T17:44:08+00:00 macosx: Apply stopOtherAudioPlaybackApps to resumeOtherAudioPlaybackApps in VLCPlayerController Signed-off-by: Claudio Cambra develo...@claudiocambra.com - - - - - 394232d6 by Claudio Cambra at 2023-03-07T17:44:08+00:00 macosx: Define the different application pointers to have playback stopped/started as internal atomic properties Signed-off-by: Claudio Cambra develo...@claudiocambra.com - - - - - 1 changed file: - modules/gui/macosx/playlist/VLCPlayerController.m Changes: = modules/gui/macosx/playlist/VLCPlayerController.m = @@ -92,11 +92,15 @@ const CGFloat VLCVolumeDefault = 1.; /* iTunes/Apple Music/Spotify play/pause support */ BOOL _iTunesPlaybackWasPaused; BOOL _appleMusicPlaybackWasPaused; -BOOL _SpotifyPlaybackWasPaused; +BOOL _spotifyPlaybackWasPaused; NSTimer *_playbackHasTruelyEndedTimer; } +@property (readwrite, atomic) iTunesApplication *appleMusicApp; +@property (readwrite, atomic) iTunesApplication *iTunesApp; +@property (readwrite, atomic) SpotifyApplication *spotifyApp; + - (void)currentMediaItemChanged:(input_item_t *)newMediaItem; - (void)stateChanged:(enum vlc_player_state)state; - (void)errorChanged:(enum vlc_player_error)error; @@ -620,6 +624,22 @@ static int BossCallback(vlc_object_t *p_this, _remoteControlService = [[VLCRemoteControlService alloc] init]; [_remoteControlService subscribeToRemoteCommands]; } + +dispatch_async(dispatch_get_global_queue(QOS_CLASS_BACKGROUND, 0), ^{ +if (@available(macOS 10.15, *)) { +self.appleMusicApp = (iTunesApplication *) [SBApplication applicationWithBundleIdentifier:@"com.apple.Music"]; +} else { +self.iTunesApp = (iTunesApplication *) [SBApplication applicationWithBundleIdentifier:@"com.apple.iTunes"]; +} + +self.spotifyApp = (SpotifyApplication *) [SBApplication applicationWithBundleIdentifier:@"com.spotify.client"]; + +dispatch_async(dispatch_get_main_queue(), ^{ +if (self->_playerState == VLC_PLAYER_STATE_PLAYING || self->_playerState == VLC_PLAYER_STATE_STARTED) { +[self stopOtherAudioPlaybackApps]; +} +}); +}); } - (void)applicationWillTerminate:(NSNotification *)aNotification @@ -854,41 +874,45 @@ static int BossCallback(vlc_object_t *p_this, if (controlOtherPlayers <= 0) return; -// pause iTunes -if (!_iTunesPlaybackWasPaused) { -iTunesApplication *iTunesApp = (iTunesApplication *) [SBApplication applicationWithBundleIdentifier:@"com.apple.iTunes"]; -if (iTunesApp && [iTunesApp isRunning]) { -if ([iTunesApp playerState] == iTunesEPlSPlaying) { -msg_Dbg(p_intf, "pausing iTunes"); -[iTunesApp pause]; -_iTunesPlaybackWasPaused = YES; -} +// Don't bother looking for Apple Music on macOS below 10.15, and conversely +// don't bother looking for iTunes on macOS above 10.15 +if (@available(macOS 10.15, *)) { +// Pause Apple Music playback +iTunesApplication *appleMusic = self.appleMusicApp; +if (appleMusic != nil && +!_appleMusicPlaybackWasPaused && +[appleMusic isRunning] && +[appleMusic playerState] == iTunesEPlSPlaying) { + +msg_Dbg(p_intf, "pausing Apple Music"); +[appleMusic pause]; +_appleMusicPlaybackWasPaused = YES; } -} - -if (!_appleMusicPlaybackWasPaused) { -iTunesApplication *iTunesApp = (iTunesApplication *) [SBApplication applicationWithBundleIdentifier:@"com.apple.Music"]; -if (iTunesApp && [iTunesApp isRunning]) { -if ([iTunesApp playerState] == iTunesEPlSPlaying) { -msg_Dbg(p_intf, "pausing Apple Music"); -[iTunesApp pause]; -
[vlc-commits] [Git][videolan/vlc][master] mediacodec: release timestamp_fifo with video context
Felix Paul Kühne pushed to branch master at VideoLAN / VLC Commits: 1f7f400f by Thomas Guillem at 2023-03-07T15:44:21+00:00 mediacodec: release timestamp_fifo with video context `CleanInputVideo()` is linked to the input side of the decoder (.pf_decode) but `video.timestamp_fifo` can be used from the output side (threads from mediacodec) and is actually also tied to the life cycle of the video context, as visible in the destructor `CloseDecoder`. Since the life cycle of the video context is at least the one from the input side, destroy the timestamp_fifo there. Fixes a use-after-free when the video context is not released from CloseDestructor() while mediacodec is still running (not joined yet). Regression from cdff503ed20f5e58aa35b330bfe9fd811c2b76a0 and 57323ddadbe6579697cc9ecdef0de2fbc6831dac - - - - - 1 changed file: - modules/codec/omxil/mediacodec.c Changes: = modules/codec/omxil/mediacodec.c = @@ -746,9 +746,6 @@ static void CleanInputVideo(decoder_t *p_dec) if (p_dec->fmt_in->i_codec == VLC_CODEC_H264 || p_dec->fmt_in->i_codec == VLC_CODEC_HEVC) hxxx_helper_clean(_sys->video.hh); - -if (p_sys->video.timestamp_fifo) -timestamp_FifoRelease(p_sys->video.timestamp_fifo); } } @@ -1057,6 +1054,9 @@ static void CleanDecoder(decoder_sys_t *p_sys) if (p_sys->video.surfacetexture) vlc_asurfacetexture_Delete(p_sys->video.surfacetexture); +if (p_sys->video.timestamp_fifo) +timestamp_FifoRelease(p_sys->video.timestamp_fifo); + free(p_sys); } View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/1f7f400ff74a80354efb467a5cb41b11a0cc98c8 -- View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/1f7f400ff74a80354efb467a5cb41b11a0cc98c8 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: access: jack: clamp i_read earlier
Felix Paul Kühne pushed to branch master at VideoLAN / VLC Commits: ef661558 by Tristan Matthews at 2023-03-07T15:27:32+00:00 access: jack: clamp i_read earlier This avoids allocating more bytes than will be used when calling block_Alloc. - - - - - 305ff7a2 by Tristan Matthews at 2023-03-07T15:27:32+00:00 access: jack: drop p_sys-p_block_audio The original code (since a4b948f06ae10f076aa2776dbf8414151eb07f33) was immediately setting this pointer to 0 and so it would never get used and a new block was allocated every call. - - - - - 1 changed file: - modules/access/jack.c Changes: = modules/access/jack.c = @@ -106,7 +106,6 @@ typedef struct int i_sample_rate; int i_audio_max_frame_size; int i_frequency; -block_t *p_block_audio; es_out_id_t *p_es_audio; date_t pts; @@ -321,7 +320,6 @@ static void Close( vlc_object_t *p_this ) demux_sys_t*p_sys = p_demux->p_sys; msg_Dbg( p_demux,"Module unloaded" ); -if( p_sys->p_block_audio ) block_Release( p_sys->p_block_audio ); if( p_sys->p_jack_client ) jack_client_close( p_sys->p_jack_client ); if( p_sys->p_jack_ringbuffer ) jack_ringbuffer_free( p_sys->p_jack_ringbuffer ); free( p_sys->pp_jack_port_input ); @@ -453,31 +451,23 @@ static block_t *GrabJack( demux_t *p_demux ) return NULL; } -if( p_sys->p_block_audio ) -{ -p_block = p_sys->p_block_audio; -} -else -{ -p_block = block_Alloc( i_read ); -} +/* Find the previous power of 2 */ +i_read = 1 << ((sizeof(i_read)*8 - 1) - vlc_clz(i_read - 1)); + +p_block = block_Alloc( i_read ); + if( !p_block ) { msg_Warn( p_demux, "cannot get block" ); return 0; } -/* Find the previous power of 2 */ -i_read = 1 << ((sizeof(i_read)*8 - 1) - vlc_clz(i_read - 1)); - i_read = jack_ringbuffer_read( p_sys->p_jack_ringbuffer, ( char * ) p_block->p_buffer, i_read ); p_block->i_dts = p_block->i_pts = date_Increment( _sys->pts, i_read/(p_sys->i_channels * p_sys->jack_sample_size) ); -p_sys->p_block_audio = p_block; p_block->i_buffer = i_read; -p_sys->p_block_audio = 0; return p_block; } View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/f906e24e6b4d6261837bd7cf0dea86bb45857c30...305ff7a22e7d60ffe8597900480ed282b80c842a -- View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/f906e24e6b4d6261837bd7cf0dea86bb45857c30...305ff7a22e7d60ffe8597900480ed282b80c842a 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 play with keyboard in recent videos' section
Felix Paul Kühne pushed to branch master at VideoLAN / VLC Commits: f906e24e by Prince Gupta at 2023-03-07T14:07:05+00:00 qml: fix play with keyboard in recent videos section previously actionAtIndex was accessing its parents model to get the id from index, fix it to use its own recent video model - - - - - 1 changed file: - modules/gui/qt/medialibrary/qml/VideoDisplayRecentVideos.qml Changes: = modules/gui/qt/medialibrary/qml/VideoDisplayRecentVideos.qml = @@ -47,8 +47,8 @@ FocusScope { // Functions -function _actionAtIndex(index) { -MediaLib.addAndPlay( model.getIdForIndexes(index), [":restore-playback-pos=2"] ) +function _play(id) { +MediaLib.addAndPlay( id, [":restore-playback-pos=2"] ) g_mainDisplay.showPlayer() } @@ -158,13 +158,14 @@ FocusScope { function play() { if (model.id !== undefined) { -MediaLib.addAndPlay( model.id, [":restore-playback-pos=2"] ) -g_mainDisplay.showPlayer() +root._play(model.id) } } } -onActionAtIndex: root._actionAtIndex(index) +onActionAtIndex: { +root._play(model.getIdForIndex(index)) +} } Widgets.SubtitleLabel { View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/f906e24e6b4d6261837bd7cf0dea86bb45857c30 -- View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/f906e24e6b4d6261837bd7cf0dea86bb45857c30 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: PodcastConfiguration inherits QDialog not QWidget
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC Commits: 183acaec by KO Myung-Hun at 2023-03-07T10:41:50+00:00 qt: PodcastConfiguration inherits QDialog not QWidget Especially, accept() and reject() slots are in QDialog. - - - - - b59976a5 by KO Myung-Hun at 2023-03-07T10:41:50+00:00 skins2: os2: fix compilation - - - - - 349a2ab6 by KO Myung-Hun at 2023-03-07T10:41:50+00:00 qt: disable code paths for unix style dvd list on OS/2 - - - - - 4 changed files: - modules/gui/qt/dialogs/podcast/podcast_configuration.ui - modules/gui/qt/dialogs/preferences/simple_preferences.cpp - modules/gui/skins2/os2/os2_loop.cpp - modules/gui/skins2/os2/os2_loop.hpp Changes: = modules/gui/qt/dialogs/podcast/podcast_configuration.ui = @@ -1,6 +1,6 @@ PodcastConfiguration - + 0 = modules/gui/qt/dialogs/preferences/simple_preferences.cpp = @@ -667,7 +667,7 @@ SPrefsPanel::SPrefsPanel( qt_intf_t *_p_intf, QWidget *_parent, free( dvd_discpath ); free( vcd_discpath ); } -#ifndef _WIN32 +#if !defined( _WIN32 ) && !defined( __OS2__) QStringList DVDDeviceComboBoxStringList = QStringList(); DVDDeviceComboBoxStringList << "dvd*" << "scd*" << "sr*" << "sg*" << "cd*"; = modules/gui/skins2/os2/os2_loop.cpp = @@ -76,26 +76,18 @@ OS2Loop::OS2Loop( intf_thread_t *pIntf ): OSLoop( pIntf ) } -OS2Loop::~OS2Loop() -{ -} - - OSLoop *OS2Loop::instance( intf_thread_t *pIntf ) { if( pIntf->p_sys->p_osLoop == NULL ) -{ -OSLoop *pOsLoop = new OS2Loop( pIntf ); -pIntf->p_sys->p_osLoop = pOsLoop; -} -return pIntf->p_sys->p_osLoop; +pIntf->p_sys->p_osLoop = std::make_unique(pIntf); +return pIntf->p_sys->p_osLoop.get(); } void OS2Loop::destroy( intf_thread_t *pIntf ) { -delete pIntf->p_sys->p_osLoop; -pIntf->p_sys->p_osLoop = NULL; +assert(pIntf->p_sys->p_osLoop); +pIntf->p_sys->p_osLoop.reset(); } = modules/gui/skins2/os2/os2_loop.hpp = @@ -42,6 +42,8 @@ public: /// Destroy the instance of OS2Loop static void destroy( intf_thread_t *pIntf ); +OS2Loop( intf_thread_t *pIntf ); + /// Enter the event loop virtual void run(); @@ -53,10 +55,6 @@ public: MPARAM mp1, MPARAM mp2 ); private: -// Private because it is a singleton -OS2Loop( intf_thread_t *pIntf ); -virtual ~OS2Loop(); - /// Map associating special (i.e. non ascii) virtual key codes with /// internal vlc key codes std::map virtKeyToVlcKey; View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/f907ad15261c007895f3b720c84a4c68264fa20a...349a2ab650254e04d4318fba3ccce6dc222c570a -- View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/f907ad15261c007895f3b720c84a4c68264fa20a...349a2ab650254e04d4318fba3ccce6dc222c570a 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] 13 commits: android: display: reorder to avoid forward declarations
Thomas Guillem pushed to branch master at VideoLAN / VLC Commits: 65f1716f by Thomas Guillem at 2023-03-07T10:27:37+00:00 android: display: reorder to avoid forward declarations No functional changes. - - - - - 46e666ce by Thomas Guillem at 2023-03-07T10:27:37+00:00 android: display: remove the android-display-chroma option - - - - - 37bd843d by Thomas Guillem at 2023-03-07T10:27:37+00:00 android: display: remove unused define - - - - - a44e152f by Thomas Guillem at 2023-03-07T10:27:37+00:00 android: display: disable software rendering Software rendering is done via OpenGL. Subtitles are still rendered via the native_window_api_t API. - - - - - eb0321af by Thomas Guillem at 2023-03-07T10:27:37+00:00 android: display: remove unused p_jsurface - - - - - c612e9d2 by Thomas Guillem at 2023-03-07T10:27:37+00:00 Revert vout/android: display: clear surface with OpenGL This reverts commit e66c9b7c6b7cd356df6cad1b5579e2e5d3ba905b and 158ab9157f1eef7258e2ad326b0ff1192c1ebdc8. Fixes #26976 - - - - - c81a0d74 by Thomas Guillem at 2023-03-07T10:27:37+00:00 android: window: reorder code to avoid forward declaration Also remove useless comments. No functional changes. - - - - - e46dcf5b by Thomas Guillem at 2023-03-07T10:27:37+00:00 window: android: specify the surface id This will allow to use EGL on the subtitle surface. No functional changes. - - - - - e6b31327 by Thomas Guillem at 2023-03-07T10:27:37+00:00 android: display: use new setVideoLayout API That add the ability to update only size, crop or sar. - - - - - 29a2a1e8 by Thomas Guillem at 2023-03-07T10:27:37+00:00 android: display: rename p_awh - - - - - fea2930b by Thomas Guillem at 2023-03-07T10:27:37+00:00 android: display: remove subtitle support - - - - - a77fb96f by Thomas Guillem at 2023-03-07T10:27:37+00:00 android: display: add OpenGL subtitles support - - - - - f907ad15 by Thomas Guillem at 2023-03-07T10:27:37+00:00 android: display: only draw subpictures when needed This avoid to acquire the GL context and swap. This can save 4-10ms when not displaying any subtitles. - - - - - 5 changed files: - include/vlc_window.h - modules/video_output/Makefile.am - modules/video_output/android/display.c - modules/video_output/android/window.c - modules/video_output/opengl/egl.c Changes: = include/vlc_window.h = @@ -394,7 +394,7 @@ typedef struct vlc_window { void *hwnd; /**< Win32 window handle */ uint32_t xid;/**< X11 windows ID */ void *nsobject; /**< macOS/iOS view object */ -void *anativewindow; /**< Android native window */ +int android_id; /**< AWindow_ID */ struct wl_surface *wl; /**< Wayland surface (client pointer) */ void *dcomp_visual; /**< Win32 direct composition visual */ uint32_t crtc; /**< KMS CRTC identifier */ @@ -413,6 +413,7 @@ typedef struct vlc_window { struct wl_display *wl; /**< Wayland display (client pointer) */ void* dcomp_device; /**< DirectComposition device */ int drm_fd; /**< KMS DRM device */ +void* anativewindow; /**< Android native window */ } display; const struct vlc_window_operations *ops; /**< operations handled by the = modules/video_output/Makefile.am = @@ -304,7 +304,8 @@ libandroid_window_plugin_la_SOURCES = video_output/android/window.c \ libandroid_window_plugin_la_LIBADD = libandroid_utils.la $(LIBDL) libandroid_display_plugin_la_SOURCES = video_output/android/display.c -libandroid_display_plugin_la_LIBADD = libandroid_utils.la $(LIBDL) +libandroid_display_plugin_la_CFLAGS = $(AM_CFLAGS) $(GLES2_CFLAGS) -DUSE_OPENGL_ES2 +libandroid_display_plugin_la_LIBADD = libvlc_opengles.la libglinterop_android_plugin_la_SOURCES = video_output/opengl/interop_android.c \ video_output/opengl/interop.h = modules/video_output/android/display.c = @@ -31,891 +31,429 @@ #include #include #include -#include -#include - -#include /* for ClearSurface */ -#include /* for ClearSurface */ - -#include +#include +#include #include "utils.h" +#include "../opengl/gl_api.h" +#include "../opengl/sub_renderer.h" -/* - * Module descriptor - */ -#define USE_ANWP -#define CHROMA_TEXT "Chroma used" -#define CHROMA_LONGTEXT \ -"Force use of a specific chroma for output. Default is RGB32." - -#define CFG_PREFIX "android-display-" -static int Open(vout_display_t *vd, -video_format_t *fmtp, vlc_video_context *context); -static void Close(vout_display_t *vd); -static void SubpicturePrepare(vout_display_t *vd, subpicture_t
[vlc-commits] [Git][videolan/vlc][master] 3 commits: qt: convert fromTime_t to fromSecsSinceEpoch
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC Commits: 8a5bcc93 by Ilkka Ollakka at 2023-03-07T09:11:00+00:00 qt: convert fromTime_t to fromSecsSinceEpoch fromTime_t has been deprecated and fromSecsSinceEpoch looks like drop-in replacement in our use - - - - - 7b9d6aa0 by Ilkka Ollakka at 2023-03-07T09:11:00+00:00 qt: use primaryscreen geometry as default qApp-desktop has been deprecated, but primaryscreen should be same approach for our use in this case - - - - - ed986711 by Ilkka Ollakka at 2023-03-07T09:11:00+00:00 qt: replace setMargin with setContentsMargins setMargin has been deprecated and shouldnt be used - - - - - 13 changed files: - modules/gui/qt/dialogs/epg/EPGItem.cpp - modules/gui/qt/dialogs/epg/EPGProgram.cpp - modules/gui/qt/dialogs/epg/EPGWidget.cpp - modules/gui/qt/dialogs/epg/epg.cpp - modules/gui/qt/dialogs/open/open_panels.cpp - modules/gui/qt/dialogs/plugins/plugins.cpp - modules/gui/qt/dialogs/preferences/complete_preferences.cpp - modules/gui/qt/dialogs/preferences/preferences.cpp - modules/gui/qt/dialogs/preferences/preferences_widgets.cpp - modules/gui/qt/dialogs/preferences/simple_preferences.cpp - modules/gui/qt/medialibrary/mlrecentsmodel.cpp - modules/gui/qt/medialibrary/mlurlmodel.cpp - modules/gui/qt/widgets/native/qvlcframe.cpp Changes: = modules/gui/qt/dialogs/epg/EPGItem.cpp = @@ -151,7 +151,7 @@ uint16_t EPGItem::eventID() const bool EPGItem::setData( const vlc_epg_event_t *data ) { -QDateTime newtime = QDateTime::fromTime_t( data->i_start ); +QDateTime newtime = QDateTime::fromSecsSinceEpoch( data->i_start ); QString newname = qfu( data->psz_name ); QString newdesc = qfu( data->psz_description ); QString newshortdesc = qfu( data->psz_short_description ); = modules/gui/qt/dialogs/epg/EPGProgram.cpp = @@ -96,7 +96,7 @@ void EPGProgram::updateEvents( const vlc_epg_event_t * const * pp_events, size_t for( size_t i=0; ii_start ); +QDateTime eventStart = QDateTime::fromSecsSinceEpoch( p_event->i_start ); if( !mindate->isValid() || eventStart < *mindate ) *mindate = eventStart; = modules/gui/qt/dialogs/epg/EPGWidget.cpp = @@ -108,7 +108,7 @@ void EPGWidget::updateEPG( input_item_t *p_input_item ) vlc_mutex_lock( & p_input_item->lock ); m_epgView->updateEPG( p_input_item->pp_epg, p_input_item->i_epg ); m_epgView->setEpgTime( ( p_input_item->i_epg_time ) ? - QDateTime::fromTime_t( p_input_item->i_epg_time ) : + QDateTime::fromSecsSinceEpoch( p_input_item->i_epg_time ) : QDateTime() ); vlc_mutex_unlock( & p_input_item->lock ); = modules/gui/qt/dialogs/epg/epg.cpp = @@ -48,7 +48,7 @@ EpgDialog::EpgDialog( qt_intf_t *_p_intf ): QVLCFrame( _p_intf ) setWindowTitle( qtr( "Program Guide" ) ); QVBoxLayout *layout = new QVBoxLayout( this ); -layout->setMargin( 0 ); +layout->setContentsMargins(0, 0, 0, 0); epg = new EPGWidget( this ); QGroupBox *descBox = new QGroupBox( qtr( "Description" ), this ); = modules/gui/qt/dialogs/open/open_panels.cpp = @@ -177,7 +177,7 @@ inline void FileOpenPanel::BuildOldPanel() connect( lineFileEdit, ::textChanged, this, ::updateMRL ); } -dialogBox->layout()->setMargin( 0 ); +dialogBox->layout()->setContentsMargins(0, 0, 0, 0); dialogBox->layout()->setSizeConstraint( QLayout::SetNoConstraint ); /** END of QFileDialog tweaking **/ = modules/gui/qt/dialogs/plugins/plugins.cpp = @@ -346,7 +346,7 @@ AddonsTab::AddonsTab( qt_intf_t *p_intf_ ) : QVLCFrame( p_intf_ ) QVBoxLayout *layout = new QVBoxLayout( rightPane ); // Left Pane -leftPane->layout()->setMargin(0); +leftPane->layout()->setContentsMargins(0, 0, 0, 0); leftPane->layout()->setSpacing(0); SearchLineEdit *searchInput = new SearchLineEdit(); @@ -398,7 +398,7 @@ AddonsTab::AddonsTab( qt_intf_t *p_intf_ ) : QVLCFrame( p_intf_ ) ADDON_EXTENSION ); // Right Pane -rightPane->layout()->setMargin(0); +rightPane->layout()->setContentsMargins(0, 0, 0, 0); rightPane->layout()->setSpacing(0); // Splitter sizes init @@ -1278,7 +1278,7 @@ QWidget *AddonItemDelegate::createEditor( QWidget *parent, QPushButton *infoButton; editorWidget->setLayout( new QHBoxLayout() ); -editorWidget->layout()->setMargin( 0 ); +editorWidget->layout()->setContentsMargins(0, 0, 0, 0); infoButton = new QPushButton( QIcon(
[vlc-commits] [Git][videolan/vlc][master] 12 commits: tests: define vlc_static_modules consistently
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC Commits: b0904b12 by Steve Lhomme at 2023-03-07T08:23:15+00:00 tests: define vlc_static_modules consistently - - - - - b7340959 by Steve Lhomme at 2023-03-07T08:23:15+00:00 vlc_plugin: add macros to define custom entry points This is usually the way tests with modules do it. - - - - - f240da15 by Steve Lhomme at 2023-03-07T08:23:15+00:00 demux-run: use specialized macros to access module entries - - - - - b919f189 by Steve Lhomme at 2023-03-07T08:23:15+00:00 bank: constify the static plugin entry list Thats how its defined everywhere. - - - - - e18c1e87 by Steve Lhomme at 2023-03-07T08:23:15+00:00 bank: use the core entry name using macros If the macros change, the code will change automatically. - - - - - 96d2232a by Steve Lhomme at 2023-03-07T08:23:15+00:00 test: move the MODULE_STRING usage after vlc_plugin.h So it can be deduced from MODULE_NAME. - - - - - 914b66ed by Steve Lhomme at 2023-03-07T08:23:15+00:00 test: dont define MODULE_STRING It can be deduced from MODULE_NAME. - - - - - a7c63015 by Steve Lhomme at 2023-03-07T08:23:15+00:00 package/emscripten: use vlc_plugin_cb for the static list of modules For the static list of modules. - - - - - 61f909ce by Steve Lhomme at 2023-03-07T08:23:15+00:00 package/apple: use vlc_plugin_cb for the static list of modules - - - - - 0afcc30a by Steve Lhomme at 2023-03-07T08:23:15+00:00 vlc_plugin: add a macro to declare module entries This is the same type as vlc_plugin_cb but declaring a variable with a function type and declaring and actual function is not the same. - - - - - 6f493a0a by Steve Lhomme at 2023-03-07T08:23:15+00:00 package/emscripten: use a vlc_plugin macro to declare the detected modules - - - - - 1e244e3b by Steve Lhomme at 2023-03-07T08:23:15+00:00 package/apple: use a vlc_plugin macro to declare the detected modules - - - - - 15 changed files: - extras/package/apple/build.sh - extras/package/wasm-emscripten/build.sh - include/vlc_plugin.h - src/modules/bank.c - src/modules/modules.h - test/iosvlc.m - test/modules/lua/extension.c - test/modules/misc/medialibrary.c - test/modules/stream_out/transcode.c - test/src/input/decoder/input_decoder.c - test/src/input/demux-run.c - test/src/misc/image.c - test/src/misc/image_cvpx.c - test/src/video_output/opengl.c - test/src/video_output/video_output.c Changes: = extras/package/apple/build.sh = @@ -423,11 +423,11 @@ gen_vlc_static_module_list() done printf "\ -#include \\n\ -#define VLC_ENTRY_FUNC(funcname)\ -int funcname(int (*)(void *, void *, int, ...), void *)\\n\ +#include \"config.h\"\\n\ +#include \\n\ +#include \\n\ %b\\n\ -const void *vlc_static_modules[] = {\\n +const vlc_plugin_cb vlc_static_modules[] = {\\n %b NULL\\n };" \ @@ -780,7 +780,7 @@ VLC_STATIC_MODULELIST_NAME="static-module-list" rm -f "${VLC_STATIC_MODULELIST_NAME}.c" "${VLC_STATIC_MODULELIST_NAME}.o" gen_vlc_static_module_list "${VLC_STATIC_MODULELIST_NAME}.c" "${VLC_PLUGINS_SYMBOL_LIST[@]}" -${VLC_HOST_CC:-cc} -c ${CFLAGS} "${VLC_STATIC_MODULELIST_NAME}.c" \ +${VLC_HOST_CC:-cc} -c ${CFLAGS} -I"${VLC_SRC_DIR}/include" -I"${VLC_BUILD_DIR}/build" "${VLC_STATIC_MODULELIST_NAME}.c" \ || abort_err "Compiling module list file failed" echo "${VLC_BUILD_DIR}/static-lib/${VLC_STATIC_MODULELIST_NAME}.o" \ = extras/package/wasm-emscripten/build.sh = @@ -197,14 +197,16 @@ FUN_LIST="" for file in "$BUILD_PATH"/modules/.libs/*plugin.a do ENTRY=$(get_entryname "$file") -FUN_PROTOS="$FUN_PROTOS""int $ENTRY (int (*)(void *, void *, int, ...), void *);\n" +FUN_PROTOS="$FUN_PROTOS""VLC_ENTRY_FUNC($ENTRY);\n" FUN_LIST="$FUN_LIST""$ENTRY,\n" done; printf "// This file is autogenerated -#include +#include \"config.h\" +#include +#include %b\n -const void *vlc_static_modules[] = { +const vlc_plugin_cb vlc_static_modules[] = { %bNULL };\n" "$FUN_PROTOS" "$FUN_LIST" \ > "$BUILD_PATH"/vlc-modules.c @@ -216,6 +218,6 @@ if echo "${VLC_USE_SANITIZER}" | grep address > /dev/null; then SANITIZERS="$SANITIZERS -fsanitize=address -fsanitize-address-use-after-scope -fno-omit-frame-pointer" fi -emcc $SANITIZERS -pthread -c "$BUILD_PATH"/vlc-modules.c -o "$BUILD_PATH"/vlc-modules.bc +emcc $SANITIZERS -pthread -c "$BUILD_PATH"/vlc-modules.c -I"$VLC_SRCPATH"/include -I"$BUILD_PATH" -o "$BUILD_PATH"/vlc-modules.bc echo "VLC for wasm32-unknown-emscripten built!" = include/vlc_plugin.h = @@ -246,6 +246,13 @@ enum vlc_config_subcat # define MODULE_STRING STRINGIFY_NAME(MODULE_NAME) #endif +// defines a statically linked module entry point +#define VLC_ENTRY_FUNC(name) int (name)(vlc_set_cb, void *) +// name of the module entry point table +#define