History log of /haiku/src/servers/media/DefaultManager.cpp
Revision Date Author Comments
# 8f3a6845 23-Oct-2018 Barrett17 <b.vitruvio@gmail.com>

media_server: Fix debug header


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

Media server: Suppress -Werror=class-memaccess

Suppress -Werror=class-memaccess pointed out by gcc8.
* Remove unneed memset(), since media_format is cleared by constructor.
* Use media_format::Clear() instead of memset()

Change-Id: If905db6c0b7d759e72cfa649951be5109f952f54
Reviewed-on: https://review.haiku-os.org/485
Reviewed-by: Barrett17 <b.vitruvio@gmail.com>


# 11c7bd86 04-Apr-2016 Dario Casalinuovo <b.vitruvio@gmail.com>

Replace synchronization semaphore with async messages

* Remove SyncToServices, I will probably readd it in future
but this time using a local synchronization service more than
relying on the media_server to release the semaphore.
* Due to some discussions today in mailing list I decided
to step back and retry the initial way to notify media rosters
about media services status. It is woking by using two different
notifications for reconnecting to the media_server and notifying
the local subscribers.
* This speed up the media services restart.
* Sorry for the noise and very thanks for reviewing my code to
everyone.


# 53c3fa51 02-Apr-2016 Dario Casalinuovo <b.vitruvio@gmail.com>

Introduce functionality for syncing with the media services

* The global synchro semaphore is provided with the purpose of
being used to avoid threads lock up when the media_server is in
an undefined state. There's still room for improvements.
* BMediaRoster::SyncToServices lock up on a semaphore until
the multi_audio correctly connected to the mixer.


# 5d8765c0 28-Aug-2015 Dario Casalinuovo <b.vitruvio@gmail.com>

media_server: No need to call Roster() every time


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

* Turn a lot of printf()s into TRACE()s.
* Converted apparently non-fatal error output into TRACE output.


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


# 4da0916c 02-May-2010 Jérôme Duval <korli@users.berlios.de>

* style cleanup
* DefaultManager: added a lock around rescan thread start and exit:
this should fix the possible race condition spotted by Ingo.


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


# bbfd3109 24-Apr-2010 Jérôme Duval <korli@users.berlios.de>

* avoid launching one thread for each rescan request.
* erase the defaults settings file when writing it, previous content still existed at the end of the file.
* don't save an empty defaults settings file when node information is not available, this should mean the add on server is already gone.
* added some debug output.


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


# 3fe663e0 21-Apr-2010 Jérôme Duval <korli@users.berlios.de>

B_MEDIA_RAW_AUDIO is not a flag for media_type, instead we must check for audio values.


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


# 2d73faba 13-Apr-2010 Jérôme Duval <korli@users.berlios.de>

clean up (white spaces, spacing and parenthesis)
added a TODO about using kMaxWorkspaces in ScreenMode.cpp


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


# d3bb2b95 16-Jan-2010 Jérôme Duval <korli@users.berlios.de>

style clean up


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


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

* Cleaned up the node manager, got rid of its use of Map, and List.
* Fixed at least two reference counting problems, but nodes from killed teams
still remain alive (will look into this at a later point).
* GetLiveNodes() is now using transfer_area() as well.
* Made all sizes in the SendTo*() and Query*() functions size_t.
* Replaced reinterpret_casts with static_casts when casting void pointers.
* Ordered the request/reply structures by target.
* Tried to consolidate the use of add_on vs. addon.
* More cleanup.


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


# 29bb91d6 07-Dec-2009 Axel Dörfler <axeld@pinc-software.de>

* Cleaned up DormantNodeManager.
* Renamed global variable _DormantNodeManager to gDormantNodeManager.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34538 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


# 2795d5dc 22-Nov-2009 Jérôme Duval <korli@users.berlios.de>

Play startup sound after the first defaults rescan is done. This fixed #1902.


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


# bdb1d3ac 23-Oct-2008 Jérôme Duval <korli@users.berlios.de>

* BMediaRoster::GetAudio*() should return B_NAME_NOT_FOUND when nothing is set
* In this case, SoundRecorder shows a different error message, more informative, confer bug #134


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


# 8bef760f 05-Nov-2007 Jérôme Duval <korli@users.berlios.de>

create media settings directory before saving default nodes


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


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

start soundcard time source


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


# 85918d33 17-Nov-2003 Jérôme Duval <korli@users.berlios.de>

DefaultManager now stores its state, MMediaFilesManager store fix


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


# e9e1d6d9 02-Sep-2003 beveloper <beveloper@nowhere.fake>

implemented a workaround to avoid connecting with the multiaudio add-on in mono


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4459 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


# 5c2c238d 02-Jun-2003 beveloper <beveloper@nowhere.fake>

fix detection of Firewire devices


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


# 4295907b 01-Jun-2003 beveloper <beveloper@nowhere.fake>

fixed (hopefully) all latency bugs
fixed BMediaRoster::MakeTimeSourceFor()


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


# 5917dd5b 01-Jun-2003 beveloper <beveloper@nowhere.fake>

various timing related bugfixes


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


# 9bedd42c 29-May-2003 beveloper <beveloper@nowhere.fake>

many fixes to improve timing


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


# 21871f38 25-May-2003 beveloper <beveloper@nowhere.fake>

various bugfixes


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


# 4f09fa2f 25-May-2003 beveloper <beveloper@nowhere.fake>

various small bugfixes


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


# 359ac306 25-May-2003 beveloper <beveloper@nowhere.fake>

Added automatic loading of physical input and output nodes.


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


# c12232dd 24-May-2003 beveloper <beveloper@nowhere.fake>

added detection and loading of default inputs and outputs


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


# 6910325a 22-Mar-2003 beveloper <beveloper@nowhere.fake>

added experimental preloading of default nodes


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


# 835140c8 05-Jan-2003 beveloper <beveloper@nowhere.fake>

better time source support


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


# 2df68a7b 25-Dec-2002 beveloper <beveloper@nowhere.fake>

Checkpoint.
Started adding support for persistent default nodes.
System time source and BTimeSource are broken.


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


# 5d8765c0af90461ec6f9278592c000940db2b46e 28-Aug-2015 Dario Casalinuovo <b.vitruvio@gmail.com>

media_server: No need to call Roster() every time


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

* Turn a lot of printf()s into TRACE()s.
* Converted apparently non-fatal error output into TRACE output.


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


# 4da0916c585028906cf298c369cea9ec254c0f11 02-May-2010 Jérôme Duval <korli@users.berlios.de>

* style cleanup
* DefaultManager: added a lock around rescan thread start and exit:
this should fix the possible race condition spotted by Ingo.


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


# bbfd31096c4a69c0a7909c158cba2040cc9fbf14 24-Apr-2010 Jérôme Duval <korli@users.berlios.de>

* avoid launching one thread for each rescan request.
* erase the defaults settings file when writing it, previous content still existed at the end of the file.
* don't save an empty defaults settings file when node information is not available, this should mean the add on server is already gone.
* added some debug output.


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


# 3fe663e009e8c56f44e93d008e61d964f28ca6c9 21-Apr-2010 Jérôme Duval <korli@users.berlios.de>

B_MEDIA_RAW_AUDIO is not a flag for media_type, instead we must check for audio values.


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


# 2d73faba95c911a11d8a4a2070c47d47250ed9a9 13-Apr-2010 Jérôme Duval <korli@users.berlios.de>

clean up (white spaces, spacing and parenthesis)
added a TODO about using kMaxWorkspaces in ScreenMode.cpp


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


# d3bb2b95430f054ae07dad0776267f7aa4c69a7c 16-Jan-2010 Jérôme Duval <korli@users.berlios.de>

style clean up


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


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

* Cleaned up the node manager, got rid of its use of Map, and List.
* Fixed at least two reference counting problems, but nodes from killed teams
still remain alive (will look into this at a later point).
* GetLiveNodes() is now using transfer_area() as well.
* Made all sizes in the SendTo*() and Query*() functions size_t.
* Replaced reinterpret_casts with static_casts when casting void pointers.
* Ordered the request/reply structures by target.
* Tried to consolidate the use of add_on vs. addon.
* More cleanup.


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


# 29bb91d6e5a32fc04749f5f4ef868be0a7d750b7 07-Dec-2009 Axel Dörfler <axeld@pinc-software.de>

* Cleaned up DormantNodeManager.
* Renamed global variable _DormantNodeManager to gDormantNodeManager.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34538 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


# 2795d5dca564b5b03fbbfbcc60c04151d738b92d 22-Nov-2009 Jérôme Duval <korli@users.berlios.de>

Play startup sound after the first defaults rescan is done. This fixed #1902.


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


# bdb1d3ac7ca33ba647043e9e55336d4380baa769 23-Oct-2008 Jérôme Duval <korli@users.berlios.de>

* BMediaRoster::GetAudio*() should return B_NAME_NOT_FOUND when nothing is set
* In this case, SoundRecorder shows a different error message, more informative, confer bug #134


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


# 8bef760f81be92a5f8ee45c7b0d7a1ee6fb59367 05-Nov-2007 Jérôme Duval <korli@users.berlios.de>

create media settings directory before saving default nodes


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


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

start soundcard time source


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


# 85918d337ecb94668c1cfb3fab05718de8979fa9 17-Nov-2003 Jérôme Duval <korli@users.berlios.de>

DefaultManager now stores its state, MMediaFilesManager store fix


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


# e9e1d6d9e86a1f44ffb7531525986f9131b8f59d 02-Sep-2003 beveloper <beveloper@nowhere.fake>

implemented a workaround to avoid connecting with the multiaudio add-on in mono


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4459 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


# 5c2c238d9114b2c626d9ef86edc6ee8bf75dbd8e 02-Jun-2003 beveloper <beveloper@nowhere.fake>

fix detection of Firewire devices


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


# 4295907bd14047fb8c4156fe2cb0b9103c36bed6 01-Jun-2003 beveloper <beveloper@nowhere.fake>

fixed (hopefully) all latency bugs
fixed BMediaRoster::MakeTimeSourceFor()


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


# 5917dd5b85eed661e5d9297c8eb8979bf304b6dc 01-Jun-2003 beveloper <beveloper@nowhere.fake>

various timing related bugfixes


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


# 9bedd42cd1e0fdb44e39be7ef4f3c76786d59b50 29-May-2003 beveloper <beveloper@nowhere.fake>

many fixes to improve timing


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


# 21871f384ecf9ad360ac1d0c8de9ba888fb5c037 25-May-2003 beveloper <beveloper@nowhere.fake>

various bugfixes


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


# 4f09fa2ff1558116730774d1c84c9fb34ab2a33a 25-May-2003 beveloper <beveloper@nowhere.fake>

various small bugfixes


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


# 359ac30644ff37232316ad7c0a187c2454e64770 25-May-2003 beveloper <beveloper@nowhere.fake>

Added automatic loading of physical input and output nodes.


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


# c12232ddb55c59dacfa3039d61206bff1aeeb59d 24-May-2003 beveloper <beveloper@nowhere.fake>

added detection and loading of default inputs and outputs


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


# 6910325a5a77037f5a8005dbc712744305a3f8ee 22-Mar-2003 beveloper <beveloper@nowhere.fake>

added experimental preloading of default nodes


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


# 835140c89a74b440c1e99c6aaff5cc995cf8bc02 05-Jan-2003 beveloper <beveloper@nowhere.fake>

better time source support


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


# 2df68a7bf696936b7aca7a6c53c845fbe726c354 25-Dec-2002 beveloper <beveloper@nowhere.fake>

Checkpoint.
Started adding support for persistent default nodes.
System time source and BTimeSource are broken.


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