]> granicus.if.org Git - libvpx/commitdiff
examples: use function to get iface pointers
authorJohn Koleszar <jkoleszar@google.com>
Tue, 1 Mar 2011 01:06:56 +0000 (20:06 -0500)
committerJohn Koleszar <jkoleszar@google.com>
Tue, 1 Mar 2011 01:06:59 +0000 (20:06 -0500)
MSVC can't pass the address of global variables in a DLL correctly
across DLL boundaries. This patch allows linking the examples to
a libvpx dll build. Fixes issue #268.

Change-Id: I1c52d076cfc68efb3efdfba019f12d53c5019f58

examples/decoder_tmpl.c
examples/decoder_tmpl.txt
examples/encoder_tmpl.c
examples/encoder_tmpl.txt
examples/simple_decoder.txt

index 26b745d34a19ef117d4989b3aa126386ad854e5b..c70681b1a5f13c78b1b84d1f093f2ccbeb25cb16 100644 (file)
@@ -19,7 +19,7 @@
 #define VPX_CODEC_DISABLE_COMPAT 1
 #include "vpx/vpx_decoder.h"
 #include "vpx/vp8dx.h"
-#define interface (&vpx_codec_vp8_dx_algo)
+#define interface (vpx_codec_vp8_dx())
 @EXTRA_INCLUDES
 
 
index 310c66d54fa53c251509a34dc471c8c40efe2492..7dd05d1ff5b7af10190ea741892c6f06e8a1987e 100644 (file)
@@ -2,7 +2,7 @@
 #define VPX_CODEC_DISABLE_COMPAT 1
 #include "vpx/vpx_decoder.h"
 #include "vpx/vp8dx.h"
-#define interface (&vpx_codec_vp8_dx_algo)
+#define interface (vpx_codec_vp8_dx())
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DEC_INCLUDES
 
 
index d9e4d03178a48014c75775a99d1781a8bec82133..f109e62166f2f4c149a1d306046412a3bfa3dc87 100644 (file)
@@ -19,7 +19,7 @@
 #define VPX_CODEC_DISABLE_COMPAT 1
 #include "vpx/vpx_encoder.h"
 #include "vpx/vp8cx.h"
-#define interface (&vpx_codec_vp8_cx_algo)
+#define interface (vpx_codec_vp8_cx())
 #define fourcc    0x30385056
 @EXTRA_INCLUDES
 
index 3273164da4613b9b080125b32e4c99d394d4d1fd..00420713a84956eb2ddec0d7144c57be1906f750 100644 (file)
@@ -2,7 +2,7 @@
 #define VPX_CODEC_DISABLE_COMPAT 1
 #include "vpx/vpx_encoder.h"
 #include "vpx/vp8cx.h"
-#define interface (&vpx_codec_vp8_cx_algo)
+#define interface (vpx_codec_vp8_cx())
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ENC_INCLUDES
 
 
index be8ca734a7c8431d31c0a77424160a5a8f4e01e7..90d9a6870e43d63b13ef6b848d5b5c4b17205e81 100644 (file)
@@ -33,7 +33,7 @@ Initializing The Codec
 ----------------------
 The decoder is initialized by the following code. This is an example for
 the VP8 decoder, but the code is analogous for all algorithms. Replace
-`&vpx_codec_vp8_dx_algo` with a pointer to the interface exposed by the
+`vpx_codec_vp8_dx()` with a pointer to the interface exposed by the
 algorithm you want to use. The `cfg` argument is left as NULL in this
 example, because we want the algorithm to determine the stream
 configuration (width/height) and allocate memory automatically. This