Merge branch 'master' into intel-extreme
This commit is contained in:
@@ -125,7 +125,8 @@ rule ArchitectureSetup architecture
|
||||
|
||||
if $(gccVersion[1]) >= 4 {
|
||||
# -Wuninitialized gives too many false positives.
|
||||
HAIKU_WERROR_FLAGS_$(architecture) += -Wno-error=uninitialized ;
|
||||
HAIKU_WERROR_FLAGS_$(architecture) += -Wno-error=uninitialized
|
||||
-Wno-error=maybe-uninitialized ;
|
||||
|
||||
# TODO: remove the -Wno-unused-but-set-variable option
|
||||
HAIKU_WERROR_FLAGS_$(architecture) += -Wno-unused-but-set-variable ;
|
||||
@@ -634,7 +635,7 @@ rule ArchitectureSetupWarnings architecture
|
||||
EnableWerror src preferences ;
|
||||
EnableWerror src servers ;
|
||||
EnableWerror src system boot ;
|
||||
EnableWerror src system kernel ;
|
||||
# EnableWerror src system kernel ;
|
||||
EnableWerror src system libroot add-ons ;
|
||||
EnableWerror src system libroot os ;
|
||||
EnableWerror src system libroot posix locale ;
|
||||
|
||||
@@ -20,7 +20,7 @@ SYSTEM_APPS += [ FFilterByBuildFeatures
|
||||
CodyCam
|
||||
GLInfo@mesa
|
||||
HaikuDepot
|
||||
Icon-O-Matic@expat Installer LaunchBox LegacyPackageInstaller
|
||||
Icon-O-Matic@expat Installer LaunchBox LegacyPackageInstaller@x86
|
||||
Magnify Mail MediaConverter MediaPlayer MidiPlayer
|
||||
People PoorMan PowerStatus
|
||||
RemoteDesktop
|
||||
@@ -105,7 +105,7 @@ SYSTEM_ADD_ONS_ACCELERANTS += [ FFilterByBuildFeatures
|
||||
matrox.accelerant
|
||||
nvidia.accelerant
|
||||
radeon.accelerant radeon_hd.accelerant
|
||||
#via.accelerant
|
||||
via.accelerant
|
||||
}@ # x86,x86_64
|
||||
x86 @{
|
||||
3dfx.accelerant ati.accelerant neomagic.accelerant s3.accelerant
|
||||
@@ -200,7 +200,7 @@ SYSTEM_ADD_ONS_DRIVERS_GRAPHICS += [ FFilterByBuildFeatures
|
||||
matrox
|
||||
nvidia
|
||||
radeon radeon_hd
|
||||
#via
|
||||
via
|
||||
}@ # x86,x86_64
|
||||
x86 @{
|
||||
3dfx
|
||||
|
||||
@@ -13,7 +13,7 @@ RemotePackageRepository HaikuPorts
|
||||
unknown_horizons-2014.1-1
|
||||
vl_gothic-20141206-1
|
||||
wqy_microhei-0.2.0~beta-3
|
||||
youtube_dl-2016.01.29-1
|
||||
youtube_dl-2016.01.29-2
|
||||
:
|
||||
# repository architecture packages
|
||||
# primary architecture (x86)
|
||||
@@ -31,7 +31,7 @@ RemotePackageRepository HaikuPorts
|
||||
beam-1.2-2
|
||||
bepdf-1.2.0-1
|
||||
bescreencapture-1.9.4-1
|
||||
binutils-2.25_12015_07_31-1
|
||||
binutils-2.26.0_2016_02_29-1
|
||||
bison-2.6.5-1
|
||||
boost-1.55.0-6
|
||||
boost_atomic-1.55.0-6
|
||||
@@ -61,12 +61,12 @@ RemotePackageRepository HaikuPorts
|
||||
burnitnow-0.1.0-1
|
||||
bzip2-1.0.6-5
|
||||
bzip2_devel-1.0.6-5
|
||||
cdrtools-3.02~a06-1
|
||||
cdrtools_devel-3.02~a06-1
|
||||
cdrtools-3.02~a06-2
|
||||
cdrtools_devel-3.02~a06-2
|
||||
clang-3.4-3
|
||||
clang_analysis-3.4-3
|
||||
clipdinger-0.5.2-1
|
||||
cmake-3.3.1-1
|
||||
cmake-3.4.3-1
|
||||
coreutils-8.24-1
|
||||
cpio-2.10-1
|
||||
ctags-5.8-3
|
||||
@@ -95,14 +95,14 @@ RemotePackageRepository HaikuPorts
|
||||
flac_devel-1.3.1-1
|
||||
flex-2.5.39-2
|
||||
fossil-1.34-2
|
||||
freetype-2.6-1
|
||||
freetype_devel-2.6-1
|
||||
freetype-2.6.3-1
|
||||
freetype_devel-2.6.3-1
|
||||
gawk-4.1.3-1
|
||||
gcc-4.8.5_2015_07_11-2
|
||||
gcc_syslibs-4.8.5_2015_07_11-2
|
||||
gcc_syslibs_devel-4.8.5_2015_07_11-2
|
||||
gettext-0.19.4-1
|
||||
gettext_libintl-0.19.4-1
|
||||
gcc-5.3.0_2016_02_29-1
|
||||
gcc_syslibs-5.3.0_2016_02_29-1
|
||||
gcc_syslibs_devel-5.3.0_2016_02_29-1
|
||||
gettext-0.19.6-2
|
||||
gettext_libintl-0.19.6-2
|
||||
giflib-5.1.2-1
|
||||
giflib_devel-5.1.2-1
|
||||
giflib6-5.0.5-2
|
||||
@@ -126,8 +126,8 @@ RemotePackageRepository HaikuPorts
|
||||
gperf-3.0.4-1
|
||||
grep-2.21-1
|
||||
groff-1.20.1-3
|
||||
gutenprint-5.2.11-1
|
||||
gutenprint_devel-5.2.11-1
|
||||
gutenprint-5.2.11-2
|
||||
gutenprint_devel-5.2.11-2
|
||||
gzip-1.6-2
|
||||
haikuwebkit-1.5.1-1
|
||||
haikuwebkit_devel-1.5.1-1
|
||||
@@ -148,7 +148,7 @@ RemotePackageRepository HaikuPorts
|
||||
jpeg_devel-9a-1
|
||||
jpeg_tools-9a-1
|
||||
keymapswitcher-1.2.7.10-1
|
||||
less-458-1
|
||||
less-481-1
|
||||
libedit-2015_03_21_3.1-2
|
||||
libedit_devel-2015_03_21_3.1-2
|
||||
libevent-2.0.21-8
|
||||
@@ -219,7 +219,7 @@ RemotePackageRepository HaikuPorts
|
||||
lzo-2.09-1
|
||||
lzo_devel-2.09-1
|
||||
m4-1.4.16-5
|
||||
make-3.82-5
|
||||
make-4.1-1
|
||||
man-1.6g-4
|
||||
mercurial-2.9.2-1
|
||||
mesa-10.1.1-1
|
||||
@@ -233,7 +233,7 @@ RemotePackageRepository HaikuPorts
|
||||
mpfr_devel-3.1.3-1
|
||||
mpg123-1.22.4-1
|
||||
mpg123_devel-1.22.4-1
|
||||
nano-2.4.2-1
|
||||
nano-2.5.3-1
|
||||
nasm-2.11.08-1
|
||||
ncurses-5.9-10
|
||||
ncurses_devel-5.9-10
|
||||
@@ -250,6 +250,7 @@ RemotePackageRepository HaikuPorts
|
||||
openssl-1.0.2e-1
|
||||
openssl_devel-1.0.2e-1
|
||||
p7zip-9.20.1-4
|
||||
padblocker-1.0-1
|
||||
patch-2.7.5-1
|
||||
pe-2.4.5-2
|
||||
perl-5.18.2-2
|
||||
@@ -335,12 +336,12 @@ RemotePackageRepository HaikuPorts
|
||||
expat_x86_gcc2_devel-2.1.0-1
|
||||
ffmpeg_x86_gcc2-0.10.2-4
|
||||
ffmpeg_x86_gcc2_devel-0.10.2-4
|
||||
freetype_x86_gcc2-2.6-1
|
||||
freetype_x86_gcc2_devel-2.6-1
|
||||
freetype_x86_gcc2-2.6.3-1
|
||||
freetype_x86_gcc2_devel-2.6.3-1
|
||||
gcc_x86_gcc2-2.95.3_2014_07_26-1
|
||||
gcc_x86_gcc2_syslibs_devel-2.95.3_2014_07_26-1
|
||||
gettext_x86_gcc2-0.18.1.1-6
|
||||
gettext_x86_gcc2_libintl-0.18.1.1-6
|
||||
gettext_x86_gcc2-0.19.6-2
|
||||
gettext_x86_gcc2_libintl-0.19.6-2
|
||||
giflib_x86_gcc2-5.1.2-1
|
||||
giflib_x86_gcc2_devel-5.1.2-1
|
||||
glew_x86_gcc2-1.11.0-1
|
||||
@@ -536,6 +537,7 @@ RemotePackageRepository HaikuPorts
|
||||
openssh
|
||||
openssl
|
||||
p7zip
|
||||
padblocker
|
||||
patch
|
||||
pe
|
||||
perl
|
||||
|
||||
@@ -15,7 +15,7 @@ RemotePackageRepository HaikuPorts
|
||||
timgmsoundfont-fixed-5
|
||||
unknown_horizons-2014.1-1
|
||||
vl_gothic-20141206-1
|
||||
youtube_dl-2016.01.29-1
|
||||
youtube_dl-2016.01.29-2
|
||||
wqy_microhei-0.2.0~beta-3
|
||||
:
|
||||
# repository architecture packages
|
||||
@@ -33,7 +33,7 @@ RemotePackageRepository HaikuPorts
|
||||
automake113-1.13.1-1
|
||||
bash-4.3.42-2
|
||||
# bepdf-1.1.1~beta5_2013_04_28-1
|
||||
binutils-2.25_12015_07_31-1
|
||||
binutils-2.26.0_2016_02_29-1
|
||||
bison-2.6.5-1
|
||||
boost-1.55.0-6
|
||||
boost_atomic-1.55.0-6
|
||||
@@ -62,12 +62,12 @@ RemotePackageRepository HaikuPorts
|
||||
buildbot_slave-0.8.8-2
|
||||
bzip2-1.0.6-5
|
||||
bzip2_devel-1.0.6-5
|
||||
cdrtools-3.02~a06-1
|
||||
cdrtools_devel-3.02~a06-1
|
||||
cdrtools-3.02~a06-2
|
||||
cdrtools_devel-3.02~a06-2
|
||||
clang-3.5.1-1
|
||||
clang_analysis-3.5.1-1
|
||||
clipdinger-0.5.2-1
|
||||
cmake-3.3.2-3
|
||||
cmake-3.4.3-1
|
||||
coreutils-8.24-1
|
||||
cpio-2.12-1
|
||||
cppunit-1.12.1-2
|
||||
@@ -84,8 +84,8 @@ RemotePackageRepository HaikuPorts
|
||||
dos2unix-7.3.1-1
|
||||
doxygen-1.6.3-4
|
||||
dtc-1.4.1-1
|
||||
enca-1.15-1
|
||||
enca_devel-1.15-1
|
||||
enca-1.18-1
|
||||
enca_devel-1.18-1
|
||||
expat-2.1.0-1
|
||||
expat_devel-2.1.0-1
|
||||
fife-0.4.0~20150801-1
|
||||
@@ -94,8 +94,10 @@ RemotePackageRepository HaikuPorts
|
||||
file-5.25-1
|
||||
file_devel-5.25-1
|
||||
findutils-4.4.2-1
|
||||
ffmpeg-2.8.3-1
|
||||
ffmpeg_devel-2.8.3-1
|
||||
ffmpeg-3.0-1
|
||||
ffmpeg_devel-3.0-1
|
||||
ffmpeg2-2.8.6-1
|
||||
ffmpeg2_devel-2.8.6-1
|
||||
flac-1.3.1-1
|
||||
flac_devel-1.3.1-1
|
||||
flex-2.5.39-1
|
||||
@@ -103,14 +105,14 @@ RemotePackageRepository HaikuPorts
|
||||
fontconfig_devel-2.11.94-1
|
||||
fossil-1.34-2
|
||||
freeciv-2.5.1-2
|
||||
freetype-2.6.2-1
|
||||
freetype_devel-2.6.2-1
|
||||
freetype-2.6.3-1
|
||||
freetype_devel-2.6.3-1
|
||||
fribidi-0.19.6-2
|
||||
fribidi_devel-0.19.6-2
|
||||
gawk-4.1.0-2
|
||||
gcc-4.8.5_2015_07_11-1
|
||||
gcc_syslibs-4.8.5_2015_07_11-1
|
||||
gcc_syslibs_devel-4.8.5_2015_07_11-1
|
||||
gcc-5.3.0_2016_02_29-1
|
||||
gcc_syslibs-5.3.0_2016_02_29-1
|
||||
gcc_syslibs_devel-5.3.0_2016_02_29-1
|
||||
gettext-0.19.6-2
|
||||
gettext_libintl-0.19.6-2
|
||||
giflib-5.1.2-1
|
||||
@@ -131,17 +133,19 @@ RemotePackageRepository HaikuPorts
|
||||
gmp-6.1.0-1
|
||||
gmp_devel-6.1.0-1
|
||||
gnupg-1.4.16-1
|
||||
gnutls-3.4.9-1
|
||||
gnutls_devel-3.4.9-1
|
||||
gperf-3.0.4-1
|
||||
gpgme-1.5.4-1
|
||||
gpgme_devel-1.5.4-1
|
||||
gpgme-1.6.0-1
|
||||
gpgme_devel-1.6.0-1
|
||||
graphite2-1.2.4-1
|
||||
graphite2_devel-1.2.4-1
|
||||
grep-2.21-1
|
||||
grep_debuginfo-2.21-1
|
||||
groff-1.20.1-3
|
||||
gtk_doc-1.20-1
|
||||
gutenprint-5.2.11-1
|
||||
gutenprint_devel-5.2.11-1
|
||||
gutenprint-5.2.11-2
|
||||
gutenprint_devel-5.2.11-2
|
||||
gzip-1.6-2
|
||||
haikuwebkit-1.5.2-1
|
||||
haikuwebkit_devel-1.5.2-1
|
||||
@@ -172,7 +176,7 @@ RemotePackageRepository HaikuPorts
|
||||
lcms_devel-2.7-1
|
||||
lensfun-0.3.2-1
|
||||
lensfun_devel-0.3.2-1
|
||||
less-458-2
|
||||
less-481-1
|
||||
libaacs-0.8.1-1
|
||||
libaacs_devel-0.8.1-1
|
||||
libasr-1.0.2-2
|
||||
@@ -195,8 +199,8 @@ RemotePackageRepository HaikuPorts
|
||||
libexecinfo_devel-1.1-2
|
||||
libffi-3.2.1-2
|
||||
libffi_devel-3.2.1-2
|
||||
libgcrypt-1.6.4-1
|
||||
libgcrypt_devel-1.6.4-1
|
||||
libgcrypt-1.6.5-2
|
||||
libgcrypt_devel-1.6.5-2
|
||||
libgsasl-1.8.0-1
|
||||
libgsasl_devel-1.8.0-1
|
||||
libgpg_error-1.20-1
|
||||
@@ -215,8 +219,8 @@ RemotePackageRepository HaikuPorts
|
||||
libmikmod_devel-3.3.7-1
|
||||
libmkv-0.6.5.1-3
|
||||
libmkv_devel-0.6.5.1-3
|
||||
libmodplug-0.8.8.5-2
|
||||
libmodplug_devel-0.8.8.5-2
|
||||
libmodplug-0.8.8.5-3
|
||||
libmodplug_devel-0.8.8.5-3
|
||||
libmp4v2-2.0.0-2
|
||||
libmp4v2_devel-2.0.0-2
|
||||
libmpeg2-0.5.1-3
|
||||
@@ -258,8 +262,8 @@ RemotePackageRepository HaikuPorts
|
||||
libunistring_devel-0.9.6-1
|
||||
libusb-1.0.20-1
|
||||
libusb_devel-1.0.20-1
|
||||
libusb_compat-0.1.5-2
|
||||
libusb_compat_devel-0.1.5-2
|
||||
libusb_compat-0.1.5-3
|
||||
libusb_compat_devel-0.1.5-3
|
||||
libvorbis-1.3.5-2
|
||||
libvorbis_devel-1.3.5-2
|
||||
libvpx-1.0.0-2
|
||||
@@ -281,7 +285,7 @@ RemotePackageRepository HaikuPorts
|
||||
lzo-2.09-1
|
||||
lzo_devel-2.09-1
|
||||
m4-1.4.17-1
|
||||
make-3.82-5
|
||||
make-4.1-1
|
||||
man-1.6g-4
|
||||
mercurial-2.9.2-1
|
||||
mesa-10.5.2-1
|
||||
@@ -295,7 +299,7 @@ RemotePackageRepository HaikuPorts
|
||||
mpfr_devel-3.1.3-1
|
||||
mpg123-1.22.4-1
|
||||
mpg123_devel-1.22.4-1
|
||||
nano-2.4.2-2
|
||||
nano-2.5.3-1
|
||||
nasm-2.11.08-1
|
||||
ncurses-5.9-10
|
||||
ncurses_devel-5.9-10
|
||||
@@ -305,6 +309,8 @@ RemotePackageRepository HaikuPorts
|
||||
neon_devel-0.30.1-2
|
||||
netcat-1.10-1
|
||||
netpulse-0.2.3-5
|
||||
nettle-3.2-1
|
||||
nettle_devel-3.2-1
|
||||
ninja-1.5.1-2
|
||||
nspr-4.10.9-1
|
||||
nspr_devel-4.10.9-1
|
||||
@@ -316,6 +322,7 @@ RemotePackageRepository HaikuPorts
|
||||
openssl-1.0.2e-1
|
||||
openssl_devel-1.0.2e-1
|
||||
p7zip-9.20.1-5
|
||||
padblocker-1.0-1
|
||||
patch-2.7.5-1
|
||||
pe-2.4.5-2
|
||||
perl-5.18.2-2
|
||||
@@ -361,8 +368,8 @@ RemotePackageRepository HaikuPorts
|
||||
snappy_devel-1.1.3-1
|
||||
speex-1.2~rc1-2
|
||||
speex_devel-1.2~rc1-2
|
||||
sqlite-3.9.0.0-1
|
||||
sqlite_devel-3.9.0.0-1
|
||||
sqlite-3.11.0.0-1
|
||||
sqlite_devel-3.11.0.0-1
|
||||
subversion-1.8.11-6
|
||||
subversion_devel-1.8.11-6
|
||||
tar-1.28-1
|
||||
@@ -383,6 +390,7 @@ RemotePackageRepository HaikuPorts
|
||||
unzip-6.0-2
|
||||
vim-7.4-5
|
||||
vision-0.9.7.r949-3
|
||||
weather-0.1.1_git-2
|
||||
wget-1.17.1-1
|
||||
which-2.21-1
|
||||
wpa_supplicant-2.0-4
|
||||
@@ -434,6 +442,7 @@ RemotePackageRepository HaikuPorts
|
||||
file
|
||||
findutils
|
||||
ffmpeg
|
||||
ffmpeg2
|
||||
flac
|
||||
flex
|
||||
fontconfig
|
||||
@@ -451,6 +460,7 @@ RemotePackageRepository HaikuPorts
|
||||
glu
|
||||
gmp
|
||||
gnupg
|
||||
gnutls
|
||||
gperf
|
||||
gpgme
|
||||
graphite2
|
||||
@@ -546,6 +556,7 @@ RemotePackageRepository HaikuPorts
|
||||
neon
|
||||
netcat
|
||||
netpulse
|
||||
nettle
|
||||
ninja
|
||||
nspr
|
||||
nss
|
||||
@@ -553,6 +564,7 @@ RemotePackageRepository HaikuPorts
|
||||
openssh
|
||||
openssl
|
||||
p7zip
|
||||
padblocker
|
||||
patch
|
||||
pe
|
||||
perl
|
||||
@@ -597,6 +609,7 @@ RemotePackageRepository HaikuPorts
|
||||
unzip
|
||||
vim
|
||||
vision
|
||||
weather
|
||||
wget
|
||||
which
|
||||
wpa_supplicant
|
||||
|
||||
@@ -25,7 +25,7 @@ RemotePackageRepository HaikuPorts
|
||||
timgmsoundfont-fixed-5
|
||||
vl_gothic-20141206-1
|
||||
wqy_microhei-0.2.0~beta-3
|
||||
youtube_dl-2016.01.29-1
|
||||
youtube_dl-2016.01.29-2
|
||||
:
|
||||
# repository architecture packages
|
||||
# primary architecture (x86_gcc2)
|
||||
@@ -74,8 +74,8 @@ RemotePackageRepository HaikuPorts
|
||||
catkeyseditor-0.1.1-1
|
||||
caya-0.0.3-3
|
||||
ccache-3.1.9-1
|
||||
cdrtools-3.02~a06-1
|
||||
cdrtools_devel-3.02~a06-1
|
||||
cdrtools-3.02~a06-2
|
||||
cdrtools_devel-3.02~a06-2
|
||||
chat-20100903-2
|
||||
clipdinger-0.5.2-1
|
||||
clockwerk-git-3
|
||||
@@ -130,8 +130,8 @@ RemotePackageRepository HaikuPorts
|
||||
fontconfig-2.11.1-3
|
||||
fontconfig_devel-2.11.1-3
|
||||
fossil-1.34-2
|
||||
freetype-2.6-1
|
||||
freetype_devel-2.6-1
|
||||
freetype-2.6.3-1
|
||||
freetype_devel-2.6.3-1
|
||||
fribidi-0.19.6-2
|
||||
fribidi_devel-0.19.6-2
|
||||
friss-0.8.0-1
|
||||
@@ -142,8 +142,8 @@ RemotePackageRepository HaikuPorts
|
||||
genesis_commander-0.42-2
|
||||
getconf-r260000-1
|
||||
getopt-1.1.5-1
|
||||
gettext-0.18.1.1-6
|
||||
gettext_libintl-0.18.1.1-6
|
||||
gettext-0.19.6-2
|
||||
gettext_libintl-0.19.6-2
|
||||
gdb-6.3-1
|
||||
giddy3-1.4-1
|
||||
giflib-5.1.2-1
|
||||
@@ -177,8 +177,8 @@ RemotePackageRepository HaikuPorts
|
||||
gtk_doc-1.20-1
|
||||
guilib-1.2.1-1
|
||||
guilib_devel-1.2.1-1
|
||||
gutenprint-5.2.11-1
|
||||
gutenprint_devel-5.2.11-1
|
||||
gutenprint-5.2.11-2
|
||||
gutenprint_devel-5.2.11-2
|
||||
gyp-r1948-2
|
||||
gzip-1.6-2
|
||||
hdialog-0.2-2
|
||||
@@ -211,7 +211,7 @@ RemotePackageRepository HaikuPorts
|
||||
lbreakout2-2.6.4-3
|
||||
lcms-2.5-1
|
||||
lcms_devel-2.5-1
|
||||
less-451-4
|
||||
less-481-1
|
||||
lha-1.14i-1
|
||||
libao-1.1.0-1
|
||||
libao_devel-1.1.0-1
|
||||
@@ -307,8 +307,8 @@ RemotePackageRepository HaikuPorts
|
||||
libunistring_devel-0.9.6-1
|
||||
libusb-1.0.20-2
|
||||
libusb_devel-1.0.20-2
|
||||
libusb_compat-0.1.5-3
|
||||
libusb_compat_devel-0.1.5-3
|
||||
libusb_compat-0.1.5-4
|
||||
libusb_compat_devel-0.1.5-4
|
||||
libutf8proc-1.1.6-1
|
||||
libutf8proc_devel-1.1.6-1
|
||||
libuuid-1.0.3-2
|
||||
@@ -345,7 +345,7 @@ RemotePackageRepository HaikuPorts
|
||||
lzo_devel-2.09-1
|
||||
m4-1.4.16-5
|
||||
mailnews-2.0.0.25-1
|
||||
make-3.82-5
|
||||
make-4.1-1
|
||||
man-1.6g-4
|
||||
mc-4.8.15-1
|
||||
mda_vst-20100214-1
|
||||
@@ -369,7 +369,7 @@ RemotePackageRepository HaikuPorts
|
||||
mupdf_devel-1.7-1
|
||||
musepack_tools-r475-1
|
||||
musepack_tools_devel-r475-1
|
||||
nano-2.4.2-1
|
||||
nano-2.5.3-1
|
||||
nanosvgtranslator-1.0.1-1
|
||||
nasm-2.11.08-1
|
||||
ncurses-5.9-9
|
||||
@@ -394,6 +394,7 @@ RemotePackageRepository HaikuPorts
|
||||
opusfile_devel-0.6-1
|
||||
opus_tools-0.1.9-1
|
||||
p7zip-9.20.1-4
|
||||
padblocker-1.0-1
|
||||
paladin-git-6
|
||||
paragui-1.1.8-1
|
||||
paragui_devel-1.1.8-1
|
||||
@@ -410,7 +411,7 @@ RemotePackageRepository HaikuPorts
|
||||
physfs_devel-2.0.3-2
|
||||
pipepanic-0.1.3-3
|
||||
pkgconfig-0.29-1
|
||||
ponpokodiff-0.2.0-2
|
||||
ponpokodiff-0.2.0-3
|
||||
popt-1.16-1
|
||||
popt_devel-1.16-1
|
||||
postgresql-9.3.5-2
|
||||
@@ -440,8 +441,8 @@ RemotePackageRepository HaikuPorts
|
||||
readline_devel-6.3.8-1
|
||||
roadfighter-1.0.1269-1
|
||||
rsync-3.1.0-1
|
||||
sane_backends-1.0.25-2
|
||||
sane_backends_devel-1.0.25-2
|
||||
sane_backends-1.0.25-3
|
||||
sane_backends_devel-1.0.25-3
|
||||
sanity-0.5a-1
|
||||
samba-3.6.25-1
|
||||
samba_devel-3.6.25-1
|
||||
@@ -557,7 +558,7 @@ RemotePackageRepository HaikuPorts
|
||||
avr_gcc_x86-4.8.2_2014_03_20-1
|
||||
avrdude_x86-6.0.1-2
|
||||
beshare_x86-2.31-1
|
||||
binutils_x86-2.25_12015_07_31-1
|
||||
binutils_x86-2.26.0_2016_02_29-1
|
||||
bison_x86-2.5-1
|
||||
boost_x86-1.55.0-6
|
||||
boost_x86_atomic-1.55.0-6
|
||||
@@ -590,7 +591,7 @@ RemotePackageRepository HaikuPorts
|
||||
cairo_x86_devel-1.12.18-1
|
||||
capstone_x86-3.0.4-1
|
||||
capstone_x86_devel-3.0.4-1
|
||||
cmake_x86-3.3.1-1
|
||||
cmake_x86-3.4.3-1
|
||||
confuse_x86-2.7-2
|
||||
confuse_x86_devel-2.7-2
|
||||
copynametoclipboard-1.0.1-2
|
||||
@@ -628,18 +629,18 @@ RemotePackageRepository HaikuPorts
|
||||
fontconfig_x86-2.11.1-3
|
||||
fontconfig_x86_devel-2.11.1-3
|
||||
freedroidrpg_x86-0.15.1-1
|
||||
freetype_x86-2.6-1
|
||||
freetype_x86_devel-2.6-1
|
||||
freetype_x86-2.6.3-1
|
||||
freetype_x86_devel-2.6.3-1
|
||||
fribidi_x86-0.19.6-2
|
||||
fribidi_x86_devel-0.19.6-2
|
||||
gcc_x86-4.8.5_2015_07_11-2
|
||||
gcc_x86_syslibs-4.8.5_2015_07_11-2
|
||||
gcc_x86_syslibs_devel-4.8.5_2015_07_11-2
|
||||
gcc_x86-5.3.0_2016_02_29-1
|
||||
gcc_x86_syslibs-5.3.0_2016_02_29-1
|
||||
gcc_x86_syslibs_devel-5.3.0_2016_02_29-1
|
||||
gcc6809_x86-4.6.1-2
|
||||
gdk_pixbuf_x86-2.31.5-1
|
||||
gdk_pixbuf_x86_devel-2.31.5-1
|
||||
gettext_x86-0.18.1.1-6
|
||||
gettext_x86_libintl-0.18.1.1-6
|
||||
gettext_x86-0.19.6-2
|
||||
gettext_x86_libintl-0.19.6-2
|
||||
giflib_x86-5.1.2-1
|
||||
giflib_x86_devel-5.1.2-1
|
||||
glew_x86-1.11.0-1
|
||||
@@ -1298,6 +1299,7 @@ RemotePackageRepository HaikuPorts
|
||||
opusfile
|
||||
opus_tools
|
||||
p7zip
|
||||
padblocker
|
||||
paladin
|
||||
pango_x86
|
||||
paragui
|
||||
|
||||
@@ -40,9 +40,9 @@ arm-*)
|
||||
# Multilib creates a lot of confusion as the wrong libs end up being linked.
|
||||
# For now, target Cortex-A8 devices.
|
||||
binutilsConfigureArgs="--disable-multilib --with-float=hard
|
||||
--with-cpu=cortex-a8 --with-arch=armv7-a --with-fpu=vfpv3"
|
||||
--with-cpu=cortex-a8 --with-fpu=vfpv3"
|
||||
gccConfigureArgs="--disable-multilib --with-float=hard
|
||||
--with-cpu=cortex-a8 --with-arch=armv7-a --with-fpu=vfpv3"
|
||||
--with-cpu=cortex-a8 --with-fpu=vfpv3"
|
||||
|
||||
# TODO: Disable building with TLS support for ARM until implemented.
|
||||
binutilsConfigureArgs="$binutilsConfigureArgs --disable-tls"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
1 german x-vnd.Haiku-ShowImage 575555985
|
||||
1 german x-vnd.Haiku-ShowImage 3998703664
|
||||
Use as background… Menus Als Hintergrund verwenden…
|
||||
File Menus Datei
|
||||
Slide delay Menus Verzögerung
|
||||
@@ -7,6 +7,7 @@ Zoom in Menus Vergrößern
|
||||
The document '%s' has been changed. Do you want to close the document? ClosePrompt Das Bild '%s' wurde verändert. Trotzdem schließen?
|
||||
Page setup… Menus Seite einrichten…
|
||||
Print… Menus Drucken…
|
||||
Get info… Menus Datei-Info…
|
||||
OK SaveToFile OK
|
||||
Previous page Menus Vorherige Seite
|
||||
View Menus Ansicht
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
1 japanese x-vnd.Haiku-ShowImage 575555985
|
||||
1 japanese x-vnd.Haiku-ShowImage 3998703664
|
||||
Use as background… Menus デスクトップの背景にする…
|
||||
File Menus ファイル
|
||||
Slide delay Menus スライド間隔
|
||||
@@ -7,6 +7,7 @@ Zoom in Menus 拡大
|
||||
The document '%s' has been changed. Do you want to close the document? ClosePrompt 画像ファイル '%s' が変更されています。保存せずに閉じますか?
|
||||
Page setup… Menus ページ設定…
|
||||
Print… Menus 印刷…
|
||||
Get info… Menus 詳細情報…
|
||||
OK SaveToFile Ok
|
||||
Previous page Menus 前のページ
|
||||
View Menus 表示
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
1 russian x-vnd.Haiku-Terminal 2977674067
|
||||
1 russian x-vnd.Haiku-Terminal 4292164358
|
||||
Not found. Terminal TermWindow Текст не найден
|
||||
Switch Terminals Terminal TermWindow Переключить терминалы
|
||||
Change directory Terminal TermView Сменить каталог
|
||||
@@ -85,6 +85,7 @@ Clear all Terminal TermWindow Очистить всё
|
||||
Text encoding Terminal TermWindow Кодировка
|
||||
Close window Terminal TermWindow Закрыть окно
|
||||
Copy absolute path Terminal TermView Скопировать абсолютный адрес
|
||||
Save as default Terminal TermWindow Сохранить по умолчанию
|
||||
Set tab title Terminal TermWindow Переименовть вкладку
|
||||
Settings… Terminal TermWindow Настройки…
|
||||
Abort Terminal Shell Отменить
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
1 german x-vnd.Be-WORK 3614422175
|
||||
1 german x-vnd.Be-WORK 3927737357
|
||||
Invalid argument: %s\n Workspaces Ungültiger Parameter: %s\n
|
||||
Quit Workspaces Beenden
|
||||
Workspaces System name Arbeitsflächen
|
||||
@@ -7,6 +7,7 @@ Remove replicant Workspaces Replikant entfernen
|
||||
Show window border Workspaces Fensterrahmen anzeigen
|
||||
Auto-raise Workspaces Automatisch nach vorn holen
|
||||
Always on top Workspaces Immer im Vordergrund
|
||||
Switch on mouse wheel Workspaces Arbeitsfläche per Mausrad wechseln
|
||||
Live in the Deskbar Workspaces In der Deskbar anzeigen
|
||||
Show window tab Workspaces Fensterreiter anzeigen
|
||||
Usage: %s [options] [workspace]\nwhere \"options\" are:\n --notitle\t\ttitle bar removed, border and resize kept\n --noborder\t\ttitle, border, and resize removed\n --avoidfocus\t\tprevents the window from being the target of keyboard events\n --alwaysontop\t\tkeeps window on top\n --notmovable\t\twindow can't be moved around\n --autoraise\t\tauto-raise the workspace window when it's at the screen edge\n --help\t\tdisplay this help and exit\nand \"workspace\" is the number of the Workspace to which to switch (0-31)\n Workspaces Gebrauch: %s [Optionen] [Arbeitsfläche]\nmögliche \"Optionen\" sind:\n --notitle\t\tFenster ohne Titelreiter, aber mit Rahmen.\n --noborder\t\tFenster ohne Titelreiter und Rahmen.\n --avoidfocus\t\tFenster kann nicht aktiv oder Ziel für Tastatureingaben werden.\n --alwaysontop\t\tFenster ist immer im Vordergrund.\n --notmovable\t\tFenster kann nicht verschoben werden.\n --autoraise\t\tFenster kommt automatisch in den Vordergrund, wenn es am Bildschirmrand ist und sich die Maus darüber befindet.\n --help\t\tZeigt diesen Hilfetext an.\nund \"Arbeitsfläche\" ist die Nummer (0-31) der Arbeitsfläche, zu der gewechselt werden soll.\n
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
1 japanese x-vnd.Be-WORK 3614422175
|
||||
1 japanese x-vnd.Be-WORK 3927737357
|
||||
Invalid argument: %s\n Workspaces 無効な引数: %s\n
|
||||
Quit Workspaces 終了
|
||||
Workspaces System name ワークスペース
|
||||
@@ -7,6 +7,7 @@ Remove replicant Workspaces レプリカントを削除
|
||||
Show window border Workspaces ウィンドウ枠を表示
|
||||
Auto-raise Workspaces 自動的に表示
|
||||
Always on top Workspaces 常に最前面に
|
||||
Switch on mouse wheel Workspaces マウスホイールで切り替える
|
||||
Live in the Deskbar Workspaces Deskbar 内で実行
|
||||
Show window tab Workspaces ウィンドウタブを表示
|
||||
Usage: %s [options] [workspace]\nwhere \"options\" are:\n --notitle\t\ttitle bar removed, border and resize kept\n --noborder\t\ttitle, border, and resize removed\n --avoidfocus\t\tprevents the window from being the target of keyboard events\n --alwaysontop\t\tkeeps window on top\n --notmovable\t\twindow can't be moved around\n --autoraise\t\tauto-raise the workspace window when it's at the screen edge\n --help\t\tdisplay this help and exit\nand \"workspace\" is the number of the Workspace to which to switch (0-31)\n Workspaces Usage: %s [options] [workspace]\nwhere \"options\" are:\n --notitle\t\ttitle bar removed, border and resize kept\n --noborder\t\ttitle, border, and resize removed\n --avoidfocus\t\tprevents the window from being the target of keyboard events\n --alwaysontop\t\tkeeps window on top\n --notmovable\t\twindow can't be moved around\n --autoraise\t\tauto-raise the workspace window when it's at the screen edge\n --help\t\tdisplay this help and exit\nand \"workspace\" is the number of the Workspace to which to switch (0-31)\n
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2016 Haiku, Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* Augustin Cavalier <waddlesplash>
|
||||
*/
|
||||
|
||||
*, title {
|
||||
font-family: "DejaVu Sans", Arial, sans-serif;
|
||||
color: #333333;
|
||||
}
|
||||
cmdsynopsis, code, command, computeroutput, envar, filename, keycode, keysym,
|
||||
literal, option, parameter, sgmltag, systemitem {
|
||||
font-family: "Deja Vu Mono", Courier, "Courier New", monospace, fixed;
|
||||
}
|
||||
term {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
chapter, appendix {
|
||||
max-width: 849.6px;
|
||||
margin: 10px auto;
|
||||
align-content: center !important;
|
||||
}
|
||||
chapter:first-of-type {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
chapter title, appendix title {
|
||||
font-size: 22px !important;
|
||||
}
|
||||
sect1 title {
|
||||
font-size: 18px !important;
|
||||
font-weight: unset;
|
||||
}
|
||||
title {
|
||||
color: #0c3762;
|
||||
font-weight: bold;
|
||||
border-bottom: dotted thin #c0c0c0;
|
||||
margin-top: 13px !important;
|
||||
margin-bottom: 13px !important;
|
||||
text-align: left !important;
|
||||
}
|
||||
para {
|
||||
margin-top: 0.5em !important;
|
||||
margin-bottom: 0.5em !important;
|
||||
margin-left: 0 !important;
|
||||
margin-right: 0 !important;
|
||||
font-size: 14.4px;
|
||||
line-height: 21.6px !important;
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="docbook-css/driver.css" type="text/css" ?>
|
||||
<?xml-stylesheet href="haiku.css" type="text/css" ?>
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" >
|
||||
<book>
|
||||
|
||||
@@ -333,6 +333,8 @@ enum color_which {
|
||||
B_TOOL_TIP_BACKGROUND_COLOR = 20,
|
||||
B_TOOL_TIP_TEXT_COLOR = 21,
|
||||
|
||||
B_STATUS_BAR_COLOR = 37,
|
||||
|
||||
B_SUCCESS_COLOR = 100,
|
||||
B_FAILURE_COLOR = 101,
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ struct termios {
|
||||
tcflag_t c_cflag; /* control modes */
|
||||
tcflag_t c_lflag; /* local modes */
|
||||
char c_line; /* line discipline */
|
||||
speed_t c_ispeed; /* (unused) */
|
||||
speed_t c_ospeed; /* (unused) */
|
||||
speed_t c_ispeed; /* custom input baudrate */
|
||||
speed_t c_ospeed; /* custom output baudrate */
|
||||
cc_t c_cc[NCCS]; /* control characters */
|
||||
};
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
// Update kColorWhichLastContinuous with the largest color constant which
|
||||
// leaves no gaps in the color_which integer values.
|
||||
static const int32 kColorWhichLastContinuous = B_LINK_ACTIVE_COLOR;
|
||||
static const int32 kColorWhichLastContinuous = B_STATUS_BAR_COLOR;
|
||||
static const int32 kColorWhichCount = kColorWhichLastContinuous + 3;
|
||||
// + 1 for index-offset, + 2 for B_SUCCESS_COLOR, B_FAILURE_COLOR
|
||||
|
||||
|
||||
@@ -97,6 +97,73 @@ typedef struct settings { // apsed, see comments in skel.settings
|
||||
bool pgm_panel;
|
||||
} settings;
|
||||
|
||||
/* card info - information gathered from PINS (and other sources) */
|
||||
enum
|
||||
{ // card_type in order of date of VIA chip design (fixme: check order)
|
||||
VT3122 = 0,
|
||||
VT3022,
|
||||
VT7205,
|
||||
VT3205,
|
||||
VT3108,
|
||||
VT3204NC,
|
||||
NV04,
|
||||
NV05,
|
||||
NV05M64,
|
||||
NV06,
|
||||
NV10,
|
||||
NV11,
|
||||
NV11M,
|
||||
NV15,
|
||||
NV17,
|
||||
NV17M,
|
||||
NV18,
|
||||
NV18M,
|
||||
NV20,
|
||||
NV25,
|
||||
NV28,
|
||||
NV30,
|
||||
NV31,
|
||||
NV34,
|
||||
NV35,
|
||||
NV36,
|
||||
NV38,
|
||||
NV40,
|
||||
NV41,
|
||||
NV43,
|
||||
NV45
|
||||
};
|
||||
enum
|
||||
{ // card_arch in order of date of VIA chip design
|
||||
CLE266 = 0,
|
||||
KM400,
|
||||
K8M800,
|
||||
NV04A,
|
||||
NV10A,
|
||||
NV20A,
|
||||
NV30A,
|
||||
NV40A
|
||||
};
|
||||
enum
|
||||
{ // tvout_chip_type in order of capability (more or less)
|
||||
NONE = 0,
|
||||
CH7003,
|
||||
CH7004,
|
||||
CH7005,
|
||||
CH7006,
|
||||
CH7007,
|
||||
CH7008,
|
||||
SAA7102,
|
||||
SAA7103,
|
||||
SAA7104,
|
||||
SAA7105,
|
||||
BT868,
|
||||
BT869,
|
||||
CX25870,
|
||||
CX25871,
|
||||
NVIDIA
|
||||
};
|
||||
|
||||
|
||||
/*shared info*/
|
||||
typedef struct {
|
||||
/*a few ID things*/
|
||||
@@ -171,72 +238,6 @@ typedef struct {
|
||||
benaphore lock; /* for serializing access to the acceleration engine */
|
||||
} engine;
|
||||
|
||||
/* card info - information gathered from PINS (and other sources) */
|
||||
enum
|
||||
{ // card_type in order of date of VIA chip design (fixme: check order)
|
||||
VT3122 = 0,
|
||||
VT3022,
|
||||
VT7205,
|
||||
VT3205,
|
||||
VT3108,
|
||||
VT3204NC,
|
||||
NV04,
|
||||
NV05,
|
||||
NV05M64,
|
||||
NV06,
|
||||
NV10,
|
||||
NV11,
|
||||
NV11M,
|
||||
NV15,
|
||||
NV17,
|
||||
NV17M,
|
||||
NV18,
|
||||
NV18M,
|
||||
NV20,
|
||||
NV25,
|
||||
NV28,
|
||||
NV30,
|
||||
NV31,
|
||||
NV34,
|
||||
NV35,
|
||||
NV36,
|
||||
NV38,
|
||||
NV40,
|
||||
NV41,
|
||||
NV43,
|
||||
NV45
|
||||
};
|
||||
enum
|
||||
{ // card_arch in order of date of VIA chip design
|
||||
CLE266 = 0,
|
||||
KM400,
|
||||
K8M800,
|
||||
NV04A,
|
||||
NV10A,
|
||||
NV20A,
|
||||
NV30A,
|
||||
NV40A
|
||||
};
|
||||
enum
|
||||
{ // tvout_chip_type in order of capability (more or less)
|
||||
NONE = 0,
|
||||
CH7003,
|
||||
CH7004,
|
||||
CH7005,
|
||||
CH7006,
|
||||
CH7007,
|
||||
CH7008,
|
||||
SAA7102,
|
||||
SAA7103,
|
||||
SAA7104,
|
||||
SAA7105,
|
||||
BT868,
|
||||
BT869,
|
||||
CX25870,
|
||||
CX25871,
|
||||
NVIDIA
|
||||
};
|
||||
|
||||
struct
|
||||
{
|
||||
/* specialised registers for card initialisation read from NV BIOS (pins) */
|
||||
|
||||
@@ -16,7 +16,7 @@ void dump_fdt(const void *fdt);
|
||||
status_t fdt_get_cell_count(const void* fdt, int node,
|
||||
int32 &addressCells, int32 &sizeCells);
|
||||
|
||||
phys_addr_t fdt_get_device_reg(const void* fdt, int node);
|
||||
phys_addr_t fdt_get_device_reg(const void* fdt, int node, bool physical=true);
|
||||
phys_addr_t fdt_get_device_reg_byname(const void* fdt, const char* name);
|
||||
phys_addr_t fdt_get_device_reg_byalias(const void* fdt, const char* alias);
|
||||
|
||||
|
||||
@@ -70,15 +70,15 @@ uint32 OVERLAY_SUPPORTED_FEATURES(uint32 a_color_space)
|
||||
const overlay_buffer *ALLOCATE_OVERLAY_BUFFER(color_space cs, uint16 width, uint16 height)
|
||||
{
|
||||
int offset = 0; /* used to determine next buffer to create */
|
||||
uint32 adress, adress2, temp32; /* used to calculate buffer adresses */
|
||||
uintptr_t adress, adress2, temp32; /* used to calculate buffer adresses */
|
||||
uint32 oldsize = 0; /* used to 'squeeze' new buffers between already existing ones */
|
||||
int cnt; /* loopcounter */
|
||||
|
||||
/* acquire the shared benaphore */
|
||||
AQUIRE_BEN(si->overlay.lock)
|
||||
|
||||
LOG(4,("Overlay: cardRAM_start = $%08x\n",(uint32)((uint8*)si->framebuffer)));
|
||||
LOG(4,("Overlay: cardRAM_start_DMA = $%08x\n",(uint32)((uint8*)si->framebuffer_pci)));
|
||||
LOG(4,("Overlay: cardRAM_start = $%p\n", (uint8*)si->framebuffer));
|
||||
LOG(4,("Overlay: cardRAM_start_DMA = $%p\n", (uint8*)si->framebuffer_pci));
|
||||
LOG(4,("Overlay: cardRAM_size = %3.3fMb\n",(si->ps.memory_size / (1024.0 * 1024.0))));
|
||||
|
||||
/* find first empty slot (room for another buffer?) */
|
||||
@@ -173,7 +173,7 @@ const overlay_buffer *ALLOCATE_OVERLAY_BUFFER(color_space cs, uint16 width, uint
|
||||
* Driver setup is as follows:
|
||||
* card base: - hardware cursor bitmap (if used),
|
||||
* directly above - screen memory for both heads */
|
||||
adress2 = (((uint32)((uint8*)si->fbc.frame_buffer)) + /* cursor already included here */
|
||||
adress2 = (((uintptr_t)((uint8*)si->fbc.frame_buffer)) + /* cursor already included here */
|
||||
(si->fbc.bytes_per_row * si->dm.virtual_height)); /* size in bytes of screen(s) */
|
||||
LOG(4,("Overlay: first free cardRAM virtual adress $%08x\n", adress2));
|
||||
|
||||
@@ -193,7 +193,7 @@ const overlay_buffer *ALLOCATE_OVERLAY_BUFFER(color_space cs, uint16 width, uint
|
||||
* If you switch now to settings: 1600x1200x32bit (single head) the app needs to fallback to
|
||||
* bitmap output or maybe single buffered overlay output if small bitmaps are used. */
|
||||
|
||||
adress = (((uint32)((uint8*)si->framebuffer)) + si->ps.memory_size);
|
||||
adress = (((uintptr_t)((uint8*)si->framebuffer)) + si->ps.memory_size);
|
||||
for (cnt = 0; cnt <= offset; cnt++)
|
||||
{
|
||||
adress -= si->overlay.myBufInfo[cnt].size;
|
||||
@@ -204,7 +204,7 @@ const overlay_buffer *ALLOCATE_OVERLAY_BUFFER(color_space cs, uint16 width, uint
|
||||
|
||||
/* Check if we need to modify the buffers starting adress and thus the size */
|
||||
/* calculate 'would be' cardRAM offset */
|
||||
temp32 = (adress - ((uint32)((vuint32 *)si->framebuffer)));
|
||||
temp32 = (adress - ((uintptr_t)((vuint32 *)si->framebuffer)));
|
||||
/* check if it is aligned */
|
||||
if (temp32 != (temp32 & 0xfffffff0))
|
||||
{
|
||||
@@ -277,7 +277,7 @@ const overlay_buffer *ALLOCATE_OVERLAY_BUFFER(color_space cs, uint16 width, uint
|
||||
si->overlay.myBuffer[offset].buffer = (void *) adress;
|
||||
|
||||
/* calculate physical memory adress (for dma use) */
|
||||
adress = (((uint32)((uint8*)si->framebuffer_pci)) + si->ps.memory_size);
|
||||
adress = (((uintptr_t)((uint8*)si->framebuffer_pci)) + si->ps.memory_size);
|
||||
for (cnt = 0; cnt <= offset; cnt++)
|
||||
{
|
||||
adress -= si->overlay.myBufInfo[cnt].size;
|
||||
@@ -285,9 +285,9 @@ const overlay_buffer *ALLOCATE_OVERLAY_BUFFER(color_space cs, uint16 width, uint
|
||||
/* this adress is already aligned to the scaler's requirements (via the already modified sizes) */
|
||||
si->overlay.myBuffer[offset].buffer_dma = (void *) adress;
|
||||
|
||||
LOG(4,("Overlay: New buffer: addr $%08x, dma_addr $%08x, color space $%08x\n",
|
||||
(uint32)((uint8*)si->overlay.myBuffer[offset].buffer),
|
||||
(uint32)((uint8*)si->overlay.myBuffer[offset].buffer_dma), cs));
|
||||
LOG(4,("Overlay: New buffer: addr $%p, dma_addr $%p, color space $%p\n",
|
||||
(uint8*)si->overlay.myBuffer[offset].buffer,
|
||||
(uint8*)si->overlay.myBuffer[offset].buffer_dma, cs));
|
||||
LOG(4,("Overlay: New buffer's size is $%08x\n", si->overlay.myBufInfo[offset].size));
|
||||
|
||||
/* release the shared benaphore */
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
|
||||
#include "acc_std.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#define T_POSITIVE_SYNC (B_POSITIVE_HSYNC | B_POSITIVE_VSYNC)
|
||||
/* mode flags will be setup as status info by PROPOSEMODE! */
|
||||
#define MODE_FLAGS 0
|
||||
|
||||
@@ -16,6 +16,7 @@ eng_agp_setup(void)
|
||||
uint8 index;
|
||||
agp_info eng_ai;
|
||||
bool agp = false;
|
||||
eng_ai.interface.status = 0;
|
||||
|
||||
/* set the magic number so the via kerneldriver knows we're for real */
|
||||
nca.magic = nai.magic = VIA_PRIVATE_DATA_MAGIC;
|
||||
|
||||
@@ -351,9 +351,9 @@ static void eng_bes_calc_move_overlay(move_overlay_info *moi)
|
||||
*******************************/
|
||||
|
||||
/* calculate inputbitmap origin adress */
|
||||
moi->a1orgv = (uint32)((vuint32 *)si->overlay.ob.buffer);
|
||||
moi->a1orgv -= (uint32)((vuint32 *)si->framebuffer);
|
||||
LOG(4,("Overlay: topleft corner of input bitmap (cardRAM offset) $%08x\n", moi->a1orgv));
|
||||
moi->a1orgv = (uintptr_t)((vuint32 *)si->overlay.ob.buffer);
|
||||
moi->a1orgv -= (uintptr_t)((vuint32 *)si->framebuffer);
|
||||
LOG(4,("Overlay: topleft corner of input bitmap (cardRAM offset) $%p\n", moi->a1orgv));
|
||||
|
||||
/* Setup vertical source start: first (sub)pixel contributing to output picture. */
|
||||
/* Note:
|
||||
|
||||
@@ -254,7 +254,7 @@ static status_t cle266_km400_dac_pix_pll_find(
|
||||
{
|
||||
int m = 0, n = 0, p = 0/*, m_max*/;
|
||||
float error, error_best = 999999999;
|
||||
int best[3];
|
||||
int best[3] = {0};
|
||||
float f_vco, max_pclk;
|
||||
float req_pclk = target.timing.pixel_clock/1000.0;
|
||||
|
||||
@@ -401,7 +401,7 @@ static status_t k8m800_dac_pix_pll_find(
|
||||
{
|
||||
int m = 0, n = 0, p = 0/*, m_max*/;
|
||||
float error, error_best = 999999999;
|
||||
int best[3];
|
||||
int best[3] = {0};
|
||||
float f_vco, max_pclk;
|
||||
float req_pclk = target.timing.pixel_clock/1000.0;
|
||||
|
||||
@@ -550,7 +550,7 @@ status_t eng_dac_sys_pll_find(
|
||||
{
|
||||
int m = 0, n = 0, p = 0, m_max, p_max;
|
||||
float error, error_best = 999999999;
|
||||
int best[3];
|
||||
int best[3] = {0};
|
||||
float f_vco, discr_low, discr_high;
|
||||
|
||||
/* determine the max. reference-frequency postscaler setting for the
|
||||
|
||||
@@ -230,7 +230,7 @@ static status_t nv10_nv20_dac2_pix_pll_find(
|
||||
{
|
||||
int m = 0, n = 0, p = 0/*, m_max*/;
|
||||
float error, error_best = 999999999;
|
||||
int best[3];
|
||||
int best[3] = {0};
|
||||
float f_vco, max_pclk;
|
||||
float req_pclk = target.timing.pixel_clock/1000.0;
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ status_t g100_g400max_maventv_vid_pll_find(
|
||||
{
|
||||
int m = 0, n = 0, p = 0, m_max;
|
||||
float diff, diff_smallest = 999999999;
|
||||
int best[5], h_total_mod;
|
||||
int best[5] = {0}, h_total_mod;
|
||||
float fields_sec, f_vco;
|
||||
/* We need to be exact, so work with clockperiods per field instead of with frequency.
|
||||
* Make sure however we truncate these clocks to be integers!
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2002, Thomas Kurschel
|
||||
* Copyright 2004-2011 Haiku, Inc. All rights reserved.
|
||||
* Copyright 2004-2016 Haiku, Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
@@ -293,7 +293,7 @@ const struct supported_device {
|
||||
{0x682f, 6, 0, RADEON_CAPEVERDE, CHIP_STD, "Radeon HD Verde"},
|
||||
{0x6830, 6, 0, RADEON_CAPEVERDE, CHIP_STD, "Radeon HD Verde"},
|
||||
{0x6831, 6, 0, RADEON_CAPEVERDE, CHIP_STD, "Radeon HD Verde"},
|
||||
{0x6835, 6, 0, RADEON_CAPEVERDE, CHIP_STD, "Radeon HD Verde"},
|
||||
{0x6835, 6, 0, RADEON_CAPEVERDE, CHIP_STD, "Radeon R7 Series"},
|
||||
{0x6837, 6, 0, RADEON_CAPEVERDE, CHIP_STD, "Radeon HD Verde"},
|
||||
{0x6838, 6, 0, RADEON_CAPEVERDE, CHIP_STD, "Radeon HD Verde"},
|
||||
{0x6839, 6, 0, RADEON_CAPEVERDE, CHIP_STD, "Radeon HD Verde"},
|
||||
@@ -366,20 +366,24 @@ const struct supported_device {
|
||||
// Oland DCE 6,4
|
||||
{0x990c, 6, 4, RADEON_OLAND, CHIP_STD, "Radeon HD 8670"},
|
||||
{0x990e, 6, 4, RADEON_OLAND, CHIP_STD, "Radeon HD 8570"},
|
||||
{0x6600, 6, 4, RADEON_OLAND, CHIP_STD, "Radeon HD Oland"},
|
||||
{0x6601, 6, 4, RADEON_OLAND, CHIP_STD, "Radeon HD Oland"},
|
||||
{0x6602, 6, 4, RADEON_OLAND, CHIP_STD, "Radeon HD Oland"},
|
||||
{0x6603, 6, 4, RADEON_OLAND, CHIP_STD, "Radeon HD Oland"},
|
||||
{0x6606, 6, 4, RADEON_OLAND, CHIP_STD, "Radeon HD Oland"},
|
||||
{0x6607, 6, 4, RADEON_OLAND, CHIP_STD, "Radeon HD Oland"},
|
||||
{0x6610, 6, 4, RADEON_OLAND, CHIP_STD, "Radeon HD R7 250"},
|
||||
{0x6600, 6, 4, RADEON_OLAND, CHIP_MOBILE, "Radeon HD 8750M"},
|
||||
{0x6601, 6, 4, RADEON_OLAND, CHIP_MOBILE, "Radeon HD 8730M"},
|
||||
{0x6602, 6, 4, RADEON_OLAND, CHIP_MOBILE, "Radeon HD Oland"},
|
||||
{0x6603, 6, 4, RADEON_OLAND, CHIP_MOBILE, "Radeon HD Oland"},
|
||||
{0x6604, 6, 4, RADEON_OLAND, CHIP_MOBILE, "Radeon R7 M270"},
|
||||
{0x6605, 6, 4, RADEON_OLAND, CHIP_MOBILE, "Radeon R7 M260"},
|
||||
{0x6606, 6, 4, RADEON_OLAND, CHIP_MOBILE, "Radeon HD Oland"},
|
||||
{0x6607, 6, 4, RADEON_OLAND, CHIP_MOBILE, "Radeon HD Oland"},
|
||||
{0x6608, 6, 4, RADEON_OLAND, CHIP_STD, "Radeon HD Oland"},
|
||||
{0x6610, 6, 4, RADEON_OLAND, CHIP_STD, "Radeon R7 250"},
|
||||
{0x6611, 6, 4, RADEON_OLAND, CHIP_STD, "Radeon HD Oland"},
|
||||
{0x6613, 6, 4, RADEON_OLAND, CHIP_STD, "Radeon HD R7 240"},
|
||||
{0x6620, 6, 4, RADEON_OLAND, CHIP_STD, "Radeon HD R7 240"},
|
||||
{0x6613, 6, 4, RADEON_OLAND, CHIP_STD, "Radeon R7 240"},
|
||||
{0x6620, 6, 4, RADEON_OLAND, CHIP_STD, "Radeon R7 240"},
|
||||
{0x6621, 6, 4, RADEON_OLAND, CHIP_STD, "Radeon HD Oland"},
|
||||
{0x6623, 6, 4, RADEON_OLAND, CHIP_STD, "Radeon HD Oland"},
|
||||
{0x6631, 6, 4, RADEON_OLAND, CHIP_STD, "Radeon HD Oland"},
|
||||
// Hainan NODCE. No display hardware, OpenCL 3D engine.
|
||||
//{0x6670, 0, 0, RADEON_HAINAN, CHIP_COM, "Radeon HD Hainan compute"},
|
||||
|
||||
// Introduced: Late 2013
|
||||
// Codename: Sea Islands
|
||||
@@ -390,27 +394,28 @@ const struct supported_device {
|
||||
{0x1306, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon HD Kaveri"},
|
||||
{0x1307, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon HD Kaveri"},
|
||||
{0x1308, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon HD Kaveri"},
|
||||
{0x1309, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon HD Kaveri"},
|
||||
{0x130a, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon HD Kaveri"},
|
||||
{0x130b, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon HD Kaveri"},
|
||||
{0x130c, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon HD Kaveri"},
|
||||
{0x130d, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon HD Kaveri"},
|
||||
{0x130e, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon HD Kaveri"},
|
||||
{0x130f, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon HD Kaveri"},
|
||||
{0x1309, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon R6/R7 Series"},
|
||||
{0x130a, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon R5/R6 Series"},
|
||||
{0x130b, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon R4 Series"},
|
||||
{0x130c, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon R7 Series"},
|
||||
{0x130d, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon R6 Series"},
|
||||
{0x130e, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon R5 Series"},
|
||||
{0x130f, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon R7 Series"},
|
||||
{0x1310, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon HD Kaveri"},
|
||||
{0x1311, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon HD Kaveri"},
|
||||
{0x1312, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon HD Kaveri"},
|
||||
{0x1313, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon HD Kaveri"},
|
||||
{0x1313, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon R7 Series"},
|
||||
{0x1314, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon HD Kaveri"},
|
||||
{0x1315, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon HD Kaveri"},
|
||||
{0x1316, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon HD Kaveri"},
|
||||
{0x1315, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon R5 Series"},
|
||||
{0x1316, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon R5 Series"},
|
||||
{0x1317, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon HD Kaveri"},
|
||||
{0x131b, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon HD Kaveri"},
|
||||
{0x131c, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon HD Kaveri"},
|
||||
{0x131d, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon HD Kaveri"},
|
||||
{0x1318, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon HD Kaveri"},
|
||||
{0x131b, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon R5 Series"},
|
||||
{0x131c, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon R7 Series"},
|
||||
{0x131d, 8, 1, RADEON_KAVERI, CHIP_STD, "Radeon R6 Series"},
|
||||
// Bonaire DCE 8.2
|
||||
{0x6640, 8, 2, RADEON_BONAIRE, CHIP_MOBILE, "Radeon HD Bonaire"},
|
||||
{0x6641, 8, 2, RADEON_BONAIRE, CHIP_MOBILE, "Radeon HD Bonaire"},
|
||||
{0x6640, 8, 2, RADEON_BONAIRE, CHIP_MOBILE, "Radeon HD 8950"},
|
||||
{0x6641, 8, 2, RADEON_BONAIRE, CHIP_MOBILE, "Radeon HD 8930M"},
|
||||
{0x6646, 8, 2, RADEON_BONAIRE, CHIP_MOBILE, "Radeon HD Bonaire"},
|
||||
{0x6647, 8, 2, RADEON_BONAIRE, CHIP_MOBILE, "Radeon HD Bonaire"},
|
||||
{0x6649, 8, 2, RADEON_BONAIRE, CHIP_STD, "Radeon HD Bonaire"},
|
||||
@@ -418,7 +423,7 @@ const struct supported_device {
|
||||
{0x6651, 8, 2, RADEON_BONAIRE, CHIP_STD, "Radeon HD Bonaire"},
|
||||
{0x6658, 8, 2, RADEON_BONAIRE, CHIP_STD, "Radeon HD Bonaire"},
|
||||
{0x665c, 8, 2, RADEON_BONAIRE, CHIP_STD, "Radeon HD 7790"},
|
||||
{0x665d, 8, 2, RADEON_BONAIRE, CHIP_STD, "Radeon HD Bonaire"},
|
||||
{0x665d, 8, 2, RADEON_BONAIRE, CHIP_STD, "Radeon R7 200"},
|
||||
{0x665f, 8, 2, RADEON_BONAIRE, CHIP_STD, "Radeon HD Bonaire"},
|
||||
// Kabini DCE 8.3
|
||||
{0x9830, 8, 3, RADEON_KABINI, CHIP_STD, "Radeon HD 8400"},
|
||||
|
||||
@@ -111,26 +111,24 @@ FTDIDevice::SetLineCoding(usb_cdc_line_coding *lineCoding)
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
switch (lineCoding->speed) {
|
||||
case 300: rate = ftdi_8u232am_b300; break;
|
||||
case 600: rate = ftdi_8u232am_b600; break;
|
||||
case 1200: rate = ftdi_8u232am_b1200; break;
|
||||
case 2400: rate = ftdi_8u232am_b2400; break;
|
||||
case 4800: rate = ftdi_8u232am_b4800; break;
|
||||
case 9600: rate = ftdi_8u232am_b9600; break;
|
||||
case 19200: rate = ftdi_8u232am_b19200; break;
|
||||
case 38400: rate = ftdi_8u232am_b38400; break;
|
||||
case 57600: rate = ftdi_8u232am_b57600; break;
|
||||
case 115200: rate = ftdi_8u232am_b115200; break;
|
||||
case 230400: rate = ftdi_8u232am_b230400; break;
|
||||
case 460800: rate = ftdi_8u232am_b460800; break;
|
||||
case 921600: rate = ftdi_8u232am_b921600; break;
|
||||
default:
|
||||
rate = ftdi_sio_b19200;
|
||||
/* Compute baudrate register value as documented in AN232B-05 from FTDI.
|
||||
Bits 13-0 are the integer divider, and bits 16-14 are the fractional
|
||||
divider setting. 3Mbaud and 2Mbaud are special values, and at such
|
||||
high speeds the use of the fractional divider is not possible. */
|
||||
if (lineCoding->speed == 3000000)
|
||||
rate = 0;
|
||||
else if (lineCoding->speed == 2000000)
|
||||
rate = 1;
|
||||
else {
|
||||
if (lineCoding->speed > 1500000) {
|
||||
TRACE_ALWAYS("= FTDIDevice::SetLineCoding(): Datarate: %d is "
|
||||
"not supported by this hardware. Defaulted to %d\n",
|
||||
lineCoding->speed, rate);
|
||||
break;
|
||||
lineCoding->speed, 19200);
|
||||
lineCoding->speed = 19200;
|
||||
}
|
||||
rate = 3000000 * 8 / lineCoding->speed;
|
||||
int frac = ftdi_8u232am_frac[rate & 0x7];
|
||||
rate = (rate >> 3) | frac;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
|
||||
const usb_serial_device kFTDIDevices[] = {
|
||||
{VENDOR_FTDI, 0x8372, "FTDI 8U100AX serial converter"},
|
||||
{VENDOR_FTDI, 0x6001, "FTDI 8U232AM serial converter"}
|
||||
{VENDOR_FTDI, 0x6001, "FTDI 8U232AM serial converter"},
|
||||
{VENDOR_FTDI, 0x6015, "FTDI FT231X serial converter"}
|
||||
};
|
||||
|
||||
#define FTDI_BUFFER_SIZE 64
|
||||
|
||||
@@ -101,20 +101,17 @@ enum {
|
||||
ftdi_sio_b115200 = 9
|
||||
};
|
||||
|
||||
enum {
|
||||
ftdi_8u232am_b300 = 0x2710,
|
||||
ftdi_8u232am_b600 = 0x1388,
|
||||
ftdi_8u232am_b1200 = 0x09c4,
|
||||
ftdi_8u232am_b2400 = 0x04e2,
|
||||
ftdi_8u232am_b4800 = 0x0271,
|
||||
ftdi_8u232am_b9600 = 0x4138,
|
||||
ftdi_8u232am_b19200 = 0x809c,
|
||||
ftdi_8u232am_b38400 = 0xc04e,
|
||||
ftdi_8u232am_b57600 = 0x0034,
|
||||
ftdi_8u232am_b115200 = 0x001a,
|
||||
ftdi_8u232am_b230400 = 0x000d,
|
||||
ftdi_8u232am_b460800 = 0x4006,
|
||||
ftdi_8u232am_b921600 = 0x8003
|
||||
|
||||
/* Fractional divider values for FT232A/B devices */
|
||||
static const int ftdi_8u232am_frac[8] = {
|
||||
0x0 << 14, /* .0 */
|
||||
0x3 << 14, /* .125 */
|
||||
0x2 << 14, /* .25 */
|
||||
0x4 << 14, /* .375 */
|
||||
0x1 << 14, /* .5 */
|
||||
0x5 << 14, /* .625 */
|
||||
0x6 << 14, /* .75 */
|
||||
0x7 << 14 /* .875 */
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -161,8 +161,8 @@ SerialDevice::SetModes(struct termios *tios)
|
||||
uint8 baud = tios->c_cflag & CBAUD;
|
||||
int32 speed = baud_index_to_speed(baud);
|
||||
if (speed < 0) {
|
||||
baud = B19200;
|
||||
speed = 19200;
|
||||
baud = CBAUD;
|
||||
speed = tios->c_ospeed;
|
||||
}
|
||||
|
||||
// update our master config in full
|
||||
|
||||
@@ -54,6 +54,11 @@
|
||||
#if LIBAVCODEC_VERSION_INT > ((54 << 16) | (50 << 8))
|
||||
typedef AVCodecID CodecID;
|
||||
#endif
|
||||
#if LIBAVCODEC_VERSION_INT < ((55 << 16) | (45 << 8))
|
||||
#define av_frame_alloc avcodec_alloc_frame
|
||||
#define av_frame_unref avcodec_get_frame_defaults
|
||||
#define av_frame_free avcodec_free_frame
|
||||
#endif
|
||||
|
||||
|
||||
struct wave_format_ex {
|
||||
@@ -92,9 +97,9 @@ AVCodecDecoder::AVCodecDecoder()
|
||||
fResampleContext(NULL),
|
||||
fDecodedData(NULL),
|
||||
fDecodedDataSizeInBytes(0),
|
||||
fPostProcessedDecodedPicture(avcodec_alloc_frame()),
|
||||
fRawDecodedPicture(avcodec_alloc_frame()),
|
||||
fRawDecodedAudio(avcodec_alloc_frame()),
|
||||
fPostProcessedDecodedPicture(av_frame_alloc()),
|
||||
fRawDecodedPicture(av_frame_alloc()),
|
||||
fRawDecodedAudio(av_frame_alloc()),
|
||||
|
||||
fCodecInitDone(false),
|
||||
|
||||
@@ -118,7 +123,7 @@ AVCodecDecoder::AVCodecDecoder()
|
||||
fChunkBufferSize(0),
|
||||
fAudioDecodeError(false),
|
||||
|
||||
fDecodedDataBuffer(avcodec_alloc_frame()),
|
||||
fDecodedDataBuffer(av_frame_alloc()),
|
||||
fDecodedDataBufferOffset(0),
|
||||
fDecodedDataBufferSize(0)
|
||||
{
|
||||
@@ -1091,7 +1096,8 @@ AVCodecDecoder::_DecodeSomeAudioFramesIntoEmptyDecodedDataBuffer()
|
||||
assert(fDecodedDataBufferSize == 0);
|
||||
assert(fTempPacket.size > 0);
|
||||
|
||||
avcodec_get_frame_defaults(fDecodedDataBuffer);
|
||||
memset(fDecodedDataBuffer, 0, sizeof(AVFrame));
|
||||
av_frame_unref(fDecodedDataBuffer);
|
||||
fDecodedDataBufferOffset = 0;
|
||||
int gotAudioFrame = 0;
|
||||
|
||||
@@ -1618,11 +1624,17 @@ AVCodecDecoder::_DeinterlaceAndColorConvertVideoFrame()
|
||||
avpicture_alloc(&deinterlacedPicture, fContext->pix_fmt, displayWidth,
|
||||
displayHeight);
|
||||
|
||||
#if LIBAVCODEC_VERSION_INT < ((57 << 16) | (0 << 8))
|
||||
if (avpicture_deinterlace(&deinterlacedPicture, &rawPicture,
|
||||
fContext->pix_fmt, displayWidth, displayHeight) < 0) {
|
||||
TRACE("[v] avpicture_deinterlace() - error\n");
|
||||
} else
|
||||
useDeinterlacedPicture = true;
|
||||
#else
|
||||
// avpicture_deinterlace is gone
|
||||
// TODO: implement alternate deinterlace using avfilter
|
||||
TRACE("[v] avpicture_deinterlace() - not implemented\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
// Some decoders do not set pix_fmt until they have decoded 1 frame
|
||||
|
||||
@@ -35,6 +35,18 @@ extern "C" {
|
||||
|
||||
static const size_t kDefaultChunkBufferSize = 2 * 1024 * 1024;
|
||||
|
||||
#if LIBAVCODEC_VERSION_INT < ((54 << 16) | (50 << 8))
|
||||
#define AV_PIX_FMT_NONE PIX_FMT_NONE
|
||||
#define AV_CODEC_ID_NONE CODEC_ID_NONE
|
||||
#define AV_CODEC_ID_MPEG1VIDEO CODEC_ID_MPEG1VIDEO
|
||||
#define AV_CODEC_ID_MPEG2VIDEO CODEC_ID_MPEG2VIDEO
|
||||
#endif
|
||||
#if LIBAVCODEC_VERSION_INT < ((55 << 16) | (45 << 8))
|
||||
#define av_frame_alloc avcodec_alloc_frame
|
||||
#define av_frame_unref avcodec_get_frame_defaults
|
||||
#define av_frame_free avcodec_free_frame
|
||||
#endif
|
||||
|
||||
|
||||
AVCodecEncoder::AVCodecEncoder(uint32 codecID, int bitRateScale)
|
||||
:
|
||||
@@ -45,7 +57,7 @@ AVCodecEncoder::AVCodecEncoder(uint32 codecID, int bitRateScale)
|
||||
fOwnContext(avcodec_alloc_context3(NULL)),
|
||||
fContext(fOwnContext),
|
||||
fCodecInitStatus(CODEC_INIT_NEEDED),
|
||||
fFrame(avcodec_alloc_frame()),
|
||||
fFrame(av_frame_alloc()),
|
||||
fSwsContext(NULL),
|
||||
fFramesWritten(0)
|
||||
{
|
||||
@@ -149,9 +161,9 @@ AVCodecEncoder::SetUp(const media_format* inputFormat)
|
||||
return B_BAD_VALUE;
|
||||
|
||||
// Codec IDs for raw-formats may need to be figured out here.
|
||||
if (fCodec == NULL && fCodecID == CODEC_ID_NONE) {
|
||||
if (fCodec == NULL && fCodecID == AV_CODEC_ID_NONE) {
|
||||
fCodecID = raw_audio_codec_id_for(*inputFormat);
|
||||
if (fCodecID != CODEC_ID_NONE)
|
||||
if (fCodecID != AV_CODEC_ID_NONE)
|
||||
fCodec = avcodec_find_encoder(fCodecID);
|
||||
}
|
||||
if (fCodec == NULL) {
|
||||
@@ -304,7 +316,7 @@ AVCodecEncoder::_Setup()
|
||||
|
||||
// TODO: Fix pixel format or setup conversion method...
|
||||
if (fCodec->pix_fmts != NULL) {
|
||||
for (int i = 0; fCodec->pix_fmts[i] != PIX_FMT_NONE; i++) {
|
||||
for (int i = 0; fCodec->pix_fmts[i] != AV_PIX_FMT_NONE; i++) {
|
||||
// Use the last supported pixel format, which we hope is the
|
||||
// one with the best quality.
|
||||
fContext->pix_fmt = fCodec->pix_fmts[i];
|
||||
@@ -465,10 +477,10 @@ AVCodecEncoder::_Setup()
|
||||
fEncodeParameters.quality, fContext->bit_rate);
|
||||
|
||||
// Add some known fixes from the FFmpeg API example:
|
||||
if (fContext->codec_id == CODEC_ID_MPEG2VIDEO) {
|
||||
if (fContext->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
|
||||
// Just for testing, we also add B frames */
|
||||
fContext->max_b_frames = 2;
|
||||
} else if (fContext->codec_id == CODEC_ID_MPEG1VIDEO) {
|
||||
} else if (fContext->codec_id == AV_CODEC_ID_MPEG1VIDEO) {
|
||||
// Needed to avoid using macroblocks in which some coeffs overflow.
|
||||
// This does not happen with normal video, it just happens here as
|
||||
// the motion of the chroma plane does not match the luma plane.
|
||||
@@ -612,7 +624,7 @@ AVCodecEncoder::_EncodeAudio(const uint8* buffer, size_t bufferSize,
|
||||
int gotPacket = 0;
|
||||
|
||||
if (buffer) {
|
||||
avcodec_get_frame_defaults(&frame);
|
||||
av_frame_unref(&frame);
|
||||
|
||||
frame.nb_samples = frameCount;
|
||||
|
||||
@@ -699,9 +711,17 @@ AVCodecEncoder::_EncodeVideo(const void* buffer, int64 frameCount,
|
||||
fDstFrame.linesize);
|
||||
|
||||
// Encode one video chunk/frame.
|
||||
#if LIBAVCODEC_VERSION_INT < ((55 << 16) | (45 << 8))
|
||||
int usedBytes = avcodec_encode_video(fContext, fChunkBuffer,
|
||||
kDefaultChunkBufferSize, fFrame);
|
||||
|
||||
#else
|
||||
int gotPacket;
|
||||
AVPacket pkt;
|
||||
pkt.data = NULL;
|
||||
pkt.size = 0;
|
||||
av_init_packet(&pkt);
|
||||
int usedBytes = avcodec_encode_video2(fContext, &pkt, fFrame, &gotPacket);
|
||||
#endif
|
||||
// avcodec.h says we need to set it.
|
||||
fFrame->pts++;
|
||||
|
||||
@@ -710,6 +730,7 @@ AVCodecEncoder::_EncodeVideo(const void* buffer, int64 frameCount,
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
#if LIBAVCODEC_VERSION_INT < ((55 << 16) | (45 << 8))
|
||||
// Maybe we need to use this PTS to calculate start_time:
|
||||
if (fContext->coded_frame->pts != kNoPTSValue) {
|
||||
TRACE(" codec frame PTS: %lld (codec time_base: %d/%d)\n",
|
||||
@@ -719,6 +740,17 @@ AVCodecEncoder::_EncodeVideo(const void* buffer, int64 frameCount,
|
||||
TRACE(" codec frame PTS: N/A (codec time_base: %d/%d)\n",
|
||||
fContext->time_base.num, fContext->time_base.den);
|
||||
}
|
||||
#else
|
||||
// Maybe we need to use this PTS to calculate start_time:
|
||||
if (pkt.pts != AV_NOPTS_VALUE) {
|
||||
TRACE(" codec frame PTS: %lld (codec time_base: %d/%d)\n",
|
||||
pkt.pts, fContext->time_base.num,
|
||||
fContext->time_base.den);
|
||||
} else {
|
||||
TRACE(" codec frame PTS: N/A (codec time_base: %d/%d)\n",
|
||||
fContext->time_base.num, fContext->time_base.den);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Setup media_encode_info, most important is the time stamp.
|
||||
info->start_time = (bigtime_t)(fFramesWritten * 1000000LL
|
||||
@@ -729,7 +761,11 @@ AVCodecEncoder::_EncodeVideo(const void* buffer, int64 frameCount,
|
||||
info->flags |= B_MEDIA_KEY_FRAME;
|
||||
|
||||
// Write the chunk
|
||||
#if LIBAVCODEC_VERSION_INT < ((55 << 16) | (45 << 8))
|
||||
ret = WriteChunk(fChunkBuffer, usedBytes, info);
|
||||
#else
|
||||
ret = WriteChunk(pkt.data, pkt.size, info);
|
||||
#endif
|
||||
if (ret != B_OK) {
|
||||
TRACE(" error writing chunk: %s\n", strerror(ret));
|
||||
break;
|
||||
|
||||
@@ -46,6 +46,14 @@ extern "C" {
|
||||
|
||||
#define ERROR(a...) fprintf(stderr, a)
|
||||
|
||||
#if LIBAVCODEC_VERSION_INT < ((54 << 16) | (50 << 8))
|
||||
#define AV_CODEC_ID_PCM_S16BE CODEC_ID_PCM_S16BE
|
||||
#define AV_CODEC_ID_PCM_S16LE CODEC_ID_PCM_S16LE
|
||||
#define AV_CODEC_ID_PCM_U16BE CODEC_ID_PCM_U16BE
|
||||
#define AV_CODEC_ID_PCM_U16LE CODEC_ID_PCM_U16LE
|
||||
#define AV_CODEC_ID_PCM_S8 CODEC_ID_PCM_S8
|
||||
#define AV_CODEC_ID_PCM_U8 CODEC_ID_PCM_U8
|
||||
#endif
|
||||
|
||||
static const int64 kNoPTSValue = AV_NOPTS_VALUE;
|
||||
|
||||
@@ -980,8 +988,8 @@ AVFormatReader::Stream::Init(int32 virtualIndex)
|
||||
// Set format family and type depending on codec_type of the stream.
|
||||
switch (codecContext->codec_type) {
|
||||
case AVMEDIA_TYPE_AUDIO:
|
||||
if ((codecContext->codec_id >= CODEC_ID_PCM_S16LE)
|
||||
&& (codecContext->codec_id <= CODEC_ID_PCM_U8)) {
|
||||
if ((codecContext->codec_id >= AV_CODEC_ID_PCM_S16LE)
|
||||
&& (codecContext->codec_id <= AV_CODEC_ID_PCM_U8)) {
|
||||
TRACE(" raw audio\n");
|
||||
format->type = B_MEDIA_RAW_AUDIO;
|
||||
description.family = B_ANY_FORMAT_FAMILY;
|
||||
@@ -1010,37 +1018,37 @@ AVFormatReader::Stream::Init(int32 virtualIndex)
|
||||
if (format->type == B_MEDIA_RAW_AUDIO) {
|
||||
// We cannot describe all raw-audio formats, some are unsupported.
|
||||
switch (codecContext->codec_id) {
|
||||
case CODEC_ID_PCM_S16LE:
|
||||
case AV_CODEC_ID_PCM_S16LE:
|
||||
format->u.raw_audio.format
|
||||
= media_raw_audio_format::B_AUDIO_SHORT;
|
||||
format->u.raw_audio.byte_order
|
||||
= B_MEDIA_LITTLE_ENDIAN;
|
||||
break;
|
||||
case CODEC_ID_PCM_S16BE:
|
||||
case AV_CODEC_ID_PCM_S16BE:
|
||||
format->u.raw_audio.format
|
||||
= media_raw_audio_format::B_AUDIO_SHORT;
|
||||
format->u.raw_audio.byte_order
|
||||
= B_MEDIA_BIG_ENDIAN;
|
||||
break;
|
||||
case CODEC_ID_PCM_U16LE:
|
||||
case AV_CODEC_ID_PCM_U16LE:
|
||||
// format->u.raw_audio.format
|
||||
// = media_raw_audio_format::B_AUDIO_USHORT;
|
||||
// format->u.raw_audio.byte_order
|
||||
// = B_MEDIA_LITTLE_ENDIAN;
|
||||
return B_NOT_SUPPORTED;
|
||||
break;
|
||||
case CODEC_ID_PCM_U16BE:
|
||||
case AV_CODEC_ID_PCM_U16BE:
|
||||
// format->u.raw_audio.format
|
||||
// = media_raw_audio_format::B_AUDIO_USHORT;
|
||||
// format->u.raw_audio.byte_order
|
||||
// = B_MEDIA_BIG_ENDIAN;
|
||||
return B_NOT_SUPPORTED;
|
||||
break;
|
||||
case CODEC_ID_PCM_S8:
|
||||
case AV_CODEC_ID_PCM_S8:
|
||||
format->u.raw_audio.format
|
||||
= media_raw_audio_format::B_AUDIO_CHAR;
|
||||
break;
|
||||
case CODEC_ID_PCM_U8:
|
||||
case AV_CODEC_ID_PCM_U8:
|
||||
format->u.raw_audio.format
|
||||
= media_raw_audio_format::B_AUDIO_UCHAR;
|
||||
break;
|
||||
|
||||
@@ -42,6 +42,11 @@ extern "C" {
|
||||
|
||||
#define ERROR(a...) fprintf(stderr, a)
|
||||
|
||||
#if LIBAVCODEC_VERSION_INT < ((54 << 16) | (50 << 8))
|
||||
#define AV_CODEC_ID_NONE CODEC_ID_NONE
|
||||
#define AV_PIX_FMT_YUV420P PIX_FMT_YUV420P
|
||||
#endif
|
||||
|
||||
|
||||
static const size_t kIOBufferSize = 64 * 1024;
|
||||
// TODO: This could depend on the BMediaFile creation flags, IIRC,
|
||||
@@ -124,7 +129,7 @@ AVFormatWriter::StreamCookie::Init(media_format* format,
|
||||
// TODO: This is a hack for now! Use avcodec_find_encoder_by_name()
|
||||
// or something similar...
|
||||
fStream->codec->codec_id = (CodecID)codecInfo->sub_id;
|
||||
if (fStream->codec->codec_id == CODEC_ID_NONE)
|
||||
if (fStream->codec->codec_id == AV_CODEC_ID_NONE)
|
||||
fStream->codec->codec_id = raw_audio_codec_id_for(*format);
|
||||
|
||||
// Setup the stream according to the media format...
|
||||
@@ -162,7 +167,7 @@ AVFormatWriter::StreamCookie::Init(media_format* format,
|
||||
// AVCodec* codec = fStream->codec->codec;
|
||||
// for (int i = 0; codec->pix_fmts[i] != PIX_FMT_NONE; i++)
|
||||
// fStream->codec->pix_fmt = codec->pix_fmts[i];
|
||||
fStream->codec->pix_fmt = PIX_FMT_YUV420P;
|
||||
fStream->codec->pix_fmt = AV_PIX_FMT_YUV420P;
|
||||
|
||||
} else if (format->type == B_MEDIA_RAW_AUDIO) {
|
||||
fStream->codec->codec_type = AVMEDIA_TYPE_AUDIO;
|
||||
|
||||
@@ -14,6 +14,12 @@ extern "C" {
|
||||
|
||||
#if LIBAVCODEC_VERSION_INT > ((54 << 16) | (50 << 8))
|
||||
typedef AVCodecID CodecID;
|
||||
#else
|
||||
#define AV_CODEC_ID_NONE CODEC_ID_NONE
|
||||
#define AV_CODEC_ID_PCM_S16LE CODEC_ID_PCM_S16LE
|
||||
#define AV_CODEC_ID_RAWVIDEO CODEC_ID_RAWVIDEO
|
||||
#define AV_CODEC_ID_DVD_SUBTITLE CODEC_ID_DVD_SUBTITLE
|
||||
#define AV_CODEC_ID_ADPCM_IMA_QT CODEC_ID_ADPCM_IMA_QT
|
||||
#endif
|
||||
|
||||
|
||||
@@ -52,13 +58,13 @@ register_avcodec_tags(media_format_family family, const char *avname, int &index
|
||||
if (tags == NULL)
|
||||
continue;
|
||||
|
||||
for (; tags->id != CODEC_ID_NONE; tags++) {
|
||||
for (; tags->id != AV_CODEC_ID_NONE; tags++) {
|
||||
// XXX: we might want to keep some strange PCM codecs too...
|
||||
// skip unwanted codec tags
|
||||
if (tags->tag == CODEC_ID_RAWVIDEO
|
||||
|| (tags->tag >= CODEC_ID_PCM_S16LE
|
||||
&& tags->tag < CODEC_ID_ADPCM_IMA_QT)
|
||||
|| tags->tag >= CODEC_ID_DVD_SUBTITLE)
|
||||
if (tags->tag == AV_CODEC_ID_RAWVIDEO
|
||||
|| (tags->tag >= AV_CODEC_ID_PCM_S16LE
|
||||
&& tags->tag < AV_CODEC_ID_ADPCM_IMA_QT)
|
||||
|| tags->tag >= AV_CODEC_ID_DVD_SUBTITLE)
|
||||
continue;
|
||||
|
||||
if (index >= sMaxFormatCount) {
|
||||
@@ -70,7 +76,7 @@ register_avcodec_tags(media_format_family family, const char *avname, int &index
|
||||
|
||||
media_format format;
|
||||
// Determine media type
|
||||
if (tags->tag < CODEC_ID_PCM_S16LE)
|
||||
if (tags->tag < AV_CODEC_ID_PCM_S16LE)
|
||||
format.type = B_MEDIA_ENCODED_VIDEO;
|
||||
else
|
||||
format.type = B_MEDIA_ENCODED_AUDIO;
|
||||
|
||||
@@ -7,6 +7,30 @@
|
||||
#include "EncoderTable.h"
|
||||
|
||||
|
||||
#if LIBAVCODEC_VERSION_INT < ((54 << 16) | (50 << 8))
|
||||
#define AV_CODEC_ID_NONE CODEC_ID_NONE
|
||||
#define AV_CODEC_ID_PCM_F32LE CODEC_ID_PCM_F32LE
|
||||
#define AV_CODEC_ID_PCM_F64LE CODEC_ID_PCM_F64LE
|
||||
#define AV_CODEC_ID_PCM_S32LE CODEC_ID_PCM_S32LE
|
||||
#define AV_CODEC_ID_PCM_S16LE CODEC_ID_PCM_S16LE
|
||||
#define AV_CODEC_ID_PCM_U8 CODEC_ID_PCM_U8
|
||||
#define AV_CODEC_ID_PCM_F32BE CODEC_ID_PCM_F32BE
|
||||
#define AV_CODEC_ID_PCM_F64BE CODEC_ID_PCM_F64BE
|
||||
#define AV_CODEC_ID_PCM_S32BE CODEC_ID_PCM_S32BE
|
||||
#define AV_CODEC_ID_PCM_S16BE CODEC_ID_PCM_S16BE
|
||||
#define AV_CODEC_ID_AAC CODEC_ID_AAC
|
||||
#define AV_CODEC_ID_AC3 CODEC_ID_AC3
|
||||
#define AV_CODEC_ID_DVVIDEO CODEC_ID_DVVIDEO
|
||||
#define AV_CODEC_ID_FLAC CODEC_ID_FLAC
|
||||
#define AV_CODEC_ID_MJPEG CODEC_ID_MJPEG
|
||||
#define AV_CODEC_ID_MPEG1VIDEO CODEC_ID_MPEG1VIDEO
|
||||
#define AV_CODEC_ID_MPEG2VIDEO CODEC_ID_MPEG2VIDEO
|
||||
#define AV_CODEC_ID_MPEG4 CODEC_ID_MPEG4
|
||||
#define AV_CODEC_ID_THEORA CODEC_ID_THEORA
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
const EncoderDescription gEncoderTable[] = {
|
||||
// Video codecs
|
||||
{
|
||||
@@ -14,7 +38,7 @@ const EncoderDescription gEncoderTable[] = {
|
||||
"MPEG-4 video",
|
||||
"mpeg4",
|
||||
0,
|
||||
CODEC_ID_MPEG4,
|
||||
AV_CODEC_ID_MPEG4,
|
||||
{ 0 }
|
||||
},
|
||||
B_ANY_FORMAT_FAMILY, // TODO: Hm, actually not really /any/ family...
|
||||
@@ -27,7 +51,7 @@ const EncoderDescription gEncoderTable[] = {
|
||||
"MPEG-1 video",
|
||||
"mpeg1video",
|
||||
0,
|
||||
CODEC_ID_MPEG1VIDEO,
|
||||
AV_CODEC_ID_MPEG1VIDEO,
|
||||
{ 0 }
|
||||
},
|
||||
B_MPEG_FORMAT_FAMILY,
|
||||
@@ -40,7 +64,7 @@ const EncoderDescription gEncoderTable[] = {
|
||||
"MPEG-2 video",
|
||||
"mpeg2video",
|
||||
0,
|
||||
CODEC_ID_MPEG2VIDEO,
|
||||
AV_CODEC_ID_MPEG2VIDEO,
|
||||
{ 0 }
|
||||
},
|
||||
B_MPEG_FORMAT_FAMILY,
|
||||
@@ -53,7 +77,7 @@ const EncoderDescription gEncoderTable[] = {
|
||||
"Theora video",
|
||||
"theora",
|
||||
0,
|
||||
CODEC_ID_THEORA,
|
||||
AV_CODEC_ID_THEORA,
|
||||
{ 0 }
|
||||
},
|
||||
B_ANY_FORMAT_FAMILY,
|
||||
@@ -66,7 +90,7 @@ const EncoderDescription gEncoderTable[] = {
|
||||
"DV (Digital Video)",
|
||||
"dvvideo",
|
||||
0,
|
||||
CODEC_ID_DVVIDEO,
|
||||
AV_CODEC_ID_DVVIDEO,
|
||||
{ 0 }
|
||||
},
|
||||
B_MISC_FORMAT_FAMILY,
|
||||
@@ -79,7 +103,7 @@ const EncoderDescription gEncoderTable[] = {
|
||||
"MJPEG (Motion JPEG)",
|
||||
"mjpeg",
|
||||
0,
|
||||
CODEC_ID_MJPEG,
|
||||
AV_CODEC_ID_MJPEG,
|
||||
{ 0 }
|
||||
},
|
||||
B_ANY_FORMAT_FAMILY,
|
||||
@@ -94,7 +118,7 @@ const EncoderDescription gEncoderTable[] = {
|
||||
"Free Lossless Audio Codec (FLAC)",
|
||||
"flac",
|
||||
0,
|
||||
CODEC_ID_FLAC,
|
||||
AV_CODEC_ID_FLAC,
|
||||
{ 0 }
|
||||
},
|
||||
B_ANY_FORMAT_FAMILY,
|
||||
@@ -107,7 +131,7 @@ const EncoderDescription gEncoderTable[] = {
|
||||
"Advanced Audio Coding (AAC)",
|
||||
"aac",
|
||||
0,
|
||||
CODEC_ID_AAC,
|
||||
AV_CODEC_ID_AAC,
|
||||
{ 0 }
|
||||
},
|
||||
B_MPEG_FORMAT_FAMILY,
|
||||
@@ -133,7 +157,7 @@ const EncoderDescription gEncoderTable[] = {
|
||||
"Dolby Digital (AC-3)",
|
||||
"ac3",
|
||||
0,
|
||||
CODEC_ID_AC3,
|
||||
AV_CODEC_ID_AC3,
|
||||
{ 0 }
|
||||
},
|
||||
B_ANY_FORMAT_FAMILY,
|
||||
@@ -243,37 +267,37 @@ const size_t gEncoderCount = sizeof(gEncoderTable) / sizeof(EncoderDescription);
|
||||
raw_audio_codec_id_for(const media_format& format)
|
||||
{
|
||||
if (format.type != B_MEDIA_RAW_AUDIO)
|
||||
return CODEC_ID_NONE;
|
||||
return AV_CODEC_ID_NONE;
|
||||
|
||||
if (format.u.raw_audio.byte_order == B_MEDIA_LITTLE_ENDIAN) {
|
||||
switch (format.u.raw_audio.format) {
|
||||
case media_raw_audio_format::B_AUDIO_FLOAT:
|
||||
return CODEC_ID_PCM_F32LE;
|
||||
return AV_CODEC_ID_PCM_F32LE;
|
||||
case media_raw_audio_format::B_AUDIO_DOUBLE:
|
||||
return CODEC_ID_PCM_F64LE;
|
||||
return AV_CODEC_ID_PCM_F64LE;
|
||||
case media_raw_audio_format::B_AUDIO_INT:
|
||||
return CODEC_ID_PCM_S32LE;
|
||||
return AV_CODEC_ID_PCM_S32LE;
|
||||
case media_raw_audio_format::B_AUDIO_SHORT:
|
||||
return CODEC_ID_PCM_S16LE;
|
||||
return AV_CODEC_ID_PCM_S16LE;
|
||||
case media_raw_audio_format::B_AUDIO_UCHAR:
|
||||
return CODEC_ID_PCM_U8;
|
||||
return AV_CODEC_ID_PCM_U8;
|
||||
default:
|
||||
return CODEC_ID_NONE;
|
||||
return AV_CODEC_ID_NONE;
|
||||
}
|
||||
} else {
|
||||
switch (format.u.raw_audio.format) {
|
||||
case media_raw_audio_format::B_AUDIO_FLOAT:
|
||||
return CODEC_ID_PCM_F32BE;
|
||||
return AV_CODEC_ID_PCM_F32BE;
|
||||
case media_raw_audio_format::B_AUDIO_DOUBLE:
|
||||
return CODEC_ID_PCM_F64BE;
|
||||
return AV_CODEC_ID_PCM_F64BE;
|
||||
case media_raw_audio_format::B_AUDIO_INT:
|
||||
return CODEC_ID_PCM_S32BE;
|
||||
return AV_CODEC_ID_PCM_S32BE;
|
||||
case media_raw_audio_format::B_AUDIO_SHORT:
|
||||
return CODEC_ID_PCM_S16BE;
|
||||
return AV_CODEC_ID_PCM_S16BE;
|
||||
case media_raw_audio_format::B_AUDIO_UCHAR:
|
||||
return CODEC_ID_PCM_U8;
|
||||
return AV_CODEC_ID_PCM_U8;
|
||||
default:
|
||||
return CODEC_ID_NONE;
|
||||
return AV_CODEC_ID_NONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,11 +22,36 @@ extern "C" {
|
||||
#define TRACE(a...)
|
||||
#endif
|
||||
|
||||
#if LIBAVCODEC_VERSION_INT < ((54 << 16) | (50 << 8))
|
||||
#define AVPixelFormat PixelFormat
|
||||
#define AV_PIX_FMT_NONE PIX_FMT_NONE
|
||||
#define AV_PIX_FMT_YUV410P PIX_FMT_YUV410P
|
||||
#define AV_PIX_FMT_YUV411P PIX_FMT_YUV411P
|
||||
#define AV_PIX_FMT_YUV420P PIX_FMT_YUV420P
|
||||
#define AV_PIX_FMT_YUVJ420P PIX_FMT_YUVJ420P
|
||||
#define AV_PIX_FMT_YUV422P PIX_FMT_YUV422P
|
||||
#define AV_PIX_FMT_YUVJ422P PIX_FMT_YUVJ422P
|
||||
#define AV_PIX_FMT_YUYV422 PIX_FMT_YUYV422
|
||||
#define AV_PIX_FMT_YUV420P10LE PIX_FMT_YUV420P10LE
|
||||
#define AV_PIX_FMT_YUV444P PIX_FMT_YUV444P
|
||||
#define AV_PIX_FMT_RGB24 PIX_FMT_RGB24
|
||||
#define AV_PIX_FMT_BGR24 PIX_FMT_BGR24
|
||||
#define AV_PIX_FMT_RGB565 PIX_FMT_RGB565
|
||||
#define AV_PIX_FMT_RGB555 PIX_FMT_RGB555
|
||||
#define AV_PIX_FMT_GRAY8 PIX_FMT_GRAY8
|
||||
#define AV_PIX_FMT_MONOBLACK PIX_FMT_MONOBLACK
|
||||
#define AV_PIX_FMT_PAL8 PIX_FMT_PAL8
|
||||
#define AV_PIX_FMT_BGR32 PIX_FMT_BGR32
|
||||
#define AV_PIX_FMT_BGR565 PIX_FMT_BGR565
|
||||
#define AV_PIX_FMT_BGR555 PIX_FMT_BGR555
|
||||
#define AV_PIX_FMT_RGB32 PIX_FMT_RGB32
|
||||
#endif
|
||||
|
||||
|
||||
//! This function will try to find the best colorspaces for both the ff-codec
|
||||
// and the Media Kit sides.
|
||||
gfx_convert_func
|
||||
resolve_colorspace(color_space colorSpace, PixelFormat pixelFormat, int width,
|
||||
resolve_colorspace(color_space colorSpace, AVPixelFormat pixelFormat, int width,
|
||||
int height)
|
||||
{
|
||||
CPUCapabilities cpu;
|
||||
@@ -34,18 +59,18 @@ resolve_colorspace(color_space colorSpace, PixelFormat pixelFormat, int width,
|
||||
switch (colorSpace) {
|
||||
case B_RGB32:
|
||||
// Planar Formats
|
||||
if (pixelFormat == PIX_FMT_YUV410P) {
|
||||
if (pixelFormat == AV_PIX_FMT_YUV410P) {
|
||||
TRACE("resolve_colorspace: gfx_conv_yuv410p_rgb32_c\n");
|
||||
return gfx_conv_yuv410p_rgb32_c;
|
||||
}
|
||||
|
||||
if (pixelFormat == PIX_FMT_YUV411P) {
|
||||
if (pixelFormat == AV_PIX_FMT_YUV411P) {
|
||||
TRACE("resolve_colorspace: gfx_conv_yuv411p_rgb32_c\n");
|
||||
return gfx_conv_yuv411p_rgb32_c;
|
||||
}
|
||||
|
||||
if (pixelFormat == PIX_FMT_YUV420P
|
||||
|| pixelFormat == PIX_FMT_YUVJ420P) {
|
||||
if (pixelFormat == AV_PIX_FMT_YUV420P
|
||||
|| pixelFormat == AV_PIX_FMT_YUVJ420P) {
|
||||
#ifndef __x86_64__
|
||||
if (cpu.HasSSSE3() && width % 8 == 0 && height % 2 == 0) {
|
||||
TRACE("resolve_colorspace: gfx_conv_yuv420p_rgba32_ssse3\n");
|
||||
@@ -63,8 +88,8 @@ resolve_colorspace(color_space colorSpace, PixelFormat pixelFormat, int width,
|
||||
return gfx_conv_YCbCr420p_RGB32_c;
|
||||
}
|
||||
|
||||
if (pixelFormat == PIX_FMT_YUV422P
|
||||
|| pixelFormat == PIX_FMT_YUVJ422P) {
|
||||
if (pixelFormat == AV_PIX_FMT_YUV422P
|
||||
|| pixelFormat == AV_PIX_FMT_YUVJ422P) {
|
||||
#ifndef __x86_64__
|
||||
if (cpu.HasSSSE3() && width % 8 == 0) {
|
||||
TRACE("resolve_colorspace: gfx_conv_yuv422p_RGB32_ssse3\n");
|
||||
@@ -82,7 +107,7 @@ resolve_colorspace(color_space colorSpace, PixelFormat pixelFormat, int width,
|
||||
}
|
||||
|
||||
// Packed Formats
|
||||
if (pixelFormat == PIX_FMT_YUYV422) {
|
||||
if (pixelFormat == AV_PIX_FMT_YUYV422) {
|
||||
#ifndef __x86_64__
|
||||
if (cpu.HasSSSE3() && width % 8 == 0) {
|
||||
return gfx_conv_yuv422_rgba32_ssse3;
|
||||
@@ -96,7 +121,7 @@ resolve_colorspace(color_space colorSpace, PixelFormat pixelFormat, int width,
|
||||
return gfx_conv_YCbCr422_RGB32_c;
|
||||
}
|
||||
|
||||
if (pixelFormat == PIX_FMT_YUV420P10LE)
|
||||
if (pixelFormat == AV_PIX_FMT_YUV420P10LE)
|
||||
return gfx_conv_yuv420p10le_rgb32_c;
|
||||
|
||||
TRACE("resolve_colorspace: %s => B_RGB32: NULL\n",
|
||||
@@ -114,23 +139,23 @@ resolve_colorspace(color_space colorSpace, PixelFormat pixelFormat, int width,
|
||||
return NULL;
|
||||
|
||||
case B_YCbCr422:
|
||||
if (pixelFormat == PIX_FMT_YUV410P) {
|
||||
if (pixelFormat == AV_PIX_FMT_YUV410P) {
|
||||
TRACE("resolve_colorspace: gfx_conv_yuv410p_ycbcr422_c\n");
|
||||
return gfx_conv_yuv410p_ycbcr422_c;
|
||||
}
|
||||
|
||||
if (pixelFormat == PIX_FMT_YUV411P) {
|
||||
if (pixelFormat == AV_PIX_FMT_YUV411P) {
|
||||
TRACE("resolve_colorspace: gfx_conv_yuv411p_ycbcr422_c\n");
|
||||
return gfx_conv_yuv411p_ycbcr422_c;
|
||||
}
|
||||
|
||||
if (pixelFormat == PIX_FMT_YUV420P
|
||||
|| pixelFormat == PIX_FMT_YUVJ420P) {
|
||||
if (pixelFormat == AV_PIX_FMT_YUV420P
|
||||
|| pixelFormat == AV_PIX_FMT_YUVJ420P) {
|
||||
TRACE("resolve_colorspace: gfx_conv_yuv420p_ycbcr422_c\n");
|
||||
return gfx_conv_yuv420p_ycbcr422_c;
|
||||
}
|
||||
|
||||
if (pixelFormat == PIX_FMT_YUYV422) {
|
||||
if (pixelFormat == AV_PIX_FMT_YUYV422) {
|
||||
TRACE("resolve_colorspace: PIX_FMT_YUV422 => B_YCbCr422: "
|
||||
"gfx_conv_null\n");
|
||||
return gfx_conv_null;
|
||||
@@ -150,7 +175,7 @@ resolve_colorspace(color_space colorSpace, PixelFormat pixelFormat, int width,
|
||||
const char*
|
||||
pixfmt_to_string(int pixFormat)
|
||||
{
|
||||
const char* name = av_get_pix_fmt_name((enum PixelFormat)pixFormat);
|
||||
const char* name = av_get_pix_fmt_name((enum AVPixelFormat)pixFormat);
|
||||
if (name == NULL)
|
||||
return "(unknown)";
|
||||
return name;
|
||||
@@ -165,92 +190,92 @@ pixfmt_to_colorspace(int pixFormat)
|
||||
TRACE("No BE API colorspace definition for pixel format "
|
||||
"\"%s\".\n", pixfmt_to_string(pixFormat));
|
||||
// Supposed to fall through.
|
||||
case PIX_FMT_NONE:
|
||||
case AV_PIX_FMT_NONE:
|
||||
return B_NO_COLOR_SPACE;
|
||||
|
||||
// NOTE: See pixfmt_to_colorspace() for what these are.
|
||||
case PIX_FMT_YUV420P:
|
||||
case AV_PIX_FMT_YUV420P:
|
||||
return B_YUV420;
|
||||
case PIX_FMT_YUYV422:
|
||||
case AV_PIX_FMT_YUYV422:
|
||||
return B_YUV422;
|
||||
case PIX_FMT_RGB24:
|
||||
case AV_PIX_FMT_RGB24:
|
||||
return B_RGB24_BIG;
|
||||
case PIX_FMT_BGR24:
|
||||
case AV_PIX_FMT_BGR24:
|
||||
return B_RGB24;
|
||||
case PIX_FMT_YUV422P:
|
||||
case AV_PIX_FMT_YUV422P:
|
||||
return B_YUV422;
|
||||
case PIX_FMT_YUV444P:
|
||||
case AV_PIX_FMT_YUV444P:
|
||||
return B_YUV444;
|
||||
case PIX_FMT_RGB32:
|
||||
case AV_PIX_FMT_RGB32:
|
||||
return B_RGBA32_BIG;
|
||||
case PIX_FMT_YUV410P:
|
||||
case AV_PIX_FMT_YUV410P:
|
||||
return B_YUV9;
|
||||
case PIX_FMT_YUV411P:
|
||||
case AV_PIX_FMT_YUV411P:
|
||||
return B_YUV12;
|
||||
case PIX_FMT_RGB565:
|
||||
case AV_PIX_FMT_RGB565:
|
||||
return B_RGB16_BIG;
|
||||
case PIX_FMT_RGB555:
|
||||
case AV_PIX_FMT_RGB555:
|
||||
return B_RGB15_BIG;
|
||||
case PIX_FMT_GRAY8:
|
||||
case AV_PIX_FMT_GRAY8:
|
||||
return B_GRAY8;
|
||||
case PIX_FMT_MONOBLACK:
|
||||
case AV_PIX_FMT_MONOBLACK:
|
||||
return B_GRAY1;
|
||||
case PIX_FMT_PAL8:
|
||||
case AV_PIX_FMT_PAL8:
|
||||
return B_CMAP8;
|
||||
case PIX_FMT_BGR32:
|
||||
case AV_PIX_FMT_BGR32:
|
||||
return B_RGB32;
|
||||
case PIX_FMT_BGR565:
|
||||
case AV_PIX_FMT_BGR565:
|
||||
return B_RGB16;
|
||||
case PIX_FMT_BGR555:
|
||||
case AV_PIX_FMT_BGR555:
|
||||
return B_RGB15;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
PixelFormat
|
||||
AVPixelFormat
|
||||
colorspace_to_pixfmt(color_space format)
|
||||
{
|
||||
switch(format) {
|
||||
default:
|
||||
case B_NO_COLOR_SPACE:
|
||||
return PIX_FMT_NONE;
|
||||
return AV_PIX_FMT_NONE;
|
||||
|
||||
// NOTE: See pixfmt_to_colorspace() for what these are.
|
||||
case B_YUV420:
|
||||
return PIX_FMT_YUV420P;
|
||||
return AV_PIX_FMT_YUV420P;
|
||||
case B_YUV422:
|
||||
return PIX_FMT_YUV422P;
|
||||
return AV_PIX_FMT_YUV422P;
|
||||
case B_RGB24_BIG:
|
||||
return PIX_FMT_RGB24;
|
||||
return AV_PIX_FMT_RGB24;
|
||||
case B_RGB24:
|
||||
return PIX_FMT_BGR24;
|
||||
return AV_PIX_FMT_BGR24;
|
||||
case B_YUV444:
|
||||
return PIX_FMT_YUV444P;
|
||||
return AV_PIX_FMT_YUV444P;
|
||||
case B_RGBA32_BIG:
|
||||
case B_RGB32_BIG:
|
||||
return PIX_FMT_BGR32;
|
||||
return AV_PIX_FMT_BGR32;
|
||||
case B_YUV9:
|
||||
return PIX_FMT_YUV410P;
|
||||
return AV_PIX_FMT_YUV410P;
|
||||
case B_YUV12:
|
||||
return PIX_FMT_YUV411P;
|
||||
return AV_PIX_FMT_YUV411P;
|
||||
// TODO: YCbCr color spaces! These are not the same as YUV!
|
||||
case B_RGB16_BIG:
|
||||
return PIX_FMT_RGB565;
|
||||
return AV_PIX_FMT_RGB565;
|
||||
case B_RGB15_BIG:
|
||||
return PIX_FMT_RGB555;
|
||||
return AV_PIX_FMT_RGB555;
|
||||
case B_GRAY8:
|
||||
return PIX_FMT_GRAY8;
|
||||
return AV_PIX_FMT_GRAY8;
|
||||
case B_GRAY1:
|
||||
return PIX_FMT_MONOBLACK;
|
||||
return AV_PIX_FMT_MONOBLACK;
|
||||
case B_CMAP8:
|
||||
return PIX_FMT_PAL8;
|
||||
return AV_PIX_FMT_PAL8;
|
||||
case B_RGBA32:
|
||||
case B_RGB32:
|
||||
return PIX_FMT_RGB32;
|
||||
return AV_PIX_FMT_RGB32;
|
||||
case B_RGB16:
|
||||
return PIX_FMT_BGR565;
|
||||
return AV_PIX_FMT_BGR565;
|
||||
case B_RGB15:
|
||||
return PIX_FMT_BGR555;
|
||||
return AV_PIX_FMT_BGR555;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,11 @@ extern "C" {
|
||||
#include "libavcodec/avcodec.h"
|
||||
}
|
||||
|
||||
#if LIBAVCODEC_VERSION_INT < ((54 << 16) | (50 << 8))
|
||||
typedef PixelFormat AVPixelFormat;
|
||||
#endif
|
||||
|
||||
|
||||
// this function will be used by the wrapper to write into
|
||||
// the Media Kit provided buffer from the self-allocated ffmpeg codec buffer
|
||||
// it also will do some colorspace and planar/chunky conversions.
|
||||
@@ -38,12 +43,12 @@ typedef void (*gfx_convert_func) (AVFrame *in, AVFrame *out, int width, int heig
|
||||
|
||||
// this function will try to find the best colorspaces for both the ff-codec and
|
||||
// the Media Kit sides.
|
||||
gfx_convert_func resolve_colorspace(color_space cs, PixelFormat pixelFormat, int width, int height);
|
||||
gfx_convert_func resolve_colorspace(color_space cs, AVPixelFormat pixelFormat, int width, int height);
|
||||
|
||||
const char *pixfmt_to_string(int format);
|
||||
|
||||
color_space pixfmt_to_colorspace(int format);
|
||||
PixelFormat colorspace_to_pixfmt(color_space format);
|
||||
AVPixelFormat colorspace_to_pixfmt(color_space format);
|
||||
|
||||
void dump_ffframe_audio(AVFrame *frame, const char *name);
|
||||
void dump_ffframe_video(AVFrame *frame, const char *name);
|
||||
|
||||
@@ -25,7 +25,6 @@ HaikuSubInclude gradients ;
|
||||
HaikuSubInclude haiku3d ;
|
||||
HaikuSubInclude haikudepot ;
|
||||
HaikuSubInclude icon-o-matic ;
|
||||
HaikuSubInclude installedpackages ;
|
||||
HaikuSubInclude installer ;
|
||||
HaikuSubInclude launchbox ;
|
||||
HaikuSubInclude login ;
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
SubDir HAIKU_TOP src apps installedpackages ;
|
||||
|
||||
UsePrivateHeaders shared interface ;
|
||||
SubDirHdrs $(HAIKU_TOP) src apps packageinstaller ;
|
||||
|
||||
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src kits interface ] ;
|
||||
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src apps packageinstaller ] ;
|
||||
|
||||
Application InstalledPackages :
|
||||
InstalledPackageInfo.cpp
|
||||
main.cpp
|
||||
UninstallWindow.cpp
|
||||
UninstallView.cpp
|
||||
: be tracker translation [ TargetLibsupc++ ] localestub
|
||||
;
|
||||
|
||||
DoCatalogs InstalledPackages :
|
||||
x-vnd.Haiku-InstalledPackages
|
||||
:
|
||||
main.cpp
|
||||
UninstallView.cpp
|
||||
UninstallWindow.cpp
|
||||
;
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2007-2010, Haiku, Inc.
|
||||
* Distributed under the terms of the MIT license.
|
||||
*
|
||||
* Author:
|
||||
* Łukasz 'Sil2100' Zemczak <sil2100@vexillium.org>
|
||||
*/
|
||||
|
||||
|
||||
#include "UninstallWindow.h"
|
||||
|
||||
#include <Alert.h>
|
||||
#include <Application.h>
|
||||
#include <Autolock.h>
|
||||
#include <Catalog.h>
|
||||
#include <Entry.h>
|
||||
#include <Locale.h>
|
||||
#include <List.h>
|
||||
#include <TextView.h>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
#undef B_TRANSLATION_CONTEXT
|
||||
#define B_TRANSLATION_CONTEXT "UninstallApplication"
|
||||
|
||||
|
||||
class UninstallApplication : public BApplication {
|
||||
public:
|
||||
UninstallApplication();
|
||||
~UninstallApplication();
|
||||
|
||||
private:
|
||||
UninstallWindow* fWindow;
|
||||
};
|
||||
|
||||
|
||||
UninstallApplication::UninstallApplication()
|
||||
:
|
||||
BApplication("application/x-vnd.Haiku-InstalledPackages"),
|
||||
fWindow(NULL)
|
||||
{
|
||||
fWindow = new UninstallWindow();
|
||||
fWindow->Show();
|
||||
}
|
||||
|
||||
|
||||
UninstallApplication::~UninstallApplication()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
UninstallApplication app;
|
||||
app.Run();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,8 @@ Application LegacyPackageInstaller :
|
||||
PackageTextViewer.cpp
|
||||
PackageImageViewer.cpp
|
||||
InstalledPackageInfo.cpp
|
||||
UninstallWindow.cpp
|
||||
UninstallView.cpp
|
||||
: be localestub tracker translation
|
||||
[ BuildFeatureAttribute zlib : library ]
|
||||
[ TargetLibsupc++ ]
|
||||
@@ -38,4 +40,6 @@ DoCatalogs LegacyPackageInstaller :
|
||||
PackageTextViewer.cpp
|
||||
PackageView.cpp
|
||||
PackageWindow.cpp
|
||||
UninstallWindow.cpp
|
||||
UninstallView.cpp
|
||||
;
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <LayoutBuilder.h>
|
||||
|
||||
#include "PackageView.h"
|
||||
#include "main.h"
|
||||
|
||||
|
||||
#undef B_TRANSLATION_CONTEXT
|
||||
|
||||
@@ -14,14 +14,12 @@
|
||||
|
||||
struct entry_ref;
|
||||
|
||||
const uint32 P_WINDOW_QUIT = 'PiWq';
|
||||
|
||||
|
||||
class PackageWindow : public BWindow {
|
||||
public:
|
||||
PackageWindow(const entry_ref* ref);
|
||||
virtual ~PackageWindow();
|
||||
|
||||
|
||||
virtual void Quit();
|
||||
};
|
||||
|
||||
|
||||
+43
-22
@@ -20,9 +20,9 @@
|
||||
#include <Directory.h>
|
||||
#include <Entry.h>
|
||||
#include <File.h>
|
||||
#include <FilePanel.h>
|
||||
#include <FindDirectory.h>
|
||||
#include <GroupLayout.h>
|
||||
#include <GroupLayoutBuilder.h>
|
||||
#include <LayoutBuilder.h>
|
||||
#include <ListView.h>
|
||||
#include <Locale.h>
|
||||
#include <NodeMonitor.h>
|
||||
@@ -33,12 +33,15 @@
|
||||
#include <SpaceLayoutItem.h>
|
||||
#include <TextView.h>
|
||||
|
||||
#include "main.h"
|
||||
|
||||
|
||||
#undef B_TRANSLATION_CONTEXT
|
||||
#define B_TRANSLATION_CONTEXT "UninstallView"
|
||||
|
||||
|
||||
enum {
|
||||
P_MSG_INSTALL = 'umin',
|
||||
P_MSG_REMOVE = 'umrm',
|
||||
P_MSG_SELECT
|
||||
};
|
||||
@@ -80,7 +83,8 @@ private:
|
||||
|
||||
UninstallView::UninstallView()
|
||||
:
|
||||
BGroupView(B_VERTICAL)
|
||||
BGroupView(B_VERTICAL),
|
||||
fOpenPanel(new BFilePanel(B_OPEN_PANEL))
|
||||
{
|
||||
fNoPackageSelectedString = B_TRANSLATE("No package selected.");
|
||||
_InitView();
|
||||
@@ -98,7 +102,8 @@ void
|
||||
UninstallView::AttachedToWindow()
|
||||
{
|
||||
fAppList->SetTarget(this);
|
||||
fButton->SetTarget(this);
|
||||
fInstallButton->SetTarget(this);
|
||||
fRemoveButton->SetTarget(this);
|
||||
|
||||
_ReloadAppList();
|
||||
|
||||
@@ -205,7 +210,7 @@ UninstallView::MessageReceived(BMessage* msg)
|
||||
}
|
||||
case P_MSG_SELECT:
|
||||
{
|
||||
fButton->SetEnabled(false);
|
||||
fRemoveButton->SetEnabled(false);
|
||||
fDescription->SetText(fNoPackageSelectedString);
|
||||
|
||||
int32 index = fAppList->CurrentSelection();
|
||||
@@ -225,10 +230,15 @@ UninstallView::MessageReceived(BMessage* msg)
|
||||
item->GetVersion()) != B_OK)
|
||||
break;
|
||||
|
||||
fButton->SetEnabled(true);
|
||||
fRemoveButton->SetEnabled(true);
|
||||
fDescription->SetText(fCurrentSelection.Description());
|
||||
break;
|
||||
}
|
||||
case P_MSG_INSTALL:
|
||||
{
|
||||
fOpenPanel->Show();
|
||||
break;
|
||||
}
|
||||
case P_MSG_REMOVE:
|
||||
{
|
||||
if (fCurrentSelection.InitCheck() != B_OK)
|
||||
@@ -259,6 +269,7 @@ UninstallView::MessageReceived(BMessage* msg)
|
||||
}
|
||||
notify->SetFlags(notify->Flags() | B_CLOSE_ON_ESCAPE);
|
||||
notify->Go();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
BView::MessageReceived(msg);
|
||||
@@ -267,6 +278,13 @@ UninstallView::MessageReceived(BMessage* msg)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
UninstallView::RefsReceived(BMessage* message)
|
||||
{
|
||||
static_cast<PackageInstaller*>(be_app)->RefsReceived(message);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
UninstallView::_InitView()
|
||||
{
|
||||
@@ -287,33 +305,36 @@ UninstallView::_InitView()
|
||||
fDescription->SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
|
||||
fDescription->SetText(fNoPackageSelectedString);
|
||||
|
||||
fButton = new BButton("removal", B_TRANSLATE("Remove"),
|
||||
fInstallButton = new BButton("install", B_TRANSLATE("Install" B_UTF8_ELLIPSIS),
|
||||
new BMessage(P_MSG_INSTALL));
|
||||
fRemoveButton = new BButton("removal", B_TRANSLATE("Remove"),
|
||||
new BMessage(P_MSG_REMOVE));
|
||||
fButton->SetEnabled(false);
|
||||
fRemoveButton->SetEnabled(false);
|
||||
|
||||
const float spacing = be_control_look->DefaultItemSpacing();
|
||||
|
||||
BGroupLayoutBuilder builder(GroupLayout());
|
||||
builder.Add(scrollView)
|
||||
BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
|
||||
.Add(scrollView, 10)
|
||||
.Add(new BSeparatorView(B_HORIZONTAL, B_PLAIN_BORDER))
|
||||
.Add(BGroupLayoutBuilder(B_VERTICAL)
|
||||
.Add(BGroupLayoutBuilder(B_HORIZONTAL, 0)
|
||||
.AddGroup(B_VERTICAL)
|
||||
.SetInsets(spacing)
|
||||
.AddGroup(B_HORIZONTAL, 0)
|
||||
.Add(descriptionLabel)
|
||||
.AddGlue()
|
||||
)
|
||||
.Add(BGroupLayoutBuilder(B_HORIZONTAL, 0)
|
||||
.End()
|
||||
.AddGroup(B_HORIZONTAL, 0)
|
||||
.Add(BSpaceLayoutItem::CreateHorizontalStrut(10))
|
||||
.Add(fDescription)
|
||||
)
|
||||
.SetInsets(spacing, spacing, spacing, spacing)
|
||||
)
|
||||
.End()
|
||||
.End()
|
||||
.Add(new BSeparatorView(B_HORIZONTAL, B_PLAIN_BORDER))
|
||||
.Add(BGroupLayoutBuilder(B_HORIZONTAL)
|
||||
.AddGroup(B_HORIZONTAL)
|
||||
.SetInsets(spacing)
|
||||
.AddGlue()
|
||||
.Add(fButton)
|
||||
.SetInsets(spacing, spacing, spacing, spacing)
|
||||
)
|
||||
;
|
||||
.Add(fInstallButton)
|
||||
.Add(fRemoveButton)
|
||||
.End()
|
||||
.End();
|
||||
}
|
||||
|
||||
|
||||
+5
-1
@@ -18,6 +18,7 @@ class BButton;
|
||||
class BListView;
|
||||
class BTextView;
|
||||
class BScrollView;
|
||||
class BFilePanel;
|
||||
|
||||
|
||||
class UninstallView : public BGroupView {
|
||||
@@ -27,6 +28,7 @@ public:
|
||||
|
||||
virtual void AttachedToWindow();
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
virtual void RefsReceived(BMessage* message);
|
||||
|
||||
private:
|
||||
void _InitView();
|
||||
@@ -42,7 +44,9 @@ private:
|
||||
BPath fToPackages;
|
||||
BListView* fAppList;
|
||||
BTextView* fDescription;
|
||||
BButton* fButton;
|
||||
BButton* fInstallButton;
|
||||
BFilePanel* fOpenPanel;
|
||||
BButton* fRemoveButton;
|
||||
BScrollView* fDescScroll;
|
||||
InstalledPackageInfo fCurrentSelection;
|
||||
bool fWatcherRunning;
|
||||
+9
-1
@@ -13,6 +13,7 @@
|
||||
#include <GroupLayout.h>
|
||||
#include <Locale.h>
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#undef B_TRANSLATION_CONTEXT
|
||||
#define B_TRANSLATION_CONTEXT "UninstallWindow"
|
||||
@@ -21,10 +22,17 @@
|
||||
UninstallWindow::UninstallWindow()
|
||||
:
|
||||
BWindow(BRect(100, 100, 600, 300),
|
||||
B_TRANSLATE_SYSTEM_NAME("InstalledPackages"), B_TITLED_WINDOW,
|
||||
B_TRANSLATE("Installed packages"), B_TITLED_WINDOW,
|
||||
B_NOT_ZOOMABLE | B_QUIT_ON_WINDOW_CLOSE | B_AUTO_UPDATE_SIZE_LIMITS)
|
||||
{
|
||||
SetLayout(new BGroupLayout(B_HORIZONTAL));
|
||||
AddChild(new UninstallView());
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
UninstallWindow::Quit()
|
||||
{
|
||||
be_app->PostMessage(P_WINDOW_QUIT);
|
||||
BWindow::Quit();
|
||||
}
|
||||
+1
@@ -16,6 +16,7 @@
|
||||
class UninstallWindow : public BWindow {
|
||||
public:
|
||||
UninstallWindow();
|
||||
virtual void Quit();
|
||||
};
|
||||
|
||||
#endif // UNINSTALLWINDOW_H
|
||||
@@ -6,15 +6,16 @@
|
||||
* Łukasz 'Sil2100' Zemczak <sil2100@vexillium.org>
|
||||
*/
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#include "PackageWindow.h"
|
||||
#include "UninstallWindow.h"
|
||||
|
||||
#include <Alert.h>
|
||||
#include <Application.h>
|
||||
#include <Autolock.h>
|
||||
#include <Catalog.h>
|
||||
#include <Entry.h>
|
||||
#include <FilePanel.h>
|
||||
#include <List.h>
|
||||
#include <Locale.h>
|
||||
#include <Path.h>
|
||||
@@ -30,30 +31,9 @@
|
||||
bool gVerbose = false;
|
||||
|
||||
|
||||
class PackageInstaller : public BApplication {
|
||||
public:
|
||||
PackageInstaller();
|
||||
virtual ~PackageInstaller();
|
||||
|
||||
virtual void RefsReceived(BMessage* message);
|
||||
virtual void ArgvReceived(int32 argc, char** argv);
|
||||
virtual void ReadyToRun();
|
||||
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
|
||||
private:
|
||||
void _NewWindow(const entry_ref* ref);
|
||||
|
||||
private:
|
||||
BFilePanel* fOpenPanel;
|
||||
uint32 fWindowCount;
|
||||
};
|
||||
|
||||
|
||||
PackageInstaller::PackageInstaller()
|
||||
:
|
||||
BApplication("application/x-vnd.Haiku-PackageInstaller"),
|
||||
fOpenPanel(new BFilePanel(B_OPEN_PANEL)),
|
||||
fWindowCount(0)
|
||||
{
|
||||
}
|
||||
@@ -68,9 +48,11 @@ void
|
||||
PackageInstaller::ReadyToRun()
|
||||
{
|
||||
// We're ready to run - if no windows are yet visible, this means that
|
||||
// we should show a open panel
|
||||
if (fWindowCount == 0)
|
||||
fOpenPanel->Show();
|
||||
// we should show the UninstallWindow
|
||||
if (fWindowCount == 0) {
|
||||
(new UninstallWindow)->Show();
|
||||
fWindowCount++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +73,7 @@ PackageInstaller::ArgvReceived(int32 argc, char** argv)
|
||||
gVerbose = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
BPath path;
|
||||
if (path.SetTo(argv[i]) != B_OK) {
|
||||
fprintf(stderr, B_TRANSLATE("Error! \"%s\" is not a valid path.\n"),
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (c) 2007-2009, Haiku, Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT license.
|
||||
*
|
||||
* Author:
|
||||
* Łukasz 'Sil2100' Zemczak <sil2100@vexillium.org>
|
||||
*/
|
||||
#ifndef PACKAGEINSTALLER_MAIN_H
|
||||
#define PACKAGEINSTALLER_MAIN_H
|
||||
|
||||
#include <Application.h>
|
||||
|
||||
|
||||
const uint32 P_WINDOW_QUIT = 'PiWq';
|
||||
|
||||
|
||||
|
||||
class PackageInstaller : public BApplication {
|
||||
public:
|
||||
PackageInstaller();
|
||||
virtual ~PackageInstaller();
|
||||
|
||||
virtual void RefsReceived(BMessage* message);
|
||||
virtual void ArgvReceived(int32 argc, char** argv);
|
||||
virtual void ReadyToRun();
|
||||
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
|
||||
private:
|
||||
void _NewWindow(const entry_ref* ref);
|
||||
|
||||
private:
|
||||
uint32 fWindowCount;
|
||||
};
|
||||
|
||||
#endif // PACKAGEINSTALLER_MAIN_H
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Copyright 2016, Adrien Destugues, pulkomandy@pulkomandy.tk
|
||||
* Distributed under terms of the MIT license.
|
||||
*/
|
||||
|
||||
|
||||
#include "CustomRateWindow.h"
|
||||
|
||||
#include "SerialApp.h"
|
||||
|
||||
#include <Button.h>
|
||||
#include <Catalog.h>
|
||||
#include <GroupLayoutBuilder.h>
|
||||
#include <Spinner.h>
|
||||
|
||||
|
||||
#define B_TRANSLATION_CONTEXT "Custom baudrate window"
|
||||
|
||||
|
||||
static const uint32 kOkButtonMsg = 'ok';
|
||||
|
||||
CustomRateWindow::CustomRateWindow(int baudrate)
|
||||
: BWindow(BRect(100, 100, 200, 150), B_TRANSLATE("Custom baudrate"),
|
||||
B_FLOATING_WINDOW, B_NOT_ZOOMABLE | B_NOT_RESIZABLE | B_CLOSE_ON_ESCAPE
|
||||
| B_AUTO_UPDATE_SIZE_LIMITS)
|
||||
{
|
||||
BGroupLayout* layout = new BGroupLayout(B_HORIZONTAL);
|
||||
SetLayout(layout);
|
||||
|
||||
BGroupView* root = new BGroupView(B_VERTICAL);
|
||||
AddChild(root);
|
||||
|
||||
BGroupLayoutBuilder(root)
|
||||
.SetInsets(B_USE_WINDOW_SPACING, B_USE_WINDOW_SPACING,
|
||||
B_USE_WINDOW_SPACING, B_USE_WINDOW_SPACING)
|
||||
.AddGroup(B_HORIZONTAL)
|
||||
.Add(fSpinner = new BSpinner("spin", B_TRANSLATE("Baudrate:"), NULL))
|
||||
.End()
|
||||
.AddGroup(B_HORIZONTAL)
|
||||
.AddGlue()
|
||||
.Add(new BButton("ok", B_TRANSLATE("Ok"), new BMessage(kOkButtonMsg)))
|
||||
.Add(new BButton("cancel", B_TRANSLATE("Cancel"),
|
||||
new BMessage(B_QUIT_REQUESTED)))
|
||||
.End()
|
||||
.End();
|
||||
|
||||
fSpinner->SetMinValue(50);
|
||||
fSpinner->SetMaxValue(3000000);
|
||||
fSpinner->SetValue(baudrate);
|
||||
|
||||
CenterOnScreen();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
CustomRateWindow::MessageReceived(BMessage* message)
|
||||
{
|
||||
if (message->what == kOkButtonMsg)
|
||||
{
|
||||
BMessage* settings = new BMessage(kMsgSettings);
|
||||
settings->AddInt32("baudrate", fSpinner->Value());
|
||||
be_app->PostMessage(settings);
|
||||
Quit();
|
||||
return;
|
||||
}
|
||||
|
||||
BWindow::MessageReceived(message);
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright 2016, Adrien Destugues, pulkomandy@pulkomandy.tk
|
||||
* Distributed under terms of the MIT license.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef CUSTOMRATEWINDOW_H
|
||||
#define CUSTOMRATEWINDOW_H
|
||||
|
||||
|
||||
#include <Window.h>
|
||||
|
||||
|
||||
class BSpinner;
|
||||
|
||||
|
||||
class CustomRateWindow: public BWindow
|
||||
{
|
||||
public:
|
||||
CustomRateWindow(int baudrate);
|
||||
void MessageReceived(BMessage* message);
|
||||
|
||||
private:
|
||||
BSpinner* fSpinner;
|
||||
};
|
||||
|
||||
|
||||
#endif /* !CUSTOMRATEWINDOW_H */
|
||||
@@ -1,10 +1,12 @@
|
||||
SubDir HAIKU_TOP src apps serialconnect ;
|
||||
|
||||
SubDirSysHdrs [ FDirName $(HAIKU_TOP) src apps serialconnect libvterm include ] ;
|
||||
SubDirSysHdrs [ FDirName $(HAIKU_TOP) headers private interface ] ;
|
||||
|
||||
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src apps serialconnect libvterm src ] ;
|
||||
|
||||
Application SerialConnect :
|
||||
CustomRateWindow.cpp
|
||||
SerialApp.cpp
|
||||
SerialWindow.cpp
|
||||
TermView.cpp
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <FindDirectory.h>
|
||||
#include <Path.h>
|
||||
|
||||
#include "CustomRateWindow.h"
|
||||
#include "SerialWindow.h"
|
||||
|
||||
|
||||
@@ -146,6 +147,13 @@ void SerialApp::MessageReceived(BMessage* message)
|
||||
debugger("Invalid BMessage received");
|
||||
return;
|
||||
}
|
||||
case kMsgCustomBaudrate:
|
||||
{
|
||||
// open the custom baudrate selector window
|
||||
CustomRateWindow* window = new CustomRateWindow(fSerialPort.DataRate());
|
||||
window->Show();
|
||||
return;
|
||||
}
|
||||
case kMsgSettings:
|
||||
{
|
||||
int32 baudrate;
|
||||
|
||||
@@ -52,11 +52,12 @@ class SerialApp: public BApplication
|
||||
|
||||
|
||||
enum messageConstants {
|
||||
kMsgDataRead = 'dare',
|
||||
kMsgDataWrite = 'dawr',
|
||||
kMsgLogfile = 'logf',
|
||||
kMsgOpenPort = 'open',
|
||||
kMsgSettings = 'stty',
|
||||
kMsgCustomBaudrate = 'cust',
|
||||
kMsgDataRead = 'dard',
|
||||
kMsgDataWrite = 'dawr',
|
||||
kMsgLogfile = 'logf',
|
||||
kMsgOpenPort = 'open',
|
||||
kMsgSettings = 'stty',
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -174,6 +174,10 @@ SerialWindow::SerialWindow()
|
||||
fBaudrateMenu->AddItem(item);
|
||||
}
|
||||
|
||||
message = new BMessage(kMsgCustomBaudrate);
|
||||
BMenuItem* custom = new BMenuItem("custom" B_UTF8_ELLIPSIS, message);
|
||||
fBaudrateMenu->AddItem(custom);
|
||||
|
||||
fBaudrateMenu->SetTargetForItems(be_app);
|
||||
|
||||
message = new BMessage(kMsgSettings);
|
||||
@@ -351,13 +355,25 @@ void SerialWindow::MessageReceived(BMessage* message)
|
||||
}
|
||||
|
||||
if (message->FindInt32("baudrate", &baudrate) == B_OK) {
|
||||
for (int i = 0; i < fBaudrateMenu->CountItems(); i++) {
|
||||
BMenuItem* item = fBaudrateMenu->ItemAt(i);
|
||||
int32 code;
|
||||
int i;
|
||||
BMenuItem* item = NULL;
|
||||
for (i = 0; i < fBaudrateMenu->CountItems(); i++) {
|
||||
item = fBaudrateMenu->ItemAt(i);
|
||||
int32 code = 0;
|
||||
item->Message()->FindInt32("baudrate", &code);
|
||||
|
||||
if (baudrate == code)
|
||||
if (baudrate == code) {
|
||||
item->SetMarked(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (i == fBaudrateMenu->CountItems() && item != NULL) {
|
||||
// Rate was not found, mark it as "custom".
|
||||
// Since that is the last item in the menu, we still point
|
||||
// to it.
|
||||
item->SetMarked(true);
|
||||
item->Message()->SetInt32("baudrate", baudrate);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@ static const uint32 kMsgToggleBorder = 'tgBd';
|
||||
static const uint32 kMsgToggleAutoRaise = 'tgAR';
|
||||
static const uint32 kMsgToggleAlwaysOnTop = 'tgAT';
|
||||
static const uint32 kMsgToggleLiveInDeskbar = 'tgDb';
|
||||
static const uint32 kMsgToggleSwitchOnWheel = 'tgWh';
|
||||
|
||||
static const float kScreenBorderOffset = 10.0;
|
||||
|
||||
@@ -71,6 +72,7 @@ class WorkspacesSettings {
|
||||
bool AlwaysOnTop() const { return fAlwaysOnTop; }
|
||||
bool HasTitle() const { return fHasTitle; }
|
||||
bool HasBorder() const { return fHasBorder; }
|
||||
bool SwitchOnWheel() const { return fSwitchOnWheel; }
|
||||
|
||||
void UpdateFramesForScreen(BRect screenFrame);
|
||||
void UpdateScreenFrame();
|
||||
@@ -80,6 +82,7 @@ class WorkspacesSettings {
|
||||
void SetAlwaysOnTop(bool enable) { fAlwaysOnTop = enable; }
|
||||
void SetHasTitle(bool enable) { fHasTitle = enable; }
|
||||
void SetHasBorder(bool enable) { fHasBorder = enable; }
|
||||
void SetSwitchOnWheel(bool enable) { fSwitchOnWheel = enable; }
|
||||
|
||||
private:
|
||||
status_t _Open(BFile& file, int mode);
|
||||
@@ -90,6 +93,7 @@ class WorkspacesSettings {
|
||||
bool fAlwaysOnTop;
|
||||
bool fHasTitle;
|
||||
bool fHasBorder;
|
||||
bool fSwitchOnWheel;
|
||||
};
|
||||
|
||||
class WorkspacesView : public BView {
|
||||
@@ -136,10 +140,13 @@ class WorkspacesWindow : public BWindow {
|
||||
|
||||
void SetAutoRaise(bool enable);
|
||||
bool IsAutoRaising() const { return fAutoRaising; }
|
||||
void SetSwitchOnWheel(bool enable);
|
||||
bool SwitchOnWheel() const { return fSwitchOnWheel; }
|
||||
|
||||
private:
|
||||
WorkspacesSettings *fSettings;
|
||||
bool fAutoRaising;
|
||||
bool fSwitchOnWheel;
|
||||
};
|
||||
|
||||
class WorkspacesApp : public BApplication {
|
||||
@@ -163,7 +170,8 @@ WorkspacesSettings::WorkspacesSettings()
|
||||
fAutoRaising(false),
|
||||
fAlwaysOnTop(false),
|
||||
fHasTitle(true),
|
||||
fHasBorder(true)
|
||||
fHasBorder(true),
|
||||
fSwitchOnWheel(false)
|
||||
{
|
||||
UpdateScreenFrame();
|
||||
|
||||
@@ -185,6 +193,8 @@ WorkspacesSettings::WorkspacesSettings()
|
||||
fHasTitle = true;
|
||||
if (settings.FindBool("has border", &fHasBorder) != B_OK)
|
||||
fHasBorder = true;
|
||||
if (settings.FindBool("switch on wheel", &fSwitchOnWheel) != B_OK)
|
||||
fSwitchOnWheel = false;
|
||||
}
|
||||
} else {
|
||||
// try reading BeOS compatible settings
|
||||
@@ -266,7 +276,8 @@ WorkspacesSettings::~WorkspacesSettings()
|
||||
&& settings.AddBool("auto-raise", fAutoRaising) == B_OK
|
||||
&& settings.AddBool("always on top", fAlwaysOnTop) == B_OK
|
||||
&& settings.AddBool("has title", fHasTitle) == B_OK
|
||||
&& settings.AddBool("has border", fHasBorder) == B_OK)
|
||||
&& settings.AddBool("has border", fHasBorder) == B_OK
|
||||
&& settings.AddBool("switch on wheel", fSwitchOnWheel) == B_OK)
|
||||
settings.Flatten(&file);
|
||||
}
|
||||
|
||||
@@ -507,6 +518,11 @@ WorkspacesView::MessageReceived(BMessage* message)
|
||||
|
||||
case B_MOUSE_WHEEL_CHANGED:
|
||||
{
|
||||
WorkspacesWindow *window;
|
||||
window = dynamic_cast<WorkspacesWindow *>(Window());
|
||||
if (window && !window->SwitchOnWheel())
|
||||
break;
|
||||
|
||||
float dy = message->FindFloat("be:wheel_delta_y");
|
||||
if (dy > 0.1)
|
||||
activate_workspace(current_workspace() + 1);
|
||||
@@ -588,6 +604,11 @@ WorkspacesView::MouseDown(BPoint where)
|
||||
// inside Workspaces app
|
||||
BMenuItem* item;
|
||||
|
||||
menu->AddSeparatorItem();
|
||||
menu->AddItem(item = new BMenuItem(B_TRANSLATE("Switch on mouse wheel"),
|
||||
new BMessage(kMsgToggleSwitchOnWheel)));
|
||||
item->SetMarked(window->SwitchOnWheel());
|
||||
|
||||
menu->AddSeparatorItem();
|
||||
menu->AddItem(item = new BMenuItem(B_TRANSLATE("Show window tab"),
|
||||
new BMessage(kMsgToggleTitle)));
|
||||
@@ -654,9 +675,11 @@ WorkspacesWindow::WorkspacesWindow(WorkspacesSettings *settings)
|
||||
:
|
||||
BWindow(settings->WindowFrame(), B_TRANSLATE_SYSTEM_NAME("Workspaces"),
|
||||
B_TITLED_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL,
|
||||
B_AVOID_FRONT | B_WILL_ACCEPT_FIRST_CLICK, B_ALL_WORKSPACES),
|
||||
fSettings(settings),
|
||||
fAutoRaising(false)
|
||||
B_AVOID_FRONT | B_WILL_ACCEPT_FIRST_CLICK | B_CLOSE_ON_ESCAPE,
|
||||
B_ALL_WORKSPACES),
|
||||
fSettings(settings),
|
||||
fAutoRaising(false),
|
||||
fSwitchOnWheel(false)
|
||||
{
|
||||
AddChild(new WorkspacesView(Bounds()));
|
||||
|
||||
@@ -669,6 +692,8 @@ WorkspacesWindow::WorkspacesWindow(WorkspacesSettings *settings)
|
||||
SetFeel(B_FLOATING_ALL_WINDOW_FEEL);
|
||||
else
|
||||
SetAutoRaise(fSettings->AutoRaising());
|
||||
|
||||
SetSwitchOnWheel(fSettings->SwitchOnWheel());
|
||||
}
|
||||
|
||||
|
||||
@@ -836,6 +861,10 @@ WorkspacesWindow::MessageReceived(BMessage *message)
|
||||
break;
|
||||
}
|
||||
|
||||
case kMsgToggleSwitchOnWheel:
|
||||
SetSwitchOnWheel(!SwitchOnWheel());
|
||||
break;
|
||||
|
||||
default:
|
||||
BWindow::MessageReceived(message);
|
||||
break;
|
||||
@@ -867,6 +896,17 @@ WorkspacesWindow::SetAutoRaise(bool enable)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WorkspacesWindow::SetSwitchOnWheel(bool enable)
|
||||
{
|
||||
if (enable == fSwitchOnWheel)
|
||||
return;
|
||||
|
||||
fSwitchOnWheel = enable;
|
||||
fSettings->SetSwitchOnWheel(enable);
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
|
||||
+45
-36
@@ -6,17 +6,18 @@
|
||||
* Santiago (Jacques) Lema
|
||||
* Jérôme Duval, jerome.duval@gmail.com
|
||||
* Augustin Cavalier, <waddlesplash>
|
||||
* Alexander G. M. Smith <agmsmith@ncf.ca>
|
||||
*/
|
||||
|
||||
|
||||
#include <Application.h>
|
||||
#include <String.h>
|
||||
#include <E-mail.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <Application.h>
|
||||
#include <E-mail.h>
|
||||
#include <String.h>
|
||||
|
||||
#define APP_SIG "application/x-vnd.Haiku-mail_utils-mail"
|
||||
#define APP_SIG "application/x-vnd.Haiku-mail_utils-mail"
|
||||
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
@@ -28,17 +29,15 @@ int main(int argc, char* argv[])
|
||||
fprintf(stdout,"This program can only send mail, not read it.\n");
|
||||
fprintf(stdout,"usage: %s [-v] [-s subject] [-c cc-addr] "
|
||||
"[-b bcc-addr] to-addr ...\n", argv[0]);
|
||||
fflush(stdout);
|
||||
return 0;
|
||||
}
|
||||
|
||||
char *subject = "No title";
|
||||
char *subject = "No subject";
|
||||
char *cc = "";
|
||||
char *bcc = "";
|
||||
BString to = "";
|
||||
BString body = "";
|
||||
BString to;
|
||||
bool verbose = false;
|
||||
|
||||
bool verbose =false;
|
||||
// Parse arguments
|
||||
for (int i = 1; i < argc; i++) {
|
||||
if (strcmp(argv[i], "-v") == 0)
|
||||
@@ -53,51 +52,60 @@ int main(int argc, char* argv[])
|
||||
bcc = argv[i+1];
|
||||
i++;
|
||||
} else {
|
||||
if (to.Length() > 0)
|
||||
to.Append(", ");
|
||||
to.Append(argv[i]);
|
||||
if (i < argc - 1)
|
||||
to.Append(" ");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (verbose) {
|
||||
fprintf(stdout, "\n");
|
||||
fprintf(stdout, "To:\t<%s> \n", to.String());
|
||||
fprintf(stdout, "Cc:\t<%s> \n", cc);
|
||||
fprintf(stdout, "Bcc:\t<%s> \n", bcc);
|
||||
fprintf(stdout, "Subj:\t<%s> \n", subject);
|
||||
fprintf(stdout, "Body:\t<%s> \n", body.String());
|
||||
fprintf(stdout, "\n");
|
||||
fprintf(stdout, "To:\t%s\n", to.String());
|
||||
fprintf(stdout, "Cc:\t%s\n", cc);
|
||||
fprintf(stdout, "Bcc:\t%s\n", bcc);
|
||||
fprintf(stdout, "Subj:\t%s\n", subject);
|
||||
fprintf(stdout, "\n");
|
||||
}
|
||||
|
||||
// Check if recipients are valid
|
||||
if (strcmp(to.String(), "") == 0 &&
|
||||
strcmp(cc, "") == 0 &&
|
||||
strcmp(bcc, "") == 0) {
|
||||
if (strcmp(to.String(), "") == 0 &&
|
||||
strcmp(cc, "") == 0 &&
|
||||
strcmp(bcc, "") == 0) {
|
||||
|
||||
fprintf(stdout, "[Error]: You must specify at least one recipient "
|
||||
fprintf(stderr, "[Error]: You must specify at least one recipient "
|
||||
"in to, cc or bcc fields.\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Read each line until we get a single dot "." on a line
|
||||
bool isTerminal = isatty(STDIN_FILENO) != 0;
|
||||
if (isTerminal) {
|
||||
fprintf(stderr, "Now type your message.\n"
|
||||
"Type '.' alone on a line to end your text and send it.\n");
|
||||
}
|
||||
|
||||
BString body;
|
||||
char line[32768] = "";
|
||||
|
||||
printf("Now type your message.\nType '.' alone on a line to send it.\n");
|
||||
// Read each line and collect the body text until we get an end of text
|
||||
// marker. That's a single dot "." on a line typed in by the user,
|
||||
// or end of file when reading a file.
|
||||
do {
|
||||
gets(line);
|
||||
|
||||
if (strcmp(line, ".") != 0) {
|
||||
body.Append(line).Append("\n");
|
||||
if (fgets(line, sizeof(line), stdin) == NULL) {
|
||||
// End of file or an error happened, just send collected body text.
|
||||
break;
|
||||
}
|
||||
// fprintf(stdout,"Line: %s \n",line);
|
||||
} while (strcmp(line, ".") != 0);
|
||||
|
||||
if (isTerminal && strcmp(line, ".\n") == 0)
|
||||
break;
|
||||
|
||||
body.Append(line);
|
||||
} while (true);
|
||||
|
||||
if (verbose)
|
||||
fprintf(stdout, "\nBody:\n%s\n", body.String());
|
||||
fprintf(stdout, "\nBody:\n%s\n", body.String());
|
||||
|
||||
if (verbose)
|
||||
fprintf(stdout, "\nSending E-mail...\n");
|
||||
fprintf(stderr, "Sending E-mail...\n");
|
||||
fflush(stdout);
|
||||
|
||||
BMailMessage mail;
|
||||
@@ -105,14 +113,15 @@ int main(int argc, char* argv[])
|
||||
mail.AddHeaderField(B_MAIL_CC, cc);
|
||||
mail.AddHeaderField(B_MAIL_BCC, bcc);
|
||||
mail.AddHeaderField(B_MAIL_SUBJECT, subject);
|
||||
mail.AddContent(body.String(), strlen(body.String()));
|
||||
mail.AddContent(body.String(), body.Length());
|
||||
status_t result = mail.Send();
|
||||
|
||||
if (result == B_OK) {
|
||||
fprintf(stdout, "\nMessage was sent successfully.\n");
|
||||
if (verbose)
|
||||
fprintf(stderr, "Message was sent successfully.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
fprintf(stdout, "Message failed to send: %s", strerror(result));
|
||||
fprintf(stderr, "Message failed to send: %s\n", strerror(result));
|
||||
return result;
|
||||
}
|
||||
|
||||
+66
-11
@@ -1,8 +1,8 @@
|
||||
#
|
||||
# List of PCI ID's
|
||||
#
|
||||
# Version: 2016.02.17
|
||||
# Date: 2016-02-17 03:15:02
|
||||
# Version: 2016.02.27
|
||||
# Date: 2016-02-27 03:15:01
|
||||
#
|
||||
# Maintained by Albert Pool, Martin Mares, and other volunteers from
|
||||
# the PCI ID Project at http://pci-ids.ucw.cz/.
|
||||
@@ -486,6 +486,8 @@
|
||||
0085 SAS2208 PCI-Express Fusion-MPT SAS-2
|
||||
0086 SAS2308 PCI-Express Fusion-MPT SAS-2
|
||||
0087 SAS2308 PCI-Express Fusion-MPT SAS-2
|
||||
1000 3020 9207-8i SAS2.1 HBA
|
||||
1000 3040 9207-8e SAS2.1 HBA
|
||||
1590 0044 H220i
|
||||
008f 53c875J
|
||||
1092 8000 FirePort 40 SCSI Controller
|
||||
@@ -2129,7 +2131,7 @@
|
||||
1002 0310 FirePro S7000
|
||||
1002 0420 Radeon Sky 500
|
||||
6809 Pitcairn LE GL [FirePro W5000]
|
||||
6810 Curacao XT [Radeon R7 370 / R9 270X/370 OEM]
|
||||
6810 Curacao XT / Trinidad XT [Radeon R7 370 / R9 270X/370X]
|
||||
148c 0908 Radeon R9 370 OEM
|
||||
1682 7370 Radeon R7 370
|
||||
6811 Curacao PRO [Radeon R7 370 / R9 270/370 OEM]
|
||||
@@ -2769,13 +2771,32 @@
|
||||
174b e180 Radeon HD 7350
|
||||
17af 3015 Radeon HD 7350
|
||||
68fe Cedar LE
|
||||
6900 Topaz XT [Radeon R7 M260/M265]
|
||||
1028 0640 Radeon R7 M265
|
||||
6900 Topaz XT [Radeon R7 M260/M265 / M340/M360]
|
||||
1025 1056 Radeon R7 M360 / R8 M365DX
|
||||
1028 0640 Radeon R7 M260/M265
|
||||
1028 0643 Radeon R7 M260/M265
|
||||
1028 067f Radeon R7 M260
|
||||
1028 130a Radeon R7 M260
|
||||
103c 2263 Radeon R7 M260
|
||||
103c 2269 Radeon R7 M260
|
||||
103c 22c6 Radeon R7 M260
|
||||
103c 22c8 Radeon R7 M260
|
||||
103c 808c Radeon R7 M260
|
||||
103c 8099 Radeon R7 M360
|
||||
103c 80b5 Radeon R7 M360
|
||||
103c 80b9 Radeon R7 M360
|
||||
103c 811c Radeon R7 M340
|
||||
10cf 1906 Radeon R7 M260
|
||||
1170 9979 Radeon R7 M360
|
||||
1179 f903 Radeon R7 M260
|
||||
1179 f922 Radeon R7 M260
|
||||
1179 f923 Radeon R7 M260
|
||||
1179 f934 Radeon R7 M260
|
||||
17aa 3822 Radeon R7 M360
|
||||
17aa 3824 Radeon R7 M360
|
||||
17aa 5021 Radeon R7 M260
|
||||
6901 Topaz PRO [Radeon R5 M255]
|
||||
103c 1318 Radeon R6 M255DX
|
||||
6921 Amethyst XT [Radeon R9 M295X]
|
||||
6929 Tonga XT GL [FirePro S7150]
|
||||
692b Tonga PRO GL [FirePro W7100]
|
||||
@@ -10508,6 +10529,7 @@
|
||||
f0e5 Zephyr LightPulse Fibre Channel Host Adapter
|
||||
f0f5 Neptune LightPulse Fibre Channel Host Adapter
|
||||
f100 Saturn-X: LightPulse Fibre Channel Host Adapter
|
||||
103c 3282 8Gb Dual-port PCI-e FC HBA
|
||||
f111 Saturn-X LightPulse Fibre Channel Host Adapter
|
||||
f112 Saturn-X LightPulse Fibre Channel Host Adapter
|
||||
f180 LPSe12002 EmulexSecure Fibre Channel Adapter
|
||||
@@ -17588,8 +17610,17 @@
|
||||
1014 MT27700 Family [ConnectX-4 Virtual Function]
|
||||
1015 MT27710 Family [ConnectX-4 Lx]
|
||||
1016 MT27710 Family [ConnectX-4 Lx Virtual Function]
|
||||
1017 MT28800 Family [ConnectX-5]
|
||||
1017 MT27800 Family [ConnectX-5, PCIe 3.0]
|
||||
1018 MT28800 Family [ConnectX-5 Virtual Function]
|
||||
1019 MT28800 Family [ConnectX-5, PCIe 4.0]
|
||||
101a MT28830
|
||||
101b MT28831
|
||||
101c MT28840
|
||||
101d MT28841
|
||||
101e MT28850
|
||||
101f MT28851
|
||||
1020 MT28860
|
||||
1021 MT28861
|
||||
5274 MT21108 InfiniBridge
|
||||
5a44 MT23108 InfiniHost
|
||||
5a45 MT23108 [Infinihost HCA Flash Recovery]
|
||||
@@ -17618,6 +17649,12 @@
|
||||
103c 3313 NC542m Dual Port Flex-10 10GbE BLc Adapter
|
||||
676e MT26478 [ConnectX EN 40GigE, PCIe 2.0 5GT/s]
|
||||
6778 MT26488 [ConnectX VPI PCIe 2.0 5GT/s - IB DDR / 10GigE Virtualization+]
|
||||
7101 NPS-400 configuration and management interface
|
||||
7102 NPS-400 network interface PF
|
||||
7103 NPS-400 network interface VF
|
||||
7121 NPS-600 configuration and management interface
|
||||
7122 NPS-600 network interface PF
|
||||
7123 NPS-600 network interface VF
|
||||
# SwitchX-2, 40GbE switch
|
||||
c738 MT51136
|
||||
caf1 ConnectX-4 CAPI Function
|
||||
@@ -18635,6 +18672,7 @@
|
||||
13d1 abe3 miniPCI Pluscom 802.11 a/b/g
|
||||
1458 e933 GN-WI01GS
|
||||
1458 e934 GN-WP01GS
|
||||
1462 b833 MP54G5 (MS-6833B)
|
||||
1737 0055 WMP54G v4.1
|
||||
1799 700e F5D7000 v6000 Wireless G Desktop Card
|
||||
1799 701e F5D7010 v6000 Wireless G Notebook Card
|
||||
@@ -18874,6 +18912,7 @@
|
||||
0135 NT20E2-PTP Network Adapter 2x10Gb
|
||||
0145 NT40E3-4-PTP Network Adapter 4x10Gb
|
||||
0155 NT100E3-1-PTP Network Adapter 1x100Gb
|
||||
0165 NT80E3-2-PTP Network Adapter 2x40Gb
|
||||
0175 NT20E3-2-PTP Network Adapter 2x10Gb
|
||||
18f6 NextIO
|
||||
1000 [Nexsis] Switch Virtual P2P PCIe Bridge
|
||||
@@ -21967,6 +22006,7 @@
|
||||
150f 82580 Gigabit Fiber Network Connection
|
||||
1510 82580 Gigabit Backplane Connection
|
||||
1511 82580 Gigabit SFP Connection
|
||||
1513 CV82524 Thunderbolt Controller [Light Ridge 4C 2010]
|
||||
1514 Ethernet X520 10GbE Dual Port KX4 Mezz
|
||||
8086 000b Ethernet X520 10GbE Dual Port KX4 Mezz
|
||||
1515 X540 Ethernet Controller Virtual Function
|
||||
@@ -21976,6 +22016,8 @@
|
||||
1517 82599ES 10 Gigabit Network Connection
|
||||
1137 006a UCS CNA M61KR-I Intel Converged Network Adapter
|
||||
1518 82576NS SerDes Gigabit Network Connection
|
||||
151a DSL2310 Thunderbolt Controller [Eagle Ridge 2C 2011]
|
||||
151b CVL2510 Thunderbolt Controller [Light Peak 2C 2010]
|
||||
151c 82599 10 Gigabit TN Network Connection
|
||||
108e 7b13 Dual 10GBASE-T LP
|
||||
1520 I350 Ethernet Controller Virtual Function
|
||||
@@ -22071,8 +22113,9 @@
|
||||
103c 1909 ZBook 15
|
||||
17aa 220e ThinkPad T440p
|
||||
153b Ethernet Connection I217-V
|
||||
1547 DSL3510 Thunderbolt Port [Cactus Ridge]
|
||||
1549 DSL3510 Thunderbolt Controller [Cactus Ridge]
|
||||
1547 DSL3510 Thunderbolt Controller [Cactus Ridge 4C 2012]
|
||||
1548 DSL3310 Thunderbolt Controller [Cactus Ridge 2C 2012]
|
||||
1549 DSL2210 Thunderbolt Controller [Port Ridge 1C 2011]
|
||||
154a Ethernet Server Adapter X520-4
|
||||
8086 011a Ethernet Converged Network Adapter X520-4
|
||||
8086 011b Ethernet Converged Network Adapter X520-4
|
||||
@@ -22098,8 +22141,14 @@
|
||||
1563 Ethernet Controller 10G X550T
|
||||
8086 0001 Ethernet Converged Network Adapter X550-T2
|
||||
8086 001a Ethernet Converged Network Adapter X550-T2
|
||||
156c DSL5520 Thunderbolt [Falcon Ridge]
|
||||
156d DSL5520 Thunderbolt [Falcon Ridge]
|
||||
1566 DSL4410 Thunderbolt NHI [Redwood Ridge 2C 2013]
|
||||
1567 DSL4410 Thunderbolt Bridge [Redwood Ridge 2C 2013]
|
||||
1568 DSL4510 Thunderbolt NHI [Redwood Ridge 4C 2013]
|
||||
1569 DSL4510 Thunderbolt Bridge [Redwood Ridge 4C 2013]
|
||||
156a DSL5320 Thunderbolt 2 NHI [Falcon Ridge 2C 2013]
|
||||
156b DSL5320 Thunderbolt 2 Bridge [Falcon Ridge 2C 2013]
|
||||
156c DSL5520 Thunderbolt 2 NHI [Falcon Ridge 4C 2013]
|
||||
156d DSL5520 Thunderbolt 2 Bridge [Falcon Ridge 4C 2013]
|
||||
156f Ethernet Connection I219-LM
|
||||
1570 Ethernet Connection I219-V
|
||||
1571 XL710/X710 Virtual Function
|
||||
@@ -22128,9 +22177,14 @@
|
||||
8086 000d Ethernet Controller X710 for 10GbE SFP+
|
||||
8086 4005 Ethernet Controller XL710 for 10 Gigabit SFP+
|
||||
8086 4006 Ethernet Controller X710 for 10GbE SFP+
|
||||
1578 DSL6540 Thunderbolt [Alpine Ridge]
|
||||
1575 DSL5110 Thunderbolt NHI [Falcon Ridge LP 2014]
|
||||
1576 DSL5110 Thunderbolt Bridge [Falcon Ridge LP 2014]
|
||||
1577 DSL6540 Thunderbolt 3 NHI [Alpine Ridge 4C 2015]
|
||||
1578 DSL6540 Thunderbolt 3 Bridge [Alpine Ridge 4C 2015]
|
||||
157b I210 Gigabit Network Connection
|
||||
157c I210 Gigabit Backplane Connection
|
||||
157d DSL6340 Thunderbolt 3 NHI [Alpine Ridge 2C 2015]
|
||||
157e DSL6340 Thunderbolt 3 Bridge [Alpine Ridge 2C 2015]
|
||||
1580 Ethernet Controller XL710 for 40GbE backplane
|
||||
1581 Ethernet Controller X710 for 10GbE backplane
|
||||
1028 0000 Ethernet 10G X710-k bNDC
|
||||
@@ -26598,6 +26652,7 @@
|
||||
9c23 8 Series CHAP Counters
|
||||
9c24 8 Series Thermal
|
||||
9c26 8 Series USB EHCI #1
|
||||
17aa 220c T440s
|
||||
17aa 2214 ThinkPad X240
|
||||
9c2d 8 Series USB EHCI #2
|
||||
9c31 8 Series USB xHCI HC
|
||||
|
||||
@@ -108,6 +108,7 @@ static const rgb_color _kDefaultColors[kColorWhichCount] = {
|
||||
{102, 152, 203, 255}, // B_LINK_HOVER_COLOR
|
||||
{145, 112, 155, 255}, // B_LINK_VISITED_COLOR
|
||||
{121, 142, 203, 255}, // B_LINK_ACTIVE_COLOR
|
||||
{50, 150, 255, 255}, // B_STATUS_BAR_COLOR
|
||||
// 100...
|
||||
{46, 204, 64, 255}, // B_SUCCESS_COLOR
|
||||
{255, 65, 54, 255}, // B_FAILURE_COLOR
|
||||
@@ -153,6 +154,7 @@ static const char* kColorNames[kColorWhichCount] = {
|
||||
"B_LINK_HOVER_COLOR",
|
||||
"B_LINK_VISITED_COLOR",
|
||||
"B_LINK_ACTIVE_COLOR",
|
||||
"B_STATUS_BAR_COLOR",
|
||||
// 100...
|
||||
"B_SUCCESS_COLOR",
|
||||
"B_FAILURE_COLOR",
|
||||
|
||||
@@ -675,7 +675,7 @@ PicturePlayer::_Play(const picture_player_callbacks& callbacks, void* userData,
|
||||
|
||||
while (pictureReader.Remaining() > 0) {
|
||||
const picture_data_entry_header* header;
|
||||
const uint8* opData;
|
||||
const uint8* opData = NULL;
|
||||
if (!pictureReader.Get(header)
|
||||
|| !pictureReader.Get(opData, header->size)) {
|
||||
return B_BAD_DATA;
|
||||
|
||||
@@ -43,7 +43,7 @@ BStatusBar::BStatusBar(BRect frame, const char *name, const char *label,
|
||||
BStatusBar::BStatusBar(const char *name, const char *label,
|
||||
const char *trailingLabel)
|
||||
:
|
||||
BView(BRect(0, 0, -1, -1), name, B_FOLLOW_LEFT | B_FOLLOW_TOP,
|
||||
BView(BRect(0, 0, -1, -1), name, B_FOLLOW_LEFT | B_FOLLOW_TOP,
|
||||
B_WILL_DRAW | B_SUPPORTS_LAYOUT),
|
||||
fLabel(label),
|
||||
fTrailingLabel(trailingLabel)
|
||||
@@ -148,7 +148,7 @@ BStatusBar::AttachedToWindow()
|
||||
fTextDivider = Bounds().Width();
|
||||
|
||||
if ((fInternalFlags & kCustomBarColor) == 0)
|
||||
fBarColor = ui_color(B_CONTROL_MARK_COLOR);
|
||||
fBarColor = ui_color(B_STATUS_BAR_COLOR);
|
||||
}
|
||||
|
||||
|
||||
@@ -234,7 +234,7 @@ BStatusBar::MaxSize()
|
||||
float width, height;
|
||||
GetPreferredSize(&width, &height);
|
||||
|
||||
return BLayoutUtils::ComposeSize(ExplicitMaxSize(),
|
||||
return BLayoutUtils::ComposeSize(ExplicitMaxSize(),
|
||||
BSize(B_SIZE_UNLIMITED, height));
|
||||
}
|
||||
|
||||
@@ -419,7 +419,7 @@ BStatusBar::MessageReceived(BMessage *message)
|
||||
break;
|
||||
}
|
||||
|
||||
case B_RESET_STATUS_BAR:
|
||||
case B_RESET_STATUS_BAR:
|
||||
{
|
||||
const char *label = NULL, *trailing_label = NULL;
|
||||
|
||||
@@ -435,7 +435,7 @@ BStatusBar::MessageReceived(BMessage *message)
|
||||
{
|
||||
// Change the bar color IF we don't have an application-set color.
|
||||
if ((fInternalFlags & kCustomBarColor) == 0) {
|
||||
message->FindColor(ui_color_name(B_CONTROL_MARK_COLOR),
|
||||
message->FindColor(ui_color_name(B_STATUS_BAR_COLOR),
|
||||
&fBarColor);
|
||||
}
|
||||
|
||||
@@ -523,7 +523,7 @@ void
|
||||
BStatusBar::SetMaxValue(float max)
|
||||
{
|
||||
// R5 and/or Zeta's SetMaxValue does not trigger an invalidate here.
|
||||
// this is probably not ideal behavior, but it does break apps in some cases
|
||||
// this is probably not ideal behavior, but it does break apps in some cases
|
||||
// as observed with SpaceMonitor.
|
||||
// TODO: revisit this when we break binary compatibility
|
||||
fMax = max;
|
||||
|
||||
@@ -709,7 +709,40 @@ ExpressionParser::_ParseFactorial(MAPM value)
|
||||
if (fTokenizer->NextToken().type == TOKEN_FACTORIAL) {
|
||||
fTokenizer->RewindToken();
|
||||
_EatToken(TOKEN_FACTORIAL);
|
||||
return value.factorial();
|
||||
if (value < 1000)
|
||||
return value.factorial();
|
||||
else {
|
||||
// Use Stirling's approximation (9 term expansion)
|
||||
// http://en.wikipedia.org/wiki/Stirling%27s_approximation
|
||||
// http://www.wolframalpha.com/input/?i=stirling%27s+series
|
||||
// all constants must fit in a signed long for MAPM
|
||||
// (LONG_MAX = 2147483647)
|
||||
return value.pow(value) / value.exp()
|
||||
* (MAPM(2) * MAPM(MM_PI) * value).sqrt()
|
||||
* (MAPM(1) + (MAPM(1) / (MAPM(12) * value))
|
||||
+ (MAPM(1) / (MAPM(288) * value.pow(2)))
|
||||
- (MAPM(139) / (MAPM(51840) * value.pow(3)))
|
||||
- (MAPM(571) / (MAPM(2488320) * value.pow(4)))
|
||||
+ (MAPM(163879) / (MAPM(209018880) * value.pow(5)))
|
||||
// 2147483647 * 35 + 84869155 = 75246796800
|
||||
+ (MAPM(5246819) / ((MAPM(2147483647) * MAPM(35)
|
||||
+ MAPM(84869155)) * value.pow(6)))
|
||||
// 2147483647 * 420 + 1018429860 = 902961561600
|
||||
- (MAPM(534703531) / ((MAPM(2147483647) * MAPM(420)
|
||||
+ MAPM(1018429860)) * value.pow(7)))
|
||||
// 2147483647 * 2 + 188163965 = 4483131259
|
||||
// 2147483647 * 40366 + 985018798 = 86686309913600
|
||||
- ((MAPM(2147483647) * MAPM(2) + MAPM(188163965))
|
||||
/ ((MAPM(2147483647) * MAPM(40366) + MAPM(985018798))
|
||||
* value.pow(8)))
|
||||
// 2147483647 * 201287 + 1380758682 = 432261921612371
|
||||
// 2147483647 * 239771232 + 1145740896
|
||||
// = 514904800886784000
|
||||
+ ((MAPM(2147483647) * MAPM(201287) + MAPM(1380758682))
|
||||
/ ((MAPM(2147483647) * MAPM(239771232)
|
||||
+ MAPM(1145740896))
|
||||
* value.pow(9))));
|
||||
}
|
||||
}
|
||||
|
||||
fTokenizer->RewindToken();
|
||||
|
||||
@@ -716,6 +716,7 @@ TFilePanel::Init(const BMessage*)
|
||||
fButtonText.SetTo(B_TRANSLATE("Open"));
|
||||
|
||||
// Add PoseView
|
||||
PoseView()->SetName("ActualPoseView");
|
||||
fBorderedView->SetName("PoseView");
|
||||
fBorderedView->SetResizingMode(B_FOLLOW_ALL);
|
||||
fBorderedView->EnableBorderHighlight(true);
|
||||
@@ -918,6 +919,7 @@ TFilePanel::RestoreState()
|
||||
// They don't need to, because resizing "PoseView" (really the BorderedView)
|
||||
// will resize the BTitleView as well. So just create a dummy view here
|
||||
// so that they don't get NULL when trying to find the view.
|
||||
fPoseView->TitleView()->SetName("ActualTitleView");
|
||||
BView* dummyTitleView = new BView(BRect(), "TitleView", B_FOLLOW_NONE, 0);
|
||||
fBackView->AddChild(dummyTitleView);
|
||||
dummyTitleView->Hide();
|
||||
|
||||
@@ -219,7 +219,7 @@ CopySelectionListToEntryRefList(const PoseList* original,
|
||||
|
||||
BPoseView::BPoseView(Model* model, uint32 viewMode)
|
||||
:
|
||||
BView("BPoseView", B_WILL_DRAW | B_PULSE_NEEDED),
|
||||
BView("PoseView", B_WILL_DRAW | B_PULSE_NEEDED),
|
||||
fIsDrawingSelectionRect(false),
|
||||
fHScrollBar(NULL),
|
||||
fVScrollBar(NULL),
|
||||
|
||||
@@ -92,7 +92,7 @@ _DrawOutline(BView* view, BRect where)
|
||||
|
||||
BTitleView::BTitleView(BPoseView* view)
|
||||
:
|
||||
BView("BTitleView", B_WILL_DRAW),
|
||||
BView("TitleView", B_WILL_DRAW),
|
||||
fPoseView(view),
|
||||
fTitleList(10, true),
|
||||
fHorizontalResizeCursor(B_CURSOR_ID_RESIZE_EAST_WEST),
|
||||
|
||||
@@ -64,6 +64,7 @@ static ColorDescription sColorDescriptionTable[] = {
|
||||
B_TRANSLATE_MARK("Scroll bar thumb") },
|
||||
{ B_TOOL_TIP_BACKGROUND_COLOR, B_TRANSLATE_MARK("Tooltip background") },
|
||||
{ B_TOOL_TIP_TEXT_COLOR, B_TRANSLATE_MARK("Tooltip text") },
|
||||
{ B_STATUS_BAR_COLOR, B_TRANSLATE_MARK("Status bar") },
|
||||
{ B_SUCCESS_COLOR, B_TRANSLATE_MARK("Success") },
|
||||
{ B_FAILURE_COLOR, B_TRANSLATE_MARK("Failure") },
|
||||
{ B_WINDOW_TAB_COLOR, B_TRANSLATE_MARK("Window tab") },
|
||||
|
||||
@@ -67,7 +67,7 @@ Overlay::Overlay(HWInterface& interface, ServerBitmap* bitmap,
|
||||
fOverlayToken(token)
|
||||
{
|
||||
fSemaphore = create_sem(1, "overlay lock");
|
||||
fColor = (rgb_color){ 21, 16, 21, 16 };
|
||||
fColor = (rgb_color){ 0, 80, 0, 0 };
|
||||
// TODO: whatever fine color we want to use here...
|
||||
|
||||
fWindow.offset_top = 0;
|
||||
@@ -237,12 +237,6 @@ Overlay::SetColorSpace(uint32 colorSpace)
|
||||
rgb_color colorKey = fColor;
|
||||
|
||||
switch (colorSpace) {
|
||||
case B_CMAP8:
|
||||
colorKey.red = 0xff;
|
||||
colorKey.green = 0xff;
|
||||
colorKey.blue = 0xff;
|
||||
colorKey.alpha = 0xff;
|
||||
break;
|
||||
case B_RGB15:
|
||||
greenShift = colorShift = 3;
|
||||
alphaShift = 7;
|
||||
|
||||
@@ -419,6 +419,7 @@ ELFLoader<Class>::Resolve(ImageType* image, SymType* symbol,
|
||||
case SHN_UNDEF:
|
||||
// Since we do that only for the kernel, there shouldn't be
|
||||
// undefined symbols.
|
||||
TRACE(("elf_resolve_symbol: undefined symbol\n"));
|
||||
return B_MISSING_SYMBOL;
|
||||
case SHN_ABS:
|
||||
*symbolAddress = symbol->st_value;
|
||||
|
||||
@@ -30,6 +30,14 @@ extern "C" {
|
||||
#include "fdt_support.h"
|
||||
|
||||
|
||||
//#define TRACE_SERIAL
|
||||
#ifdef TRACE_SERIAL
|
||||
# define TRACE(x...) dprintf("INIT: " x)
|
||||
#else
|
||||
# define TRACE(x...) ;
|
||||
#endif
|
||||
|
||||
|
||||
// If we dprintf before the UART is initalized there will be no output
|
||||
|
||||
|
||||
@@ -65,38 +73,38 @@ debug_uart_from_fdt(const void *fdt)
|
||||
return NULL;
|
||||
|
||||
// determine the MMIO address
|
||||
regs = fdt_get_device_reg(fdt, node);
|
||||
regs = fdt_get_device_reg(fdt, node, false);
|
||||
|
||||
if (regs == 0)
|
||||
return NULL;
|
||||
|
||||
dprintf("serial: using '%s', node %d @ %" B_PRIxPHYSADDR "\n",
|
||||
name, node, regs);
|
||||
TRACE(("serial: using '%s', node %d @ %" B_PRIxPHYSADDR "\n",
|
||||
name, node, regs));
|
||||
|
||||
// get the UART clock rate
|
||||
prop = fdt_getprop(fdt, node, "clock-frequency", &len);
|
||||
if (prop && len == 4) {
|
||||
clock = fdt32_to_cpu(*(uint32_t *)prop);
|
||||
dprintf("serial: clock %ld\n", clock);
|
||||
TRACE(("serial: clock %ld\n", clock));
|
||||
}
|
||||
|
||||
// get current speed (XXX: not yet passed over)
|
||||
prop = fdt_getprop(fdt, node, "current-speed", &len);
|
||||
if (prop && len == 4) {
|
||||
speed = fdt32_to_cpu(*(uint32_t *)prop);
|
||||
dprintf("serial: speed %ld\n", speed);
|
||||
TRACE(("serial: speed %ld\n", speed));
|
||||
}
|
||||
|
||||
// fdt_node_check_compatible returns 0 on match.
|
||||
|
||||
if (fdt_node_check_compatible(fdt, node, "ns16550a") == 0
|
||||
|| fdt_node_check_compatible(fdt, node, "ns16550") == 0) {
|
||||
dprintf("serial: Found 8250 serial UART!\n");
|
||||
TRACE(("serial: Found 8250 serial UART!\n"));
|
||||
uart = arch_get_uart_8250(regs, clock);
|
||||
#ifdef __ARM__
|
||||
} else if (fdt_node_check_compatible(fdt, node, "arm,pl011") == 0
|
||||
|| fdt_node_check_compatible(fdt, node, "arm,primecell") == 0) {
|
||||
dprintf("serial: Found pl011 serial UART!\n");
|
||||
TRACE(("serial: Found pl011 serial UART!\n"));
|
||||
uart = arch_get_uart_pl011(regs, clock);
|
||||
#endif
|
||||
} else {
|
||||
|
||||
@@ -212,10 +212,11 @@ fdt_get_cell_count(const void* fdt, int node,
|
||||
|
||||
|
||||
phys_addr_t
|
||||
fdt_get_device_reg(const void* fdt, int node)
|
||||
fdt_get_device_reg(const void* fdt, int node, bool physical)
|
||||
{
|
||||
const void *prop;
|
||||
const void *prop = NULL;
|
||||
int len;
|
||||
uint64 baseDevice = 0x0;
|
||||
|
||||
int32 regAddressCells = 1;
|
||||
int32 regSizeCells = 1;
|
||||
@@ -223,6 +224,15 @@ fdt_get_device_reg(const void* fdt, int node)
|
||||
|
||||
// TODO: check for virtual-reg, and don't -= fdt_get_range_offset?
|
||||
|
||||
// XXX: not sure #address-cells & #size-cells actually apply to virtual-reg
|
||||
if (!physical) {
|
||||
prop = fdt_getprop(fdt, node, "virtual-reg", &len);
|
||||
if (prop != NULL) {
|
||||
baseDevice = fdt32_to_cpu(*(uint32_t *)prop);
|
||||
return baseDevice;
|
||||
}
|
||||
}
|
||||
|
||||
prop = fdt_getprop(fdt, node, "reg", &len);
|
||||
|
||||
if (!prop) {
|
||||
@@ -231,7 +241,6 @@ fdt_get_device_reg(const void* fdt, int node)
|
||||
}
|
||||
|
||||
const uint32 *p = (const uint32 *)prop;
|
||||
uint64 baseDevice = 0x0;
|
||||
|
||||
// soc base address cells
|
||||
if (regAddressCells == 2)
|
||||
|
||||
@@ -105,6 +105,9 @@ tcsendbreak(int fd, int duration)
|
||||
speed_t
|
||||
cfgetispeed(const struct termios *termios)
|
||||
{
|
||||
if (termios->c_cflag & CBAUD == CBAUD)
|
||||
return termios->c_ispeed;
|
||||
|
||||
return termios->c_cflag & CBAUD;
|
||||
}
|
||||
|
||||
@@ -112,14 +115,14 @@ cfgetispeed(const struct termios *termios)
|
||||
int
|
||||
cfsetispeed(struct termios *termios, speed_t speed)
|
||||
{
|
||||
/* Check for values that the system cannot handle:
|
||||
greater values than B230400 which is
|
||||
the maximum value defined in termios.h
|
||||
Note that errors from hardware device are detected only
|
||||
until the tcsetattr() function is called */
|
||||
if (speed > B230400 || (speed & CBAUD) != speed) {
|
||||
__set_errno(EINVAL);
|
||||
return -1;
|
||||
/* Check for custom baudrates, which must be stored in the c_ispeed
|
||||
field instead of inlined in the flags.
|
||||
Note that errors from hardware device (unsupported baudrates, etc) are
|
||||
detected only when the tcsetattr() function is called */
|
||||
if (speed > B31250) {
|
||||
termios->c_cflag |= CBAUD;
|
||||
termios->c_ispeed = speed;
|
||||
return 0;
|
||||
}
|
||||
|
||||
termios->c_cflag &= ~CBAUD;
|
||||
@@ -131,6 +134,9 @@ cfsetispeed(struct termios *termios, speed_t speed)
|
||||
speed_t
|
||||
cfgetospeed(const struct termios *termios)
|
||||
{
|
||||
if (termios->c_cflag & CBAUD == CBAUD)
|
||||
return termios->c_ospeed;
|
||||
|
||||
return termios->c_cflag & CBAUD;
|
||||
}
|
||||
|
||||
@@ -138,10 +144,11 @@ cfgetospeed(const struct termios *termios)
|
||||
int
|
||||
cfsetospeed(struct termios *termios, speed_t speed)
|
||||
{
|
||||
/* Check for unaccepted speed values (see above) */
|
||||
if (speed > B230400 || (speed & CBAUD) != speed) {
|
||||
__set_errno(EINVAL);
|
||||
return -1;
|
||||
/* Check for custom speed values (see above) */
|
||||
if (speed > B31250) {
|
||||
termios->c_cflag |= CBAUD;
|
||||
termios->c_ospeed = speed;
|
||||
return 0;
|
||||
}
|
||||
|
||||
termios->c_cflag &= ~CBAUD;
|
||||
|
||||
Reference in New Issue
Block a user