behaviour of bytevector

Matthieu Riolo matthieu.riolo at googlemail.com
Wed Apr 21 21:01:57 CEST 2010


Hello everybody

I've just an small question but the problem is it really confusing me.  
I wrote an obj-c wrapper around the taglib class and I tried to  
integrate the Ogg Vorbis METADATA_BLOCK_PICTURE into the wrapper. I  
tried to work ByteVector but it seems that it does not behaviour like  
I thought. But maybe I just did not understand what the idea is behind  
ByteVector. For me it was clear that the class just manipulates the  
memory in a comfortable way. However, I seem to be unabled to put the  
complete data into memory!


NSLog(@"%u",  
TagLib::String(TagLib::ByteVector(TagLib::ByteVector::fromUInt(10,  
true))).size());

The code above will return 1! I recognized this problem as I tried to  
set 4 bytes long integervalues with the quantity of 0. It occurs that  
the ByteVector contains the correct datasize but no data. This way  
ByteVector is always empty and will not append any data to his content  
(even if he resize correct).


So me question is: Did I missed something? Or did I just run over a  
strange obj-c vs c++ case? For me it's important to know if this  
"strip" effect is wished or not. Because in me case it is absolutly in  
the way.


Best regards, Matthieu Riolo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/taglib-devel/attachments/20100421/72b03e19/attachment.htm 


More information about the taglib-devel mailing list