Permalink
Browse files

changing Quicktime module name to QuickTime since that is proper casing

  • Loading branch information...
1 parent 6edb9fc commit 180fcac2fef0a49e79dce9498cab3273ce3ae9fb @ryanb committed Oct 3, 2008
View
@@ -1,3 +1,5 @@
+* changing Quicktime module name to QuickTime.
+
0.1.2 (October 3rd, 2008)
* movie.poster_time and movie.poster_time=(seconds) for getting and setting a movie's poster time
View
@@ -56,7 +56,7 @@ the user with the dialog again.
puts "#{percent}% complete"
end
-See Quicktime::Movie in the RDoc for more information.
+See QuickTime::Movie in the RDoc for more information.
http://rmov.rubyforge.org
View
@@ -58,12 +58,12 @@ static VALUE exporter_export_to_file(VALUE obj, VALUE filepath)
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);
@@ -93,14 +93,14 @@ static VALUE exporter_open_settings_dialog(VALUE 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) {
@@ -132,7 +132,7 @@ static VALUE exporter_load_settings(VALUE obj, VALUE filepath)
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:
@@ -149,7 +149,7 @@ static VALUE exporter_load_settings(VALUE obj, VALUE filepath)
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);
@@ -169,12 +169,12 @@ static VALUE exporter_save_settings(VALUE obj, VALUE filepath)
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);
@@ -184,9 +184,9 @@ static VALUE exporter_save_settings(VALUE obj, VALUE filepath)
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);
View
@@ -1,4 +1,4 @@
require 'mkmf'
-$LDFLAGS = '-framework Quicktime'
+$LDFLAGS = '-framework QuickTime'
create_makefile('rmov_ext')
View
@@ -60,7 +60,7 @@ static VALUE movie_dispose(VALUE obj)
static VALUE movie_load_from_file(VALUE obj, VALUE filepath)
{
if (MOVIE(obj)) {
- rb_raise(eQuicktime, "Movie has already been loaded.");
+ rb_raise(eQuickTime, "Movie has already been loaded.");
} else {
OSErr err;
FSSpec fs;
@@ -70,19 +70,19 @@ static VALUE movie_load_from_file(VALUE obj, VALUE filepath)
err = NativePathNameToFSSpec(RSTRING(filepath)->ptr, &fs, 0);
if (err != 0)
- rb_raise(eQuicktime, "Error %d occurred while reading file at %s", err, RSTRING(filepath)->ptr);
+ rb_raise(eQuickTime, "Error %d occurred while reading file at %s", err, RSTRING(filepath)->ptr);
err = OpenMovieFile(&fs, &frefnum, fsRdPerm);
if (err != 0)
- rb_raise(eQuicktime, "Error %d occurred while opening movie at %s", err, RSTRING(filepath)->ptr);
+ rb_raise(eQuickTime, "Error %d occurred while opening movie at %s", err, RSTRING(filepath)->ptr);
err = NewMovieFromFile(movie, frefnum, &movie_resid, 0, newMovieActive, 0);
if (err != 0)
- rb_raise(eQuicktime, "Error %d occurred while loading movie at %s", err, RSTRING(filepath)->ptr);
+ rb_raise(eQuickTime, "Error %d occurred while loading movie at %s", err, RSTRING(filepath)->ptr);
err = CloseMovieFile(frefnum);
if (err != 0)
- rb_raise(eQuicktime, "Error %d occurred while closing movie file at %s", err, RSTRING(filepath)->ptr);
+ rb_raise(eQuickTime, "Error %d occurred while closing movie file at %s", err, RSTRING(filepath)->ptr);
RMOVIE(obj)->movie = *movie;
@@ -100,7 +100,7 @@ static VALUE movie_load_from_file(VALUE obj, VALUE filepath)
static VALUE movie_load_empty(VALUE obj)
{
if (MOVIE(obj)) {
- rb_raise(eQuicktime, "Movie has already been loaded.");
+ rb_raise(eQuickTime, "Movie has already been loaded.");
} else {
RMOVIE(obj)->movie = NewMovie(0);
return obj;
@@ -333,7 +333,7 @@ static VALUE movie_flatten(VALUE obj, VALUE filepath)
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 make these flags settable through an options hash
RMOVIE(new_movie_obj)->movie = FlattenMovieData(MOVIE(obj),
@@ -364,26 +364,26 @@ static VALUE movie_export_pict(VALUE obj, VALUE filepath, VALUE frame_time)
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);
// Convert the picture handle into a PICT file (still in a handle)
// by adding a 512-byte header to the start.
handle = NewHandleClear(512);
err = HandAndHand((Handle)picture, handle);
if (err != noErr)
- rb_raise(eQuicktime, "Error %d occurred while converting handle for pict export %s.", err, RSTRING(filepath)->ptr);
+ rb_raise(eQuickTime, "Error %d occurred while converting handle for pict export %s.", err, RSTRING(filepath)->ptr);
err = OpenADefaultComponent(GraphicsImporterComponentType, kQTFileTypePicture, &component);
if (err != noErr)
- rb_raise(eQuicktime, "Error %d occurred while opening picture component for %s.", err, RSTRING(filepath)->ptr);
+ rb_raise(eQuickTime, "Error %d occurred while opening picture component for %s.", err, RSTRING(filepath)->ptr);
err = GraphicsImportSetDataHandle(component, handle);
if (err != noErr)
- rb_raise(eQuicktime, "Error %d occurred while setting graphics importer data handle for %s.", err, RSTRING(filepath)->ptr);
+ rb_raise(eQuickTime, "Error %d occurred while setting graphics importer data handle for %s.", err, RSTRING(filepath)->ptr);
err = GraphicsImportExportImageFile(component, 0, 0, &fs, smSystemScript);
if (err != noErr)
- rb_raise(eQuicktime, "Error %d occurred while exporting pict to file %s.", err, RSTRING(filepath)->ptr);
+ rb_raise(eQuickTime, "Error %d occurred while exporting pict to file %s.", err, RSTRING(filepath)->ptr);
CloseComponent(component);
DisposeHandle(handle);
@@ -415,9 +415,9 @@ static VALUE movie_set_poster_time(VALUE obj, VALUE seconds)
void Init_quicktime_movie()
{
- VALUE mQuicktime;
- mQuicktime = rb_define_module("Quicktime");
- cMovie = rb_define_class_under(mQuicktime, "Movie", rb_cObject);
+ VALUE mQuickTime;
+ mQuickTime = rb_define_module("QuickTime");
+ cMovie = rb_define_class_under(mQuickTime, "Movie", rb_cObject);
rb_define_alloc_func(cMovie, movie_new);
rb_define_method(cMovie, "load_from_file", movie_load_from_file, 1);
rb_define_method(cMovie, "load_empty", movie_load_empty, 0);
View
@@ -1,15 +1,15 @@
#include "rmov_ext.h"
-VALUE eQuicktime;
+VALUE eQuickTime;
void Init_rmov_ext()
{
- VALUE mQuicktime;
+ VALUE mQuickTime;
EnterMovies(); // Enables the QuickTime framework
- mQuicktime = rb_define_module("Quicktime");
- eQuicktime = rb_define_class_under(mQuicktime, "Error", rb_eStandardError);
+ mQuickTime = rb_define_module("QuickTime");
+ eQuickTime = rb_define_class_under(mQuickTime, "Error", rb_eStandardError);
Init_quicktime_movie();
Init_quicktime_track();
Init_quicktime_exporter();
View
@@ -1,7 +1,7 @@
#include <ruby.h>
#include <QuickTime/QuickTime.h>
-extern VALUE eQuicktime, cMovie, cTrack, cExporter;
+extern VALUE eQuickTime, cMovie, cTrack, cExporter;
/*** MOVIE ***/
View
@@ -32,7 +32,7 @@ static VALUE track_load(VALUE obj, VALUE movie_obj, VALUE index_obj)
{
RTRACK(obj)->track = GetMovieIndTrack(MOVIE(movie_obj), NUM2INT(index_obj));
if (!RTRACK(obj)->track)
- rb_raise(eQuicktime, "Unable to fetch track for movie at index %d", NUM2INT(index_obj));
+ rb_raise(eQuickTime, "Unable to fetch track for movie at index %d", NUM2INT(index_obj));
return obj;
}
@@ -191,9 +191,9 @@ static VALUE track_set_offset(VALUE obj, VALUE seconds)
void Init_quicktime_track()
{
- VALUE mQuicktime;
- mQuicktime = rb_define_module("Quicktime");
- cTrack = rb_define_class_under(mQuicktime, "Track", rb_cObject);
+ VALUE mQuickTime;
+ mQuickTime = rb_define_module("QuickTime");
+ cTrack = rb_define_class_under(mQuickTime, "Track", rb_cObject);
rb_define_alloc_func(cTrack, track_new);
rb_define_method(cTrack, "load_from_movie", track_load, 2);
rb_define_method(cTrack, "raw_duration", track_raw_duration, 0);
@@ -1,4 +1,4 @@
-module Quicktime
+module QuickTime
# see ext/exporter.c for additional methods
class Exporter
attr_reader :movie
View
@@ -1,4 +1,4 @@
-module Quicktime
+module QuickTime
# see ext/movie.c for additional methods
class Movie
# Opens a movie at filepath.
View
@@ -1,4 +1,4 @@
-module Quicktime
+module QuickTime
# see ext/track.c for additional methods
class Track
# Returns the length of this track in seconds
View
@@ -7,6 +7,6 @@
require 'quicktime/exporter'
-# RMov is made up of several parts. To start, see Quicktime::Movie.
-module Quicktime
+# RMov is made up of several parts. To start, see QuickTime::Movie.
+module QuickTime
end
@@ -1,18 +1,18 @@
require File.dirname(__FILE__) + '/../spec_helper.rb'
-describe Quicktime::Exporter do
+describe QuickTime::Exporter do
it "should raise error when saving with no settings" do
- lambda { Quicktime::Exporter.new(nil).save_settings('foo') }.should raise_error(Quicktime::Error)
+ lambda { QuickTime::Exporter.new(nil).save_settings('foo') }.should raise_error(QuickTime::Error)
end
it "should raise error when atempting to load no file" do
- lambda { Quicktime::Exporter.new(nil).load_settings('foo/bar/baz') }.should raise_error(Quicktime::Error)
+ lambda { QuickTime::Exporter.new(nil).load_settings('foo/bar/baz') }.should raise_error(QuickTime::Error)
end
describe "loaded settings.st" do
before(:each) do
@load_path = File.dirname(__FILE__) + '/../fixtures/settings.st'
- @exporter = Quicktime::Exporter.new(nil)
+ @exporter = QuickTime::Exporter.new(nil)
@exporter.load_settings(@load_path)
end
@@ -23,7 +23,7 @@
end
it "should complain when attempting to save to an invalid file" do
- lambda { @exporter.save_settings('foo/bar/baz') }.should raise_error(Quicktime::Error)
+ lambda { @exporter.save_settings('foo/bar/baz') }.should raise_error(QuickTime::Error)
end
end
end
Oops, something went wrong.

0 comments on commit 180fcac

Please sign in to comment.