forked from UnigramDev/Unigram
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVoipVideoCapture.h
More file actions
45 lines (36 loc) · 1.61 KB
/
Copy pathVoipVideoCapture.h
File metadata and controls
45 lines (36 loc) · 1.61 KB
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
#pragma once
#include "VoipVideoCapture.g.h"
#include "VoipVideoOutput.h"
#include "Instance.h"
#include "InstanceImpl.h"
#include "VideoCaptureInterface.h"
#include <winrt/Windows.Graphics.Capture.h>
using namespace winrt::Windows::Graphics::Capture;
namespace winrt::Telegram::Native::Calls::implementation
{
struct VoipVideoCapture : VoipVideoCaptureT<VoipVideoCapture, winrt::Telegram::Native::Calls::VoipCaptureBase>
{
VoipVideoCapture(hstring id);
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);
private:
bool m_failed{ false };
winrt::event<Windows::Foundation::TypedEventHandler<
winrt::Telegram::Native::Calls::VoipCaptureBase,
winrt::Windows::Foundation::IInspectable>> m_fatalErrorOccurred;
};
} // namespace winrt::Telegram::Native::Calls::implementation
namespace winrt::Telegram::Native::Calls::factory_implementation
{
struct VoipVideoCapture : VoipVideoCaptureT<VoipVideoCapture, implementation::VoipVideoCapture>
{
};
} // namespace winrt::Telegram::Native::Calls::factory_implementation