Unified notification of source creation with Source info

New virtual function source::info used for notification after adding source
This commit is contained in:
Bruno Herbelin
2021-12-05 18:32:23 +01:00
parent bf3fc61ef7
commit 4675be7e2a
15 changed files with 111 additions and 18 deletions

View File

@@ -46,7 +46,6 @@ MediaSource::~MediaSource()
void MediaSource::setPath(const std::string &p)
{
path_ = p;
Log::Notify("Creating Source with media '%s'", path_.c_str());
// open gstreamer
mediaplayer_->open(path_);
@@ -74,6 +73,11 @@ glm::ivec2 MediaSource::icon() const
return glm::ivec2(18, 13);
}
std::string MediaSource::info() const
{
return std::string("media '") + path_ + "'";
}
bool MediaSource::failed() const
{
return mediaplayer_->failed();