ref: 25cfd8e8c4f845d5c29435c934c8ba329f3aa7ba
parent: a5d23f547a4ae7a0a5b17c0a22f196b5fff6584f
author: James Zern <[email protected]>
date: Sat Jan 18 07:16:11 EST 2014
top-level: add extern "C" to headers Change-Id: I5164df72aff84eca0ace56032c5373f04053c6a5
--- a/args.h
+++ b/args.h
@@ -13,6 +13,10 @@
#define ARGS_H_
#include <stdio.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct arg {
char **argv;
const char *name;
@@ -48,4 +52,8 @@
int arg_parse_int(const struct arg *arg);
struct vpx_rational arg_parse_rational(const struct arg *arg);
int arg_parse_enum_or_int(const struct arg *arg);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // ARGS_H_
--- a/md5_utils.h
+++ b/md5_utils.h
@@ -23,6 +23,10 @@
#ifndef MD5_UTILS_H_
#define MD5_UTILS_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define md5byte unsigned char
#define UWORD32 unsigned int
@@ -37,5 +41,9 @@
void MD5Update(struct MD5Context *context, md5byte const *buf, unsigned len);
void MD5Final(unsigned char digest[16], struct MD5Context *context);
void MD5Transform(UWORD32 buf[4], UWORD32 const in[16]);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
#endif // MD5_UTILS_H_
--- a/vpxenc.h
+++ b/vpxenc.h
@@ -12,6 +12,10 @@
#include "vpx/vpx_encoder.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
enum TestDecodeFatality {
TEST_DECODE_OFF,
TEST_DECODE_FATAL,
@@ -41,5 +45,9 @@
int disable_warnings;
int disable_warning_prompt;
};
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
#endif // VPXENC_H_
--- a/vpxstats.h
+++ b/vpxstats.h
@@ -15,6 +15,10 @@
#include "vpx/vpx_encoder.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* This structure is used to abstract the different ways of handling
* first pass statistics
*/
@@ -33,5 +37,9 @@
vpx_fixed_buf_t stats_get(stats_io_t *stats);
double vp8_mse2psnr(double samples, double peak, double mse);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
#endif // VPXSTATS_H_
--- a/warnings.h
+++ b/warnings.h
@@ -10,6 +10,10 @@
#ifndef WARNINGS_H_
#define WARNINGS_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct vpx_codec_enc_cfg;
struct VpxEncoderConfig;
@@ -21,5 +25,9 @@
void check_encoder_config(int disable_prompt,
const struct VpxEncoderConfig *global_config,
const struct vpx_codec_enc_cfg *stream_config);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
#endif // WARNINGS_H_
--- a/webmdec.h
+++ b/webmdec.h
@@ -12,6 +12,10 @@
#include "./tools_common.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct nestegg;
struct nestegg_packet;
struct VpxInputContext;
@@ -36,5 +40,9 @@
struct VpxInputContext *vpx_ctx);
void webm_free(struct WebmInputContext *webm_ctx);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
#endif // WEBMDEC_H_
--- a/webmenc.h
+++ b/webmenc.h
@@ -23,6 +23,10 @@
#include "tools_common.h"
#include "vpx/vpx_encoder.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef off_t EbmlLoc;
struct cue_entry {
@@ -83,5 +87,9 @@
const vpx_codec_cx_pkt_t *pkt);
void write_webm_file_footer(struct EbmlGlobal *glob, int hash);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
#endif // WEBMENC_H_
--- a/y4menc.h
+++ b/y4menc.h
@@ -17,6 +17,10 @@
#include "vpx/vpx_decoder.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void y4m_write_file_header(FILE *file, int width, int height,
const struct VpxRational *framerate,
vpx_img_fmt_t fmt);
@@ -23,5 +27,9 @@
void y4m_write_frame_header(FILE *file);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
#endif // Y4MENC_H_
--- a/y4minput.h
+++ b/y4minput.h
@@ -17,8 +17,12 @@
# include <stdio.h>
# include "vpx/vpx_image.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct y4m_input y4m_input;
@@ -61,5 +65,9 @@
int only_420);
void y4m_input_close(y4m_input *_y4m);
int y4m_input_fetch_frame(y4m_input *_y4m, FILE *_fin, vpx_image_t *img);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
#endif // Y4MINPUT_H_