Minor video fix/changes

Originally committed to SVN as r69.
This commit is contained in:
Rodrigo Braz Monteiro 2006-02-19 02:31:25 +00:00
parent 518e2272a0
commit f0351f6d27
6 changed files with 18 additions and 10 deletions

View File

@ -20,6 +20,11 @@ Please visit http://aegisub.net to download latest version
- Drag-and-drop files onto the program no longer causes the subs to be unloaded every time, even if no subs were dropped (jfs) - Drag-and-drop files onto the program no longer causes the subs to be unloaded every time, even if no subs were dropped (jfs)
- 1,1+2 recombining lines where 1 is a substring of 2 no longer causes incorrect behavior. 1+2,2 similarly fixed. This fix also gives more sanity-checking in the recombining (jfs) - 1,1+2 recombining lines where 1 is a substring of 2 no longer causes incorrect behavior. 1+2,2 similarly fixed. This fix also gives more sanity-checking in the recombining (jfs)
- Replaced the subtitles grid with a custom control, which should hopefully behave and look better (AMZ) - Replaced the subtitles grid with a custom control, which should hopefully behave and look better (AMZ)
- Currently active line is now highlighted with a border in the grid (AMZ)
- The subtitles grid can no longer receive focus (AMZ)
- Toolbar will now properly disable the Jump To buttons if more than one line is selected (AMZ)
- Fixed the toolbar "grey area" glitch (was actually a wxWidgets issue) (AMZ)
- Default video zoom can now be set in config.dat and is defaulted to 100% (AMZ)
= 1.09 beta - 2006.01.16 =========================== = 1.09 beta - 2006.01.16 ===========================

View File

@ -347,6 +347,7 @@ void FrameMain::InitContents() {
AssFile::StackReset(); AssFile::StackReset();
videoBox->videoSlider->grid = SubsBox; videoBox->videoSlider->grid = SubsBox;
videoBox->videoDisplay->grid = SubsBox; videoBox->videoDisplay->grid = SubsBox;
videoBox->videoDisplay->SetZoomPos(Options.AsInt(_T("Video Default Zoom")));
Search.grid = SubsBox; Search.grid = SubsBox;
// Audio area // Audio area
@ -650,12 +651,9 @@ void FrameMain::SetDisplayMode(int mode) {
UpdateToolbar(); UpdateToolbar();
videoBox->VideoSizer->Layout(); videoBox->VideoSizer->Layout();
MainSizer->Layout(); MainSizer->Layout();
//Layout(); //int cw,ch;
//Refresh(); //GetSize(&cw,&ch);
//GetToolBar()->SetBestFittingSize(); //SetSize(cw-1,ch-1);
int cw,ch;
GetSize(&cw,&ch);
SetSize(cw-1,ch-1);
Thaw(); Thaw();
} }

View File

@ -261,9 +261,9 @@ void FrameMain::OnMenuOpen (wxMenuEvent &event) {
MenuBar->Enable(Menu_File_Close_VFR,VFR_Output.loaded && VFR_Output.vfr); MenuBar->Enable(Menu_File_Close_VFR,VFR_Output.loaded && VFR_Output.vfr);
// Set AR radio // Set AR radio
if (videoBox->videoDisplay->arType == 0 && !MenuBar->IsChecked(Menu_Video_AR_Default)) MenuBar->Check(Menu_Video_AR_Default,true); if (videoBox->videoDisplay->arType == 0) MenuBar->Check(Menu_Video_AR_Default,true);
if (videoBox->videoDisplay->arType == 1 && !MenuBar->IsChecked(Menu_Video_AR_Full)) MenuBar->Check(Menu_Video_AR_Full,true); if (videoBox->videoDisplay->arType == 1) MenuBar->Check(Menu_Video_AR_Full,true);
if (videoBox->videoDisplay->arType == 2 && !MenuBar->IsChecked(Menu_Video_AR_Wide)) MenuBar->Check(Menu_Video_AR_Wide,true); if (videoBox->videoDisplay->arType == 2) MenuBar->Check(Menu_Video_AR_Wide,true);
// Wipe recent // Wipe recent
int count = RecentVids->GetMenuItemCount(); int count = RecentVids->GetMenuItemCount();

View File

@ -124,6 +124,7 @@ void OptionsManager::LoadDefaults() {
SetInt(_T("Avisynth MemoryMax"),64); SetInt(_T("Avisynth MemoryMax"),64);
SetText(_T("Video resizer"),_T("BilinearResize")); SetText(_T("Video resizer"),_T("BilinearResize"));
SetInt(_T("Video Check Script Res"), 0); SetInt(_T("Video Check Script Res"), 0);
SetInt(_T("Video Default Zoom"), 7);
SetInt(_T("Audio Cache"),1); SetInt(_T("Audio Cache"),1);
SetInt(_T("Audio Sample Rate"),0); SetInt(_T("Audio Sample Rate"),0);

View File

@ -100,6 +100,7 @@ VideoDisplay::VideoDisplay(wxWindow* parent, wxWindowID id, const wxPoint& pos,
IsPlaying = false; IsPlaying = false;
threaded = Options.AsBool(_T("Threaded Video")); threaded = Options.AsBool(_T("Threaded Video"));
nextFrame = -1; nextFrame = -1;
zoomValue = 0.5;
// Create PNG handler // Create PNG handler
wxPNGHandler *png = new wxPNGHandler; wxPNGHandler *png = new wxPNGHandler;
@ -153,7 +154,7 @@ void VideoDisplay::SetVideo(const wxString &filename) {
bool usedDirectshow; bool usedDirectshow;
provider = new VideoProvider(filename,grid->GetTempWorkFile(),0.75,usedDirectshow,true); provider = new VideoProvider(filename,grid->GetTempWorkFile(),zoomValue,usedDirectshow,true);
// Set keyframes // Set keyframes
if (filename.Right(4).Lower() == _T(".avi")) if (filename.Right(4).Lower() == _T(".avi"))
@ -424,6 +425,7 @@ void VideoDisplay::JumpToTime(int ms) {
/////////////////// ///////////////////
// Sets zoom level // Sets zoom level
void VideoDisplay::SetZoom(double value) { void VideoDisplay::SetZoom(double value) {
zoomValue = value;
if (provider) { if (provider) {
provider->SetZoom(value); provider->SetZoom(value);
UpdateSize(); UpdateSize();
@ -454,6 +456,7 @@ void VideoDisplay::SetAspectRatio(int value) {
else if (value == 2) else if (value == 2)
provider->SetDAR(16.0/9.0); provider->SetDAR(16.0/9.0);
arType = value;
UpdateSize(); UpdateSize();
RefreshVideo(); RefreshVideo();
GetParent()->Layout(); GetParent()->Layout();

View File

@ -104,6 +104,7 @@ public:
bool loaded; bool loaded;
bool IsPlaying; bool IsPlaying;
double fps; double fps;
double zoomValue;
bool bTrackerEditing; bool bTrackerEditing;
int MovementEdit; int MovementEdit;