[svn] / trunk / xvidcore / dshow / src / config.c Repository:
ViewVC logotype

Diff of /trunk/xvidcore/dshow/src/config.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2017, Wed Jun 1 15:12:55 2011 UTC revision 2018, Wed Jun 15 19:09:17 2011 UTC
# Line 44  Line 44 
44          RegOpenKeyEx(XVID_REG_KEY, XVID_REG_SUBKEY, 0, KEY_READ, &hKey);          RegOpenKeyEx(XVID_REG_KEY, XVID_REG_SUBKEY, 0, KEY_READ, &hKey);
45    
46          // Set the default post-processing settings          // Set the default post-processing settings
47          REG_GET_N("Brightness", g_config.nBrightness, 0)          REG_GET_N(TEXT("Brightness"), g_config.nBrightness, 0)
48          REG_GET_N("Deblock_Y",  g_config.nDeblock_Y, 0)          REG_GET_N(TEXT("Deblock_Y"),  g_config.nDeblock_Y, 0)
49          REG_GET_N("Deblock_UV", g_config.nDeblock_UV, 0)          REG_GET_N(TEXT("Deblock_UV"), g_config.nDeblock_UV, 0)
50          REG_GET_N("Dering_Y",  g_config.nDering_Y, 0)          REG_GET_N(TEXT("Dering_Y"),  g_config.nDering_Y, 0)
51          REG_GET_N("Dering_UV",  g_config.nDering_UV, 0)          REG_GET_N(TEXT("Dering_UV"),  g_config.nDering_UV, 0)
52          REG_GET_N("FilmEffect", g_config.nFilmEffect, 0)          REG_GET_N(TEXT("FilmEffect"), g_config.nFilmEffect, 0)
53          REG_GET_N("ForceColorspace", g_config.nForceColorspace, 0)          REG_GET_N(TEXT("ForceColorspace"), g_config.nForceColorspace, 0)
54          REG_GET_N("FlipVideo",  g_config.nFlipVideo, 0)          REG_GET_N(TEXT("FlipVideo"),  g_config.nFlipVideo, 0)
55          REG_GET_N("Supported_4CC",  g_config.supported_4cc, 0)          REG_GET_N(TEXT("Supported_4CC"),  g_config.supported_4cc, 0)
56          REG_GET_N("Videoinfo_Compat",  g_config.videoinfo_compat, 0)          REG_GET_N(TEXT("Videoinfo_Compat"),  g_config.videoinfo_compat, 0)
57          REG_GET_N("Decoder_Aspect_Ratio",  g_config.aspect_ratio, 0)          REG_GET_N(TEXT("Decoder_Aspect_Ratio"),  g_config.aspect_ratio, 0)
58          REG_GET_N("num_threads",  g_config.num_threads, 0)          REG_GET_N(TEXT("num_threads"),  g_config.num_threads, 0)
59          REG_GET_N("cpu_flags", g_config.cpu, 0)          REG_GET_N(TEXT("cpu_flags"), g_config.cpu, 0)
60    
61          RegCloseKey(hKey);          RegCloseKey(hKey);
62  }  }
# Line 77  Line 77 
77                          &hKey,                          &hKey,
78                          &dispo) != ERROR_SUCCESS)                          &dispo) != ERROR_SUCCESS)
79          {          {
80                  OutputDebugString("Couldn't create XVID_REG_SUBKEY");                  OutputDebugString(TEXT("Couldn't create XVID_REG_SUBKEY"));
81                  return;                  return;
82          }          }
83    
84          REG_SET_N("Brightness", g_config.nBrightness);          REG_SET_N(TEXT("Brightness"), g_config.nBrightness);
85          REG_SET_N("Deblock_Y",  g_config.nDeblock_Y);          REG_SET_N(TEXT("Deblock_Y"),  g_config.nDeblock_Y);
86          REG_SET_N("Deblock_UV", g_config.nDeblock_UV);          REG_SET_N(TEXT("Deblock_UV"), g_config.nDeblock_UV);
87          REG_SET_N("Dering_Y", g_config.nDering_Y);          REG_SET_N(TEXT("Dering_Y"), g_config.nDering_Y);
88          REG_SET_N("Dering_UV", g_config.nDering_UV);          REG_SET_N(TEXT("Dering_UV"), g_config.nDering_UV);
89          REG_SET_N("FilmEffect", g_config.nFilmEffect);          REG_SET_N(TEXT("FilmEffect"), g_config.nFilmEffect);
90          REG_SET_N("ForceColorspace", g_config.nForceColorspace);          REG_SET_N(TEXT("ForceColorspace"), g_config.nForceColorspace);
91          REG_SET_N("FlipVideo", g_config.nFlipVideo);          REG_SET_N(TEXT("FlipVideo"), g_config.nFlipVideo);
92          REG_SET_N("Supported_4CC",  g_config.supported_4cc);          REG_SET_N(TEXT("Supported_4CC"),  g_config.supported_4cc);
93          REG_SET_N("Videoinfo_Compat",  g_config.videoinfo_compat);          REG_SET_N(TEXT("Videoinfo_Compat"),  g_config.videoinfo_compat);
94          REG_SET_N("Decoder_Aspect_Ratio", g_config.aspect_ratio);          REG_SET_N(TEXT("Decoder_Aspect_Ratio"), g_config.aspect_ratio);
95          REG_SET_N("num_threads",  g_config.num_threads);          REG_SET_N(TEXT("num_threads"),  g_config.num_threads);
96    
97          RegCloseKey(hKey);          RegCloseKey(hKey);
98  }  }
# Line 103  Line 103 
103  {  {
104          HWND hBrightness;          HWND hBrightness;
105    
106            UNREFERENCED_PARAMETER(lParam);
107          switch ( uMsg )          switch ( uMsg )
108          {          {
109          case WM_DESTROY:          case WM_DESTROY:
# Line 113  Line 114 
114                          nForceColorspace = SendMessage(GetDlgItem(hwnd, IDC_COLORSPACE), CB_GETCURSEL, 0, 0);                          nForceColorspace = SendMessage(GetDlgItem(hwnd, IDC_COLORSPACE), CB_GETCURSEL, 0, 0);
115                          if ( g_config.nForceColorspace != nForceColorspace )                          if ( g_config.nForceColorspace != nForceColorspace )
116                          {                          {
117                                  MessageBox(0, "You have changed the output colorspace.\r\nClose the movie and open it for the new colorspace to take effect.", "Xvid DShow", MB_TOPMOST);                                  MessageBox(0, TEXT("You have changed the output colorspace.\r\nClose the movie and open it for the new colorspace to take effect."), TEXT("Xvid DShow"), MB_TOPMOST);
118                          }                          }
119                          g_config.nForceColorspace = (int) nForceColorspace;                          g_config.nForceColorspace = (int) nForceColorspace;
120    
121                          aspect_ratio = SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_GETCURSEL, 0, 0);                          aspect_ratio = SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_GETCURSEL, 0, 0);
122                          if ( g_config.aspect_ratio != aspect_ratio )                          if ( g_config.aspect_ratio != aspect_ratio )
123                          {                          {
124                                  MessageBox(0, "You have changed the default aspect ratio.\r\nClose the movie and open it for the new aspect ratio to take effect.", "Xvid DShow", MB_TOPMOST);                                  MessageBox(0, TEXT("You have changed the default aspect ratio.\r\nClose the movie and open it for the new aspect ratio to take effect."), TEXT("Xvid DShow"), MB_TOPMOST);
125                          }                          }
126                          g_config.aspect_ratio = (int) aspect_ratio;                          g_config.aspect_ratio = (int) aspect_ratio;
127                          SaveRegistryInfo();                          SaveRegistryInfo();
# Line 142  Line 143 
143                                  ((int (__cdecl *)(void *, int, void *, void *))GetProcAddress(m_hdll, "xvid_global"))                                  ((int (__cdecl *)(void *, int, void *, void *))GetProcAddress(m_hdll, "xvid_global"))
144                                          (0, XVID_GBL_INFO, &info, NULL);                                          (0, XVID_GBL_INFO, &info, NULL);
145    
146                                  wsprintf(core, "Xvid MPEG-4 Video Codec v%d.%d.%d",                                  wsprintfA(core, "Xvid MPEG-4 Video Codec v%d.%d.%d",
147                                          XVID_VERSION_MAJOR(info.actual_version),                                          XVID_VERSION_MAJOR(info.actual_version),
148                                          XVID_VERSION_MINOR(info.actual_version),                                          XVID_VERSION_MINOR(info.actual_version),
149                                          XVID_VERSION_PATCH(info.actual_version));                                          XVID_VERSION_PATCH(info.actual_version));
150    
151                                  FreeLibrary(m_hdll);                                  FreeLibrary(m_hdll);
152                          } else {                          } else {
153                                  wsprintf(core, "xvidcore.dll not found!");                                  wsprintfA(core, "xvidcore.dll not found!");
154                          }                          }
155    
156                          SetDlgItemText(hwnd, IDC_CORE, core);                          SetDlgItemTextA(hwnd, IDC_CORE, core);
157                  }                  }
158    
159                  // Load Force Colorspace Box                  // Load Force Colorspace Box
160                  SendMessage(GetDlgItem(hwnd, IDC_COLORSPACE), CB_ADDSTRING, 0, (LPARAM)"No Force");                  SendMessage(GetDlgItem(hwnd, IDC_COLORSPACE), CB_ADDSTRING, 0, (LPARAM)TEXT("No Force"));
161                  SendMessage(GetDlgItem(hwnd, IDC_COLORSPACE), CB_ADDSTRING, 0, (LPARAM)"YV12");                  SendMessage(GetDlgItem(hwnd, IDC_COLORSPACE), CB_ADDSTRING, 0, (LPARAM)TEXT("YV12"));
162                  SendMessage(GetDlgItem(hwnd, IDC_COLORSPACE), CB_ADDSTRING, 0, (LPARAM)"YUY2");                  SendMessage(GetDlgItem(hwnd, IDC_COLORSPACE), CB_ADDSTRING, 0, (LPARAM)TEXT("YUY2"));
163                  SendMessage(GetDlgItem(hwnd, IDC_COLORSPACE), CB_ADDSTRING, 0, (LPARAM)"RGB24");                  SendMessage(GetDlgItem(hwnd, IDC_COLORSPACE), CB_ADDSTRING, 0, (LPARAM)TEXT("RGB24"));
164                  SendMessage(GetDlgItem(hwnd, IDC_COLORSPACE), CB_ADDSTRING, 0, (LPARAM)"RGB32");                  SendMessage(GetDlgItem(hwnd, IDC_COLORSPACE), CB_ADDSTRING, 0, (LPARAM)TEXT("RGB32"));
165    
166                  // Select Colorspace                  // Select Colorspace
167                  SendMessage(GetDlgItem(hwnd, IDC_COLORSPACE), CB_SETCURSEL, g_config.nForceColorspace, 0);                  SendMessage(GetDlgItem(hwnd, IDC_COLORSPACE), CB_SETCURSEL, g_config.nForceColorspace, 0);
# Line 171  Line 172 
172                  SendMessage(hBrightness, TBM_SETPOS, (WPARAM)TRUE, (LPARAM) g_config.nBrightness);                  SendMessage(hBrightness, TBM_SETPOS, (WPARAM)TRUE, (LPARAM) g_config.nBrightness);
173    
174                  // Load Aspect Ratio Box                  // Load Aspect Ratio Box
175                  SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_ADDSTRING, 0, (LPARAM)"Auto (MPEG-4 first)");                  SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_ADDSTRING, 0, (LPARAM)TEXT("Auto (MPEG-4 first)"));
176                  SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_ADDSTRING, 0, (LPARAM)"Auto (external first)");                  SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_ADDSTRING, 0, (LPARAM)TEXT("Auto (external first)"));
177                  SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_ADDSTRING, 0, (LPARAM)"4:3");                  SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_ADDSTRING, 0, (LPARAM)TEXT("4:3"));
178                  SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_ADDSTRING, 0, (LPARAM)"16:9");                  SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_ADDSTRING, 0, (LPARAM)TEXT("16:9"));
179                  SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_ADDSTRING, 0, (LPARAM)"2.35:1");                  SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_ADDSTRING, 0, (LPARAM)TEXT("2.35:1"));
180    
181                  // Select Aspect Ratio                  // Select Aspect Ratio
182                  SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_SETCURSEL, g_config.aspect_ratio, 0);                  SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_SETCURSEL, g_config.aspect_ratio, 0);

Legend:
Removed from v.2017  
changed lines
  Added in v.2018

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4