blob: 154b6d6457cd9c5f77a1a734d16a9dd5f1ad168b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
#include "Main.h"
#include "video.h"
extern "C"
{
extern wchar_t vidoutbuf_save[];
}
int WINAPI VideoIPCProcedure(int which, WPARAM data, LRESULT *returnValue)
{
switch (which)
{
case IPC_GETNUMAUDIOTRACKS:
*returnValue = video_getNumAudioTracks();
return 1;
case IPC_GETNUMVIDEOTRACKS:
*returnValue = video_getNumVideoTracks();
return 1;
case IPC_GETAUDIOTRACK:
*returnValue = video_getCurAudioTrack();
return 1;
case IPC_GETVIDEOTRACK:
*returnValue = video_getCurVideoTrack();
return 1;
case IPC_SETAUDIOTRACK:
*returnValue = video_setCurAudioTrack(data);
return 1;
case IPC_SETVIDEOTRACK:
*returnValue = video_setCurVideoTrack(data);
return 1;
case IPC_SETSTOPONVIDEOCLOSE:
config_video_stopclose = data;
*returnValue = 0;
return 1;
case IPC_GETSTOPONVIDEOCLOSE:
*returnValue = config_video_stopclose;
return 1;
case IPC_GETVIDEORESIZE:
*returnValue = config_video_updsize;
return 1;
case IPC_SETVIDEORESIZE:
config_video_updsize = data;
*returnValue = 0;
return 1;
case IPC_GETWND:
if (data == IPC_GETWND_VIDEO)
{
*returnValue = (LRESULT)hVideoWindow;
return 1;
}
break;
case IPC_ISWNDVISIBLE:
if (data == IPC_GETWND_VIDEO)
{
*returnValue = config_video_open;
return 1;
}
break;
case IPC_ENABLEDISABLE_ALL_WINDOWS:
EnableWindow(hVideoWindow, data != 0xdeadbeef);
break;
case IPC_GETINFO:
if (data == 3)
{
*returnValue = videoGetWidthHeightDWORD();
return 1;
}
if (data == 4)
{
*returnValue = (LRESULT) vidoutbuf_save;
return 1;
}
break;
case IPC_HAS_VIDEO_SUPPORT:
*returnValue = g_has_video_plugin;
return 1;
case IPC_IS_PLAYING_VIDEO:
*returnValue = video_isVideoPlaying() ? 2 : 0;
return 1;
case IPC_IS_FULLSCREEN:
if (is_fullscreen_video)
{
*returnValue = 1;
return 1;
}
break;
case IPC_GET_IVIDEOOUTPUT:
*returnValue = (LRESULT)video_getIVideoOutput();
return 1;
case IPC_VIDCMD:
Vid_Cmd((windowCommand*)data);
break;
}
return 0;
}
|