sipsorcery-org / SIPSorceryMedia.FFmpeg

GNU Lesser General Public License v2.1
34 stars 25 forks source link

Screen Sharing is not working in MacOS #82

Open mail2mhossain opened 2 weeks ago

mail2mhossain commented 2 weeks ago

In both FFmpegCameraSource and FFmpegScreenSource classes, the following method is called within their constructors:

CreateVideoDecoder(path, aVInputFormat, false, true);

The method signature is:

public unsafe void CreateVideoDecoder(string path, AVInputFormat* avInputFormat, bool repeat = false, bool isCamera = false)

By default, the isCamera parameter is set to false, but both classes are passing true when calling the method.

On the Windows platform, screen sharing works regardless of whether isCamera is set to true or false. However, on macOS, if CreateVideoDecoder is called with isCamera set to true, we do not receive any feed from the monitor. Conversely, when isCamera is set to false, we receive the feed from the default camera instead of the monitor.

Could you please provide guidance on how to resolve this issue?

ha-ves commented 2 weeks ago

I don't have OSX to reproduce this, but,

mail2mhossain commented 2 weeks ago

It was a permission related issue.