37 lines
1.1 KiB
C++
37 lines
1.1 KiB
C++
/*
|
|
*******************************************************************************
|
|
* INCLUDE
|
|
*******************************************************************************
|
|
*/
|
|
#include "BitrateControl.h"
|
|
#include <Poco/Format.h>
|
|
|
|
namespace Video
|
|
{
|
|
namespace Core
|
|
{
|
|
/*
|
|
*******************************************************************************
|
|
* LOCAL VARIABLES
|
|
*******************************************************************************
|
|
*/
|
|
static const std::string _bcStrings[] = {
|
|
"CBR", "VBR", "AVBR", "QVBR", "CVBR", "FIXQP", "QPMAP",
|
|
};
|
|
|
|
/*
|
|
*******************************************************************************
|
|
* FUNCTIONS
|
|
*******************************************************************************
|
|
*/
|
|
const std::string bitrateControlToString(BitrateControl bc)
|
|
{
|
|
unsigned index = (unsigned)bc;
|
|
|
|
if (index >= (unsigned)BitrateControl::NB)
|
|
return Poco::format("UNKNOWN(%u)", index);
|
|
|
|
return _bcStrings[index];
|
|
}
|
|
}
|
|
}
|