Commit Graph

312 Commits

Author SHA1 Message Date
Dario Casalinuovo
3ef4b20086 Make BMediaRecorder public
* Fills a functionality lack of the classic media_kit.
2017-01-10 21:34:20 +01:00
Dario Casalinuovo
51844723d3 MediaConnection: Remove redundant IsInput/IsOutput 2016-12-18 15:15:30 +01:00
Dario Casalinuovo
75b90c42e5 MediaConnection: Fix buffer size and duration redudancy
* There's no need to supply ways to mismatch the buffer duration
and size. Anything should reflect the media_format, this is at least
fixed on API level.
2016-12-17 19:10:50 +01:00
Dario Casalinuovo
2fdc256d60 BMediaOutput: API cleanup 2016-12-17 19:10:50 +01:00
Dario Casalinuovo
63cb26c536 MediaClient: Hide timesource related API
* There's no point actually in providing BTimeSource dependant
functionality. If and when there will be need for something like
that, possibly never, an higher level solution will be integrated.
2016-12-17 19:10:50 +01:00
Dario Casalinuovo
83cd87d033 SimpleMediaClient: Use virtual inheritance to reduce duplication 2016-12-11 19:16:19 +01:00
Dario Casalinuovo
d1742cc336 MediaInput/Output: Inherit base virtually 2016-12-11 19:16:18 +01:00
Dario Casalinuovo
f1f0956504 MediaClient: Just some interface review 2016-12-06 21:16:36 +01:00
Dario Casalinuovo
c1137899c5 MediaClient: Update comments to last changes
* The interface is being refined and various comments were inconsistent
at this point.
* AddInput/AddOutput is private now.
2016-12-06 16:47:16 +01:00
Dario Casalinuovo
ecb395852e Introduce BSimpleMediaClient
* The idea is to move the callback based mechanism into a derived
class. The objects can be composed to create working systems.
* The BMediaClient class supply RegisterInput/RegisterOutput
and BeginInput/BeginOutput is moved to BSimpleMediaClient.
* Various minor fixes.
2016-11-29 01:22:35 +01:00
Dario Casalinuovo
209b520fa0 MediaClient: Add some padding and reserved functions 2016-11-26 17:30:49 +01:00
Dario Casalinuovo
05e29ea1ad MediaConnection: Remove Reset() 2016-11-26 17:24:10 +01:00
Dario Casalinuovo
9ee6577e2d MediaClient: Distribute callbacks across derived classes 2016-11-26 17:13:02 +01:00
Dario Casalinuovo
9e9655ed55 MediaClient: Use CurrentTime for both offline and performance time 2016-11-25 17:38:44 +01:00
Dario Casalinuovo
6d0255216e MediaClient: Introduce BMediaInput and BMediaOutput 2016-11-25 17:38:44 +01:00
Dario Casalinuovo
eebedf8f1a MediaClient: Use unique id for both inputs and outputs 2016-11-25 17:38:44 +01:00
Dario Casalinuovo
30f9eb3f90 MediaClient: Use kind/kinds pair for media_connection_kind
* Use const reference for media_connection::kind.
2016-11-25 00:05:06 +01:00
Dario Casalinuovo
902701e6bf MediaClient: Use higher level structs for the remaining methods 2016-11-24 21:37:14 +01:00
Dario Casalinuovo
3c1e013390 MediaClient: Fix build 2016-11-24 01:22:27 +01:00
Dario Casalinuovo
f506f3056f MediaClient: Improve internals and API
* Capabilities() become Kind()
* Use media_client and media_connection to better model
the different situations of the API. Reduce code duplication
and move media_kit structs/methods into private.
* Various API and beauty improvements.
* Introduce id management for media_connections.
* Fix different issues preventing to correctly begin a connection.
2016-11-24 00:27:58 +01:00
Dario Casalinuovo
23d5326e2b MediaClient: Introduce media_client and media_connection
* Those structs are provided as replacement for the classic
media_kit ones. They provide better encapsulation of the data
and the resulting code is heavily simplified. It's planned to
introduce BMediaRoster functions to provide conversion from
media_node and media_input/media_output to media_client
and media_connection.
2016-11-24 00:27:58 +01:00
Dario Casalinuovo
2082b5d25f MediaClient: Use media_client_kind for client capabilities 2016-11-18 17:56:51 +01:00
Dario Casalinuovo
5ec9bd1eff MediaClient: general cleanup 2016-11-18 17:46:19 +01:00
Dario Casalinuovo
0253ecbd9e MediaClient: Remove BeginConnection for external connections
* While it looked like a good formalism, there's no need to add
unneeded complex steps to the user of the API.
2016-11-17 02:43:40 +01:00
Dario Casalinuovo
9b410c41e8 Initial merge of the BMediaClient branch
* The BMediaClient is an higher level API to the media_kit. It
corresponds to what the layout API was for the interface_kit.
The main idea is to allow the developer concentrate only on
higher level details and avoiding handle with the tricky parts
of the media_kit. At the same time the general purpose node that
is implemented inside would allow implementing the best techniques
around thus at the same time reducing code duplication and increasing
efficiency.
* BMediaClient is WIP, this is the initial merge of the branch.
The initial development stone was set long time ago and walked
through various design/implementation phases.
2016-11-11 13:47:56 +01:00
Dario Casalinuovo
8023d6bafd PluginManager: Move reference counting in the MediaPlugin
* Ideally we should support this feature by default to allow
future improvements to the plugins management.
* Fixes the major memory corruption that lead to various
crashes on exit in MediaPlayer.
2016-10-31 23:39:32 +01:00
Dario Casalinuovo
42a3f9477d PluginManger: Remove BReferenceable and add locking 2016-10-31 23:39:32 +01:00
Dario Casalinuovo
e3f2079964 AdapterIO: Remove unuseful Close() 2016-09-07 18:21:13 +02:00
Dario Casalinuovo
79bd3b4837 StreamerPlugin: Add reference count
* Keep the Streamer around until everyone released it.
2016-09-07 18:19:10 +02:00
Adrien Destugues
9b1935445c CID 608995: buffer overflow.
This should not happen, so in case a file has an unexpectedly large
name, drop to debugger.
2016-08-21 17:49:52 +02:00
Dario Casalinuovo
0474db50d0 AdapterIO: Add IsRunning method
* The backend need to know if we can really get data.
* Adapt WaitForData to be more reliable using this method.
2016-07-09 16:18:09 +02:00
Dario Casalinuovo
5c05bb48f4 AdapterIO: Remove default arguments in ctor 2016-07-09 02:14:37 +02:00
Dario Casalinuovo
9f2deec26f AdapterIO: Seeking and flags access improvements
* Backend seeking is done only if explictly requested in
BAdapterIO Seek.
2016-07-03 15:28:06 +02:00
Dario Casalinuovo
3ad928de3f BAdapterIO: Refine size inheritance
* Wait evaluation is done considering both position
and buffer size.
* Set back position to 0 after seeking.
* Simplify EvaluatePosition to take advantage of inheritance.
* Use back position to determine the current size of the buffer.
* Add more debug tracing.
* Other minor fixes.
2016-07-02 21:19:27 +02:00
Dario Casalinuovo
345dba5416 AdapterIO: Further development of the interface
* Implement Open/Close mechanism.
* Implement SetBuffer.
* Implement timeout handling.
* Improve Seek mechanism, this is now working by locking the
thread until the backend call SeekCompleted.
2016-06-30 16:54:40 +02:00
Dario Casalinuovo
4dd09daff7 Streaming: Use const reference in place of copying
* Thanks to Markus for reporting.
2016-06-25 01:13:10 +02:00
Dario Casalinuovo
0ba82236bd 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.
2016-06-24 19:00:38 +02:00
Dario Casalinuovo
6903cf9bda AdapterIO: Increase consistency
* Moved data locking in the internal buffer class, includes handling
of backend writes.
* Takes advantage of inheritance for getting the size. The choice is
made depending on the flags. This allow the implementer to easily
return a custom size by reimplementing GetSize. At the same time
a plain BAdapterIO can still have it's total size set, but the behavior
will change depending it's mutable or not.
* Some decisions are now made by considering everything in absolute
values.
* Other minor fixes.
2016-06-23 00:38:33 +02:00
Dario Casalinuovo
3faf39eb5d BAdapterIO: Add initial seeking support
* This is by default provided using a relative buffer. When the
client request a seek over the range we currently have, we will
ask the backend with a SeekRequested. When the backend operation
ended successfully, the client is required to call SeekCompleted
before to return. This will cause the offset to change and the
buffer is cleaned as result. Next data received will be considered
to be at a position equal to the offset plus the relative position.
2016-06-07 16:12:39 +02:00
Dario Casalinuovo
b660d95f88 Introduce BAdapterIO
* This class is provided as a safe multithreaded communication channel
between a BMediaIO-like interface and a Read/Write backend.
* Includes internal buffering and can be used to provide multithreaded
edit of the data.
* Current limitations include missing BOutputAdapter and
correct timeout handling.
* Future plans provide a BRemoteAdapterIO that using ports
and areas allow to easily send big data between processes.
2016-05-31 01:15:09 +02:00
Dario Casalinuovo
9217f5c5ed BMediaIO: Add GetFlags method to define properties 2016-05-31 01:15:09 +02:00
Dario Casalinuovo
2583517316 MediaIO: Fix header typo 2016-05-16 19:57:07 +02:00
Dario Casalinuovo
76889670db shutdown_media_server: Finalize rework of synchronization
* When the user isn't requesting a custom notification, it will
be a BMediaRoster job to do it.
* Reintroduce BMediaRoster::SyncToServices, this time based on local
message passing rather than a global semaphore.
* SyncToServices is used in launch_media_server to make the process
more launch_daemon safe and faster in the average case.
* It was an error to add notifications in the media_server.
* Fixes #12717.
2016-04-21 19:02:27 +02:00
Dario Casalinuovo
11c7bd86e2 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.
2016-04-05 00:41:20 +02:00
Dario Casalinuovo
c131229f08 media_server: Add notifications 2016-04-04 01:27:12 +02:00
Dario Casalinuovo
53c3fa5137 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.
2016-04-04 01:27:09 +02:00
Dario Casalinuovo
7eaa054b87 StreamerPlugin: Use BDataIO as base interface
* There's no need to force the streamer plugin to use a
BMediaIO. This class is supplied to accomodate more smart uses,
but in certain cases it makes just things more complex. If a
plugin doesn't need to have an internal caching method, then it
will be simpler to implement a block-consuming BDataIO and let
the internal BMediaIOWrapper to deal with caching.
2016-03-31 18:06:19 +02:00
Dario Casalinuovo
8c7679851f Move MediaIO in it's own header 2016-03-25 22:44:56 +01:00
Dario Casalinuovo
3733e4b2ab PluginManager/AddOnManager: Add streamers support code 2016-03-25 22:20:03 +01:00
Dario Casalinuovo
20ae088fa5 MediaWriter: Add new BUrl functionality 2016-03-25 22:19:03 +01:00
Dario Casalinuovo
a2b3f12698 MediaExtractor: Adapt to new BUrl functionality 2016-03-25 22:18:15 +01:00
Dario Casalinuovo
63e1708eee Finalize StreamerPlugin
* Add cpp file.
* Make Sniff virtual.
2016-03-25 22:16:36 +01:00
Dario Casalinuovo
3d8e0d38e1 Add initial design of StreamerPlugin 2016-03-25 22:09:03 +01:00
Dario Casalinuovo
c1ad6121ca BMediaRecorder: Solve possible problem with node references
* Since the BMediaRecorder have an it's own estabilished policy
relating releasing the producer node we will not interfere with
it except when we are controlled from Cortex.
2016-02-09 20:24:58 +01:00
Dario Casalinuovo
cc0d365ef7 BMediaRecorder: Fix unneeded argument and error check 2016-02-09 14:11:40 +01:00
Dario Casalinuovo
2a2e352a4a BMediaRecorder: Rework to allow external connections
* This required to review various parts of the code, and
isn't probably still perfect. The main problem was an attributes
hell where redondance created a lot of problems, all this data
is now controlled mostly by the node.
* Header indentation changes needed too.
2016-02-09 13:33:09 +01:00
Dario Casalinuovo
2b51499295 Initial implementation of BMediaEncoder
* People interested, please review!
* This is based on the patch from Fredrik Moden which was based on
the Oleg Krysenkov one.
* The original patch has been reworked by myself.
* Adapted the code to work with the new PluginManager API which
differently than before doesn't need to contact the media_server.
2015-12-02 16:08:06 +01:00
Dario Casalinuovo
67060664c9 Allow BMediaRoster to log local nodes
* BMediaRoster is now capable to know which nodes are
instantiated in this team. This is also a first step to make
them survive after media_server crashes.
* A control at BMediaRoster::Quit can notify if all nodes
were correctly released. Ideally at this point the local nodes
list should be empty.
2015-11-28 16:35:04 +01:00
Murai Takashi
949cf6ac85 Fix GCC 5 build.
* Add -fgnu89-inline flag for libroot/posix/glibc
* Change __GNUC__ == 4 to __GNUC__ >= 4

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

Fixes #11990, most of the changes had already been done.
2015-10-26 19:05:24 +01:00
Dario Casalinuovo
7d337b23b7 BMediaRoster: Reintroduce the undertaker class
* This has been necessary due to the undefined call order of
of static objects. Fixes #12315.
* The bug has been caused by the linker which free unused resources,
making the BMediaRoster to run in a zombie state. In this state
anything such as a message could make the looper to crash.
* The class is reintroduced with some differences though, we are
going to protect it from another thread calling Roster() while the
BMediaRoster is quitting and implement BMediaRosterEx::Quit.
* Unregister registrar notifications before we quit our thread. Avoid
to uninitialize anything from QuitRequested as it may cause problems.
2015-09-01 15:08:57 +02:00
Dario Casalinuovo
32afe10ab2 BMediaRoster: Add B_MEDIA_SERVER_STARTED and B_MEDIA_SERVER_QUIT
* This is done by watching to registrar notifications
  and providing a minimal service to contact the
  media roster in private API. The roster use this
  service to automatically reconnect to the media_server.
2015-07-24 12:19:33 +02:00
Dario Casalinuovo
e57acc3a99 BMediaRoster: Fix initialization and destruction
* Improve consistency by adding a BMediaRosterEx destructor
  and using it for the specular functionality of ctor instead
  to use the father's class destructor.
* Avoid double initialization of MediaInitializer that
  becomes MediaRosterUndertaker.
* Remove superfluos call to BMediaRoster::Quit()
  in media_addon_server.
2015-07-24 12:19:32 +02:00
Dario Casalinuovo
6cd18b575c BMediaRosterEx: cleanup and fix style in the header 2015-07-24 12:19:32 +02:00
Dario Casalinuovo
c079d8d6d9 Implement BMediaRoster::GetNodeAttributesFor 2015-07-13 18:13:48 +02:00
Dario Casalinuovo
1cc20d8231 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.
2015-07-11 15:40:16 +02:00
Dario Casalinuovo
b6f0f88432 Implement BMediaRoster::GetFileFormatsFor 2015-07-10 18:46:20 +02:00
Dario Casalinuovo
7548648420 Implement BMediaRoster::SyncToNode 2015-07-10 18:46:19 +02:00
Dario Casalinuovo
7bcdb36249 media_server: Improve BTimeSource slave nodes management
The media_server is now able to remember the timesource associated to
a certain registered_node and always remove it when the owner
application crash, Fixes Ticket #11852
2015-07-09 23:45:16 +02:00
Michael Lotz
62d30d9e49 libmedia: Put AddOnManager into BPrivate::media namespace.
The AddOnManager was in the global namespace, clashing with application
classes with the same name.

The input_server has an AddOnManager of its own. When the
shortcut_catcher filter was loaded by said AddOnManager, it in turn
loaded libgame.so, which in turn loaded libmedia.so, where an
AddOnManager was created for the global AddOnManager instance in
libmedia.so. Unfortunately the wrong AddOnManager, the one from the
input_server, was created. This lead to two AddOnManagers being active
in the input_server which very well could be responsible for #11049
and #11280.

This was a regression since the move of the AddOnManager from the
media_server to libmedia.so in hrev47086. This also fits with the two
tickets.

I actually noticed the problem when debugging the shutdown process of
the input_server, where the destruction of the wrong AddOnManager
caused a deadlock with itself.
2015-04-19 23:47:05 +02:00
Dario Casalinuovo
4232706dc8 Clean SharedBufferList.h.
Signed-off-by: Adrien Destugues <pulkomandy@gmail.com>
2015-04-13 19:21:35 +02:00
Dario Casalinuovo
fc601b54ff TMap/Tlist: set various methods as const.
Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2015-03-17 21:50:18 +01:00
Hamish Morrison
683cf2ff58 BMediaRecorder: fix a few issues, fix style, remove unused SoundUtils
* Use the preferred time source (GetTimeSource) for the node
* Fix node releasing when creating the connection fails
* Add virtual slots and padding
* Refactor _Connect method
2015-01-12 18:31:27 +00:00
Barrett
739fd34cf5 Replace SoundCounsumer with modified BMediaRecorder.
Signed-off-by: Hamish Morrison <hamishm53@gmail.com>
2015-01-12 18:31:20 +00:00
Dario Casalinuovo
14896b937a Implement BMediaRoster::RollNode().
Fixes #9083.

Signed-off-by: Adrien Destugues <pulkomandy@gmail.com>
2015-01-08 08:57:01 +01:00
Adrien Destugues
2feaa37f24 Move media plug-in support to application side.
The media server tried to use node monitoring to dynamically add and
remove plug-ins, but it isn't that useful:
* When a plug-in is added, applications would have to query the media
server to get an up to date list of available formats. For example
MediaConvert populates its format menus on startup.
* When removing a plugin, if an app already had it loaded, there is not
much that can be done to keep it working.
* The list of plugins was not sorted by directories (user vs system
add-ons), so the directories were re-scanned to make sure user add-ons
were returned first, rendering the node monitoring less interesting.

Now, the format handling is done by each application. The node
monitoring is removed, instead the apps will scan the plugin directory
when first using the media kit classes. Restarting the application is
needed to update the media formats list.
2014-04-02 09:56:32 +02:00
Pawel Dziepak
d0f2d8282f Merge branch 'scheduler'
Conflicts:
	build/jam/packages/Haiku
	headers/os/kernel/OS.h
	headers/os/opengl/GLRenderer.h
	headers/private/shared/cpu_type.h
	src/add-ons/kernel/drivers/power/acpi_battery/acpi_battery.h
	src/bin/sysinfo.cpp
	src/bin/top.c
	src/system/kernel/arch/x86/arch_system_info.cpp
	src/system/kernel/port.cpp
2014-01-17 04:06:15 +01:00
Rene Gollent
4b62c6b0bc libmedia: Fix x86-64 debug build. 2013-12-13 17:53:12 -05:00
Pawel Dziepak
73ad2473e7 Remove remaining unnecessary 'volatile' qualifiers 2013-11-06 00:03:07 +01:00
Hamish Morrison
59b4be8cc1 Move SoundConsumer to libmedia in the BPrivate namespace
Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2012-08-07 23:38:37 +02:00
Adrien Destugues
ba5e652d79 Set of patches by Pete Goodeve to imrpove the handling of audio latency.
Closes #7285.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43164 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-11-03 14:26:03 +00:00
Stephan Aßmus
69372b5545 * Change the signature of the Writer plugins setup methods such
that they can modify the media_format passed in. For example they
   can store information in the user_data section. I don't actually
   use this anymore, but it may come in handy again.

AVFormatWriter:
 * Adjust the AVCodecContext flags not only for video, but also
   for audio streams (as the API example does). This mechanism
   may not yet work, since the AVCodecEncoder actually uses a
   different AVCodecContext instance.
 * Use the encodeInfo->flags and specify the key frame flag
   for the AVPacket. This finally makes videos encoded on Haiku
   seekable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39035 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-20 21:36:23 +00:00
Stephan Aßmus
2e54e93fbf Finall changed the Seek() method of Decoder plug-ins to
SeekedTo(), since it's only informative to decoders. They
can't modify the seeked frame/time. This also mirrors what
all existing decoders were doing in Seek(). BMediaTrack
is simplified accordingly (resolved two TODOs).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38705 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-18 14:44:22 +00:00
Stephan Aßmus
7cd3a2490b 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
2010-09-17 08:04:26 +00:00
Stephan Aßmus
e4f3cf203c * 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
2010-08-24 13:30:39 +00:00
Axel Dörfler
f46308c92a * More header cleanup, continuing korli's work.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36206 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-13 09:48:02 +00:00
Jérôme Duval
d25dd4b920 some copyright headers clean up
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36203 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-12 21:02:09 +00:00
Artur Wyszynski
cee04e8074 Fixed various errors/warnings reported by cppcheck:
* memory leaks
* resource leaks
* added const's to getters
* removed a few reundant conditions


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35433 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-08 22:50:38 +00:00
Jérôme Duval
6aee58a4cb * Revert the reverse the addons iteration of r35121.
* The media_addon_server before unloading addons need to be sure the nodes are deleted.
For instance, applications could keep references on global nodes, thus preventing deletion.
To release all references, the media_addon server uses a new method BMediaRosterEx::ReleaseNodeAll().
* Quit the MediaRoster looper when quitting media_addon server before unloading addons.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35133 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-17 20:05:01 +00:00
Stephan Aßmus
9563f44bfd Patch by Humdinger:
Changed strings to sentence case in various places. This is the
case-misc.diff part of ticket #5169.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35043 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-13 10:49:58 +00:00
Stephan Aßmus
0b6ac0b7a8 * White space cleanup
* Added myself to copyrights, since I added some stuff to MediaExtractor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35031 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-12 20:24:10 +00:00
Axel Dörfler
f0a1eb2dba * The static object construction and destruction is no longer random, but takes
the internal dependencies into account. This should fix bugs #5166, #5120,
  and #5150.
* Also, the time source object manager, as well as the dormant node manager
  are now recreated on media roster restart (when the media server is
  restarted).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34906 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-05 16:53:55 +00:00
Ingo Weinhold
e973f15a44 Missing includes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34599 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-09 17:56:24 +00:00
Axel Dörfler
6cafce94b5 * Moved the port pool into the new request_data.cpp file; it's no longer
accessible from the outside.
* Instead, request_data now retrieves/releases a reply port on its own.
* There were some more places that still used write_port()/read_port() instead
  of QueryServer().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34597 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-09 17:40:45 +00:00
Axel Dörfler
e4c87231a3 * Renamed the xfer_* structures to fit the rest, and let them inherit from the
usual structures.
* Also, they now use the QueryServer()/SendToServer() functions instead of
  duplicating them.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34596 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-09 17:17:01 +00:00
Axel Dörfler
5f207b83ae * Moved all server interface definitions from DataExchange.h to
ServerInterface.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34594 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-09 16:57:22 +00:00
Axel Dörfler
1fcbc5470b * More cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34593 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-09 16:48:49 +00:00
Axel Dörfler
9c3b4706dd * 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
2009-12-09 16:22:24 +00:00
Axel Dörfler
c28dd9fdc3 * Implemented getting/setting the audio gain of media files.
* Renamed "remove_ref_for" command structures and constants to
  "invalidate_item".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34565 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-08 19:56:04 +00:00
Axel Dörfler
7e5d04c543 Beware! The following commit will crash your system when open "Sounds"; I'll
look into this now.
* Renamed the MMediaFilesManager to MediaFilesManager.
* Got rid of its Map usage, we're using std::map now instead.
* The media_server is using an unsafe method to transfer areas from the server
  to the client. I've changed this for the BMediaFiles API to use Haiku's new
  transfer_area() function. However, this seems to cause the above mentioned
  problems.
* Improved naming and data exchange structures used for the BMediaFiles API.
* Fixed BMediaFiles leaking its lists.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34554 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-08 14:22:56 +00:00
Axel Dörfler
559a6a891c * Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34541 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-07 21:32:59 +00:00