mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-12 01:40:04 +01:00
lavc: Add codec metadata to indicate hardware support
This commit is contained in:
@@ -45,6 +45,7 @@
|
||||
#include "libavutil/thread.h"
|
||||
#include "avcodec.h"
|
||||
#include "decode.h"
|
||||
#include "hwaccel.h"
|
||||
#include "libavutil/opt.h"
|
||||
#include "me_cmp.h"
|
||||
#include "mpegvideo.h"
|
||||
@@ -1886,6 +1887,17 @@ int ff_match_2uint16(const uint16_t(*tab)[2], int size, int a, int b)
|
||||
return i;
|
||||
}
|
||||
|
||||
const AVCodecHWConfig *avcodec_get_hw_config(const AVCodec *codec, int index)
|
||||
{
|
||||
int i;
|
||||
if (!codec->hw_configs || index < 0)
|
||||
return NULL;
|
||||
for (i = 0; i <= index; i++)
|
||||
if (!codec->hw_configs[i])
|
||||
return NULL;
|
||||
return &codec->hw_configs[index]->public;
|
||||
}
|
||||
|
||||
static AVHWAccel *first_hwaccel = NULL;
|
||||
static AVHWAccel **last_hwaccel = &first_hwaccel;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user