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: 3/15/2013 Plugin: Random Music Player 1.1   

Postby sonic_blue » Sat Mar 16, 2013 12:13 am

ugh..I think I'd rather play music in the video player as the screensaver doesn't come on when the script is active. With the video player you get a blank screen (avoids image retention, and can Enter button to see what's playing if needed). Plus, you can use the back button to cycle to the next random track, eg. if you don't like the current track, and the Pause button works too.

Also I found that putting "sleep 5" before every "play" command in RandomMusicPlayerLoop seems to stop dmaosd from crashing.
sonic_blue
DLX'er
 
Posts: 53
Joined: Wed Feb 20, 2013 8:31 am

Re: 3/15/2013 Plugin: Random Music Player 1.1   

Postby KAD » Sat Mar 16, 2013 7:51 am

to use the video player, you probably guessed, just edit upnp-meta and remove all those music codecs

sleep 5 , I'll need to test it, but sounds like a reasonable add
or if that is what is actually crashing dmaosd, it might be better just edit the loop so that it only initiates playback, once status has changed to stop
right now it will accept transition, either way just adds an extra moment of pause before next track is played

upnp-cmd seek
haven't played with these at all
but if they are working, in theory one could map all the keys needed via wdtvext

also on key press, does not accept key names, it accepts key numbers
to get the number look at dmaosd.log
it will show you the key number pressed

Regarding Play/Pause, I only briefly tested with music player, but thought play/pause was working
also Play/Pause is actually the same button on remote, so that might cause an issue
probably if it's not working, you will need to check the device status first
ie. press key, check status if status is play, send pause
if status is pause, send play
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: 3/15/2013 Plugin: Random Music Player 1.1   

Postby sonic_blue » Sat Mar 16, 2013 5:58 pm

KAD wrote:also on key press, does not accept key names, it accepts key numbers
to get the number look at dmaosd.log
it will show you the key number pressed


I'm not seeing the key numbers pressed, nor am I seeing any references to .xml files when I navigate around the OSD. Do I have to set a higher debug mode for dmaosd?
sonic_blue
DLX'er
 
Posts: 53
Joined: Wed Feb 20, 2013 8:31 am

Re: 3/15/2013 Plugin: Random Music Player 1.1   

Postby sonic_blue » Sat Mar 16, 2013 7:17 pm

Just a tip for anyone that might be reading this, if you can't get Random Music Player to work satisfactorily, you can also try firmware 1.03.49 as its shuffle is properly random in that version.

But, the downside is that it's not as compatible with as many file formats, so for example if it shuffles to some obscurely encoded .mp4a or .flac, then it can hang on the audio playback screen until you press a button.

Another con is that you can't just pick a folder and tell it to shuffle everything in that folder and its subfolders, as it only shuffles a list of files within one folder.
sonic_blue
DLX'er
 
Posts: 53
Joined: Wed Feb 20, 2013 8:31 am

Re: 3/15/2013 Plugin: Random Music Player 1.1   

Postby KAD » Sat Mar 16, 2013 7:45 pm

wec has 3 options for dmaosd.log
disabled
file
file + stderr

just a quick example

dmaosd.log
Code: Select all
smbtree_3.5.6.c[1067], It's finish to search samba server(s). id:[2]
V.WDLXTV_LIVE-0.5.1.5-dev&mac=00:90:a9:76:56:52
userpwd =
user_agent = (null)
mode = 0
ftp_download_data, 474, download file from server successfully.
fwupwd_check_update, 950, pkg_url=currentversion

gui_handler_rp_free, 2558,welcome.xml is popped
TEXT:[$$Video]
ServerHandler.c[899], device_name[WDLXTV-LIVE] vs FriendlyName[WDLXTV-LIVE]
weather/DMA_Weather.c[141], return_cnt = [7]
 WEATHER_OBJECT_weather_browse_cb,60 ErrorCode:0, state:1
TEXT:[$$Video]
TEXT:[$$Video]


  vf_rebuild_root, 573, /tmp/media/usb/USB1 rebuild done, it takes 0 seconds 

key pressed
TEXT:[$$Local Drives]
key pressed
key pressed
TEXT:[$$USB1]
key pressed
key pressed
villa_home_usb0_video_node_on_select(4610)
browser_handler_browse_object_set_function[933], server type = 1
browser_handler_create_browser_object[1260], Server: /tmp/media/usb/USB1/9640-9087_UDN_LOCAL_DEVICE register callback
bo id: 1, request id: 1
browser_handler_browse[1391],(1:1), id :3/tmp/media/usb/USB1/ : 0 / 7
Create a empty object result for keep browsing result
browser_handler_browser_object_search_cache[446], 0[64], total: -1
browser_handler_browser_object_search_cache[447], 0[0]
lcb_folder_parse[835], path:[/tmp/media/usb/USB1/]
create_lcb_resultlist[1082], May opendir fail: /tmp/media/usb/USB1/.
browser_handler_call_back_func[722], Errorcode = 902
key pressed
Active button: [OK]
key pressed
gui_handler_rp_free, 2558,ok_messagebox.xml is popped
browser_handler_free_browse_object_result[199], free result(3/tmp/media/usb/USB1/): 0 : 0
browser_handler_free_browse_object_result[200], free resutl start: 0 : 64 : 0



what I was surprised that I did not see was the key #'s
that could be that this version is as mentioned earlier an unfinished work in progress
all previous officially released versions with wdtvext included the wdtvext logging as part of dmaosd.log

here's a small portion of wdtvext.log
Code: Select all
_trace_send: add message 0xd2d5b0 (102,  0xd1d950)_trace_send: add message 0xd1bbb0 (136,  0xd3bac0)_trace_send: add message 0xcf6b38 (115,  0xcf6ac0)_trace_send: add message 0xcf6838 (119,  0xcf67b8)_trace_send: add message 0xcf6860 (125,  0xcf6870)_trace_send: add message 0xcf69a0 (119,  0xcf6920)RandomMusicPlayer: [onPageKey] page: villa_home.xml   key: 38
_trace_send: add message 0xbf2868 (122,  0xbf27e8)_trace_send: add message 0xbf28f8 (122,  0xbf2878)_trace_send: add message 0xbf2988 (119,  0xbf2908)_trace_send: add message 0xbf29b0 (125,  0xbf29


this will only show up if the plugins enable actually loggers, but as you can see above RandomMusicPlayer has the needed loggers
and prints both the page and the key #

also for key #'s you can try checking various plugins already created
I think most key's have been explored/mapped at one point or another
6 different keys are used in this plugin alone
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: 3/15/2013 Plugin: Random Music Player 1.1   

Postby sonic_blue » Mon Mar 18, 2013 1:05 am

Another problem I'm having is that the boot up time of 1.05dev from a USB drive is excrutiating -- around 2-3 minutes. I've tried disabling as many daemons, apps and processes as possible, but it doesn't seem to help.

Is it possible in theory to build a flash version of 1.05dev that supports wdtvext? Are there any tools I can use to convert the root.bin to a flashable .bin, .fff and .ver file?

Also I believe it would be possible to avoid the screen saver issue by slightly modifying your videoscreensaver app.

edit:
if anyone needs it here is a link to the official 1.03.49-Live firmware, as it's a bit difficult to find. It's the last stable version of the official fw which has a truly random shuffle. If you want to shuffle an entire folder you just have to create a playlist (i used Oplisker) of everything in each folder, and play the playlist. I tried WDLXTV 1.03.49 but found that it won't go into true 0 watts standby mode (requires /proc/tangoxfrequency trickery and even still draws 2-3 watts in standby...unacceptable to me).

So, for the time being I'm using official 1.03.49, until such time that a flash build can be made of 1.05dev to avoid the horrendous boot times.
sonic_blue
DLX'er
 
Posts: 53
Joined: Wed Feb 20, 2013 8:31 am

Re: 3/15/2013 Plugin: Random Music Player 1.1   

Postby mad_ady » Mon Mar 18, 2013 1:59 am

You're going to have issues converting the 1.05-dev root.bin to a flashable firmware - mostly because it will generate a firmware too big to flash (>91MB). The plus variant of 1.05 has an extra file (.bi2) that has most of the extra stuff (the web server, ftp, etc) and this file is flashed in a different part of the system. The live 1.05 variant firmware was still a hair under the 91MB limit, so it hasn't been converted to bi2 format.

Adding wdlxtv will probably push the firmware over the top and somebody will need to do the conversion to bi2.

It is doable, but it involves doing some system integration, copying some startup code from the plus branch and doing some testing. There is a small chance of bricking (so you'd better have a serial cable ready).

I'm not sure if the wdtvext has any restrictions running from flashed source (it was still under development when pibos went dark again), but apart from the location of the log file, I doubt it would pose any problem...

The general plan (almost a year ago) was to transform the live firmware to bi2 format and add wdtvext support, but b-rad and recliq have been caught in other projects and this project remained dormant.

I can't find right now the structure of the firmware file on the forum, but you can start reading here: http://geraldnaveen.blogspot.ro/2012/11/wdtv-live-firmware-hacking-series-part-1.html
User avatar
mad_ady
Developer
 
Posts: 4522
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: 3/15/2013 Plugin: Random Music Player 1.1   

Postby KAD » Mon Mar 18, 2013 7:38 am

I believe it would be possible to avoid the screen saver issue by slightly modifying your videoscreensaver app


I'm not aware of any issues with the screen saver
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: 3/15/2013 Plugin: Random Music Player 1.1   

Postby sonic_blue » Mon Mar 18, 2013 7:48 pm

KAD wrote:
I believe it would be possible to avoid the screen saver issue by slightly modifying your videoscreensaver app


I'm not aware of any issues with the screen saver


Well, the issue seems to be that the screen saver doesn't engage while using random music player, presumably because it's causing events every time it picks a new track which resets the screensaver's timer.

Anyway, it's not really needed for playback in video mode as it blanks the screen anyway. I didn't realise your videoscreensaver was a .bin so I couldn't modify it anyway. I think it might be possible to force a screensaver with a simple script though.

Also firmware 1.03 is total crap. It can't handle a large playlist. Just sits there for 10 minutes trying to load it and eventually freezes :lol:

Looks like it's back to 1.05dev + random music player for me :)
sonic_blue
DLX'er
 
Posts: 53
Joined: Wed Feb 20, 2013 8:31 am

Re: 3/15/2013 Plugin: Random Music Player 1.1   

Postby KAD » Mon Mar 18, 2013 9:33 pm

videoscreensaver.app.bin also has wdtvext plugin version
and an app.bin is just an cramfs or ext3 image with a specific layout of meta files
and does not use wdtvext

however either version of videoscreensaver, I doubt will work at the same time as RandomMusicPlayer
because they are nearly identical in how they start playback
it's still upnp-cmd ....

and once one is started, starting another will probably crash dmaosd
well that's what I've seen in testing

the only person that has claimed that what your asking regarding screensaver and music can be done
posted this youtube video as example http://www.youtube.com/watch?v=YHMMhGNNjeg

but never shared how it was done, in fact recliq even created a wiki page for him to fill in http://wiki.wdlxtv.com/WDTVExt_Create_Custom_Screensaver
but 6 months later still blank

I supose the other way to do it
would be completely forget the normal screensaver and write your own screensaver using wdtvext
but I think that would be a very messy solution
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 2 guests