#pragma once
/*
* Copyright (C) 2005-2013 Team XBMC
- * http://www.xbmc.org
+ * http://xbmc.org
*
* This Program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
+ * along with XBMC; see the file COPYING. If not, see
+ * <http://www.gnu.org/licenses/>.
*
*/
virtual int64_t swr_get_delay(struct SwrContext *s, int64_t base) = 0;
virtual int swr_set_channel_mapping(struct SwrContext *s, const int *channel_map) = 0;
virtual int swr_set_matrix(struct SwrContext *s, const double *matrix, int stride) = 0;
+ virtual int swr_set_compensation(struct SwrContext *s, int sample_delta, int compensation_distance) = 0;
};
-#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN)
+#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN) || (defined USE_STATIC_FFMPEG)
// Use direct mapping
class DllSwResample : public DllDynamic, DllSwResampleInterface
// DLL faking.
virtual bool ResolveExports() { return true; }
virtual bool Load() {
-#if !defined(TARGET_DARWIN)
+#if !defined(TARGET_DARWIN) && !defined(USE_STATIC_FFMPEG)
CLog::Log(LOGDEBUG, "DllAvFormat: Using libswresample system library");
#endif
return true;
virtual int64_t swr_get_delay(struct SwrContext *s, int64_t base) { return ::swr_get_delay(s, base); }
virtual int swr_set_channel_mapping (struct SwrContext *s, const int *channel_map) { return ::swr_set_channel_mapping(s, channel_map); }
virtual int swr_set_matrix(struct SwrContext *s, const double *matrix, int stride) { return ::swr_set_matrix(s, matrix, stride); }
+ virtual int swr_set_compensation(struct SwrContext *s, int sample_delta, int compensation_distance) { return ::swr_set_compensation(s, sample_delta, compensation_distance); }
};
#else
DEFINE_METHOD2(int64_t, swr_get_delay, (struct SwrContext *p1, int64_t p2))
DEFINE_METHOD2(int, swr_set_channel_mapping, (struct SwrContext *p1, const int *p2))
DEFINE_METHOD3(int, swr_set_matrix, (struct SwrContext *p1, const double *p2, int p3))
+ DEFINE_METHOD3(int, swr_set_compensation, (struct SwrContext *p1, int p2, int p3))
BEGIN_METHOD_RESOLVE()
RESOLVE_METHOD(swr_alloc_set_opts)
RESOLVE_METHOD(swr_get_delay)
RESOLVE_METHOD(swr_set_channel_mapping)
RESOLVE_METHOD(swr_set_matrix)
+ RESOLVE_METHOD(swr_set_compensation)
END_METHOD_RESOLVE()
/* dependencies of libavformat */