plugin::recorder

Module: Default Media Recorder Plugin

The interface for the Default Media Recorder.

#include <recorder.h>

Inherits from dolbyio::comms::media_sink_interface

Public Types

Name
enumvideo_recording_config { YUV, NONE, ENCODED}
The available configurations for capturing and storing video. The captured video frames are stored in corresponding containers. The encoded video is not transcoded during or after the recording, so the corresponding container depends on what is negotiated in the SDP. Video encoded via the H264 codec is stored in the MPEG-TS container and video encoded via VP8 is stored in Matroska.
enumaudio_recording_config { PCM, NONE, AAC}
The available formats for capturing audio.

Public Functions

Name
virtual~recorder()
The destructor of the recorder.
virtual voidset_recording_config(audio_recording_config audio, video_recording_config video) =0
Sets a configuration for capturing audio and video.
std::unique_ptr< recorder >create(const std::string & out_dir, dolbyio::comms::sdk & sdk)
Creates the media recording module.

Additional inherited members

Public Functions inherited from dolbyio::comms::media_sink_interface

Name
virtual video_sink_yuv *video_yuv() =0
Gets the raw video sink interface. Override this method to provide access to the Raw Video Sink custom implementation.
virtual video_sink_encoded *video_enc() =0
Gets the encoded video sink interface. Override this method to provide access to the Encoded Video Sink implementation.
virtual audio_sink *audio() =0
Gets the raw audio sink interface. Override this method to provide access to the Audio Sink implementation.
class dolbyio::comms::plugin::recorder;

Public Types Documentation

enum video_recording_config

EnumeratorDescription
YUVEnables capturing of raw video frames that are stored in the Matroska container.
NONEDisables video capturing.
ENCODEDEnables capturing of the video frames that are encoded via the VP8 or H264 codec.

The available configurations for capturing and storing video. The captured video frames are stored in corresponding containers. The encoded video is not transcoded during or after the recording, so the corresponding container depends on what is negotiated in the SDP. Video encoded via the H264 codec is stored in the MPEG-TS container and video encoded via VP8 is stored in Matroska.

enum audio_recording_config

EnumeratorDescription
PCMEnables capturing audio and storing the audio in the PCM format.
NONEDisables audio capturing.
AACEnables capturing audio and storing the audio in the AAC format.

The available formats for capturing audio.

Public Functions Documentation

function ~recorder

virtual ~recorder()

The destructor of the recorder.

function set_recording_config

virtual void set_recording_config(
    audio_recording_config audio,
    video_recording_config video
) =0

Sets a configuration for capturing audio and video.

Parameters:

  • audio The audio format.
  • video The video format.
recorder->set_capture_config(audio_capture_config::PCM,
  video_capture_config::Encoded);

function create

static std::unique_ptr< recorder > create(
    const std::string & out_dir,
    dolbyio::comms::sdk & sdk
)

Creates the media recording module.

Parameters:

  • out_dir The location for storing the captured audio and video.
  • sdk The reference to the SDK object.

Exceptions:

Return: The pointer to the recorder module object.

// When an output directory and the sdk instance are created
auto recorder = dolbyio::comms::plugin::recorder::create(outdir, sdk);


Did this page help you?