Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  MP3 Player And Load Image In Rockbox's Plugin
« previous next »
  • Print
Pages: [1]

Author Topic: MP3 Player And Load Image In Rockbox's Plugin  (Read 2409 times)

Offline restart

  • Member
  • *
  • Posts: 14
MP3 Player And Load Image In Rockbox's Plugin
« on: June 13, 2008, 03:51:26 AM »
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 *
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
Logged

Offline linuxstb

  • Developer
  • Member
  • *
  • Posts: 1163
Re: MP3 Player And Load Image In Rockbox's Plugin
« Reply #1 on: June 13, 2008, 05:21:13 AM »
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.
Logged

Offline restart

  • Member
  • *
  • Posts: 14
Re: MP3 Player And Load Image In Rockbox's Plugin
« Reply #2 on: June 13, 2008, 06:06:52 AM »
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??
Logged

Offline linuxstb

  • Developer
  • Member
  • *
  • Posts: 1163
Re: MP3 Player And Load Image In Rockbox's Plugin
« Reply #3 on: June 13, 2008, 06:58:52 AM »
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.
Logged

Offline restart

  • Member
  • *
  • Posts: 14
Re: MP3 Player And Load Image In Rockbox's Plugin
« Reply #4 on: June 15, 2008, 03:32:44 AM »
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
« Last Edit: June 15, 2008, 05:51:20 AM by restart »
Logged

Offline mschneider

  • Member
  • *
  • Posts: 235
Re: MP3 Player And Load Image In Rockbox's Plugin
« Reply #5 on: June 15, 2008, 11:30:08 AM »
You should be able to play any file that is a supported format. I've been looking at doing this myself and the best strategy I've found (yet to be tested) Is to get the path of the file and then create and start a playlist around it.
Logged

Offline gnu

  • Member
  • *
  • Posts: 269
Re: MP3 Player And Load Image In Rockbox's Plugin
« Reply #6 on: June 15, 2008, 11:32:31 AM »
... or save the file as 16bit RAW PCM, load it into a buffer and play it with the API.
Logged

Offline restart

  • Member
  • *
  • Posts: 14
Re: MP3 Player And Load Image In Rockbox's Plugin
« Reply #7 on: June 15, 2008, 09:56:41 PM »
Quote from: mschneider on June 15, 2008, 11:30:08 AM
You should be able to play any file that is a supported format. I've been looking at doing this myself and the best strategy I've found (yet to be tested) Is to get the path of the file and then create and start a playlist around it.

what are the format files that is supported by rockbox?? is there any function that can play the files??
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  MP3 Player And Load Image In Rockbox's Plugin
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.082 seconds with 15 queries.