整理代码
This commit is contained in:
commit
c7b4e178ec
364 changed files with 59691 additions and 0 deletions
54
video/core/Frontend.cpp
Normal file
54
video/core/Frontend.cpp
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
* 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()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue