40 |
#define XVID_USE_MFT |
#define XVID_USE_MFT |
41 |
#endif |
#endif |
42 |
|
|
|
#define XVID_USE_TRAYICON |
|
|
|
|
43 |
#include <windows.h> |
#include <windows.h> |
44 |
|
|
45 |
#include <streams.h> |
#include <streams.h> |
175 |
/* note: g_cTemplates must be global; used by strmbase.lib(dllentry.cpp,dllsetup.cpp) */ |
/* note: g_cTemplates must be global; used by strmbase.lib(dllentry.cpp,dllsetup.cpp) */ |
176 |
int g_cTemplates = sizeof(g_Templates) / sizeof(CFactoryTemplate); |
int g_cTemplates = sizeof(g_Templates) / sizeof(CFactoryTemplate); |
177 |
|
|
|
#ifdef XVID_USE_TRAYICON |
|
178 |
extern HINSTANCE g_xvid_hInst; |
extern HINSTANCE g_xvid_hInst; |
179 |
|
|
180 |
static int GUI_Page = 0; |
static int GUI_Page = 0; |
216 |
|
|
217 |
return TRUE; /* ok */ |
return TRUE; /* ok */ |
218 |
} |
} |
|
#endif |
|
219 |
|
|
220 |
STDAPI DllRegisterServer() |
STDAPI DllRegisterServer() |
221 |
{ |
{ |
492 |
{ |
{ |
493 |
DPRINTF("Destructor"); |
DPRINTF("Destructor"); |
494 |
|
|
|
#ifdef XVID_USE_TRAYICON |
|
495 |
if (Tray_Icon) { /* Destroy tray icon */ |
if (Tray_Icon) { /* Destroy tray icon */ |
496 |
NOTIFYICONDATA nid; |
NOTIFYICONDATA nid; |
497 |
ZeroMemory(&nid,sizeof(NOTIFYICONDATA)); |
ZeroMemory(&nid,sizeof(NOTIFYICONDATA)); |
503 |
Shell_NotifyIcon(NIM_DELETE, &nid); |
Shell_NotifyIcon(NIM_DELETE, &nid); |
504 |
Tray_Icon = 0; |
Tray_Icon = 0; |
505 |
} |
} |
|
#endif |
|
506 |
|
|
507 |
/* Close xvidcore library */ |
/* Close xvidcore library */ |
508 |
CloseLib(); |
CloseLib(); |
929 |
{ |
{ |
930 |
DPRINTF("CompleteConnect"); |
DPRINTF("CompleteConnect"); |
931 |
|
|
932 |
#ifdef XVID_USE_TRAYICON |
if ((direction == PINDIR_OUTPUT) && (Tray_Icon == 0) && (g_config.bTrayIcon != 0)) |
|
if ((direction == PINDIR_OUTPUT) && (Tray_Icon == 0)) |
|
933 |
{ |
{ |
934 |
WNDCLASSEX wc; |
WNDCLASSEX wc; |
935 |
|
|
967 |
DestroyIcon(nid.hIcon); |
DestroyIcon(nid.hIcon); |
968 |
Tray_Icon = 1; |
Tray_Icon = 1; |
969 |
} |
} |
|
#endif |
|
970 |
|
|
971 |
return S_OK; |
return S_OK; |
972 |
} |
} |
1639 |
hr = OnSetOutputType(pType); |
hr = OnSetOutputType(pType); |
1640 |
} |
} |
1641 |
} |
} |
1642 |
#ifdef XVID_USE_TRAYICON |
|
1643 |
if (SUCCEEDED(hr) && Tray_Icon == 0) /* Create message passing window */ |
if (SUCCEEDED(hr) && (Tray_Icon == 0) && (g_config.bTrayIcon != 0)) /* Create message passing window */ |
1644 |
{ |
{ |
1645 |
WNDCLASSEX wc; |
WNDCLASSEX wc; |
1646 |
|
|
1678 |
DestroyIcon(nid.hIcon); |
DestroyIcon(nid.hIcon); |
1679 |
Tray_Icon = 1; |
Tray_Icon = 1; |
1680 |
} |
} |
|
#endif |
|
1681 |
|
|
1682 |
LeaveCriticalSection(&m_mft_lock); |
LeaveCriticalSection(&m_mft_lock); |
1683 |
return hr; |
return hr; |