1 /*****************************************************************************
3 *****************************************************************************
4 * Copyright (C) 2007 libmkv
7 * Authors: Nathan Caldwell
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
22 *****************************************************************************/
25 * A _very_ simple matroska muxer. This is simply a test to make sure it even
43 int main( int argc
, char ** argv
)
46 int c
, option_index
= 0;
47 static char *output
= NULL
;
48 static char *in_video
= NULL
;
49 static char *in_audio
= NULL
;
53 static struct option long_options
[] =
55 { "help", no_argument
, NULL
, 'h' },
56 { "output", required_argument
, NULL
, 'o' },
57 { "audio", required_argument
, NULL
, 'a' },
58 { "video", required_argument
, NULL
, 'v' },
62 c
= getopt_long( argc
, argv
,
64 long_options
, &option_index
);
73 printf("Got output filename: %s\n", optarg
);
74 output
= strdup( optarg
);
77 printf("Got input video track: %s\n", optarg
);
78 in_video
= strdup( optarg
);
81 printf("Got input audio track: %s\n", optarg
);
82 in_audio
= strdup( optarg
);
85 fprintf( stderr
, "Unknown option (%s)\n", argv
[optind
] );
92 mkvfile = mk_createWriter( output );
94 mk_writeHeader(mkvfile, "test.c",
96 codecPrivate, sizeof( codecPrivate ),
97 default_frame_duration,
111 show_help(char ** argv
)
113 fprintf(stderr
, "%s [options] -o output_file.mkv video_track audio_track\n", argv
[0]);
114 fprintf(stderr
, "\t-h, --help\t\tPrint this message, then quit.\n");
115 fprintf(stderr
, "\t-o, --output\t\tSpecify the output file.*\n");
116 fprintf(stderr
, "\t\t* - Required argument.\n");