projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Accessor for ClosedCaptionsDialog.
[dcpomatic.git]
/
src
/
lib
/
ffmpeg_stream.cc
diff --git
a/src/lib/ffmpeg_stream.cc
b/src/lib/ffmpeg_stream.cc
index 085c78fa8427d21d1f367143bcf90d11c07bcd41..86108ce4d1ea24ab38bf5ed29634344608376e1f 100644
(file)
--- a/
src/lib/ffmpeg_stream.cc
+++ b/
src/lib/ffmpeg_stream.cc
@@
-20,13
+20,14
@@
#include "ffmpeg_stream.h"
#include "dcpomatic_assert.h"
#include "ffmpeg_stream.h"
#include "dcpomatic_assert.h"
-#include
"raw_convert.h"
+#include
<dcp/raw_convert.h>
#include <libxml++/libxml++.h>
extern "C" {
#include <libavformat/avformat.h>
}
using std::string;
#include <libxml++/libxml++.h>
extern "C" {
#include <libavformat/avformat.h>
}
using std::string;
+using dcp::raw_convert;
FFmpegStream::FFmpegStream (cxml::ConstNodePtr node)
: name (node->string_child ("Name"))
FFmpegStream::FFmpegStream (cxml::ConstNodePtr node)
: name (node->string_child ("Name"))
@@
-62,3
+63,18
@@
FFmpegStream::stream (AVFormatContext const * fc) const
DCPOMATIC_ASSERT (false);
return 0;
}
DCPOMATIC_ASSERT (false);
return 0;
}
+
+int
+FFmpegStream::index (AVFormatContext const * fc) const
+{
+ size_t i = 0;
+ while (i < fc->nb_streams) {
+ if (fc->streams[i]->id == _id) {
+ return i;
+ }
+ ++i;
+ }
+
+ DCPOMATIC_ASSERT (false);
+ return 0;
+}