Initial community commit
This commit is contained in:
parent
537bcbc862
commit
fc06254474
16440 changed files with 4239995 additions and 2 deletions
27
Src/f263/lib.cpp
Normal file
27
Src/f263/lib.cpp
Normal file
|
@ -0,0 +1,27 @@
|
|||
#include "Decoder.h"
|
||||
#include "lib.h"
|
||||
|
||||
void *F263_CreateDecoder()
|
||||
{
|
||||
return new Decoder;
|
||||
}
|
||||
|
||||
int F263_DecodeFrame(void *context, void *frameData, size_t frameSize, YV12_PLANES *yv12, int *width, int *height, int *keyframe)
|
||||
{
|
||||
if (frameSize > 0x1FFFFFFF)
|
||||
return F263_ERROR_TOO_MUCH_DATA;
|
||||
|
||||
if (!frameData)
|
||||
return F263_ERROR_NO_DATA;
|
||||
|
||||
Decoder *decoder = (Decoder *)context;
|
||||
decoder->buffer.data = (uint8_t *)frameData;
|
||||
decoder->buffer.numBits = (uint32_t)(frameSize*8);
|
||||
return decoder->DecodeFrame(yv12, width, height, keyframe);
|
||||
}
|
||||
|
||||
void F263_DestroyDecoder(void *context)
|
||||
{
|
||||
Decoder *decoder = (Decoder *)context;
|
||||
delete decoder;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue