Ring Daemon 16.0.0
Loading...
Searching...
No Matches
media_device.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 __MEDIA_DEVICE_H__
19#define __MEDIA_DEVICE_H__
20
21#include "rational.h"
22
23#include <string>
24#include <chrono>
25
26namespace jami {
27
28constexpr static auto NEWPARAMS_TIMEOUT = std::chrono::milliseconds(1000);
29
36{
37 std::string name {}; // friendly name (e.g. Logitech BRIO)
38 std::string input {}; // Device path (e.g. /dev/video0)
39 std::string unique_id {}; // unique id (e.g. 046d082d8A8B667F)
40 std::string format {};
41 unsigned width {}, height {};
43 std::string pixel_format {};
44 std::string channel_name {};
45 unsigned channel {}; // Channel number
46 std::string loop {};
47 std::string sdp_flags {};
48 int offset_x {};
49 int offset_y {};
51 std::string window_id {};
52 int fd {}; // file descriptor for PipeWire (only relevant on Wayland)
53 std::string node {}; // node id for PipeWire
54 int is_area {};
55 // Skip DTS delay while finding stream info when PTS is sufficient
57};
58
59} // namespace jami
60
61#endif // __MEDIA_DEVICE_H__
Naive implementation of the boost::rational interface, described here: http://www....
Definition rational.h:38
static constexpr auto NEWPARAMS_TIMEOUT
DeviceParams Parameters used by MediaDecoder and MediaEncoder to open a LibAV device/stream.
std::string unique_id
std::string window_id
std::string format
std::string channel_name
rational< double > framerate
std::string input
std::string sdp_flags
std::string pixel_format