Sign up here and you can log into the forum!

3/15/2013 Plugin: Random Music Player 1.1

The WDTVExt plugin depot. Plugins/libraries/code only

Re: 1/29/2013 Plugin: Random Music Player 1.0   

Postby sonic_blue » Thu Mar 14, 2013 2:09 am

recliq wrote:The \r suggests the file was edited in a non linux editor... (Windows? OSX?)
Try converting to to linux format using dos2unix.


IT WORKS!!! Thank you :D :D :D

Question for KAD, is it normal for the audio file to open as a video file? When I press fast forward on a folder, it plays the audio track as if it were a video (video playback OSD and progress bar along the bottom). Can I change some lines to get it to open in the Audio player instead?
Last edited by sonic_blue on Thu Mar 14, 2013 2:14 am, edited 1 time in total.
sonic_blue
DLX'er
 
Posts: 53
Joined: Wed Feb 20, 2013 8:31 am

Re: 1/29/2013 Plugin: Random Music Player 1.0   

Postby mad_ady » Thu Mar 14, 2013 2:13 am

There - you've made me open the script and take a peek inside :)

Hmm, judging from the bash -x output, your script dies at line #7 - the first find command.
FILELOOP_DIR is the first argument read...
So, you should try the sanitization method after line #5 and before #7...

Also - out of curiosity, what does this command return?
Code: Select all
which bash


Also, for the fun of it, you can try this as well: change line #5 to
Code: Select all
FILELOOP_DIR="/tmp/media/usb/USB1/989F-7BB5/Audio/"


In terms of debugging, echo will not show you \rs. You should pipe the output through less (or open it in vi), because they will show you \rs as ^M.

Edit: Never mind :)
User avatar
mad_ady
Developer
 
Posts: 4552
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: 1/29/2013 Plugin: Random Music Player 1.0   

Postby KAD » Thu Mar 14, 2013 7:38 am

sonic_blue wrote:
recliq wrote:The \r suggests the file was edited in a non linux editor... (Windows? OSX?)
Try converting to to linux format using dos2unix.


IT WORKS!!! Thank you :D :D :D

Question for KAD, is it normal for the audio file to open as a video file? When I press fast forward on a folder, it plays the audio track as if it were a video (video playback OSD and progress bar along the bottom). Can I change some lines to get it to open in the Audio player instead?


Glad it works

As for the xml/player used
I have noticed that before, but I don't know why it doesn't open the music player
I guess it was never a priority, since the controls FFW, RWD, etc still work
I think it would be usefull if somebody knows how to force it to open Music player or photo viewer for that matter
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: 1/29/2013 Plugin: Random Music Player 1.0   

Postby sonic_blue » Thu Mar 14, 2013 3:49 pm

Thanks KAD for this great plugin!

Although, I'm still curious about whether it's possible to find the value in memory that points to the "next track" that is scheduled to play by WDTV. If we could find this , then it would be a simple case of randomising it in a loop that executes in the background. Then, we wouldn't need wdtvext, ext3-boot, and could retain the original menu functionality.

Do you know if there is a log file, or some way of outputting in real time which shows all parameters and variables that relate to the thread that is currently running when Audio playback is taking place?

I notice that every time you change the playback mode (eg. between loop, shuffle, etc.) it generates a new "next track", so that could be the hook into finding which value needs to be randomised.
sonic_blue
DLX'er
 
Posts: 53
Joined: Wed Feb 20, 2013 8:31 am

Re: 1/29/2013 Plugin: Random Music Player 1.0   

Postby KAD » Thu Mar 14, 2013 4:12 pm

the binary dmaosd handles all playback and the osd as well

we can't change this binary
it's closed source
and it's done in MIPS ASM

as for log data
wdlxtv allows enabling dmaosd.log
which will output log data at /tmp/dmaosd.log

so yes, you can see some output, but still can't change the playback behavior
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: 1/29/2013 Plugin: Random Music Player 1.0   

Postby sonic_blue » Thu Mar 14, 2013 4:32 pm

KAD wrote:the binary dmaosd handles all playback and the osd as well

as for log data
wdlxtv allows enabling dmaosd.log
which will output log data at /tmp/dmaosd.log

so yes, you can see some output, but still can't change the playback behavior


Thanks. I'm not sure its the playback behaviour that would be changed, rather than randomising a parameter in memory. But, if as you say that parameter is owned by dmaosd then I guess we don't have access to it. One thing's for sure, I need to learn more about how linux works :lol:

Actually, I think I prefer the playback of audio files in video mode because it blanks the screen :)

The only problem is I can't see the meta-data such as artist and album, but then again a lot of my music doesn't have tags, so it doesn't really matter.

Overall, I'm very pleased with the outcome!
sonic_blue
DLX'er
 
Posts: 53
Joined: Wed Feb 20, 2013 8:31 am

Re: 1/29/2013 Plugin: Random Music Player 1.0   

Postby KAD » Thu Mar 14, 2013 5:13 pm

I'm sure that the randomized parameter is handled by dmaosd

as for meta data on screen
I'm sure that could actually be done with wdtvext
wdtvext can display extra data on screen

I'm not sure I'm up to doing it any time soon
but if I get bored, I'll keep it in the back of my mind
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: 1/29/2013 Plugin: Random Music Player 1.0   

Postby sonic_blue » Thu Mar 14, 2013 5:40 pm

KAD wrote:I'm sure that the randomized parameter is handled by dmaosd

as for meta data on screen
I'm sure that could actually be done with wdtvext
wdtvext can display extra data on screen

I'm not sure I'm up to doing it any time soon
but if I get bored, I'll keep it in the back of my mind


Might have a look at implementing that myself, if I can get my head around how plugins work :0

Also found the issue with the WEC errors. For some reason in /apps/WDTVExt/application.xml the <desc> tag was incorrectly closed with </dec>.

Now it all works perfectly :D
sonic_blue
DLX'er
 
Posts: 53
Joined: Wed Feb 20, 2013 8:31 am

Re: 1/29/2013 Plugin: Random Music Player 1.0   

Postby mad_ady » Thu Mar 14, 2013 10:37 pm

@sonic_blue: The reason why you can't really poke around in a program's private memory space goes back to the days of DOS. Back then, the memory was unprotected and any program could read and write any memory segment. This was generally fine for single tasking, but as multitasking grew, you would get the precursor of blue screen - the General Protection Fault (Windows 3.1 users will remember them).
Running an OS that guarantees memory protection ensures your program that no other process can tamper with its private memory, so it's less likely to crash because of external causes. Linux being Linux, you can still get a dump of a process memory and read its contents if you want to (Markster's MovieSheets+ wdtvext plugin does this to extract some album art and extra information from DMAOSD), but as far as I know you can't easily overwrite a different process memory space.

To start learning wdtvext plugins you would need to start reading this: http://wiki.wdlxtv.com/DevelopWDTVExtPlugin
Also, you can look through the code of existing plugins here: https://svn.wdlxtv.com/listing.php?repname=wdtvext-plugins

@KAD: How about adding your plugins to svn? Do you have any advantage hosting them on MediaFire?
User avatar
mad_ady
Developer
 
Posts: 4552
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: 1/29/2013 Plugin: Random Music Player 1.0   

Postby KAD » Fri Mar 15, 2013 7:48 am

@KAD: How about adding your plugins to svn? Do you have any advantage hosting them on MediaFire?


getting all of these into svn would be good
I've got svn credentials

but the fact of the matter is I don't know how to use svn, which is why I've never uploaded any of my wdtvext plugins, app.bin, or osd.bin's
if anybody wants to give me a crash coarse I'm up for it, or if you just want to upload them, that's fine too
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

PreviousNext

Return to WDTVExt plugins

Who is online

Users browsing this forum: No registered users and 1 guest