use IDs for multiple decoders

This commit is contained in:
itsmattkc
2019-08-08 15:38:58 +10:00
parent 8730da4b43
commit f3b60369aa
9 changed files with 203 additions and 53 deletions
+10
View File
@@ -101,6 +101,16 @@ Item::Type Footage::type() const
return kFootage;
}
const QString &Footage::decoder()
{
return decoder_;
}
void Footage::set_decoder(const QString &id)
{
decoder_ = id;
}
void Footage::ClearStreams()
{
if (streams_.empty()) {
+19
View File
@@ -185,6 +185,20 @@ public:
*/
virtual Type type() const override;
/**
* @brief Get the Decoder ID set when this Footage was probed
*
* @return
*
* A decoder ID
*/
const QString& decoder();
/**
* @brief Used by decoders when they Probe to attach itself to this Footage
*/
void set_decoder(const QString& id);
private:
/**
* @brief Internal function to delete all Stream children and empty the array
@@ -236,6 +250,11 @@ private:
*/
Status status_;
/**
* @brief Internal attached decoder ID
*/
QString decoder_;
};
using FootagePtr = std::shared_ptr<Footage>;