[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 1437, Sun Apr 18 07:55:11 2004 UTC revision 1488, Sun Jul 11 10:22:47 2004 UTC
# Line 19  Line 19 
19   *  along with this program ; if not, write to the Free Software   *  along with this program ; if not, write to the Free Software
20   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
21   *   *
22   * $Id: config.c,v 1.4 2004-04-18 07:55:11 syskin Exp $   * $Id: config.c,v 1.5 2004-07-11 10:22:47 syskin Exp $
23   *   *
24   ****************************************************************************/   ****************************************************************************/
25    
# Line 53  Line 53 
53          REG_GET_N("FlipVideo",  g_config.nFlipVideo, 0)          REG_GET_N("FlipVideo",  g_config.nFlipVideo, 0)
54          REG_GET_N("Supported_4CC",  g_config.supported_4cc, 0)          REG_GET_N("Supported_4CC",  g_config.supported_4cc, 0)
55          REG_GET_N("Videoinfo_Compat",  g_config.videoinfo_compat, 0)          REG_GET_N("Videoinfo_Compat",  g_config.videoinfo_compat, 0)
56            REG_GET_N("Aspect_Ratio",  g_config.aspect_ratio, 0)
57    
58          RegCloseKey(hKey);          RegCloseKey(hKey);
59  }  }
# Line 87  Line 88 
88          REG_SET_N("FlipVideo", g_config.nFlipVideo);          REG_SET_N("FlipVideo", g_config.nFlipVideo);
89          REG_SET_N("Supported_4CC",  g_config.supported_4cc);          REG_SET_N("Supported_4CC",  g_config.supported_4cc);
90          REG_SET_N("Videoinfo_Compat",  g_config.videoinfo_compat);          REG_SET_N("Videoinfo_Compat",  g_config.videoinfo_compat);
91            REG_SET_N("Aspect_Ratio", g_config.aspect_ratio);
92    
93          RegCloseKey(hKey);          RegCloseKey(hKey);
94  }  }
# Line 102  Line 104 
104          case WM_DESTROY:          case WM_DESTROY:
105                  {                  {
106                          int nForceColorspace;                          int nForceColorspace;
107                            int aspect_ratio;
108    
109                          nForceColorspace = SendMessage(GetDlgItem(hwnd, IDC_COLORSPACE), CB_GETCURSEL, 0, 0);                          nForceColorspace = SendMessage(GetDlgItem(hwnd, IDC_COLORSPACE), CB_GETCURSEL, 0, 0);
110                          if ( g_config.nForceColorspace != nForceColorspace )                          if ( g_config.nForceColorspace != nForceColorspace )
111                          {                          {
112                                  MessageBox(0, "You have changed the output colorspace.\r\nClose the movie and open it for the new colorspace to take effect.", "XviD DShow", 0);                                  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);
113                          }                          }
114                          g_config.nForceColorspace = nForceColorspace;                          g_config.nForceColorspace = nForceColorspace;
115    
116                            aspect_ratio = SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_GETCURSEL, 0, 0);
117                            if ( g_config.aspect_ratio != aspect_ratio )
118                            {
119                                    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);
120                            }
121                            g_config.aspect_ratio = aspect_ratio;
122                          SaveRegistryInfo();                          SaveRegistryInfo();
123                  }                  }
124                  break;                  break;
# Line 129  Line 140 
140                  SendMessage(hBrightness, TBM_SETTICFREQ, (WPARAM)16, (LPARAM)0);                  SendMessage(hBrightness, TBM_SETTICFREQ, (WPARAM)16, (LPARAM)0);
141                  SendMessage(hBrightness, TBM_SETPOS, (WPARAM)TRUE, (LPARAM) g_config.nBrightness);                  SendMessage(hBrightness, TBM_SETPOS, (WPARAM)TRUE, (LPARAM) g_config.nBrightness);
142    
143                    // Load Aspect Ratio Box
144                    SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_ADDSTRING, 0, (LPARAM)"Auto");
145                    SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_ADDSTRING, 0, (LPARAM)"4:3");
146                    SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_ADDSTRING, 0, (LPARAM)"16:9");
147                    SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_ADDSTRING, 0, (LPARAM)"2.35:1");
148    
149                    // Select Aspect Ratio
150                    SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_SETCURSEL, g_config.aspect_ratio, 0);
151    
152    
153                  // Load Buttons                  // Load Buttons
154                  SendMessage(GetDlgItem(hwnd, IDC_DEBLOCK_Y), BM_SETCHECK, g_config.nDeblock_Y, 0);                  SendMessage(GetDlgItem(hwnd, IDC_DEBLOCK_Y), BM_SETCHECK, g_config.nDeblock_Y, 0);
155                  SendMessage(GetDlgItem(hwnd, IDC_DEBLOCK_UV), BM_SETCHECK, g_config.nDeblock_UV, 0);                  SendMessage(GetDlgItem(hwnd, IDC_DEBLOCK_UV), BM_SETCHECK, g_config.nDeblock_UV, 0);
# Line 146  Line 167 
167                  EnableWindow(GetDlgItem(hwnd,IDC_DERINGY),g_config.nDeblock_Y);                  EnableWindow(GetDlgItem(hwnd,IDC_DERINGY),g_config.nDeblock_Y);
168                  EnableWindow(GetDlgItem(hwnd,IDC_DERINGUV),g_config.nDeblock_UV);                  EnableWindow(GetDlgItem(hwnd,IDC_DERINGUV),g_config.nDeblock_UV);
169    
170    
171                  // Set Date & Time of Compilation                  // Set Date & Time of Compilation
172                  DPRINTF("(%s %s)", __DATE__, __TIME__);                  DPRINTF("(%s %s)", __DATE__, __TIME__);
173                  break;                  break;
# Line 166  Line 188 
188                          SendMessage(GetDlgItem(hwnd, IDC_FLIPVIDEO), BM_SETCHECK, g_config.nFlipVideo, 0);                          SendMessage(GetDlgItem(hwnd, IDC_FLIPVIDEO), BM_SETCHECK, g_config.nFlipVideo, 0);
189                          g_config.nForceColorspace = 0;                          g_config.nForceColorspace = 0;
190                          SendMessage(GetDlgItem(hwnd, IDC_COLORSPACE), CB_SETCURSEL, g_config.nForceColorspace, 0);                          SendMessage(GetDlgItem(hwnd, IDC_COLORSPACE), CB_SETCURSEL, g_config.nForceColorspace, 0);
191                            g_config.aspect_ratio = 0;
192                            SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_SETCURSEL, g_config.aspect_ratio, 0);
193                          break;                          break;
194                  case IDC_DEBLOCK_Y:                  case IDC_DEBLOCK_Y:
195                          g_config.nDeblock_Y = !g_config.nDeblock_Y;                          g_config.nDeblock_Y = !g_config.nDeblock_Y;

Legend:
Removed from v.1437  
changed lines
  Added in v.1488

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