From: Laurent Sansonetti Date: 2007-07-04T19:15:45+09:00 Subject: Re: RubyOSA for QuickTime On 7/4/07, 12 34 wrote: > Laurent Sansonetti wrote: > > Hi, > > > > On 7/3/07, 12 34 wrote: > >> How do I access the properties of a QuickTime movie? I'm trying RubyOSA, > >> but am open to other ideas. > > > > Why not trying to access the QTKit framework from Ruby via RubyCocoa? > > Didn't know I could, and even if I had I didn't know what do to with it. > I thought RubyCocoa went to the other way. That is, to use Ruby in > XCode. But obviously it's more than that. Yes, it's a real bridge between the Objective-C and the Ruby runtimes. > > Here is an example that prints all the metadata properties of a given > > movie. > > > > $ cat a.rb > > require 'osx/foundation' > > OSX.require_framework 'QTKit' > > puts OSX::QTMovie.movieWithFile_error(ARGV[0], nil).movieAttributes > > > > HTH, > > Laurent > > Either I've already installed RubyCocoa or I can't. Neither machine will > allow the pkg installer to work. And I tried by hand recently on my iMac > desktop, and I got an error at some point. Ah, maybe you are running 10.4.10. The latest release won't install on it because of an installer bug, but we released a minor version, called RubyCocoa-0.11.1p1, that you can get from the usual location: http://sourceforge.net/project/showfiles.php?group_id=44114 > So unless I figure out how to get around that I'm up a creek. > > Also what is cat a.rb. I don't find cat in Ruby, and man cat, tell me > it's concatenate and pring; but that doesn't make sense to me in this > context. Much to learn. cat is an UNIX command-line tool that has nothing to do with Ruby here. Just look at the 3 lines of Ruby code :-) Laurent