#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;
+using dcp::raw_convert;
FFmpegStream::FFmpegStream (cxml::ConstNodePtr node)
: name (node->string_child ("Name"))
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;
+}