Commit Graph

36896 Commits

Author SHA1 Message Date
Stephan Aßmus
47e9b53fe4 Fix some coding style violations (case scope blocks get their
opening parenthesis on a new line & 80 chars/line limit).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38837 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-28 17:32:20 +00:00
Stephan Aßmus
395346c411 Patch by Matthias: The residue field is not maintained
correctly by all USB devices, so calculate it instead.
Gets some USB disk devices working like the SuperTOP.
MacOS X is doing the same thing, as researched by Jérôme.
Closes ticket #6604. Thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38836 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-28 17:30:15 +00:00
Philippe Houdoin
af3b61f013 Fixed a copy&paste typo in trace.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38835 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-28 14:03:11 +00:00
Stephan Aßmus
a574c5ce13 For the time being, don't enable a shared BBufferGroup
in overlay mode. Added TODO, since it should be fixed
eventually. There seems to be a problem with mapping
the BBitmap area into a BBuffer (video stays black).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38834 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-28 11:04:07 +00:00
Stephan Aßmus
01e0d3278a * Use asynchronous bitmap drawing in VideoView. Wouldn't matter much, though.
* In SubtitleBitmap, if we ever take too long to generate a subtitle bitmap
   with the drop-shadow, fall back to outline mode. The StackBlurFilter is
   extremely fast, though, so there isn't a huge difference. It can fix some
   jumps in the video when switching subtitles in fullscreen mode, though.
 * Introduce overlay mode to SubpixelBitmap. It uses the black outline then
   and disables font anti-aliasing (just for the outline).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38833 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-28 10:57:54 +00:00
Philippe Houdoin
7fa49587bc Fix a bug in _UpdateList(), where the newest teams were not append at all due to
an out-of-range index passed to AddItem().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38832 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-28 10:36:40 +00:00
Stephan Aßmus
619ccfae94 * Removed a line of long-dead code.
* Make sure that turning off anti-aliased font rendering
   also works when subpixel-anti-aliasing is used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38831 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-28 10:33:51 +00:00
Stephan Aßmus
424c4f3bdf Fixed dead-lock when seeking with the video paused. Should come
up with something better...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38830 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-27 20:44:17 +00:00
Stephan Aßmus
ec646de243 Coding style fix.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38829 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-27 20:43:31 +00:00
Axel Dörfler
5c76afb025 * We need to ignore the result of update_capacity() in cd_init_device(), or else
one cannot open the device anymore if no media is present - this did also let
  the disk device manager ignore CD-ROMs in case there was no media present
  during boot. This fixes bug #6130.
* Disabled debug output again.
* Fixed missing newline in debug output.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38828 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-27 17:16:46 +00:00
Stephan Aßmus
c8ccdf5203 * Added basic support for SRT subtitle files. It only works
if the SRT file is placed alongside the current playlist
   item under the same name (sans extension). The name of the
   language is taken from the file which needs to be separated
   by a dot (should be improved).
 * Instead of the black outline, subtitles have a nice drop
   shadow now, which is easier on the eyes somehow.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38827 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-27 15:26:41 +00:00
Stephan Aßmus
4ad39ed76d * Improve clarity of some code.
* Preserve transparency of default color when color
   changes via tag.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38826 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-27 09:43:55 +00:00
Rene Gollent
f6d6a61645 Work around gcc2 limitation to fix build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38825 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-26 22:13:25 +00:00
Stephan Aßmus
ed74106bcb * Added more comments to the code.
* Cleanup ParseStates in case the input didn't have
   all closing tags.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38824 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-26 20:32:38 +00:00
Stephan Aßmus
676c1e9694 Let client applications set a DrawingMode() which will be the
default drawing mode for text rendering. Don't override it
with B_OP_COPY (still the default). Should not have any
consequences in any existing use-case. The MediaPlayer can
use BTextViews to render semi-transparent subtitles this way.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38823 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-26 20:25:57 +00:00
Stephan Aßmus
25fb0e67fd Added SubtitleBitmap class which can create a transparent
BBitmap from a subtitle line as found in SRT files. It
supports all tags except positioning (should probably be
handled in upper layers anyway). The parsing is simplistic
but should be robust. The layout of text is handled by an
offsreen BTextView. VideoView can be given a subtitle
string.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38822 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-26 20:24:04 +00:00
Stephan Aßmus
dce7934b8d Added support for one more non video/audio MIME type.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38821 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-26 20:21:28 +00:00
Scott McCreary
36f8666256 Removed make and mkdepend source files, and removed them from the Jamfile. These are now available as OptionalPackages grouped in DevelopmentBase
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38820 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-26 17:02:16 +00:00
Matt Madia
0a53d94bd5 Introduced a new variable HAIKU_CATALOGS_OBJECT_DIR. The catkeys and catalogs
are stored in signature-based subdirectories. This improves upon r37871 and
should allow BOM to properly harvest catkeys for online translation tools.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38819 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-26 16:55:06 +00:00
Scott McCreary
842b416b9b Update netsurf to 2.6, added libmng as a dependency for netsurf.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38818 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-26 16:26:55 +00:00
Matt Madia
413a591c78 80-char clean up. No functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38817 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-26 16:21:14 +00:00
Stephan Aßmus
a58469f56e Allow to set the false bold width in BTextView style runs.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38816 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-26 12:49:57 +00:00
Stephan Aßmus
b6d5916a70 Since a lot of MediaPlayer code would actually
not compile on BeOS anymore, I've removed the
BeOS versions from the rest of the source.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38815 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-26 09:52:20 +00:00
Stephan Aßmus
749df748eb Propagate the error from CreateBuffers() in Connected().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38814 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-26 09:45:07 +00:00
Scott McCreary
5722edeb67 Moved make and mkdepend to OptionalPackages, updated libtool to 2.4.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38813 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-25 16:21:22 +00:00
Stephan Aßmus
cc3a891e38 Only claim specific support for multi-media file types that
don't belong to the audio or video super type. All other files
should now open automatically with MediaPlayer since r38810
even without it claiming direct support for them.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38812 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-25 14:50:18 +00:00
Stephan Aßmus
a4b60639b1 Patch by plfiorini from ticket #4501. Untyped FLV movies
shall be auto-identified. Thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38811 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-25 14:47:58 +00:00
Stephan Aßmus
08ac2a4987 I don't quite understand why the preferred handler of
the super type is only regarded for "installed" MIME types.
The comment says that uninstalled MIME types are assumed
to be application MIME types, but this is clearly not always
the case. Initializing the secondary signature regardless
fixes the problem that unkown document MIME types open in
a random application, even though their super type has a
preferred handler. If the type is indeed an application
itself, I suppose no harm is done, since the primary
signature takes precedence anyway. Closes ticket #4501.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38810 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-25 14:43:25 +00:00
Siarzhuk Zharski
3b6fac7943 - yet another update of Russian locale files from Diver. Thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38809 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-24 20:47:35 +00:00
Stephan Aßmus
73dcf86fdc * Don't create Stream cookies for unsupported media formats.
Some test clips with sub-title tracks would hang MediaPlayer
   without this fix here.
 * Optimize FindKeyFrame() and Seek(), check the range between
   last requested/reported frame and bail out early with the
   same result. Seems to fix MediaPlayer starting to drop frames
   when it got caught up in a keyframe finding party...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38808 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-24 20:14:10 +00:00
Stephan Aßmus
af0f809b75 Rewrote finding keyframes and seeking. The problem was that
in many situations, FindKeyframe() was unable to reliably
predict what frame Seek() would be able to seek to.
 * Refactored a new base class StreamBase from the old
   StreamCookie, renamed StreamCookie to just Stream.
 * In FindKeyframe(), Stream will create a "ghost" StreamBase
   instance. That one will be used to actually seek in the
   stream without modifying the AVFormatContext of the real
   Stream. From that we can tell what position we can /really/
   seek to. For AVIs mostly, it is important to still use
   av_index_search_timestamp(), since for many AVIs I tested,
   reading the next packet after seeking did not produce a
   timestamp, however the index entry contained just the correct
   one. If the next packet does contain a PTS, it will still
   override the index timestamp, though.
 * Contrary to my previous belief, there was still a locking
   problem with how MediaPlayer used the BMediaTracks. The video
   decoding thread and the playback manager both used
   FindKeyframe() without holding the same lock. We support this
   now by using one BLocker per Stream. (The source BDataIO is
   still protected by another single lock.) With the new ghost
   stream stuff, the locking problem became much more of a problem,
   previously the FindKeyframe() had a much rarer race condition
   which would only trip when the decoding thread would cause new
   index entries to be inserted into the index.
 * Use the same ByteIOContext buffer size that avformat would be
   using if it initialized the ByteIOContext through other API.
 * Don't leak the probe buffer in case of error.
 * Don't leak the ByteIOContext buffer in the end.
 * Do not discard other stream packets anymore, this makes the
   ASF demuxer happy and ASF files can now be seeked as well as
   with ffplay itself.

With these changes, all my MPEG test streams work. Some could be seeked
before, but would show bad artifacts. Some streams would completely loose
video after seeking once. My MPEG2 test stream works much better now,
although audio is slightly out of sync, unfortunately. All my test AVIs
work as good as before, MP4 and MKV still work perfectly. The single
test ASF I got is now perfectly seekable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38807 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-24 16:54:42 +00:00
Stephan Aßmus
954d70d8c0 * Renamed fAudioTempPacket to fTempPacket and use it for calling
the new video decoding function. This just avoids a warning
   generated from the libavcodec sources. The function used before
   did the exact same thing...
 * Maintain fStartTime correctly in _DecodeVideo(). Don't overwrite
   it with a calculated starttime in Decode(). This will allow drift
   to bubble up to the higher layers.
 * Do not use the previously required hack to close and reopen the
   AVCodec after seeking. avcodec_flush_buffers() seems to work
   fine now, and for certain stream types (MPEG1, MPEG2 video for
   example) the keyframe is correctly used after seeking.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38806 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-24 16:40:56 +00:00
Stephan Aßmus
a92abad742 In the unexpected case that an extractor seeked forward while we actually
asked to seek backwards, cause us to produce silence. This fixes some
occasionally very unpleasant noise after seeking.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38805 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-24 16:35:11 +00:00
Clemens Zeidler
030345058e Handle layout items like glue correct. Update the preferred size constraint if a tab has been replaced. Fix coding style (thanks Axel).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38804 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-24 03:22:37 +00:00
Jérôme Duval
23395e2082 add ffsb (Flexible File System Benchmark) to the build (gcc4 only).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38803 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-23 17:55:34 +00:00
Rene Gollent
c6789116b7 Build fix.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38799 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-23 16:11:32 +00:00
Scott McCreary
9cd45f7edf Updated autoconf to 2.68
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38798 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-23 14:33:11 +00:00
Axel Dörfler
9157e52c88 * Improved VolumeControl snapping based on Stippi's snapping code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38797 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-23 08:45:38 +00:00
Clemens Zeidler
2adb769e33 Add the possibility to unset the aspect ratio again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38796 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-23 08:05:45 +00:00
Clemens Zeidler
19ddd4f1cb SetDefaultBehavior is not needed since all views handled in this function have min and max size equal the pref size (despite of the status bar length, which is ok). As a result they don't grow or shrink undesirable as assumed previously. As a result also the AutoPreferredContentSize is not needed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38795 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-23 07:57:40 +00:00
Clemens Zeidler
9576365d8f - Replace the obsolete AddArea functions by AddView functions.
- Add an additional layout approach for the Pinwheel which leads to the same result.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38794 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-23 07:18:49 +00:00
Clemens Zeidler
21f083af82 - Implement all Add* function of the BLayout class properly. If the Add* functions of the BLayout class are called add the item to the right upper corner of the previous area. That is at least better than ignore this functions.
- Add more convenience AddViewTo{Right, Left, Top, Bottom} functions to add a item to the sides of an existing area.
- Need to add the Jamfile hack again to include the ViewLayoutItem.h header. I thing about to add the ALMLayout.* files to the interface dir when its a little bit more matured. Then the problem will be solved. Till I made a decision or somebody tell me its a bad idea to add the ALMLayout to the official interface stuff or the ViewLayoutItem.h should be in a shared header dir I will keep this hack.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38793 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-23 07:16:49 +00:00
Clemens Zeidler
96e2013e70 Add inset and spacing to BALMLayout. Each Area is able to overwrite this global values and use his own inset. Add spacing and inset to the tests.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38792 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-23 00:53:33 +00:00
Clemens Zeidler
3ccba98ce3 Adjust the test apps.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38791 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-23 00:04:50 +00:00
Clemens Zeidler
40d939a43f - Add some checks if the Area is initialized.
- Init some more variables in the constructor.
- Rename HasSame*As to Set*As. The old one is more a question. Also add an optional factor and remove the HasSameSizeAs function which tempt the user to leak a BList.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38790 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-23 00:04:08 +00:00
Clemens Zeidler
a2336b86cc Round the the window move target positions, this should fix jumping windows.
Coding style.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38789 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-22 22:27:31 +00:00
Clemens Zeidler
9503cf19be - Don't pass a min size in the Area _Init function. The min size is updated before solving the layout so we don't have to set it in the beginning. This also simplifies the BALMLayout api.
- Header include style fixes.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38788 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-22 21:53:32 +00:00
Philippe Houdoin
30c47afa79 Fix memory leak + style cleanup. Thanks Axel!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38787 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-22 11:23:14 +00:00
Stephan Aßmus
c1e73fbf52 Enabled any and all decoders and demuxers which are currently compiled into
FFmpeg. It's a bit sad, but this obsoletes pretty much all other decoder
and reader plugins. Some of them were built on external libraries as well
(AC3 (not part of default image anyway, since it's GPL), APE, MusePack),
so it's not really a big difference to using FFmpeg as external library.
The format matching is greatly simplified by using B_MISC_FORMAT_FAMILY
for everything but raw audio, and the actual FFmpeg CodecID as codec tag.
The downside of this is that the AVFormatReader can no longer be used with
other decoder plugins, but it would be easy to add special cases for native
decoders we wish to support. Obviously the out of the box support for file
formats and decoders has greatly increased with this change, so there has
to be a pretty good reason now for writing a "native" decoder or reader.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38786 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-22 11:10:51 +00:00
Philippe Houdoin
190108e9c9 Add missing allocation checks where needed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38785 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-22 10:50:08 +00:00