重新构建的批检仪主板程序
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
|
||||
#include "interface/codec.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Codec *codecFind(const char *name)
|
||||
{
|
||||
extern const int __start_codecdef;
|
||||
extern const int __stop_codecdef;
|
||||
codec_def *start=(codec_def *)&__start_codecdef;
|
||||
codec_def *end=(codec_def *)&__stop_codecdef;
|
||||
codec_def *item = 0;
|
||||
for (item=start;item<end;item++)
|
||||
{
|
||||
if (item != nullptr)
|
||||
{
|
||||
if (strcmp(name, item->name) == 0)
|
||||
return item->codec_get_fun();
|
||||
}
|
||||
}
|
||||
qWarning("can not find codec named '%s'", name);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user