Originally committed to SVN as r1442.
This commit is contained in:
Rodrigo Braz Monteiro 2007-07-27 05:25:51 +00:00
parent 7a19d18942
commit 00dfc86bcc
3 changed files with 14 additions and 3 deletions

View File

@ -128,13 +128,13 @@ void AvisynthAudioProvider::OpenAVSAudio() {
// Use DirectShowSource // Use DirectShowSource
else { else {
wxFileName fn(filename);
const char * argnames[3] = { 0, "video", "audio" }; const char * argnames[3] = { 0, "video", "audio" };
AVSValue args[3] = { env->SaveString(filename.mb_str(wxConvLocal)), false, true }; AVSValue args[3] = { env->SaveString(fn.GetShortPath().mb_str(wxConvLocal)), false, true };
script = env->Invoke("DirectShowSource", AVSValue(args,3),argnames); script = env->Invoke("DirectShowSource", AVSValue(args,3),argnames);
} }
LoadFromClip(script); LoadFromClip(script);
} }
catch (AvisynthError &err) { catch (AvisynthError &err) {

View File

@ -37,6 +37,7 @@
/////////// ///////////
// Headers // Headers
#include <wx/wxprec.h> #include <wx/wxprec.h>
#include <wx/filename.h>
#include "dialog_detached_video.h" #include "dialog_detached_video.h"
#include "video_box.h" #include "video_box.h"
#include "video_context.h" #include "video_context.h"
@ -48,11 +49,15 @@
// Constructor // Constructor
DialogDetachedVideo::DialogDetachedVideo(FrameMain *par) DialogDetachedVideo::DialogDetachedVideo(FrameMain *par)
//: wxFrame(par,-1,_("Detached Video")) //: wxFrame(par,-1,_("Detached Video"))
: wxDialog(par,-1,_("Detached Video"),wxDefaultPosition,wxSize(400,300),wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMAXIMIZE_BOX | wxMINIMIZE_BOX | wxWANTS_CHARS) : wxDialog(par,-1,_T("Detached Video"),wxDefaultPosition,wxSize(400,300),wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMAXIMIZE_BOX | wxMINIMIZE_BOX | wxWANTS_CHARS)
{ {
// Set parent // Set parent
parent = par; parent = par;
// Set title
wxFileName fn(VideoContext::Get()->videoName);
SetTitle(wxString::Format(_("Video: %s"),fn.GetFullName()));
// Set a background panel // Set a background panel
wxPanel *panel = new wxPanel(this,-1,wxDefaultPosition,wxDefaultSize,wxTAB_TRAVERSAL | wxCLIP_CHILDREN); wxPanel *panel = new wxPanel(this,-1,wxDefaultPosition,wxDefaultSize,wxTAB_TRAVERSAL | wxCLIP_CHILDREN);

View File

@ -35,6 +35,7 @@
#include <wx/wxprec.h> #include <wx/wxprec.h>
#include <wx/filename.h>
#include "lavc_file.h" #include "lavc_file.h"
LAVCFile::Initializer LAVCFile::init; LAVCFile::Initializer LAVCFile::init;
@ -49,6 +50,11 @@ LAVCFile::LAVCFile(wxString filename)
int result = 0; int result = 0;
fctx = NULL; fctx = NULL;
#ifdef WIN32
wxFileName fn(filename);
filename = fn.GetShortPath();
#endif
result = av_open_input_file(&fctx,filename.mb_str(wxConvLocal),NULL,0,NULL); result = av_open_input_file(&fctx,filename.mb_str(wxConvLocal),NULL,0,NULL);
if (result != 0) throw _T("Failed opening file."); if (result != 0) throw _T("Failed opening file.");