[prev in list] [next in list] [prev in thread] [next in thread] 

List:       taglib-devel
Subject:    behaviour of bytevector
From:       Matthieu Riolo <matthieu.riolo () googlemail ! com>
Date:       2010-04-21 19:01:57
Message-ID: 8CA725E9-5CCE-4794-BF43-3D5711141760 () googlemail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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.
[Attachment #5 (text/html)]

<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; \
-webkit-line-break: after-white-space; ">Hello everybody<div><br></div><div>I've just \
an small question but the problem is it really confusing me.&nbsp;I wrote an obj-c \
wrapper around the taglib class and&nbsp;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!</div><div><br></div><div><br></div><div><div style="margin-top: 0px; \
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal \
10px/normal Monaco; color: rgb(0, 116, 0); ">NSLog(@"%u", \
TagLib::String(TagLib::ByteVector(TagLib::ByteVector::fromUInt(10, \
true))).size());</div><div><br></div><div>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).</div><div><br></div><div><br></div><div>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.</div><div><br></div><div><br></div><div>Best regards, Matthieu \
Riolo.</div></div></body></html>



_______________________________________________
taglib-devel mailing list
taglib-devel@kde.org
https://mail.kde.org/mailman/listinfo/taglib-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic