forked from mia/Aegisub
fix compilation of the avs provider
Originally committed to SVN as r4694.
This commit is contained in:
parent
12014b944e
commit
cd810ae1c0
4 changed files with 14 additions and 12 deletions
|
@ -123,7 +123,7 @@ void MatroskaWrapper::Close() {
|
||||||
file = NULL;
|
file = NULL;
|
||||||
delete input;
|
delete input;
|
||||||
}
|
}
|
||||||
keyFrames.Clear();
|
keyFrames.clear();
|
||||||
timecodes.clear();
|
timecodes.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@ void MatroskaWrapper::Close() {
|
||||||
/// @brief Return keyframes
|
/// @brief Return keyframes
|
||||||
/// @return
|
/// @return
|
||||||
///
|
///
|
||||||
wxArrayInt MatroskaWrapper::GetKeyFrames() {
|
std::vector<int> MatroskaWrapper::GetKeyFrames() {
|
||||||
return keyFrames;
|
return keyFrames;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ bool operator < (MkvFrame &t1, MkvFrame &t2) {
|
||||||
///
|
///
|
||||||
void MatroskaWrapper::Parse() {
|
void MatroskaWrapper::Parse() {
|
||||||
// Clear keyframes and timecodes
|
// Clear keyframes and timecodes
|
||||||
keyFrames.Clear();
|
keyFrames.clear();
|
||||||
bytePos.Clear();
|
bytePos.Clear();
|
||||||
timecodes.clear();
|
timecodes.clear();
|
||||||
frames.clear();
|
frames.clear();
|
||||||
|
@ -230,7 +230,7 @@ void MatroskaWrapper::Parse() {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (std::list<MkvFrame>::iterator cur=frames.begin();cur!=frames.end();cur++) {
|
for (std::list<MkvFrame>::iterator cur=frames.begin();cur!=frames.end();cur++) {
|
||||||
curFrame = *cur;
|
curFrame = *cur;
|
||||||
if (curFrame.isKey) keyFrames.Add(i);
|
if (curFrame.isKey) keyFrames.push_back(i);
|
||||||
bytePos.Add(curFrame.filePos);
|
bytePos.Add(curFrame.filePos);
|
||||||
timecodes.push_back(curFrame.time);
|
timecodes.push_back(curFrame.time);
|
||||||
i++;
|
i++;
|
||||||
|
@ -243,7 +243,7 @@ void MatroskaWrapper::Parse() {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (std::list<MkvFrame>::iterator cur=frames.begin();cur!=frames.end();cur++) {
|
for (std::list<MkvFrame>::iterator cur=frames.begin();cur!=frames.end();cur++) {
|
||||||
curFrame = *cur;
|
curFrame = *cur;
|
||||||
if (curFrame.isKey) keyFrames.Add(i);
|
if (curFrame.isKey) keyFrames.push_back(i);
|
||||||
bytePos.Add(curFrame.filePos);
|
bytePos.Add(curFrame.filePos);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,7 +117,7 @@ class MatroskaWrapper {
|
||||||
private:
|
private:
|
||||||
|
|
||||||
/// DOCME
|
/// DOCME
|
||||||
wxArrayInt keyFrames;
|
std::vector<int> keyFrames;
|
||||||
|
|
||||||
/// DOCME
|
/// DOCME
|
||||||
std::vector<double> timecodes;
|
std::vector<double> timecodes;
|
||||||
|
@ -162,7 +162,7 @@ public:
|
||||||
/// @return
|
/// @return
|
||||||
///
|
///
|
||||||
unsigned int GetFrameCount() { return timecodes.size(); }
|
unsigned int GetFrameCount() { return timecodes.size(); }
|
||||||
wxArrayInt GetKeyFrames();
|
std::vector<int> GetKeyFrames();
|
||||||
void GetSubtitles(AssFile *target);
|
void GetSubtitles(AssFile *target);
|
||||||
static bool HasSubtitles(wxString const& filename);
|
static bool HasSubtitles(wxString const& filename);
|
||||||
|
|
||||||
|
|
|
@ -47,8 +47,8 @@
|
||||||
/// @brief Get keyframe list
|
/// @brief Get keyframe list
|
||||||
/// @param filename
|
/// @param filename
|
||||||
///
|
///
|
||||||
wxArrayInt VFWWrapper::GetKeyFrames(wxString filename) {
|
std::vector<int> VFWWrapper::GetKeyFrames(wxString filename) {
|
||||||
wxArrayInt frames;
|
std::vector<int> frames;
|
||||||
|
|
||||||
#ifdef __WINDOWS__
|
#ifdef __WINDOWS__
|
||||||
// Init vfw
|
// Init vfw
|
||||||
|
@ -106,7 +106,7 @@ wxArrayInt VFWWrapper::GetKeyFrames(wxString filename) {
|
||||||
// Loop through stream
|
// Loop through stream
|
||||||
for (size_t i=0;i<frame_c;i++) {
|
for (size_t i=0;i<frame_c;i++) {
|
||||||
if (AVIStreamIsKeyFrame(ppavi,(int)i)) {
|
if (AVIStreamIsKeyFrame(ppavi,(int)i)) {
|
||||||
frames.Add(i);
|
frames.push_back(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,9 @@
|
||||||
|
|
||||||
///////////
|
///////////
|
||||||
// Headers
|
// Headers
|
||||||
|
#ifndef AGI_PRE
|
||||||
|
#include <vector>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/// DOCME
|
/// DOCME
|
||||||
|
@ -49,7 +51,7 @@
|
||||||
/// DOCME
|
/// DOCME
|
||||||
class VFWWrapper {
|
class VFWWrapper {
|
||||||
public:
|
public:
|
||||||
static wxArrayInt GetKeyFrames(wxString filename);
|
static std::vector<int> GetKeyFrames(wxString filename);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue