39 lines
1 KiB
C++
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];
|
|
}
|
|
}
|
|
}
|