Re: Writing a glib/vfs id3 library/MP3s to test.

> Interesting.  Have you considered collaborating with Thomas Vander
> Stichele on his media-info library?
I probably will when I've cleaned everything up a bit.

> As for using this in rb - well it would definitely be an improvement
> over the currently very gross libid3tag.
Maybe, or maybe not, using my core functions isn't that fun:
 gchar **strings = NULL;
 gid3frame *frame = g_id3_get_T___( tag, "TIT2", &strings, NULL );
 if( frame != NULL && strings[ 0 ] != NULL )
	 title = g_strdup( strings[ 0 ] );
	 title = g_strdup( "Untitled" );
 if( strings )
	 g_strfreev( strings );
Of course the most common things will be wrapped with simple functions.

> But I think it would be cleaner to have something GStreamer-based.
Not to worry, the library itself isn't a vfs library. It is a large
collection of functions/structs for reading from any string, be it a
stream, a file, or anything else:
 gid3tag *tag = g_id3_tag_new( );

 // Some stream stuff.

 // buffer = 10 bytes from stream
 if( g_id3_tag_read_header( tag, buffer ) != FALSE )
	 // Stream read tag->size bytes from the stream directly after
	 // current buffer.

	 g_id3_tag_read( tag, new_buffer );

	 // Do stuff with the tag.
	 some_function( tag );

 // Some more stuff.

 g_id3_tag_free( tag );
Brian Kerrick Nickel                                     kerrick gmx net

Attachment: signature.asc
Description: This is a digitally signed message part

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]