Originally committed to SVN as r349.
This commit is contained in:
parent
1b81dba892
commit
2bd558efae
3 changed files with 11 additions and 8 deletions
|
@ -46,7 +46,7 @@
|
||||||
|
|
||||||
wxString GetAegisubVersionString() {
|
wxString GetAegisubVersionString() {
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
return T("v1.10 Beta (debug)");
|
return _T("v1.10 Beta (debug)");
|
||||||
#else
|
#else
|
||||||
return _T("v1.10 Beta PRE-RELEASE");
|
return _T("v1.10 Beta PRE-RELEASE");
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -40,16 +40,17 @@
|
||||||
///////////
|
///////////
|
||||||
// Headers
|
// Headers
|
||||||
#include "vfw_wrap.h"
|
#include "vfw_wrap.h"
|
||||||
|
#ifdef __WINDOWS__
|
||||||
#include <vfw.h>
|
#include <vfw.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/////////////////////
|
/////////////////////
|
||||||
// Get keyframe list
|
// Get keyframe list
|
||||||
wxArrayInt VFWWrapper::GetKeyFrames(wxString filename) {
|
wxArrayInt VFWWrapper::GetKeyFrames(wxString filename) {
|
||||||
wxArrayInt frames;
|
wxArrayInt frames;
|
||||||
char buffer[512];
|
|
||||||
strcpy(buffer,filename.mb_str(wxConvLocal));
|
|
||||||
|
|
||||||
|
#ifdef __WINDOWS__
|
||||||
// Init vfw
|
// Init vfw
|
||||||
AVIFileInit();
|
AVIFileInit();
|
||||||
|
|
||||||
|
@ -85,6 +86,7 @@ wxArrayInt VFWWrapper::GetKeyFrames(wxString filename) {
|
||||||
// Clean up
|
// Clean up
|
||||||
AVIFileRelease(pfile);
|
AVIFileRelease(pfile);
|
||||||
AVIFileExit();
|
AVIFileExit();
|
||||||
|
#endif
|
||||||
|
|
||||||
return frames;
|
return frames;
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,9 +44,7 @@
|
||||||
#include "ass_dialogue.h"
|
#include "ass_dialogue.h"
|
||||||
#include "subs_grid.h"
|
#include "subs_grid.h"
|
||||||
#include "vfw_wrap.h"
|
#include "vfw_wrap.h"
|
||||||
#if 0
|
|
||||||
#include "mkv_wrap.h"
|
#include "mkv_wrap.h"
|
||||||
#endif
|
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "subs_edit_box.h"
|
#include "subs_edit_box.h"
|
||||||
#include "audio_display.h"
|
#include "audio_display.h"
|
||||||
|
@ -146,6 +144,7 @@ void VideoDisplay::UpdateSize() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///////////////////////
|
///////////////////////
|
||||||
// Sets video filename
|
// Sets video filename
|
||||||
void VideoDisplay::SetVideo(const wxString &filename) {
|
void VideoDisplay::SetVideo(const wxString &filename) {
|
||||||
|
@ -170,7 +169,8 @@ void VideoDisplay::SetVideo(const wxString &filename) {
|
||||||
provider->SetDAR(GetARFromType(arType));
|
provider->SetDAR(GetARFromType(arType));
|
||||||
|
|
||||||
KeyFrames.Clear();
|
KeyFrames.Clear();
|
||||||
#if 0
|
|
||||||
|
// Why the hell was this disabled?
|
||||||
// Read extra data from file
|
// Read extra data from file
|
||||||
bool mkvOpen = MatroskaWrapper::wrapper.IsOpen();
|
bool mkvOpen = MatroskaWrapper::wrapper.IsOpen();
|
||||||
wxString ext = filename.Right(4).Lower();
|
wxString ext = filename.Right(4).Lower();
|
||||||
|
@ -192,7 +192,6 @@ void VideoDisplay::SetVideo(const wxString &filename) {
|
||||||
}
|
}
|
||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
else if (ext == _T(".avi")) KeyFrames = VFWWrapper::GetKeyFrames(filename);
|
else if (ext == _T(".avi")) KeyFrames = VFWWrapper::GetKeyFrames(filename);
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Update size
|
// Update size
|
||||||
|
@ -217,7 +216,9 @@ void VideoDisplay::SetVideo(const wxString &filename) {
|
||||||
|
|
||||||
RefreshVideo();
|
RefreshVideo();
|
||||||
UpdatePositionDisplay();
|
UpdatePositionDisplay();
|
||||||
} catch (wxString &e) {
|
}
|
||||||
|
|
||||||
|
catch (wxString &e) {
|
||||||
wxMessageBox(e,_T("Error setting video"),wxICON_ERROR | wxOK);
|
wxMessageBox(e,_T("Error setting video"),wxICON_ERROR | wxOK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue