Re: Gstreamer filter
- From: Christopher James Lahey <clahey ximian com>
- To: Adam Lofts <adam negligible co uk>
- Cc: Dashboard <dashboard-hackers gnome org>
- Subject: Re: Gstreamer filter
- Date: Tue, 09 Nov 2004 15:54:48 -0500
Le dimanche 07 novembre 2004 à 19:30 +0000, Adam Lofts a écrit :
> I've written a Gstreamer filter which currently extracts tags
> from .mp3, .ogg, .wmv, .asf and .flac. You need module gst-sharp installed
> (from mono cvs) and the relevant decoder plugin (e.g. gstreamer0.8-flac
> for flac tags).
> In theory, simply adding a mime type to the filter should enable video
> tag extraction of any video format nautilus will give you tag information
> about - but I can't test this since i have no tagged video
> files. Gstreamer should also be able to extract tags from images but I
> haven't got this to work yet.
So, this looks mostly okay. I've noticed that gst-sharp requires
gstreamer 0.8.7. Is this a hard requirement?
The main issue that I see is the mime type handling. It looks like
you're attempting to create filters and then letting them be garbage
collected to detect mime types. However, this happens every time the
filter gets created, which means every time a file is going to be
Instead of this, you should create a cache of mime types and fill this
cache in your Init function. Then, in your constructor, add the mime
types based on this cache. The cache should probably be an ArrayList
storing strings? (Someone with more mono knowledge should correct me on
this if I'm wrong.)
I haven't reviewed the code to do the actual reading of the tags, as I
don't know the gstreamer stuff very well. I assume this is correct
since you've tested it and it presumably works. My only concern in this
code would be the possibility that it reads to the end of the file, even
if the tags are at the beginning (and doesn't skip to the end if the
tags are always at the end.) Is this the case? And if so, is it
possible to avoid this?
Other than those two issues, the code looks fine. If you fix the cache
thing and test it, I'd be willing to commit this.
] [Thread Prev