Esempio n. 1
0
static void get_plugin_information( void )
{
    sprintf( plugin_information,
             "L-SMASH Works File Reader r%s\n"
             "    libavutil %s: %s / libavcodec %s: %s\n"
             "    libavformat %s: %s / libswscale %s: %s\n"
             "    libavresample %s: %s",
             LSMASHWORKS_REV,
             AV_STRINGIFY( LIBAVUTIL_VERSION     ), avutil_license    (),
             AV_STRINGIFY( LIBAVCODEC_VERSION    ), avcodec_license   (),
             AV_STRINGIFY( LIBAVFORMAT_VERSION   ), avformat_license  (),
             AV_STRINGIFY( LIBSWSCALE_VERSION    ), swscale_license   (),
             AV_STRINGIFY( LIBAVRESAMPLE_VERSION ), avresample_license() );
}
Esempio n. 2
0
// Register class
VALUE reader_register_class(VALUE module, VALUE super) {
	_klass = rb_define_class_under(module, "Reader", super);
	rb_define_alloc_func(_klass, reader_alloc);

	rb_define_const (_klass, "VERSION",			rb_str_new2(human_readable_version()));
	rb_define_const (_klass, "CONFIGURATION",	rb_str_new2(avformat_configuration()));
	rb_define_const (_klass, "LICENSE",			rb_str_new2(avformat_license()));

	rb_define_method(_klass, "initialize",		reader_initialize, 1);

	rb_define_method(_klass, "name", 			reader_name, 0);
	rb_define_method(_klass, "description", 	reader_description, 0);
	rb_define_method(_klass, "start_time", 		reader_start_time, 0);
	rb_define_method(_klass, "duration", 		reader_duration, 0);
	rb_define_method(_klass, "bit_rate", 		reader_bit_rate, 0);
	rb_define_method(_klass, "streams", 		reader_streams, 0);
	rb_define_method(_klass, "metadata", 		reader_metadata, 0);

	return _klass;
}