#include <stdio.h>
#include <signal.h>
-#if HAVE_PTHREADS
-#include <pthread.h>
-#endif
-
#include "cmdutils.h"
#include "libavformat/avformat.h"
#include "libavutil/hwcontext.h"
#include "libavutil/pixfmt.h"
#include "libavutil/rational.h"
+#include "libavutil/thread.h"
#include "libavutil/threadmessage.h"
#include "libswresample/swresample.h"
enum HWAccelID {
HWACCEL_NONE = 0,
HWACCEL_AUTO,
- HWACCEL_VDPAU,
- HWACCEL_DXVA2,
+ HWACCEL_GENERIC,
HWACCEL_VIDEOTOOLBOX,
HWACCEL_QSV,
- HWACCEL_VAAPI,
HWACCEL_CUVID,
- HWACCEL_D3D11VA,
- HWACCEL_NVDEC,
};
typedef struct HWAccel {
int (*init)(AVCodecContext *s);
enum HWAccelID id;
enum AVPixelFormat pix_fmt;
- enum AVHWDeviceType device_type;
} HWAccel;
typedef struct HWDevice {
/* hwaccel options */
enum HWAccelID hwaccel_id;
+ enum AVHWDeviceType hwaccel_device_type;
char *hwaccel_device;
enum AVPixelFormat hwaccel_output_format;
/* hwaccel context */
- enum HWAccelID active_hwaccel_id;
void *hwaccel_ctx;
void (*hwaccel_uninit)(AVCodecContext *s);
int (*hwaccel_get_buffer)(AVCodecContext *s, AVFrame *frame, int flags);
int rate_emu;
int accurate_seek;
-#if HAVE_PTHREADS
+#if HAVE_THREADS
AVThreadMessageQueue *in_thread_queue;
pthread_t thread; /* thread reading from this file */
int non_blocking; /* reading packets from the thread should not block */