History log of /haiku/src/kits/media/BufferGroup.cpp
Revision Date Author Comments
# 964cab46 10-Aug-2019 Augustin Cavalier <waddlesplash@gmail.com>

media: Set B_CLONEABLE_AREA where applicable.

Cloning cloned buffers seems especially strange, but
apparently it is actually done. The buffer management
code really needs to be cleaned up...


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

media: Remove debug.h, finalize MediaDebug.h

* Funny rust from 0 AD.


# 8bffda16 21-Sep-2015 Dario Casalinuovo <b.vitruvio@gmail.com>

media_kit: Allow to set a NULL buffer group. Fixes #12305.


# 280c64a9 14-Apr-2015 Dario Casalinuovo <b.vitruvio@gmail.com>

BBufferGroup: rework init error handling


# 1cc20d82 14-Apr-2015 Dario Casalinuovo <b.vitruvio@gmail.com>

BBufferGroup: Check for duplicated buffer id

* This exclude some possible cheating cases.
It impose to have only a buffer_id per thread,
so instances will not be duplicated if not needed.


# f50d7408 14-Apr-2015 Dario Casalinuovo <b.vitruvio@gmail.com>

BBufferGroup::GetBufferList: avoid dynamic allocation


# 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 :-)


# 2f9ed888 05-Dec-2009 Axel Dörfler <axeld@pinc-software.de>

* The SharedBufferList is now only cloned once in a team, no longer once for
each buffer, and once for each buffer group.
* Also, SharedBufferList::Get() now gets the area to clone from itself, if
necessary, the caller no longer has to provide it.


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


# 9dec2310 05-Dec-2009 Axel Dörfler <axeld@pinc-software.de>

Sorry for this large commit in advance; it's not really possible to divide this
into smaller parts:

media_addon_server:
* Removed (broken) use of (broken and inefficient) home-brewn Map, and List
classes. This also fixes a crash on shutdown when used with the malloc_debug
implementation. It's using stl::vector, and stl::map now instead.

_shared_buffer_list:
* Renamed _shared_buffer_list to SharedBufferList, and put it into the BPrivate
namespace. Also, made a class out of it.
* Separated shared buffer list creation from cloning.
* Enlarged maximum number of buffers to something that is not that evil, but
actually uses the space it has (ie. is a useful multiple of
shared_buffer_info that fills a multiple of B_PAGE_SIZE as much as possible).
* No longer drops into the debugger if the
* The list that is currently used is very inefficient for the features it
provides though (no change there).

_buffer_id_cache:
* Renamed to BufferCache, and put it into the private namespace
* It now deletes its buffers on deletion; since the BBufferConsumer will be
gone, too, at this point, there is little chance that there are still buffers
in use.
* Also, it's now using std::map instead of the (see above) Map class.

BBuffer:
* Got rid of the fBufferID member.

Misc.:
* Got rid of the global "team" variable; the media kit is now using the
private app kit's current_team() now.
* Added a lot of missing error checks (mostly memory allocations).
* Renamed fields like "flavorid" to flavor_id, renamed "dfi_*" fields to
something more detailed.
* Moved ServerInterface.h from src/servers/media/ to headers/private/media.
* Notifications.h was not self contained.
* Added missing licenses.
* Lots of cleanups, and coding style fixes.

What this doesn't fix:
* Bug #4954 which started all this (this comes next, though)
* Deinitialization is broken, as the PortPool is uninitialized too early, and
still used afterwards.
* The strange add-on monitoring code in the media_addon_server


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


# a2128487 05-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Rewrote BBufferGroup header.
* Cleaned up the source file, no functional change (intended).


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


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

fixed assigned BBuffer size, the size of a buffer is now the requested size, not the allocated size


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


# d91580cd 30-Aug-2003 beveloper <beveloper@nowhere.fake>

removed/fixed warnings


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


# 5ac4fbd7 19-Jun-2003 beveloper <beveloper@nowhere.fake>

clean up of debugging functions
FATAL is now replaced by ERROR and active at DEBUG=1 or above
TRACE is active at 2 or above
PRINT(level, ...) can be used for DEBUG= level or abode
INFO is removed


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


# 255a01c7 14-Apr-2003 beveloper <beveloper@nowhere.fake>

Added a new license to this file, as I'm the author.


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


# 76669a29 08-Dec-2002 beveloper <beveloper@nowhere.fake>

changed use of port communication, debugging functions, map, list and stack


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


# 353b9f6b 02-Dec-2002 beveloper <beveloper@nowhere.fake>

changed map and list templates to be more useable, however, they will
be rewritten soon. Changed debugging macros and use of them, too.
Also replaced the linked lists in the BufferManager (which were complicated,
but working ok) with template based ones.


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


# 41ba915d 23-Nov-2002 beveloper <beveloper@nowhere.fake>

various small changes


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


# f4925104 01-Oct-2002 beveloper <beveloper@nowhere.fake>

changed media kit internal messaging and notification support


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


# 0a483e72 11-Jul-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed includes.


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


# 52a38012 08-Jul-2002 ejakowatz <ejakowatz@nowhere.fake>

It is accomplished ...


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


# 8bffda1633c2ada9ae685b6ec0066834d317e2bb 21-Sep-2015 Dario Casalinuovo <b.vitruvio@gmail.com>

media_kit: Allow to set a NULL buffer group. Fixes #12305.


# 280c64a92ff6876760abeb4ca9097795b40efc3f 14-Apr-2015 Dario Casalinuovo <b.vitruvio@gmail.com>

BBufferGroup: rework init error handling


# 1cc20d8231bde733e30716f0980f19d8bf6b1d24 14-Apr-2015 Dario Casalinuovo <b.vitruvio@gmail.com>

BBufferGroup: Check for duplicated buffer id

* This exclude some possible cheating cases.
It impose to have only a buffer_id per thread,
so instances will not be duplicated if not needed.


# f50d7408b5407052b1a0f743a17a360d64626ccc 14-Apr-2015 Dario Casalinuovo <b.vitruvio@gmail.com>

BBufferGroup::GetBufferList: avoid dynamic allocation


# 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 :-)


# 2f9ed888a24130579b97509580f351ce2620c9b8 05-Dec-2009 Axel Dörfler <axeld@pinc-software.de>

* The SharedBufferList is now only cloned once in a team, no longer once for
each buffer, and once for each buffer group.
* Also, SharedBufferList::Get() now gets the area to clone from itself, if
necessary, the caller no longer has to provide it.


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


# 9dec23104287e2fd592cc14148b43fb28a6e1d8e 05-Dec-2009 Axel Dörfler <axeld@pinc-software.de>

Sorry for this large commit in advance; it's not really possible to divide this
into smaller parts:

media_addon_server:
* Removed (broken) use of (broken and inefficient) home-brewn Map, and List
classes. This also fixes a crash on shutdown when used with the malloc_debug
implementation. It's using stl::vector, and stl::map now instead.

_shared_buffer_list:
* Renamed _shared_buffer_list to SharedBufferList, and put it into the BPrivate
namespace. Also, made a class out of it.
* Separated shared buffer list creation from cloning.
* Enlarged maximum number of buffers to something that is not that evil, but
actually uses the space it has (ie. is a useful multiple of
shared_buffer_info that fills a multiple of B_PAGE_SIZE as much as possible).
* No longer drops into the debugger if the
* The list that is currently used is very inefficient for the features it
provides though (no change there).

_buffer_id_cache:
* Renamed to BufferCache, and put it into the private namespace
* It now deletes its buffers on deletion; since the BBufferConsumer will be
gone, too, at this point, there is little chance that there are still buffers
in use.
* Also, it's now using std::map instead of the (see above) Map class.

BBuffer:
* Got rid of the fBufferID member.

Misc.:
* Got rid of the global "team" variable; the media kit is now using the
private app kit's current_team() now.
* Added a lot of missing error checks (mostly memory allocations).
* Renamed fields like "flavorid" to flavor_id, renamed "dfi_*" fields to
something more detailed.
* Moved ServerInterface.h from src/servers/media/ to headers/private/media.
* Notifications.h was not self contained.
* Added missing licenses.
* Lots of cleanups, and coding style fixes.

What this doesn't fix:
* Bug #4954 which started all this (this comes next, though)
* Deinitialization is broken, as the PortPool is uninitialized too early, and
still used afterwards.
* The strange add-on monitoring code in the media_addon_server


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


# a21284874f536bd4d180b28d66d395f7550fcb00 05-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Rewrote BBufferGroup header.
* Cleaned up the source file, no functional change (intended).


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


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

fixed assigned BBuffer size, the size of a buffer is now the requested size, not the allocated size


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


# d91580cd9a9f39e74f086d5ca31d997a56c111a9 30-Aug-2003 beveloper <beveloper@nowhere.fake>

removed/fixed warnings


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


# 5ac4fbd70dc5b5387cc80965de796deb820d4f05 19-Jun-2003 beveloper <beveloper@nowhere.fake>

clean up of debugging functions
FATAL is now replaced by ERROR and active at DEBUG=1 or above
TRACE is active at 2 or above
PRINT(level, ...) can be used for DEBUG= level or abode
INFO is removed


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


# 255a01c76a3ddc38d2c6cae806c4148b9bf022d4 14-Apr-2003 beveloper <beveloper@nowhere.fake>

Added a new license to this file, as I'm the author.


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


# 76669a292a7a9cdf48535ff3fe91db5de31ed35e 08-Dec-2002 beveloper <beveloper@nowhere.fake>

changed use of port communication, debugging functions, map, list and stack


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


# 353b9f6bcedb3fa9950f3f65c960e1deb700f84a 02-Dec-2002 beveloper <beveloper@nowhere.fake>

changed map and list templates to be more useable, however, they will
be rewritten soon. Changed debugging macros and use of them, too.
Also replaced the linked lists in the BufferManager (which were complicated,
but working ok) with template based ones.


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


# 41ba915d4209230c44208bc7480ea76532b984c9 23-Nov-2002 beveloper <beveloper@nowhere.fake>

various small changes


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


# f4925104822c0990c8fc7b99144512294827b3cf 01-Oct-2002 beveloper <beveloper@nowhere.fake>

changed media kit internal messaging and notification support


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


# 0a483e722194fedf4b5a891c7902c73a4e4dd213 11-Jul-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed includes.


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


# 52a380120846174213ccce9c4aab0dda17c72083 08-Jul-2002 ejakowatz <ejakowatz@nowhere.fake>

It is accomplished ...


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