Commit 25cfd8e8 authored by James Zern's avatar James Zern

top-level: add extern "C" to headers

Change-Id: I5164df72aff84eca0ace56032c5373f04053c6a5
parent a5d23f54
...@@ -13,6 +13,10 @@ ...@@ -13,6 +13,10 @@
#define ARGS_H_ #define ARGS_H_
#include <stdio.h> #include <stdio.h>
#ifdef __cplusplus
extern "C" {
#endif
struct arg { struct arg {
char **argv; char **argv;
const char *name; const char *name;
...@@ -48,4 +52,8 @@ unsigned int arg_parse_uint(const struct arg *arg); ...@@ -48,4 +52,8 @@ unsigned int arg_parse_uint(const struct arg *arg);
int arg_parse_int(const struct arg *arg); int arg_parse_int(const struct arg *arg);
struct vpx_rational arg_parse_rational(const struct arg *arg); struct vpx_rational arg_parse_rational(const struct arg *arg);
int arg_parse_enum_or_int(const struct arg *arg); int arg_parse_enum_or_int(const struct arg *arg);
#ifdef __cplusplus
} // extern "C"
#endif
#endif // ARGS_H_ #endif // ARGS_H_
...@@ -23,6 +23,10 @@ ...@@ -23,6 +23,10 @@
#ifndef MD5_UTILS_H_ #ifndef MD5_UTILS_H_
#define MD5_UTILS_H_ #define MD5_UTILS_H_
#ifdef __cplusplus
extern "C" {
#endif
#define md5byte unsigned char #define md5byte unsigned char
#define UWORD32 unsigned int #define UWORD32 unsigned int
...@@ -38,4 +42,8 @@ void MD5Update(struct MD5Context *context, md5byte const *buf, unsigned len); ...@@ -38,4 +42,8 @@ void MD5Update(struct MD5Context *context, md5byte const *buf, unsigned len);
void MD5Final(unsigned char digest[16], struct MD5Context *context); void MD5Final(unsigned char digest[16], struct MD5Context *context);
void MD5Transform(UWORD32 buf[4], UWORD32 const in[16]); void MD5Transform(UWORD32 buf[4], UWORD32 const in[16]);
#ifdef __cplusplus
} // extern "C"
#endif
#endif // MD5_UTILS_H_ #endif // MD5_UTILS_H_
...@@ -12,6 +12,10 @@ ...@@ -12,6 +12,10 @@
#include "vpx/vpx_encoder.h" #include "vpx/vpx_encoder.h"
#ifdef __cplusplus
extern "C" {
#endif
enum TestDecodeFatality { enum TestDecodeFatality {
TEST_DECODE_OFF, TEST_DECODE_OFF,
TEST_DECODE_FATAL, TEST_DECODE_FATAL,
...@@ -42,4 +46,8 @@ struct VpxEncoderConfig { ...@@ -42,4 +46,8 @@ struct VpxEncoderConfig {
int disable_warning_prompt; int disable_warning_prompt;
}; };
#ifdef __cplusplus
} // extern "C"
#endif
#endif // VPXENC_H_ #endif // VPXENC_H_
...@@ -15,6 +15,10 @@ ...@@ -15,6 +15,10 @@
#include "vpx/vpx_encoder.h" #include "vpx/vpx_encoder.h"
#ifdef __cplusplus
extern "C" {
#endif
/* This structure is used to abstract the different ways of handling /* This structure is used to abstract the different ways of handling
* first pass statistics * first pass statistics
*/ */
...@@ -34,4 +38,8 @@ vpx_fixed_buf_t stats_get(stats_io_t *stats); ...@@ -34,4 +38,8 @@ vpx_fixed_buf_t stats_get(stats_io_t *stats);
double vp8_mse2psnr(double samples, double peak, double mse); double vp8_mse2psnr(double samples, double peak, double mse);
#ifdef __cplusplus
} // extern "C"
#endif
#endif // VPXSTATS_H_ #endif // VPXSTATS_H_
...@@ -10,6 +10,10 @@ ...@@ -10,6 +10,10 @@
#ifndef WARNINGS_H_ #ifndef WARNINGS_H_
#define WARNINGS_H_ #define WARNINGS_H_
#ifdef __cplusplus
extern "C" {
#endif
struct vpx_codec_enc_cfg; struct vpx_codec_enc_cfg;
struct VpxEncoderConfig; struct VpxEncoderConfig;
...@@ -22,4 +26,8 @@ void check_encoder_config(int disable_prompt, ...@@ -22,4 +26,8 @@ void check_encoder_config(int disable_prompt,
const struct VpxEncoderConfig *global_config, const struct VpxEncoderConfig *global_config,
const struct vpx_codec_enc_cfg *stream_config); const struct vpx_codec_enc_cfg *stream_config);
#ifdef __cplusplus
} // extern "C"
#endif
#endif // WARNINGS_H_ #endif // WARNINGS_H_
...@@ -12,6 +12,10 @@ ...@@ -12,6 +12,10 @@
#include "./tools_common.h" #include "./tools_common.h"
#ifdef __cplusplus
extern "C" {
#endif
struct nestegg; struct nestegg;
struct nestegg_packet; struct nestegg_packet;
struct VpxInputContext; struct VpxInputContext;
...@@ -37,4 +41,8 @@ int webm_guess_framerate(struct WebmInputContext *webm_ctx, ...@@ -37,4 +41,8 @@ int webm_guess_framerate(struct WebmInputContext *webm_ctx,
void webm_free(struct WebmInputContext *webm_ctx); void webm_free(struct WebmInputContext *webm_ctx);
#ifdef __cplusplus
} // extern "C"
#endif
#endif // WEBMDEC_H_ #endif // WEBMDEC_H_
...@@ -23,6 +23,10 @@ typedef __int64 off_t; ...@@ -23,6 +23,10 @@ typedef __int64 off_t;
#include "tools_common.h" #include "tools_common.h"
#include "vpx/vpx_encoder.h" #include "vpx/vpx_encoder.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef off_t EbmlLoc; typedef off_t EbmlLoc;
struct cue_entry { struct cue_entry {
...@@ -84,4 +88,8 @@ void write_webm_block(struct EbmlGlobal *glob, ...@@ -84,4 +88,8 @@ void write_webm_block(struct EbmlGlobal *glob,
void write_webm_file_footer(struct EbmlGlobal *glob, int hash); void write_webm_file_footer(struct EbmlGlobal *glob, int hash);
#ifdef __cplusplus
} // extern "C"
#endif
#endif // WEBMENC_H_ #endif // WEBMENC_H_
...@@ -17,6 +17,10 @@ ...@@ -17,6 +17,10 @@
#include "vpx/vpx_decoder.h" #include "vpx/vpx_decoder.h"
#ifdef __cplusplus
extern "C" {
#endif
void y4m_write_file_header(FILE *file, int width, int height, void y4m_write_file_header(FILE *file, int width, int height,
const struct VpxRational *framerate, const struct VpxRational *framerate,
vpx_img_fmt_t fmt); vpx_img_fmt_t fmt);
...@@ -24,4 +28,8 @@ void y4m_write_file_header(FILE *file, int width, int height, ...@@ -24,4 +28,8 @@ void y4m_write_file_header(FILE *file, int width, int height,
void y4m_write_frame_header(FILE *file); void y4m_write_frame_header(FILE *file);
#ifdef __cplusplus
} // extern "C"
#endif
#endif // Y4MENC_H_ #endif // Y4MENC_H_
...@@ -17,6 +17,10 @@ ...@@ -17,6 +17,10 @@
# include <stdio.h> # include <stdio.h>
# include "vpx/vpx_image.h" # include "vpx/vpx_image.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct y4m_input y4m_input; typedef struct y4m_input y4m_input;
...@@ -62,4 +66,8 @@ int y4m_input_open(y4m_input *_y4m, FILE *_fin, char *_skip, int _nskip, ...@@ -62,4 +66,8 @@ int y4m_input_open(y4m_input *_y4m, FILE *_fin, char *_skip, int _nskip,
void y4m_input_close(y4m_input *_y4m); void y4m_input_close(y4m_input *_y4m);
int y4m_input_fetch_frame(y4m_input *_y4m, FILE *_fin, vpx_image_t *img); int y4m_input_fetch_frame(y4m_input *_y4m, FILE *_fin, vpx_image_t *img);
#ifdef __cplusplus
} // extern "C"
#endif
#endif // Y4MINPUT_H_ #endif // Y4MINPUT_H_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment