With the help of Lubomir's explanations I managed understand the
general structure of neomedia and add call recording to conference
calls. Since one-to-one calls are different, it doesn't work for those
yet. Here's basically what I did:
Created a new Recorder interface and implementation that has start and
stop methods and is created by MediaService from inside
MediaAwareCall. This Recorder is provided with a MediaDeviceSession.
The start() method then obtains the output datasource from the session
and hands it over to DataSink which does the writing to the file. The
stop() method calls session.close(). I think that it's not possible to
reuse the session, so every time the recording starts a new session
I also had to override a couple of methods in MediaDeviceSession:
startProcessorInAccordWithDirection and processorControllerUpdate.
startProcessorInAccordWithDirection() I need to override because it
has a "startedDirection.allowsSending()" condition and my newly
created session has an inactive direction and I'm not sure if it would
be correct to change it. processorControllerUpdate() I override
because I set MPEG_AUDIO as the processor's content descriptor, the
original was RAW_RTP.
If the hold or mute buttons are pressed during recording, only the
microphone output is recorded. This behavior seems logical to me.
I'm not sure about where to store the recorded files and how to name
them. How should the UI for managing look like? Also should I focus on
the UI or on one-to-one calls first?