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

39 lines
1 KiB
C++

/*
*******************************************************************************
* INCLUDE
*******************************************************************************
*/
#include "CodecID.h"
#include <Poco/Format.h>
namespace Video
{
namespace Core
{
/*
*******************************************************************************
* LOCAL VARIABLES
*******************************************************************************
*/
static const std::string _strings[] = {
"H264", "H265", "MJPEG",
"MP3", "AAC", "OPUS", "G711A", "G711U",
};
/*
*******************************************************************************
* FUNCTIONS
*******************************************************************************
*/
const std::string codecIDToString(const CodecID id)
{
unsigned index = (unsigned)id;
if (index >= (unsigned)CodecID::NB)
return Poco::format("UNKNOWN(%u)", index);
return _strings[index];
}
}
}