Skip to content
Snippets Groups Projects
Commit d2df0bb4 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk Committed by Adrien Béraud
Browse files

media input: set up device name

For macOS for open video/audio input device name is used.
This patch adds device name in addition to input when initializing
screen capture or file streaming.

Change-Id: Ibf580028049a1d81872b026c12c01cf7a5346a7c
parent 616e2df7
No related branches found
No related tags found
No related merge requests found
......@@ -149,6 +149,7 @@ AudioInput::initFile(const std::string& path)
devOpts_ = {};
devOpts_.input = path;
devOpts_.name = path;
devOpts_.loop = "1";
// sets devOpts_'s sample rate and number of channels
if (!createDecoder()) {
......
......@@ -332,6 +332,7 @@ VideoInput::initAVFoundation(const std::string& display)
clearOptions();
decOpts_.format = "avfoundation";
decOpts_.pixel_format = "nv12";
decOpts_.name = "Capture screen 0";
decOpts_.input = "Capture screen 0";
decOpts_.framerate = 30;
......@@ -394,6 +395,7 @@ VideoInput::initFile(std::string path)
// would break the promise returned in switchInput
DeviceParams p;
p.input = path;
p.name = path;
auto dec = std::make_unique<MediaDecoder>();
if (dec->openInput(p) < 0 || dec->setupVideo() < 0) {
return initCamera(jami::getVideoDeviceMonitor().getDefaultDevice());
......@@ -402,6 +404,7 @@ VideoInput::initFile(std::string path)
clearOptions();
emulateRate_ = true;
decOpts_.input = path;
decOpts_.name = path;
decOpts_.loop = "1";
// Force 1fps for static image
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment