diff --git a/src/output/output.cpp b/src/output/output.cpp index 9c039cd2..052e4fb8 100644 --- a/src/output/output.cpp +++ b/src/output/output.cpp @@ -226,6 +226,7 @@ namespace Mist { } return false; } + /// Connects or reconnects to the stream. /// Assumes streamName class member has been set already. /// Will start input if not currently active, calls onFail() if this does not succeed. diff --git a/src/output/output_http_internal.cpp b/src/output/output_http_internal.cpp index de46b06b..6f8fc107 100644 --- a/src/output/output_http_internal.cpp +++ b/src/output/output_http_internal.cpp @@ -38,6 +38,11 @@ namespace Mist { } Output::onFail(); } + + /// We assume it's ready to play if there is at least one track available + bool OutHTTP::isReadyForPlay() { + return myMeta.tracks.size(); + } void OutHTTP::init(Util::Config * cfg){ HTTPOutput::init(cfg); diff --git a/src/output/output_http_internal.h b/src/output/output_http_internal.h index 4f025afa..479d37a4 100644 --- a/src/output/output_http_internal.h +++ b/src/output/output_http_internal.h @@ -10,6 +10,7 @@ namespace Mist { static bool listenMode(); virtual void onFail(); void onHTTP(); + bool isReadyForPlay(); }; }