Ring Daemon 16.0.0
Loading...
Searching...
No Matches
system_codec_container.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
18#ifndef __SYSTEM_CODEC_CONTAINER_H__
19#define __SYSTEM_CODEC_CONTAINER_H__
20
21#include "media_codec.h"
22#include "ring_types.h"
23
24#include <string>
25#include <vector>
26#include <memory>
27
28namespace jami {
29
30class SystemCodecContainer;
31
33
35{
36public:
39
40 std::vector<std::shared_ptr<SystemCodecInfo>> getSystemCodecInfoList(
41 MediaType mediaType = MEDIA_ALL);
42
43 std::vector<unsigned> getSystemCodecInfoIdList(MediaType type = MEDIA_ALL);
44
45 std::shared_ptr<SystemCodecInfo> searchCodecById(unsigned codecId, MediaType type = MEDIA_ALL);
46
47 std::shared_ptr<SystemCodecInfo> searchCodecByName(const std::string& name,
48 MediaType type = MEDIA_ALL);
49
50 std::shared_ptr<SystemCodecInfo> searchCodecByPayload(unsigned payload,
51 MediaType type = MEDIA_ALL);
52
53 void removeCodecByName(const std::string& name, MediaType type = MEDIA_ALL);
54
55 void initCodecConfig();
56
57private:
58 /* available audio & video codec */
59 std::vector<std::shared_ptr<SystemCodecInfo>> availableCodecList_;
60
61 bool setActiveH265();
62 void checkInstalledCodecs();
63};
64
65} // namespace jami
66
67#endif // SYSTEM_CODEC_CONTAINER
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 ring_signal.h:64
@ MEDIA_ALL
Definition media_codec.h:49