-
-
Notifications
You must be signed in to change notification settings - Fork 492
/
Copy pathVoipScreenCapture.h
53 lines (41 loc) · 1.84 KB
/
VoipScreenCapture.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#pragma once
#include "VoipScreenCapture.g.h"
#include "VoipVideoCapture.h"
#include <winrt/Windows.Graphics.Capture.h>
using namespace winrt::Windows::Graphics::Capture;
namespace winrt::Telegram::Native::Calls::implementation
{
struct VoipScreenCapture : VoipScreenCaptureT<VoipScreenCapture, winrt::Telegram::Native::Calls::VoipCaptureBase>
{
VoipScreenCapture(GraphicsCaptureItem item);
void Stop();
void SwitchToDevice(hstring deviceId);
void SetState(VoipVideoState state);
void SetPreferredAspectRatio(float aspectRatio);
void SetOutput(winrt::Telegram::Native::Calls::VoipVideoOutputSink sink);
std::shared_ptr<tgcalls::VideoCaptureInterface> m_impl = nullptr;
winrt::event_token FatalErrorOccurred(Windows::Foundation::TypedEventHandler<
winrt::Telegram::Native::Calls::VoipCaptureBase,
winrt::Windows::Foundation::IInspectable> const& value);
void FatalErrorOccurred(winrt::event_token const& token);
winrt::event_token Paused(Windows::Foundation::TypedEventHandler<
winrt::Telegram::Native::Calls::VoipScreenCapture,
bool> const& value);
void Paused(winrt::event_token const& token);
static bool IsSupported();
private:
bool m_failed{ false };
winrt::event<Windows::Foundation::TypedEventHandler<
winrt::Telegram::Native::Calls::VoipCaptureBase,
winrt::Windows::Foundation::IInspectable>> m_fatalErrorOccurred;
winrt::event<Windows::Foundation::TypedEventHandler<
winrt::Telegram::Native::Calls::VoipScreenCapture,
bool>> m_paused;
};
}
namespace winrt::Telegram::Native::Calls::factory_implementation
{
struct VoipScreenCapture : VoipScreenCaptureT<VoipScreenCapture, implementation::VoipScreenCapture>
{
};
}