ruby-vorbistagger.git
12 years agoPrefer rb_funcall2() over rb_funcall(). master
Tilman Sauerbeck [Sun, 8 Apr 2007 12:42:37 +0000 (14:42 +0200)]
Prefer rb_funcall2() over rb_funcall().

12 years agoWork with non NUL-terminated comments, too.
Tilman Sauerbeck [Thu, 28 Dec 2006 16:28:15 +0000 (17:28 +0100)]
Work with non NUL-terminated comments, too.

12 years agoResolved wildcards in PKG_FILES. ruby-vorbistagger-0.0.1
Tilman Sauerbeck [Sat, 11 Nov 2006 12:47:36 +0000 (13:47 +0100)]
Resolved wildcards in PKG_FILES.

13 years agoRelaxed rules for Ogg::Vorbis::Comments#merge!.
Tilman Sauerbeck [Thu, 7 Sep 2006 16:08:25 +0000 (18:08 +0200)]
Relaxed rules for Ogg::Vorbis::Comments#merge!.

The method now supports any argument whose each method yields a
key-value pair (array).

13 years agoMade Ogg::Vorbis::Comments usable standalone, too.
Tilman Sauerbeck [Thu, 7 Sep 2006 10:57:41 +0000 (12:57 +0200)]
Made Ogg::Vorbis::Comments usable standalone, too.

13 years agoCode cleanup.
Tilman Sauerbeck [Sat, 19 Aug 2006 20:43:25 +0000 (22:43 +0200)]
Code cleanup.

13 years agoFixed a compiler warning.
Tilman Sauerbeck [Sat, 19 Aug 2006 08:11:52 +0000 (10:11 +0200)]
Fixed a compiler warning.

13 years agoSanitized vcedit_write() (and related) code some more.
Tilman Sauerbeck [Fri, 18 Aug 2006 19:16:23 +0000 (21:16 +0200)]
Sanitized vcedit_write() (and related) code some more.

13 years agoCode cleanup.
Tilman Sauerbeck [Fri, 18 Aug 2006 19:06:03 +0000 (21:06 +0200)]
Code cleanup.

13 years agoKeep the original file mode when writing files.
Tilman Sauerbeck [Fri, 18 Aug 2006 18:10:41 +0000 (20:10 +0200)]
Keep the original file mode when writing files.

13 years agoCode cleanup.
Tilman Sauerbeck [Fri, 18 Aug 2006 13:49:38 +0000 (15:49 +0200)]
Code cleanup.

13 years agoClose and remove the temporary file if vcedit_write() fails.
Tilman Sauerbeck [Fri, 18 Aug 2006 13:45:19 +0000 (15:45 +0200)]
Close and remove the temporary file if vcedit_write() fails.

13 years agoCheck the error flag when reading data.
Tilman Sauerbeck [Fri, 18 Aug 2006 13:38:30 +0000 (15:38 +0200)]
Check the error flag when reading data.

13 years agoCode cleanup.
Tilman Sauerbeck [Fri, 18 Aug 2006 13:32:15 +0000 (15:32 +0200)]
Code cleanup.

13 years agoHandle short writes gracefully.
Tilman Sauerbeck [Fri, 18 Aug 2006 13:29:37 +0000 (15:29 +0200)]
Handle short writes gracefully.

13 years agoMade Ogg::Vorbis::Tagger#close return nil.
Tilman Sauerbeck [Thu, 17 Aug 2006 19:26:48 +0000 (21:26 +0200)]
Made Ogg::Vorbis::Tagger#close return nil.

13 years agoMade the Ogg::Vorbis::Tagger object inaccessable after #close was called.
Tilman Sauerbeck [Thu, 17 Aug 2006 19:23:07 +0000 (21:23 +0200)]
Made the Ogg::Vorbis::Tagger object inaccessable after #close was called.

13 years agoSlightly reworked the final write loop.
Tilman Sauerbeck [Thu, 17 Aug 2006 17:57:20 +0000 (19:57 +0200)]
Slightly reworked the final write loop.

13 years agoCheck the EOF flag on zero reads.
Tilman Sauerbeck [Thu, 17 Aug 2006 17:27:43 +0000 (19:27 +0200)]
Check the EOF flag on zero reads.

13 years agoCode cleanup.
Tilman Sauerbeck [Thu, 17 Aug 2006 17:00:42 +0000 (19:00 +0200)]
Code cleanup.

13 years agoReworked the loop that finds the first ogg page in the input stream.
Tilman Sauerbeck [Thu, 17 Aug 2006 16:30:51 +0000 (18:30 +0200)]
Reworked the loop that finds the first ogg page in the input stream.

The loop also handles short reads gracefully now.

13 years agoCode cleanup.
Tilman Sauerbeck [Thu, 17 Aug 2006 16:15:49 +0000 (18:15 +0200)]
Code cleanup.

13 years agoReject filenames that are longer than PATH_MAX.
Tilman Sauerbeck [Thu, 17 Aug 2006 16:07:29 +0000 (18:07 +0200)]
Reject filenames that are longer than PATH_MAX.

13 years agoUse a flexiable array to store the filename.
Tilman Sauerbeck [Thu, 17 Aug 2006 16:03:15 +0000 (18:03 +0200)]
Use a flexiable array to store the filename.

13 years agoSanitized memory allocation scheme.
Tilman Sauerbeck [Thu, 17 Aug 2006 15:51:37 +0000 (17:51 +0200)]
Sanitized memory allocation scheme.

13 years agoMade MainTest#test_open_non_ogg_file pass.
Tilman Sauerbeck [Thu, 17 Aug 2006 15:40:31 +0000 (17:40 +0200)]
Made MainTest#test_open_non_ogg_file pass.

13 years agoAdded tests that ensure sane behaviour with non-existing/invalid files.
Tilman Sauerbeck [Thu, 17 Aug 2006 15:30:28 +0000 (17:30 +0200)]
Added tests that ensure sane behaviour with non-existing/invalid files.

13 years agoReworked error handling.
Tilman Sauerbeck [Thu, 17 Aug 2006 15:24:13 +0000 (17:24 +0200)]
Reworked error handling.

vcedit functions now return an error code instead of setting lasterror.
Ogg::Vorbis::Tagger turns these error codes into their own exception
classes.

13 years agoSeparated vcedit_state_new() and vcedit_open() again.
Tilman Sauerbeck [Thu, 17 Aug 2006 15:10:43 +0000 (17:10 +0200)]
Separated vcedit_state_new() and vcedit_open() again.

13 years agoMake sure we aren't keeping the input file opened.
Tilman Sauerbeck [Wed, 16 Aug 2006 19:24:47 +0000 (21:24 +0200)]
Make sure we aren't keeping the input file opened.

13 years agoCleaned up memory allocations.
Tilman Sauerbeck [Wed, 16 Aug 2006 19:12:06 +0000 (21:12 +0200)]
Cleaned up memory allocations.

Now we don't allocate the same chunks of memory in every call to
vcedit_open(), but we allocate the memory with the vcedit_state object
and keep it throughout its life time.

13 years agoCode cleanup.
Tilman Sauerbeck [Wed, 16 Aug 2006 17:50:28 +0000 (19:50 +0200)]
Code cleanup.

13 years agoAdded two tests that ensure that writing comments doesn't corrupt files.
Tilman Sauerbeck [Wed, 16 Aug 2006 17:10:06 +0000 (19:10 +0200)]
Added two tests that ensure that writing comments doesn't corrupt files.

13 years agoAdded a sample Ogg Vorbis file, so we don't depend on oggenc in the tests.
Tilman Sauerbeck [Wed, 16 Aug 2006 17:09:55 +0000 (19:09 +0200)]
Added a sample Ogg Vorbis file, so we don't depend on oggenc in the tests.

13 years agoMade Ogg::Vorbis::Tagger#close available again.
Tilman Sauerbeck [Wed, 16 Aug 2006 15:15:40 +0000 (17:15 +0200)]
Made Ogg::Vorbis::Tagger#close available again.

13 years agoAdded a configure check for rb_hash_foreach().
Tilman Sauerbeck [Tue, 15 Aug 2006 18:23:48 +0000 (20:23 +0200)]
Added a configure check for rb_hash_foreach().

13 years agoAdded .gitignore.
Tilman Sauerbeck [Tue, 15 Aug 2006 17:51:54 +0000 (19:51 +0200)]
Added .gitignore.

13 years agoAdded Ogg::Vorbis::Comments#shift.
Tilman Sauerbeck [Tue, 15 Aug 2006 17:40:25 +0000 (19:40 +0200)]
Added Ogg::Vorbis::Comments#shift.

13 years agoAdded Ogg::Vorbis::Comments#merge!.
Tilman Sauerbeck [Tue, 15 Aug 2006 17:03:18 +0000 (19:03 +0200)]
Added Ogg::Vorbis::Comments#merge!.

13 years agoFixed error handling in Rake::ConfigureTask::FooConfigTest#lookup_flags.
Tilman Sauerbeck [Tue, 15 Aug 2006 16:20:21 +0000 (18:20 +0200)]
Fixed error handling in Rake::ConfigureTask::FooConfigTest#lookup_flags.

13 years agoDon't try to close the temporary file.
Tilman Sauerbeck [Tue, 15 Aug 2006 16:17:38 +0000 (18:17 +0200)]
Don't try to close the temporary file.

13 years agoReworked output file writing.
Tilman Sauerbeck [Mon, 14 Aug 2006 20:04:56 +0000 (22:04 +0200)]
Reworked output file writing.

Ogg::Vorbis::Tagger can only operate on files now, since read-write
support cannot be implemented properly with streams. This allowed
fixing a corruption bug, that would break Ogg Vorbis files when writing
comments to them.

13 years agoFixed reopening of stdout and stderr.
Tilman Sauerbeck [Mon, 14 Aug 2006 16:12:35 +0000 (18:12 +0200)]
Fixed reopening of stdout and stderr.

They are now reopened to /dev/null instead of an temporary file that can
never be removed.

13 years agoOnly pass a single argument to Kernel.exec.
Tilman Sauerbeck [Mon, 14 Aug 2006 16:08:37 +0000 (18:08 +0200)]
Only pass a single argument to Kernel.exec.

13 years agoUse a valid exit code in Rake::ConfigureTask::Test#can_exec_binary?.
Tilman Sauerbeck [Mon, 14 Aug 2006 16:00:19 +0000 (18:00 +0200)]
Use a valid exit code in Rake::ConfigureTask::Test#can_exec_binary?.

13 years agoReworked Ogg::Vorbis::Comments' vorbis_comment interface.
Tilman Sauerbeck [Sat, 12 Aug 2006 22:42:30 +0000 (00:42 +0200)]
Reworked Ogg::Vorbis::Comments' vorbis_comment interface.

Ogg::Vorbis::Comments doesn't need to hold a reference to the
vcedit_state structure. Instead, now a pointer to that struct is passed
to comments_sync(), too. This means we no longer need to make
Ogg::Vorbis::Comments a class of type T_DATA.

13 years agoDon't mark global variables.
Tilman Sauerbeck [Sat, 12 Aug 2006 20:44:41 +0000 (22:44 +0200)]
Don't mark global variables.

13 years agoAdded Gem support.
Tilman Sauerbeck [Sat, 12 Aug 2006 20:34:22 +0000 (22:34 +0200)]
Added Gem support.

13 years agoDelete the temporary file when we're done with it.
Tilman Sauerbeck [Sat, 12 Aug 2006 20:03:53 +0000 (22:03 +0200)]
Delete the temporary file when we're done with it.

13 years agoReturn either Qtrue or Qfalse from Ogg::Vorbis::Comments#empty?.
Tilman Sauerbeck [Fri, 11 Aug 2006 16:35:11 +0000 (18:35 +0200)]
Return either Qtrue or Qfalse from Ogg::Vorbis::Comments#empty?.

13 years agoDon't store the key-value pair array in an instance variable.
Tilman Sauerbeck [Fri, 11 Aug 2006 16:24:10 +0000 (18:24 +0200)]
Don't store the key-value pair array in an instance variable.

13 years agoAdded common aliases for Ogg::Vorbis::Comments#has_key?.
Tilman Sauerbeck [Fri, 11 Aug 2006 15:37:25 +0000 (17:37 +0200)]
Added common aliases for Ogg::Vorbis::Comments#has_key?.

Aliases added are: key?, include? and member?.

13 years agoSplit MainTest#test_modify_key into two smaller tests.
Tilman Sauerbeck [Fri, 11 Aug 2006 14:50:16 +0000 (16:50 +0200)]
Split MainTest#test_modify_key into two smaller tests.

13 years agoFreeze the key in newly added entries in Ogg::Vorbis::Comments#[]=.
Tilman Sauerbeck [Fri, 11 Aug 2006 14:47:55 +0000 (16:47 +0200)]
Freeze the key in newly added entries in Ogg::Vorbis::Comments#[]=.

This makes MainTest#test_modify_key pass.

13 years agoAdded MainTest#test_modify_key.
Tilman Sauerbeck [Fri, 11 Aug 2006 14:41:02 +0000 (16:41 +0200)]
Added MainTest#test_modify_key.

This test asserts that it's not possible to change the keys in the
key-value pair arrays.

13 years agoFreeze the key-value pair arrays in Ogg::Vorbis::Comments.
Tilman Sauerbeck [Fri, 11 Aug 2006 14:28:58 +0000 (16:28 +0200)]
Freeze the key-value pair arrays in Ogg::Vorbis::Comments.

This protects them from being modified, which should never be necessary.

13 years agoTweaked Ogg::Vorbis::Comments#inspect.
Tilman Sauerbeck [Fri, 11 Aug 2006 14:09:24 +0000 (16:09 +0200)]
Tweaked Ogg::Vorbis::Comments#inspect.

13 years agoChanged the initialize size of the IO buffer to 0.
Tilman Sauerbeck [Fri, 11 Aug 2006 13:42:30 +0000 (15:42 +0200)]
Changed the initialize size of the IO buffer to 0.

It will be resized at every access anyway. It would be nice if we
could have a static buffer, but Ruby's API doesn't allow it atm.

13 years agoMade the IO buffer global.
Tilman Sauerbeck [Fri, 11 Aug 2006 13:40:05 +0000 (15:40 +0200)]
Made the IO buffer global.

There's no need to give each Ogg::Vorbis::Tagger instance its own
buffer. This should help memory consumption when there's more than
one Ogg::Vorbis::Tagger object around. The downside is that the buffer
object will be kept alive forever.

13 years agoMade sure that all comments are well-formed before they are parsed.
Tilman Sauerbeck [Fri, 11 Aug 2006 13:34:19 +0000 (15:34 +0200)]
Made sure that all comments are well-formed before they are parsed.

ie, check that every comment has a '=' sign somewhere, but not at
position 0.

13 years agoInitial commit.
Tilman Sauerbeck [Thu, 10 Aug 2006 16:05:32 +0000 (18:05 +0200)]
Initial commit.