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
This commit is contained in:
parent
1221641914
commit
9e96bdc733
@ -36,9 +36,9 @@
|
|||||||
#include "vpx/vp8dx.h"
|
#include "vpx/vp8dx.h"
|
||||||
#include "vpx/vpx_decoder.h"
|
#include "vpx/vpx_decoder.h"
|
||||||
|
|
||||||
#include "./md5_utils.h"
|
#include "../md5_utils.h"
|
||||||
#include "./tools_common.h"
|
#include "../tools_common.h"
|
||||||
#include "./video_reader.h"
|
#include "../video_reader.h"
|
||||||
#include "./vpx_config.h"
|
#include "./vpx_config.h"
|
||||||
|
|
||||||
static void get_image_md5(const vpx_image_t *img, unsigned char digest[16]) {
|
static void get_image_md5(const vpx_image_t *img, unsigned char digest[16]) {
|
||||||
|
@ -59,8 +59,8 @@
|
|||||||
#include "vpx/vp8dx.h"
|
#include "vpx/vp8dx.h"
|
||||||
#include "vpx/vpx_decoder.h"
|
#include "vpx/vpx_decoder.h"
|
||||||
|
|
||||||
#include "./tools_common.h"
|
#include "../tools_common.h"
|
||||||
#include "./video_reader.h"
|
#include "../video_reader.h"
|
||||||
#include "./vpx_config.h"
|
#include "./vpx_config.h"
|
||||||
|
|
||||||
static const char *exec_name;
|
static const char *exec_name;
|
||||||
|
@ -46,8 +46,8 @@
|
|||||||
#include "vpx/vp8dx.h"
|
#include "vpx/vp8dx.h"
|
||||||
#include "vpx/vpx_decoder.h"
|
#include "vpx/vpx_decoder.h"
|
||||||
|
|
||||||
#include "./tools_common.h"
|
#include "../tools_common.h"
|
||||||
#include "./video_reader.h"
|
#include "../video_reader.h"
|
||||||
#include "./vpx_config.h"
|
#include "./vpx_config.h"
|
||||||
|
|
||||||
static const char *exec_name;
|
static const char *exec_name;
|
||||||
|
@ -15,15 +15,22 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.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("Usage:\n");
|
||||||
printf("%s <input_yuv> <width>x<height> <target_width>x<target_height> ",
|
printf("%s <input_yuv> <width>x<height> <target_width>x<target_height> ",
|
||||||
progname);
|
exec_name);
|
||||||
printf("<output_yuv> [<frames>]\n");
|
printf("<output_yuv> [<frames>]\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void usage_exit() {
|
||||||
|
usage();
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
static int parse_dim(char *v, int *width, int *height) {
|
static int parse_dim(char *v, int *width, int *height) {
|
||||||
char *x = strchr(v, 'x');
|
char *x = strchr(v, 'x');
|
||||||
if (x == NULL)
|
if (x == NULL)
|
||||||
@ -47,9 +54,11 @@ int main(int argc, char *argv[]) {
|
|||||||
int f, frames;
|
int f, frames;
|
||||||
int width, height, target_width, target_height;
|
int width, height, target_width, target_height;
|
||||||
|
|
||||||
|
exec_name = argv[0];
|
||||||
|
|
||||||
if (argc < 5) {
|
if (argc < 5) {
|
||||||
printf("Incorrect parameters:\n");
|
printf("Incorrect parameters:\n");
|
||||||
usage(argv[0]);
|
usage();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,25 +66,25 @@ int main(int argc, char *argv[]) {
|
|||||||
fout = argv[4];
|
fout = argv[4];
|
||||||
if (!parse_dim(argv[2], &width, &height)) {
|
if (!parse_dim(argv[2], &width, &height)) {
|
||||||
printf("Incorrect parameters: %s\n", argv[2]);
|
printf("Incorrect parameters: %s\n", argv[2]);
|
||||||
usage(argv[0]);
|
usage();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (!parse_dim(argv[3], &target_width, &target_height)) {
|
if (!parse_dim(argv[3], &target_width, &target_height)) {
|
||||||
printf("Incorrect parameters: %s\n", argv[3]);
|
printf("Incorrect parameters: %s\n", argv[3]);
|
||||||
usage(argv[0]);
|
usage();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
fpin = fopen(fin, "rb");
|
fpin = fopen(fin, "rb");
|
||||||
if (fpin == NULL) {
|
if (fpin == NULL) {
|
||||||
printf("Can't open file %s to read\n", fin);
|
printf("Can't open file %s to read\n", fin);
|
||||||
usage(argv[0]);
|
usage();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
fpout = fopen(fout, "wb");
|
fpout = fopen(fout, "wb");
|
||||||
if (fpout == NULL) {
|
if (fpout == NULL) {
|
||||||
printf("Can't open file %s to write\n", fout);
|
printf("Can't open file %s to write\n", fout);
|
||||||
usage(argv[0]);
|
usage();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (argc >= 6)
|
if (argc >= 6)
|
||||||
|
@ -50,8 +50,8 @@
|
|||||||
#include "vpx/vp8cx.h"
|
#include "vpx/vp8cx.h"
|
||||||
#include "vpx/vpx_encoder.h"
|
#include "vpx/vpx_encoder.h"
|
||||||
|
|
||||||
#include "./tools_common.h"
|
#include "../tools_common.h"
|
||||||
#include "./video_writer.h"
|
#include "../video_writer.h"
|
||||||
|
|
||||||
static const char *exec_name;
|
static const char *exec_name;
|
||||||
|
|
||||||
|
@ -82,8 +82,8 @@
|
|||||||
|
|
||||||
#include "vpx/vpx_decoder.h"
|
#include "vpx/vpx_decoder.h"
|
||||||
|
|
||||||
#include "./tools_common.h"
|
#include "../tools_common.h"
|
||||||
#include "./video_reader.h"
|
#include "../video_reader.h"
|
||||||
#include "./vpx_config.h"
|
#include "./vpx_config.h"
|
||||||
|
|
||||||
static const char *exec_name;
|
static const char *exec_name;
|
||||||
|
@ -101,8 +101,8 @@
|
|||||||
|
|
||||||
#include "vpx/vpx_encoder.h"
|
#include "vpx/vpx_encoder.h"
|
||||||
|
|
||||||
#include "./tools_common.h"
|
#include "../tools_common.h"
|
||||||
#include "./video_writer.h"
|
#include "../video_writer.h"
|
||||||
|
|
||||||
static const char *exec_name;
|
static const char *exec_name;
|
||||||
|
|
||||||
|
@ -53,8 +53,8 @@
|
|||||||
|
|
||||||
#include "vpx/vpx_encoder.h"
|
#include "vpx/vpx_encoder.h"
|
||||||
|
|
||||||
#include "./tools_common.h"
|
#include "../tools_common.h"
|
||||||
#include "./video_writer.h"
|
#include "../video_writer.h"
|
||||||
|
|
||||||
static const char *exec_name;
|
static const char *exec_name;
|
||||||
|
|
||||||
|
@ -53,8 +53,8 @@
|
|||||||
#include "vpx/vp8cx.h"
|
#include "vpx/vp8cx.h"
|
||||||
#include "vpx/vpx_encoder.h"
|
#include "vpx/vpx_encoder.h"
|
||||||
|
|
||||||
#include "./tools_common.h"
|
#include "../tools_common.h"
|
||||||
#include "./video_writer.h"
|
#include "../video_writer.h"
|
||||||
|
|
||||||
static const char *exec_name;
|
static const char *exec_name;
|
||||||
|
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
#include "vpx/vpx_encoder.h"
|
#include "vpx/vpx_encoder.h"
|
||||||
#include "vpx/vp8cx.h"
|
#include "vpx/vp8cx.h"
|
||||||
|
|
||||||
#include "./tools_common.h"
|
#include "../tools_common.h"
|
||||||
#include "./video_writer.h"
|
#include "../video_writer.h"
|
||||||
|
|
||||||
static const char *exec_name;
|
static const char *exec_name;
|
||||||
|
|
||||||
|
@ -19,14 +19,14 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include "./args.h"
|
#include "../args.h"
|
||||||
#include "./tools_common.h"
|
#include "../tools_common.h"
|
||||||
#include "./video_writer.h"
|
#include "../video_writer.h"
|
||||||
|
|
||||||
#include "vpx/svc_context.h"
|
#include "vpx/svc_context.h"
|
||||||
#include "vpx/vp8cx.h"
|
#include "vpx/vp8cx.h"
|
||||||
#include "vpx/vpx_encoder.h"
|
#include "vpx/vpx_encoder.h"
|
||||||
#include "./vpxstats.h"
|
#include "../vpxstats.h"
|
||||||
|
|
||||||
static const arg_def_t skip_frames_arg =
|
static const arg_def_t skip_frames_arg =
|
||||||
ARG_DEF("s", "skip-frames", 1, "input frames to skip");
|
ARG_DEF("s", "skip-frames", 1, "input frames to skip");
|
||||||
|
@ -19,12 +19,12 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "./vpx_config.h"
|
#include "./vpx_config.h"
|
||||||
#include "vpx_ports/vpx_timer.h"
|
#include "../vpx_ports/vpx_timer.h"
|
||||||
#include "vpx/vp8cx.h"
|
#include "vpx/vp8cx.h"
|
||||||
#include "vpx/vpx_encoder.h"
|
#include "vpx/vpx_encoder.h"
|
||||||
|
|
||||||
#include "./tools_common.h"
|
#include "../tools_common.h"
|
||||||
#include "./video_writer.h"
|
#include "../video_writer.h"
|
||||||
|
|
||||||
static const char *exec_name;
|
static const char *exec_name;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user