diff --git a/patches/vlc-3.0.21/0001-build-fit-DLL-names-longer-than-8-characters-to-8.3-.patch b/patches/vlc-3.0.21/0001-build-fit-DLL-names-longer-than-8-characters-to-8.3-.patch new file mode 100644 index 0000000..61cbba6 --- /dev/null +++ b/patches/vlc-3.0.21/0001-build-fit-DLL-names-longer-than-8-characters-to-8.3-.patch @@ -0,0 +1,446 @@ +From c859a5c7767322ea9e5d5b342b8e780a513d4410 Mon Sep 17 00:00:00 2001 +From: KO Myung-Hun +Date: Fri, 14 Oct 2011 22:29:40 +0900 +Subject: [PATCH 01/26] build: fit DLL names longer than 8 characters to 8.3 + limit on OS/2 + +Since libtool 2.4.4, -os2dllname is supported. +--- + modules/access/Makefile.am | 15 ++++++++ + modules/access_output/Makefile.am | 18 ++++++++++ + modules/audio_filter/Makefile.am | 9 +++++ + modules/packetizer/Makefile.am | 42 ++++++++++++++++++++++ + modules/stream_out/Makefile.am | 60 +++++++++++++++++++++++++++++++ + modules/video_chroma/Makefile.am | 36 +++++++++++++++++++ + 6 files changed, 180 insertions(+) + +diff --git a/modules/access/Makefile.am b/modules/access/Makefile.am +index f295947233..ced9b149a2 100644 +--- a/modules/access/Makefile.am ++++ b/modules/access/Makefile.am +@@ -34,6 +34,9 @@ libimem_plugin_la_LIBADD = $(LIBM) + access_LTLIBRARIES += libimem_plugin.la + + libaccess_imem_plugin_la_SOURCES = access/imem.c ++if HAVE_OS2 ++libaccess_imem_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname a_imem_plugin ++endif + access_LTLIBRARIES += libaccess_imem_plugin.la + + libsdp_plugin_la_SOURCES = access/sdp.c +@@ -333,6 +336,9 @@ libaccess_mms_plugin_la_SOURCES = \ + demux/asf/libasf_guid.h + libaccess_mms_plugin_la_CFLAGS = $(AM_CFLAGS) + libaccess_mms_plugin_la_LIBADD = $(SOCKET_LIBS) ++if HAVE_OS2 ++libaccess_mms_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname a_mms_plugin ++endif + access_LTLIBRARIES += libaccess_mms_plugin.la + + libsmb_plugin_la_SOURCES = access/smb.c access/smb_common.h +@@ -395,6 +401,9 @@ libaccess_realrtsp_plugin_la_SOURCES = \ + libaccess_realrtsp_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) + libaccess_realrtsp_plugin_la_LIBADD = $(SOCKET_LIBS) + libaccess_realrtsp_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(accessdir)' ++if HAVE_OS2 ++libaccess_realrtsp_plugin_la_LDFLAGS += -os2dllname a_realrtsp_plugin ++endif + access_LTLIBRARIES += $(LTLIBaccess_realrtsp) + EXTRA_LTLIBRARIES += libaccess_realrtsp_plugin.la + +@@ -415,12 +424,18 @@ access_LTLIBRARIES += libsatip_plugin.la + ### Misc ### + + libaccess_concat_plugin_la_SOURCES = access/concat.c ++if HAVE_OS2 ++libaccess_concat_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname a_concat_plugin ++endif + access_LTLIBRARIES += libaccess_concat_plugin.la + + libaccess_mtp_plugin_la_SOURCES = access/mtp.c + libaccess_mtp_plugin_la_CFLAGS = $(AM_CFLAGS) $(MTP_CFLAGS) + libaccess_mtp_plugin_la_LIBADD = $(MTP_LIBS) + libaccess_mtp_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(accessdir)' ++if HAVE_OS2 ++libaccess_mtp_plugin_la_LDFLAGS += -os2dllname a_mtp_plugin ++endif + access_LTLIBRARIES += $(LTLIBaccess_mtp) + EXTRA_LTLIBRARIES += libaccess_mtp_plugin.la + +diff --git a/modules/access_output/Makefile.am b/modules/access_output/Makefile.am +index 722ceba9e6..342048e4c7 100644 +--- a/modules/access_output/Makefile.am ++++ b/modules/access_output/Makefile.am +@@ -1,11 +1,23 @@ + access_outdir = $(pluginsdir)/access_output + + libaccess_output_dummy_plugin_la_SOURCES = access_output/dummy.c ++if HAVE_OS2 ++libaccess_output_dummy_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname a_o_dummy_plugin ++endif + libaccess_output_file_plugin_la_SOURCES = access_output/file.c + libaccess_output_file_plugin_la_LIBADD = $(LIBPTHREAD) ++if HAVE_OS2 ++libaccess_output_file_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname a_o_file_plugin ++endif + libaccess_output_http_plugin_la_SOURCES = access_output/http.c ++if HAVE_OS2 ++libaccess_output_http_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname a_o_http_plugin ++endif + libaccess_output_udp_plugin_la_SOURCES = access_output/udp.c + libaccess_output_udp_plugin_la_LIBADD = $(SOCKET_LIBS) $(LIBPTHREAD) ++if HAVE_OS2 ++libaccess_output_udp_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname a_o_udp_plugin ++endif + + access_out_LTLIBRARIES = \ + libaccess_output_dummy_plugin.la \ +@@ -16,6 +28,9 @@ access_out_LTLIBRARIES = \ + libaccess_output_livehttp_plugin_la_SOURCES = access_output/livehttp.c + libaccess_output_livehttp_plugin_la_CFLAGS = $(AM_CFLAGS) $(GCRYPT_CFLAGS) + libaccess_output_livehttp_plugin_la_LIBADD = $(GCRYPT_LIBS) -lgpg-error ++if HAVE_OS2 ++libaccess_output_livehttp_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname a_o_livehttp_plugin ++endif + if HAVE_GCRYPT + access_out_LTLIBRARIES += libaccess_output_livehttp_plugin.la + endif +@@ -23,6 +38,9 @@ endif + libaccess_output_shout_plugin_la_SOURCES = access_output/shout.c + libaccess_output_shout_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) $(SHOUT_CFLAGS) + libaccess_output_shout_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(access_outdir)' ++if HAVE_OS2 ++libaccess_output_shout_plugin_la_LDFLAGS += -os2dllname a_o_shout_plugin ++endif + libaccess_output_shout_plugin_la_LIBADD = $(SHOUT_LIBS) $(SOCKET_LIBS) + access_out_LTLIBRARIES += $(LTLIBaccess_output_shout) + EXTRA_LTLIBRARIES += libaccess_output_shout_plugin.la +diff --git a/modules/audio_filter/Makefile.am b/modules/audio_filter/Makefile.am +index 309074c75b..dc0e209639 100644 +--- a/modules/audio_filter/Makefile.am ++++ b/modules/audio_filter/Makefile.am +@@ -2,6 +2,9 @@ audio_filterdir = $(pluginsdir)/audio_filter + + libaudiobargraph_a_plugin_la_SOURCES = audio_filter/audiobargraph_a.c + libaudiobargraph_a_plugin_la_LIBADD = $(LIBM) ++if HAVE_OS2 ++libaudiobargraph_a_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname abg_a_plugin ++endif + libchorus_flanger_plugin_la_SOURCES = audio_filter/chorus_flanger.c + libchorus_flanger_plugin_la_LIBADD = $(LIBM) + libcompressor_plugin_la_SOURCES = audio_filter/compressor.c +@@ -17,9 +20,15 @@ libparam_eq_plugin_la_SOURCES = audio_filter/param_eq.c + libparam_eq_plugin_la_LIBADD = $(LIBM) + libscaletempo_plugin_la_SOURCES = audio_filter/scaletempo.c + libscaletempo_plugin_la_LIBADD = $(LIBM) ++if HAVE_OS2 ++libscaletempo_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname st_plugin ++endif + libscaletempo_pitch_plugin_la_SOURCES = $(libscaletempo_plugin_la_SOURCES) + libscaletempo_pitch_plugin_la_LIBADD = $(libscaletempo_plugin_la_LIBADD) + libscaletempo_pitch_plugin_la_CFLAGS = $(AM_CFLAGS) -DPITCH_SHIFTER ++if HAVE_OS2 ++libscaletempo_pitch_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname st_pitch_plugin ++endif + libstereo_widen_plugin_la_SOURCES = audio_filter/stereo_widen.c + libspatializer_plugin_la_SOURCES = \ + audio_filter/spatializer/allpass.cpp \ +diff --git a/modules/packetizer/Makefile.am b/modules/packetizer/Makefile.am +index 588a3293bd..3a915c94c0 100644 +--- a/modules/packetizer/Makefile.am ++++ b/modules/packetizer/Makefile.am +@@ -5,36 +5,78 @@ libpacketizer_av1_plugin_la_SOURCES = packetizer/av1.c \ + packetizer/av1_obu.c \ + packetizer/av1_obu.h + libpacketizer_copy_plugin_la_SOURCES = packetizer/copy.c ++if HAVE_OS2 ++libpacketizer_copy_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname p_copy_plugin ++endif + libpacketizer_mpegvideo_plugin_la_SOURCES = packetizer/mpegvideo.c ++if HAVE_OS2 ++libpacketizer_mpegvideo_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname p_mpegvideo_plugin ++endif + libpacketizer_mpeg4video_plugin_la_SOURCES = packetizer/mpeg4video.c ++if HAVE_OS2 ++libpacketizer_mpeg4video_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname p_mpeg4video_plugin ++endif + libpacketizer_mpeg4audio_plugin_la_SOURCES = packetizer/mpeg4audio.c ++if HAVE_OS2 ++libpacketizer_mpeg4audio_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname p_mpeg4audio_plugin ++endif + libpacketizer_mpegaudio_plugin_la_SOURCES = packetizer/mpegaudio.c ++if HAVE_OS2 ++libpacketizer_mpegaudio_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname p_mpegaudio_plugin ++endif + libpacketizer_h264_plugin_la_SOURCES = \ + packetizer/h264_nal.c packetizer/h264_nal.h \ + packetizer/h264_slice.c packetizer/h264_slice.h \ + packetizer/h264.c packetizer/hxxx_nal.h \ + packetizer/hxxx_sei.c packetizer/hxxx_sei.h \ + packetizer/hxxx_common.c packetizer/hxxx_common.h ++if HAVE_OS2 ++libpacketizer_h264_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname p_h264_plugin ++endif + libpacketizer_vc1_plugin_la_SOURCES = packetizer/vc1.c \ + packetizer/hxxx_nal.h ++if HAVE_OS2 ++libpacketizer_vc1_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname p_vc1_plugin ++endif + libpacketizer_mlp_plugin_la_SOURCES = packetizer/mlp.c ++if HAVE_OS2 ++libpacketizer_mlp_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname p_mlp_plugin ++endif + libpacketizer_dirac_plugin_la_SOURCES = packetizer/dirac.c ++if HAVE_OS2 ++libpacketizer_dirac_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname p_dirac_plugin ++endif + libpacketizer_flac_plugin_la_SOURCES = packetizer/flac.c \ + packetizer/flac.h ++if HAVE_OS2 ++libpacketizer_flac_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname p_flac_plugin ++endif + libpacketizer_hevc_plugin_la_SOURCES = packetizer/hevc.c \ + packetizer/hevc_nal.h packetizer/hevc_nal.c \ + packetizer/hxxx_sei.c packetizer/hxxx_sei.h \ + packetizer/hxxx_nal.h \ + packetizer/hxxx_common.c packetizer/hxxx_common.h ++if HAVE_OS2 ++libpacketizer_hevc_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname p_hevc_plugin ++endif + libpacketizer_a52_plugin_la_SOURCES = packetizer/a52.c packetizer/a52.h ++if HAVE_OS2 ++libpacketizer_a52_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname p_a52_plugin ++endif + libpacketizer_dts_plugin_la_SOURCES = packetizer/dts.c \ + packetizer/dts_header.c packetizer/dts_header.h ++if HAVE_OS2 ++libpacketizer_dts_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname p_dts_plugin ++endif + + libpacketizer_avparser_plugin_la_SOURCES = packetizer/avparser.c \ + packetizer/avparser.h \ + codec/avcodec/avcodec.h + libpacketizer_avparser_plugin_la_CFLAGS = $(AVCODEC_CFLAGS) $(AVUTIL_CFLAGS) $(AM_CFLAGS) + libpacketizer_avparser_plugin_la_LIBADD = $(AVCODEC_LIBS) $(AVUTIL_LIBS) $(LIBM) libavcodec_common.la ++if HAVE_OS2 ++libpacketizer_avparser_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname p_avparser_plugin ++endif + + noinst_HEADERS += packetizer/packetizer_helper.h packetizer/startcode_helper.h + +diff --git a/modules/stream_out/Makefile.am b/modules/stream_out/Makefile.am +index 8a1b42d34d..05b14bd4eb 100644 +--- a/modules/stream_out/Makefile.am ++++ b/modules/stream_out/Makefile.am +@@ -1,29 +1,80 @@ + soutdir = $(pluginsdir)/stream_out + + libstream_out_dummy_plugin_la_SOURCES = stream_out/dummy.c ++if HAVE_OS2 ++libstream_out_dummy_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname s_o_dummy_plugin ++endif + libstream_out_cycle_plugin_la_SOURCES = stream_out/cycle.c ++if HAVE_OS2 ++libstream_out_cycle_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname s_o_cycle_plugin ++endif + libstream_out_delay_plugin_la_SOURCES = stream_out/delay.c ++if HAVE_OS2 ++libstream_out_delay_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname s_o_delay_plugin ++endif + libstream_out_stats_plugin_la_SOURCES = stream_out/stats.c ++if HAVE_OS2 ++libstream_out_stats_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname s_o_stats_plugin ++endif + libstream_out_description_plugin_la_SOURCES = stream_out/description.c ++if HAVE_OS2 ++libstream_out_description_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname s_o_description_plugin ++endif + libstream_out_standard_plugin_la_SOURCES = stream_out/standard.c + libstream_out_standard_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_access_output_srt) + libstream_out_standard_plugin_la_LIBADD = $(SOCKET_LIBS) ++if HAVE_OS2 ++libstream_out_standard_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname s_o_standard_plugin ++endif + libstream_out_duplicate_plugin_la_SOURCES = stream_out/duplicate.c ++if HAVE_OS2 ++libstream_out_duplicate_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname s_o_duplicate_plugin ++endif + libstream_out_es_plugin_la_SOURCES = stream_out/es.c ++if HAVE_OS2 ++libstream_out_es_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname s_o_es_plugin ++endif + libstream_out_display_plugin_la_SOURCES = stream_out/display.c ++if HAVE_OS2 ++libstream_out_display_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname s_o_display_plugin ++endif + libstream_out_gather_plugin_la_SOURCES = stream_out/gather.c ++if HAVE_OS2 ++libstream_out_gather_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname s_o_gather_plugin ++endif + libstream_out_bridge_plugin_la_SOURCES = stream_out/bridge.c ++if HAVE_OS2 ++libstream_out_bridge_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname s_o_bridge_plugin ++endif + libstream_out_mosaic_bridge_plugin_la_SOURCES = stream_out/mosaic_bridge.c ++if HAVE_OS2 ++libstream_out_mosaic_bridge_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname s_o_mosaic_bridge_plugin ++endif + libstream_out_autodel_plugin_la_SOURCES = stream_out/autodel.c ++if HAVE_OS2 ++libstream_out_autodel_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname s_o_autodel_plugin ++endif + libstream_out_record_plugin_la_SOURCES = stream_out/record.c ++if HAVE_OS2 ++libstream_out_record_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname s_o_record_plugin ++endif + libstream_out_smem_plugin_la_SOURCES = stream_out/smem.c ++if HAVE_OS2 ++libstream_out_smem_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname s_o_smem_plugin ++endif + libstream_out_setid_plugin_la_SOURCES = stream_out/setid.c ++if HAVE_OS2 ++libstream_out_setid_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname s_o_setid_plugin ++endif + libstream_out_transcode_plugin_la_SOURCES = \ + stream_out/transcode/transcode.c stream_out/transcode/transcode.h \ + stream_out/transcode/spu.c \ + stream_out/transcode/audio.c stream_out/transcode/video.c + libstream_out_transcode_plugin_la_CFLAGS = $(AM_CFLAGS) + libstream_out_transcode_plugin_la_LIBADD = $(LIBM) ++if HAVE_OS2 ++libstream_out_transcode_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname s_o_transcode_plugin ++endif + + sout_LTLIBRARIES = \ + libstream_out_dummy_plugin.la \ +@@ -51,6 +102,9 @@ libstream_out_rtp_plugin_la_SOURCES = \ + stream_out/rtcp.c stream_out/rtsp.c stream_out/vod.c + libstream_out_rtp_plugin_la_CFLAGS = $(AM_CFLAGS) + libstream_out_rtp_plugin_la_LIBADD = $(SOCKET_LIBS) $(LIBPTHREAD) ++if HAVE_OS2 ++libstream_out_rtp_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname s_o_rtp_plugin ++endif + if HAVE_GCRYPT + SRTP_CFLAGS = -I$(srcdir)/access/rtp + SRTP_LIBS = libvlc_srtp.la +@@ -63,6 +117,9 @@ endif + libstream_out_chromaprint_plugin_la_SOURCES = stream_out/chromaprint.c stream_out/chromaprint_data.h dummy.cpp + libstream_out_chromaprint_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) $(CHROMAPRINT_CFLAGS) + libstream_out_chromaprint_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(soutdir)' ++if HAVE_OS2 ++libstream_out_chromaprint_plugin_la_LDFLAGS += -os2dllname s_o_chromaprint_plugin ++endif + libstream_out_chromaprint_plugin_la_LIBADD = $(CHROMAPRINT_LIBS) + EXTRA_LTLIBRARIES += libstream_out_chromaprint_plugin.la + sout_LTLIBRARIES += $(LTLIBstream_out_chromaprint) +@@ -84,6 +141,9 @@ libstream_out_chromecast_plugin_la_SOURCES = stream_out/chromecast/cast.cpp stre + nodist_libstream_out_chromecast_plugin_la_SOURCES = stream_out/chromecast/cast_channel.pb.cc + libstream_out_chromecast_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -Istream_out/chromecast $(CHROMECAST_CFLAGS) + libstream_out_chromecast_plugin_la_LIBADD = $(CHROMECAST_LIBS) $(SOCKET_LIBS) ++if HAVE_OS2 ++libstream_out_chromecast_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname s_o_chromecast_plugin ++endif + CLEANFILES += $(nodist_libstream_out_chromecast_plugin_la_SOURCES) + + if ENABLE_SOUT +diff --git a/modules/video_chroma/Makefile.am b/modules/video_chroma/Makefile.am +index b86bdc362b..392068f9a8 100644 +--- a/modules/video_chroma/Makefile.am ++++ b/modules/video_chroma/Makefile.am +@@ -20,10 +20,16 @@ libgrey_yuv_plugin_la_SOURCES = video_chroma/grey_yuv.c + libi420_rgb_plugin_la_SOURCES = video_chroma/i420_rgb.c video_chroma/i420_rgb.h \ + video_chroma/i420_rgb8.c video_chroma/i420_rgb16.c video_chroma/i420_rgb_c.h + libi420_rgb_plugin_la_LIBADD = $(LIBM) ++if HAVE_OS2 ++libi420_rgb_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname i0_r_plugin ++endif + + libi420_yuy2_plugin_la_SOURCES = video_chroma/i420_yuy2.c video_chroma/i420_yuy2.h + libi420_yuy2_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \ + -DMODULE_NAME_IS_i420_yuy2 ++if HAVE_OS2 ++libi420_yuy2_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname i0_y2_plugin ++endif + + libi420_nv12_plugin_la_SOURCES = video_chroma/i420_nv12.c + libi420_nv12_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \ +@@ -36,16 +42,28 @@ libi420_10_p010_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \ + libi420_10_p010_plugin_la_LIBADD = libchroma_copy.la + + libi422_i420_plugin_la_SOURCES = video_chroma/i422_i420.c ++if HAVE_OS2 ++libi422_i420_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname i2_i0_plugin ++endif + + libi422_yuy2_plugin_la_SOURCES = video_chroma/i422_yuy2.c video_chroma/i422_yuy2.h + libi422_yuy2_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \ + -DMODULE_NAME_IS_i422_yuy2 ++if HAVE_OS2 ++libi422_yuy2_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname i2_y2_plugin ++endif + + librv32_plugin_la_SOURCES = video_chroma/rv32.c + + libyuy2_i420_plugin_la_SOURCES = video_chroma/yuy2_i420.c ++if HAVE_OS2 ++libyuy2_i420_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname y2_i0_plugin ++endif + + libyuy2_i422_plugin_la_SOURCES = video_chroma/yuy2_i422.c ++if HAVE_OS2 ++libyuy2_i422_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname y2_i2_plugin ++endif + + libyuvp_plugin_la_SOURCES = video_chroma/yuvp.c + +@@ -80,14 +98,23 @@ endif + libi420_rgb_mmx_plugin_la_SOURCES = video_chroma/i420_rgb.c video_chroma/i420_rgb.h \ + video_chroma/i420_rgb16_x86.c video_chroma/i420_rgb_mmx.h + libi420_rgb_mmx_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -DMMX ++if HAVE_OS2 ++libi420_rgb_mmx_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname i0_r_mmx_plugin ++endif + + libi420_yuy2_mmx_plugin_la_SOURCES = video_chroma/i420_yuy2.c video_chroma/i420_yuy2.h + libi420_yuy2_mmx_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \ + -DMODULE_NAME_IS_i420_yuy2_mmx ++if HAVE_OS2 ++libi420_yuy2_mmx_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname i0_y2_mmx_plugin ++endif + + libi422_yuy2_mmx_plugin_la_SOURCES = video_chroma/i422_yuy2.c video_chroma/i422_yuy2.h + libi422_yuy2_mmx_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \ + -DMODULE_NAME_IS_i422_yuy2_mmx ++if HAVE_OS2 ++libi422_yuy2_mmx_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname i2_y2_mmx_plugin ++endif + + if HAVE_MMX + chroma_LTLIBRARIES += \ +@@ -100,14 +127,23 @@ endif + libi420_rgb_sse2_plugin_la_SOURCES = video_chroma/i420_rgb.c video_chroma/i420_rgb.h \ + video_chroma/i420_rgb16_x86.c video_chroma/i420_rgb_sse2.h + libi420_rgb_sse2_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -DSSE2 ++if HAVE_OS2 ++libi420_rgb_sse2_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname i0_r_sse2_plugin ++endif + + libi420_yuy2_sse2_plugin_la_SOURCES = video_chroma/i420_yuy2.c video_chroma/i420_yuy2.h + libi420_yuy2_sse2_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \ + -DMODULE_NAME_IS_i420_yuy2_sse2 ++if HAVE_OS2 ++libi420_yuy2_sse2_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname i0_y2_sse2_plugin ++endif + + libi422_yuy2_sse2_plugin_la_SOURCES = video_chroma/i422_yuy2.c video_chroma/i422_yuy2.h + libi422_yuy2_sse2_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \ + -DMODULE_NAME_IS_i422_yuy2_sse2 ++if HAVE_OS2 ++libi422_yuy2_sse2_plugin_la_LDFLAGS = $(AM_LDFLAGS) -os2dllname i2_y2_sse2_plugin ++endif + + if HAVE_SSE2 + chroma_LTLIBRARIES += \ +-- +2.42.0 + diff --git a/patches/vlc-3.0.21/0002-kva-workaround-stays-on-top-of-Qt-4.7.3GA-for-OS-2.patch b/patches/vlc-3.0.21/0002-kva-workaround-stays-on-top-of-Qt-4.7.3GA-for-OS-2.patch new file mode 100644 index 0000000..46b593b --- /dev/null +++ b/patches/vlc-3.0.21/0002-kva-workaround-stays-on-top-of-Qt-4.7.3GA-for-OS-2.patch @@ -0,0 +1,154 @@ +From 62e5f0ebcc191a7fdbcdc1e7c784f4c29d1bfdba Mon Sep 17 00:00:00 2001 +From: KO Myung-Hun +Date: Mon, 22 Oct 2012 18:13:06 +0900 +Subject: [PATCH 02/26] kva: workaround stays-on-top of Qt 4.7.3GA for OS/2 + +Qt::WindowStaysOnTopHint does not work on Qt 4.7.3GA for OS/2. +--- + modules/video_output/kva.c | 90 +++++++++++++++++++++++++++++++++++--- + 1 file changed, 85 insertions(+), 5 deletions(-) + +diff --git a/modules/video_output/kva.c b/modules/video_output/kva.c +index a97821626f..16d7f18bdf 100644 +--- a/modules/video_output/kva.c ++++ b/modules/video_output/kva.c +@@ -75,6 +75,15 @@ vlc_module_begin () + set_callbacks( Open, Close ) + vlc_module_end () + ++/* Qt::WindowStaysOnTopHint does not work on Qt 4.7.3GA for OS/2. ++ * Use workaround for this. ++ */ ++#define USE_WORKAROUND_STAYS_ON_TOP_OF_QT 1 ++ ++#if USE_WORKAROUND_STAYS_ON_TOP_OF_QT ++# define QPOPUP_CLASS "QPopup" ++#endif ++ + /***************************************************************************** + * vout_display_sys_t: video output method descriptor + ***************************************************************************** +@@ -103,6 +112,9 @@ struct vout_display_sys_t + unsigned button_pressed; + bool is_mouse_hidden; + bool is_on_top; ++#if USE_WORKAROUND_STAYS_ON_TOP_OF_QT ++ PID pid; ++#endif + }; + + struct picture_sys_t +@@ -216,7 +228,7 @@ static void PMThread( void *arg ) + + WinSetWindowPtr( sys->client, 0, vd ); + +- if( !sys->parent_window ) ++ if( !sys->parent_window || USE_WORKAROUND_STAYS_ON_TOP_OF_QT ) + { + WinSetWindowPtr( sys->frame, 0, vd ); + sys->p_old_frame = WinSubclassWindow( sys->frame, MyFrameWndProc ); +@@ -277,13 +289,17 @@ static void PMThread( void *arg ) + sys->i_result = VLC_SUCCESS; + DosPostEventSem( sys->ack_event ); + +- if( !sys->parent_window ) ++ if( !sys->parent_window || USE_WORKAROUND_STAYS_ON_TOP_OF_QT ) + WinSetVisibleRegionNotify( sys->frame, TRUE ); + ++#if USE_WORKAROUND_STAYS_ON_TOP_OF_QT ++ WinQueryWindowProcess( sys->frame, &sys->pid, NULL ); ++#endif ++ + while( WinGetMsg( sys->hab, &qm, NULLHANDLE, 0, 0 )) + WinDispatchMsg( sys->hab, &qm ); + +- if( !sys->parent_window ) ++ if( !sys->parent_window || USE_WORKAROUND_STAYS_ON_TOP_OF_QT ) + WinSetVisibleRegionNotify( sys->frame, FALSE ); + + kvaEnableScreenSaver(); +@@ -296,7 +312,7 @@ exit_open_display : + kvaDone(); + + exit_kva_init : +- if( !sys->parent_window ) ++ if( !sys->parent_window || USE_WORKAROUND_STAYS_ON_TOP_OF_QT ) + WinSubclassWindow( sys->frame, sys->p_old_frame ); + + WinDestroyWindow( sys->frame ); +@@ -919,7 +935,71 @@ static MRESULT EXPENTRY MyFrameWndProc( HWND hwnd, ULONG msg, MPARAM mp1, + //case WM_VRNDISABLED : + case WM_VRNENABLED : + if( !vd->cfg->is_fullscreen && sys->is_on_top ) +- WinSetWindowPos( hwnd, HWND_TOP, 0, 0, 0, 0, SWP_ZORDER ); ++ { ++ HWND frame = hwnd; ++ HWND top = HWND_TOP; ++ ++#if USE_WORKAROUND_STAYS_ON_TOP_OF_QT ++ if( sys->parent_window ) ++ { ++ HWND parent; ++ HWND desktop = WinQueryDesktopWindow( sys->hab, ++ NULLHANDLE ); ++ ++ /* Find a main window */ ++ for( frame = sys->parent;; frame = parent ) ++ { ++ parent = WinQueryWindow( frame, QW_PARENT ); ++ if( parent == desktop ) ++ break; ++ } ++ } ++ ++ HENUM henum; ++ HWND current; ++ char szClassName[ 80 ]; ++ PID pidCurrent; ++ ++ /* Find a QPopup window above a video window, but ++ * belowest one. ++ */ ++ henum = WinBeginEnumWindows( HWND_DESKTOP ); ++ while(( current = WinGetNextWindow( henum )) != NULLHANDLE ) ++ { ++ /* Reached to me ? */ ++ if( current == frame ) ++ break; ++ ++ /* Only check a physically showing window */ ++ if( !WinIsWindowShowing( current )) ++ continue; ++ ++ WinQueryWindowProcess( current, &pidCurrent, NULL ); ++ ++ if( pidCurrent == sys->pid ) ++ { ++ /* Behind any VLC window in case of ++ * an embedded window. ++ */ ++ if( sys->parent_window ) ++ { ++ top = current; ++ continue; ++ } ++ ++ WinQueryClassName( current, sizeof( szClassName ), ++ szClassName ); ++ ++ /* A QPopup window above me ? */ ++ if( !strcmp( szClassName, QPOPUP_CLASS )) ++ top = current; ++ } ++ } ++ WinEndEnumWindows( henum ); ++#endif ++ ++ WinSetWindowPos( frame, top, 0, 0, 0, 0, SWP_ZORDER ); ++ } + break; + } + +-- +2.42.0 + diff --git a/patches/vlc-3.0.21/0003-Revert-qt-drop-Qt-4-support-set-minimal-Qt-version-t.patch b/patches/vlc-3.0.21/0003-Revert-qt-drop-Qt-4-support-set-minimal-Qt-version-t.patch new file mode 100644 index 0000000..977f19f --- /dev/null +++ b/patches/vlc-3.0.21/0003-Revert-qt-drop-Qt-4-support-set-minimal-Qt-version-t.patch @@ -0,0 +1,455 @@ +From 65d17d4077ccb27bfc389008e4081feac2980345 Mon Sep 17 00:00:00 2001 +From: KO Myung-Hun +Date: Tue, 24 Oct 2017 20:15:06 +0900 +Subject: [PATCH 03/26] Revert "qt: drop Qt 4 support, set minimal Qt version + to 5.5" + +This reverts commit 1c221a77d92935866e897254c07e1d12a4b95ae0. + +OS/2 still uses Qt 4. +--- + configure.ac | 17 ++++++++----- + modules/gui/qt/components/info_panels.cpp | 4 +++ + .../gui/qt/components/interface_widgets.cpp | 8 +++--- + modules/gui/qt/components/open_panels.cpp | 6 +++++ + modules/gui/qt/components/playlist/views.cpp | 4 +++ + modules/gui/qt/dialogs/messages.cpp | 4 +++ + modules/gui/qt/dialogs/plugins.cpp | 18 +++++++++++++ + modules/gui/qt/dialogs/toolbar.cpp | 8 ++++++ + modules/gui/qt/dialogs_provider.cpp | 6 +++++ + modules/gui/qt/main_interface_win32.cpp | 25 ++++++++++++++++--- + modules/gui/qt/main_interface_win32.hpp | 2 ++ + modules/gui/qt/qt.cpp | 24 ++++++++++++------ + modules/gui/qt/qt.hpp | 11 ++++++-- + modules/gui/qt/util/timetooltip.cpp | 2 +- + 14 files changed, 117 insertions(+), 22 deletions(-) + +diff --git a/configure.ac b/configure.ac +index b454198157..80cec0431b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -3780,15 +3780,20 @@ AS_IF([test "${enable_qt}" != "no"], [ + AC_PATH_PROGS(RCC, [rcc-qt5 rcc], rcc, ["${QT_HOST_PATH}" "${QT_PATH}/bin"]) + AC_PATH_PROGS(UIC, [uic-qt5 uic], uic, ["${QT_HOST_PATH}" "${QT_PATH}/bin"]) + ], [ +- AS_IF([test -n "${enable_qt}"],[ +- AC_MSG_ERROR([${QT_PKG_ERRORS}.]) +- ],[ +- AC_MSG_WARN([${QT_PKG_ERRORS}.]) ++ PKG_CHECK_MODULES([QT], [QtCore QtGui >= 4.8.0],, [ ++ AS_IF([test -n "${enable_qt}"],[ ++ AC_MSG_ERROR([${QT_PKG_ERRORS}.]) ++ ],[ ++ AC_MSG_WARN([${QT_PKG_ERRORS}.]) ++ ]) ++ enable_qt="no" + ]) +- enable_qt="no" ++ QT_PATH="$(eval $PKG_CONFIG --variable=exec_prefix QtCore)" ++ AC_PATH_PROGS(MOC, [moc-qt4 moc], moc, ["${QT_PATH}/bin"]) ++ AC_PATH_PROG(RCC, rcc, rcc, ["${QT_PATH}/bin"]) ++ AC_PATH_PROGS(UIC, [uic-qt4 uic], uic, ["${QT_PATH}/bin"]) + ]) + ]) +- + AS_IF([test "${enable_qt}" != "no"], [ + ALIASES="${ALIASES} qvlc" + ]) +diff --git a/modules/gui/qt/components/info_panels.cpp b/modules/gui/qt/components/info_panels.cpp +index 161f593942..a3c507dc35 100644 +--- a/modules/gui/qt/components/info_panels.cpp ++++ b/modules/gui/qt/components/info_panels.cpp +@@ -479,7 +479,11 @@ InfoPanel::InfoPanel( QWidget *parent ) : QWidget( parent ) + InfoTree = new QTreeWidget(this); + InfoTree->setColumnCount( 1 ); + InfoTree->header()->hide(); ++#if HAS_QT5 + InfoTree->header()->setSectionResizeMode(QHeaderView::ResizeToContents); ++#else ++ InfoTree->header()->setResizeMode(QHeaderView::ResizeToContents); ++#endif + layout->addWidget(InfoTree, 1, 0 ); + } + +diff --git a/modules/gui/qt/components/interface_widgets.cpp b/modules/gui/qt/components/interface_widgets.cpp +index 4a0a0dae12..361c219752 100644 +--- a/modules/gui/qt/components/interface_widgets.cpp ++++ b/modules/gui/qt/components/interface_widgets.cpp +@@ -63,7 +63,7 @@ + # include + #endif + +-#if defined(_WIN32) ++#if defined(_WIN32) && HAS_QT5 + #include + #include + #endif +@@ -205,7 +205,7 @@ QSize VideoWidget::physicalSize() const + return QSize( x_attributes.width, x_attributes.height ); + } + #endif +-#if defined(_WIN32) ++#if defined(_WIN32) && HAS_QT5 + HWND hwnd; + RECT rect; + +@@ -222,9 +222,11 @@ QSize VideoWidget::physicalSize() const + # if HAS_QT56 + /* Android-like scaling */ + current_size *= devicePixelRatioF(); +-# else ++# elif HAS_QT54 + /* OSX-like scaling */ + current_size *= devicePixelRatio(); ++# else ++# warning "No HiDPI support" + # endif + + return current_size; +diff --git a/modules/gui/qt/components/open_panels.cpp b/modules/gui/qt/components/open_panels.cpp +index ec39edde0e..c0361717e9 100644 +--- a/modules/gui/qt/components/open_panels.cpp ++++ b/modules/gui/qt/components/open_panels.cpp +@@ -280,9 +280,15 @@ void FileOpenPanel::updateMRL() + fileList << url.toEncoded(); + else + { ++#if HAS_QT5 + QList urls = dialogBox->selectedUrls(); + foreach( const QUrl &url, urls ) + fileList.append( url.toEncoded() ); ++#else ++ fileList = dialogBox->selectedFiles(); ++ for( int i = 0; i < fileList.count(); i++ ) ++ fileList[i] = toURI( fileList[i] ); ++#endif + } + + /* Options */ +diff --git a/modules/gui/qt/components/playlist/views.cpp b/modules/gui/qt/components/playlist/views.cpp +index 70dd29df72..22bd3982d6 100644 +--- a/modules/gui/qt/components/playlist/views.cpp ++++ b/modules/gui/qt/components/playlist/views.cpp +@@ -432,7 +432,11 @@ PlTreeView::PlTreeView( QAbstractItemModel *, QWidget *parent ) : QTreeView( par + viewport()->setAttribute( Qt::WA_Hover ); + header()->setSortIndicator( -1 , Qt::AscendingOrder ); + header()->setSortIndicatorShown( true ); ++#if HAS_QT5 + header()->setSectionsClickable( true ); ++#else ++ header()->setClickable( true ); ++#endif + header()->setContextMenuPolicy( Qt::CustomContextMenu ); + + setSelectionBehavior( QAbstractItemView::SelectRows ); +diff --git a/modules/gui/qt/dialogs/messages.cpp b/modules/gui/qt/dialogs/messages.cpp +index c015868244..688543caf7 100644 +--- a/modules/gui/qt/dialogs/messages.cpp ++++ b/modules/gui/qt/dialogs/messages.cpp +@@ -340,7 +340,11 @@ void MessagesDialog::MsgCallback( void *self, int type, const vlc_log_t *item, + { + MessagesDialog *dialog = (MessagesDialog *)self; + char *str; ++#if HAS_QT5 + int verbosity = dialog->verbosity.load(); ++#else ++ int verbosity = dialog->verbosity; ++#endif + + if( verbosity < 0 || verbosity < (type - VLC_MSG_ERR) + || unlikely(vasprintf( &str, format, ap ) == -1) ) +diff --git a/modules/gui/qt/dialogs/plugins.cpp b/modules/gui/qt/dialogs/plugins.cpp +index 0ed8313e7b..db7bdfeb0d 100644 +--- a/modules/gui/qt/dialogs/plugins.cpp ++++ b/modules/gui/qt/dialogs/plugins.cpp +@@ -118,7 +118,11 @@ PluginTab::PluginTab( intf_thread_t *p_intf_ ) + layout->addWidget( treePlugins, 0, 0, 1, -1 ); + + /* Users cannot move the columns around but we need to sort */ ++#if HAS_QT5 + treePlugins->header()->setSectionsMovable( false ); ++#else ++ treePlugins->header()->setMovable( false ); ++#endif + treePlugins->header()->setSortIndicatorShown( true ); + // treePlugins->header()->setResizeMode( QHeaderView::ResizeToContents ); + treePlugins->setAlternatingRowColors( true ); +@@ -1050,7 +1054,11 @@ void ExtensionItemDelegate::paint( QPainter *painter, + const QStyleOptionViewItem &option, + const QModelIndex &index ) const + { ++#if HAS_QT5 + QStyleOptionViewItem opt = option; ++#else ++ QStyleOptionViewItemV4 opt = option; ++#endif + initStyleOption( &opt, index ); + + // Draw background +@@ -1132,7 +1140,11 @@ void AddonItemDelegate::paint( QPainter *painter, + const QStyleOptionViewItem &option, + const QModelIndex &index ) const + { ++#if HAS_QT5 + QStyleOptionViewItem newopt = option; ++#else ++ QStyleOptionViewItemV4 newopt = option; ++#endif + int i_state = index.data( AddonsListModel::StateRole ).toInt(); + int i_type = index.data( AddonsListModel::TypeRole ).toInt(); + +@@ -1255,9 +1267,15 @@ void AddonItemDelegate::paint( QPainter *painter, + progressbar->setGeometry( + newopt.rect.adjusted( adjustment.width(), adjustment.height(), + -adjustment.width(), -adjustment.height() ) ); ++#if HAS_QT5 + painter->drawPixmap( newopt.rect.left() + adjustment.width(), + newopt.rect.top() + adjustment.height(), + progressbar->grab() ); ++#else ++ painter->drawPixmap( newopt.rect.left() + adjustment.width(), ++ newopt.rect.top() + adjustment.height(), ++ QPixmap::grabWidget( progressbar ) ); ++#endif + } + painter->restore(); + } +diff --git a/modules/gui/qt/dialogs/toolbar.cpp b/modules/gui/qt/dialogs/toolbar.cpp +index 58a90f7c5b..41ba760fbe 100644 +--- a/modules/gui/qt/dialogs/toolbar.cpp ++++ b/modules/gui/qt/dialogs/toolbar.cpp +@@ -318,6 +318,7 @@ void PreviewWidget::paintEvent( QPaintEvent * ) + + for( int i=0; i<3; i++ ) + { ++#if HAS_QT5 + pixmaps[i] = bars[i]->grab( bars[i]->contentsRect() ); + /* Because non shown widgets do not have their bitmap updated, we need + to force redraw to grab a pixmap matching layout size */ +@@ -327,6 +328,9 @@ void PreviewWidget::paintEvent( QPaintEvent * ) + pixmaps[i] = bars[i]->grab( bars[i]->contentsRect() ); + } + ++#else ++ pixmaps[i] = QPixmap::grabWidget( bars[i], bars[i]->contentsRect() ); ++#endif + for( int j=0; j < bars[i]->layout()->count(); j++ ) + { + QLayoutItem *item = bars[i]->layout()->itemAt( j ); +@@ -584,7 +588,11 @@ WidgetListing::WidgetListing( intf_thread_t *p_intf, QWidget *_parent ) + if( widget == NULL ) continue; + + ++#if HAS_QT5 + widgetItem->setIcon( QIcon( widget->grab() ) ); ++#else ++ widgetItem->setIcon( QIcon( QPixmap::grabWidget( widget ) ) ); ++#endif + widgetItem->setToolTip( widgetItem->text() ); + widget->hide(); + widgetItem->setData( Qt::UserRole, QVariant( i ) ); +diff --git a/modules/gui/qt/dialogs_provider.cpp b/modules/gui/qt/dialogs_provider.cpp +index eaa33e1eb7..754f59203c 100644 +--- a/modules/gui/qt/dialogs_provider.cpp ++++ b/modules/gui/qt/dialogs_provider.cpp +@@ -121,10 +121,16 @@ QStringList DialogsProvider::getOpenURL( QWidget *parent, + QString *selectedFilter ) + { + QStringList res; ++#if HAS_QT5 + QList urls = QFileDialog::getOpenFileUrls( parent, caption, dir, filter, selectedFilter ); + + foreach( const QUrl& url, urls ) + res.append( url.toEncoded() ); ++#else ++ QStringList files = QFileDialog::getOpenFileNames( parent, caption, dir.toLocalFile(), filter, selectedFilter ); ++ foreach ( const QString& file, files ) ++ res.append( QUrl::fromLocalFile( file ).toEncoded() ); ++#endif + + return res; + } +diff --git a/modules/gui/qt/main_interface_win32.cpp b/modules/gui/qt/main_interface_win32.cpp +index 8e5f1b8c59..d0ed14101f 100644 +--- a/modules/gui/qt/main_interface_win32.cpp ++++ b/modules/gui/qt/main_interface_win32.cpp +@@ -37,8 +37,10 @@ + + #include + +-#include +-#include ++#if HAS_QT5 ++# include ++# include ++#endif + + #define WM_APPCOMMAND 0x0319 + +@@ -104,21 +106,32 @@ MainInterfaceWin32::~MainInterfaceWin32() + + HWND MainInterfaceWin32::WinId( QWidget *w ) + { ++#if HAS_QT5 + if( w && w->windowHandle() ) + return static_cast(QGuiApplication::platformNativeInterface()-> + nativeResourceForWindow("handle", w->windowHandle())); + else + return 0; ++#else ++ return winId(); ++#endif + } + ++#if !HAS_QT5 ++static const int PremultipliedAlpha = QPixmap::PremultipliedAlpha; ++static HBITMAP qt_pixmapToWinHBITMAP(const QPixmap &p, int hbitmapFormat = 0) ++{ ++ return p.toWinHBITMAP((enum QBitmap::HBitmapFormat)hbitmapFormat); ++} ++#else + Q_GUI_EXPORT HBITMAP qt_pixmapToWinHBITMAP(const QPixmap &p, int hbitmapFormat = 0); +- + enum HBitmapFormat + { + NoAlpha, + PremultipliedAlpha, + Alpha + }; ++#endif + + void MainInterfaceWin32::createTaskBarButtons() + { +@@ -215,10 +228,12 @@ void MainInterfaceWin32::createTaskBarButtons() + changeThumbbarButtons( THEMIM->getIM()->playingStatus() ); + } + ++#if HAS_QT5 + bool MainInterfaceWin32::nativeEvent(const QByteArray &, void *message, long *result) + { + return winEvent( static_cast( message ), result ); + } ++#endif + + bool MainInterfaceWin32::winEvent ( MSG * msg, long * result ) + { +@@ -331,8 +346,12 @@ void MainInterfaceWin32::toggleUpdateSystrayMenuWhenVisible() + * but ignore the ones always on top + * and the ones which can't be activated */ + HWND winId; ++#if HAS_QT5 + QWindow *window = windowHandle(); + winId = static_cast(QGuiApplication::platformNativeInterface()->nativeResourceForWindow("handle", window)); ++#else ++ winId = internalWinId(); ++#endif + + WINDOWINFO wi; + HWND hwnd; +diff --git a/modules/gui/qt/main_interface_win32.hpp b/modules/gui/qt/main_interface_win32.hpp +index 1e456c4c35..347eb8ea96 100644 +--- a/modules/gui/qt/main_interface_win32.hpp ++++ b/modules/gui/qt/main_interface_win32.hpp +@@ -36,7 +36,9 @@ public: + virtual ~MainInterfaceWin32(); + + private: ++#if HAS_QT5 + virtual bool nativeEvent(const QByteArray &eventType, void *message, long *result) Q_DECL_OVERRIDE; ++#endif + virtual bool winEvent( MSG *, long * ); + virtual void toggleUpdateSystrayMenuWhenVisible() Q_DECL_OVERRIDE; + +diff --git a/modules/gui/qt/qt.cpp b/modules/gui/qt/qt.cpp +index cefc75830f..18a034511a 100644 +--- a/modules/gui/qt/qt.cpp ++++ b/modules/gui/qt/qt.cpp +@@ -53,14 +53,18 @@ + + #ifdef _WIN32 /* For static builds */ + #include +- +- #ifdef QT_STATICPLUGIN +- Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin) +- Q_IMPORT_PLUGIN(QSvgIconPlugin) +- Q_IMPORT_PLUGIN(QSvgPlugin) +- #if !HAS_QT56 +- Q_IMPORT_PLUGIN(AccessibleFactory) ++ #if HAS_QT5 ++ #ifdef QT_STATICPLUGIN ++ Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin) ++ Q_IMPORT_PLUGIN(QSvgIconPlugin) ++ Q_IMPORT_PLUGIN(QSvgPlugin) ++ #if !HAS_QT56 ++ Q_IMPORT_PLUGIN(AccessibleFactory) ++ #endif + #endif ++ #else ++ Q_IMPORT_PLUGIN(qjpeg) ++ Q_IMPORT_PLUGIN(qtaccessiblewidgets) + #endif + #endif + +@@ -597,6 +601,7 @@ static void *ThreadPlatform( void *obj, char *platform_name ) + + /* Check window type from the Qt platform back-end */ + p_sys->voutWindowType = VOUT_WINDOW_TYPE_INVALID; ++#if HAS_QT5 + QString platform = app.platformName(); + if( platform == qfu("xcb") ) + p_sys->voutWindowType = VOUT_WINDOW_TYPE_XID; +@@ -608,6 +613,11 @@ static void *ThreadPlatform( void *obj, char *platform_name ) + p_sys->voutWindowType = VOUT_WINDOW_TYPE_NSOBJECT; + else + msg_Err( p_intf, "unknown Qt platform: %s", qtu(platform) ); ++#elif defined (Q_WS_WIN) || defined (Q_WS_PM) ++ p_sys->voutWindowType = VOUT_WINDOW_TYPE_HWND; ++#elif defined (Q_WS_MAC) ++ p_sys->voutWindowType = VOUT_WINDOW_TYPE_NSOBJECT; ++#endif + + var_Create( THEPL, "qt4-iface", VLC_VAR_ADDRESS ); + var_SetAddress( THEPL, "qt4-iface", p_intf ); +diff --git a/modules/gui/qt/qt.hpp b/modules/gui/qt/qt.hpp +index e59583ab71..14e4b782cb 100644 +--- a/modules/gui/qt/qt.hpp ++++ b/modules/gui/qt/qt.hpp +@@ -43,13 +43,20 @@ + #include + #include + +-#if ( QT_VERSION < 0x050500 ) +-# error Update your Qt version to at least 5.5.0 ++#if ( QT_VERSION < 0x040800 ) ++# error Update your Qt version to at least 4.8.0 + #endif + ++#define HAS_QT5 ( QT_VERSION >= 0x050000 ) ++#define HAS_QT54 ( QT_VERSION >= 0x050400 ) + #define HAS_QT56 ( QT_VERSION >= 0x050600 ) + #define HAS_QT510 ( QT_VERSION >= 0x051000 ) + ++/* Q_DECL_OVERRIDE is a Qt5 feature, add empty define to not break with Qt4 */ ++#if !HAS_QT5 && !defined(Q_DECL_OVERRIDE) ++# define Q_DECL_OVERRIDE ++#endif ++ + enum { + DialogEventTypeOffset = 0, + IMEventTypeOffset = 100, +diff --git a/modules/gui/qt/util/timetooltip.cpp b/modules/gui/qt/util/timetooltip.cpp +index 8cfdab3206..0c02877e93 100644 +--- a/modules/gui/qt/util/timetooltip.cpp ++++ b/modules/gui/qt/util/timetooltip.cpp +@@ -69,7 +69,7 @@ void TimeTooltip::adjustPosition() + + // The desired label position is just above the target + QPoint position( mTarget.x() - size.width() / 2, +-#if defined( Q_OS_WIN ) ++#if defined( Q_OS_WIN ) && HAS_QT5 + mTarget.y() - 2 * size.height() - TIP_HEIGHT / 2 ); + #else + mTarget.y() - size.height() - TIP_HEIGHT / 2 ); +-- +2.42.0 + diff --git a/patches/vlc-3.0.21/0004-qt-support-Qt-4.7.patch b/patches/vlc-3.0.21/0004-qt-support-Qt-4.7.patch new file mode 100644 index 0000000..0277811 --- /dev/null +++ b/patches/vlc-3.0.21/0004-qt-support-Qt-4.7.patch @@ -0,0 +1,42 @@ +From 0243f4665b79fbf2d05549d4f92ac6d28f0b5ae9 Mon Sep 17 00:00:00 2001 +From: KO Myung-Hun +Date: Sat, 2 Apr 2016 16:22:26 +0900 +Subject: [PATCH 04/26] qt: support Qt 4.7 + +OS/2 still uses Qt 4.7.3. +--- + configure.ac | 2 +- + modules/gui/qt/qt.hpp | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 80cec0431b..e6b08e6f1d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -3780,7 +3780,7 @@ AS_IF([test "${enable_qt}" != "no"], [ + AC_PATH_PROGS(RCC, [rcc-qt5 rcc], rcc, ["${QT_HOST_PATH}" "${QT_PATH}/bin"]) + AC_PATH_PROGS(UIC, [uic-qt5 uic], uic, ["${QT_HOST_PATH}" "${QT_PATH}/bin"]) + ], [ +- PKG_CHECK_MODULES([QT], [QtCore QtGui >= 4.8.0],, [ ++ PKG_CHECK_MODULES([QT], [QtCore QtGui >= 4.7.0],, [ + AS_IF([test -n "${enable_qt}"],[ + AC_MSG_ERROR([${QT_PKG_ERRORS}.]) + ],[ +diff --git a/modules/gui/qt/qt.hpp b/modules/gui/qt/qt.hpp +index 14e4b782cb..467948ec11 100644 +--- a/modules/gui/qt/qt.hpp ++++ b/modules/gui/qt/qt.hpp +@@ -43,8 +43,8 @@ + #include + #include + +-#if ( QT_VERSION < 0x040800 ) +-# error Update your Qt version to at least 4.8.0 ++#if ( QT_VERSION < 0x040700 ) ++# error Update your Qt version to at least 4.7.0 + #endif + + #define HAS_QT5 ( QT_VERSION >= 0x050000 ) +-- +2.42.0 + diff --git a/patches/vlc-3.0.21/0005-qt-add-QtSvg-for-Qt4.patch b/patches/vlc-3.0.21/0005-qt-add-QtSvg-for-Qt4.patch new file mode 100644 index 0000000..694f452 --- /dev/null +++ b/patches/vlc-3.0.21/0005-qt-add-QtSvg-for-Qt4.patch @@ -0,0 +1,25 @@ +From 6cb9f03a1038e07f26e46055a577b601403ad0a3 Mon Sep 17 00:00:00 2001 +From: KO Myung-Hun +Date: Tue, 24 Oct 2017 21:28:16 +0900 +Subject: [PATCH 05/26] qt: add QtSvg for Qt4 + +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index e6b08e6f1d..623af3b7f7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -3780,7 +3780,7 @@ AS_IF([test "${enable_qt}" != "no"], [ + AC_PATH_PROGS(RCC, [rcc-qt5 rcc], rcc, ["${QT_HOST_PATH}" "${QT_PATH}/bin"]) + AC_PATH_PROGS(UIC, [uic-qt5 uic], uic, ["${QT_HOST_PATH}" "${QT_PATH}/bin"]) + ], [ +- PKG_CHECK_MODULES([QT], [QtCore QtGui >= 4.7.0],, [ ++ PKG_CHECK_MODULES([QT], [QtCore QtGui QtSvg >= 4.7.0],, [ + AS_IF([test -n "${enable_qt}"],[ + AC_MSG_ERROR([${QT_PKG_ERRORS}.]) + ],[ +-- +2.42.0 + diff --git a/patches/vlc-3.0.21/0006-qt-port-Qt5-codes-to-Qt4-codes.patch b/patches/vlc-3.0.21/0006-qt-port-Qt5-codes-to-Qt4-codes.patch new file mode 100644 index 0000000..6fa4355 --- /dev/null +++ b/patches/vlc-3.0.21/0006-qt-port-Qt5-codes-to-Qt4-codes.patch @@ -0,0 +1,58 @@ +From 86135619ca23578dc111a2dbf9835a62b1861233 Mon Sep 17 00:00:00 2001 +From: KO Myung-Hun +Date: Sun, 12 Nov 2017 19:45:53 +0900 +Subject: [PATCH 06/26] qt: port Qt5 codes to Qt4 codes + +--- + modules/gui/qt/components/playlist/playlist_model.cpp | 9 +++++++++ + modules/gui/qt/main_interface.cpp | 4 ++++ + 2 files changed, 13 insertions(+) + +diff --git a/modules/gui/qt/components/playlist/playlist_model.cpp b/modules/gui/qt/components/playlist/playlist_model.cpp +index a6bdd1f8e4..a0740ed854 100644 +--- a/modules/gui/qt/components/playlist/playlist_model.cpp ++++ b/modules/gui/qt/components/playlist/playlist_model.cpp +@@ -528,7 +528,11 @@ PLItem *PLModel::findByPLId( PLItem *root, int i_id ) const + + QStack stack; + if( root->childCount() ) ++#if HAS_QT5 + stack.push( {root->children.cbegin(), root->children.cend()} ); ++#else ++ stack.push( {root->children.constBegin(), root->children.constEnd()} ); ++#endif + + while ( !stack.isEmpty() ) + { +@@ -543,7 +547,12 @@ PLItem *PLModel::findByPLId( PLItem *root, int i_id ) const + stack.pop(); + + if( item->childCount() ) ++#if HAS_QT5 + stack.push( {item->children.cbegin(), item->children.cend()} ); ++#else ++ stack.push( {item->children.constBegin(), ++ item->children.constEnd()} ); ++#endif + } + return NULL; + } +diff --git a/modules/gui/qt/main_interface.cpp b/modules/gui/qt/main_interface.cpp +index 095c765932..ad452030a6 100644 +--- a/modules/gui/qt/main_interface.cpp ++++ b/modules/gui/qt/main_interface.cpp +@@ -235,7 +235,11 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) + CONNECT( this, askRaise(), this, setRaise() ); + + ++#if HAS_QT5 + connect( THEDP, &DialogsProvider::releaseMouseEvents, this, &MainInterface::voutReleaseMouseEvents ) ; ++#else ++ CONNECT( THEDP, releaseMouseEvents(), this, voutReleaseMouseEvents() ); ++#endif + /** END of CONNECTS**/ + + +-- +2.42.0 + diff --git a/patches/vlc-3.0.21/0007-Revert-qt-improve-rendering-of-simple_pref-icons-for.patch b/patches/vlc-3.0.21/0007-Revert-qt-improve-rendering-of-simple_pref-icons-for.patch new file mode 100644 index 0000000..f98f693 --- /dev/null +++ b/patches/vlc-3.0.21/0007-Revert-qt-improve-rendering-of-simple_pref-icons-for.patch @@ -0,0 +1,55 @@ +From d5a7b069a45bbfd9f909eb70ad3c4bd87b4b327b Mon Sep 17 00:00:00 2001 +From: KO Myung-Hun +Date: Thu, 23 Nov 2017 16:28:12 +0900 +Subject: [PATCH 07/26] Revert "qt: improve rendering of simple_pref icons for + HiDpi" + +This reverts commit 995870c54c2d6daa729ed4c9008730d06af2070b. +--- + modules/gui/qt/components/simple_preferences.cpp | 13 +++---------- + 1 file changed, 3 insertions(+), 10 deletions(-) + +diff --git a/modules/gui/qt/components/simple_preferences.cpp b/modules/gui/qt/components/simple_preferences.cpp +index 6192dbb7da..b1a502dc93 100644 +--- a/modules/gui/qt/components/simple_preferences.cpp ++++ b/modules/gui/qt/components/simple_preferences.cpp +@@ -51,7 +51,6 @@ + #include + + #define ICON_HEIGHT 48 +-#define ICON_WIDTH 48 + + #ifdef _WIN32 + # include +@@ -217,25 +216,19 @@ SPrefsCatList::SPrefsCatList( intf_thread_t *_p_intf, QWidget *_parent ) : + CONNECT( mapper, mapped(int), this, switchPanel(int) ); + + QPixmap scaled; +-#if HAS_QT56 +- qreal dpr = devicePixelRatioF(); +-#else +- qreal dpr = devicePixelRatio(); +-#endif + + #define ADD_CATEGORY( button, label, ltooltip, icon, numb ) \ + QToolButton * button = new QToolButton( this ); \ + /* Scale icon to non native size outside of toolbutton to avoid widget size */\ + /* computation using native size */\ + scaled = QPixmap( ":/prefsmenu/" #icon ".png" )\ +- .scaledToHeight( ICON_HEIGHT * dpr, Qt::SmoothTransformation );\ +- scaled.setDevicePixelRatio( dpr ); \ ++ .scaledToHeight( ICON_HEIGHT , Qt::SmoothTransformation );\ + button->setIcon( scaled ); \ + button->setText( label ); \ + button->setToolTip( ltooltip ); \ + button->setToolButtonStyle( Qt::ToolButtonTextUnderIcon ); \ +- button->setIconSize( QSize( ICON_WIDTH, ICON_HEIGHT ) ); \ +- button->setMinimumWidth( 40 + ICON_WIDTH );\ ++ button->setIconSize( QSize( scaled.width(), scaled.height() ) ); \ ++ button->setMinimumWidth( 40 + scaled.width() );\ + button->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum); \ + button->setAutoRaise( true ); \ + button->setCheckable( true ); \ +-- +2.42.0 + diff --git a/patches/vlc-3.0.21/0008-Revert-qt-improve-rendering-of-central-cone-for-HiDp.patch b/patches/vlc-3.0.21/0008-Revert-qt-improve-rendering-of-central-cone-for-HiDp.patch new file mode 100644 index 0000000..4f641e6 --- /dev/null +++ b/patches/vlc-3.0.21/0008-Revert-qt-improve-rendering-of-central-cone-for-HiDp.patch @@ -0,0 +1,78 @@ +From fb39d90cff77c52b7bee410163c143ac31573bba Mon Sep 17 00:00:00 2001 +From: KO Myung-Hun +Date: Thu, 23 Nov 2017 16:51:23 +0900 +Subject: [PATCH 08/26] Revert "qt: improve rendering of central cone for + HiDpi" + +This reverts commit d98da2c893ea58aac9193f70e59c3205a76a4802. +--- + .../gui/qt/components/interface_widgets.cpp | 36 +++++++++---------- + 1 file changed, 18 insertions(+), 18 deletions(-) + +diff --git a/modules/gui/qt/components/interface_widgets.cpp b/modules/gui/qt/components/interface_widgets.cpp +index 361c219752..6bfac8b500 100644 +--- a/modules/gui/qt/components/interface_widgets.cpp ++++ b/modules/gui/qt/components/interface_widgets.cpp +@@ -507,13 +507,8 @@ void BackgroundWidget::paintEvent( QPaintEvent *e ) + int i_maxwidth, i_maxheight; + QPixmap pixmap = QPixmap( pixmapUrl ); + QPainter painter(this); +- +-#if HAS_QT56 +- qreal dpr = devicePixelRatioF(); +-#else +- qreal dpr = devicePixelRatio(); +-#endif +- pixmap.setDevicePixelRatio( dpr ); ++ QBitmap pMask; ++ float f_alpha = 1.0; + + i_maxwidth = __MIN( maximumWidth(), width() ) - MARGIN * 2; + i_maxheight = __MIN( maximumHeight(), height() ) - MARGIN * 2; +@@ -525,27 +520,32 @@ void BackgroundWidget::paintEvent( QPaintEvent *e ) + /* Scale down the pixmap if the widget is too small */ + if( pixmap.width() > i_maxwidth || pixmap.height() > i_maxheight ) + { +- pixmap = pixmap.scaled( i_maxwidth * dpr, i_maxheight * dpr , ++ pixmap = pixmap.scaled( i_maxwidth, i_maxheight, + Qt::KeepAspectRatio, Qt::SmoothTransformation ); + } + else + if ( b_expandPixmap && + pixmap.width() < width() && pixmap.height() < height() ) + { ++ /* Scale up the pixmap to fill widget's size */ ++ f_alpha = ( (float) pixmap.height() / (float) height() ); + pixmap = pixmap.scaled( +- (width() - MARGIN * 2) * dpr, +- (height() - MARGIN * 2) * dpr , +- Qt::KeepAspectRatio, Qt::SmoothTransformation); +- } +- else if (dpr != 1.0) +- { +- pixmap = pixmap.scaled( pixmap.width() * dpr, pixmap.height() * dpr, +- Qt::KeepAspectRatio, Qt::SmoothTransformation ); ++ width() - MARGIN * 2, ++ height() - MARGIN * 2, ++ Qt::KeepAspectRatio, ++ ( f_alpha < .2 )? /* Don't waste cpu when not visible */ ++ Qt::SmoothTransformation: ++ Qt::FastTransformation ++ ); ++ /* Non agressive alpha compositing when sizing up */ ++ pMask = QBitmap( pixmap.width(), pixmap.height() ); ++ pMask.fill( QColor::fromRgbF( 1.0, 1.0, 1.0, f_alpha ) ); ++ pixmap.setMask( pMask ); + } + + painter.drawPixmap( +- MARGIN + ( i_maxwidth - ( pixmap.width() / dpr ) ) / 2, +- MARGIN + ( i_maxheight - ( pixmap.height() / dpr ) ) / 2, ++ MARGIN + ( i_maxwidth - pixmap.width() ) /2, ++ MARGIN + ( i_maxheight - pixmap.height() ) /2, + pixmap); + } + QWidget::paintEvent( e ); +-- +2.42.0 + diff --git a/patches/vlc-3.0.21/0009-Revert-qt-Don-t-enforce-a-default-screen-to-the-full.patch b/patches/vlc-3.0.21/0009-Revert-qt-Don-t-enforce-a-default-screen-to-the-full.patch new file mode 100644 index 0000000..5f5387c --- /dev/null +++ b/patches/vlc-3.0.21/0009-Revert-qt-Don-t-enforce-a-default-screen-to-the-full.patch @@ -0,0 +1,40 @@ +From 7dc051af416df1ac716dc21224b6aebb9b48d92a Mon Sep 17 00:00:00 2001 +From: KO Myung-Hun +Date: Thu, 22 Mar 2018 21:08:16 +0900 +Subject: [PATCH 09/26] Revert "qt: Don't enforce a default screen to the + fullscreen controller" + +This reverts commit 169a441790e9006652487d5424b0e3678612a6fd. +--- + modules/gui/qt/main_interface.cpp | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +diff --git a/modules/gui/qt/main_interface.cpp b/modules/gui/qt/main_interface.cpp +index ad452030a6..02a7e8ee6d 100644 +--- a/modules/gui/qt/main_interface.cpp ++++ b/modules/gui/qt/main_interface.cpp +@@ -867,11 +867,18 @@ void MainInterface::setVideoFullScreen( bool fs ) + if( fs ) + { + int numscreen = var_InheritInteger( p_intf, "qt-fullscreen-screennumber" ); ++ /* if user hasn't defined screennumber, or screennumber that is bigger ++ * than current number of screens, take screennumber where current interface ++ * is ++ */ ++ if( numscreen < 0 || numscreen >= QApplication::desktop()->screenCount() ) ++ numscreen = QApplication::desktop()->screenNumber( p_intf->p_sys->p_mi ); ++ ++ if( fullscreenControls ) ++ fullscreenControls->setTargetScreen( numscreen ); + +- if ( numscreen >= 0 && numscreen < QApplication::desktop()->screenCount() ) ++ if ( numscreen >= 0 ) + { +- if( fullscreenControls ) +- fullscreenControls->setTargetScreen( numscreen ); + + QRect screenres = QApplication::desktop()->screenGeometry( numscreen ); + lastWinScreen = windowHandle()->screen(); +-- +2.42.0 + diff --git a/patches/vlc-3.0.21/0010-Revert-Qt-fix-a-wrong-logic-for-the-check-of-the-ful.patch b/patches/vlc-3.0.21/0010-Revert-Qt-fix-a-wrong-logic-for-the-check-of-the-ful.patch new file mode 100644 index 0000000..e965292 --- /dev/null +++ b/patches/vlc-3.0.21/0010-Revert-Qt-fix-a-wrong-logic-for-the-check-of-the-ful.patch @@ -0,0 +1,41 @@ +From f60f736d4e403466432fcd562adf55bd2b176f1c Mon Sep 17 00:00:00 2001 +From: KO Myung-Hun +Date: Tue, 2 Jan 2018 18:00:54 +0900 +Subject: [PATCH 10/26] Revert "Qt: fix a wrong logic for the check of the + fullscreen screen number" + +This reverts commit cd6598579be9e5e0cf4c6d38ff31fdffb2cf5e79. +--- + modules/gui/qt/components/controller.cpp | 2 +- + modules/gui/qt/main_interface.cpp | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules/gui/qt/components/controller.cpp b/modules/gui/qt/components/controller.cpp +index 3adfe67c0d..c034bdf88d 100644 +--- a/modules/gui/qt/components/controller.cpp ++++ b/modules/gui/qt/components/controller.cpp +@@ -1021,7 +1021,7 @@ void FullscreenControllerWidget::setTargetScreen(int screennumber) + + int FullscreenControllerWidget::targetScreen() + { +- if( i_screennumber < 0 || i_screennumber >= QApplication::desktop()->screenCount() ) ++ if( i_screennumber < 0 || i_screennumber > QApplication::desktop()->screenCount() ) + return QApplication::desktop()->screenNumber( p_intf->p_sys->p_mi ); + return i_screennumber; + } +diff --git a/modules/gui/qt/main_interface.cpp b/modules/gui/qt/main_interface.cpp +index 02a7e8ee6d..c50140382c 100644 +--- a/modules/gui/qt/main_interface.cpp ++++ b/modules/gui/qt/main_interface.cpp +@@ -871,7 +871,7 @@ void MainInterface::setVideoFullScreen( bool fs ) + * than current number of screens, take screennumber where current interface + * is + */ +- if( numscreen < 0 || numscreen >= QApplication::desktop()->screenCount() ) ++ if( numscreen == -1 || numscreen > QApplication::desktop()->screenCount() ) + numscreen = QApplication::desktop()->screenNumber( p_intf->p_sys->p_mi ); + + if( fullscreenControls ) +-- +2.42.0 + diff --git a/patches/vlc-3.0.21/0011-Revert-qt-fix-crash-if-no-fullscreen-controls-are-av.patch b/patches/vlc-3.0.21/0011-Revert-qt-fix-crash-if-no-fullscreen-controls-are-av.patch new file mode 100644 index 0000000..0cd85a4 --- /dev/null +++ b/patches/vlc-3.0.21/0011-Revert-qt-fix-crash-if-no-fullscreen-controls-are-av.patch @@ -0,0 +1,28 @@ +From 93c27b71fe5e6ea4a416f47d665758f0cec60d4b Mon Sep 17 00:00:00 2001 +From: KO Myung-Hun +Date: Tue, 2 Jan 2018 18:02:33 +0900 +Subject: [PATCH 11/26] Revert "qt: fix crash if no fullscreen controls are + available" + +This reverts commit a5688a51a9eee3202468b1c85f4fd3ad82dc9b04. +--- + modules/gui/qt/main_interface.cpp | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/modules/gui/qt/main_interface.cpp b/modules/gui/qt/main_interface.cpp +index c50140382c..b11d9f5425 100644 +--- a/modules/gui/qt/main_interface.cpp ++++ b/modules/gui/qt/main_interface.cpp +@@ -874,8 +874,7 @@ void MainInterface::setVideoFullScreen( bool fs ) + if( numscreen == -1 || numscreen > QApplication::desktop()->screenCount() ) + numscreen = QApplication::desktop()->screenNumber( p_intf->p_sys->p_mi ); + +- if( fullscreenControls ) +- fullscreenControls->setTargetScreen( numscreen ); ++ fullscreenControls->setTargetScreen( numscreen ); + + if ( numscreen >= 0 ) + { +-- +2.42.0 + diff --git a/patches/vlc-3.0.21/0012-Revert-qt-FSC-Fix-and-simplify-FSC-screen-geometry-c.patch b/patches/vlc-3.0.21/0012-Revert-qt-FSC-Fix-and-simplify-FSC-screen-geometry-c.patch new file mode 100644 index 0000000..a2e5bb3 --- /dev/null +++ b/patches/vlc-3.0.21/0012-Revert-qt-FSC-Fix-and-simplify-FSC-screen-geometry-c.patch @@ -0,0 +1,27 @@ +From cd8a5d8e3807ba4975c591d7a3dafe3c7f2d85d4 Mon Sep 17 00:00:00 2001 +From: KO Myung-Hun +Date: Thu, 22 Mar 2018 21:10:00 +0900 +Subject: [PATCH 12/26] Revert "qt: FSC: Fix and simplify FSC/screen geometry + check" + +This reverts commit 3b0a4dc671e58723d7533f0c01c1e989569a2e15. +--- + modules/gui/qt/components/controller.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules/gui/qt/components/controller.cpp b/modules/gui/qt/components/controller.cpp +index c034bdf88d..85ba3f93be 100644 +--- a/modules/gui/qt/components/controller.cpp ++++ b/modules/gui/qt/components/controller.cpp +@@ -901,7 +901,7 @@ void FullscreenControllerWidget::restoreFSC() + } + + if( currentRes == screenRes && +- currentRes.contains( previousPosition, true ) ) ++ QApplication::desktop()->screen()->geometry().contains( previousPosition, true ) ) + { + /* Restore to the last known position */ + move( previousPosition ); +-- +2.42.0 + diff --git a/patches/vlc-3.0.21/0013-Revert-qt-Fix-crash-when-switching-to-fullscreen-wit.patch b/patches/vlc-3.0.21/0013-Revert-qt-Fix-crash-when-switching-to-fullscreen-wit.patch new file mode 100644 index 0000000..37512d4 --- /dev/null +++ b/patches/vlc-3.0.21/0013-Revert-qt-Fix-crash-when-switching-to-fullscreen-wit.patch @@ -0,0 +1,38 @@ +From 09e100d53bd52da5839789ddb8297a77220b122f Mon Sep 17 00:00:00 2001 +From: KO Myung-Hun +Date: Fri, 26 Jan 2018 14:55:58 +0900 +Subject: [PATCH 13/26] Revert "qt: Fix crash when switching to fullscreen with + video undocked" + +This reverts commit d79907a5e1da092cb9ae271cba7673262ff878bf. +--- + modules/gui/qt/components/controller.cpp | 10 +++------- + 1 file changed, 3 insertions(+), 7 deletions(-) + +diff --git a/modules/gui/qt/components/controller.cpp b/modules/gui/qt/components/controller.cpp +index 85ba3f93be..0d1a898ea1 100644 +--- a/modules/gui/qt/components/controller.cpp ++++ b/modules/gui/qt/components/controller.cpp +@@ -889,16 +889,12 @@ void FullscreenControllerWidget::restoreFSC() + return; + + QRect currentRes = QApplication::desktop()->screenGeometry( targetScreen() ); +- QWindow *wh = windowHandle(); +- if ( wh != Q_NULLPTR ) +- { + #ifdef QT5_HAS_WAYLAND +- if ( !b_hasWayland ) +- wh->setScreen(QGuiApplication::screens()[targetScreen()]); ++ if ( !b_hasWayland ) ++ windowHandle()->setScreen(QGuiApplication::screens()[targetScreen()]); + #else +- wh->setScreen(QGuiApplication::screens()[targetScreen()]); ++ windowHandle()->setScreen(QGuiApplication::screens()[targetScreen()]); + #endif +- } + + if( currentRes == screenRes && + QApplication::desktop()->screen()->geometry().contains( previousPosition, true ) ) +-- +2.42.0 + diff --git a/patches/vlc-3.0.21/0014-Revert-qt-fix-setScreen-might-crash-on-wayland-when-.patch b/patches/vlc-3.0.21/0014-Revert-qt-fix-setScreen-might-crash-on-wayland-when-.patch new file mode 100644 index 0000000..04aa979 --- /dev/null +++ b/patches/vlc-3.0.21/0014-Revert-qt-fix-setScreen-might-crash-on-wayland-when-.patch @@ -0,0 +1,119 @@ +From 3a42b1fe5fb350b1ca2eac6469cdb2d94b9d6cf8 Mon Sep 17 00:00:00 2001 +From: KO Myung-Hun +Date: Tue, 2 Jan 2018 18:02:57 +0900 +Subject: [PATCH 14/26] Revert "qt: fix setScreen might crash on wayland when + entering fullscreen" + +This reverts commit a7018fc36800b0a3560a4c072c8ec2c3b15776c2. +--- + modules/gui/qt/components/controller.cpp | 9 --------- + modules/gui/qt/components/controller.hpp | 4 ---- + modules/gui/qt/main_interface.cpp | 17 +---------------- + modules/gui/qt/main_interface.hpp | 4 +--- + 4 files changed, 2 insertions(+), 32 deletions(-) + +diff --git a/modules/gui/qt/components/controller.cpp b/modules/gui/qt/components/controller.cpp +index 0d1a898ea1..817f6c457c 100644 +--- a/modules/gui/qt/components/controller.cpp ++++ b/modules/gui/qt/components/controller.cpp +@@ -805,10 +805,6 @@ FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i, QWi + b_fullscreen = false; + i_hide_timeout = 1; + i_screennumber = -1; +-#ifdef QT5_HAS_WAYLAND +- b_hasWayland = QGuiApplication::platformName() +- .startsWith(QLatin1String("wayland"), Qt::CaseInsensitive); +-#endif + + vout.clear(); + +@@ -889,12 +885,7 @@ void FullscreenControllerWidget::restoreFSC() + return; + + QRect currentRes = QApplication::desktop()->screenGeometry( targetScreen() ); +-#ifdef QT5_HAS_WAYLAND +- if ( !b_hasWayland ) +- windowHandle()->setScreen(QGuiApplication::screens()[targetScreen()]); +-#else + windowHandle()->setScreen(QGuiApplication::screens()[targetScreen()]); +-#endif + + if( currentRes == screenRes && + QApplication::desktop()->screen()->geometry().contains( previousPosition, true ) ) +diff --git a/modules/gui/qt/components/controller.hpp b/modules/gui/qt/components/controller.hpp +index ab7b29f194..b328a3fbb2 100644 +--- a/modules/gui/qt/components/controller.hpp ++++ b/modules/gui/qt/components/controller.hpp +@@ -321,10 +321,6 @@ private: + + bool isWideFSC; + int i_sensitivity; +- +-#ifdef QT5_HAS_WAYLAND +- bool b_hasWayland; +-#endif + }; + + #endif +diff --git a/modules/gui/qt/main_interface.cpp b/modules/gui/qt/main_interface.cpp +index b11d9f5425..bf77c74c3d 100644 +--- a/modules/gui/qt/main_interface.cpp ++++ b/modules/gui/qt/main_interface.cpp +@@ -149,11 +149,6 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) + /* Should the UI stays on top of other windows */ + b_interfaceOnTop = var_InheritBool( p_intf, "video-on-top" ); + +-#ifdef QT5_HAS_WAYLAND +- b_hasWayland = QGuiApplication::platformName() +- .startsWith(QLatin1String("wayland"), Qt::CaseInsensitive); +-#endif +- + /************************** + * UI and Widgets design + **************************/ +@@ -881,12 +876,7 @@ void MainInterface::setVideoFullScreen( bool fs ) + + QRect screenres = QApplication::desktop()->screenGeometry( numscreen ); + lastWinScreen = windowHandle()->screen(); +-#ifdef QT5_HAS_WAYLAND +- if( !b_hasWayland ) +- windowHandle()->setScreen(QGuiApplication::screens()[numscreen]); +-#else + windowHandle()->setScreen(QGuiApplication::screens()[numscreen]); +-#endif + + /* To be sure window is on proper-screen in xinerama */ + if( !screenres.contains( pos() ) ) +@@ -912,13 +902,8 @@ void MainInterface::setVideoFullScreen( bool fs ) + { + setMinimalView( b_minimalView ); + setInterfaceFullScreen( b_interfaceFullScreen ); +-#ifdef QT5_HAS_WAYLAND +- if( lastWinScreen != NULL && !b_hasWayland ) ++ if (lastWinScreen != NULL) + windowHandle()->setScreen(lastWinScreen); +-#else +- if( lastWinScreen != NULL ) +- windowHandle()->setScreen(lastWinScreen); +-#endif + if( lastWinPosition.isNull() == false ) + { + move( lastWinPosition ); +diff --git a/modules/gui/qt/main_interface.hpp b/modules/gui/qt/main_interface.hpp +index e73a6b5ce6..4e8cb26679 100644 +--- a/modules/gui/qt/main_interface.hpp ++++ b/modules/gui/qt/main_interface.hpp +@@ -184,9 +184,7 @@ protected: + bool b_pauseOnMinimize; + bool b_maximizedView; + bool b_isWindowTiled; +-#ifdef QT5_HAS_WAYLAND +- bool b_hasWayland; +-#endif ++ + /* States */ + bool playlistVisible; ///< Is the playlist visible ? + // bool videoIsActive; ///< Having a video now / THEMIM->hasV +-- +2.42.0 + diff --git a/patches/vlc-3.0.21/0015-Revert-qt-fix-crash-when-undocking-playlist-on-Wayla.patch b/patches/vlc-3.0.21/0015-Revert-qt-fix-crash-when-undocking-playlist-on-Wayla.patch new file mode 100644 index 0000000..53c7ddd --- /dev/null +++ b/patches/vlc-3.0.21/0015-Revert-qt-fix-crash-when-undocking-playlist-on-Wayla.patch @@ -0,0 +1,42 @@ +From 6754ad3ace4360c6e3d5b79579390377fcd92a7e Mon Sep 17 00:00:00 2001 +From: KO Myung-Hun +Date: Tue, 2 Jan 2018 18:03:14 +0900 +Subject: [PATCH 15/26] Revert "qt: fix crash when undocking playlist on + Wayland + optimization elsewhere" + +This reverts commit dbded10b41460b09fad134e8d37e7a07425110c9. +--- + modules/gui/qt/main_interface.cpp | 13 ++----------- + 1 file changed, 2 insertions(+), 11 deletions(-) + +diff --git a/modules/gui/qt/main_interface.cpp b/modules/gui/qt/main_interface.cpp +index bf77c74c3d..047e902d27 100644 +--- a/modules/gui/qt/main_interface.cpp ++++ b/modules/gui/qt/main_interface.cpp +@@ -1073,21 +1073,12 @@ void MainInterface::dockPlaylist( bool p_docked ) + if( !p_docked ) /* Previously docked */ + { + playlistVisible = playlistWidget->isVisible(); +- +- /* repositioning the videowidget __before__ exporting the +- playlistwidget into the playlist dialog avoids two unneeded +- calls to the server in the qt library to reparent the underlying +- native window back and forth. +- For Wayland, this is mandatory since reparenting is not implemented. +- For X11 or Windows, this is just an optimization. */ ++ stackCentralW->removeWidget( playlistWidget ); ++ dialog->importPlaylistWidget( playlistWidget ); + if ( videoWidget && THEMIM->getIM()->hasVideo() ) + showTab(videoWidget); + else + showTab(bgWidget); +- +- /* playlistwidget exported into the playlist dialog */ +- stackCentralW->removeWidget( playlistWidget ); +- dialog->importPlaylistWidget( playlistWidget ); + if ( playlistVisible ) dialog->show(); + } + else /* Previously undocked */ +-- +2.42.0 + diff --git a/patches/vlc-3.0.21/0016-Revert-qt-display-directx-rendering-options-only-whe.patch b/patches/vlc-3.0.21/0016-Revert-qt-display-directx-rendering-options-only-whe.patch new file mode 100644 index 0000000..cdc10a6 --- /dev/null +++ b/patches/vlc-3.0.21/0016-Revert-qt-display-directx-rendering-options-only-whe.patch @@ -0,0 +1,77 @@ +From d3e2818d10f3b224cb7d2af7406e65b9ac01e1bb Mon Sep 17 00:00:00 2001 +From: KO Myung-Hun +Date: Fri, 26 Jan 2018 15:00:35 +0900 +Subject: [PATCH 16/26] Revert "qt: display directx rendering options only when + vout is set to directx" + +This reverts commit 7526658131dc6b222f156593b2ad5e2c81737f72. +--- + .../gui/qt/components/simple_preferences.cpp | 18 ------------------ + .../gui/qt/components/simple_preferences.hpp | 1 - + 2 files changed, 19 deletions(-) + +diff --git a/modules/gui/qt/components/simple_preferences.cpp b/modules/gui/qt/components/simple_preferences.cpp +index b1a502dc93..eb6d84e325 100644 +--- a/modules/gui/qt/components/simple_preferences.cpp ++++ b/modules/gui/qt/components/simple_preferences.cpp +@@ -379,10 +379,6 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, + CONFIG_BOOL( "video-deco", windowDecorations ); + CONFIG_GENERIC( "vout", StringList, ui.voutLabel, outputModule ); + +- CONNECT( ui.outputModule, currentIndexChanged( int ), +- this, updateVideoOptions( int ) ); +- optionWidgets["videoOutCoB"] = ui.outputModule; +- + optionWidgets["fullscreenScreenB"] = ui.fullscreenScreenBox; + ui.fullscreenScreenBox->addItem( qtr("Automatic"), -1 ); + int i_screenCount = 0; +@@ -405,7 +401,6 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, + CONFIG_BOOL( "directx-overlay", overlay ); + CONFIG_BOOL( "directx-hw-yuv", hwYUVBox ); + CONNECT( ui.overlay, toggled( bool ), ui.hwYUVBox, setEnabled( bool ) ); +- optionWidgets["directxVideoB"] = ui.directXBox; + #else + ui.directXBox->setVisible( false ); + #endif +@@ -429,8 +424,6 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, + snapshotsSequentialNumbering ); + CONFIG_GENERIC( "snapshot-format", StringList, ui.arLabel, + snapshotsFormat ); +- +- updateVideoOptions( ui.outputModule->currentIndex() ); + END_SPREFS_CAT; + + /****************************** +@@ -962,17 +955,6 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, + #undef CONFIG_BOOL + } + +-void SPrefsPanel::updateVideoOptions( int number ) +-{ +- QString value = qobject_cast(optionWidgets["videoOutCoB"]) +- ->itemData( number ).toString(); +-#ifdef _WIN32 +- if( optionWidgets["directxVideoB"] ) { +- optionWidgets["directxVideoB"]->setVisible( ( value == "directdraw" ) ); +- } +-#endif +-} +- + + void SPrefsPanel::updateAudioOptions( int number) + { +diff --git a/modules/gui/qt/components/simple_preferences.hpp b/modules/gui/qt/components/simple_preferences.hpp +index 856b88ba97..6390b21efd 100644 +--- a/modules/gui/qt/components/simple_preferences.hpp ++++ b/modules/gui/qt/components/simple_preferences.hpp +@@ -117,7 +117,6 @@ private: + /* Display only the options for the selected audio output */ + private slots: + void lastfm_Changed( int ); +- void updateVideoOptions( int ); + void updateAudioOptions( int ); + void updateAudioVolume( int ); + void langChanged( int ); +-- +2.42.0 + diff --git a/patches/vlc-3.0.21/0017-Revert-Qt-spref-add-option-to-select-the-fullscreen-.patch b/patches/vlc-3.0.21/0017-Revert-Qt-spref-add-option-to-select-the-fullscreen-.patch new file mode 100644 index 0000000..04264e1 --- /dev/null +++ b/patches/vlc-3.0.21/0017-Revert-Qt-spref-add-option-to-select-the-fullscreen-.patch @@ -0,0 +1,130 @@ +From eba4d8542917e3b6446580ef485163a632df9a89 Mon Sep 17 00:00:00 2001 +From: KO Myung-Hun +Date: Tue, 2 Jan 2018 18:05:18 +0900 +Subject: [PATCH 17/26] Revert "Qt: spref, add option to select the fullscreen + screen" + +This reverts commit 40e152db5e09f433bb17b848d4bca09d522d1aca. +--- + .../gui/qt/components/simple_preferences.cpp | 26 -------------- + modules/gui/qt/ui/sprefs_video.ui | 36 ++++++------------- + 2 files changed, 11 insertions(+), 51 deletions(-) + +diff --git a/modules/gui/qt/components/simple_preferences.cpp b/modules/gui/qt/components/simple_preferences.cpp +index eb6d84e325..912a373fa0 100644 +--- a/modules/gui/qt/components/simple_preferences.cpp ++++ b/modules/gui/qt/components/simple_preferences.cpp +@@ -44,7 +44,6 @@ + + #include + #include +-#include + #include + #include + #include +@@ -379,24 +378,6 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, + CONFIG_BOOL( "video-deco", windowDecorations ); + CONFIG_GENERIC( "vout", StringList, ui.voutLabel, outputModule ); + +- optionWidgets["fullscreenScreenB"] = ui.fullscreenScreenBox; +- ui.fullscreenScreenBox->addItem( qtr("Automatic"), -1 ); +- int i_screenCount = 0; +- foreach( QScreen* screen, QGuiApplication::screens() ) +- { +- ui.fullscreenScreenBox->addItem( screen->name(), i_screenCount ); +- i_screenCount++; +- } +- p_config = config_FindConfig( "qt-fullscreen-screennumber" ); +- if( p_config ) +- { +- int i_defaultScreen = p_config->value.i + 1; +- if ( i_defaultScreen < 0 || i_defaultScreen > ( ui.fullscreenScreenBox->count() - 1 ) ) +- ui.fullscreenScreenBox->setCurrentIndex( 0 ); +- else +- ui.fullscreenScreenBox->setCurrentIndex(p_config->value.i + 1); +- } +- + #ifdef _WIN32 + CONFIG_BOOL( "directx-overlay", overlay ); + CONFIG_BOOL( "directx-hw-yuv", hwYUVBox ); +@@ -1081,13 +1062,6 @@ void SPrefsPanel::apply() + break; + } + +- case SPrefsVideo: +- { +- int i_fullscreenScreen = qobject_cast(optionWidgets["fullscreenScreenB"])->currentData().toInt(); +- config_PutInt( p_intf, "qt-fullscreen-screennumber", i_fullscreenScreen ); +- break; +- } +- + case SPrefsAudio: + { + bool b_checked = +diff --git a/modules/gui/qt/ui/sprefs_video.ui b/modules/gui/qt/ui/sprefs_video.ui +index 899faeca60..766f747c2e 100644 +--- a/modules/gui/qt/ui/sprefs_video.ui ++++ b/modules/gui/qt/ui/sprefs_video.ui +@@ -46,23 +46,6 @@ + Display + + +- +- +- +- O&utput +- +- +- outputModule +- +- +- +- +- +- +- Window decorations +- +- +- + + + +@@ -77,16 +60,20 @@ + + + +- +- +- +- +- ++ ++ + +- Fullscreen Video Device ++ O&utput + + +- fullscreenScreenBox ++ outputModule ++ ++ ++ ++ ++ ++ ++ Window decorations + + + +@@ -318,7 +305,6 @@ + fullscreen + windowDecorations + outputModule +- fullscreenScreenBox + overlay + hwYUVBox + kvaFixT23 +-- +2.42.0 + diff --git a/patches/vlc-3.0.21/0018-qt-port-Qt5-codes-to-Qt4-codes-2.patch b/patches/vlc-3.0.21/0018-qt-port-Qt5-codes-to-Qt4-codes-2.patch new file mode 100644 index 0000000..b8fc10e --- /dev/null +++ b/patches/vlc-3.0.21/0018-qt-port-Qt5-codes-to-Qt4-codes-2.patch @@ -0,0 +1,310 @@ +From 1534651dbdba564eeec066b0a6d4bae58b8d514e Mon Sep 17 00:00:00 2001 +From: KO Myung-Hun +Date: Fri, 26 Jan 2018 18:48:12 +0900 +Subject: [PATCH 18/26] qt: port Qt5 codes to Qt4 codes #2 + +--- + modules/gui/qt/components/extended_panels.cpp | 16 ++++++++++++++++ + .../gui/qt/components/interface_widgets.cpp | 13 ++++++++++++- + modules/gui/qt/components/open_panels.cpp | 14 ++++++++++++++ + modules/gui/qt/components/open_panels.hpp | 8 ++++++++ + .../gui/qt/components/sout/sout_widgets.cpp | 11 +++++++++++ + modules/gui/qt/dialogs/convert.cpp | 18 ++++++++++++++++++ + modules/gui/qt/dialogs/convert.hpp | 4 ++++ + modules/gui/qt/dialogs_provider.cpp | 11 +++++++++++ + 8 files changed, 94 insertions(+), 1 deletion(-) + +diff --git a/modules/gui/qt/components/extended_panels.cpp b/modules/gui/qt/components/extended_panels.cpp +index 62152aff28..dd86a48307 100644 +--- a/modules/gui/qt/components/extended_panels.cpp ++++ b/modules/gui/qt/components/extended_panels.cpp +@@ -375,26 +375,42 @@ void ExtVideo::updateFilters() + + void ExtVideo::browseLogo() + { ++#if HAS_QT5 + const QStringList schemes = QStringList(QStringLiteral("file")); ++#endif + QString filter = QString( "%1 (*.png *.jpg);;%2 (*)" ) + .arg( qtr("Image Files") ) + .arg( TITLE_EXTENSIONS_ALL ); ++#if HAS_QT5 + QString file = QFileDialog::getOpenFileUrl( NULL, qtr( "Logo filenames" ), + p_intf->p_sys->filepath, filter, + NULL, QFileDialog::Options(), schemes ).toLocalFile(); ++#else ++ QString file = QFileDialog::getOpenFileName( NULL, qtr( "Logo filenames" ), ++ p_intf->p_sys->filepath.toLocalFile(), filter, ++ NULL, QFileDialog::Options()); ++#endif + + UPDATE_AND_APPLY_TEXT( logoFileText, file ); + } + + void ExtVideo::browseEraseFile() + { ++#if HAS_QT5 + const QStringList schemes = QStringList(QStringLiteral("file")); ++#endif + QString filter = QString( "%1 (*.png *.jpg);;%2 (*)" ) + .arg( qtr("Image Files") ) + .arg( TITLE_EXTENSIONS_ALL ); ++#if HAS_QT5 + QString file = QFileDialog::getOpenFileUrl( NULL, qtr( "Image mask" ), + p_intf->p_sys->filepath, filter, + NULL, QFileDialog::Options(), schemes ).toLocalFile(); ++#else ++ QString file = QFileDialog::getOpenFileName( NULL, qtr( "Image mask" ), ++ p_intf->p_sys->filepath.toLocalFile(), filter, ++ NULL, QFileDialog::Options()); ++#endif + + UPDATE_AND_APPLY_TEXT( eraseMaskText, file ); + } +diff --git a/modules/gui/qt/components/interface_widgets.cpp b/modules/gui/qt/components/interface_widgets.cpp +index 6bfac8b500..8f53d177ab 100644 +--- a/modules/gui/qt/components/interface_widgets.cpp ++++ b/modules/gui/qt/components/interface_widgets.cpp +@@ -369,11 +369,15 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) + } + + { ++#if HAS_QT5 + QPointF current_pos = event->localPos(); ++#else ++ QPointF current_pos = event->posF(); ++#endif + + #if HAS_QT56 + current_pos *= devicePixelRatioF(); +-#else ++#elif HAS_QT5 + current_pos *= devicePixelRatio(); + #endif + vout_window_ReportMouseMoved( p_window, current_pos.x(), current_pos.y() ); +@@ -925,8 +929,15 @@ void CoverArtLabel::setArtFromFile() + if( !p_item ) + return; + ++#if HAS_QT5 + QUrl fileUrl = QFileDialog::getOpenFileUrl( this, qtr( "Choose Cover Art" ), + p_intf->p_sys->filepath, qtr( "Image Files (*.gif *.jpg *.jpeg *.png)" ) ); ++#else ++ QString fileName = QFileDialog::getOpenFileName( this, qtr( "Choose Cover Art" ), ++ p_intf->p_sys->filepath.toLocalFile(), qtr( "Image Files (*.gif *.jpg *.jpeg *.png)" ) ); ++ ++ QUrl fileUrl = QUrl::fromLocalFile( fileName ); ++#endif + + if( fileUrl.isEmpty() ) + return; +diff --git a/modules/gui/qt/components/open_panels.cpp b/modules/gui/qt/components/open_panels.cpp +index c0361717e9..cacd55d4b4 100644 +--- a/modules/gui/qt/components/open_panels.cpp ++++ b/modules/gui/qt/components/open_panels.cpp +@@ -228,7 +228,11 @@ void FileOpenPanel::browseFile() + urlList << url; + QListWidgetItem *item = nullptr; + item = new QListWidgetItem( ++#if HAS_QT5 + toNativeSeparators( url.toDisplayString(QUrl::RemovePassword | QUrl::PreferLocalFile | QUrl::NormalizePathSegments) ), ++#else ++ toNativeSeparators( url.toString(QUrl::RemovePassword) ), ++#endif + ui.fileListWidg + ); + item->setFlags( Qt::ItemIsEnabled ); +@@ -264,7 +268,11 @@ void FileOpenPanel::browseFileSub() + } + + subUrl = QUrl(urls[0]); ++#if HAS_QT5 + ui.subInput->setText( subUrl.toDisplayString(QUrl::RemovePassword | QUrl::PreferLocalFile | QUrl::NormalizePathSegments) ); ++#else ++ ui.subInput->setText( subUrl.toString(QUrl::RemovePassword) ); ++#endif + updateMRL(); + } + +@@ -639,10 +647,16 @@ void DiscOpenPanel::updateMRL() + + void DiscOpenPanel::browseDevice() + { ++#if HAS_QT5 + const QStringList schemes = QStringList(QStringLiteral("file")); + QString dir = QFileDialog::getExistingDirectoryUrl( this, + qtr( I_DEVICE_TOOLTIP ), p_intf->p_sys->filepath, + QFileDialog::ShowDirsOnly, schemes ).toLocalFile(); ++#else ++ QString dir = QFileDialog::getExistingDirectory( this, ++ qtr( I_DEVICE_TOOLTIP ), p_intf->p_sys->filepath.toLocalFile(), ++ QFileDialog::ShowDirsOnly ); ++#endif + if( !dir.isEmpty() ) + { + ui.deviceCombo->addItem( toNativeSepNoSlash( dir ) ); +diff --git a/modules/gui/qt/components/open_panels.hpp b/modules/gui/qt/components/open_panels.hpp +index 48044383a5..1a169720d6 100644 +--- a/modules/gui/qt/components/open_panels.hpp ++++ b/modules/gui/qt/components/open_panels.hpp +@@ -41,6 +41,10 @@ + + #include + ++#if !HAS_QT5 ++#include ++#endif ++ + #include + + #define setSpinBoxFreq( spinbox ){ spinbox->setRange ( 0, INT_MAX ); \ +@@ -98,7 +102,11 @@ public: + FileOpenBox( QWidget *parent, const QString &caption, + const QUrl &directory, const QString &filter ): + QFileDialog( parent, caption, "", filter ) { ++#if HAS_QT5 + setDirectoryUrl(directory); ++#else ++ setDirectory(directory.toLocalFile()); ++#endif + } + public slots: + void accept(){} +diff --git a/modules/gui/qt/components/sout/sout_widgets.cpp b/modules/gui/qt/components/sout/sout_widgets.cpp +index 8fb1b993dd..6eba8b4f00 100644 +--- a/modules/gui/qt/components/sout/sout_widgets.cpp ++++ b/modules/gui/qt/components/sout/sout_widgets.cpp +@@ -92,8 +92,13 @@ void SoutInputBox::setMRL( const QString& mrl ) + else + { + sourceLine->setText( ++#if HAS_QT5 + toNativeSeparators(uri.toDisplayString( + QUrl::RemovePassword | QUrl::PreferLocalFile | QUrl::NormalizePathSegments ++#else ++ toNativeSeparators(uri.toString( ++ QUrl::RemovePassword ++#endif + ))); + if ( type.isEmpty() ) type = qtr( I_FILE_SLASH_DIR ); + sourceValueLabel->setText( type ); +@@ -169,10 +174,16 @@ QString FileDestBox::getMRL( const QString& mux ) + + void FileDestBox::fileBrowse() + { ++#if HAS_QT5 + const QStringList schemes = QStringList(QStringLiteral("file")); + QString fileName = QFileDialog::getSaveFileUrl( this, qtr( "Save file..." ), + p_intf->p_sys->filepath, qtr( "Containers (*.ps *.ts *.mpg *.ogg *.asf *.mp4 *.mov *.wav *.raw *.flv *.webm)" ), + nullptr, QFileDialog::Options(), schemes).toLocalFile(); ++#else ++ QString fileName = QFileDialog::getSaveFileName( this, qtr( "Save file..." ), ++ p_intf->p_sys->filepath.toLocalFile(), qtr( "Containers (*.ps *.ts *.mpg *.ogg *.asf *.mp4 *.mov *.wav *.raw *.flv *.webm)" ), ++ nullptr, QFileDialog::Options()); ++#endif + fileEdit->setText( toNativeSeparators( fileName ) ); + emit mrlUpdated(); + } +diff --git a/modules/gui/qt/dialogs/convert.cpp b/modules/gui/qt/dialogs/convert.cpp +index 8a87518fa9..4a9151e246 100644 +--- a/modules/gui/qt/dialogs/convert.cpp ++++ b/modules/gui/qt/dialogs/convert.cpp +@@ -37,8 +37,13 @@ + #include + #include + ++#if HAS_QT5 + #define urlToDisplayString(filestr) toNativeSeparators(QUrl(filestr).toDisplayString(\ + QUrl::RemovePassword | QUrl::PreferLocalFile | QUrl::NormalizePathSegments )) ++#else ++#define urlToDisplayString(filestr) toNativeSeparators(QUrl(filestr).toString(\ ++ QUrl::RemovePassword )) ++#endif + + ConvertDialog::ConvertDialog( QWidget *parent, intf_thread_t *_p_intf, + const QStringList& inputMRLs ) +@@ -158,10 +163,19 @@ void ConvertDialog::fileBrowse() + { + QString fileExtension = ( ! profile->isEnabled() ) ? ".*" : "." + profile->getMux(); + ++#if HAS_QT5 + outgoingMRL = QFileDialog::getSaveFileUrl( this, qtr( "Save file..." ), + p_intf->p_sys->filepath, + QString( "%1 (*%2);;%3 (*.*)" ).arg( qtr( "Containers" ) ) + .arg( fileExtension ).arg( qtr("All") ), 0, QFileDialog::DontConfirmOverwrite ); ++#else ++ QString outgoingName; ++ outgoingName = QFileDialog::getSaveFileName( this, qtr( "Save file..." ), ++ p_intf->p_sys->filepath.toLocalFile(), ++ QString( "%1 (*%2);;%3 (*.*)" ).arg( qtr( "Containers" ) ) ++ .arg( fileExtension ).arg( qtr("All") ), 0, QFileDialog::DontConfirmOverwrite ); ++ outgoingMRL = QUrl::fromLocalFile( outgoingName ); ++#endif + fileLine->setText( urlToDisplayString( outgoingMRL ) ); + setDestinationFileExtension(); + } +@@ -250,7 +264,11 @@ void ConvertDialog::setDestinationFileExtension() + { + if( !outgoingMRL.isEmpty() && profile->isEnabled() ) + { ++#if HAS_QT5 + QString filepath = outgoingMRL.path(QUrl::FullyEncoded); ++#else ++ QString filepath = outgoingMRL.path(); ++#endif + if( filepath.lastIndexOf( "." ) == -1 ) + { + QString newFileExtension = "." + profile->getMux(); +diff --git a/modules/gui/qt/dialogs/convert.hpp b/modules/gui/qt/dialogs/convert.hpp +index bfa9c9cadd..eade91774c 100644 +--- a/modules/gui/qt/dialogs/convert.hpp ++++ b/modules/gui/qt/dialogs/convert.hpp +@@ -26,6 +26,10 @@ + + #include "util/qvlcframe.hpp" + ++#if !HAS_QT5 ++#include ++#endif ++ + class QLineEdit; + class QCheckBox; + class QRadioButton; +diff --git a/modules/gui/qt/dialogs_provider.cpp b/modules/gui/qt/dialogs_provider.cpp +index 754f59203c..5c1a227ad7 100644 +--- a/modules/gui/qt/dialogs_provider.cpp ++++ b/modules/gui/qt/dialogs_provider.cpp +@@ -141,8 +141,12 @@ QString DialogsProvider::getSaveFileName( QWidget *parent, + const QString &filter, + QString *selectedFilter ) + { ++#if HAS_QT5 + const QStringList schemes = QStringList(QStringLiteral("file")); + return QFileDialog::getSaveFileUrl( parent, caption, dir, filter, selectedFilter, QFileDialog::Options(), schemes).toLocalFile(); ++#else ++ return QFileDialog::getSaveFileName( parent, caption, dir.toLocalFile(), filter, selectedFilter, QFileDialog::Options()); ++#endif + } + + void DialogsProvider::quit() +@@ -590,10 +594,17 @@ static void openDirectory( intf_thread_t *p_intf, bool pl, bool go ) + + QString DialogsProvider::getDirectoryDialog( intf_thread_t *p_intf ) + { ++#if HAS_QT5 + const QStringList schemes = QStringList(QStringLiteral("file")); + QUrl dirurl = QFileDialog::getExistingDirectoryUrl( NULL, + qtr( I_OP_DIR_WINTITLE ), p_intf->p_sys->filepath, + QFileDialog::ShowDirsOnly, schemes ); ++#else ++ QString d = QFileDialog::getExistingDirectory( NULL, ++ qtr( I_OP_DIR_WINTITLE ), p_intf->p_sys->filepath.toLocalFile(), ++ QFileDialog::ShowDirsOnly ); ++ QUrl dirurl = QUrl::fromLocalFile( d ); ++#endif + + if( dirurl.isEmpty() ) return QString(); + +-- +2.42.0 + diff --git a/patches/vlc-3.0.21/0019-Revert-qt-disable-playlist-on-fullscreen.patch b/patches/vlc-3.0.21/0019-Revert-qt-disable-playlist-on-fullscreen.patch new file mode 100644 index 0000000..ec5dcac --- /dev/null +++ b/patches/vlc-3.0.21/0019-Revert-qt-disable-playlist-on-fullscreen.patch @@ -0,0 +1,34 @@ +From 16521fbffdbc73db6b39686b961c2370caa57801 Mon Sep 17 00:00:00 2001 +From: KO Myung-Hun +Date: Tue, 8 May 2018 19:18:27 +0900 +Subject: [PATCH 19/26] Revert "qt: disable playlist on fullscreen" + +This reverts commit 55ce60609e255ae37f778caa3b235257421b5a76. +--- + modules/gui/qt/main_interface.cpp | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/modules/gui/qt/main_interface.cpp b/modules/gui/qt/main_interface.cpp +index 047e902d27..bacd901238 100644 +--- a/modules/gui/qt/main_interface.cpp ++++ b/modules/gui/qt/main_interface.cpp +@@ -886,10 +886,13 @@ void MainInterface::setVideoFullScreen( bool fs ) + msg_Dbg( p_intf, "Moving video to correct position"); + move( QPoint( screenres.x(), screenres.y() ) ); + } +- } + +- if( playlistWidget != NULL && playlistWidget->artContainer->currentWidget() == videoWidget ) +- showTab( videoWidget ); ++ /* */ ++ if( playlistWidget != NULL && playlistWidget->artContainer->currentWidget() == videoWidget ) ++ { ++ showTab( videoWidget ); ++ } ++ } + + /* we won't be able to get its windowed sized once in fullscreen, so update it now */ + stackWidgetsSizes[stackCentralW->currentWidget()] = stackCentralW->size(); +-- +2.42.0 + diff --git a/patches/vlc-3.0.21/0020-Revert-qt-check-if-QDesktopWidget-screenNumber-retur.patch b/patches/vlc-3.0.21/0020-Revert-qt-check-if-QDesktopWidget-screenNumber-retur.patch new file mode 100644 index 0000000..86549b6 --- /dev/null +++ b/patches/vlc-3.0.21/0020-Revert-qt-check-if-QDesktopWidget-screenNumber-retur.patch @@ -0,0 +1,76 @@ +From c30e5e2f9cad5bb12453083afe4823acc4906f07 Mon Sep 17 00:00:00 2001 +From: KO Myung-Hun +Date: Tue, 2 Jan 2018 18:03:35 +0900 +Subject: [PATCH 20/26] Revert "qt: check if QDesktopWidget::screenNumber() + returns a valid screen" + +This reverts commit fbf1f129ce7ec1387c9ead843c01c243337be460. +--- + modules/gui/qt/components/controller.cpp | 3 --- + modules/gui/qt/main_interface.cpp | 33 ++++++++++-------------- + 2 files changed, 14 insertions(+), 22 deletions(-) + +diff --git a/modules/gui/qt/components/controller.cpp b/modules/gui/qt/components/controller.cpp +index 817f6c457c..b22b5e19a2 100644 +--- a/modules/gui/qt/components/controller.cpp ++++ b/modules/gui/qt/components/controller.cpp +@@ -881,9 +881,6 @@ void FullscreenControllerWidget::restoreFSC() + setMinimumWidth( FSC_WIDTH ); + adjustSize(); + +- if ( targetScreen() < 0 ) +- return; +- + QRect currentRes = QApplication::desktop()->screenGeometry( targetScreen() ); + windowHandle()->setScreen(QGuiApplication::screens()[targetScreen()]); + +diff --git a/modules/gui/qt/main_interface.cpp b/modules/gui/qt/main_interface.cpp +index bacd901238..b15ce75c30 100644 +--- a/modules/gui/qt/main_interface.cpp ++++ b/modules/gui/qt/main_interface.cpp +@@ -870,28 +870,23 @@ void MainInterface::setVideoFullScreen( bool fs ) + numscreen = QApplication::desktop()->screenNumber( p_intf->p_sys->p_mi ); + + fullscreenControls->setTargetScreen( numscreen ); ++ QRect screenres = QApplication::desktop()->screenGeometry( numscreen ); ++ lastWinScreen = windowHandle()->screen(); ++ windowHandle()->setScreen(QGuiApplication::screens()[numscreen]); + +- if ( numscreen >= 0 ) ++ /* To be sure window is on proper-screen in xinerama */ ++ if( !screenres.contains( pos() ) ) + { ++ lastWinPosition = pos(); ++ lastWinSize = size(); ++ msg_Dbg( p_intf, "Moving video to correct position"); ++ move( QPoint( screenres.x(), screenres.y() ) ); ++ } + +- QRect screenres = QApplication::desktop()->screenGeometry( numscreen ); +- lastWinScreen = windowHandle()->screen(); +- windowHandle()->setScreen(QGuiApplication::screens()[numscreen]); +- +- /* To be sure window is on proper-screen in xinerama */ +- if( !screenres.contains( pos() ) ) +- { +- lastWinPosition = pos(); +- lastWinSize = size(); +- msg_Dbg( p_intf, "Moving video to correct position"); +- move( QPoint( screenres.x(), screenres.y() ) ); +- } +- +- /* */ +- if( playlistWidget != NULL && playlistWidget->artContainer->currentWidget() == videoWidget ) +- { +- showTab( videoWidget ); +- } ++ /* */ ++ if( playlistWidget != NULL && playlistWidget->artContainer->currentWidget() == videoWidget ) ++ { ++ showTab( videoWidget ); + } + + /* we won't be able to get its windowed sized once in fullscreen, so update it now */ +-- +2.42.0 + diff --git a/patches/vlc-3.0.21/0021-Revert-qt-set-FSControler-screen-when-entering-in-fu.patch b/patches/vlc-3.0.21/0021-Revert-qt-set-FSControler-screen-when-entering-in-fu.patch new file mode 100644 index 0000000..38daeb7 --- /dev/null +++ b/patches/vlc-3.0.21/0021-Revert-qt-set-FSControler-screen-when-entering-in-fu.patch @@ -0,0 +1,58 @@ +From 7df7f6cc9d87066ca61a9a970670bb1b5b99890b Mon Sep 17 00:00:00 2001 +From: KO Myung-Hun +Date: Fri, 29 Dec 2017 15:54:34 +0900 +Subject: [PATCH 21/26] Revert "qt: set FSControler screen when entering in + fullscreen mode" + +This reverts commit 562a10a1570887291fde39a973c6a25cd96a453f. +--- + modules/gui/qt/components/controller.cpp | 7 ------- + modules/gui/qt/components/controller.hpp | 1 - + modules/gui/qt/main_interface.cpp | 1 - + 3 files changed, 9 deletions(-) + +diff --git a/modules/gui/qt/components/controller.cpp b/modules/gui/qt/components/controller.cpp +index b22b5e19a2..f86e41e4da 100644 +--- a/modules/gui/qt/components/controller.cpp ++++ b/modules/gui/qt/components/controller.cpp +@@ -996,13 +996,6 @@ void FullscreenControllerWidget::toggleFullwidth() + restoreFSC(); + } + +- +-void FullscreenControllerWidget::setTargetScreen(int screennumber) +-{ +- i_screennumber = screennumber; +-} +- +- + int FullscreenControllerWidget::targetScreen() + { + if( i_screennumber < 0 || i_screennumber > QApplication::desktop()->screenCount() ) +diff --git a/modules/gui/qt/components/controller.hpp b/modules/gui/qt/components/controller.hpp +index b328a3fbb2..b1e6d438d3 100644 +--- a/modules/gui/qt/components/controller.hpp ++++ b/modules/gui/qt/components/controller.hpp +@@ -258,7 +258,6 @@ public: + void toggleFullwidth(); + void updateFullwidthGeometry( int number ); + int targetScreen(); +- void setTargetScreen( int ); + + private: + static int FullscreenChanged( vlc_object_t *obj, +diff --git a/modules/gui/qt/main_interface.cpp b/modules/gui/qt/main_interface.cpp +index b15ce75c30..2d2cf9f1ae 100644 +--- a/modules/gui/qt/main_interface.cpp ++++ b/modules/gui/qt/main_interface.cpp +@@ -869,7 +869,6 @@ void MainInterface::setVideoFullScreen( bool fs ) + if( numscreen == -1 || numscreen > QApplication::desktop()->screenCount() ) + numscreen = QApplication::desktop()->screenNumber( p_intf->p_sys->p_mi ); + +- fullscreenControls->setTargetScreen( numscreen ); + QRect screenres = QApplication::desktop()->screenGeometry( numscreen ); + lastWinScreen = windowHandle()->screen(); + windowHandle()->setScreen(QGuiApplication::screens()[numscreen]); +-- +2.42.0 + diff --git a/patches/vlc-3.0.21/0022-Revert-Qt-fix-the-qt-fullscreen-screennumber-option.patch b/patches/vlc-3.0.21/0022-Revert-Qt-fix-the-qt-fullscreen-screennumber-option.patch new file mode 100644 index 0000000..66a8b05 --- /dev/null +++ b/patches/vlc-3.0.21/0022-Revert-Qt-fix-the-qt-fullscreen-screennumber-option.patch @@ -0,0 +1,113 @@ +From f9739abdf9e02c1344929833e3681166c86adbef Mon Sep 17 00:00:00 2001 +From: KO Myung-Hun +Date: Tue, 2 Jan 2018 18:04:55 +0900 +Subject: [PATCH 22/26] Revert "Qt: fix the qt-fullscreen-screennumber option" + +This reverts commit ff4b90c15a9ea6c4f33362b152c289fc528f3609. +--- + modules/gui/qt/components/controller.cpp | 4 +--- + modules/gui/qt/main_interface.cpp | 9 +-------- + modules/gui/qt/main_interface.hpp | 2 -- + 3 files changed, 2 insertions(+), 13 deletions(-) + +diff --git a/modules/gui/qt/components/controller.cpp b/modules/gui/qt/components/controller.cpp +index f86e41e4da..e8eb23103e 100644 +--- a/modules/gui/qt/components/controller.cpp ++++ b/modules/gui/qt/components/controller.cpp +@@ -50,7 +50,6 @@ + #include + #include + #include +-#include + #include + + //#define DEBUG_LAYOUT 1 +@@ -882,7 +881,6 @@ void FullscreenControllerWidget::restoreFSC() + adjustSize(); + + QRect currentRes = QApplication::desktop()->screenGeometry( targetScreen() ); +- windowHandle()->setScreen(QGuiApplication::screens()[targetScreen()]); + + if( currentRes == screenRes && + QApplication::desktop()->screen()->geometry().contains( previousPosition, true ) ) +@@ -998,7 +996,7 @@ void FullscreenControllerWidget::toggleFullwidth() + + int FullscreenControllerWidget::targetScreen() + { +- if( i_screennumber < 0 || i_screennumber > QApplication::desktop()->screenCount() ) ++ if( i_screennumber < 0 || i_screennumber > QApplication::desktop()->numScreens() ) + return QApplication::desktop()->screenNumber( p_intf->p_sys->p_mi ); + return i_screennumber; + } +diff --git a/modules/gui/qt/main_interface.cpp b/modules/gui/qt/main_interface.cpp +index 2d2cf9f1ae..6e64757bfb 100644 +--- a/modules/gui/qt/main_interface.cpp ++++ b/modules/gui/qt/main_interface.cpp +@@ -54,13 +54,11 @@ + #include + #include + +-#include + #include + #include + #include + #include + #include +-#include + #ifdef _WIN32 + #include + #endif +@@ -98,7 +96,6 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) + videoWidget = NULL; + playlistWidget = NULL; + stackCentralOldWidget= NULL; +- lastWinScreen = NULL; + sysTray = NULL; + fullscreenControls = NULL; + cryptedLabel = NULL; +@@ -866,12 +863,10 @@ void MainInterface::setVideoFullScreen( bool fs ) + * than current number of screens, take screennumber where current interface + * is + */ +- if( numscreen == -1 || numscreen > QApplication::desktop()->screenCount() ) ++ if( numscreen == -1 || numscreen > QApplication::desktop()->numScreens() ) + numscreen = QApplication::desktop()->screenNumber( p_intf->p_sys->p_mi ); + + QRect screenres = QApplication::desktop()->screenGeometry( numscreen ); +- lastWinScreen = windowHandle()->screen(); +- windowHandle()->setScreen(QGuiApplication::screens()[numscreen]); + + /* To be sure window is on proper-screen in xinerama */ + if( !screenres.contains( pos() ) ) +@@ -899,8 +894,6 @@ void MainInterface::setVideoFullScreen( bool fs ) + { + setMinimalView( b_minimalView ); + setInterfaceFullScreen( b_interfaceFullScreen ); +- if (lastWinScreen != NULL) +- windowHandle()->setScreen(lastWinScreen); + if( lastWinPosition.isNull() == false ) + { + move( lastWinPosition ); +diff --git a/modules/gui/qt/main_interface.hpp b/modules/gui/qt/main_interface.hpp +index 4e8cb26679..81e9158fae 100644 +--- a/modules/gui/qt/main_interface.hpp ++++ b/modules/gui/qt/main_interface.hpp +@@ -51,7 +51,6 @@ class FullscreenControllerWidget; + class QVBoxLayout; + class QMenu; + class QSize; +-class QScreen; + class QTimer; + class StandardPLPanel; + struct vout_window_t; +@@ -169,7 +168,6 @@ protected: + QWidget *stackCentralOldWidget; + QPoint lastWinPosition; + QSize lastWinSize; /// To restore the same window size when leaving fullscreen +- QScreen *lastWinScreen; + + QMap stackWidgetsSizes; + +-- +2.42.0 + diff --git a/patches/vlc-3.0.21/0023-qt-port-Qt5-codes-to-Qt4-codes-3.patch b/patches/vlc-3.0.21/0023-qt-port-Qt5-codes-to-Qt4-codes-3.patch new file mode 100644 index 0000000..e3e4cdc --- /dev/null +++ b/patches/vlc-3.0.21/0023-qt-port-Qt5-codes-to-Qt4-codes-3.patch @@ -0,0 +1,31 @@ +From 76c09974293206bc64cbd4f4cab91638750690d3 Mon Sep 17 00:00:00 2001 +From: KO Myung-Hun +Date: Sun, 1 Jul 2018 17:11:35 +0900 +Subject: [PATCH 23/26] qt: port Qt5 codes to Qt4 codes #3 + +--- + modules/gui/qt/dialogs_provider.cpp | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/modules/gui/qt/dialogs_provider.cpp b/modules/gui/qt/dialogs_provider.cpp +index 5c1a227ad7..198346ca0c 100644 +--- a/modules/gui/qt/dialogs_provider.cpp ++++ b/modules/gui/qt/dialogs_provider.cpp +@@ -832,7 +832,14 @@ void DialogsProvider::loadSubtitlesFile() + if( path ) + { + url.setUrl( qfu(path) ); ++#if HAS_QT5 + url = url.adjusted(QUrl::RemoveFilename); ++#else ++ QString urlpath = url.path(); ++ int slash = urlpath.lastIndexOf('/'); ++ urlpath.remove(slash + 1, urlpath.length()); ++ url.setPath(urlpath); ++#endif + if (url.scheme() != "file") + url.clear(); + free(path); +-- +2.42.0 + diff --git a/patches/vlc-3.0.21/0024-Revert-qt-support-2d-surfaces-for-horizontal-scroll.patch b/patches/vlc-3.0.21/0024-Revert-qt-support-2d-surfaces-for-horizontal-scroll.patch new file mode 100644 index 0000000..2e3b9f3 --- /dev/null +++ b/patches/vlc-3.0.21/0024-Revert-qt-support-2d-surfaces-for-horizontal-scroll.patch @@ -0,0 +1,61 @@ +From 9f690320c5b425f4e1c13743eadd02f710737f30 Mon Sep 17 00:00:00 2001 +From: KO Myung-Hun +Date: Sun, 16 May 2021 18:48:19 +0900 +Subject: [PATCH 24/26] Revert "qt: support 2d surfaces for horizontal scroll" + +This reverts commit 704ccf4ea627458dd374d2936146c55ba00ffa12. +--- + modules/gui/qt/util/customwidgets.cpp | 30 +++++++-------------------- + 1 file changed, 7 insertions(+), 23 deletions(-) + +diff --git a/modules/gui/qt/util/customwidgets.cpp b/modules/gui/qt/util/customwidgets.cpp +index f8d2acf5e3..3879cc350b 100644 +--- a/modules/gui/qt/util/customwidgets.cpp ++++ b/modules/gui/qt/util/customwidgets.cpp +@@ -31,7 +31,6 @@ + #include "customwidgets.hpp" + #include "qt.hpp" /* needed for qtr, but not necessary */ + +-#include // for wheel deadzone calculation + #include + #include + #include +@@ -298,28 +297,13 @@ int qtEventToVLCKey( QKeyEvent *e ) + + int qtWheelEventToVLCKey( QWheelEvent *e ) + { +- const qreal v_cos_deadzone = 0.45; // ~63 degrees +- const qreal h_cos_deadzone = 0.95; // ~15 degrees +- +- int i_vlck = qtKeyModifiersToVLC(e); // Handle modifiers +- +- QPoint p = e->angleDelta(); +- if (!p.isNull()) +- { +- qreal cos = qFabs(p.x())/qSqrt(qPow(p.x(), 2) + qPow(p.y(), 2)); +- +- if (cos < v_cos_deadzone) +- { +- if (p.y() > 0) i_vlck |= KEY_MOUSEWHEELUP; +- else i_vlck |= KEY_MOUSEWHEELDOWN; +- } +- else if (cos > h_cos_deadzone) +- { +- if (p.x() > 0) i_vlck |= KEY_MOUSEWHEELLEFT; +- else i_vlck |= KEY_MOUSEWHEELRIGHT; +- } +- } +- ++ int i_vlck = 0; ++ /* Handle modifiers */ ++ i_vlck |= qtKeyModifiersToVLC( e ); ++ if ( e->delta() > 0 ) ++ i_vlck |= KEY_MOUSEWHEELUP; ++ else ++ i_vlck |= KEY_MOUSEWHEELDOWN; + return i_vlck; + } + +-- +2.42.0 + diff --git a/patches/vlc-3.0.21/0025-qt-do-not-store-percent-encoded-chars-as-a-file-path.patch b/patches/vlc-3.0.21/0025-qt-do-not-store-percent-encoded-chars-as-a-file-path.patch new file mode 100644 index 0000000..8c30182 --- /dev/null +++ b/patches/vlc-3.0.21/0025-qt-do-not-store-percent-encoded-chars-as-a-file-path.patch @@ -0,0 +1,32 @@ +From 9a39af091deb57c1924fc20642f984dcc6a35bd9 Mon Sep 17 00:00:00 2001 +From: KO Myung-Hun +Date: Mon, 28 May 2018 22:50:52 +0900 +Subject: [PATCH 25/26] qt: do not store percent encoded chars as a file path + +Non-ascii chars are percent encoded. And they are shown in 'File name' +field of file open dialog. + +In addition, that file is not recognized as a exisiting file. +--- + modules/gui/qt/dialogs_provider.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/modules/gui/qt/dialogs_provider.cpp b/modules/gui/qt/dialogs_provider.cpp +index 198346ca0c..c767604653 100644 +--- a/modules/gui/qt/dialogs_provider.cpp ++++ b/modules/gui/qt/dialogs_provider.cpp +@@ -520,7 +520,11 @@ QStringList DialogsProvider::showSimpleOpen( const QString& help, + fileTypes ); + + if( !urls.isEmpty() ) ++#ifndef __OS2__ + p_intf->p_sys->filepath = QUrl( urls.last() ); ++#else ++ p_intf->p_sys->filepath = QUrl::fromEncoded( qtu( urls.last() ) ); ++#endif + + return urls; + } +-- +2.42.0 + diff --git a/patches/vlc-3.0.21/0026-qt-fix-actions-of-View-menu-are-duplicated-whenever-.patch b/patches/vlc-3.0.21/0026-qt-fix-actions-of-View-menu-are-duplicated-whenever-.patch new file mode 100644 index 0000000..b87f1bb --- /dev/null +++ b/patches/vlc-3.0.21/0026-qt-fix-actions-of-View-menu-are-duplicated-whenever-.patch @@ -0,0 +1,27 @@ +From 1e1de63ef74e8ff05e6112e88b7100491eee4e70 Mon Sep 17 00:00:00 2001 +From: KO Myung-Hun +Date: Wed, 10 Jul 2019 19:26:21 +0900 +Subject: [PATCH 26/26] qt: fix actions of 'View' menu are duplicated whenever + they are shown + +--- + modules/gui/qt/menus.cpp | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/modules/gui/qt/menus.cpp b/modules/gui/qt/menus.cpp +index 460653c93e..a3d456c24f 100644 +--- a/modules/gui/qt/menus.cpp ++++ b/modules/gui/qt/menus.cpp +@@ -478,6 +478,9 @@ QMenu *VLCMenuBar::ViewMenu( intf_thread_t *p_intf, QMenu *current, MainInterfac + else menu->removeAction( a ); + if( m && m->parent() == menu ) delete m; + } ++#ifdef __OS2__ ++ menu->clear(); ++#endif + } + + menu->addAction( +-- +2.42.0 + diff --git a/patches/vlc-3.0.21/README b/patches/vlc-3.0.21/README new file mode 100644 index 0000000..0b3b884 --- /dev/null +++ b/patches/vlc-3.0.21/README @@ -0,0 +1 @@ +Directory for patches against vlc-3.0.21 release