TetragrammatonHermit / naclports

Automatically exported from code.google.com/p/naclports
1 stars 0 forks source link

add mp3 decoder (libmad or libmpg123) #20

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Add either libmad or libmpg123 to naclports. I prefer libmpg123.

libmad: http://www.underbit.com/products/mad/
libmpg123: http://www.mpg123.de/api/

Neither of these should require patches but I haven't tried compiling them 
myself yet.

Original issue reported on code.google.com by jon.rafk...@gmail.com on 14 Oct 2011 at 9:03

GoogleCodeExporter commented 9 years ago
Hi! Why you prefer libmpg123?

Original comment by pavelkol...@gmail.com on 9 Jul 2012 at 8:48

GoogleCodeExporter commented 9 years ago
libmad does not have an API for streaming bytes from an mp3. You must have all 
the data available in memory so mad_frame_decode will function properly.

mpg123 has a streaming API based on read() that can collect more data from 
sources you specify.

Original comment by jon.rafk...@gmail.com on 9 Jul 2012 at 5:16

GoogleCodeExporter commented 9 years ago

Original comment by sbc@google.com on 1 Feb 2013 at 7:59

GoogleCodeExporter commented 9 years ago
Fixed in r730

Original comment by sbc@google.com on 13 May 2013 at 6:08

GoogleCodeExporter commented 9 years ago

Original comment by sbc@google.com on 13 May 2013 at 6:08

GoogleCodeExporter commented 9 years ago
Hi,

I want to know how can i port libmpg123 to pepper25,can any one tell me?

Thanks,
Saurav

Original comment by kumarsau...@gmail.com on 31 Jan 2014 at 3:29

GoogleCodeExporter commented 9 years ago
mpg123 is in naclports.  Have you tried building it?   What errors do you get?  
Feel free to open a new issue with the problems you are having.

pepper_25 is extremely old now.  pepper_32 is the current stable SDK version.  
Why do you need pepper_25 support?

Original comment by sbc@google.com on 31 Jan 2014 at 9:07

GoogleCodeExporter commented 9 years ago
I have downloaded pepper_32 but in its library mpg123 is not present by default.
Do i have to download it separately and then add it to existing pepper_32 
library?.
if yes what is the step for building and adding it to the pepper_32 library?

Original comment by kumarsau...@gmail.com on 2 Feb 2014 at 4:28

GoogleCodeExporter commented 9 years ago
You need to checkout the naclport repo and build the mpg123 library.

See the README at the top level to more on how to build the ports:
https://code.google.com/p/naclports/source/browse/trunk/src/README.rst

Original comment by sbc@google.com on 2 Feb 2014 at 10:51

GoogleCodeExporter commented 9 years ago
Hi,

Thanks for your reply.
I have tried this today in ubuntu,after running ./make_all.sh mpg123 command 
newly created .a files are created inside  usr/lib of ubuntu file system 
instead of pepper_32\toolchain.

Can you please tell me what mistake i am making? 
or Do i need to change the Makefile?

Original comment by kumarsau...@gmail.com on 3 Feb 2014 at 4:22

GoogleCodeExporter commented 9 years ago
Hmm, that should be impossible unless you are running the command as root 
(sudo), the build process for naclports should not have write access to the 
ubuntu /use filesystem.

Please can you open a new issue, and attach the full build output of "make 
mpg123"? (you might need to run 'make clean' first to make sure you are 
starting from scratch).

Original comment by sbc@google.com on 3 Feb 2014 at 4:46

GoogleCodeExporter commented 9 years ago
Hi,

Thanks for your reply.

I have builded mpg123 library using this command sudo NACL_ARCH=pnacl make 
clean mpg123.Now .a files are getting created inside 
/home/nacl_sdk/pepper_31/toolchain/linux_pnacl/usr/lib.

For testing whether my mpg123 library is working fine or not i started with an 
existing example of pepper_31 which is in folder pepper_31/gettingstarted/part2.

Here i have one helloworld.cc file in that i have added #include<mpg123.h> 
after this i got this error 

hello_tutorial.cc:8:20: error: mpg123.h: No such file or directory

Now i copy newly created mpg123.h file from  
/home/nacl_sdk/pepper_31/toolchain/linux_pnacl/usr/include. to 
pepper_31/include.

Now above error is gone but when i run the make again this error is coming

/home/saurav/nacl_sdk/pepper_31/toolchain/linux_x86_newlib/bin/../lib/gcc/x86_64
-nacl/4.4.3/../../../../x86_64-nacl/bin/ld: cannot find -lmpg123
collect2: ld returned 1 exit status

For solving this i have copied .a files from 
/home/nacl_sdk/pepper_31/toolchain/linux_pnacl/usr/lib to 
/home/nacl_sdk/pepper_31/toolchain/linux_x86_newlib/x86_64-nacl/lib

After this below error is coming

/home/saurav/nacl_sdk/pepper_31/toolchain/linux_x86_newlib/bin/../lib/gcc/x86_64
-nacl/4.4.3/../../../../x86_64-nacl/lib/libmpg123.a: could not read symbols: 
File format not recognized

Attach is my makefile and helloworld.cc files

Please help.

Original comment by kumarsau...@gmail.com on 17 Feb 2014 at 9:25

Attachments:

GoogleCodeExporter commented 9 years ago
Looks like you are bulding mpg123 for pnacl but your Makefile is trying build 
with the nacl-newlib toolchain.

Try 'make TOOLCHAIN=pnacl'.

Original comment by sbc@google.com on 18 Feb 2014 at 4:37