Commit Graph
100 Commits
Author SHA1 Message Date
Adrien Destugues ab75d3b5a8 Do not advertise libavdevice in ffmpeg build feature.
It is not actually used by our ffmpeg plugin.
2017-12-24 16:39:23 +01:00
Adrien Destugues 197c659920 libnetwork: re-introduce gethostbyname_r and gethostbyaddr_r
These are needed by existing openjdk package. Let's keep them until we
get the OpenJDK build working again and can remove the requirement.
2017-12-19 21:22:14 +01:00
Adrien Destugues d87218f79e Add test for stack alignment. 2017-12-10 09:28:49 +01:00
Adrien Destugues 6a028821b6 x86 glue code: keep stack aligned.
The glue code pushed 12 bytes to the stack, breaking the 16-byte stack
alignment requirement. This would be fixed by the main() prologue from
gcc, but all "init" and "fini" code (static/global constructors/ destructors)
would run with a misaligned stack.

This was already fixed for x86_64 in hrev49731. Note that the fix here
is slightly different, the pointer is realigned after it is saved to EBP
and the function epilogue restores it from EBP, so no changes to crtn.S are
needed.
2017-12-10 09:23:22 +01:00
Adrien Destugues 2d10453741 Add a simple video decoding test
This application tests the BMediaTrack/BMediaFile API and underlying
ffmpeg plugin for video decoding. You can press (or hold) any key to go
through frames in a video. This avoids debugging both MediaPlayer and
the underlying libraries at the same time.

It shows that ReadFrames is getting video frames out of PTS order.
2017-12-07 22:45:44 +01:00
Adrien Destugues a9020afcb6 BHttpHeaders: fix gcc5 build. 2017-12-07 22:45:44 +01:00
Adrien Destugues ed8f28a480 Move HeadersReceived hook after parsing of cookies
I still don't get what's happening, but doing the cookie parsing at the
same time as the main thread is handling HeadersReceived seems to
trigger a memory corruption, and it will escape all my attempts to debug
it (adding printfs or any other slight change to the code will make it
go away). So just chage the order we do things and hope that's enough to
always avoid it.

As a side effect, HeadersReceived can now rely on the cookies being
already stored in the cookie jar, which I think makes more sense.

I still plan to rewrite the HTTP request code as a proper state machine,
instead of one long Run() function. This would allow to run it in
smaller steps, and thus group multiple requests in a single thread
(triggering them from poll, select, or similar).
2017-12-07 22:45:44 +01:00
Adrien Destugues 8ddec194c6 intel_extreme: backlight control on pre-PCH devices
Thanks to oco for letting me test this on his old laptop.
2017-11-23 23:59:39 +01:00
Adrien Destugues 5f4f984a94 etc/profile: Fix setting of LC_* variables
Since hrev51075, locale -m changed meaning to the one expected by POSIX
(it now lists character maps, instead of giving the current language).

Since the short options may change again (locale -c is still not doing
what POSIX requires), use long options instead. This is more readable
and POSIX doesn't specify anything there so we can name them however we
want.

Fixes date parsing in Python which relies on these variables to detect
the current locale.
2017-11-23 14:50:11 +01:00
Adrien Destugues 4205fc9141 locale: document -c as the shortcut to get message locale again.
It was deprecated in favor of -m, but -m then changed meaning to comply
with POSIX. So restore documentation for -c, and add proper
documentation for -m.
2017-11-23 14:50:11 +01:00
Adrien Destugues 8903cd4256 Bump MAX_SHADOW_PWD_PASSWORD_LEN
Fixes #13733.

Unlike written in the ticket, the string length is 136 (not 135),
and the code checks for rejects anything greater or equal to the max
value. So set the constant to 137.
2017-11-23 13:00:48 +01:00
Adrien Destugues eb5604bcb0 UDP: keep a reference to domain when we need it
The domains could be deleted by other threads while we were using them
to handle incoming packets, leading to an use after free (deadbeef).

Keep a reference to the doamin as long as we need it so other threads
will not delete them.

Fixes #9721, #12567
2017-11-23 12:11:09 +01:00
Adrien Destugues a61d30b83b Fix app_server build for brightness support
Thanks to Hy Che for noticing this!
2017-11-22 23:17:51 +01:00
Adrien Destugues f69717add6 FirstBootPrompt: more layout fixes
ResizeToPreferred will only relayout the window once. Further calls will
not change anything, even if the text in the BTextView changed. So make
sure to compute the preferred size with a very high text view, and only
then, set the (rather short) english text.

This makes the text view large enough to fit the text in all languages,
and the window never changes size.
2017-11-22 16:34:11 +01:00
Adrien Destugues c247a73bea app_server: handle empty drag bitmap
An application is allowed to set an empty drag bitmap. In that
case, the offset from the cursor doesn't matter, because there
is nothing to draw anyway.

app_server would end up confused by the empty bitmap (which has
no bits) and invalid offset (it would try to allocate a 2^16
x 2^16 pixels bitmap to fit both the cursor and the empty
bitmap), and eventually it would crash.

Fixes #13577.
2017-11-22 13:54:12 +01:00
Adrien Destugues b140a1c340 NetworkAddressResolver: cache needs to be locked
It is not a good idea to have a thread get an address from the request
cache, while another thread is deleting said address as the cache has
grown too large. Add a lock around the cache access to make it safe.
2017-11-21 22:15:32 +01:00
Adrien Destugues 4c99992724 Deskbar: update time format when locale changes.
Thanks to Skipp_OSX for reminding me that B_LOCALE_CHANGED was already
handled in Deskbar.
2017-11-21 22:15:31 +01:00
Adrien Destugues 6663167b59 pkgman: improve progress bar
- Do not update more than twice a second
- Do not use tabs, so we can reliably compute the string width
- Cleanup and tweak other parts of the code

There is still a glitch when resizing Terminal, but it isn't as bad as
before. Ideally, using the SIGWINCH signal would solve that, but it is
sent to the app only when you release the mouse after a release
operation, so in our case, it is already too late.
2017-11-21 18:24:44 +01:00
Adrien Destugues feabff3ebb TeamMonitor: redo layout
Add several sizing constraints to avoid the window becoming too small.

Fixes #7560.
2017-11-21 16:16:12 +01:00
Adrien Destugues 8c82d0edd5 DeskBar: cache time and date formats
Creating BDateTimeFormat and BDateFormat objects is a costly operation
(it loads locale data from ICU, etc). So, we should do it only once when
the format changes, instead of doing it each time we format a date
or time.
2017-11-21 15:06:46 +01:00
Adrien Destugues 950b5664df FirstBootPrompt: fix layout
In some languages, the buttons would end up outside of window bounds, as
changing the BTextView content does not automatically update the window
size (even with B_AUTO_UPDATE_SIZE_LIMITS). So, we need to manually call
ResizeToPreferred after changing the text.

However, this exposed another problem: the view size is computed using
GetHeightForWidth, with a width as small as allowed by layout
constraints. In our cases, there weren't much layout constraints so we
would end up asking the text view to compute its height for a width of
52px, leading to a very high window. Add some explicit sizing
constraints to the text view and language list to make sure we get a
sane size.

Also tweak the layout a little to allow the keymap menu field to be
wider than the language list view, and make the window not resizable as
that makes it much easier to keep things under control and there isn't
really a need to resize it.
2017-11-21 12:19:56 +01:00
Adrien Destugues 24e63de5d3 Style fix: parameters should have a name. 2017-11-21 12:19:56 +01:00
Adrien Destugues 3a2b67b5ae Support for configuring screen backlight
Accelerant interface:
Introduce new hooks B_SET_BRIGHTNESS and B_GET_BRIGHTNESS. Brightness is
a float in the 0..1 range.

App_server:
Forward brightness things between BScreen and the accelerant.

intel_extreme:
Implement the hooks. Note that this only works for laptop panels, but
the driver will pretend to support it in other cases as well.

Screen preferences:
If the accelerant supports the B_GET_BRIGHTNESS hook, allow to set
brightness with a slider. Otherwise, the slidere is hidden and these
changes aren't visible.
2017-11-21 09:12:18 +01:00
Adrien Destugues c5f9934cd8 SerialConnect: optimize drawing
The libvterm implementation was sending characters to app_server one by
one. This made it very slow to update the view and SerialConnect would
have noticeable flickering.

We now look through each line and try to find ranges of characters with
the same attributes. We can then draw each of these with a single
FillRect+DrawString. In the normal case (no special attributes or colors
anywhere), this means just one call per line, plus two for the cursor.
2017-11-20 21:54:30 +01:00
Adrien Destugues d1805b9a36 BSecureSocket: use opt-out to select ciphersuites.
We just want to disable known broken ones, rather than opt-in for
working ones. This keeps the list of authentications shorter and is more
future proof.
2017-11-20 09:44:50 +01:00
Adrien Destugues c312da45a8 media_client: print usage in case of missing arguments
Now the obvious "media_client somefile.wav" will tell you what to do.
2017-11-20 09:44:50 +01:00
Adrien Destugues 00b62cbe54 Fix DoCatalogs for MediaPlayer
since it uses gristed sources, it must be inside the multiarch block.
2017-11-01 22:01:33 +01:00
Adrien Destugues ae80bc1f41 Make it possible to build MediaPlayer with gcc5 on gcc2 system
For now only for testing and evaluation purposes. We may switch to this
in the default image if it proves to be better at playing various files.
2017-11-01 21:30:55 +01:00
Adrien Destugues 309c068978 FTDI: properly remove out-of-band info from data.
FTDI chips send packets of at most 62 bytes of data, with a 2 byte
header. The code assumed that the chip would return at most 64 bytes,
but with new (USB2) chips this is not the case anymore. As a result,
it was skipping only the first header in a packet and leaving the other
ones in the data stream.
2017-10-28 19:54:57 +02:00
Adrien Destugues c80ec6a9fe Rebuilt HaikuWebKit to fix ABI breakage.
WebPositive should work again.
2017-10-09 07:23:11 +02:00
Adrien Destugues 1beeb1b002 "thin" fonts are B_LIGHT_FACE
In Noto fonts, "thin" is another level of "light" apparently
(somewhere in between "extralight" and "medium"... lots of choice these days).

Tell app_server about it so the proper font flags can be set. This may
help avoid confusion, as Terminal (and FontDemo, in less predictable
ways) tend to pick the "thin" variant of fonts even when "regular" is
requested.
2017-10-08 21:41:15 +02:00
Adrien Destugues 01ef811165 BChannelSlider: use native tooltips
BChannelSlider (used in media preferences) used to implement its own
tooltip, which didn't really work (as it could draw only inside the
view), and had hardcoded colors.

Use the native BToolTip which was added to Haiku since then.
2017-10-08 21:41:15 +02:00
Adrien Destugues a00bd28a9b Package Kit: map some curl errors to Be error codes
Trying to get something more useful than "aborted: no error" in case of
network errors in pkgman.
2017-10-07 22:09:42 +02:00
Adrien Destugues a8c92cc0aa Move Scott back to active maintainers.
There is indeed more to being a maintainer than just commiting changes
to Haiku main tree. Removing people from there without asking them first
seems a bit rude.

Also update creadits for translations from Pootle generated ones.
2017-10-01 09:27:39 +02:00
Adrien Destugues 7cb920e579 Fix crash in 256-color setup parsing
Applications can control the 256-color mode and change the palette. This
was not much used until now, but our terminal is now advertising itself
as xterm-256color. Mutt noticed this, tried to use the escape sequence,
and crashed Terminal here.
2017-09-23 16:46:37 +02:00
Adrien Destugues 6103c9d186 Fix top border for modal windows.
Patch by "Ben" in #9498.
2017-09-23 09:10:28 +02:00
Adrien Destugues af960311c0 DiskUsage: ignore files from other volumes
This allows us to get meaningful result for the system volume, which
would otherwise scan both hpkg files, and their whole contents as
mounted in the system/ hierarchy. Now only the packages are seen.
Directories are not ignored, so system/ (which is a different mount
point) will still be browsed, and system/packages (which is a
shine-through) will be found and counted in the used space.
2017-09-23 08:59:18 +02:00
Adrien Destugues 19b3ca491b Add a MIME type and sniffing rule for Protracker mods. 2017-09-06 07:29:31 +02:00
Adrien Destugues 62abb67d6e Cleanup my mess.
Repeatedly applying the wrong patch won't work.

When do we switch to Gerrit? :'(
2017-08-30 20:29:58 +02:00
Adrien Destugues 8fe6df22f8 update php version to remove ICU55 dependency. 2017-08-29 19:26:39 +02:00
Adrien Destugues e9300454b6 Update vlink to latest version. 2017-08-27 20:34:01 +02:00
Adrien Destugues a7c71e2acb Add HxC Floppy disk image conversion tool. 2017-08-27 11:28:35 +02:00
Adrien Destugues f04a6bd9b9 Update vasm version. 2017-08-26 21:17:05 +02:00
Adrien Destugues 83776950cd SerialConnect: fix mixup of file panels
- Use separate file panels for "load" and "save" directions
- Change the message sent by the "load" panel according to the protocol
  to use (it just forwards the one from the BMenuItem used to invoke it,
  which already has the protocol information).
2017-08-26 17:20:50 +02:00
Adrien Destugues f1af46a2c0 SerialConnect: try to fix gcc5 build. 2017-08-26 16:23:55 +02:00
Adrien Destugues 8bff17cfd8 SerialConnect: support sending raw files
Add a generic FileSender interface, which XModemSender implements. Add a
new RawSender which implements the same interface.

The RawSender currently blocks the application thread while sending,
which is not a good idea. Will rework this when I allow cancelling
transfers before they complete.
2017-08-26 15:32:44 +02:00
Adrien Destugues 7b6e6c1587 FT232x driver: support hardware flow control.
We had everything in place, except we never actually sent the command to
the device.

Note that the other drivers (prolific, etc) as well as pc_serial need to
be updated as well (might do it when I get access to hardware where I
can test the changes).
2017-08-26 15:29:37 +02:00
Adrien Destugues a74f88cf8f Build fix. 2017-08-21 18:52:28 +02:00
Adrien Destugues faef86335b BTabView: fix binary compatibility.
Re-introduce missing symbol so that old apps can still be used.
2017-08-21 18:21:21 +02:00
Adrien Destugues 0d1bb791fc BControlLook: remove broken intersection check
When using BAffineTransform, the update rect is not in the same
coordinate space as the drawing rectangle. Hence, testing them for
intersection does not work, and leads to not drawing buttons which are
in fact visible.

Moreover, the code in BControlLook does not perform only drawing, it is
also expected to update the drawing rect, so other functions may reuse
it later (for example, drawing a button border also computes the
rectangle for the button background). Because of this, it is not
possible to skip the drawing completely, or we could break the layout of
the client.

Fixes #13664
2017-08-20 15:55:56 +02:00
Adrien Destugues dd582ff9d5 Add a test for #13664
Interaction between ConstrainClippingRegion and transforms leads to
button frames and background not being drawn at all.

Also shows another problem with rounded corner buttons when mixed with
transforms.
2017-08-20 14:59:21 +02:00
Adrien Destugues d47dec9356 Make gcc2 happy. 2017-08-20 09:48:29 +02:00
Adrien Destugues 1e80caa309 Add a white background version of the sticker
- Uses the Haiku URL instead of "inspired by the BeOS"
- Tweaked dimensions to match lastickerie.com templates (45x80mm + cutting margin)
2017-08-20 09:10:05 +02:00
Adrien Destugues dd64582866 HaikuwebKit 1.6.2. 2017-08-19 11:20:32 +02:00
Adrien Destugues b8d9fcbeb3 Revert "ControlLook: remove some bogus clipping"
This reverts commit b277177477.
2017-08-16 17:48:58 +02:00
Adrien Destugues b277177477 ControlLook: remove some bogus clipping
ConstrainClippingRegion was used in BControlLook to limit drawing to
inside the update rect. There are two problems with that:
- It would ignore any other clipping set by the application, as calls to
ConstrainClippingRegion are not cumulative,
- ConstrainClippingRegion ignores transforms on the view, so on a
transformed view, we would not draw anything in most cases.

If constrained clipping is needed here, it should be achieved using
ClipToPicture instead.
2017-08-16 17:44:45 +02:00
Adrien Destugues 2c1c78ae26 iwn: add missing PCI ID
Let's see if this is enough to get an extra card working?
This device ID is supported in the FreeBSD driver.
2017-08-16 14:37:58 +02:00
Adrien Destugues b32b2f9028 DeskBar: remove app name from expanded window items
Expanded window items are listed right under the team item. So, it is
not needed (and a waste of space) to repeat the team name there.

Detect two common patterns for adding the application name to windows:

AppName: Window

and

Window - AppName

Remove both from the item labels, leaving a little more space for useful
information in DeskBar.
2017-08-15 10:55:50 +02:00
Adrien Destugues 43d60df2b0 Web+: avoid empty tab title
Use file name, if no title is provided by the page

Fixes #13663
2017-08-15 10:34:35 +02:00
Adrien Destugues acad802d56 XModem: fix start of CRC transfer
We can send the first block immediately when we receive the "C" for the
first time.
2017-08-15 08:58:19 +02:00
Adrien Destugues 2566b22cd7 Fix Web+ crash if session file is corrupt. 2017-08-15 08:55:30 +02:00
Adrien Destugues 05d9795db3 Add some docs for BLayoutBuilder::Grid. 2017-08-13 09:05:29 +02:00
Adrien Destugues 433447be21 WebPositive: hangs when cookie jar is corrupt.
Missing error check led to endless loop trying to extract cookies from
an invalid message. Now the cookie jar is left empty instead.
2017-08-13 08:02:16 +02:00
Adrien Destugues a911a53fa6 HIG: Fix missing closing tag. 2017-08-07 18:05:58 +02:00
Adrien Destugues 2459b6db4f CID 701865: missing break in switch. 2017-07-30 22:50:07 +02:00
Adrien Destugues 2093ede6bc CID 603359: missing break in switch/case. 2017-07-30 22:39:03 +02:00
Adrien Destugues 01c1bb6223 Remove more Locale Kit cruft.
BNumberFormat is the way to go for all of this. This code was not even
compiled in.
2017-07-30 19:25:16 +02:00
Adrien Destugues 979a0b6a20 xhci: Fix fuplicate trace.
Makes reading the logs a little less confusing.
2017-07-30 15:06:05 +02:00
Adrien Destugues 6f1ae3c88f XHCI: fix tracing
- The XHCI version register is at offset 2, but we can't do a 32-bit
read at that address. Instead read at address 0 and shift. Fix a freeze
on my system (this register is currently used only for tracing, but I
noticed my USB controller implements version 0.96 and not 1.0 of the
spec, so maybe this will have to change). All other registers in the
capability area are already properly aligned.
- Usual printf type mismatch error in xhci.cpp.
2017-07-30 13:39:14 +02:00
Adrien Destugues 1b707a6822 fix libdsk provides
forgot to change the library version when updating the package.
2017-07-30 10:00:43 +02:00
Adrien Destugues f0f458ebea Remove glow from boot logo.
It looks better without it.
Note: beta and "development" images not adjusted. We don't have the
wonderbrush sources in the repo for these, apparently.
2017-07-29 12:27:50 +02:00
Adrien Destugues f40841ac86 BNetworkRequest: fix _GetLine on empty lines.
On an empty line terminated by \n, we would access the temporary buffer
(stack allocated) with an index of (uint32)-1. On 32bit machine this
would just read the byte before the array on the stack, but on 64bit it
would crash.

Check that the length is at least 1 before trying to access a character
in the array.

Fixes #13625.

Thanks to accessays for proofreading the code:
2017-07-28 21:59:19 +02:00
Adrien Destugues 615ef07db3 libnetapi: missing NULL check. 2017-07-28 21:08:54 +02:00
Adrien Destugues 037ea84ba5 BNumberFormat: add Parse() and GetSymbol(). 2017-07-23 11:40:25 +02:00
Adrien Destugues 6cbcfc1911 BNumberFormat: cache ICU formatters
For performance reasons, it is a good idea to keep the formatters
instanciated, instead of re-creating them each time we need to format a
number.
2017-07-23 10:24:02 +02:00
Adrien Destugues 0e4ad75e47 Remove more unneeded files from the Locale Kit
All of this is replaced by the single BNumberFormat class.
2017-07-23 09:15:42 +02:00
Adrien Destugues b7cc4ccde6 Remove remaining include of FloatFormatParameters.h. 2017-07-22 19:47:07 +02:00
Adrien Destugues 0597752447 Remove full date format from Tracker date columns
It is too similar to the long format and does not add much value.
And it creates some problems with using a locale format with another's
string.

Fixes #11343.
2017-07-22 19:23:42 +02:00
Adrien Destugues 1416521f10 Notifications: default to application icon.
It is possible to SetIcon(NULL) to remove it.
But in msot cases we want the application icon to be the default.

as discussed in #13590.
2017-07-22 16:11:25 +02:00
Adrien Destugues 1d6af34b9a LocaleKit: remove obsolete files.
Formatting floats is handled by BNumberFormat already.
2017-07-22 12:59:12 +02:00
Adrien Destugues e433b3cfc3 DiskUsage docs: update screenshots.
- Why were we using old BeOS screenshots here?
- Why is this not part of the user guide anyways?
2017-07-22 11:30:52 +02:00
Adrien Destugues 54de05d9d7 Fix error handling in PNG trnalsator
The default error handling code in libpng uses setjmp/longjmp. This is
annoying, because stack variables may be corrupt, unless they are
declared volatile.

Instead of declaring everytihng volatile, we can tell libpng to use
custom error functions, which will throw a C++ exception, making the
code more readable and less crashy.

Also handle the png_read_end function returning errors without failing
the whole decoding. This happens for example in the old diskusage
documentation screenshots, where this function fails after the image was
completely and correctly decoded. Ignoring the error lets ShowImage show
these pictures.

Fixes the crash reported in #6775.
2017-07-22 11:30:52 +02:00
Adrien Destugues ae2c5eeeab SerialConnect: handle cancelled file transfers.
The remote can cancel a file transfer by sending a CAN character.
Handle this by stopping the transfer and hiding the progress bar.
2017-07-16 16:11:47 +02:00
Adrien Destugues cd4d3a3010 SerialConnect: implement XMODEM-CRC
This is a common extension to XMODEM, which replaces the checksum with a
more resilient CRC.
The receiver must explicitly enable this, so if the receiver doesn't
handle it, the traditional checksum is still used. Hence, this is
backwards-compatible with XMODEM.
2017-07-16 16:00:10 +02:00
Adrien Destugues ce058fa0a9 SerialConnect: implement XMODEM send. 2017-07-16 10:21:22 +02:00
Adrien Destugues 971c5704d5 Nebula: 64bit fix.
The code is written with 32-bit in mind, but "long" isn't always that
size.

Should fix #13604.
2017-07-16 08:11:42 +02:00
Adrien Destugues 3701b2c381 Update mesa and llvm for x86_gcc2 2017-07-06 13:02:22 +02:00
Adrien Destugues 50e5994999 Fix libepoxy provides. 2017-07-05 13:08:49 +02:00
Adrien Destugues 021ffa56b9 Add libepoxy (and update dependencies) 2017-07-04 19:29:00 +02:00
Adrien Destugues 870ff72ee2 Update some packages for x86_gcc2
- hub: had an annoying problem preventing to run the script directly.
Now uses a proper "shebang" so it finds ruby.
- mako, setuptools: needed to build Mesa.
- neonlights: my favorite screensaver.
- python 3.6.
- advancemame, for arcade gaming on Haiku.
- sox and gnuplot, for various experiments.
2017-07-04 08:22:20 +02:00
Adrien Destugues ff5c2dc23b FileListener: does not need to be asynchronous.
The asynchronous listener is meant to be used when the functions are
meant to be called from the main thread (or another looper the listener
is explicitly atached to).

For this to work, the request should be attached to
listener->SynchronousListener(), which was not the case here. Assume it
is fine for the functions to be called from the HTTP thread directly
then (if I'm wrong, revert this and attach the synchronous listener to
the http request, however wihout further changes it will just move the
execution of the callbacks to the main thread, which may not be the
right place either).

This fixes a crash when exiting WebKit while playing a youtube video
(somehow the handler isn't cleanly deleted and removed from the main
looper there - going without a handler at all fixes this).
2017-06-28 22:19:18 +02:00
Adrien Destugues bb0d0ea2e3 pc_serial: cleanup, no functional changes
- Improve readability of code to detect serial debug
- Rename usb_serial_* functions to pc_serial_* (code was copied from the
  USB serial driver)
2017-06-25 07:54:02 +02:00
Adrien Destugues 36576214eb Remove __STDC_FORMAT/CONSTANT_MACROS
These were added in C99 to avoid interferring with C++, but then C++11
caught up with inttypes/h/stdint.h and removed the need for the macros.
They have disappeared from C11 as a result, and also from current glibc
implementation (https://sourceware.org/bugzilla/show_bug.cgi?id=15366)

So it seems reasonably safe to do the same, and it will save people
having to enable access to these macros explicitly when writing C++.
2017-06-04 17:29:29 +02:00
Adrien Destugues 4edf3ea9c1 ffmpeg: Fix decoding of GBRP colorspace
It turns out the first plane is blue, not green. Yes, this does not
match with the colorspace name...
2017-05-30 21:55:02 +02:00
Adrien Destugues 50f36c92b5 MediaPlayer: fix a memory leak in SRT character set decoding 2017-05-30 20:41:03 +02:00
Adrien Destugues 15afaf0bcc MediaPlayer: detect and convert encoding in subtitles.
The SRT file format unfortunately does not specify a text encoding (in
fact, there isn't even really a specification for it). Just loading the
bytes and assuming UTF-8 does not work so well, so we now try to detect
the encoding from the first line of text found.

Fixes #9668

(sometimes watching a movie is all an adventure!)
2017-05-29 21:51:08 +02:00
Adrien Destugues 982fc0c222 ffmpeg: implement conversion for the GBRP pixel format
ffmpeg decodes some videos in this format: separate planes for G, R and
B values of the pixels. It does not manage to perform the conversion on
its own (we would need to use swscale for that), so provide our own
converter (the code is trivial anyways).
2017-05-29 21:51:08 +02:00
Adrien Destugues 756c36e7ee Rotate permission labels in Tracker InfoWindow
This allows to fit a lot more text in the same horizontal space, so we
can fit the label in various locales, without spreading the checkboxes
further apart.

Fixes #6987
2017-05-29 15:27:49 +02:00
Adrien Destugues fd9afd8ac6 Missing localizations in tracker info window.
Patches from Karvjorm in #6987 (but not directly related to that ticket)
2017-05-29 14:32:36 +02:00
Adrien Destugues 3ec7701779 NaturalCompare: implement using locale kit
The non-locale aware version is kept in src/build/libshared for use on
the host system and in packagefs (kernel add-on). In both cases, ICU is
not available.

Fixes #8192
2017-05-29 14:04:44 +02:00