Ring Daemon 16.0.0
Loading...
Searching...
No Matches
localrecorder.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2004-2025 Savoir-faire Linux Inc.
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17#pragma once
18
19#include "audio/audio_input.h"
20#include "recordable.h"
21#ifdef ENABLE_VIDEO
22#include "video/video_input.h"
23#endif
24
25namespace jami {
26
27/*
28 * @file localrecorder.h
29 * @brief Class for recording messages locally
30 */
31
32/*
33 * The LocalRecorder class exposes the Recordable interface for
34 * recording messages locally.
35 */
36
38{
39public:
40 LocalRecorder(const std::string& inputUri);
42
46 void setPath(const std::string& path);
47
52 bool startRecording();
53
57 void stopRecording() override;
58
59private:
60 std::string path_;
61 std::string inputUri_;
62
63 // media inputs
64#ifdef ENABLE_VIDEO
65 std::shared_ptr<jami::video::VideoInput> videoInput_;
66#endif
67 std::shared_ptr<jami::AudioInput> audioInput_;
68};
69
70} // namespace jami
void setPath(const std::string &path)
Set recording path.
bool startRecording()
Start local recording.
void stopRecording() override
Stops recording.
void emitSignal(Args... args)
Definition ring_signal.h:64