p26001-store-acs-soc-fw-app/video/core/Frontend.cpp
2026-09-28 21:33:04 +08:00

54 lines
1.1 KiB
C++

/*
*******************************************************************************
* INCLUDE
*******************************************************************************
*/
#include "Frontend.h"
#include "Logger.h"
namespace Video
{
namespace Core
{
/*
*******************************************************************************
* CLASS DEFINE
*******************************************************************************
*/
Frontend::Frontend(std::string name): _name(name)
{
}
Frontend::~Frontend()
{
}
std::string Frontend::name()
{
return _name;
}
void Frontend::notifyStatusChanged()
{
MediaInfo info;
read(info);
notifyStatusChanged(info);
}
void Frontend::notifyStatusChanged(MediaInfo& info)
{
try
{
StatusChanged.notify(this, info);
}
catch (Poco::Exception& e)
{
logger().error("%s: status changed: %s", name(), e.displayText());
}
catch (std::exception& e)
{
logger().error("%s: status changed: %s", name(), std::string(e.what()));
}
}
}
}