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
else {
wxFileName fn(filename);
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);
}
LoadFromClip(script);
}
catch (AvisynthError &err) {

View File

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

View File

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