Commit Graph

36533 Commits

Author SHA1 Message Date
Alex Wilson
82ab316723 Add default spacing for Layouts (#5614)
* introduce B_USE_DEFAULT_SPACING, which works somewhat like B_SIZE_UNSET and B_ALIGN_HORIZONTAL_UNSET
* introduce static float BControlLook::ComposeItemSpacing(float spacing), which checks uses be_control_look->DefaultItemSpacing().
* modify layouts to use BControlLook::ComposeItemSpacing() in SetInsets and SetSpacing methods.
* default insets are still 0, 0, 0, 0, but can be set to default spacing by passing B_USE_DEFAULT_SPACING
* I've found two regressions, patches incoming, please report others on #5614.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38512 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-02 22:58:24 +00:00
Clemens Zeidler
743d974099 Floor the tabLength to avoid drawing bugs. Add the leftover of this cutting to the last tab.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38511 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-02 03:51:29 +00:00
Clemens Zeidler
af89e8106a Remove unused function.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38510 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-02 03:30:14 +00:00
Clemens Zeidler
d344b03a93 Ensure that the window is in the front when using focus follow mouse.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38509 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-02 03:10:55 +00:00
Clemens Zeidler
04674450ad - Do the window layout on every resize. This is e.g. needed to do the tab layout.
- Use old ActivateWindow implementation till the Desktop SendBehind question is solved.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38508 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-02 03:05:58 +00:00
Stephan Aßmus
41af979eb8 Simplified the code a bit, removed debugging output and
added a work-around for the problem that FindKeyFrameForFrame()
may return another frame for a previously found keyframe
(due to rounding issues in the extrator).

At the moment, files which used to play horribly play pretty well
now for me. One remaining problem is that audio may be mute when
seeking far ahead in file, and the audio decoding has to catch
up. It will eventually be all ok. Once a section of the file has
played, it becomes seekable. This seems to be weird behavior of
some FFmpeg demuxers, and only with some files.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38507 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-01 21:55:11 +00:00
Stephan Aßmus
2cc22e8a26 Don't try to decode more than 5 frames at a time to reach
the seek frame. It's just not such a good strategy, since
it appears to be faster to just wait until the next keyframe
is reached naturally.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38506 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-01 21:51:56 +00:00
Jérôme Duval
01aeac8c1f remove debug leftover
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38505 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-01 21:41:49 +00:00
Stephan Aßmus
dc24f85691 Use rounding to avoid the situation, that FindKeyFrame()
returns a frame, and using that very same frame again
for FindKeyFrame() returns a different frame, because
the rounding effects have converted the time to be smaller
than the timestamp that was found for the first call to
FindKeyFrame(). It still happens sometimes, but a lot less
frequently. Ideas appreciated. :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38504 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-01 21:39:04 +00:00
Andreas Färber
3bc0fcc66e boot_net: Fix TCP memory leaks
In some error conditions the packet would have been leaked.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38503 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-01 18:19:57 +00:00
Stephan Aßmus
65e71a6e02 Coding style fixes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38502 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-01 17:57:18 +00:00
Stephan Aßmus
b6aa6d0da3 Removed left-over debug output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38501 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-01 17:56:51 +00:00
Stephan Aßmus
1a2e8aeeaf Fixed warning.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38500 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-01 17:53:00 +00:00
Stephan Aßmus
575fd7c2bf Of course the same fix needs to be applied
to SeekToTime(). The extractor may have
modified the time, don't let the decoder
overwrite the actually seeked time. I am thinking
the API should be called SeekedTo() or Seeked(),
and would be purely informative for decoders,
without even a return value.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38499 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-01 17:29:32 +00:00
Stephan Aßmus
f96246077d Several improvements that make the audio playback
much more robust:
 * Use a much larger buffer size, since we cache
   a lot anyway.
 * When reading uncached frames, don't trip over the
   situation that the seekable keyframe was very far
   away from where we want to read. Don't get caught
   up in a loop decoding an entire movie, but return
   a time-out error instead. This will get us back
   on track eventually.
 * Before seeking to a keyframe, check if the current
   track position is actually nearer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38498 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-01 16:02:42 +00:00
Stephan Aßmus
b4560be299 * Found two more places where _ConvertFromStreamTimeBase()
could be used.
 * Finding keyframes is unreliable. Sometimes the index
   is built on the fly, without us knowing. The file will
   become seekable after we have decoded those parts.
   This however means that seeking may not have been successful.
   To know the seeked to frame, we extract the next packet
   and returned the true current frame in the in/out arguments
   to seek.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38497 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-01 15:58:22 +00:00
Stephan Aßmus
9297e303c5 Do not override the seek frame which the extractor may
have adjusted. (The API is somewhat silly, since Decoders
can't really do anything with the seek frame, it can only
be told to them. But current decoders will assign the seeked
frame from the wanted frame, which would override the seeked
frame from the extractor... the API should be fixed.)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38496 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-01 15:54:06 +00:00
Scott McCreary
3a82446b9a Add man and groff as optionalpackages, update cmake, bzip2, p7zip, openssh to move their
man files from /boot/common/man to B_COMMON_DOCUMENTATION_DIRECTORY/man.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38495 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-01 15:26:28 +00:00
Stephan Aßmus
b4a9b7c236 * Actually use the client suggested buffer size.
* When the client didn't suggest it, take the sample
   size into account.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38494 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-01 14:51:37 +00:00
Stephan Aßmus
2c1e15255e * Initialize the channel mask of the media_format.
* Enabled the DTS decoder. The codec tag is fake,
   but as long as Readers use this, it will work.
   Currently only works with the FFmpeg reader, though,
   and I tested only with matroska containers.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38493 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-01 14:50:43 +00:00
Stephan Aßmus
ee891c8828 Do not resize the VideoView to the scaled size
of the video anymore, but tell the VideoView
the video frame size. So the outside regions of
the video are also painted by the VideoView. Not
tested with overlays, but should work. The side
effect is that the controls appear along the bottom
of the screen in full-screen mode. The controls
may need to be over the video, so they cannot be
attached to the parent of the VideoView (this was
already the case).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38492 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-01 13:02:30 +00:00
Stephan Aßmus
4edcbff706 Fixes the build, I've had file corruption and forgot to
restore this file from the backup I've made, so it got
forgotten in the last commit...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38491 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-01 12:56:27 +00:00
Stephan Aßmus
80a9df2502 * Show the controls in full-screen mode when the mouse moves.
* Propagate the current audio channel count to the controls.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38490 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-01 11:42:38 +00:00
Stephan Aßmus
389cd87bcb Made the PeakView multi-channel capable.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38489 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-01 11:37:52 +00:00
Stephan Aßmus
b006bbe130 * Resolved TODO and implemented updating resampling implementation on the fly.
* Reordered some methods in the source to align with declaration order.
 * Applied naming conventions for private methods.
 * Switched asterix style in MixerInput.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38488 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-01 09:09:10 +00:00
Clemens Zeidler
e9ec3d5a49 In stack mode, draw the zoom button if the window is active otherwise use the space to draw the title. The idea to draw one zoom button at the rightmost tab does not work because in focus follow mouse mode the particular tab may loose the focus when move the mouse to the zoom button.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38487 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-01 04:09:08 +00:00
Clemens Zeidler
cd4692196c Revert my last changes for now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38486 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-01 02:52:33 +00:00
Andreas Färber
1f4a2bd985 boot_net: Disable TCP for all archs but ppc
Unbreaks the build until a better solution is found.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38485 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-31 22:57:33 +00:00
Stephan Aßmus
4177bfe69f * AppendPicture() and RemovePicture() are weird, since
the ServerPicture calls those itself from SetOwner().
  Since there are asserts in ServerPicture about fOwner,
  it was easiest to fix the code by using *only* SetOwner()
  from within ServerApp to add or remove pictures.
* SetOwner() was broken, since it called a method which
  potentially removed the last reference and then still
  accessed memory of the now free'd ServerPicture instance.
  The easiest fix is to just increase the reference count
  temporarily.
* SetOwner() wrongly returned false when the new owner was NULL.
* NestPicture() should simply add it's own reference. There
  are two places where it is called, and only one of them
  added the extra reference. The other one only acquired the
  implicit reference that the ServerApp owns, but pictures
  that remove nested children remove a reference from them.
  This could leave stale pointers around of course.
* Added more asserts about fOwner.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38484 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-31 22:07:50 +00:00
Andreas Färber
6c2e0f4377 boot_net: Mute some TCP debug output
Trace packet dequeing only when asked to.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38483 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-31 20:32:50 +00:00
Andreas Färber
6dfef7e9b2 boot_net: Use real_time_clock_usecs() for TCP
Initialize the PRNG seed for the sequence number with real_time_clock_usecs()
rather than system_time(). The remaining uses of system_time() for timeout
calculation match UDP.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38482 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-31 18:51:57 +00:00
Andreas Färber
58b1d4608a boot_loader_openfirmware: Implement real_time_clock_usecs()
Partially revert r38465 and move the code from system_time() into a new
real_time_clock_usecs() function. The system_time() implementation was correct
in relying on of_milliseconds(), as pointed out by Axel. Add the correct
function for the desired functionality.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38481 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-31 18:42:57 +00:00
Andreas Färber
a9e71a07a9 boot_loader_openfirmware: Style cleanup
Fix coding style issues and bump copyright (although there's not much anyway).

No functional changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38480 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-31 17:39:06 +00:00
Stephan Aßmus
a79b30c3b6 * In the MixerInput, also use the Linear resampler if requested by the
settings. (There is a common "mixing frame rate" to which all inputs
   resample, before the MixerCore resamples to the frame rate of the
   output.)
 * Some more coding style fixes in MixerCore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38479 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-31 16:07:52 +00:00
Stephan Aßmus
5911196b9c Reading the contents of the screen requires the exclusive lock
to avoid someone drawing into it at the same time. In a debug
build, this avoids hitting an ASSERT.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38478 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-31 11:45:53 +00:00
Stephan Aßmus
45db9a2073 Made the logic behind the locking in the outer and inner
message loop more clear, both in the code and also via
comments. I get the occasional drop into the debugger
because MultiLocker says the Readlock has been acquired
twice. I don't see how it is possible from the code and
it could be another bug in the MultiLocker debugging
facilities, but the code should be clearer now anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38477 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-31 11:19:23 +00:00
Clemens Zeidler
cb2fa7e665 Coding style.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38476 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-31 05:42:18 +00:00
Clemens Zeidler
26152d9e07 - Increase max size for stacked tabs.
- Use more title space in stacked tabs.
- Fix tab movement in stacked mode.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38475 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-31 05:36:09 +00:00
Clemens Zeidler
fef53dfffd When activating one window in a group send all other windows behind this window and not activate them. This fix flickering of stacked windows.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38474 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-31 02:07:15 +00:00
Clemens Zeidler
d4272f888e Fix SendWindowBehind. It now sets the window layer position behind the specified window. If behindOf is NULL it is send to the bottom. Please review if it really was broken! At least it has not worked as I had expected and what I read from bebook.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38473 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-31 02:04:46 +00:00
Andreas Färber
b7e825d6e7 boot_net: Add TCP support
Modelled after UDP, add limited TCP support to the boot net stack. The socket
works by queuing received packets as well as sent packets that have not yet
been ACK'ed. Some known issues are documented, especially there's only limited
congestion control. I.e., we send immediately and in unlimited quantity, thus
its use should be restricted to local networks, and due to a fixed window size
there is potential for our socket being overrun with data packets before they
are read. Some corner cases like wrapping sequence numbers may cause a timeout.

The TCP implementation is based on Andrew S. Tanenbaum's "Computer Networks",
4th ed., as well as lecture notes from Prof. W. Effelsberg, the relevant RFCs
and Wikipedia. The pseudo-random number Galois LFSR used for the sequence
number was suggested by Endre Varga.

Since the code is unlikely to get much smaller, better merge it now so that
subsequent changes get easier to review. No platform actively uses TCP sockets
yet, and the receiving code has been reviewed for endianness issues and should
terminate okay after verifying the checksum if no sockets are open.
Based on a version tested with custom code (#5240) as well as with iSCSI.
Compile-tested boot_loader_openfirmware, pxehaiku-loader with gcc4 and
haiku_loader with gcc2. Closes ticket #5240.

Changes from #5240 proposed patch:
* Various bug fixes related to queuing, some memory leaks fixed.
* Never bump the sequence number when dequeuing a packet. It's done afterwards.
* Don't bump the sequence number again when resending the queue or ACK'ing.
* Aggressively ACK while waiting for packets.
* Don't queue sent ACK-only packets.
* More trace output, esp. for queue inspection.
* Adapted use of TCP header flags to r38434.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38472 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-31 01:00:06 +00:00
Rene Gollent
703b67c0ca Update Web+ to r545 to fix compatibility with recent Locale Kit ABI changes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38471 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-31 00:07:28 +00:00
Stephan Aßmus
82ffb1e6bd Improved tracing output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38470 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 22:31:54 +00:00
Stephan Aßmus
cfe3295bcf * _FillNextBuffer(): performanceTime and startTime were duplicated variables.
* Small coding style improvements.
 * Improved generating of debug .wav file.
 * Incorporate the channel count in the audio buffer size! This was important
   since the duration could then lead to rounding errors. 6 channel playback
   is much improved, but still far from perfect.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38469 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 22:26:11 +00:00
Stephan Aßmus
0f7fb31be2 * Do not create converters if target format has wildcards
for the respective aspect.
 * Put back tracing output.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38468 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 22:23:08 +00:00
Stephan Aßmus
30816b7ebd * Coding style fixes.
* Fixed build with tracing enabled.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38467 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 22:22:15 +00:00
Axel Dörfler
252999c4e2 * Fixed CID 461 as well - same thing, only for adding a menu to the save panel.
* The menus are now only created when the menu bar is found.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38466 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 21:18:20 +00:00
Andreas Färber
56f837e265 boot_loader_openfirmware: Fix system_time()
system_time() was based on of_milliseconds(), which returns the number of
milliseconds since power-on. This would produce very similar or identical
results for subsequent boots due to limited clock resolution; therefore it
was unsuited as PRNG seed, e.g., for TCP ports.

Try to inquire the RTC device node with get-time to return an improved time
value, if possible.

Closes ticket #6061.

Changes from proposed patch:
* Obtain the RTC handle once and reuse it for each inquiry.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38465 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 21:13:10 +00:00
Stephan Aßmus
eb01f516a3 The CodecID for raw-audio actually depends on the sample format
and can't be hard-coded in the EncoderTable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38464 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 21:04:29 +00:00
Axel Dörfler
6387dbc3f2 * Fixed potential NULL menuBar. This fixes CID 462.
* Got rid of the global styled_edit_app variable.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38463 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 21:04:06 +00:00