*/
#include "system.h"
-#if (defined HAVE_CONFIG_H) && (!defined WIN32)
+#if (defined HAVE_CONFIG_H) && (!defined TARGET_WINDOWS)
#include "config.h"
#endif
#include "DVDVideoCodecFFmpeg.h"
#include "DVDCodecs/DVDCodecs.h"
#include "DVDCodecs/DVDCodecUtils.h"
#include "DVDVideoPPFFmpeg.h"
-#if defined(_LINUX) || defined(_WIN32)
+#if defined(TARGET_POSIX) || defined(TARGET_WINDOWS)
#include "utils/CPUInfo.h"
#endif
#include "settings/AdvancedSettings.h"
#include "boost/shared_ptr.hpp"
#include "threads/Atomics.h"
-#ifndef _LINUX
+#ifndef TARGET_POSIX
#define RINT(x) ((x) >= 0 ? ((int)((x) + 0.5)) : ((int)((x) - 0.5)))
#else
#include <math.h>
#ifdef HAVE_LIBVA
#include "VAAPI.h"
#endif
+#ifdef TARGET_DARWIN_OSX
+#include "VDA.h"
+#endif
using namespace boost;
dec->Release();
}
#endif
+
+#ifdef TARGET_DARWIN_OSX
+ if (*cur == AV_PIX_FMT_VDA_VLD && CSettings::Get().GetBool("videoplayer.usevda"))
+ {
+ VDA::CDecoder* dec = new VDA::CDecoder();
+ if(dec->Open(avctx, *cur, ctx->m_uSurfacesCount))
+ {
+ ctx->SetHardware(dec);
+ return *cur;
+ }
+ else
+ dec->Release();
+ }
+#endif
cur++;
}
return ctx->m_dllAvCodec.avcodec_default_get_format(avctx, fmt);
/* use variable in the frame */
AVRational pixel_aspect = m_pCodecContext->sample_aspect_ratio;
if (m_pBufferRef)
+#if defined(LIBAVFILTER_FROM_FFMPEG)
pixel_aspect = m_pBufferRef->video->sample_aspect_ratio;
+#else
+ pixel_aspect = m_pBufferRef->video->pixel_aspect;
+#endif
if (pixel_aspect.num == 0)
aspect_ratio = 0;