m4a issues

Kyle gonemad at gmail.com
Tue Jun 14 01:13:11 CEST 2011


Disregard my other post.. i had forgot to build the sample app with the
write defines for mp4

it appears on windows everything runs fine:

C:\Coding Projects\taglibtest\Debug>taglibtest.exe aac-test.m4a
******************** "aac-test.m4a" ********************
-- TAG --
title   - "Born This Way (Bimbo Jones Club Remix)"
artist  - "Lady GaGa"
album   - "Born This Way (The Remixes, Pt. 2)"
year    - "2011"
comment - "(Bimbo Jones Club Remix)"
track   - "5"
genre   - "Pop"
-- AUDIO --
bitrate     - 256
sample rate - 44100
channels    - 2
length      - 6:46

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

06-13 22:58:34.975: INFO/NDK(4986): ********************
06-13 22:58:34.975: INFO/NDK(4986): /mnt/sdcard/aac-test.m4a
06-13 22:58:34.975: INFO/NDK(4986): ********************
06-13 22:58:35.155: INFO/NDK(4986): -- TAG --
06-13 22:58:35.155: INFO/NDK(4986): title   -
06-13 22:58:35.155: INFO/NDK(4986): artist  -
06-13 22:58:35.155: INFO/NDK(4986): album   -
06-13 22:58:35.165: INFO/NDK(4986): comment -
06-13 22:58:35.165: INFO/NDK(4986): genre   -
06-13 22:58:35.165: INFO/NDK(4986): -- AUDIO --

Using an mp4file instead of fileref i get this

06-13 23:12:02.844: INFO/NDK(5340): ********************
06-13 23:12:02.844: INFO/NDK(5340): /mnt/sdcard/aac-test.m4a
06-13 23:12:02.844: INFO/NDK(5340): ********************
06-13 23:12:02.934: INFO/NDK(5340): -- TAG --
06-13 23:12:02.945: INFO/NDK(5340): title   -
06-13 23:12:02.945: INFO/NDK(5340): 2011-03-25T07:00:00Z
06-13 23:12:02.945: INFO/NDK(5340): artist  -
06-13 23:12:02.945: INFO/NDK(5340): 2011-03-25T07:00:00Z
06-13 23:12:02.945: INFO/NDK(5340): album   -
06-13 23:12:02.954: INFO/NDK(5340): 2011-03-25T07:00:00Z
06-13 23:12:02.954: INFO/NDK(5340): comment -
06-13 23:12:02.954: INFO/NDK(5340): 2011-03-25T07:00:00Z
06-13 23:12:02.954: INFO/NDK(5340): genre   -
06-13 23:12:02.954: INFO/NDK(5340): 2011-03-25T07:00:00Z
06-13 23:12:02.954: INFO/NDK(5340): -- AUDIO --

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
modified code:

void String::prepare(Type t)
{
  switch(t) {
  case UTF16:
  {
    if(d->data.size() >= 1 && (d->data[0] == 0xfeff || d->data[0] ==
0xfffe)) {
      bool swap = d->data[0] != 0xfeff;
#ifndef __ANDROID__
      // ORIGINAL TAGLIB CODE.
      d->data.erase(d->data.begin(), d->data.begin() + 1);
#else
      // ERASE FUNCTION RESPONSIBLE FOR DUPLICATE CHARACTER ON SOME POSITION
OF STRING
      // CIRCUMVENTED BY THIS LOOP FOR NOW (bug reported to developer of
Crystax NDK R5)
      for(uint i = 0; i < d->data.size()-1; i++){
        d->data[i] = d->data[i+1];
      }
      d->data.resize(d->data.size()-1);
#endif

LOCAL_CFLAGS += -DTAGLIB_NO_CONFIG -DHAVE_ZLIB -DTAGLIB_WITH_MP4 -DWITH_MP4
-D__ANDROID__

could this be something similar?

-Kyle

On Sun, Jun 12, 2011 at 11:46 PM, Kyle <gonemad at gmail.com> wrote:
> I am having no luck getting m4a tags to read properly with 1.7
>
> If I use FileRef? the values for artist/album/genre etc are all blank.. if
I
> use Mp4File directly I get the same value for all of the fields
>
> example.. i am scanning 3 files and log the output
>
> log(ref.tag()->artist().
toCString());
> log(ref.tag()->album().toCString());
> log(ref.tag()->title().toCString());
> log(ref.tag()->genre().toCString());
>
> These are the log results:
>
> 06-12 21:39:51.547: INFO/NDK(3256): 1994
> 06-12 21:39:51.577: INFO/NDK(3256): 1994
> 06-12 21:39:51.577: INFO/NDK(3256): 1994
> 06-12 21:39:51.587: INFO/NDK(3256): 1994
> 06-12 21:39:51.807: INFO/NDK(3256): Lil Wayne
> 06-12 21:39:51.837: INFO/NDK(3256): Lil Wayne
> 06-12 21:39:51.837: INFO/NDK(3256): Lil Wayne
> 06-12 21:39:51.837: INFO/NDK(3256): Lil Wayne
> 06-12 21:39:51.987: INFO/NDK(3256): 2011-03-25T07:00:00Z
> 06-12 21:39:51.987: INFO/NDK(3256): 2011-03-25T07:00:00Z
> 06-12 21:39:51.997: INFO/NDK(3256): 2011-03-25T07:00:00Z
> 06-12 21:39:51.997: INFO/NDK(3256): 2011-03-25T07:00:00Z
>
> I am unsure what they were tagged with (most likely itunes).. as I do not
> have any m4a files in my collection so I downloaded some random ones to
> test.? Any ideas?

Can you try the tagreader example application?

Lukas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/taglib-devel/attachments/20110613/040f75b9/attachment.htm 


More information about the taglib-devel mailing list