diff options
author | Tom Finegan <tomfinegan@google.com> | 2015-02-04 16:11:57 -0800 |
---|---|---|
committer | Tom Finegan <tomfinegan@google.com> | 2015-02-04 16:11:57 -0800 |
commit | 9e96bdc733a17a511773831e32cdeabd7eb2993b (patch) | |
tree | 55d056849d976c0c8e3bc5763d80431906c4bdc2 /examples | |
parent | 1221641914b9c774cb4dc87c4c8578fb444611ef (diff) | |
download | libvpx-9e96bdc733a17a511773831e32cdeabd7eb2993b.tar libvpx-9e96bdc733a17a511773831e32cdeabd7eb2993b.tar.gz libvpx-9e96bdc733a17a511773831e32cdeabd7eb2993b.tar.bz2 libvpx-9e96bdc733a17a511773831e32cdeabd7eb2993b.zip |
Xcode: Fix includes in examples.
The current file's directory, ".", is treated much more literally
when building libvpx examples with Xcode than it is with make, and
clang cannot find common include files included via "./" when those
files actually reside one directory up in the tree.
Change-Id: I5f66a026282e35d80248ca4052ebb882b859172e
Diffstat (limited to 'examples')
-rw-r--r-- | examples/decode_to_md5.c | 6 | ||||
-rw-r--r-- | examples/decode_with_drops.c | 4 | ||||
-rw-r--r-- | examples/postproc.c | 4 | ||||
-rw-r--r-- | examples/resize_util.c | 25 | ||||
-rw-r--r-- | examples/set_maps.c | 4 | ||||
-rw-r--r-- | examples/simple_decoder.c | 4 | ||||
-rw-r--r-- | examples/simple_encoder.c | 4 | ||||
-rw-r--r-- | examples/twopass_encoder.c | 4 | ||||
-rw-r--r-- | examples/vp8cx_set_ref.c | 4 | ||||
-rw-r--r-- | examples/vp9_lossless_encoder.c | 4 | ||||
-rw-r--r-- | examples/vp9_spatial_svc_encoder.c | 8 | ||||
-rw-r--r-- | examples/vpx_temporal_svc_encoder.c | 6 |
12 files changed, 43 insertions, 34 deletions
diff --git a/examples/decode_to_md5.c b/examples/decode_to_md5.c index fbc0f4a6f..a3843bed3 100644 --- a/examples/decode_to_md5.c +++ b/examples/decode_to_md5.c @@ -36,9 +36,9 @@ #include "vpx/vp8dx.h" #include "vpx/vpx_decoder.h" -#include "./md5_utils.h" -#include "./tools_common.h" -#include "./video_reader.h" +#include "../md5_utils.h" +#include "../tools_common.h" +#include "../video_reader.h" #include "./vpx_config.h" static void get_image_md5(const vpx_image_t *img, unsigned char digest[16]) { diff --git a/examples/decode_with_drops.c b/examples/decode_with_drops.c index 9423e38ff..36f7d80e1 100644 --- a/examples/decode_with_drops.c +++ b/examples/decode_with_drops.c @@ -59,8 +59,8 @@ #include "vpx/vp8dx.h" #include "vpx/vpx_decoder.h" -#include "./tools_common.h" -#include "./video_reader.h" +#include "../tools_common.h" +#include "../video_reader.h" #include "./vpx_config.h" static const char *exec_name; diff --git a/examples/postproc.c b/examples/postproc.c index c74347c4c..e34426a61 100644 --- a/examples/postproc.c +++ b/examples/postproc.c @@ -46,8 +46,8 @@ #include "vpx/vp8dx.h" #include "vpx/vpx_decoder.h" -#include "./tools_common.h" -#include "./video_reader.h" +#include "../tools_common.h" +#include "../video_reader.h" #include "./vpx_config.h" static const char *exec_name; diff --git a/examples/resize_util.c b/examples/resize_util.c index b068f5524..f8c35255f 100644 --- a/examples/resize_util.c +++ b/examples/resize_util.c @@ -15,15 +15,22 @@ #include <stdlib.h> #include <string.h> -#include "./vp9/encoder/vp9_resize.h" +#include "../vp9/encoder/vp9_resize.h" -static void usage(char *progname) { +static const char *exec_name = NULL; + +static void usage() { printf("Usage:\n"); printf("%s <input_yuv> <width>x<height> <target_width>x<target_height> ", - progname); + exec_name); printf("<output_yuv> [<frames>]\n"); } +void usage_exit() { + usage(); + exit(EXIT_FAILURE); +} + static int parse_dim(char *v, int *width, int *height) { char *x = strchr(v, 'x'); if (x == NULL) @@ -47,9 +54,11 @@ int main(int argc, char *argv[]) { int f, frames; int width, height, target_width, target_height; + exec_name = argv[0]; + if (argc < 5) { printf("Incorrect parameters:\n"); - usage(argv[0]); + usage(); return 1; } @@ -57,25 +66,25 @@ int main(int argc, char *argv[]) { fout = argv[4]; if (!parse_dim(argv[2], &width, &height)) { printf("Incorrect parameters: %s\n", argv[2]); - usage(argv[0]); + usage(); return 1; } if (!parse_dim(argv[3], &target_width, &target_height)) { printf("Incorrect parameters: %s\n", argv[3]); - usage(argv[0]); + usage(); return 1; } fpin = fopen(fin, "rb"); if (fpin == NULL) { printf("Can't open file %s to read\n", fin); - usage(argv[0]); + usage(); return 1; } fpout = fopen(fout, "wb"); if (fpout == NULL) { printf("Can't open file %s to write\n", fout); - usage(argv[0]); + usage(); return 1; } if (argc >= 6) diff --git a/examples/set_maps.c b/examples/set_maps.c index 851adc42e..5555baac2 100644 --- a/examples/set_maps.c +++ b/examples/set_maps.c @@ -50,8 +50,8 @@ #include "vpx/vp8cx.h" #include "vpx/vpx_encoder.h" -#include "./tools_common.h" -#include "./video_writer.h" +#include "../tools_common.h" +#include "../video_writer.h" static const char *exec_name; diff --git a/examples/simple_decoder.c b/examples/simple_decoder.c index c58b014f7..08a216685 100644 --- a/examples/simple_decoder.c +++ b/examples/simple_decoder.c @@ -82,8 +82,8 @@ #include "vpx/vpx_decoder.h" -#include "./tools_common.h" -#include "./video_reader.h" +#include "../tools_common.h" +#include "../video_reader.h" #include "./vpx_config.h" static const char *exec_name; diff --git a/examples/simple_encoder.c b/examples/simple_encoder.c index f20c246da..e805c2587 100644 --- a/examples/simple_encoder.c +++ b/examples/simple_encoder.c @@ -101,8 +101,8 @@ #include "vpx/vpx_encoder.h" -#include "./tools_common.h" -#include "./video_writer.h" +#include "../tools_common.h" +#include "../video_writer.h" static const char *exec_name; diff --git a/examples/twopass_encoder.c b/examples/twopass_encoder.c index 653ae9482..0ec83ddcc 100644 --- a/examples/twopass_encoder.c +++ b/examples/twopass_encoder.c @@ -53,8 +53,8 @@ #include "vpx/vpx_encoder.h" -#include "./tools_common.h" -#include "./video_writer.h" +#include "../tools_common.h" +#include "../video_writer.h" static const char *exec_name; diff --git a/examples/vp8cx_set_ref.c b/examples/vp8cx_set_ref.c index 5e29d8083..a2982821a 100644 --- a/examples/vp8cx_set_ref.c +++ b/examples/vp8cx_set_ref.c @@ -53,8 +53,8 @@ #include "vpx/vp8cx.h" #include "vpx/vpx_encoder.h" -#include "./tools_common.h" -#include "./video_writer.h" +#include "../tools_common.h" +#include "../video_writer.h" static const char *exec_name; diff --git a/examples/vp9_lossless_encoder.c b/examples/vp9_lossless_encoder.c index 3fcda0cd4..54275770d 100644 --- a/examples/vp9_lossless_encoder.c +++ b/examples/vp9_lossless_encoder.c @@ -15,8 +15,8 @@ #include "vpx/vpx_encoder.h" #include "vpx/vp8cx.h" -#include "./tools_common.h" -#include "./video_writer.h" +#include "../tools_common.h" +#include "../video_writer.h" static const char *exec_name; diff --git a/examples/vp9_spatial_svc_encoder.c b/examples/vp9_spatial_svc_encoder.c index a4a9edb2d..f4deb693b 100644 --- a/examples/vp9_spatial_svc_encoder.c +++ b/examples/vp9_spatial_svc_encoder.c @@ -19,14 +19,14 @@ #include <string.h> #include <time.h> -#include "./args.h" -#include "./tools_common.h" -#include "./video_writer.h" +#include "../args.h" +#include "../tools_common.h" +#include "../video_writer.h" #include "vpx/svc_context.h" #include "vpx/vp8cx.h" #include "vpx/vpx_encoder.h" -#include "./vpxstats.h" +#include "../vpxstats.h" static const arg_def_t skip_frames_arg = ARG_DEF("s", "skip-frames", 1, "input frames to skip"); diff --git a/examples/vpx_temporal_svc_encoder.c b/examples/vpx_temporal_svc_encoder.c index cbe0157ff..bc56aaeb0 100644 --- a/examples/vpx_temporal_svc_encoder.c +++ b/examples/vpx_temporal_svc_encoder.c @@ -19,12 +19,12 @@ #include <string.h> #include "./vpx_config.h" -#include "vpx_ports/vpx_timer.h" +#include "../vpx_ports/vpx_timer.h" #include "vpx/vp8cx.h" #include "vpx/vpx_encoder.h" -#include "./tools_common.h" -#include "./video_writer.h" +#include "../tools_common.h" +#include "../video_writer.h" static const char *exec_name; |