Naming's a little corny. ;)
Not sure about the hash-style access.. might be good, though.
I started a Mediainfo gem a little while ago. I didn't put a ton of
thought into the API yet other than to try to be compatible with
RVideo::Inspector in some spots(although I haven't yet moved my app
off RVideo::Inspector). Most of the methods are derived from
Mediainfo's output.
http://github.com/greatseth/mediainfo
--
Seth Thomas Rasmussen
http://greatseth.com
Some more thoughts:
- The hash approach seems useful if you need to handle groups of
attributes in isolation and be able to compare, iterate, etc. I'm not
sure how useful that is. I was thinking I could add that behavior as
an option to my library though. The underlying structure is a big
hash, and with some fancy programming.. hmm..
- You gave FPS as an example.. with attributes like that, it seems
most useful to provide an API like this for each attribute: fps,
fps_units, fps_with_units. The main win is getting at the 'raw'
numbers in a standard way. On the other hand, some attributes could
very well imply units and do with a single accessor which returns a
number.