win-dshow, obs-ffmpeg: Add hardware decoding support

Fixes hardware decoding support and updates it to FFmpeg 4.0.
This commit is contained in:
jp9000
2019-07-27 21:44:30 -07:00
parent baddca2536
commit a3fface27f
5 changed files with 204 additions and 57 deletions

View File

@@ -40,13 +40,16 @@ struct ffmpeg_decode {
AVCodecContext *decoder;
AVCodec *codec;
AVFrame *hw_frame;
AVFrame *frame;
bool hw;
uint8_t *packet_buffer;
size_t packet_size;
};
extern int ffmpeg_decode_init(struct ffmpeg_decode *decode, enum AVCodecID id);
extern int ffmpeg_decode_init(struct ffmpeg_decode *decode, enum AVCodecID id,
bool use_hw);
extern void ffmpeg_decode_free(struct ffmpeg_decode *decode);
extern bool ffmpeg_decode_audio(struct ffmpeg_decode *decode, uint8_t *data,