Rockbox Development > Starting Development and Compiling

MP3 Player And Load Image In Rockbox's Plugin

(1/2) > >>

restart:
I want to make plugin that can play .mp3 file. Can anyone help me??

I want to load image .jpg too. In this page, there are wrote

--- Quote ---Images must be of the type const fb_data *
--- End quote ---
Is that mean i have to convert my .jpg file into const fb_data* ?? Can anyone explain to me how to convert it??

regards all

P.S. : I am using iPod 5.5.G

linuxstb:
There are no easy APIs for you to do that with in Rockbox.

For JPEG decoding, there is code in the standalone JPEG viewer plugin, but nowhere else.  Ideally you would move the JPEG code out of that viewer into a library, rewrite the viewer plugin to use that library, and then you could also use that code in your plugin...

For MP3 playback, you would need to use Rockbox's core playback engine.  I don't think anyone has done this before, so this is an opportunity for you to be ground-breaking...


Those probably weren't the answers you were looking for though.

restart:
so, what is the image file type that is compatible for rockbox?? in rockbox's plugin, there is plugin called logo, it is using image, isnt you?? how can be done??

linuxstb:
If you want to include a static image in your plugin (i.e. something similar to the logo), then you can use a ".bmp" file.

Look at the source code to the logo plugin, as well as the files in apps/plugins/bitmaps/ to see how this works.  Basically, the bmp is converted to .c file containing a static array by the Rockbox build system, and then that .c file is compiled and linked to your plugin.

Or there is a read_bmp() function you can use to load a bitmap at runtime.  rockpaint probably uses this.

restart:
oh, i see. i will try .bmp file.
it works.
thank's for linuxstb

-----------------------------------------------------------------------------------------------------------------------------

i want to play sound in my plugin, is there any sound file type (such as .wav) that i can play in my plugin?? ???

thank's for your help

Navigation

[0] Message Index

[#] Next page

Go to full version