diff --git a/src/output/output.cpp b/src/output/output.cpp index 096635a5..c772a88d 100644 --- a/src/output/output.cpp +++ b/src/output/output.cpp @@ -139,6 +139,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 0fbcefe4..9ebb950d 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(); }; }