haiku/headers/private/media
Jérôme Duval 9c9a810c41 Media Kit: BBufferCache: if not reclaimed, only mark the buffer for deletion
hrev53379 clears the buffer cache for disconnected clients, and also delete buffers.
This is too early (see #15263, media_addon_server crash), and should only happen
after the buffer is recycled. This can be resolved by abusing the fFlags field of
BBuffer to mark the buffer for deletion, and mark the buffer to be reclaimed.
Some BBuffers don't reside in the SharedBufferList, so we have to mark them as to
be reclaimed. For those in the SharedBufferList, call a new RemoveBuffer(), which
can check whether the buffer is still to be reclaimed. For reclaimed BBuffers,
delete them right away, others can be marked for deletion.
fixes #15606 #15263, possibly #15433

Change-Id: I66e94138e7e10a40d4c48e2ac042f816c79f5aab
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2245
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: Ryan Leavengood <leavengood@gmail.com>
2020-02-16 08:38:49 +00:00
..
experimental Revert the Codec Kit. 2019-05-17 14:43:32 -04:00
DataExchange.h BMediaRoster: Add B_MEDIA_SERVER_STARTED and B_MEDIA_SERVER_QUIT 2015-07-24 12:19:33 +02:00
DecoderPlugin.h Revert the Codec Kit. 2019-05-17 14:43:32 -04:00
DefaultMediaTheme.h Media Kit: Rewrite DefaultMediaTheme to use layouts. 2019-01-22 14:25:09 +00:00
DormantNodeManager.h * Accidently put gDormantNodeManager into the public namespace. 2009-12-07 21:27:21 +00:00
EncoderPlugin.h Revert the Codec Kit. 2019-05-17 14:43:32 -04:00
MediaDebug.h media: Remove debug.h, finalize MediaDebug.h 2018-10-23 15:19:14 +02:00
MediaExtractor.h Media Kit: remove MediaExtractor::Source 2019-07-13 16:14:01 +00:00
MediaMisc.h Media Kit: BBufferCache: if not reclaimed, only mark the buffer for deletion 2020-02-16 08:38:49 +00:00
MediaPlugin.h Revert the Codec Kit. 2019-05-17 14:43:32 -04:00
MediaRosterEx.h shutdown_media_server: Finalize rework of synchronization 2016-04-21 19:02:27 +02:00
MediaSounds.h some copyright headers clean up 2010-04-12 21:02:09 +00:00
MediaStreamer.h Revert the Codec Kit. 2019-05-17 14:43:32 -04:00
MediaWriter.h Revert the Codec Kit. 2019-05-17 14:43:32 -04:00
MetaFormat.h * More header cleanup, continuing korli's work. 2010-04-13 09:48:02 +00:00
Notifications.h * Cleanup. 2009-12-07 21:32:59 +00:00
PluginManager.h Revert the Codec Kit. 2019-05-17 14:43:32 -04:00
RawFormats.h Revert the Codec Kit. 2019-05-17 14:43:32 -04:00
ReaderPlugin.h Revert the Codec Kit. 2019-05-17 14:43:32 -04:00
ServerInterface.h CID 608995: buffer overflow. 2016-08-21 17:49:52 +02:00
SharedBufferList.h Media Kit: BBufferCache: if not reclaimed, only mark the buffer for deletion 2020-02-16 08:38:49 +00:00
StreamerPlugin.h Revert the Codec Kit. 2019-05-17 14:43:32 -04:00
TList.h media: Remove debug.h, finalize MediaDebug.h 2018-10-23 15:19:14 +02:00
TMap.h media: Remove debug.h, finalize MediaDebug.h 2018-10-23 15:19:14 +02:00
TStack.h s/OpenBeOS License/MIT License/ universally, as they're the same thing. 2017-02-09 22:09:56 -05:00
WriterPlugin.h Revert the Codec Kit. 2019-05-17 14:43:32 -04:00