FFmpegSource2 beta 6, see ffms2.html for change details

Originally committed to SVN as r2770.
This commit is contained in:
Karl Blomster 2009-04-06 19:14:55 +00:00
parent 1d69da533c
commit 0e299f9146
23 changed files with 38 additions and 34 deletions

View File

@ -1,4 +1,4 @@
// Copyright (c) 2007-2008 Fredrik Mellbin
// Copyright (c) 2007-2009 Fredrik Mellbin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal

View File

@ -1,4 +1,4 @@
// Copyright (c) 2007-2008 Fredrik Mellbin
// Copyright (c) 2007-2009 Fredrik Mellbin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal

View File

@ -1,4 +1,4 @@
// Copyright (c) 2007-2008 Fredrik Mellbin
// Copyright (c) 2007-2009 Fredrik Mellbin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal

View File

@ -1,4 +1,4 @@
// Copyright (c) 2007-2008 Fredrik Mellbin
// Copyright (c) 2007-2009 Fredrik Mellbin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal

View File

@ -1,4 +1,4 @@
// Copyright (c) 2007-2008 Fredrik Mellbin
// Copyright (c) 2007-2009 Fredrik Mellbin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal

View File

@ -1,4 +1,4 @@
// Copyright (c) 2007-2008 Fredrik Mellbin
// Copyright (c) 2007-2009 Fredrik Mellbin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal

View File

@ -1,4 +1,4 @@
// Copyright (c) 2007-2008 Fredrik Mellbin
// Copyright (c) 2007-2009 Fredrik Mellbin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@ -114,8 +114,8 @@ struct AVFrameLite {
};
struct TrackTimeBase {
int Num;
int Den;
int64_t Num;
int64_t Den;
};
class FrameInfo {

View File

@ -7,7 +7,7 @@ FFmpegSource2 Documentation
<body>
<h1>FFmpegSource2 Documentation</h1>
<p>
Opens files using ffmpeg and nothing else. May be frame accurate on good days. The source is MIT licensed and can be obtained from https://spaceboyz.net/svn/aegisub/trunk/FFmpegSource2. The precompiled binary is GPL licensed. If you are religious you may consider this the second coming.
Opens files using ffmpeg and nothing else. May be frame accurate on good days. The source is MIT licensed and can be obtained from "http://svn.aegisub.net/trunk/aegisub/FFmpegSource2/". The precompiled binary is GPL licensed. If you are religious you may consider this the second coming.
</p>
<h2>Compatibility - Video</h2>
@ -226,6 +226,11 @@ Note that --enable-w32threads is required for multithreaded decoding to work.
<h2>Changes</h2>
<ul>
<li>2.00 beta 6<ul>
<li>Negative timecodes and other bugs caused by an integer overflow fixed</li>
<li>Updated FFmpeg to rev X</li>
</ul></li>
<li>2.00 beta 5<ul>
<li>FFMSIndex should now print the progress properly when another application reads its output</li>
<li>Added missing variables and explanations to the manual</li>
@ -234,7 +239,6 @@ Note that --enable-w32threads is required for multithreaded decoding to work.
<li>Updated FFmpeg to rev 18249</li>
</ul></li>
<li>2.00 beta 4<ul>
<li>Added the function FFNoLog which suppresses all messages from ffmpeg</li>
<li>Experimental new TS parsing using Haali's splitter (with bugs)</li>

View File

@ -1,4 +1,4 @@
// Copyright (c) 2008 Karl Blomster
// Copyright (c) 2008-2009 Karl Blomster
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal

View File

@ -1,4 +1,4 @@
// Copyright (c) 2007-2008 Fredrik Mellbin
// Copyright (c) 2007-2009 Fredrik Mellbin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal

View File

@ -1,4 +1,4 @@
// Copyright (c) 2007-2008 Fredrik Mellbin
// Copyright (c) 2007-2009 Fredrik Mellbin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal

View File

@ -1,4 +1,4 @@
// Copyright (c) 2007-2008 Fredrik Mellbin
// Copyright (c) 2007-2009 Fredrik Mellbin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal

View File

@ -1,4 +1,4 @@
// Copyright (c) 2007-2008 Fredrik Mellbin
// Copyright (c) 2007-2009 Fredrik Mellbin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal

View File

@ -1,4 +1,4 @@
// Copyright (c) 2007-2008 Fredrik Mellbin
// Copyright (c) 2007-2009 Fredrik Mellbin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal

View File

@ -1,4 +1,4 @@
// Copyright (c) 2007-2008 Fredrik Mellbin
// Copyright (c) 2007-2009 Fredrik Mellbin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal

View File

@ -1,4 +1,4 @@
// Copyright (c) 2007-2008 Fredrik Mellbin
// Copyright (c) 2007-2009 Fredrik Mellbin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@ -188,9 +188,9 @@ int WriteIndex(const char *IndexFile, FrameIndex *TrackIndices, char *ErrorMsg,
for (unsigned int i = 0; i < IH.Tracks; i++) {
int TT = (*TrackIndices)[i].TT;
Index.write(reinterpret_cast<char *>(&TT), sizeof(TT));
int Num = (*TrackIndices)[i].TB.Num;
int64_t Num = (*TrackIndices)[i].TB.Num;
Index.write(reinterpret_cast<char *>(&Num), sizeof(Num));
int Den = (*TrackIndices)[i].TB.Den;
int64_t Den = (*TrackIndices)[i].TB.Den;
Index.write(reinterpret_cast<char *>(&Den), sizeof(Den));
size_t Frames = (*TrackIndices)[i].size();
Index.write(reinterpret_cast<char *>(&Frames), sizeof(Frames));
@ -610,7 +610,7 @@ FrameIndex *MakeIndex(const char *SourceFile, int IndexMask, int DumpMask, const
TrackIndices->Decoder = 0;
for (unsigned int i = 0; i < FormatContext->nb_streams; i++)
TrackIndices->push_back(FrameInfoVector(FormatContext->streams[i]->time_base.num * 1000,
TrackIndices->push_back(FrameInfoVector((int64_t)FormatContext->streams[i]->time_base.num * 1000,
FormatContext->streams[i]->time_base.den,
FormatContext->streams[i]->codec->codec_type));
@ -714,9 +714,9 @@ FrameIndex *ReadIndex(const char *IndexFile, char *ErrorMsg, unsigned MsgSize) {
// Read how many records belong to the current stream
int TT;
Index.read(reinterpret_cast<char *>(&TT), sizeof(TT));
int Num;
int64_t Num;
Index.read(reinterpret_cast<char *>(&Num), sizeof(Num));
int Den;
int64_t Den;
Index.read(reinterpret_cast<char *>(&Den), sizeof(Den));
size_t Frames;
Index.read(reinterpret_cast<char *>(&Frames), sizeof(Frames));
@ -789,7 +789,7 @@ FrameInfoVector::FrameInfoVector() {
this->TB.Den = 0;
}
FrameInfoVector::FrameInfoVector(int Num, int Den, int TT) {
FrameInfoVector::FrameInfoVector(int64_t Num, int64_t Den, int TT) {
this->TT = TT;
this->TB.Num = Num;
this->TB.Den = Den;

View File

@ -1,4 +1,4 @@
// Copyright (c) 2007-2008 Fredrik Mellbin
// Copyright (c) 2007-2009 Fredrik Mellbin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@ -25,7 +25,7 @@
#include "utils.h"
#include "ffms.h"
#define INDEXVERSION 12
#define INDEXVERSION 15
#define INDEXID 0x53920873
struct IndexHeader {
@ -46,7 +46,7 @@ public:
int WriteTimecodes(const char *TimecodeFile, char *ErrorMsg, unsigned MsgSize);
FrameInfoVector();
FrameInfoVector(int Num, int Den, int TT);
FrameInfoVector(int64_t Num, int64_t Den, int TT);
};
class FrameIndex : public std::vector<FrameInfoVector> {

View File

@ -1,4 +1,4 @@
// Copyright (c) 2007-2008 Fredrik Mellbin
// Copyright (c) 2007-2009 Fredrik Mellbin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal

View File

@ -1,4 +1,4 @@
// Copyright (c) 2007-2008 Fredrik Mellbin
// Copyright (c) 2007-2009 Fredrik Mellbin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal

View File

@ -1,4 +1,4 @@
// Copyright (c) 2007-2008 Fredrik Mellbin
// Copyright (c) 2007-2009 Fredrik Mellbin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal

View File

@ -1,4 +1,4 @@
// Copyright (c) 2007-2008 Fredrik Mellbin
// Copyright (c) 2007-2009 Fredrik Mellbin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal

View File

@ -1,4 +1,4 @@
// Copyright (c) 2007-2008 Fredrik Mellbin
// Copyright (c) 2007-2009 Fredrik Mellbin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal

View File

@ -1,4 +1,4 @@
// Copyright (c) 2007-2008 Fredrik Mellbin
// Copyright (c) 2007-2009 Fredrik Mellbin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal