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