-
-
Notifications
You must be signed in to change notification settings - Fork 492
/
Copy pathVideoAnimationStreamSource.h
63 lines (48 loc) · 1.26 KB
/
VideoAnimationStreamSource.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
54
55
56
57
58
59
60
61
62
63
#pragma once
#include "VideoAnimationStreamSource.g.h"
#include "Helpers\COMHelper.h"
#include <shcore.h>
#include <winrt/Windows.Storage.Streams.h>
using namespace winrt::Windows::Storage::Streams;
namespace winrt::Telegram::Native::implementation
{
struct VideoAnimationStreamSource : VideoAnimationStreamSourceT<VideoAnimationStreamSource>
{
VideoAnimationStreamSource(IRandomAccessStream stream)
{
m_size = stream.Size();
CreateStreamOverRandomAccessStream(winrt::get_unknown(stream), IID_PPV_ARGS(&m_stream));
}
void SeekCallback(int64_t offset)
{
}
void ReadCallback(int64_t count)
{
}
hstring FilePath()
{
return L"";
}
int64_t FileSize()
{
return m_size;
}
int64_t Offset()
{
return 0;
}
int64_t Id()
{
return 0;
}
public:
winrt::com_ptr<IStream> m_stream;
int64_t m_size;
};
}
namespace winrt::Telegram::Native::factory_implementation
{
struct VideoAnimationStreamSource : VideoAnimationStreamSourceT<VideoAnimationStreamSource, implementation::VideoAnimationStreamSource>
{
};
}