2 * Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
12 /* This program is created to take command arguments and pass
13 * them to main() in example.c or example_xma.c, because the
14 * correspending part in example.c or example_xma.c does not
15 * work on Pocket PC platform.
16 * To modify the command arguments, go to "Property" page and
17 * fill in "Command arguments." For example:
18 * --codec vp6 --flipuv --progress _bnd.vp6
24 #define MAX_NUM_ARG 64
25 #define MAX_SIZ_ARG 512
29 int main(int argc
, char **argv
);
32 int wmain(int argc
, wchar_t **argv
) {
33 char *cargv
[MAX_NUM_ARG
];
34 char chargv
[MAX_SIZ_ARG
];
37 /* transform command line arguments from (wchar_t *) to (char *) */
38 for(int i
=0; i
<argc
; i
++) {
39 wcstombs( chargv
, argv
[i
], sizeof(chargv
));
40 cargv
[i
] = _strdup(chargv
);
43 ret
= main(argc
, (char **)cargv
);
45 //free the memory located by _strdup()
46 for(int i
=0; i
<argc
; i
++)