Skip to content

Commit 285a20a

Browse files
Merge pull request #4 from komh/master
Patches aginst vlc-3.0.7 release
2 parents ab12ffd + 597778f commit 285a20a

File tree

27 files changed

+2666
-0
lines changed

27 files changed

+2666
-0
lines changed

patches/vlc-3.0.7/0001-build-fit-DLL-names-longer-than-8-characters-to-8.3-.patch

Lines changed: 446 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
From 5de92e04dd7d6cc5e200b7b1481e41b543b54a17 Mon Sep 17 00:00:00 2001
2+
From: KO Myung-Hun <komh@chollian.net>
3+
Date: Mon, 22 Oct 2012 18:13:06 +0900
4+
Subject: [PATCH 02/26] kva: workaround stays-on-top of Qt 4.7.3GA for OS/2
5+
6+
Qt::WindowStaysOnTopHint does not work on Qt 4.7.3GA for OS/2.
7+
---
8+
modules/video_output/kva.c | 90 +++++++++++++++++++++++++++++++++++++++++++---
9+
1 file changed, 85 insertions(+), 5 deletions(-)
10+
11+
diff --git a/modules/video_output/kva.c b/modules/video_output/kva.c
12+
index 15acb1a5fb..659272f2c7 100644
13+
--- a/modules/video_output/kva.c
14+
+++ b/modules/video_output/kva.c
15+
@@ -75,6 +75,15 @@ vlc_module_begin ()
16+
set_callbacks( Open, Close )
17+
vlc_module_end ()
18+
19+
+/* Qt::WindowStaysOnTopHint does not work on Qt 4.7.3GA for OS/2.
20+
+ * Use workaround for this.
21+
+ */
22+
+#define USE_WORKAROUND_STAYS_ON_TOP_OF_QT 1
23+
+
24+
+#if USE_WORKAROUND_STAYS_ON_TOP_OF_QT
25+
+# define QPOPUP_CLASS "QPopup"
26+
+#endif
27+
+
28+
/*****************************************************************************
29+
* vout_display_sys_t: video output method descriptor
30+
*****************************************************************************
31+
@@ -103,6 +112,9 @@ struct vout_display_sys_t
32+
unsigned button_pressed;
33+
bool is_mouse_hidden;
34+
bool is_on_top;
35+
+#if USE_WORKAROUND_STAYS_ON_TOP_OF_QT
36+
+ PID pid;
37+
+#endif
38+
};
39+
40+
struct picture_sys_t
41+
@@ -216,7 +228,7 @@ static void PMThread( void *arg )
42+
43+
WinSetWindowPtr( sys->client, 0, vd );
44+
45+
- if( !sys->parent_window )
46+
+ if( !sys->parent_window || USE_WORKAROUND_STAYS_ON_TOP_OF_QT )
47+
{
48+
WinSetWindowPtr( sys->frame, 0, vd );
49+
sys->p_old_frame = WinSubclassWindow( sys->frame, MyFrameWndProc );
50+
@@ -277,13 +289,17 @@ static void PMThread( void *arg )
51+
sys->i_result = VLC_SUCCESS;
52+
DosPostEventSem( sys->ack_event );
53+
54+
- if( !sys->parent_window )
55+
+ if( !sys->parent_window || USE_WORKAROUND_STAYS_ON_TOP_OF_QT )
56+
WinSetVisibleRegionNotify( sys->frame, TRUE );
57+
58+
+#if USE_WORKAROUND_STAYS_ON_TOP_OF_QT
59+
+ WinQueryWindowProcess( sys->frame, &sys->pid, NULL );
60+
+#endif
61+
+
62+
while( WinGetMsg( sys->hab, &qm, NULLHANDLE, 0, 0 ))
63+
WinDispatchMsg( sys->hab, &qm );
64+
65+
- if( !sys->parent_window )
66+
+ if( !sys->parent_window || USE_WORKAROUND_STAYS_ON_TOP_OF_QT )
67+
WinSetVisibleRegionNotify( sys->frame, FALSE );
68+
69+
kvaEnableScreenSaver();
70+
@@ -296,7 +312,7 @@ exit_open_display :
71+
kvaDone();
72+
73+
exit_kva_init :
74+
- if( !sys->parent_window )
75+
+ if( !sys->parent_window || USE_WORKAROUND_STAYS_ON_TOP_OF_QT )
76+
WinSubclassWindow( sys->frame, sys->p_old_frame );
77+
78+
WinDestroyWindow( sys->frame );
79+
@@ -919,7 +935,71 @@ static MRESULT EXPENTRY MyFrameWndProc( HWND hwnd, ULONG msg, MPARAM mp1,
80+
//case WM_VRNDISABLED :
81+
case WM_VRNENABLED :
82+
if( !vd->cfg->is_fullscreen && sys->is_on_top )
83+
- WinSetWindowPos( hwnd, HWND_TOP, 0, 0, 0, 0, SWP_ZORDER );
84+
+ {
85+
+ HWND frame = hwnd;
86+
+ HWND top = HWND_TOP;
87+
+
88+
+#if USE_WORKAROUND_STAYS_ON_TOP_OF_QT
89+
+ if( sys->parent_window )
90+
+ {
91+
+ HWND parent;
92+
+ HWND desktop = WinQueryDesktopWindow( sys->hab,
93+
+ NULLHANDLE );
94+
+
95+
+ /* Find a main window */
96+
+ for( frame = sys->parent;; frame = parent )
97+
+ {
98+
+ parent = WinQueryWindow( frame, QW_PARENT );
99+
+ if( parent == desktop )
100+
+ break;
101+
+ }
102+
+ }
103+
+
104+
+ HENUM henum;
105+
+ HWND current;
106+
+ char szClassName[ 80 ];
107+
+ PID pidCurrent;
108+
+
109+
+ /* Find a QPopup window above a video window, but
110+
+ * belowest one.
111+
+ */
112+
+ henum = WinBeginEnumWindows( HWND_DESKTOP );
113+
+ while(( current = WinGetNextWindow( henum )) != NULLHANDLE )
114+
+ {
115+
+ /* Reached to me ? */
116+
+ if( current == frame )
117+
+ break;
118+
+
119+
+ /* Only check a physically showing window */
120+
+ if( !WinIsWindowShowing( current ))
121+
+ continue;
122+
+
123+
+ WinQueryWindowProcess( current, &pidCurrent, NULL );
124+
+
125+
+ if( pidCurrent == sys->pid )
126+
+ {
127+
+ /* Behind any VLC window in case of
128+
+ * an embedded window.
129+
+ */
130+
+ if( sys->parent_window )
131+
+ {
132+
+ top = current;
133+
+ continue;
134+
+ }
135+
+
136+
+ WinQueryClassName( current, sizeof( szClassName ),
137+
+ szClassName );
138+
+
139+
+ /* A QPopup window above me ? */
140+
+ if( !strcmp( szClassName, QPOPUP_CLASS ))
141+
+ top = current;
142+
+ }
143+
+ }
144+
+ WinEndEnumWindows( henum );
145+
+#endif
146+
+
147+
+ WinSetWindowPos( frame, top, 0, 0, 0, 0, SWP_ZORDER );
148+
+ }
149+
break;
150+
}
151+
152+
--
153+
2.13.3
154+
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
From 25986978cd2ae53a7c26590cb9d6d1a809b4655b Mon Sep 17 00:00:00 2001
2+
From: KO Myung-Hun <komh@chollian.net>
3+
Date: Tue, 1 Mar 2016 20:11:06 +0900
4+
Subject: [PATCH 03/26] os2: use ExceptQ to ease debugging
5+
6+
---
7+
bin/vlc.c | 18 ++++++++++++++++++
8+
src/os2/thread.c | 13 +++++++++++++
9+
2 files changed, 31 insertions(+)
10+
11+
diff --git a/bin/vlc.c b/bin/vlc.c
12+
index 72e0eee428..eac375e0bf 100644
13+
--- a/bin/vlc.c
14+
+++ b/bin/vlc.c
15+
@@ -109,11 +109,26 @@ static void exit_timeout (int signum)
16+
signal (SIGINT, SIG_DFL);
17+
}
18+
19+
+#ifdef __OS2__
20+
+#define INCL_DOS
21+
+#include <os2.h>
22+
+
23+
+#define INCL_LOADEXCEPTQ
24+
+#include <exceptq.h>
25+
+#endif
26+
+
27+
/*****************************************************************************
28+
* main: parse command line, start interface and spawn threads.
29+
*****************************************************************************/
30+
int main( int i_argc, const char *ppsz_argv[] )
31+
{
32+
+#ifdef __OS2__
33+
+ EXCEPTIONREGISTRATIONRECORD xcptRegRec;
34+
+ BOOL fLoaded;
35+
+
36+
+ fLoaded = LoadExceptq (&xcptRegRec, NULL, NULL);
37+
+#endif
38+
+
39+
/* The so-called POSIX-compliant MacOS X reportedly processes SIGPIPE even
40+
* if it is blocked in all thread.
41+
* Note: this is NOT an excuse for not protecting against SIGPIPE. If
42+
@@ -276,6 +291,9 @@ out:
43+
#ifdef __OS2__
44+
for (int i = argc - i_argc; i < argc; i++)
45+
free (argv[i]);
46+
+
47+
+ if (fLoaded)
48+
+ UninstallExceptq (&xcptRegRec);
49+
#endif
50+
return ret;
51+
}
52+
diff --git a/src/os2/thread.c b/src/os2/thread.c
53+
index 20f7ccd79c..97a476c822 100644
54+
--- a/src/os2/thread.c
55+
+++ b/src/os2/thread.c
56+
@@ -534,13 +534,26 @@ retry:
57+
}
58+
}
59+
60+
+#define INCL_LIBLOADEXCEPTQ
61+
+#define INCL_FORKEXCEPTQ
62+
+#include <exceptq.h>
63+
+
64+
static void vlc_entry( void *p )
65+
{
66+
struct vlc_thread *th = p;
67+
+ EXCEPTIONREGISTRATIONRECORD xcptRegRec;
68+
+ BOOL fLoaded;
69+
70+
vlc_threadvar_set (thread_key, th);
71+
th->killable = true;
72+
+
73+
+ fLoaded = LibLoadExceptq( &xcptRegRec );
74+
+
75+
th->data = th->entry (th->data);
76+
+
77+
+ if( fLoaded )
78+
+ UninstallExceptq( &xcptRegRec );
79+
+
80+
DosPostEventSem( th->done_event );
81+
vlc_thread_cleanup (th);
82+
}
83+
--
84+
2.13.3
85+

0 commit comments

Comments
 (0)