Author Topic: Greader2x for dingux 0.2  (Read 8276 times)

vimrc (OP)

  • *
  • Posts: 66
Greader2x for dingux 0.2
« on: October 24, 2009, 02:48:46 pm »
Hi, guys,

I fixed several annoying bugs of greader2x for dingux, so here it is.

Solved bugs:
1. Fix the problem that the audio and doc directory are always limited, so you can change them freely in the configure menu.
2. Fix the pause button in the player, it should be functional. (Use fifo file to control the mplayer in slave mode)
3. If the file format is m3u, you can use PageUp/PageDn (which are defined by yourself in the configure menu) to play  the next/previous song.

Known bugs:
It seems the mplayer in slave mode can't return the value when it finished playing an song, so mplayer can't play songs in the music list continuously except you use the m3u file. I don't know how to handle this problem, if you have idea, feel free to change the source and publish it. Thank you.

You can download the binary file and source from:
http://dl.openhandhelds.org/cgi-bin/dingoo.cgi?0,0,0,0,1,198 

batman52

  • *
  • Posts: 111
Re: Greader2x for dingux 0.2
« Reply #1 on: October 24, 2009, 09:18:12 pm »
Hi vimrc!
Nice to see you're still working on it!
I'll try the new version as soon as i can.

I think that the most feasible workaround for mplayer is to create a temporary playlist file. That shouldn't be too difficult
So that when you enter into the music menu you'll have to chose between:
- play file (single file or playlist)
- folder (through temporary playlist file)

Once the player has started, you should be able to obtain artist, song and other infos into the id3 tags through the mplayer commands. Therefore you could realize a sort of 'playing' application like that of the original firmware.

vimrc (OP)

  • *
  • Posts: 66
Re: Greader2x for dingux 0.2
« Reply #2 on: October 24, 2009, 11:16:32 pm »
Hi vimrc!
Nice to see you're still working on it!
I'll try the new version as soon as i can.

I think that the most feasible workaround for mplayer is to create a temporary playlist file. That shouldn't be too difficult
So that when you enter into the music menu you'll have to chose between:
- play file (single file or playlist)
- folder (through temporary playlist file)

Once the player has started, you should be able to obtain artist, song and other infos into the id3 tags through the mplayer commands. Therefore you could realize a sort of 'playing' application like that of the original firmware.

It's true. I can use an simple shell script with input argv to solve this problem. I'm just thinking there should be an communication mechanism between SDL and Mplayer. Let's say, we can use a temporal background playlist to 'cheat' the user, but when the Mplayer switches to the next song, the cursor in the SDL playlist should also switch to the next song. It seems Mplayer doesn't want to tell the SDL program what it is doing, so I don't know how to synchronize the two events. :(

batman52

  • *
  • Posts: 111
Re: Greader2x for dingux 0.2
« Reply #3 on: October 25, 2009, 02:42:13 am »
You can always periodically poll mplayer to know what's the current playing song when you're into the playlist menu.

vimrc (OP)

  • *
  • Posts: 66
Re: Greader2x for dingux 0.2
« Reply #4 on: October 25, 2009, 09:31:57 am »
I don't like to poll the mplayer periodically, it will generate problems especially the length of songs are quite different. But it seems the only way is to use the "get_file_name". Anyway, i will try it.

At the current stage, I think it's better to create different m3u playlists in GMU, so you can call them in Greader2x conveniently. You can also use pageup/pagedn to switch songs although the playlist won't display the current song (maybe I can also use "get_file_name" to refresh the playlist).   

batman52

  • *
  • Posts: 111
Re: Greader2x for dingux 0.2
« Reply #5 on: October 27, 2009, 01:55:13 pm »
For 'periodically' I meant once every 1 or 2 seconds. This shouldn't be a problem for the software side (the problem when polling is congestioning the system), and user would notice just a small delay between song switching and the display actually changing. Moreover it has to be done just in the "playlist view", therefore when greader2x is not doing anything else but playing music. It looks a quite fair compromise to me. In addition, I would use the get_file_name function only when ID3 tags info are not available.
« Last Edit: October 27, 2009, 01:56:50 pm by batman52 »

vimrc (OP)

  • *
  • Posts: 66
Re: Greader2x for dingux 0.2
« Reply #6 on: October 27, 2009, 02:56:41 pm »
Yes, I am trying. :)

There is a mp3 command-line tools called madplayer in the latest rootfs, it works well. I think it's
more suitable because mplayer is an overkill in my opinion. Maybe greader2x could add an player
option menu in the future. (You know, for those people who pursue the latest package and don't
want to tune anything, madplayer is a good choice. Especially in the latest local package, the mplayer
 is removed. I also think let madplayer work in the background is possible.)

Well, maybe I should let the player of greader2x return to its original appearance if I found these player
working in the background mode are both unsuitable. This way is more easy and it will kill the annoying
problems even though I don't like it anymore. :)
« Last Edit: October 27, 2009, 03:09:49 pm by vimrc »

batman52

  • *
  • Posts: 111
Re: Greader2x for dingux 0.2
« Reply #7 on: October 27, 2009, 03:20:42 pm »
I don't completely agree: Madplay would only support mp1-2-3 files. The point of mplayer is that it supports "out of the box" a huge number of (even cumbersome) music formats, included playlists (a short list of the most common: ogg, flac, aac, wav, wma). i often like to listen complete albums *in the right order*, so that i get very angry sometimes with my mp3 players when they just read the directory and want to change the track order...

If you don't want to stick with mplayer, I believe that return to the original behavior of the player (SDL_play) would be better than madplay.

Anyway, mine are just suggestions.
« Last Edit: October 27, 2009, 03:24:21 pm by batman52 »

vimrc (OP)

  • *
  • Posts: 66
Re: Greader2x for dingux 0.2
« Reply #8 on: October 27, 2009, 04:01:09 pm »
;) Personally I am on your side, so I will maintain the mplayer version inevitably.
Don't worry about that. Thank you for your good suggestions.

batman52

  • *
  • Posts: 111
Re: Greader2x for dingux 0.2
« Reply #9 on: November 01, 2009, 01:03:18 pm »
Hi vimrc!
I have created an installer package creator for greader2x. Here is the modified archive with sources:
http://rapidshare.com/files/300897091/greader2x_src_ipkg.zip.html

You just need to install ipkg-utils, as described here:
http://boards.dingoonity.org/dingux-development/how-to-manage-software-packages-with-ipkg-in-dingux/

Basically i should just care about the makefile and the "ipk" folder i added. Hope you can merge them with your sources.

I plan to rip out the "audio interface" in order to create a backgroung player control ui, since zear reported audio playback does not slow down gaming in psx4all, so that music could be listened in background with mute applications (if any).
« Last Edit: November 01, 2009, 05:39:12 pm by batman52 »

vimrc (OP)

  • *
  • Posts: 66
Re: Greader2x for dingux 0.2
« Reply #10 on: November 01, 2009, 07:34:43 pm »
Hi, batman52,

I just saw your post. It seems rapidshare is a stupid site, the maximum download number for a file is limited, so I don't have right to download it... I will try it as soon as possible if I got the package. Thank you!

For the background music for psx4all, I just release a very simple script in Emulator board. :)

« Last Edit: November 01, 2009, 07:37:09 pm by vimrc »

batman52

  • *
  • Posts: 111
Re: Greader2x for dingux 0.2
« Reply #11 on: November 01, 2009, 09:03:36 pm »

vimrc (OP)

  • *
  • Posts: 66
Re: Greader2x for dingux 0.2
« Reply #12 on: November 01, 2009, 10:49:54 pm »
It's cool to use ipkg! Enn... Debian guys.  8)
I also got your mplayer script and will check it when I have time, think we can handle this problem.

batman52

  • *
  • Posts: 111
Re: Greader2x for dingux 0.2
« Reply #13 on: November 22, 2009, 08:21:37 am »
I have created my own version of the player routines removing all the SDL_mixer stuff, created my executable that only includes the player... but i wasn't able to figure out how to exit the interface WITHOUT exiting mplayer too (tried forking the process, threading, use the shell command nohup). I thought it would be easy but evidently i wrong... any clever ideas on how to achieve this?
BTW: it works as expected on my x86 machine ... grrr!

ctrl_shift_esc

  • Guest
Re: Greader2x for dingux 0.2
« Reply #14 on: November 25, 2009, 11:49:25 pm »
i tried to replace the old files with this version and it's not launching anymore. what am i doing wrong?

batman52

  • *
  • Posts: 111
Re: Greader2x for dingux 0.2
« Reply #15 on: November 26, 2009, 07:49:16 am »
i tried to replace the old files with this version and it's not launching anymore. what am i doing wrong?

You mean that you tried to compile them?

DISCLAIMER: The files i posted aren't a replacement or an improvement of greader2x: they are just part of one project of mine intended to created a GUI interface to mplayer ( currently not working as i intended it :-( ).

ctrl_shift_esc

  • Guest
Re: Greader2x for dingux 0.2
« Reply #16 on: November 30, 2009, 10:28:57 pm »
Thanks, batman, I was sure not talking about your files  ;) I already figured out my mistake.
So, now I'd like to request some help, please as the native reader turned out to be a bit worthless and I can't configure Greader right.
Mostly I read texts in cyrillic which is always a pain in the ass considering these text codings and so on. I was so glad to know it reads cyrillic, but there are two distressing things I can't get rid of myself:
1) It never seems to read cyrillic "Х", leaving me with some boxes and dots instead. see arrows.
2) The alignment is funny, leaving huge gaps for no obvious reason.



I'd appreciate any kind of help as my english is still far from reading Moby Dick in the original.

batman52

  • *
  • Posts: 111
Re: Greader2x for dingux 0.2
« Reply #17 on: December 02, 2009, 08:07:15 am »
@ctrl_shift_esc: the only thing that comes into my mind is that i noticed an xhtml file called "english.lng".
Moreover, into the greader2x.cfg appears an entry:

Language="english.lng"

I never changed it because it works fine with italian accents, though. Don't know if messing around with it could actually be useful.

ctrl_shift_esc

  • Guest
Re: Greader2x for dingux 0.2
« Reply #18 on: December 06, 2009, 10:37:39 am »
@ctrl_shift_esc: the only thing that comes into my mind is that i noticed an xhtml file called "english.lng".
Moreover, into the greader2x.cfg appears an entry:

Language="english.lng"

I never changed it because it works fine with italian accents, though. Don't know if messing around with it could actually be useful.
Tried changing language - no luck

ejr

  • *
  • Posts: 14
Re: Greader2x for dingux 0.2
« Reply #19 on: January 07, 2010, 11:55:49 pm »
Hi, I have the same problem with letter ą (a with a comma)in polish. Every letter from polish alphabet is shown correctly except that one in documents coded in UTF-8.

edited: Ok, I managed to fix this problem. I uploaded to the card some more tt fonts, changed main font to times.ttf and every polish letter is shown correctly :) ctrl_shift_esc just code your documents in UTF and try with different fonts and it should work :)
« Last Edit: January 09, 2010, 06:51:33 pm by ejr »
DS & Dingoo user