mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 22:48:55 +02:00
MPlayer: bump to release (#3781)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
|
||||
resource app_flags B_ARGV_ONLY;
|
||||
resource app_flags B_MULTIPLE_LAUNCH | B_ARGV_ONLY;
|
||||
|
||||
resource app_version {
|
||||
major = @MAJOR@,
|
||||
|
||||
@@ -20,14 +20,12 @@ fonts are supported along with 12 subtitle formats (MicroDVD, SubRip, OGM, \
|
||||
SubViewer, Sami, VPlayer, RT, SSA, AQTitle, JACOsub, PJS and our own: MPsub). \
|
||||
DVD subtitles (SPU streams, VOBsub and Closed Captions) are supported as well."
|
||||
HOMEPAGE="http://www.mplayerhq.hu/"
|
||||
COPYRIGHT="2001-2016 The MPlayer Team"
|
||||
COPYRIGHT="2001-2019 The MPlayer Team"
|
||||
LICENSE="GNU LGPL v2.1"
|
||||
REVISION="1"
|
||||
srcGitRev="c4eb74cb8d8d7b8ccd9936cb18742d086492fb9f"
|
||||
SOURCE_URI="https://github.com/extrowerk/mplayer/archive/$srcGitRev.zip"
|
||||
CHECKSUM_SHA256="ae9508e6504da751b3dc91b85aae141d6164c1da65fc270b666c0509518e45ee"
|
||||
SOURCE_DIR="mplayer-$srcGitRev"
|
||||
SOURCE_FILENAME="mplayer-$srcGitRev.zip"
|
||||
SOURCE_URI="http://www.mplayerhq.hu/MPlayer/releases/MPlayer-1.4.tar.xz"
|
||||
CHECKSUM_SHA256="82596ed558478d28248c7bc3828eb09e6948c099bbd76bb7ee745a0e3275b548"
|
||||
SOURCE_DIR="MPlayer-1.4"
|
||||
PATCHES="mplayer_x86-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="mplayer.rdef.in"
|
||||
|
||||
@@ -56,7 +54,7 @@ REQUIRES="
|
||||
lib:liba52$secondaryArchSuffix
|
||||
lib:libbz2$secondaryArchSuffix
|
||||
lib:libcaca$secondaryArchSuffix
|
||||
# lib:libcdio$secondaryArchSuffix
|
||||
lib:libcdio$secondaryArchSuffix
|
||||
lib:libdca$secondaryArchSuffix
|
||||
lib:libdv$secondaryArchSuffix
|
||||
lib:libdvdcss$secondaryArchSuffix
|
||||
@@ -113,7 +111,7 @@ BUILD_REQUIRES="
|
||||
devel:libbz2$secondaryArchSuffix
|
||||
devel:libcaca$secondaryArchSuffix
|
||||
devel:libcddb$secondaryArchSuffix
|
||||
# devel:libcdio$secondaryArchSuffix
|
||||
devel:libcdio$secondaryArchSuffix
|
||||
devel:libdca$secondaryArchSuffix
|
||||
devel:libdv$secondaryArchSuffix
|
||||
devel:libdvdcss$secondaryArchSuffix
|
||||
@@ -1,22 +1,23 @@
|
||||
From 683eb6964591da827fe9f7c7827507d999a12696 Mon Sep 17 00:00:00 2001
|
||||
From fa11c15302e76a470d9ae76c6983e74cceafb61f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
|
||||
Date: Mon, 26 Dec 2016 17:18:13 +0100
|
||||
Subject: [PATCH] Haiku supporting code from Sergei Reznikov
|
||||
Date: Mon, 22 Apr 2019 11:38:50 +0200
|
||||
Subject: [PATCH] Haiku
|
||||
|
||||
---
|
||||
Makefile | 3 +
|
||||
configure | 42 ++++++-
|
||||
libao2/ao_haiku.cpp | 195 +++++++++++++++++++++++++++++++
|
||||
libao2/audio_out.c | 7 ++
|
||||
libvo/haiku_common.cpp | 304 +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
libvo/haiku_common.h | 69 +++++++++++
|
||||
libvo/haiku_view.cpp | 171 ++++++++++++++++++++++++++++
|
||||
libvo/haiku_view.h | 36 ++++++
|
||||
libvo/haiku_window.cpp | 125 ++++++++++++++++++++
|
||||
configure | 42 +++++-
|
||||
libao2/ao_haiku.cpp | 195 ++++++++++++++++++++++++++
|
||||
libao2/audio_out.c | 7 +
|
||||
libvo/haiku_common.cpp | 304 +++++++++++++++++++++++++++++++++++++++++
|
||||
libvo/haiku_common.h | 69 ++++++++++
|
||||
libvo/haiku_view.cpp | 171 +++++++++++++++++++++++
|
||||
libvo/haiku_view.h | 36 +++++
|
||||
libvo/haiku_window.cpp | 125 +++++++++++++++++
|
||||
libvo/haiku_window.h | 31 +++++
|
||||
libvo/video_out.c | 4 +
|
||||
libvo/vo_haiku.cpp | 201 ++++++++++++++++++++++++++++++++
|
||||
12 files changed, 1185 insertions(+), 3 deletions(-)
|
||||
libvo/vo_haiku.cpp | 201 +++++++++++++++++++++++++++
|
||||
path.c | 18 +++
|
||||
13 files changed, 1203 insertions(+), 3 deletions(-)
|
||||
create mode 100644 libao2/ao_haiku.cpp
|
||||
create mode 100644 libvo/haiku_common.cpp
|
||||
create mode 100644 libvo/haiku_common.h
|
||||
@@ -27,7 +28,7 @@ Subject: [PATCH] Haiku supporting code from Sergei Reznikov
|
||||
create mode 100644 libvo/vo_haiku.cpp
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index f59f635..3d422c3 100644
|
||||
index efa871d..aec5a2f 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -544,6 +544,9 @@ SRCS_MPLAYER-$(S3FB) += libvo/vo_s3fb.c
|
||||
@@ -41,7 +42,7 @@ index f59f635..3d422c3 100644
|
||||
SRCS_MPLAYER-$(SNDIO) += libao2/ao_sndio.c
|
||||
SRCS_MPLAYER-$(SUNAUDIO) += libao2/ao_sun.c
|
||||
diff --git a/configure b/configure
|
||||
index d18543d..02f2004 100755
|
||||
index d1aa8cd..52aa9b5 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -228,6 +228,7 @@ qnx() { issystem "QNX"; }
|
||||
@@ -60,7 +61,7 @@ index d18543d..02f2004 100755
|
||||
--enable-kva enable KVA video output [autodetect]
|
||||
--enable-aa enable AAlib video output [autodetect]
|
||||
--enable-caca enable CACA video output [autodetect]
|
||||
@@ -678,6 +680,7 @@ _xvmc=no #auto when complete
|
||||
@@ -682,6 +684,7 @@ _xvmc=no #auto when complete
|
||||
_vda=auto
|
||||
_vdpau=auto
|
||||
_sdl=auto
|
||||
@@ -68,7 +69,7 @@ index d18543d..02f2004 100755
|
||||
_kva=auto
|
||||
_direct3d=auto
|
||||
_directx=auto
|
||||
@@ -1028,6 +1031,8 @@ for ac_option do
|
||||
@@ -1033,6 +1036,8 @@ for ac_option do
|
||||
--disable-vdpau) _vdpau=no ;;
|
||||
--enable-sdl) _sdl=yes ;;
|
||||
--disable-sdl) _sdl=no ;;
|
||||
@@ -77,7 +78,7 @@ index d18543d..02f2004 100755
|
||||
--enable-kva) _kva=yes ;;
|
||||
--disable-kva) _kva=no ;;
|
||||
--enable-direct3d) _direct3d=yes ;;
|
||||
@@ -1640,7 +1645,7 @@ else
|
||||
@@ -1676,7 +1681,7 @@ else
|
||||
cc_name=$cc_name_tmp
|
||||
echocheck "$_cc version"
|
||||
cc_vendor=gnu
|
||||
@@ -86,7 +87,7 @@ index d18543d..02f2004 100755
|
||||
case $cc_version in
|
||||
2.96*)
|
||||
cc_fail=yes
|
||||
@@ -1710,7 +1715,7 @@ if test -z "$_target" ; then
|
||||
@@ -1746,7 +1751,7 @@ if test -z "$_target" ; then
|
||||
# host's CPU/instruction set
|
||||
set_host_arch() {
|
||||
case "$1" in
|
||||
@@ -95,7 +96,7 @@ index d18543d..02f2004 100755
|
||||
ia64) host_arch=ia64 ;;
|
||||
macppc|ppc*|Power*) host_arch=ppc ;;
|
||||
alpha) host_arch=alpha ;;
|
||||
@@ -1749,6 +1754,7 @@ else # if test -z "$_target"
|
||||
@@ -1785,6 +1790,7 @@ else # if test -z "$_target"
|
||||
amigaos) system_name=AmigaOS ;;
|
||||
mingw32*) system_name=MINGW32 ;;
|
||||
wine) system_name=Wine ;;
|
||||
@@ -103,7 +104,7 @@ index d18543d..02f2004 100755
|
||||
esac
|
||||
done
|
||||
# We need to convert underscores so that values like k6-2 and pentium-mmx can be passed
|
||||
@@ -1825,6 +1831,11 @@ if wine ; then
|
||||
@@ -1863,6 +1869,11 @@ if wine ; then
|
||||
extra_cflags="-fno-pic -UWIN32 -U_WIN32 -U__WIN32 -U__WIN32__ -DWINE_NOWINSOCK $extra_cflags"
|
||||
fi
|
||||
|
||||
@@ -115,7 +116,7 @@ index d18543d..02f2004 100755
|
||||
if darwin && test "$cc_vendor" != "clang" ; then
|
||||
extra_cflags="-falign-loops=16 -shared-libgcc $extra_cflags"
|
||||
fi
|
||||
@@ -5766,6 +5777,29 @@ fi
|
||||
@@ -5894,6 +5905,29 @@ fi
|
||||
echores "$_v4l2"
|
||||
|
||||
|
||||
@@ -145,7 +146,7 @@ index d18543d..02f2004 100755
|
||||
|
||||
#########
|
||||
# AUDIO #
|
||||
@@ -8005,7 +8039,7 @@ fi
|
||||
@@ -8059,7 +8093,7 @@ fi
|
||||
# (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly)
|
||||
ld_dl_dynamic=''
|
||||
freebsd || netbsd || openbsd || dragonfly || bsdos && ld_dl_dynamic='-rdynamic'
|
||||
@@ -154,7 +155,7 @@ index d18543d..02f2004 100755
|
||||
ld_dl_dynamic='-rdynamic'
|
||||
fi
|
||||
|
||||
@@ -8498,6 +8532,7 @@ RADIO_CAPTURE=$_radio_capture
|
||||
@@ -8552,6 +8586,7 @@ RADIO_CAPTURE=$_radio_capture
|
||||
REAL_CODECS = $_real
|
||||
S3FB = $_s3fb
|
||||
SDL = $_sdl
|
||||
@@ -162,7 +163,7 @@ index d18543d..02f2004 100755
|
||||
SDL_IMAGE = $sdl_image
|
||||
SPEEX = $_speex
|
||||
STREAM_CACHE = $_stream_cache
|
||||
@@ -9080,6 +9115,7 @@ $def_quartz
|
||||
@@ -9153,6 +9188,7 @@ $def_quartz
|
||||
$def_s3fb
|
||||
$def_sdl
|
||||
$def_sdl_sdl_h
|
||||
@@ -172,7 +173,7 @@ index d18543d..02f2004 100755
|
||||
$def_tdfxvid
|
||||
diff --git a/libao2/ao_haiku.cpp b/libao2/ao_haiku.cpp
|
||||
new file mode 100644
|
||||
index 0000000..e201f17
|
||||
index 0000000..e50f1dc
|
||||
--- /dev/null
|
||||
+++ b/libao2/ao_haiku.cpp
|
||||
@@ -0,0 +1,195 @@
|
||||
@@ -216,7 +217,7 @@ index 0000000..e201f17
|
||||
+ &info,
|
||||
+ control,
|
||||
+ init,
|
||||
+ uninit,
|
||||
+ uninit,
|
||||
+ reset,
|
||||
+ get_space,
|
||||
+ play,
|
||||
@@ -239,17 +240,17 @@ index 0000000..e201f17
|
||||
+static BSoundPlayer *player = NULL;
|
||||
+
|
||||
+static int write_buffer(unsigned char* data,int len){
|
||||
+ int free = av_fifo_space(buffer);
|
||||
+ if (len > free) len = free;
|
||||
+ return av_fifo_generic_write(buffer, data, len, NULL);
|
||||
+ int free = av_fifo_space(buffer);
|
||||
+ if (len > free) len = free;
|
||||
+ return av_fifo_generic_write(buffer, data, len, NULL);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int read_buffer(unsigned char* data,int len){
|
||||
+ int buffered = av_fifo_size(buffer);
|
||||
+ if (len > buffered) len = buffered;
|
||||
+ av_fifo_generic_read(buffer, data, len, NULL);
|
||||
+ return len;
|
||||
+ int buffered = av_fifo_size(buffer);
|
||||
+ if (len > buffered) len = buffered;
|
||||
+ av_fifo_generic_read(buffer, data, len, NULL);
|
||||
+ return len;
|
||||
+}
|
||||
+
|
||||
+//BSoundPlayer proc func
|
||||
@@ -272,7 +273,7 @@ index 0000000..e201f17
|
||||
+ ao_data.samplerate = rate;
|
||||
+ ao_data.buffersize = CHUNK_SIZE;
|
||||
+ ao_data.outburst = CHUNK_SIZE;
|
||||
+ ao_data.format = format;
|
||||
+ ao_data.format = format;
|
||||
+
|
||||
+ media_raw_audio_format hspec = {
|
||||
+ rate,
|
||||
@@ -283,32 +284,32 @@ index 0000000..e201f17
|
||||
+ };
|
||||
+
|
||||
+ switch(format) {
|
||||
+ case AF_FORMAT_U8:
|
||||
+ case AF_FORMAT_U8:
|
||||
+ hspec.format = media_raw_audio_format::B_AUDIO_UCHAR;
|
||||
+ break;
|
||||
+ case AF_FORMAT_S8:
|
||||
+ case AF_FORMAT_S8:
|
||||
+ hspec.format = media_raw_audio_format::B_AUDIO_CHAR;;
|
||||
+ break;
|
||||
+ case AF_FORMAT_S16_LE:
|
||||
+ case AF_FORMAT_S16_LE:
|
||||
+ hspec.format = media_raw_audio_format::B_AUDIO_SHORT;
|
||||
+ hspec.byte_order = B_MEDIA_LITTLE_ENDIAN;
|
||||
+ hspec.byte_order = B_MEDIA_LITTLE_ENDIAN;
|
||||
+ break;
|
||||
+ case AF_FORMAT_S16_BE:
|
||||
+ case AF_FORMAT_S16_BE:
|
||||
+ hspec.format = media_raw_audio_format::B_AUDIO_SHORT;
|
||||
+ hspec.byte_order = B_MEDIA_BIG_ENDIAN;
|
||||
+ break;
|
||||
+ case AF_FORMAT_FLOAT_LE:
|
||||
+ case AF_FORMAT_FLOAT_LE:
|
||||
+ hspec.format = media_raw_audio_format::B_AUDIO_FLOAT;
|
||||
+ hspec.byte_order = B_MEDIA_LITTLE_ENDIAN;
|
||||
+ hspec.byte_order = B_MEDIA_LITTLE_ENDIAN;
|
||||
+ break;
|
||||
+ case AF_FORMAT_FLOAT_BE:
|
||||
+ case AF_FORMAT_FLOAT_BE:
|
||||
+ hspec.format = media_raw_audio_format::B_AUDIO_FLOAT;
|
||||
+ hspec.byte_order = B_MEDIA_BIG_ENDIAN;
|
||||
+ break;
|
||||
+ default:
|
||||
+ hspec.format = media_raw_audio_format::B_AUDIO_SHORT;
|
||||
+ hspec.byte_order = B_MEDIA_LITTLE_ENDIAN;
|
||||
+ ao_data.format = AF_FORMAT_S16_LE;
|
||||
+ default:
|
||||
+ hspec.format = media_raw_audio_format::B_AUDIO_SHORT;
|
||||
+ hspec.byte_order = B_MEDIA_LITTLE_ENDIAN;
|
||||
+ ao_data.format = AF_FORMAT_S16_LE;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
@@ -333,7 +334,7 @@ index 0000000..e201f17
|
||||
+static void uninit(int immed){
|
||||
+
|
||||
+ if (!immed)
|
||||
+ usec_sleep(get_delay() * 1000 * 1000);
|
||||
+ usec_sleep(get_delay() * 1000 * 1000);
|
||||
+
|
||||
+ player->SetHasData(false);
|
||||
+ delete player;
|
||||
@@ -358,7 +359,7 @@ index 0000000..e201f17
|
||||
+}
|
||||
+
|
||||
+static int get_space(void){
|
||||
+ return av_fifo_space(buffer);
|
||||
+ return av_fifo_space(buffer);
|
||||
+}
|
||||
+
|
||||
+static int play(void* data,int len,int flags){
|
||||
@@ -368,8 +369,8 @@ index 0000000..e201f17
|
||||
+}
|
||||
+
|
||||
+static float get_delay(void){
|
||||
+ int buffered = av_fifo_size(buffer); // could be less
|
||||
+ return (float)(buffered + ao_data.buffersize)/(float)ao_data.bps;
|
||||
+ int buffered = av_fifo_size(buffer); // could be less
|
||||
+ return (float)(buffered + ao_data.buffersize)/(float)ao_data.bps;
|
||||
+}
|
||||
diff --git a/libao2/audio_out.c b/libao2/audio_out.c
|
||||
index 197a63b..7f7baff 100644
|
||||
@@ -481,8 +482,8 @@ index 0000000..1ea5f96
|
||||
+ if (msg->FindFloat("be:wheel_delta_y", &dy) == B_OK) {
|
||||
+ if(dy<0)
|
||||
+ mplayer_put_key(MOUSE_BTN3);
|
||||
+ else
|
||||
+ mplayer_put_key(MOUSE_BTN4);
|
||||
+ else
|
||||
+ mplayer_put_key(MOUSE_BTN4);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
@@ -490,15 +491,15 @@ index 0000000..1ea5f96
|
||||
+FBView::MouseMoved(BPoint point, uint32 transit,const BMessage *message)
|
||||
+{
|
||||
+ switch(transit)
|
||||
+ {
|
||||
+ case B_INSIDE_VIEW:
|
||||
+ case B_ENTERED_VIEW:
|
||||
+ {
|
||||
+ BPoint p = point;
|
||||
+ {
|
||||
+ case B_INSIDE_VIEW:
|
||||
+ case B_ENTERED_VIEW:
|
||||
+ {
|
||||
+ BPoint p = point;
|
||||
+ vo_mouse_movement(p.x, p.y);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void
|
||||
@@ -532,9 +533,9 @@ index 0000000..1ea5f96
|
||||
+void
|
||||
+FBView::Paint()
|
||||
+{
|
||||
+ if(LockLooper()) {
|
||||
+ bufferView->LockLooper();
|
||||
+ SetDrawingMode(B_OP_COPY);
|
||||
+ if(LockLooper()) {
|
||||
+ bufferView->LockLooper();
|
||||
+ SetDrawingMode(B_OP_COPY);
|
||||
+ DrawBitmap(bufferBitmap,bufferView->Bounds(),Bounds());
|
||||
+ bufferView->UnlockLooper();
|
||||
+ UnlockLooper();
|
||||
@@ -623,19 +624,19 @@ index 0000000..1ea5f96
|
||||
+void
|
||||
+MWindow::FrameResized(float width, float height)
|
||||
+{
|
||||
+ int d_width=width;
|
||||
+ int d_height=height;
|
||||
+ int d_width=width;
|
||||
+ int d_height=height;
|
||||
+
|
||||
+ float winaspect = width/height;
|
||||
+ float videoaspect = image_width/image_height;
|
||||
+ float winaspect = width/height;
|
||||
+ float videoaspect = image_width/image_height;
|
||||
+
|
||||
+ d_width = width;
|
||||
+ d_height = width/videoaspect;
|
||||
+ d_width = width;
|
||||
+ d_height = width/videoaspect;
|
||||
+
|
||||
+ if(d_height>height) {
|
||||
+ d_height = height;
|
||||
+ d_width = height*videoaspect;
|
||||
+ }
|
||||
+ if(d_height>height) {
|
||||
+ d_height = height;
|
||||
+ d_width = height*videoaspect;
|
||||
+ }
|
||||
+
|
||||
+ renderRect.left = (width - d_width) / 2;
|
||||
+ renderRect.top = (height - d_height) / 2;
|
||||
@@ -647,8 +648,8 @@ index 0000000..1ea5f96
|
||||
+void
|
||||
+MWindow::Zoom(BPoint origin, float width,float height)
|
||||
+{
|
||||
+ vo_fs = !vo_fs;
|
||||
+ SetFullscreen(vo_fs);
|
||||
+ vo_fs = !vo_fs;
|
||||
+ SetFullscreen(vo_fs);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
@@ -664,9 +665,9 @@ index 0000000..1ea5f96
|
||||
+ case B_ESCAPE:
|
||||
+ if(vo_fs==1) {
|
||||
+ vo_fs = !vo_fs;
|
||||
+ SetFullscreen(vo_fs);
|
||||
+ SetFullscreen(vo_fs);
|
||||
+ } else {
|
||||
+ mplayer_put_key(KEY_ESC);
|
||||
+ mplayer_put_key(KEY_ESC);
|
||||
+ }
|
||||
+ break;
|
||||
+ case B_LEFT_ARROW:
|
||||
@@ -752,8 +753,8 @@ index 0000000..53e21ef
|
||||
+ int Width();
|
||||
+ int Height();
|
||||
+ private:
|
||||
+ int buffer_width;
|
||||
+ int buffer_height;
|
||||
+ int buffer_width;
|
||||
+ int buffer_height;
|
||||
+ BView *bufferView;
|
||||
+ BBitmap *bufferBitmap;
|
||||
+ BRect renderRect;
|
||||
@@ -841,15 +842,15 @@ index 0000000..e491de4
|
||||
+FBView::MouseDown(BPoint point)
|
||||
+{
|
||||
+ uint32 buttons = Window()->CurrentMessage()->FindInt32("buttons");
|
||||
+ int32 clicks = Window()->CurrentMessage()->FindInt32("clicks");
|
||||
+ int32 clicks = Window()->CurrentMessage()->FindInt32("clicks");
|
||||
+
|
||||
+ if( buttons & B_PRIMARY_MOUSE_BUTTON ) {
|
||||
+ if(clicks==1)
|
||||
+ mplayer_put_key(MOUSE_BTN0);
|
||||
+ else {
|
||||
+ vo_fs = !vo_fs;
|
||||
+ haiku_fullscreen();
|
||||
+ mplayer_put_key(MOUSE_BTN0);
|
||||
+ haiku_fullscreen();
|
||||
+ mplayer_put_key(MOUSE_BTN0);
|
||||
+ }
|
||||
+ }
|
||||
+ if( buttons & B_SECONDARY_MOUSE_BUTTON ) {
|
||||
@@ -867,24 +868,24 @@ index 0000000..e491de4
|
||||
+ if (msg->FindFloat("be:wheel_delta_y", &dy) == B_OK) {
|
||||
+ if(dy>0)
|
||||
+ mplayer_put_key(MOUSE_BTN3);
|
||||
+ else
|
||||
+ mplayer_put_key(MOUSE_BTN4);
|
||||
+ else
|
||||
+ mplayer_put_key(MOUSE_BTN4);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+FBView::MouseMoved(BPoint point, uint32 transit,const BMessage *message)
|
||||
+{
|
||||
+ switch(transit)
|
||||
+ {
|
||||
+ case B_INSIDE_VIEW:
|
||||
+ case B_ENTERED_VIEW:
|
||||
+ {
|
||||
+ BPoint p = point;
|
||||
+ switch(transit)
|
||||
+ {
|
||||
+ case B_INSIDE_VIEW:
|
||||
+ case B_ENTERED_VIEW:
|
||||
+ {
|
||||
+ BPoint p = point;
|
||||
+ vo_mouse_movement(p.x, p.y);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void
|
||||
@@ -918,12 +919,12 @@ index 0000000..e491de4
|
||||
+void
|
||||
+FBView::Paint()
|
||||
+{
|
||||
+ if(LockLooper()) {
|
||||
+ bufferView->LockLooper();
|
||||
+ SetDrawingMode(B_OP_COPY);
|
||||
+ DrawBitmap(bufferBitmap,bufferView->Bounds(),B_FILTER_BITMAP_BILINEAR,Bounds());
|
||||
+ bufferView->UnlockLooper();
|
||||
+ UnlockLooper();
|
||||
+ if(LockLooper()) {
|
||||
+ bufferView->LockLooper();
|
||||
+ SetDrawingMode(B_OP_COPY);
|
||||
+ DrawBitmap(bufferBitmap,bufferView->Bounds(),B_FILTER_BITMAP_BILINEAR,Bounds());
|
||||
+ bufferView->UnlockLooper();
|
||||
+ UnlockLooper();
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
@@ -1048,19 +1049,19 @@ index 0000000..2f4c8bf
|
||||
+void
|
||||
+TestWindow::FrameResized(float width, float height)
|
||||
+{
|
||||
+ int d_width=width;
|
||||
+ int d_height=height;
|
||||
+ int d_width=width;
|
||||
+ int d_height=height;
|
||||
+
|
||||
+ float winaspect = width/height;
|
||||
+ float videoaspect = image_width/image_height;
|
||||
+ float winaspect = width/height;
|
||||
+ float videoaspect = image_width/image_height;
|
||||
+
|
||||
+ d_width = width;
|
||||
+ d_height = width/videoaspect;
|
||||
+ d_width = width;
|
||||
+ d_height = width/videoaspect;
|
||||
+
|
||||
+ if(d_height>height) {
|
||||
+ d_height = height;
|
||||
+ d_width = height*videoaspect;
|
||||
+ }
|
||||
+ if(d_height>height) {
|
||||
+ d_height = height;
|
||||
+ d_width = height*videoaspect;
|
||||
+ }
|
||||
+
|
||||
+ renderRect.left = (width - d_width) / 2;
|
||||
+ renderRect.top = (height - d_height) / 2;
|
||||
@@ -1088,9 +1089,9 @@ index 0000000..2f4c8bf
|
||||
+ case B_ESCAPE:
|
||||
+ if(vo_fs==1) {
|
||||
+ vo_fs = !vo_fs;
|
||||
+ haiku_fullscreen();
|
||||
+ haiku_fullscreen();
|
||||
+ } else {
|
||||
+ mplayer_put_key(KEY_ESC);
|
||||
+ mplayer_put_key(KEY_ESC);
|
||||
+ }
|
||||
+ break;
|
||||
+ case B_LEFT_ARROW:
|
||||
@@ -1244,7 +1245,7 @@ index 0000000..614c8ff
|
||||
+ control,
|
||||
+ draw_frame,
|
||||
+ draw_slice,
|
||||
+ draw_osd,
|
||||
+ draw_osd,
|
||||
+ flip_page,
|
||||
+ check_events,
|
||||
+ uninit
|
||||
@@ -1266,12 +1267,12 @@ index 0000000..614c8ff
|
||||
+
|
||||
+static void draw_alpha(int x0, int y0, int w, int h, unsigned char *src, unsigned char *srca, int stride)
|
||||
+{
|
||||
+ switch (image_format)
|
||||
+ {
|
||||
+ case IMGFMT_BGR32:
|
||||
+ vo_draw_alpha_rgb32(w,h,src,srca,stride, image_data+4*(y0*image_width+x0),4*image_width);
|
||||
+ break;
|
||||
+ }
|
||||
+ switch (image_format)
|
||||
+ {
|
||||
+ case IMGFMT_BGR32:
|
||||
+ vo_draw_alpha_rgb32(w,h,src,srca,stride, image_data+4*(y0*image_width+x0),4*image_width);
|
||||
+ break;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void draw_osd(void)
|
||||
@@ -1292,17 +1293,17 @@ index 0000000..614c8ff
|
||||
+ unsigned char *pbuffer = (unsigned char *)image_data;
|
||||
+
|
||||
+ int n = sizeBuf/BLOCK;
|
||||
+ int ln = sizeBuf%BLOCK;
|
||||
+ unsigned char* ptr=pbuffer;
|
||||
+ int ln = sizeBuf%BLOCK;
|
||||
+ unsigned char* ptr=pbuffer;
|
||||
+
|
||||
+ write_port(port,'BITS',(void*)&cmd, sizeof(int));
|
||||
+
|
||||
+ write_port(port,msg_code,(void*)&w, sizeof(int));
|
||||
+ write_port(port,msg_code,(void*)&h, sizeof(int));
|
||||
+
|
||||
+ for(int i=0;i<n;i++,ptr+=BLOCK)
|
||||
+ write_port(port,msg_code,(void*)ptr, BLOCK);
|
||||
+ write_port(port,msg_code,(void*)ptr, ln);
|
||||
+ for(int i=0;i<n;i++,ptr+=BLOCK)
|
||||
+ write_port(port,msg_code,(void*)ptr, BLOCK);
|
||||
+ write_port(port,msg_code,(void*)ptr, ln);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
@@ -1317,11 +1318,11 @@ index 0000000..614c8ff
|
||||
+query_format(uint32_t format)
|
||||
+{
|
||||
+ image_format = format;
|
||||
+ switch(format){
|
||||
+ case IMGFMT_BGR32:
|
||||
+ return VFCAP_CSP_SUPPORTED|VFCAP_OSD|VFCAP_SWSCALE;
|
||||
+ }
|
||||
+ return 0;
|
||||
+ switch(format){
|
||||
+ case IMGFMT_BGR32:
|
||||
+ return VFCAP_CSP_SUPPORTED|VFCAP_OSD|VFCAP_SWSCALE;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
@@ -1333,7 +1334,7 @@ index 0000000..614c8ff
|
||||
+ image_size = (image_width * image_height * image_depth + 7) / 8;
|
||||
+
|
||||
+ aspect_save_orig(width,height);
|
||||
+ aspect_save_prescale(d_width,d_height);
|
||||
+ aspect_save_prescale(d_width,d_height);
|
||||
+
|
||||
+ //printf("WinID=%d\n",WinID);
|
||||
+ port=find_port("WID:12345");
|
||||
@@ -1344,8 +1345,8 @@ index 0000000..614c8ff
|
||||
+ haiku_wnd->Show();
|
||||
+ if(flags&VOFLAG_FULLSCREEN) {
|
||||
+ vo_fs=1;
|
||||
+ if(haiku_wnd)
|
||||
+ haiku_wnd->SetFullscreen(vo_fs);
|
||||
+ if(haiku_wnd)
|
||||
+ haiku_wnd->SetFullscreen(vo_fs);
|
||||
+ }
|
||||
+ } else {
|
||||
+ image_data=(unsigned char *)malloc(image_size);
|
||||
@@ -1368,46 +1369,37 @@ index 0000000..614c8ff
|
||||
+
|
||||
+static int preinit(const char *arg)
|
||||
+{
|
||||
+// if(be_app==NULL)
|
||||
+// be_app = new BApplication("application/x-vnd.mplayer");
|
||||
+ if(arg)
|
||||
+ {
|
||||
+// if(be_app==NULL)
|
||||
+// be_app = new BApplication("application/x-vnd.mplayer");
|
||||
+ if(arg)
|
||||
+ {
|
||||
+ mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_NULL_UnknownSubdevice,arg);
|
||||
+ return ENOSYS;
|
||||
+ }
|
||||
+ return 0;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int control(uint32_t request, void *data)
|
||||
+{
|
||||
+ switch (request) {
|
||||
+ case VOCTRL_QUERY_FORMAT:
|
||||
+ {
|
||||
+ return query_format(*((uint32_t*)data));
|
||||
+ }
|
||||
+ case VOCTRL_FULLSCREEN:
|
||||
+ {
|
||||
+ vo_fs = !vo_fs;
|
||||
+ if(haiku_wnd)
|
||||
+ haiku_wnd->SetFullscreen(vo_fs);
|
||||
+ return VO_TRUE;
|
||||
+ switch (request) {
|
||||
+ case VOCTRL_QUERY_FORMAT:
|
||||
+ {
|
||||
+ return query_format(*((uint32_t*)data));
|
||||
+ }
|
||||
+ case VOCTRL_FULLSCREEN:
|
||||
+ {
|
||||
+ vo_fs = !vo_fs;
|
||||
+ if(haiku_wnd)
|
||||
+ haiku_wnd->SetFullscreen(vo_fs);
|
||||
+ return VO_TRUE;
|
||||
+ }
|
||||
+ }
|
||||
+ return VO_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+
|
||||
--
|
||||
2.10.2
|
||||
|
||||
From 38ddddaa2dd35b98fdbdaf063163cf28e288dea6 Mon Sep 17 00:00:00 2001
|
||||
From: Damillora <duniapengetahuan.12345@gmail.com>
|
||||
Date: Sun, 24 Dec 2017 13:13:40 +0700
|
||||
Subject: Put settings to user settings folder
|
||||
|
||||
|
||||
diff --git a/path.c b/path.c
|
||||
index b8d9335..a98f43b 100644
|
||||
index e6287d2..e5c4cd9 100644
|
||||
--- a/path.c
|
||||
+++ b/path.c
|
||||
@@ -42,6 +42,11 @@
|
||||
@@ -1450,5 +1442,5 @@ index b8d9335..a98f43b 100644
|
||||
if (filename == NULL) {
|
||||
if ((buff = malloc(len)) == NULL)
|
||||
--
|
||||
2.14.2
|
||||
2.21.0
|
||||
|
||||
Reference in New Issue
Block a user