gstreamer/mediainfo/src/mi.vala

61 lines
1.7 KiB
Vala
Raw Normal View History

2010-10-16 20:48:38 +00:00
/* GStreamer media browser
* Copyright (C) 2010 Stefan Sauer <ensonic@user.sf.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Steet,
* Boston, MA 02110-1301, USA.
*/
using MediaInfo;
using GLib;
bool version;
const OptionEntry[] options = {
{ "version", 0, 0, OptionArg.NONE, ref version, "Display version number", null },
{ null }
};
2010-10-16 20:48:38 +00:00
int
main(string[] args)
{
2010-10-16 20:48:38 +00:00
Intl.bindtextdomain (Config.GETTEXT_PACKAGE, Config.LOCALEDIR);
Intl.bind_textdomain_codeset (Config.GETTEXT_PACKAGE, "UTF-8");
Intl.textdomain (Config.GETTEXT_PACKAGE);
OptionContext opt_context = new OptionContext (_("<directory>"));
opt_context.set_help_enabled (true);
opt_context.add_main_entries (options, null);
opt_context.add_group (Gst.init_get_option_group ());
opt_context.add_group (Gtk.get_option_group (true));
try {
opt_context.parse (ref args);
} catch (Error e) {
stdout.printf ("%s", opt_context.get_help(true, null));
return (0);
}
if (version) {
stdout.printf ("%s\n", Config.PACKAGE_STRING);
return (0);
}
2010-10-16 20:48:38 +00:00
2010-10-17 19:37:26 +00:00
App app = new App ();
app.show_all ();
2010-10-16 20:48:38 +00:00
Gtk.main ();
return (0);
}