Ring Daemon
Loading...
Searching...
No Matches
system_codec_container.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2004-2026 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
18#pragma once
19
20#include "media_codec.h"
21#include "global_instance.h"
22
23#include <string>
24#include <vector>
25#include <memory>
26
27namespace jami {
28
29class SystemCodecContainer;
30
32
34{
35public:
38
39 std::vector<std::shared_ptr<SystemCodecInfo>> getSystemCodecInfoList(MediaType mediaType = MEDIA_ALL);
40
41 std::vector<unsigned> getSystemCodecInfoIdList(MediaType type = MEDIA_ALL);
42
43 std::shared_ptr<SystemCodecInfo> searchCodecById(unsigned codecId, MediaType type = MEDIA_ALL);
44
45 std::shared_ptr<SystemCodecInfo> searchCodecByName(const std::string& name, MediaType type = MEDIA_ALL);
46
47 std::shared_ptr<SystemCodecInfo> searchCodecByPayload(unsigned payload, MediaType type = MEDIA_ALL);
48
49 void removeCodecByName(const std::string& name, MediaType type = MEDIA_ALL);
50
51 void initCodecConfig();
52
53private:
54 /* available audio & video codec */
55 std::vector<std::shared_ptr<SystemCodecInfo>> availableCodecList_;
56
57 bool setActiveH265();
58 void checkInstalledCodecs();
59};
60
61} // namespace jami
std::shared_ptr< SystemCodecInfo > searchCodecByPayload(unsigned payload, MediaType type=MEDIA_ALL)
void removeCodecByName(const std::string &name, MediaType type=MEDIA_ALL)
std::vector< std::shared_ptr< SystemCodecInfo > > getSystemCodecInfoList(MediaType mediaType=MEDIA_ALL)
std::vector< unsigned > getSystemCodecInfoIdList(MediaType type=MEDIA_ALL)
std::shared_ptr< SystemCodecInfo > searchCodecById(unsigned codecId, MediaType type=MEDIA_ALL)
std::shared_ptr< SystemCodecInfo > searchCodecByName(const std::string &name, MediaType type=MEDIA_ALL)
decltype(getGlobalInstance< SystemCodecContainer >) & getSystemCodecContainer
void emitSignal(Args... args)
Definition jami_signal.h:64
@ MEDIA_ALL
Definition media_codec.h:48