You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
The part of the code that should get the config that is used to get
the constraints of the GPU is now inside a #if . One can enable it by setting the constant in line 33 of FFmpegReader.cpp to 1. Do not enable that part unless you want to fid a way that works as it also needs the package libva-dev (Ubuntu) to be installed.
This commit is contained in:
@@ -30,13 +30,15 @@
|
||||
|
||||
#include "../include/FFmpegReader.h"
|
||||
|
||||
#define PRAYFORAWONDER 0
|
||||
|
||||
#if IS_FFMPEG_3_2
|
||||
//#include "libavutil/hwcontext_vaapi.h"
|
||||
|
||||
|
||||
#define MAX_SUPPORTED_WIDTH 1950
|
||||
#define MAX_SUPPORTED_HEIGHT 1100
|
||||
/*
|
||||
|
||||
#if PRAYFORAWONDER
|
||||
#include "libavutil/hwcontext_vaapi.h"
|
||||
|
||||
typedef struct VAAPIDecodeContext {
|
||||
VAProfile va_profile;
|
||||
VAEntrypoint va_entrypoint;
|
||||
@@ -60,7 +62,8 @@ typedef struct VAAPIDecodeContext {
|
||||
enum AVPixelFormat surface_format;
|
||||
int surface_count;
|
||||
} VAAPIDecodeContext;
|
||||
*/
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -313,7 +316,9 @@ void FFmpegReader::Open()
|
||||
void *hwconfig = NULL;
|
||||
hwconfig = av_hwdevice_hwconfig_alloc(hw_device_ctx);
|
||||
// NOT WORKING needs va_config !
|
||||
// ((AVVAAPIHWConfig *)hwconfig)->config_id = ((VAAPIDecodeContext *)(pCodecCtx->priv_data))->va_config;
|
||||
#if PRAYFORAWONDER
|
||||
((AVVAAPIHWConfig *)hwconfig)->config_id = ((VAAPIDecodeContext *)(pCodecCtx->priv_data))->va_config;
|
||||
#endif
|
||||
constraints = av_hwdevice_get_hwframe_constraints(hw_device_ctx,hwconfig);
|
||||
if (constraints) {
|
||||
if (pCodecCtx->coded_width < constraints->min_width ||
|
||||
|
||||
Reference in New Issue
Block a user