dvdplayer


 

dvdplayer.bin

dvdplayer.bin is the main program running in the MG35.

Version: N/A

Status: trying to replace

 

 



 

Description

 

Important note: in the latest alpha versions of the firmware (1.5.2.3-a7 as of this writing) there are some patches applied to dvdplayer. The most important one extends the number of file extensions showed when browsing the disk or network share. This allows one to execute scripts (.ext, .sh or .app file extension) and to play internet radio streams specified in .url files.

 

At startup, it will initialize the device:

 

The external events (device button or remote control key-press) are received using fipmodule.o. If needed, it will launch another external programs to perform specific tasks (e.g. play a file). After that, it will send the received commands (e.g. Play/Stop/FF/REW) to the player. dvdplayer also takes care of the TV screen updating.

 

Note1: If dvdplayer cannot load the IDE/network drivers, it loops and keeps retrying to load them. It freezes before even reaching the 'local mode'/'network mode' menu.

 

NOTE2: It turns out that any files with extensions starting with a recognized one will show up in the user interface (eg aaaa.mp3_etcetcetc" or "DeanCain.avidFanOfBaseball").

 

NOTE3: If find_extension() in dvdplayer can't locate the extension in a filename, it will return everything from the second character forwards. This means a file named 'David' will be considered as having 'avid' extension. Combined with the bug described in the previous Note2, 'avid' is a valid extension (it starts with 'avi') and is thus "David" file is shown in the UI.

 

Note4:since dvdplayer holds control of the FIP device, any other program that tries to use it (e.g. mp3play in fip mode) will result in a race condition. If the player is called in console or in a shell script, a possible solution is to stop dvdplayer before launching the player (using kill -STOP (dvdpid) ) and later continue it after the player is done (using kill -CONT (dvdpid) ).

 

External programs

When needed, dvdplayer will launch other programs to perform other functions:

 

Strangely enough, although the video stream is displayed by the respective external player, the subtitles are handled by dvdplayer itself. This is probably to avoid collisions to OSD, since it can also be used to display other info (e.g. subtitle menu, file info) while playing.

 

Here is the summary of the supported files and the associated players in the original firmware (we use an external dispatcher in our firmware):

 

AUDIO    
MP3 fileplayer  
OGG fileplayer  
WAV fileplayer  
WMA fileplayer  
AC3 fileplayer  
PCM fileplayer  
DTS fileplayer  
M4A mp4play  
VIDEO    
AVI fileplayer  
MPG mpegplayer  
MPEG mpegplayer  
DAT mpegplayer  
M2V mpegplayer  
MP4 mp4play  
VOB mpegplayer  
DVD directory mpegplayer  
IFO dvdplayer instead of calling an external player, dvdplayer play these files by itself, probably due to interactivity of DVD menus. IMPORTANT: To access the DVD structure as expected, use the Enter button! If you launch the file using hte Play button, MG35 will play all the VOB files, but the menus will not be available.
ISO dvdplayer Playing an ISO file over the network uses more than 80% CPU power.
IMAGE    
JPEG dvdplayer  
JPG dvdplayer  
PLAYLISTS    
M3U dvdplayer  

 

The implementation of m3u playlists is a little convoluted: when you open a .m3u file under 'playlists', dvdplayer creates a directory of symlinks (somewhere it finds convenient) based on the filenames in the playlist. Then it plays the symlinks using the respective player, usually fileplayer.bin (never tried a video playlist, not sure if it's possible).

 

Note that you can also launch the players in a telnet console. See the documentation for each player's call syntax.

 

 

 

 

Modified behavior

In order to make the transition to a new user interface, some changes were/will be made in the way dvdplayer behaves.

 

License

 

 

Proprietary

 

Todo

 

History

 

Patches

The patches are applied to the binary dvdplayer.bin by a Python script

 

No File Description
1 mount_partition

Add mount fixup.

  • Those with FAT32 HDs want them mounted read-write. We can remount the drive in phase2, but dvdplayer.bin keeps remounting read-only.
  • Unfortunately, dvdplayer doesn't use the mount command. It uses the mount system call, so replacing the command doesn't do any good
  • Binary patching dvdplayer (in a mere two places) solvse this, at the expense of stability.
2 playlist_url extended the M3U playlists to support URLs as targets
3 play_file Browse/play files with new extensions in Video, Audio, Photo modes. check_file_ext (play_file.c) determines what shows up in the browse list, and what general FTYPE_* it is. It should probably be renamed playlist_ext.c
4 play_dir Hide directory names from browse list (those starting with dot or underscore)
5 start_item Specify only non-ISO file extensions for fileplayer (???)

 

Comments

Update: The shell files are working! Interesting, if starting one of them in Audio mode, nothing happens on screen, as expected. But if started in Video mode, the screen goes blank (black), and "Playing my_script.sh" is displayed. So the mode definitely makes a difference. More testing tonight.

 


 

 


*VB: we should probably add .divx as an accepted video extension in play_file.c? Just for convenience.