2011年05月13日 MPlayer-1.0rc4 on ARMedSlack on zaurus(SL-C760) [長年日記]
_ MPlayer-1.0rc4 on ARMedSlack on zaurus(SL-C760)
普通にビルドすると
libmpeg2/motion_comp_arm_s.S: Assembler messages: libmpeg2/motion_comp_arm_s.S:??: Error: selected processor does not support `pld [r1]' libmpeg2/motion_comp_arm_s.S:??: Error: selected processor does not support `pld [r1]'
こんな感じのエラーが出る。
*** libmpeg2/motion_comp_arm_s.S.ORG 2011-05-12 15:04:22.000000000 +0900
--- libmpeg2/motion_comp_arm_s.S 2011-05-12 15:08:22.000000000 +0900
***************
*** 19,24 ****
--- 19,32 ----
@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ @ Disable pld for platforms which don't support it
+ #include "../config.h"
+ #if !HAVE_PLD
+ .macro pld reg
+ .endm
+ #endif
+
+
.text
@ ----------------------------------------------------------------
上記のパッチを当てたら、無事ビルド出来た。
2011年05月22日 console app with ARMedSlack 13.1 on zaurus(SL-C760) [長年日記]
_ FD-3.00j
コンソールベースのファイラー。ファイル名の拡張子にアプリケーションを関連付けて起動することができるので、mplayer等のフロントエンドとして利用したりする予定。
- $ tar xvzf FD-3.00j.tar.gz
- $ cd FD-3.00j
- $ vi machine.h (必要に応じて修正。たぶん必要無し。)
- $ vi fd.h (必要に応じて修正。たぶん必要無し。)
- $ make
- $ vi Makefile.in (必要に応じてTOPDIR等を修正。たぶん必要無し。)
- $ cp _fdrc fdrc
- # make install
上記の作業でインストールされる日本語マニュアルはARMedSlack 13.1のgnroffでは処理できないので、いったん削除して、フォーマット済のマニュアルを再度インストールする。
- # make jcatman
拡張子に関連付けるアプリケーションをカスタマイズする。
- vi ~/.fd2rc
launch "/.html" "w3m %C" launch "/.htm" "w3m %C" launch "/.mp3" "madplay %C" launch "/.avi" "mplayer -really-quiet -framedrop -dr -double -vo sdl -ao oss -vfm ffmpeg, -afm libmad, -autosync 30 -cache 2048 %C"
使い方は、カーソルキーでファイルを選んで、エンターキーでアプリケーションの起動。本来のファイラーとしての機能は `?' を入力してヘルプで確認できる。
_ moc-2.4.4 (music on console)
コンソールベースのmp3プレイヤー。
- $ tar xvjf moc-2.4.4.tar.bz2
- $ cd moc-2.4.4
- $ ./configure
- $ make
- # make install
起動は
$ mocp
サーバとしてのmocpと、クライアントとしてのmocpの2つのプロセスが起動する。
- 移動 : 上下矢印キー
- 再生 : エンターキー
- 停止 : s
- 一時停止 : p
- ボリュームアップ(1%) : >
- ボリュームダウン(1%) : <
- ボリュームアップ(5%) : .
- ボリュームダウン(5%) : ,
- 進める(1秒) : 右矢印
- 戻す(1秒) : 左矢印
- 進める(5秒) : ]
- 戻す(5秒) : [
- プレイリスト領域(への|からの)移動 : タブキー
- プレイリストヘの追加 : a
- プレイリストからの削除 : d
- 終了(サーバ、クライアントの両方) : Q
- 終了(クライアントのみ、再生はバックグラウンドで継続) : q
2011年05月23日 snes9x with ARMedslack 13.1 on zaurus(SL-C760) [長年日記]
_ snes9x with ARMedslack 13.1 on zaurus(SL-C760)
snes9xをARMedslack 13.1でビルドしてみた。
以前にIntelマシンでビルドした手順で行うと、別のエラーが出た。以下のパッチで対応。
*** snes9x/unix/unix.cpp.ORG 2011-03-07 19:09:37.000000000 +0900
--- snes9x/unix/unix.cpp 2011-03-07 19:13:14.000000000 +0900
***************
*** 1129,1139 ****
{
*drive = 0;
! char *slash = strrchr (path, '/');
if (!slash)
! slash = strrchr (path, '\\');
! char *dot = strrchr (path, '.');
if (dot && slash && dot < slash)
dot = NULL;
--- 1129,1139 ----
{
*drive = 0;
! char *slash = (char *)strrchr (path, '/');
if (!slash)
! slash = (char *)strrchr (path, '\\');
! char *dot = (char *)strrchr (path, '.');
if (dot && slash && dot < slash)
dot = NULL;
上記でコンパイルは通るが、以下のパッチも当てないと、armプラットフォームでは正常に動かない。
*** snes9x/port.h.ORG 2011-05-16 17:48:15.000000000 +0900 --- snes9x/port.h 2011-05-21 23:32:31.000000000 +0900 *************** *** 266,274 **** #endif #if defined(__i386__) || defined(__i486__) || defined(__i586__) || \ ! defined(__WIN32__) || defined(__alpha__) #define LSB_FIRST #define FAST_LSB_WORD_ACCESS #else #define MSB_FIRST #endif --- 266,276 ---- #endif #if defined(__i386__) || defined(__i486__) || defined(__i586__) || \ ! defined(__WIN32__) || defined(__alpha__) || defined(__arm__) #define LSB_FIRST + # if !defined(__arm__) #define FAST_LSB_WORD_ACCESS + # endif #else #define MSB_FIRST #endif
以上。
で、zaurus(SL-C760)で快適に遊べるかは...微妙。
2011年05月27日 xserver-kdrive-imageon on ARMedslack 13.1 with zaurus(SL-C760) [長年日記]
_ xserver-kdrive-imageon on ARMedslack 13.1 with zaurus(SL-C760)
Slackware 13.37、ARMedslack 13.37がリリースされた今日この頃...
今回はAngstromからXimageonのバイナリを拝借するのは避けたい
と宣言していたのだが、あっさりと撤回。
なぜなら動画もサクサク見たいし、snes9xもサクサク動かしたいから...
調達物資
http://www.angstrom-distribution.org/repo/より以下の物資を調達する。
- libts-1.0-0_1.0-r28.6.9_armv5te.ipk
- pointercal_0.0-r5_c7x0.ipk
- tslib-calibrate_1.0-r28.6.9_armv5te.ipk
- tslib-conf_1.0-r28.6.9_armv5te.ipk
- xserver-kdrive-imageon_1.2.0-r8.6_armv5te.ipk
- xserver-security-policy_1.4.2-r3.2_armv5te.ipk
展開
上記のipkファイルはarコマンドで展開できる。展開した中にdata.tar.gzというファイルが有るので、それを希望の場所で展開する。
今回は`/angstrom'というディレクトリを用意して、angstromから取り込んだ物は全てその中に放り込むことにする。
# mkdir /angstrom # cd /tmp # ar x ほげほげ.ipk # cd /angstrom # tar xvzf - /tmp/data.tar.gz
ld.so.confの設定
上記の方法で導入した Ximageon は /angstrom/usr/lib/libts-1.0.so.0 をリンクして動かす必要があるので、/etc/ld.so.confを設定する。
# cp /etc/ld.so.conf /etc/ld.so.conf.BAK # 念のためバックアップ # echo /angstrom/usr/lib >>/etc/ld.so.conf # ldconfig
キャリブレーションの実施
キャリブレーションを行って`/angstrom/etc/pointercal'を生成する。
# TSLIB_PLUGINDIR=/angstrom/usr/lib/ts; export TSLIB_PLUGINDIR # TSLIB_CONFFILE=/angstrom/etc/ts.conf; export TSLIB_CONFFILE # TSLIB_CALIBFILE=/angstrom/etc/pointercal; export TSLIB_CALIBFILE # TSLIB_TSDEVICE=/dev/input/event1; export TSLIB_TSDEVICE # /angstrom/usr/bin/ts_calibrate
~/.xserverrc 作成
自分のホームディレクトリに`.xserverrc'を作ることで、`startx'コマンド実行時に起動するX serverを自由に選ぶ事ができる。
#! /bin/sh
TSLIB_PLUGINDIR=/angstrom/usr/lib/ts; export TSLIB_PLUGINDIR
TSLIB_CONFFILE=/angstrom/etc/ts.conf; export TSLIB_CONFFILE
TSLIB_CALIBFILE=/angstrom/etc/pointercal; export TSLIB_CALIBFILE
TSLIB_TSDEVICE=/dev/input/event1; export TSLIB_TSDEVICE
exec /angstrom/usr/bin/Ximageon \
-softCursor \
-use-evdev \
-mouse /dev/input/event1 \
-sp /angstrom/usr/lib/xserver/ScurityPolicy
設定は起動時のオプションで指定する。Ximageon自体は/etc/X11/xorg.conf無しで起動するので、xorg.confを参照しないのかもしれない(?)。
指定できるオプションは`Ximageon -help'で表示される。
`-softCursor'を指定しないとマウスカーソルの描画が崩れる場合がある。
`-use-evdev'はなんとなく指定...。
`-mouse'を指定すると何故だかマウスカーソルの「ブルブル」が軽減できる(ような気がする)。
そして実行属性を与える。
$ chmod +x ~/.xserverrc
フォントパスの設定
フォントパスを ~/.xinitrc の中で設定する。
if [ -e /usr/share/fonts/misc ] then xset fp+ /usr/share/fonts/misc fi if [ -e /usr/share/fonts/75dpi ] then xset fp+ /usr/share/fonts/75dpi fi if [ -e /usr/share/fonts/100dpi ] then xset fp+ /usr/share/fonts/100dpi fi if [ -e /usr/share/fonts/Type1 ] then xset fp+ /usr/share/fonts/Type1 fi
追記 : `Ximageon'の`-fp'オプションでも指定できるよう。
起動
$ startx
で、肝心の性能の方は、ARMedslack 13.1標準の /usr/bin/Xorg(fb版?)ではxengineで780rmp程度だったのが Ximageon では1200rpmぐらいまで向上 d(^^)。
2011年05月29日 ATI imageon patch for MPlayer-1.0rc4 from MPlayer-1.0pre8's patch [長年日記]
_ ATI imageon patch for MPlayer-1.0rc4 from MPlayer-1.0pre8's patch
I have ported ATI imageon patch for MPlayer-1.0rc4 from MPlayer-1.0pre8's patch.
I have succeeded to run mplayer with imageon on ARMedslack 13.1 with zaurus(SL-C760).
New patch is here :)
#
# MPlayer-1.0rc4-imageon.diff
#
*** ./Makefile.ORG 2011-05-28 17:05:02.695597593 +0900
--- ./Makefile 2011-05-28 17:06:42.277689754 +0900
***************
*** 541,546 ****
--- 541,547 ----
SRCS_MPLAYER-$(DXR3) += libvo/vo_dxr3.c
SRCS_MPLAYER-$(ESD) += libao2/ao_esd.c
SRCS_MPLAYER-$(FBDEV) += libvo/vo_fbdev.c libvo/vo_fbdev2.c
+ SRCS_MPLAYER-$(IMAGEON) += libvo/vo_imageon.c
SRCS_MPLAYER-$(GGI) += libvo/vo_ggi.c
SRCS_MPLAYER-$(GIF) += libvo/vo_gif89a.c
SRCS_MPLAYER-$(GL) += libvo/gl_common.c libvo/vo_gl.c \
*** ./configure.ORG 2011-05-28 16:44:50.099669463 +0900
--- ./configure 2011-05-28 17:12:06.180388128 +0900
***************
*** 423,428 ****
--- 423,429 ----
--enable-xshape enable XShape support [autodetect]
--disable-xss disable screensaver support via xss [autodetect]
--enable-fbdev enable FBDev video output [autodetect]
+ --enable-imageon enable imageon video output [no]
--enable-mlib enable mediaLib video output (Solaris) [disable]
--enable-3dfx enable obsolete /dev/3dfx video output [disable]
--enable-tdfxfb enable tdfxfb video output [disable]
***************
*** 630,635 ****
--- 631,637 ----
_svga=auto
_vesa=auto
_fbdev=auto
+ _imageon=no
_dvb=auto
_dxr2=auto
_dxr3=auto
***************
*** 996,1001 ****
--- 998,1005 ----
--disable-vesa) _vesa=no ;;
--enable-fbdev) _fbdev=yes ;;
--disable-fbdev) _fbdev=no ;;
+ --enable-imageon) _imageon=yes ;;
+ --disable-imageon) _imageon=no ;;
--enable-dvb) _dvb=yes ;;
--disable-dvb) _dvb=no ;;
--enable-dxr2) _dxr2=yes ;;
***************
*** 4876,4881 ****
--- 4880,4896 ----
echores "$_fbdev"
+ echocheck "ATI Imageon 100 (imageon)"
+ if test "$_imageon" = yes ; then
+ def_imageon='#define CONFIG_IMAGEON 1'
+ libs_mplayer="$libs_mplayer -lw100"
+ vomodules="imageon $vomodules"
+ else
+ def_imageon='#undef CONFIG_IMAGEON'
+ novomodules="imageon $novomodules"
+ fi
+ echores "$_imageon"
+
echocheck "DVB"
if test "$_dvb" = auto ; then
***************
*** 8584,8589 ****
--- 8599,8605 ----
FAAD_INTERNAL = $_faad_internal
FASTMEMCPY = $_fastmemcpy
FBDEV = $_fbdev
+ IMAGEON = $_imageon
FREETYPE = $_freetype
FTP = $_ftp
GIF = $_gif
***************
*** 9121,9126 ****
--- 9137,9143 ----
$def_dxr2
$def_dxr3
$def_fbdev
+ $def_imageon
$def_ggi
$def_ggiwmh
$def_gif
*** ./libvo/video_out.c.ORG 2011-05-28 18:22:05.775727864 +0900
--- ./libvo/video_out.c 2011-05-28 18:27:29.443599038 +0900
***************
*** 113,118 ****
--- 113,119 ----
extern const vo_functions_t video_out_bl;
extern vo_functions_t video_out_fbdev;
extern const vo_functions_t video_out_fbdev2;
+ extern vo_functions_t video_out_imageon;
extern vo_functions_t video_out_svga;
extern const vo_functions_t video_out_png;
extern const vo_functions_t video_out_ggi;
***************
*** 214,219 ****
--- 215,223 ----
&video_out_fbdev,
&video_out_fbdev2,
#endif
+ #ifdef CONFIG_IMAGEON
+ &video_out_imageon,
+ #endif
#ifdef CONFIG_SVGALIB
&video_out_svga,
#endif
*** ./libvo/vo_imageon.c.ORG 2011-05-28 17:05:13.345722251 +0900
--- ./libvo/vo_imageon.c 2011-05-28 18:09:05.737762608 +0900
***************
*** 0 ****
--- 1,307 ----
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <inttypes.h>
+ #include <string.h>
+
+ #include "config.h"
+ #include "video_out.h"
+ #include "video_out_internal.h"
+ #include "mp_msg.h"
+
+ static vo_info_t info =
+ {
+ "ATI IMAGEON 100 driver",
+ "imageon",
+ "Manuel Teira",
+ "C760-Openzaurus Testing version"
+ };
+
+ LIBVO_EXTERN(imageon)
+
+ #include <acapi.h>
+
+ static struct w100privdata_t {
+ uint8_t config;
+ ac_device_t *dev;
+ uint16_t xres;
+ uint16_t yres;
+ uint16_t ovwidth;
+ uint16_t ovheight;
+ ac_surface_t insurface;
+ ac_surface_t ovsurface;
+ uint16_t srcwidth;
+ uint16_t srcheight;
+ uint8_t rotate;
+ uint8_t scale;
+ ac_point_t ovdst;
+ ac_point_t dstpos;
+ ac_overlayprops_t ovprops;
+ uint32_t format;
+ } w100_privdata;
+
+ static int preinit(const char *arg)
+ {
+ //Perhaps libw100 should include some code to query the framebuffer
+ struct w100privdata_t *pdata = &w100_privdata;
+
+ pdata->config = 0;
+ pdata->xres = 640;
+ pdata->yres = 480;
+ pdata->dev = ac_init(pdata->xres, pdata->yres, AC_ROT90);
+ if (pdata->dev) {
+ return 0;
+ } else {
+ //Put a log message here
+ return 1;
+ }
+ }
+
+
+ static void draw_osd(void)
+ {
+ }
+
+ void check_events(void)
+ {
+ mp_msg(MSGT_VO, MSGL_V, "check_events got called\n");
+ }
+
+ static int config(uint32_t srcwidth, uint32_t srcheight,
+ uint32_t dstwidth, uint32_t dstheight,
+ uint32_t flags, char *title, uint32_t format)
+ {
+ struct w100privdata_t *pdata = &w100_privdata;
+ uint8_t xscale, yscale;
+ uint16_t scaledwidth, scaledheight;
+
+ mp_msg(MSGT_VO, MSGL_V,
+ "vo_imageon: srcwidth:%d, srcheight:%d, "
+ "dstwidth:%d, dstheight:%d\n",
+ srcwidth, srcheight, dstwidth, dstheight);
+
+ if (pdata->config) {
+ ac_overlay_disable(pdata->dev);
+ ac_free_surface(pdata->dev, &pdata->insurface);
+ ac_free_surface(pdata->dev, &pdata->ovsurface);
+ }
+
+ pdata->srcwidth = srcwidth;
+ pdata->srcheight = srcheight;
+
+ //By the moment, only YUV420 supported
+ pdata->ovprops.format = OVLFORMAT_YUV420;
+ pdata->ovprops.portrait_mode = 0;
+ pdata->ovprops.inv_hor = 0;
+ pdata->ovprops.inv_ver = 0;
+ pdata->ovprops.yuv2rgb = 0;
+
+ pdata->rotate = AC_ROT90;
+
+ if (flags & VOFLAG_FULLSCREEN) {
+ pdata->ovwidth = 240;
+ pdata->ovheight = 320;
+ xscale = ac_get_scaler(pdata->ovheight, srcwidth);
+ yscale = ac_get_scaler(pdata->ovwidth, srcheight);
+ pdata->scale = (xscale > yscale) ? xscale : yscale;
+ pdata->ovdst.x = 0;
+ pdata->ovdst.y = 0;
+ pdata->ovprops.video_hor_exp = 1;
+ pdata->ovprops.video_ver_exp = 1;
+ } else {
+ pdata->ovwidth = (dstheight + 0xf) & ~0xf;
+ pdata->ovheight = (dstwidth + 0xf) & ~0xf;
+ xscale = ac_get_scaler(dstwidth, srcwidth);
+ yscale = ac_get_scaler(dstheight, srcheight);
+ pdata->ovdst.x = (pdata->xres - pdata->ovheight) / 2;
+ pdata->ovdst.y = (pdata->yres - pdata->ovwidth) / 2;
+ pdata->ovprops.video_hor_exp = 0;
+ pdata->ovprops.video_ver_exp = 0;
+ }
+
+ pdata->scale = (xscale > yscale) ? xscale : yscale;
+ scaledwidth = ac_apply_scaler(srcwidth, pdata->scale);
+ scaledheight = ac_apply_scaler(srcheight, pdata->scale);
+ pdata->dstpos.x = (pdata->ovwidth - scaledheight) / 2;
+ pdata->dstpos.y = (pdata->ovheight - scaledwidth) / 2;
+
+ if (ac_alloc_surface(pdata->dev, &pdata->ovsurface,
+ FMT_YUV420,
+ pdata->ovwidth,
+ pdata->ovheight,
+ AC_MEM_INTERNAL) == NULL) {
+ mp_msg(MSGT_VO, MSGL_FATAL, "Unable to allocate ov surface\n");
+ return -1;
+ }
+
+ if (ac_alloc_surface(pdata->dev, &pdata->insurface,
+ FMT_YUV420, srcwidth, srcheight,
+ AC_MEM_INTERNAL) == NULL) {
+ mp_msg(MSGT_VO, MSGL_WARN,
+ "No room in internal memory for insurface\n");
+ if (ac_alloc_surface(pdata->dev, &pdata->insurface,
+ FMT_YUV420, srcwidth, srcheight,
+ AC_MEM_EXTERNAL) == NULL) {
+ mp_msg(MSGT_VO, MSGL_FATAL,
+ "Unable to allocate surface\n");
+ ac_free_surface(pdata->dev, &pdata->ovsurface);
+ return -1;
+ }
+ }
+
+ ac_clear_surface(pdata->dev, &pdata->ovsurface);
+ ac_clear_surface(pdata->dev, &pdata->insurface);
+
+
+ mp_msg(MSGT_VO, MSGL_V,
+ "vo_imageon: rotate:%d scale:%d ovwidth:%d, ovheight:%d, "
+ "ovdst(x:%d, y:%d) dstpos(x:%d,y:%d)\n",
+ pdata->rotate,
+ pdata->scale,
+ pdata->ovwidth,
+ pdata->ovheight,
+ pdata->ovdst.x,
+ pdata->ovdst.y,
+ pdata->dstpos.x,
+ pdata->dstpos.y);
+
+ ac_overlay_setup(pdata->dev, &pdata->ovsurface, &pdata->ovsurface.rect,
+ &pdata->ovprops, 0);
+ ac_overlay_setpos(pdata->dev, &pdata->ovdst);
+ ac_overlay_enable(pdata->dev);
+
+ pdata->config = 1;
+ return 0;
+ }
+
+ static int draw_slice(uint8_t *image[], int stride[],
+ int w, int h, int x, int y)
+ {
+ struct w100privdata_t *pdata = &w100_privdata;
+ ac_rect_t dstrect;
+ ac_surface_t *dstsurface = &pdata->insurface;
+ int plane;
+ mp_msg(MSGT_VO, MSGL_V,
+ "vo_imageon: draw_slice(w:%d,h:%d,x:%d,y:%d)\n",
+ w, h, x, y);
+
+ ac_reset_ctx(pdata->dev);
+ for (plane = 0; plane <= V_PLANE; plane++) {
+ mp_msg(MSGT_VO, MSGL_V, "Plane: %d, Stride: %d\n",
+ plane, stride[plane]);
+ dstrect.x = x;
+ dstrect.y = y;
+ dstrect.w = w;
+ dstrect.h = h;
+ ac_host2planerect(pdata->dev,
+ image[plane],
+ &dstrect,
+ &pdata->insurface,
+ plane);
+ }
+ return 0;
+ }
+
+ static int draw_frame(uint8_t *frame[])
+ {
+ struct w100privdata_t *pdata = &w100_privdata;
+ mp_msg(MSGT_VO, MSGL_V, "vo_imageon: draw_frame() not implemented!\n");
+
+ }
+
+ static void flip_page(void)
+ {
+ struct w100privdata_t *pdata = &w100_privdata;
+ int plane;
+ ac_rect_t srcrect;
+ ac_point_t dstpoint;
+ ac_surface_t *insurface = &pdata->insurface;
+ ac_surface_t *ovsurface = &pdata->ovsurface;
+ ac_surfspec_t *surfspec = &ac_surfspecs[ovsurface->format];
+
+ mp_msg(MSGT_VO, MSGL_V, "vo_imageon: flip_page\n");
+
+ srcrect.x = 0;
+ srcrect.y = 0;
+
+ ac_reset_ctx(pdata->dev);
+ if (pdata->rotate != AC_ROT0) {
+ ac_set_xform(pdata->dev, pdata->rotate, AC_NOMIRROR);
+ }
+ ac_disable_dbuf_update(pdata->dev);
+ ac_waitidle(pdata->dev);
+ for (plane = Y_PLANE; plane < surfspec->nplanes; plane++) {
+ ac_setsrcplane(pdata->dev, insurface, plane);
+ ac_setdstplane(pdata->dev, ovsurface, plane);
+ ac_prepare_scaleblt(pdata->dev, DP_DST_8BPP);
+ srcrect.w = pdata->srcwidth / surfspec->planes[plane].xsubsampling;
+ srcrect.h = pdata->srcheight / surfspec->planes[plane].ysubsampling;
+ dstpoint.x = pdata->dstpos.x / surfspec->planes[plane].xsubsampling;
+ dstpoint.y = pdata->dstpos.y / surfspec->planes[plane].ysubsampling;
+ mp_msg(MSGT_VO, MSGL_V,
+ "vo_imageon: scaleblt src(x:%d,y:%d,w:%d,h:%d)"
+ "dst(%d,%d)"
+ "scale(%d)\n",
+ srcrect.x, srcrect.y,
+ srcrect.w, srcrect.h,
+ dstpoint.x, dstpoint.y,
+ pdata->scale);
+ ac_scaleblt(pdata->dev, &srcrect, &dstpoint,
+ pdata->scale, pdata->scale);
+ }
+ ac_enable_dbuf_update(pdata->dev);
+ }
+
+ static void uninit(void)
+ {
+ struct w100privdata_t *pdata = &w100_privdata;
+ ac_overlay_disable(pdata->dev);
+ ac_finish(pdata->dev);
+ }
+
+ static int control(uint32_t request, void *data, ...)
+ {
+ struct w100privdata_t *pdata = &w100_privdata;
+ switch (request) {
+ case VOCTRL_QUERY_FORMAT:
+ return query_format(*((uint32_t *)data));
+ case VOCTRL_FULLSCREEN:
+ mp_msg(MSGT_VO, MSGL_V, "vo_imageon: Asked for fullscreen\n");
+ }
+ return VO_NOTIMPL;
+ }
+
+ static int query_format(uint32_t format)
+ {
+ mp_msg(MSGT_VO, MSGL_V,
+ "vo_imageon: query_format was called: %x (%s)\n",
+ format, vo_format_name(format));
+
+ if (IMGFMT_IS_RGB(format)) {
+ return 0;
+
+ switch (IMGFMT_RGB_DEPTH(format)) {
+ case 16:
+ return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW |
+ VFCAP_HWSCALE_UP | VFCAP_HWSCALE_DOWN |
+ VFCAP_OSD | VFCAP_ACCEPT_STRIDE;
+ break;
+ }
+ } else {
+ /* Planar YUV Formats */
+ switch (format) {
+ case IMGFMT_YV12:
+ case IMGFMT_IYUV:
+ case IMGFMT_I420:
+ case IMGFMT_YVU9:
+ case IMGFMT_IF09:
+ case IMGFMT_Y8:
+ case IMGFMT_Y800:
+ return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW |
+ VFCAP_HWSCALE_UP | VFCAP_HWSCALE_DOWN |
+ VFCAP_OSD | VFCAP_ACCEPT_STRIDE;
+ break;
+ }
+ }
+
+ return 0;
+ }
You need permission to access /dev/mem to play mplayer with imageon, so you should execute like
$ sudo mplayer -vo imageon ...
or execute as root.
Have fun !
Some issue :(
- With imageon, mplayer play sound with a little bit noisy.