History log of /haiku/src/kits/media/MediaExtractor.cpp
Revision Date Author Comments
# 67eeb4db 13-Jan-2021 Máximo Castañeda <antiswen@yahoo.es>

MediaExtractor: go back to 3MB min cache size

Should allow us to at least play the same files we could play before.

Fixes #16738, though not its cause

Change-Id: I2d23011696b730a891c802e8c2bfc23afe0041cf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3628
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 7f9c6756 05-Jan-2021 Máximo Castañeda <antiswen@yahoo.es>

MediaExtractor: access chunk cache only when we have it

Change-Id: I533bb2e25b0756acaaa227cdd06c4067d4120066
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3622
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# d753645e 06-Jan-2021 Adrien Destugues <adrien.destugues@opensource.viveris.fr>

MediaExtractor: fix cache size computation for audio

Untested. If audio is not decoding well, try increasing the constant.

Change-Id: I151764e6bb3e69088904d33bfeb683bf0569bd23
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3605
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>


# 6b49a15b 03-Jan-2021 Alexander von Gluck IV <kallisti5@unixzen.com>

media_kit: Dynamic allocation of ChunkCache based on media

* The "default" of 3MiB wasn't enough for modern larger media
formats, resulting in inability to play 4k video no matter
how much horse power you threw at Haiku. (4k is ~8MiB)
* This dynamically calculates the ChunkCache based on the
video framesize * 2.
* 4k video now plays smoothly on my Ryzen 1800x.

Change-Id: I65bf6bd6fa60ac3196ea70eeeb5e655d43c10bcd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3598
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 727e49c6 12-Jul-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

Media Kit: remove MediaExtractor::Source

The idea was that the Media Extractor could wrap the original source
given by BMediaTrack, but all operations on the data go through
MediaExtractor anyway.
We could probably move ownership of the BDataIO completely into
MediaExtractor instead.

Change-Id: I846b34b543fb983e60f6adf86cb17e835303267b
Reviewed-on: https://review.haiku-os.org/c/1587
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>


# 218a8c03 17-May-2019 Augustin Cavalier <waddlesplash@gmail.com>

Revert the Codec Kit.

All of Barrett's individual reverts have been squashed into this
one commit, save a few actual bugfixes.

Change-Id: Ib0a7d0a841d3ac40b1fca7372c58b7f9229bd1f0


# b84955d4 23-Oct-2018 Barrett17 <b.vitruvio@gmail.com>

media: Remove debug.h, finalize MediaDebug.h

* Funny rust from 0 AD.


# 12ed45b6 18-May-2018 Murai Takashi <tmurai01@gmail.com>

Media kit: Suppress -Werror=class-memaccess

* Add media_format::Clear(), media_format::Unflatten().
* Replace memset() with media_format::Clear()
* Replace memcpy() with media_format::Unflatten()

Fix #14156

Change-Id: I38ebc2de4915b954a15b6f4f6b40d016506910e5


# dbad909b 24-Jul-2017 Jérôme Duval <jerome.duval@gmail.com>

BMediaFile: fix MediaExtractor crash.

* stop the extractor processing before deleting the source.
* crash happened in MediaPlayer FilePlaylistItem::_CalculateDuration().
* was a regression introduced in hrev50671.
* fixes #13156.


# 9198105d 04-May-2017 Dario Casalinuovo <b.vitruvio@gmail.com>

MediaWriter/MediaExtractor: Remove BUrl constructors


# 4dd09daf 24-Jun-2016 Dario Casalinuovo <b.vitruvio@gmail.com>

Streaming: Use const reference in place of copying

* Thanks to Markus for reporting.


# 0ba82236 24-Jun-2016 Dario Casalinuovo <b.vitruvio@gmail.com>

Streaming: Remove any pointer BUrl argument

* There's no need to pass BUrl by pointer, this is
potentially dangerous and leaky without any advantage,
copying is definitely safer.


# 6646363e 16-May-2016 Dario Casalinuovo <b.vitruvio@gmail.com>

MediaExtractor: The source is always owned by BMediaFile

* While originally I think it was a good idea to make it own the source,
then I decided to uniform the code by making the BMediaFile to be the
only responsible of that.


# 22c93142 14-Mar-2016 Dario Casalinuovo <b.vitruvio@gmail.com>

MediaExtractor/PluginManager: Add plugin deletion when extractor die


# a2b3f126 25-Mar-2016 Dario Casalinuovo <b.vitruvio@gmail.com>

MediaExtractor: Adapt to new BUrl functionality


# 332cc6bc 30-Nov-2012 Axel Dörfler <axeld@pinc-software.de>

64 bit fixes for libmedia.so, ActivityMonitor, and Sudoku.

* Alex, I feel your pain :-)


# cae9b9d8 20-Nov-2010 Jérôme Duval <korli@users.berlios.de>

correctly initialize fStreamInfo[i].hasCookie


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39545 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7cd3a249 17-Sep-2010 Stephan Aßmus <superstippi@gmx.de>

Implemented an API to get arbitrary meta-data about
BMediaFiles and about BMediaTracks in BMessages. As an
example, one can get chapter meta-data or the language
name of an audio-track.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38685 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d21b5588 14-Sep-2010 Stephan Aßmus <superstippi@gmx.de>

For full HD clips, the real-time memory chunk cache
was not big enough. Axel, perhaps another solution is
better? Would you prefer the chunk cache to fall-back
to regular memory and keep track of allocation type?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38649 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e4f3cf20 24-Aug-2010 Stephan Aßmus <superstippi@gmx.de>

* Renamed _plugin_manager to gPluginManager.
* Improved tracing in PluginManager.cpp when loading an add-on.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38330 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 33671742 12-Jan-2010 Stephan Aßmus <superstippi@gmx.de>

We definitely don't want a global lock, even when not using the chunk cache.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35029 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2a9896ce 12-Dec-2009 David McPaul <dlmcpaul@gmail.com>

switch to use STL containers, limit to 10 cache entries, don't clear cache on findkeyframe, removed inflight list as it was not needed, report error conditions better. This makes video work again

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34650 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ebe97b7c 01-Dec-2009 Axel Dörfler <axeld@pinc-software.de>

* The ChunkCache is now using the real time memory functions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34420 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ea151a7f 27-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* Initialize your members!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34302 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4d89dfc7 25-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* Completely rewrote the ChunkCache - the previous version had some issues with
regards to locking and seeking.
* Furthermore, we now not only cache 4 chunks, but chunk up to a certain
memory size (MediaExtractor uses 1 MB for now).
* Since I still have occasional hickups, it looks like this wasn't the main
cause for our audio problems. Still, this will reduce drive access
considerably during play.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34243 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 608d959d 25-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* ChunkCache::fLocker is now aggregated.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34239 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1d984896 21-Oct-2009 Michael Lotz <mmlr@mlotz.ch>

Name the lockers to be able to identify them when debugging/analyzing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33706 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 37b6b027 30-Jul-2009 Stephan Aßmus <superstippi@gmx.de>

Small cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31984 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7670d409 01-Nov-2008 David McPaul <dlmcpaul@gmail.com>

put TODO in front of my todo comment

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28448 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4dc9c4a5 31-Oct-2008 David McPaul <dlmcpaul@gmail.com>

added a possible todo

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28415 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ac847fc8 15-Aug-2008 David McPaul <dlmcpaul@gmail.com>

Don't call Reader methods with invalid cookies

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26986 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 642695c2 06-Jun-2008 Rene Gollent <anevilyak@gmail.com>

Build fix.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25827 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ae4ebbcc 06-Jun-2008 Stephan Aßmus <superstippi@gmx.de>

* Use NULL instead of 0 for some pointer initializations.
* Slightly more debug output for failed atempts to create a decoder.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25825 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8b1e3b1a 07-May-2008 Maurice Kalinowski <mauricek@nowhere.fake>

- Implemented MediaExtractor::Copyright, which just calls the instantiated reader
- Implemented BMediaFile::Copyright, which just calls Copyright() of the extractor. So this is just a simple pass through.
- Style cleanup (mostly whitespaces)

Problem is that our readers currently return the copyright of the source code, not the copyright of the MediaFile itself, like the BeBook documents. Thus, we might need to change all readers to return appropiate data or behave differently for Haiku readers.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25356 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d830aa92 20-Mar-2008 Stephan Aßmus <superstippi@gmx.de>

* Added FindKeyFrame() method to MediaExtractor, it is similar to Seek(),
but operates "read-only".
* Added FindKeyFrame() method to ReaderPlugin, see above.
* Reformated ReaderPlugin header. Added const qualifier to Source() method.
* Small cleanups in BMediaTrack::SeekToTime() and SeekToFrame(). Added TODOs
with regards to "seeking" in decoders, wich should IMHO be revised. (Codecs
cannot seek in the stream, they only get fed chunk data. The only thing they
can do is reset themselves in preparation for a discontinuity of the chunk
data...)
* Implemented BMediaTrack::FindKeyframeByXX() methods via the new
MediaExtractor::FindKeyFrame() method.
* Implemented Seek() and FindKeyFrame() methods in the Reader base class,
returning B_NOT_SUPPORTED. I think this makes sense and also I don't have
to adapt all existing Reader plugins for the new FindKeyFrame() call. :-)
* Implemeneted FindKeyFrame() in the avi_reader. The OpenDMLFile class
gets Seek() extended for a "read-only" mode. Currently the implementation
is broken (as before) with regards to keyframes. These were ignored before
and I have not changed them to actually support the seek flags with regards
to keyframes. That's the interesting TODO...
* Some reformatting here and there in avi_reader code, sorry for the mixup.
The only actual change is the support for the read-only flag to Seek().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24495 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4a46d818 19-Mar-2008 Stephan Aßmus <superstippi@gmx.de>

* Implemented ERROR as fprintf(stderr, ...) with tracing turned off as well.
* Fixed all but one compiler warnings in libmedia.so.
* Truncated lines to 80 char width where I looked at code.
* Turned printf()s into TRACE/ERROR calls in MediaExtractor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24478 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1d182929 02-Jun-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

Moved creating and destroying of Reader and Decoder plugins into the PluginManager class.
Removed deferred initialization from BMediaDecoder.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21296 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0d1adad3 29-Jun-2005 Marcus Overhagen <marcusoverhagen@gmail.com>

Media Codec API just got a visit from the coding style police.
We now use "const" for the chunk buffer pointer returned by GetNextChunk,
because the buffer is not supposed to be modified by the codec.
size_t is used for the size where applicable. This matches BMediaDecoder.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13361 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5f8e8854 19-Jun-2005 David McPaul <dlmcpaul@gmail.com>

Turned chunk cache back on

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13208 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 215c91df 10-Jun-2005 David McPaul <dlmcpaul@gmail.com>

Added mov_reader to media kit - Very Alpha

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13046 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1a1da948 20-Nov-2004 beveloper <beveloper@nowhere.fake>

removed ChunkCache.h from shared private include files


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10072 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f944d8fb 07-Nov-2004 beveloper <beveloper@nowhere.fake>

avoid reading tracks which are not supported by the reader


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9829 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bf0aa2f9 24-Oct-2004 beveloper <beveloper@nowhere.fake>

added support to disable the chunk cache for debugging


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9487 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f14dfaa7 24-Oct-2004 beveloper <beveloper@nowhere.fake>

Completed implementation of chunk caching. Playback from harddisk is now much better, crackling should be gone.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9485 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 26dc029a 24-Oct-2004 beveloper <beveloper@nowhere.fake>

Added an extra thread for chunk extraction. Using the ChunkCache, the ReadFrames call no longer needs to wait for the extractor, but can read it from a cache.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9481 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0a7ddfb5 23-Oct-2004 beveloper <beveloper@nowhere.fake>

Style changes. I obviously didn't save the caching changes done at Begeistert 13 :-(


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9466 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c8f5115b 29-Feb-2004 beveloper <beveloper@nowhere.fake>

call FreeCookie() on 0 cookies, too


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6813 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ec276f43 16-Feb-2004 beveloper <beveloper@nowhere.fake>

bugfix


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6609 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0f2976ab 30-Jan-2004 beveloper <beveloper@nowhere.fake>

small api changes


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6439 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 68b80bbd 23-Jan-2004 Axel Dörfler <axeld@pinc-software.de>

Slightly improved error reporting for CreateDecoder (now with error code).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6238 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bc3a0b6c 18-Jan-2004 shatty <shatty@nowhere.fake>

implement MediaDecoder, MediaExtractor using added ChunkProvider


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6137 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8d52474b 08-Dec-2003 beveloper <beveloper@nowhere.fake>

a couple of fixes to the error handling code


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5631 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2d923d67 07-Dec-2003 beveloper <beveloper@nowhere.fake>

fixed playback of small files by properly returning errors


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5617 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 25305239 06-Dec-2003 beveloper <beveloper@nowhere.fake>

codec output format negotiation has been moved into NegotiateOutputFormat,
Setup is now only called once


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5596 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4cbbc5a9 05-Dec-2003 beveloper <beveloper@nowhere.fake>

small cleanup, format type and encoding depends on the description
and is set by the media kit, not by the reader


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5584 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c90d2752 05-Dec-2003 beveloper <beveloper@nowhere.fake>

fixed crash in BMediaFile destructor


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5582 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d0b86c0f 05-Dec-2003 beveloper <beveloper@nowhere.fake>

mp3 decoding and seeking works now


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5581 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1210ab70 04-Dec-2003 beveloper <beveloper@nowhere.fake>

Huge hack to load the mp3 reader and decoder.
Soundplay loads it and can play a crackling mp3, but MediaPlayer doesn't


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5572 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0f741a83 01-Dec-2003 beveloper <beveloper@nowhere.fake>

more codec api enhancements


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5523 a95241bf-73f2-0310-859d-f6bbb57e9c96


# da87cefe 28-Nov-2003 beveloper <beveloper@nowhere.fake>

added the new media_meta_description and changed codec API to use it


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5494 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7a115dc7 23-Nov-2003 beveloper <beveloper@nowhere.fake>

integrating codec API, added some MediaExtractor functionality


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5470 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d8591482 23-Nov-2003 beveloper <beveloper@nowhere.fake>

integration of codec API into BMediaFile and BMediaTrack


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5468 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 332cc6bc3b696473169bb9e43340b69a0a3fc4f1 30-Nov-2012 Axel Dörfler <axeld@pinc-software.de>

64 bit fixes for libmedia.so, ActivityMonitor, and Sudoku.

* Alex, I feel your pain :-)


# cae9b9d83a8318c86c7b8ab2f7f74422af3b0830 20-Nov-2010 Jérôme Duval <korli@users.berlios.de>

correctly initialize fStreamInfo[i].hasCookie


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39545 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7cd3a2490b94cecc15ce451c8d1c97c04dc852bd 17-Sep-2010 Stephan Aßmus <superstippi@gmx.de>

Implemented an API to get arbitrary meta-data about
BMediaFiles and about BMediaTracks in BMessages. As an
example, one can get chapter meta-data or the language
name of an audio-track.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38685 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d21b55880b64f087ed54603edcdec141be9826ce 14-Sep-2010 Stephan Aßmus <superstippi@gmx.de>

For full HD clips, the real-time memory chunk cache
was not big enough. Axel, perhaps another solution is
better? Would you prefer the chunk cache to fall-back
to regular memory and keep track of allocation type?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38649 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e4f3cf203ce3aa7bd0422cac0931052261a398b5 24-Aug-2010 Stephan Aßmus <superstippi@gmx.de>

* Renamed _plugin_manager to gPluginManager.
* Improved tracing in PluginManager.cpp when loading an add-on.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38330 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 33671742a50cdb431fb02afb50cd3f66d84be5e6 12-Jan-2010 Stephan Aßmus <superstippi@gmx.de>

We definitely don't want a global lock, even when not using the chunk cache.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35029 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2a9896ce478f061890a65d57d6985f0c571c6df1 12-Dec-2009 David McPaul <dlmcpaul@gmail.com>

switch to use STL containers, limit to 10 cache entries, don't clear cache on findkeyframe, removed inflight list as it was not needed, report error conditions better. This makes video work again

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34650 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ebe97b7cee5305dd28278b00c2371129a999fe11 01-Dec-2009 Axel Dörfler <axeld@pinc-software.de>

* The ChunkCache is now using the real time memory functions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34420 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ea151a7f6affed337cd58b7ffbce1d6289e323c5 27-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* Initialize your members!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34302 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4d89dfc7120e69ad02437f4e29e21e46adc2ac98 25-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* Completely rewrote the ChunkCache - the previous version had some issues with
regards to locking and seeking.
* Furthermore, we now not only cache 4 chunks, but chunk up to a certain
memory size (MediaExtractor uses 1 MB for now).
* Since I still have occasional hickups, it looks like this wasn't the main
cause for our audio problems. Still, this will reduce drive access
considerably during play.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34243 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 608d959d73310517f846311cf8493f1206e9ef1c 25-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* ChunkCache::fLocker is now aggregated.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34239 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1d984896daa02be19ee98a54ce8d34fa1af010a3 21-Oct-2009 Michael Lotz <mmlr@mlotz.ch>

Name the lockers to be able to identify them when debugging/analyzing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33706 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 37b6b027ef257412215a31f318d7377330f4ba67 30-Jul-2009 Stephan Aßmus <superstippi@gmx.de>

Small cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31984 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7670d4094c75db73388601a5fb541b3ccccad869 01-Nov-2008 David McPaul <dlmcpaul@gmail.com>

put TODO in front of my todo comment

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28448 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4dc9c4a55eab52b296bb3756698cddd4d01d4f10 31-Oct-2008 David McPaul <dlmcpaul@gmail.com>

added a possible todo

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28415 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ac847fc895473824acd118d4f99ed0a07841e7aa 15-Aug-2008 David McPaul <dlmcpaul@gmail.com>

Don't call Reader methods with invalid cookies

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26986 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 642695c2fee0d4b23449b4063bfc592bb0b2ca61 06-Jun-2008 Rene Gollent <anevilyak@gmail.com>

Build fix.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25827 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ae4ebbcca62e1f32933c3e6846c20b2ff5044af4 06-Jun-2008 Stephan Aßmus <superstippi@gmx.de>

* Use NULL instead of 0 for some pointer initializations.
* Slightly more debug output for failed atempts to create a decoder.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25825 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8b1e3b1af881f935640c1f4b78f8a0c158168754 07-May-2008 Maurice Kalinowski <mauricek@nowhere.fake>

- Implemented MediaExtractor::Copyright, which just calls the instantiated reader
- Implemented BMediaFile::Copyright, which just calls Copyright() of the extractor. So this is just a simple pass through.
- Style cleanup (mostly whitespaces)

Problem is that our readers currently return the copyright of the source code, not the copyright of the MediaFile itself, like the BeBook documents. Thus, we might need to change all readers to return appropiate data or behave differently for Haiku readers.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25356 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d830aa92ce5e5063357b44483277e931f0276307 20-Mar-2008 Stephan Aßmus <superstippi@gmx.de>

* Added FindKeyFrame() method to MediaExtractor, it is similar to Seek(),
but operates "read-only".
* Added FindKeyFrame() method to ReaderPlugin, see above.
* Reformated ReaderPlugin header. Added const qualifier to Source() method.
* Small cleanups in BMediaTrack::SeekToTime() and SeekToFrame(). Added TODOs
with regards to "seeking" in decoders, wich should IMHO be revised. (Codecs
cannot seek in the stream, they only get fed chunk data. The only thing they
can do is reset themselves in preparation for a discontinuity of the chunk
data...)
* Implemented BMediaTrack::FindKeyframeByXX() methods via the new
MediaExtractor::FindKeyFrame() method.
* Implemented Seek() and FindKeyFrame() methods in the Reader base class,
returning B_NOT_SUPPORTED. I think this makes sense and also I don't have
to adapt all existing Reader plugins for the new FindKeyFrame() call. :-)
* Implemeneted FindKeyFrame() in the avi_reader. The OpenDMLFile class
gets Seek() extended for a "read-only" mode. Currently the implementation
is broken (as before) with regards to keyframes. These were ignored before
and I have not changed them to actually support the seek flags with regards
to keyframes. That's the interesting TODO...
* Some reformatting here and there in avi_reader code, sorry for the mixup.
The only actual change is the support for the read-only flag to Seek().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24495 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4a46d818c918c1e320c1593accac547849793222 19-Mar-2008 Stephan Aßmus <superstippi@gmx.de>

* Implemented ERROR as fprintf(stderr, ...) with tracing turned off as well.
* Fixed all but one compiler warnings in libmedia.so.
* Truncated lines to 80 char width where I looked at code.
* Turned printf()s into TRACE/ERROR calls in MediaExtractor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24478 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1d18292953efe255c6d4b365db6a61473acc0b12 02-Jun-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

Moved creating and destroying of Reader and Decoder plugins into the PluginManager class.
Removed deferred initialization from BMediaDecoder.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21296 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0d1adad317d12e39380ee4876ca4b36fd7814901 29-Jun-2005 Marcus Overhagen <marcusoverhagen@gmail.com>

Media Codec API just got a visit from the coding style police.
We now use "const" for the chunk buffer pointer returned by GetNextChunk,
because the buffer is not supposed to be modified by the codec.
size_t is used for the size where applicable. This matches BMediaDecoder.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13361 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5f8e88545ec7803cfa5940ea056b3c659e461445 19-Jun-2005 David McPaul <dlmcpaul@gmail.com>

Turned chunk cache back on

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13208 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 215c91dfb16672b9d1787905ff352e427508399c 10-Jun-2005 David McPaul <dlmcpaul@gmail.com>

Added mov_reader to media kit - Very Alpha

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13046 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1a1da94839b8b9c7150e5a43c4bd1ab4d6278a1b 20-Nov-2004 beveloper <beveloper@nowhere.fake>

removed ChunkCache.h from shared private include files


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10072 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f944d8fb3f17d65bb59313bf6a540cbdbad2936e 07-Nov-2004 beveloper <beveloper@nowhere.fake>

avoid reading tracks which are not supported by the reader


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9829 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bf0aa2f9bba6ee3060b102d367d640d64a483490 24-Oct-2004 beveloper <beveloper@nowhere.fake>

added support to disable the chunk cache for debugging


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9487 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f14dfaa7b961af138737d0e09cd80ae61a29c9aa 24-Oct-2004 beveloper <beveloper@nowhere.fake>

Completed implementation of chunk caching. Playback from harddisk is now much better, crackling should be gone.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9485 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 26dc029a11c06b7f45881ed325718bea7e12e130 24-Oct-2004 beveloper <beveloper@nowhere.fake>

Added an extra thread for chunk extraction. Using the ChunkCache, the ReadFrames call no longer needs to wait for the extractor, but can read it from a cache.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9481 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0a7ddfb5ee49c0de2ea9dbc0e2d45408be05da84 23-Oct-2004 beveloper <beveloper@nowhere.fake>

Style changes. I obviously didn't save the caching changes done at Begeistert 13 :-(


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9466 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c8f5115b32293bb50b87f180931aefb66e8418d6 29-Feb-2004 beveloper <beveloper@nowhere.fake>

call FreeCookie() on 0 cookies, too


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6813 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ec276f43a0acd83d363cc0d33321893be88225f9 16-Feb-2004 beveloper <beveloper@nowhere.fake>

bugfix


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6609 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0f2976ab26aa8e7b8c006088718616338f21563d 30-Jan-2004 beveloper <beveloper@nowhere.fake>

small api changes


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6439 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 68b80bbdb9701ea470dd78037dee4c6e9694f959 23-Jan-2004 Axel Dörfler <axeld@pinc-software.de>

Slightly improved error reporting for CreateDecoder (now with error code).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6238 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bc3a0b6ccd386c42d9fc9dbf688d5a99ad7240a6 18-Jan-2004 shatty <shatty@nowhere.fake>

implement MediaDecoder, MediaExtractor using added ChunkProvider


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6137 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8d52474bc70c165c0cd4217af59d148ed810fa11 08-Dec-2003 beveloper <beveloper@nowhere.fake>

a couple of fixes to the error handling code


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5631 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2d923d67f0efa29141b3d86619741f93b932c151 07-Dec-2003 beveloper <beveloper@nowhere.fake>

fixed playback of small files by properly returning errors


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5617 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2530523976c41f4c5219b00cd5a328b84ce6d38d 06-Dec-2003 beveloper <beveloper@nowhere.fake>

codec output format negotiation has been moved into NegotiateOutputFormat,
Setup is now only called once


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5596 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4cbbc5a9ec5f23e25ca7184e0b7cfad1359ea7ad 05-Dec-2003 beveloper <beveloper@nowhere.fake>

small cleanup, format type and encoding depends on the description
and is set by the media kit, not by the reader


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5584 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c90d27529261467fff5c547985551da5cbd4975f 05-Dec-2003 beveloper <beveloper@nowhere.fake>

fixed crash in BMediaFile destructor


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5582 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d0b86c0f31ec58c29fdce972f8e892235c22768b 05-Dec-2003 beveloper <beveloper@nowhere.fake>

mp3 decoding and seeking works now


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5581 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1210ab70ac360af3e24f04ef2a1fa5bdef4f0b70 04-Dec-2003 beveloper <beveloper@nowhere.fake>

Huge hack to load the mp3 reader and decoder.
Soundplay loads it and can play a crackling mp3, but MediaPlayer doesn't


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5572 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0f741a83c13166cac9f5dc011c3bb47e12405033 01-Dec-2003 beveloper <beveloper@nowhere.fake>

more codec api enhancements


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5523 a95241bf-73f2-0310-859d-f6bbb57e9c96


# da87cefeb10b3b0c5214090e6c6dedb02d24a798 28-Nov-2003 beveloper <beveloper@nowhere.fake>

added the new media_meta_description and changed codec API to use it


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5494 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7a115dc75d33962f3c66fa5d49c163b82873ccae 23-Nov-2003 beveloper <beveloper@nowhere.fake>

integrating codec API, added some MediaExtractor functionality


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5470 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d859148201db6e851ba0a8ed96b12af21fbf06c0 23-Nov-2003 beveloper <beveloper@nowhere.fake>

integration of codec API into BMediaFile and BMediaTrack


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5468 a95241bf-73f2-0310-859d-f6bbb57e9c96