1 /*****************************************************************************
2  *
3  *  XVID MPEG-4 VIDEO CODEC
4  *  - Configuration processing header file -
5  *
6  *  Copyright(C) 2002-2012 Peter Ross <pross@xvid.org>
7  *
8  *  This program is free software ; you can redistribute it and/or modify
9  *  it under the terms of the GNU General Public License as published by
10  *  the Free Software Foundation ; either version 2 of the License, or
11  *  (at your option) any later version.
12  *
13  *  This program is distributed in the hope that it will be useful,
14  *  but WITHOUT ANY WARRANTY ; without even the implied warranty of
15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  *  GNU General Public License for more details.
17  *
18  *  You should have received a copy of the GNU General Public License
19  *  along with this program ; if not, write to the Free Software
20  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
21  *
22  * $Id: config.h 2114 2015-06-14 19:18:14Z Isibaar $
23  *
24  ****************************************************************************/
25 
26 #ifndef _DSHOW_CONFIG_H_
27 #define _DSHOW_CONFIG_H_
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 /* registry stuff */
34 #define XVID_REG_KEY	HKEY_CURRENT_USER
35 #define XVID_REG_SUBKEY	"Software\\GNU\\XviD"
36 #define XVID_REG_CLASS	"config"
37 
38 #define REG_GET_N(X, Y, Z) size=sizeof(int);if(RegQueryValueEx(hKey, X, 0, 0, (LPBYTE)&Y, &size) != ERROR_SUCCESS) {Y=Z;}
39 #define REG_GET_S(X, Y, Z) size=MAX_PATH;if(RegQueryValueEx(hKey, X, 0, 0, Y, &size) != ERROR_SUCCESS) {lstrcpy(Y, Z);}
40 #define REG_SET_N(X, Y) RegSetValueEx(hKey, X, 0, REG_DWORD, (LPBYTE)&Y, sizeof(int))
41 #define REG_SET_S(X, Y) RegSetValueEx(hKey, X, 0, REG_SZ, Y, lstrlen(Y)+1)
42 
43 
44 /* config struct */
45 #define SUPPORT_3IVX		(1<<0)
46 #define SUPPORT_DIVX		(1<<1)
47 #define SUPPORT_MP4V		(1<<2)
48 
49 #define FORCE_NONE  0
50 #define FORCE_YV12  1
51 #define FORCE_YUY2  2
52 #define FORCE_RGB24 3
53 #define FORCE_RGB32 4
54 
55 typedef struct
56 {
57 	int nBrightness;
58 	int nDeblock_Y;
59 	int nDeblock_UV;
60 	int nDering_Y;
61 	int nDering_UV;
62 	int nFilmEffect;
63 	int nFlipVideo;
64 	int nForceColorspace;
65 	unsigned int supported_4cc;
66 	int videoinfo_compat;
67 	int aspect_ratio;
68 	int num_threads;
69 	DWORD cpu;
70 	int bTrayIcon;
71 } CONFIG;
72 
73 
74 /* global */
75 extern CONFIG g_config;
76 
77 
78 /* functions */
79 void LoadRegistryInfo();
80 void SaveRegistryInfo(int perfCount);
81 INT_PTR CALLBACK adv_proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
82 
83 #define XVID_DLL_NAME "xvidcore.dll"
84 
85 #ifdef __cplusplus
86 }
87 #endif
88 
89 
90 #endif
91 
92