1
0
Fork 0

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)
- 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)
- 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 ===========================

View File

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

View File

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

View File

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

View File

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

View File

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