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
|-+  Support and General Use
| |-+  Plugins/Viewers
| | |-+  how do I start a video (any viewer) from my code?
« previous next »
  • Print
Pages: [1]

Author Topic: how do I start a video (any viewer) from my code?  (Read 1684 times)

Offline schnittlauch

  • Member
  • *
  • Posts: 2
how do I start a video (any viewer) from my code?
« on: October 30, 2007, 12:52:37 PM »
Hello,

I am pretty new to rockbox developing. I just started this a couple of weeks ago because I have to write a little application to use the ipod as a touristic city guide (university project).

Most of what I am doing consist of pretty dirty hacks as I have not much idea about c programming (also I am disabling most of the standard functionality because it would be too complicated for the users).

Now I'd like to include video playback. But the user should not have control over the filemenu.
The videos should be started from my code.
Unfortunately I can't seem to figure out how to start a viewer from code. Especially the mpegviewer! How is this done in the normal rockbox filemenu?

I thought that you would call the viewer.rock file with a couple of parameters - or am I wrong?

thanks in advance
cheers
schnittlauch
Logged

Offline dionoea

  • Member
  • *
  • Posts: 30
Re: how do I start a video (any viewer) from my code?
« Reply #1 on: October 30, 2007, 01:24:32 PM »
You can't launch any other plugin while one is runing. So what you're asking is basically impossible (unless your plugin has some video playback code).
Logged

Offline linuxstb

  • Developer
  • Member
  • *
  • Posts: 1163
Re: how do I start a video (any viewer) from my code?
« Reply #2 on: October 30, 2007, 01:39:19 PM »
Whilst you can't start one plugin whilst another is running, you could just put the code in core Rockbox, meaning you would be capable of launching plugins.  It sounds like you may already be doing this, if you're disabling standard features.

As an example, you could look at how the "Properties" context menu item is handled - this starts the file properties viewer plugin with the currently selected file as a parameter.
Logged

Offline schnittlauch

  • Member
  • *
  • Posts: 2
Re: how do I start a video (any viewer) from my code?
« Reply #3 on: October 30, 2007, 02:13:53 PM »
thanks for the fast answers.

yes I am already messing with the core ;)
that's why it's sometimes a bit hard to find the right functions or even places to put my own code.

And shame on me for the fast posting. I just found it:
plugin_load("/.rockbox/rocks/viewers/mpegplayer.rock", "/test.mpg");
from plugins.c I think - I put it on a button and it works.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Plugins/Viewers
| | |-+  how do I start a video (any viewer) from my code?
 

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

Page created in 0.073 seconds with 15 queries.