-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Hello,
I have compiled ffmpeg for nacl and trying to use hardware docoding with RTSP stream.
I have used below flags included while compiling ffmpeg.
--enable-hwaccel=h264 & --enable-hwaccels
and followed hw_decode.cc example given in ffmpeg/doc/example.
I always get NULL return value avcodec_get_hw_config on TV.
const AVCodecHWConfig *config = avcodec_get_hw_config(codec, i);
Do i need any other library for enabling hw decoding.
Below is code snippet..
//==============================================
enum AVHWDeviceType type;
type = av_hwdevice_find_type_by_name("vaapi"); //Tried this step with vaapi, vdpau both
for (auto i = 0;; i++) {
const AVCodecHWConfig *config = avcodec_get_hw_config(codec, i); //This step fails.
if (!config) {
return NULL;
}
if (config->methods & AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX &&
config->device_type == type) {
hw_pix_fmt = config->pix_fmt;
break;
}
}
//==============================================
Any help is highly appreciated.
Thanks,
Metadata
Metadata
Assignees
Labels
No labels