forked from mia/Aegisub
disable MKV hacks (useless for now anyway)
Originally committed to SVN as r332.
This commit is contained in:
parent
3aaf515950
commit
366a248a7e
|
@ -44,7 +44,9 @@
|
||||||
#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"
|
||||||
|
@ -167,6 +169,8 @@ void VideoDisplay::SetVideo(const wxString &filename) {
|
||||||
provider->SetZoom(zoomValue);
|
provider->SetZoom(zoomValue);
|
||||||
provider->SetDAR(GetARFromType(arType));
|
provider->SetDAR(GetARFromType(arType));
|
||||||
|
|
||||||
|
KeyFrames.Clear();
|
||||||
|
#if 0
|
||||||
// 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();
|
||||||
|
@ -188,6 +192,7 @@ 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
|
||||||
|
|
|
@ -42,7 +42,9 @@
|
||||||
#include "video_provider_lavc.h"
|
#include "video_provider_lavc.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "vfr.h"
|
#include "vfr.h"
|
||||||
|
#if 0
|
||||||
#include "mkv_wrap.h"
|
#include "mkv_wrap.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
///////////////
|
///////////////
|
||||||
|
@ -110,6 +112,8 @@ void LAVCVideoProvider::LoadVideo(wxString filename) {
|
||||||
if (result < 0) throw _T("Failed to open video decoder");
|
if (result < 0) throw _T("Failed to open video decoder");
|
||||||
|
|
||||||
// Check length
|
// Check length
|
||||||
|
length = stream->duration;
|
||||||
|
#if 0
|
||||||
isMkv = false;
|
isMkv = false;
|
||||||
length = stream->duration;
|
length = stream->duration;
|
||||||
if (length <= 0) {
|
if (length <= 0) {
|
||||||
|
@ -122,6 +126,7 @@ void LAVCVideoProvider::LoadVideo(wxString filename) {
|
||||||
}
|
}
|
||||||
if (length <= 0) throw _T("Returned invalid stream length");
|
if (length <= 0) throw _T("Returned invalid stream length");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Set size
|
// Set size
|
||||||
dar = double(GetSourceWidth()) / GetSourceHeight();
|
dar = double(GetSourceWidth()) / GetSourceHeight();
|
||||||
|
@ -146,7 +151,9 @@ void LAVCVideoProvider::LoadVideo(wxString filename) {
|
||||||
// Close video
|
// Close video
|
||||||
void LAVCVideoProvider::Close() {
|
void LAVCVideoProvider::Close() {
|
||||||
// Close mkv
|
// Close mkv
|
||||||
|
#if 0
|
||||||
if (isMkv) mkv.Close();
|
if (isMkv) mkv.Close();
|
||||||
|
#endif
|
||||||
|
|
||||||
// Clean buffers
|
// Clean buffers
|
||||||
if (buffer1) delete buffer1;
|
if (buffer1) delete buffer1;
|
||||||
|
@ -312,6 +319,7 @@ wxBitmap LAVCVideoProvider::GetFrame(int n) {
|
||||||
__int64 seekTo;
|
__int64 seekTo;
|
||||||
int result = 0;
|
int result = 0;
|
||||||
|
|
||||||
|
#if 0
|
||||||
// Get time to seek to
|
// Get time to seek to
|
||||||
if (isMkv) {
|
if (isMkv) {
|
||||||
//__int64 base = AV_TIME_BASE;
|
//__int64 base = AV_TIME_BASE;
|
||||||
|
@ -346,6 +354,7 @@ wxBitmap LAVCVideoProvider::GetFrame(int n) {
|
||||||
|
|
||||||
// Constant frame rate
|
// Constant frame rate
|
||||||
else {
|
else {
|
||||||
|
#endif
|
||||||
seekTo = n;
|
seekTo = n;
|
||||||
result = av_seek_frame(lavcfile->fctx,vidStream,seekTo,AVSEEK_FLAG_BACKWARD);
|
result = av_seek_frame(lavcfile->fctx,vidStream,seekTo,AVSEEK_FLAG_BACKWARD);
|
||||||
|
|
||||||
|
@ -364,7 +373,9 @@ wxBitmap LAVCVideoProvider::GetFrame(int n) {
|
||||||
else {
|
else {
|
||||||
GetNextFrame();
|
GetNextFrame();
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bitmap
|
// Bitmap
|
||||||
|
|
Loading…
Reference in a new issue