-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FormatParser::IOConstraint API #128
Comments
Hi @krists!
The reason is that we wrap the initial IO object with a few proxy objects to do the following:
The API surface of Ruby's Some gems "want" to have more capabilities than |
@julik After a quick review I found only one place where |
Hello!
I am the author of ID3Tag and I have been reviewing how the gem is used in this library.
There were couple of things that I haven't thought of before and where solved in this library like v2 tag body read limit and single exception class that could be rescued while parsing.
After adding read limit functionality to the gem I tried to refactor
lib/parsers/mp3_parser.rb
andlib/parsers/mp3_parser/id3_extraction.rb
clases as there still is a lot of code that deals with tag internal structure.It would be possible to extract v1 and v2 tag sizes with simple:
But current FormatParser::IOConstraint API does not allow that. It's
read
andseek
methods has different arguments as Ruby's and it does not haverewind
.Is there a reason why
read
cannot be called without specifying length andseek
does have 2nd argument?If these interfaces would match then it would be realy easy to replace a lot of code with methods calls to
ID3Tag::AudioFile
The text was updated successfully, but these errors were encountered: