(Maybe) fixed lavc after previous commit.

Originally committed to SVN as r1959.
This commit is contained in:
Rodrigo Braz Monteiro 2008-03-07 21:27:36 +00:00
parent 6b12f54d72
commit abbab149a6
4 changed files with 11 additions and 7 deletions

View file

@ -47,10 +47,11 @@ LAVCFile::Initializer::Initializer()
av_register_all();
}
LAVCFile::LAVCFile(wxString filename)
LAVCFile::LAVCFile(Aegisub::String _filename)
{
int result = 0;
fctx = NULL;
wxString filename = _filename.c_str();
#ifdef WIN32
wxFileName fn(filename);

View file

@ -44,12 +44,14 @@ extern "C" {
#include <ffmpeg/avcodec.h>
#include <ffmpeg/avformat.h>
}
#include "include/aegisub/aegisub.h"
class LAVCFile {
private:
unsigned refs;
LAVCFile(wxString filename);
LAVCFile(Aegisub::String filename);
~LAVCFile();
class Initializer {
@ -61,7 +63,7 @@ private:
public:
AVFormatContext *fctx;
static LAVCFile *Create(wxString filename) { return new LAVCFile(filename); }
static LAVCFile *Create(Aegisub::String filename) { return new LAVCFile(filename); }
LAVCFile *AddRef() { refs++; return this; };
void Release() { if (!--refs) delete this; };
};

View file

@ -55,7 +55,7 @@
///////////////
// Constructor
LAVCVideoProvider::LAVCVideoProvider(wxString filename,double fps) {
LAVCVideoProvider::LAVCVideoProvider(Aegisub::String filename,double fps) {
// Init variables
codecContext = NULL;
lavcfile = NULL;
@ -86,7 +86,7 @@ LAVCVideoProvider::~LAVCVideoProvider() {
//////////////
// Load video
void LAVCVideoProvider::LoadVideo(wxString filename, double fps) {
void LAVCVideoProvider::LoadVideo(Aegisub::String filename, double fps) {
// Close first
Close();

View file

@ -48,6 +48,7 @@ extern "C" {
#include <ffmpeg/swscale.h>
}
#include "include/aegisub/video_provider.h"
#include "include/aegisub/aegisub.h"
#include "mkv_wrap.h"
#include "lavc_file.h"
@ -94,7 +95,7 @@ private:
protected:
public:
LAVCVideoProvider(wxString filename, double fps);
LAVCVideoProvider(Aegisub::String filename, double fps);
~LAVCVideoProvider();
const AegiVideoFrame GetFrame(int n,int formatType);
@ -104,7 +105,7 @@ public:
int GetWidth();
int GetHeight();
double GetFPS();
wxString GetDecoderName() { return _T("FFMpeg/libavcodec"); }
Aegisub::String GetDecoderName() { return L"FFMpeg/libavcodec"; }
bool IsNativelyByFrames() { return true; }
int GetDesiredCacheSize() { return 8; }
};