Howto MPlayer OS/2 port OSD and font assignment logic - first draft

Howto MPlayer OS/2 port OSD and font assignment logic - first draft

Post by Rainer Str » Sun, 15 Jul 2007 01:35:38



Howto MPlayer OS/2 port OSD and font assignment logic


Status: 2007-07-12 18.20 first Draft



1. Linux to OS/2 port


1.1 Environment Variables

MPLAYER_HOME <--- ~/.mplayer

and the OS/2 implementation

MPLAYER_OPTIONS


1.2 Directories

~/.mplayer --> %MPLAYER_HOME%

~/.mplayer/font/ --> %MPLAYER_HOME%\font


1.2 Symbolic Link to a file, a directory

In the Linux implementation "Symbolic Link" can be used
to define/reference the location / the font to be used for OSD

Here is a description of the function symbolic link in Linux

http://linux.about.com/od/commands/l/blcmdl1_ln.htm

ln [OPTION]... TARGET [LINK_NAME]

Here with mplayer it is used

ln -s TARGET LINK_NAME


LINK_NAME used here

for a file ~/.mplayer/mplayer.fft

for a directory ~/.mplayer/font


The is no symbolic link function in the standard OS/2 implementation

For the OS/2 port the Symbolic Links are hard coded with
the existing file / directory


file: ~/.mplayer/mplayer.fft --> %MPLAYER_HOME%\mplayer.fft

directory: ~/.mplayer/font --> %MPLAYER_HOME%\font


In OS/2 port you have to supply the real values/contents here,
in Linux there is a link stored pointing to the values/contents!


1.3 Files Linux to OS/2 port

1.3.1 MPlayer system-wide settings

/usr/local/etc/mplayer/mplayer.conf --> OS/2 Port ???


1.3.2 MEncoder system-wide settings

/usr/local/etc/mplayer/mencoder.conf --> OS/2 Port ???


1.3.3 MPlayer user settings

~/.mplayer/config --> %MPLAYER_HOME%\config


2. Font for OSD assignment logic

2.1 Types of Font

The are tow types of font


2.1.1 Bitmap font

Bitmap fonts have a description file <font-name>.desc
and additional files define a bitmap font for MPLAYER


2.1.2 TrueType Font

TrueType font <font-name>.ttf


3. Location / Method / Hierarchy of assignment

- MPlayer system-wide settings -->
%MPLAYER_HOME%\mplayer.conf

- MPlayer user settings --> %MPLAYER_HOME%\config

- for Bitmaps ( ~/.mplayer/font ) --> %MPLAYER_HOME%\font

- for TrueType (~/.mplayer/mplayer.fft ) -->
%MPLAYER_HOME%\mplayer.fft

- command line option -font in Environ.v..--> %MPLAYER_OPTIONS%
( KO Myung-Hun port only)

- command line option at program exec --> MPLAYER -font ....


3.1 No font for OSD defined

MPLAYER output:

--> snip
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
--> snip


3.2 Define via MPlayer user settings --> %MPLAYER_HOME%\config


====================================================================================
Pauls port

s:\MPLAYER_HOME\config (contents: )

font=L:\os2\mdos\winos2\system\