ext/exporter.c in rmov-0.1.2 vs ext/exporter.c in rmov-0.1.3

- old
+ new

@@ -56,16 +56,16 @@ // Activate so QuickTime doesn't export a white frame SetMovieActive(movie, TRUE); err = NativePathNameToFSSpec(RSTRING(filepath)->ptr, &fs, 0); if (err != fnfErr) - rb_raise(eQuicktime, "Error %d occurred while opening file for export at %s.", err, RSTRING(filepath)->ptr); + rb_raise(eQuickTime, "Error %d occurred while opening file for export at %s.", err, RSTRING(filepath)->ptr); // TODO use exporter settings when converting movie err = ConvertMovieToFile(movie, 0, &fs, 'MooV', 'TVOD', 0, 0, 0, component); if (err != noErr) - rb_raise(eQuicktime, "Error %d occurred while attempting to export movie to file %s.", err, RSTRING(filepath)->ptr); + rb_raise(eQuickTime, "Error %d occurred while attempting to export movie to file %s.", err, RSTRING(filepath)->ptr); if (rb_block_given_p()) SetMovieProgressProc(movie, 0, 0); CloseComponent(component); @@ -91,18 +91,18 @@ ComponentInstance component = exporter_component(obj); // Bring this process to the front err = TransformProcessType(&current_process, kProcessTransformToForegroundApplication); if (err != noErr) { - rb_raise(eQuicktime, "Error %d occurred while brining this application to the forground.", err); + rb_raise(eQuickTime, "Error %d occurred while brining this application to the forground.", err); } SetFrontProcess(&current_process); // Show export dialog and save settings err = MovieExportDoUserDialog(component, movie, 0, 0, GetMovieDuration(movie), &canceled); if (err != noErr) { - rb_raise(eQuicktime, "Error %d occurred while opening export dialog.", err); + rb_raise(eQuickTime, "Error %d occurred while opening export dialog.", err); } if (!canceled) { // Clear existing settings if there are any if (REXPORTER(obj)->settings) { @@ -130,11 +130,11 @@ FILE *file; long length, read_length; file = fopen(RSTRING(filepath)->ptr, "r+b"); if (!file) { - rb_raise(eQuicktime, "Unable to open file for loading at %s.", RSTRING(filepath)->ptr); + rb_raise(eQuickTime, "Unable to open file for loading at %s.", RSTRING(filepath)->ptr); } // obtain file size: fseek(file , 0, SEEK_END); length = ftell(file); @@ -147,11 +147,11 @@ // load the file into settings REXPORTER(obj)->settings = (QTAtomContainer)NewHandleClear(length); read_length = fread(*(Handle)REXPORTER(obj)->settings, 1, length, file); if (read_length != length) { - rb_raise(eQuicktime, "Unable to read entire file at %s.", RSTRING(filepath)->ptr); + rb_raise(eQuickTime, "Unable to read entire file at %s.", RSTRING(filepath)->ptr); } fclose(file); return Qnil; @@ -167,27 +167,27 @@ { FILE *file; QTAtomContainer settings = REXPORTER(obj)->settings; if (!settings) { - rb_raise(eQuicktime, "Unable to save settings because no settings are specified."); + rb_raise(eQuickTime, "Unable to save settings because no settings are specified."); } file = fopen(RSTRING(filepath)->ptr, "wb"); if (!file) { - rb_raise(eQuicktime, "Unable to open file for saving at %s.", RSTRING(filepath)->ptr); + rb_raise(eQuickTime, "Unable to open file for saving at %s.", RSTRING(filepath)->ptr); } fwrite(&settings, GetHandleSize((Handle)settings), 1, file); fclose(file); return Qnil; } void Init_quicktime_exporter() { - VALUE mQuicktime; - mQuicktime = rb_define_module("Quicktime"); - cExporter = rb_define_class_under(mQuicktime, "Exporter", rb_cObject); + VALUE mQuickTime; + mQuickTime = rb_define_module("QuickTime"); + cExporter = rb_define_class_under(mQuickTime, "Exporter", rb_cObject); rb_define_alloc_func(cExporter, exporter_new); rb_define_method(cExporter, "export", exporter_export_to_file, 1); rb_define_method(cExporter, "open_settings_dialog", exporter_open_settings_dialog, 0); rb_define_method(cExporter, "load_settings", exporter_load_settings, 1); rb_define_method(cExporter, "save_settings", exporter_save_settings, 1);