diff --git a/app/project/item/footage/stream.cpp b/app/project/item/footage/stream.cpp index eb364d1f0..3ce60ecc6 100644 --- a/app/project/item/footage/stream.cpp +++ b/app/project/item/footage/stream.cpp @@ -20,6 +20,7 @@ #include "stream.h" +#include "footage.h" #include "ui/icons/icons.h" Stream::Stream() : @@ -114,3 +115,14 @@ QIcon Stream::IconFromType(const Stream::Type &type) return QIcon(); } + +StreamID Stream::ToID() const +{ + return StreamID(footage_->filename(), index_); +} + +StreamID::StreamID(const QString &filename, const int &stream_index) : + filename_(filename), + stream_index_(stream_index) +{ +} diff --git a/app/project/item/footage/stream.h b/app/project/item/footage/stream.h index 2fcca5075..80e555133 100644 --- a/app/project/item/footage/stream.h +++ b/app/project/item/footage/stream.h @@ -29,6 +29,17 @@ class Footage; +class StreamID { +public: + StreamID(const QString& filename, const int& stream_index); + +private: + QString filename_; + + int stream_index_; + +}; + /** * @brief A base class for keeping metadata about a media stream. * @@ -84,6 +95,8 @@ public: static QIcon IconFromType(const Type& type); + StreamID ToID() const; + private: Footage* footage_;