GP2X Multimedia Application On Gp2x


avatar1973

Still Fresh
Joined
Jan 16, 2006
Messages
3
Hi.

I am looking for developers who will be able to assist with the above mentioned project. Developers working on this project will be paid and I would appreciate a rough idea on how much this would cost. Please find a brief description of the project below:

-----
A simple multimedia application which will be able to playback a DivX file. The playback of the DivX file will be broken into different movie clips which will be specified through a text file. Each movie clip will have associated time codes which will mark the start and end of the clip.

After the playback of a movie clip the user will have to press a button on the GP2X and based on the correct answer in the text file, play another movie clip. It should keep track of the number of correct button selections. There should also be the possibility of pausing the program
during movie playback.
----

I apologise if this is not the right place to post a request such as this and would appreciate any help on where I should post. Thanks a lot.

Mark
 
sounds to me like something as the laserdisc games... sounds also like a nice idea.
 
This could be done shelling out to mplayer when required.

It need not be that hard to write as you would not need to code any sort of player (if you viewed the GP2X mplayer good enough for your purpose). Using SDL I think it's very possable.
 
It would be nice to have an version of Xdialog a linux tool for creating all kinds of dialog boxes from the command shell... It would be esp. nice if it had a file chooser and a skinable interface. This could all be done with SDL
 
Sounds like it could even be done with a shellscript, .... well, if you could input something in it :)

That was my 1st thought but I think needing a serial lead defeats the point ;)

Actually, I've hacked Sterm so that it runs any text-based app given on the command line instead of always running /bin/bash. A little more tweaking to provide a configurable button-keymap and an optional selector, and this *could* all be done with bash scripting.

It's not how I *would* do it, though. I'd probably use Python with the Pygames SDL mappings for the text screens, and mplayer for the video clips.
 
Last edited by a moderator:
It wouldn't be too hard to write a binary to read button a press (pass valid/expected buttons on commandline) and pass the button press to stdout for the shell script to handle..


Code:
answer=`read_button ABXR`
if [ "$answer" <blah>


I'll put something together ;)

P.

EDIT:

Here it is, didn't bother with limiting the keys you can press, you can check that in the shell script anyway. sets both exit code and message on stdout for further processing.
Code:
/*
 * readkey.c
 * (C) 2006 Pieter Luteijn
 * Reads a key for script to use.
 *
 */
#include <SDL/SDL.h>
#include <stdlib.h>
int main(int * ARGC, char ** ARGV)
{
  SDL_Event event;
  const char* buttonname[20]={
    "GP2X_BUTTON_UP",
    "GP2X_BUTTON_UPLEFT"        ,
    "GP2X_BUTTON_LEFT"          ,
    "GP2X_BUTTON_DOWNLEFT"      ,
    "GP2X_BUTTON_DOWN"          ,
    "GP2X_BUTTON_DOWNRIGHT"     ,
    "GP2X_BUTTON_RIGHT"         ,
    "GP2X_BUTTON_UPRIGHT"       ,
    "GP2X_BUTTON_START"         ,
    "GP2X_BUTTON_SELECT"        ,
    "GP2X_BUTTON_L"             ,
    "GP2X_BUTTON_R"             ,
    "GP2X_BUTTON_A"             ,
    "GP2X_BUTTON_B"             ,
    "GP2X_BUTTON_X"             ,
    "GP2X_BUTTON_Y"             ,
    "GP2X_BUTTON_VOLUP"         ,
    "GP2X_BUTTON_VOLDOWN"       ,
    "GP2X_BUTTON_CLICK"         ,
    "GP2X_BUTTON_UNKNOWN"       ,
  };

  if (SDL_Init(SDL_INIT_VIDEO|SDL_INIT_JOYSTICK)) {
    printf("INIT FAILED\n");
    exit(-1);
  }
  if (!SDL_JoystickOpen(0)) {
    printf("JOYSTICK FAILED");
    exit(-2);
  }
  while (1) {
    while (!SDL_PollEvent(&event)) {/* wait for keypress*/}
    /*TODO: filter illegal presses*/
    if (event.type == SDL_JOYBUTTONDOWN ) {
      printf("%s\n",
          buttonname[((unsigned)event.jbutton.button<20)?event.jbutton.button:20]);
      SDL_Quit();
      exit(event.jbutton.button);
    }
  }
}

compile with something like this:
Code:
/opt/local/gp2x/bin/arm-linux-gcc -o readkey readkey.c -lSDL -I /opt/local/gp2x/include/ -L /opt/local/gp2x/lib

Don't forget to strip ;)
 
Thanks for the responses. Ferentix is right in guessing the use of this application. Perhaps I should elaborate on this, the program will deliver a video followed by a question (or series of questions) all of which are part of this DiVX video file. The control file will look something like this:

start|00:01:21:00|00:01:21:00
lessonTP1|00:01:21:00|00:01:29:20
lessonTP2|00:01:29:21|00:02:03:03
question2_1|00:02:03:04|00:02:13:10||1|2|
correct2_1|00:02:13:11|00:02:18:28

Of course in the first version of this, it would only need to keep track of the total number of correct answers but in the future it would be nice if it could ask the user's name and track their score. Another useful feature would be to give the user the choice of which "quiz" to run.

The suggestions of using both a shell script and Python/Mplayer are great ideas. Which would be the more robust and flexible option keeping in mind the direction of the project? Some other points would be:

1. Is this feasible within 4 weeks?

2. Can anyone help out with this immediately?

3. How much would this cost?

At the moment, I am not sure of what sort of license to publish the application under. How in your view would the cost be affected by this? I am hoping feedback from everyone would help in the decision making process.

Thanks again for your time.
 
time and favourite (scripting) language needed would depend on the developer, but it can be done quite quickly, certainly within the 4 weeks if you don't have a laughably big curriculum.

I actually made something like this for use in history classes (pc-based) already, 10 years ago or so.. (no video, but static pictures with text, but still the same principle)

Price also depends on developer; I'd do it for free if I had time and nothing to do, just to get something interesting and meaningful to do. But, probably everyone familliar enough with the gp2x at this point in time has something more interesting to do with it, so you'd probably have to pay them something like their day-job's wage (or if still a student, enough to buy a box of beer/a serial cable for their 2x etc.) so they can take time of from work to do this ;)

Good luck finding someone to help you.

P.
 
After some consideration, I think I will want to release the application under a license that would allow anyone else to use the source code and make modifications. Hopefully, this will encourage people to feed back into the project adding more functionality as time goes by. I am afraid I am not well versed in the license types available - what would people suggest? Finally, I guess it's a matter of finding someone to do this :)

Thanks a lot for your time.
 
I am afraid I am not well versed in the license types available - what would people suggest?

BSD and GPL spring to mind. In a nutshell:
  • BSD: You may take this code and do whatever you want with it;
  • GPL: You may take this code but if you modify it and give it to someone else you must also give them the source of your modifications
It's a matter of preference -- and how much you'd hate to see your code used in a closed source, or even commercial product.

Of course, those licenses usually only govern the source code. You can license your original video clips differently, if you wish.

I won't comment on that though, since I don't know very much about licenses suited for that. You might try one of the Creative Commons licenses, but apparently RMS considers them "incompatible" with the GPL...? :unsure:
 
Last edited by a moderator:
I think the GNU boys think the Creative Commons license is too vague.. I find it fine and dandy for my video projects, though.

Allan.
 
Back
Top