Originally committed to SVN as r349.

This commit is contained in:
Rodrigo Braz Monteiro 2006-04-19 21:55:02 +00:00
parent 1b81dba892
commit 2bd558efae
3 changed files with 11 additions and 8 deletions

View file

@ -46,7 +46,7 @@
wxString GetAegisubVersionString() {
#ifdef _DEBUG
return T("v1.10 Beta (debug)");
return _T("v1.10 Beta (debug)");
#else
return _T("v1.10 Beta PRE-RELEASE");
#endif

View file

@ -40,16 +40,17 @@
///////////
// Headers
#include "vfw_wrap.h"
#ifdef __WINDOWS__
#include <vfw.h>
#endif
/////////////////////
// Get keyframe list
wxArrayInt VFWWrapper::GetKeyFrames(wxString filename) {
wxArrayInt frames;
char buffer[512];
strcpy(buffer,filename.mb_str(wxConvLocal));
#ifdef __WINDOWS__
// Init vfw
AVIFileInit();
@ -85,6 +86,7 @@ wxArrayInt VFWWrapper::GetKeyFrames(wxString filename) {
// Clean up
AVIFileRelease(pfile);
AVIFileExit();
#endif
return frames;
}

View file

@ -44,9 +44,7 @@
#include "ass_dialogue.h"
#include "subs_grid.h"
#include "vfw_wrap.h"
#if 0
#include "mkv_wrap.h"
#endif
#include "options.h"
#include "subs_edit_box.h"
#include "audio_display.h"
@ -146,6 +144,7 @@ void VideoDisplay::UpdateSize() {
}
}
///////////////////////
// Sets video filename
void VideoDisplay::SetVideo(const wxString &filename) {
@ -170,7 +169,8 @@ void VideoDisplay::SetVideo(const wxString &filename) {
provider->SetDAR(GetARFromType(arType));
KeyFrames.Clear();
#if 0
// Why the hell was this disabled?
// Read extra data from file
bool mkvOpen = MatroskaWrapper::wrapper.IsOpen();
wxString ext = filename.Right(4).Lower();
@ -192,7 +192,6 @@ void VideoDisplay::SetVideo(const wxString &filename) {
}
#ifdef __WIN32__
else if (ext == _T(".avi")) KeyFrames = VFWWrapper::GetKeyFrames(filename);
#endif
#endif
// Update size
@ -217,7 +216,9 @@ void VideoDisplay::SetVideo(const wxString &filename) {
RefreshVideo();
UpdatePositionDisplay();
} catch (wxString &e) {
}
catch (wxString &e) {
wxMessageBox(e,_T("Error setting video"),wxICON_ERROR | wxOK);
}
}