Disregard my other post.. i had forgot to build the sample app with the write defines for mp4<br><br>it appears on windows everything runs fine:<br><br>C:\Coding Projects\taglibtest\Debug>taglibtest.exe aac-test.m4a<br>
******************** "aac-test.m4a" ********************<br>-- TAG --<br>title - "Born This Way (Bimbo Jones Club Remix)"<br>artist - "Lady GaGa"<br>album - "Born This Way (The Remixes, Pt. 2)"<br>
year - "2011"<br>comment - "(Bimbo Jones Club Remix)"<br>track - "5"<br>genre - "Pop"<br>-- AUDIO --<br>bitrate - 256<br>sample rate - 44100<br>channels - 2<br>length - 6:46<br>
<br>however my issue is on the android os. I took the code from the sample and put it into mine.. only changing the way of output (android log instead of cout) and the result is all blacks<br><br>06-13 22:58:34.975: INFO/NDK(4986): ********************<br>
06-13 22:58:34.975: INFO/NDK(4986): /mnt/sdcard/aac-test.m4a<br>06-13 22:58:34.975: INFO/NDK(4986): ********************<br>06-13 22:58:35.155: INFO/NDK(4986): -- TAG --<br>06-13 22:58:35.155: INFO/NDK(4986): title - <br>
06-13 22:58:35.155: INFO/NDK(4986): artist - <br>06-13 22:58:35.155: INFO/NDK(4986): album - <br>06-13 22:58:35.165: INFO/NDK(4986): comment - <br>06-13 22:58:35.165: INFO/NDK(4986): genre - <br>06-13 22:58:35.165: INFO/NDK(4986): -- AUDIO --<br>
<br>Using an mp4file instead of fileref i get this<br><br>06-13 23:12:02.844: INFO/NDK(5340): ********************<br>06-13 23:12:02.844: INFO/NDK(5340): /mnt/sdcard/aac-test.m4a<br>06-13 23:12:02.844: INFO/NDK(5340): ********************<br>
06-13 23:12:02.934: INFO/NDK(5340): -- TAG --<br>06-13 23:12:02.945: INFO/NDK(5340): title - <br>06-13 23:12:02.945: INFO/NDK(5340): 2011-03-25T07:00:00Z<br>06-13 23:12:02.945: INFO/NDK(5340): artist - <br>06-13 23:12:02.945: INFO/NDK(5340): 2011-03-25T07:00:00Z<br>
06-13 23:12:02.945: INFO/NDK(5340): album - <br>06-13 23:12:02.954: INFO/NDK(5340): 2011-03-25T07:00:00Z<br>06-13 23:12:02.954: INFO/NDK(5340): comment - <br>06-13 23:12:02.954: INFO/NDK(5340): 2011-03-25T07:00:00Z<br>06-13 23:12:02.954: INFO/NDK(5340): genre - <br>
06-13 23:12:02.954: INFO/NDK(5340): 2011-03-25T07:00:00Z<br>06-13 23:12:02.954: INFO/NDK(5340): -- AUDIO --<br><br>Awhile ago I had some issues with some MP3 tags being cutoff at around 5-6 letters.. but I found someone else with that issue and used that code. thats all that i did for modifications<br>
modified code:<br><br>void String::prepare(Type t)<br>{<br> switch(t) {<br> case UTF16:<br> {<br> if(d->data.size() >= 1 && (d->data[0] == 0xfeff || d->data[0] == 0xfffe)) {<br> bool swap = d->data[0] != 0xfeff;<br>
#ifndef __ANDROID__<br> // ORIGINAL TAGLIB CODE.<br> d->data.erase(d->data.begin(), d->data.begin() + 1);<br>#else<br> // ERASE FUNCTION RESPONSIBLE FOR DUPLICATE CHARACTER ON SOME POSITION OF STRING<br>
// CIRCUMVENTED BY THIS LOOP FOR NOW (bug reported to developer of Crystax NDK R5)<br> for(uint i = 0; i < d->data.size()-1; i++){<br> d->data[i] = d->data[i+1];<br> }<br> d->data.resize(d->data.size()-1);<br>
#endif<br><br>LOCAL_CFLAGS += -DTAGLIB_NO_CONFIG -DHAVE_ZLIB -DTAGLIB_WITH_MP4 -DWITH_MP4 -D__ANDROID__<br><br>
could this be something similar?<br><br>-Kyle<br><br>
On Sun, Jun 12, 2011 at 11:46 PM, Kyle <<a href="mailto:gonemad@gmail.com">gonemad@gmail.com</a>> wrote:<br>
> I am having no luck getting m4a tags to read properly with 1.7<br>
><br>
> If I use FileRef? the values for artist/album/genre etc are all blank.. if I<br>
> use Mp4File directly I get the same value for all of the fields<br>
><br>
> example.. i am scanning 3 files and log the output<br>
><br>
> log(ref.tag()->artist().<div id=":8f">toCString());<br>
> log(ref.tag()->album().toCString());<br>
> log(ref.tag()->title().toCString());<br>
> log(ref.tag()->genre().toCString());<br>
><br>
> These are the log results:<br>
><br>
> 06-12 21:39:51.547: INFO/NDK(3256): 1994<br>
> 06-12 21:39:51.577: INFO/NDK(3256): 1994<br>
> 06-12 21:39:51.577: INFO/NDK(3256): 1994<br>
> 06-12 21:39:51.587: INFO/NDK(3256): 1994<br>
> 06-12 21:39:51.807: INFO/NDK(3256): Lil Wayne<br>
> 06-12 21:39:51.837: INFO/NDK(3256): Lil Wayne<br>
> 06-12 21:39:51.837: INFO/NDK(3256): Lil Wayne<br>
> 06-12 21:39:51.837: INFO/NDK(3256): Lil Wayne<br>
> 06-12 21:39:51.987: INFO/NDK(3256): 2011-03-25T07:00:00Z<br>
> 06-12 21:39:51.987: INFO/NDK(3256): 2011-03-25T07:00:00Z<br>
> 06-12 21:39:51.997: INFO/NDK(3256): 2011-03-25T07:00:00Z<br>
> 06-12 21:39:51.997: INFO/NDK(3256): 2011-03-25T07:00:00Z<br>
><br>
> I am unsure what they were tagged with (most likely itunes).. as I do not<br>
> have any m4a files in my collection so I downloaded some random ones to<br>
> test.? Any ideas?<br>
<br>
Can you try the tagreader example application?<br>
<br>
Lukas</div>
<div style="visibility: hidden; left: -5000px;" id="avg_ls_inline_popup"></div><style type="text/css">#avg_ls_inline_popup{position: absolute;z-index: 9999;padding: 0px 0px;margin-left: 0px;margin-top: 0px;overflow: hidden;word-wrap: break-word;color: black;font-size: 10px;text-align: left;line-height: 130%;}</style>