-
Notifications
You must be signed in to change notification settings - Fork 8
/
HandlerFFmpeg.cpp
72 lines (58 loc) · 1.63 KB
/
HandlerFFmpeg.cpp
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
64
65
66
67
68
69
70
71
72
#include "HandlerFFmpeg.h"
#include "resource.h"
#include "DecoderFFmpeg.h"
#include "Utility.h"
HandlerFFmpeg::HandlerFFmpeg()
{
}
std::wstring HandlerFFmpeg::GetDescription() const
{
const std::wstring description = L"FFmpeg";
return description;
}
std::set<std::wstring> HandlerFFmpeg::GetSupportedFileExtensions() const
{
// Although FFmpeg is the fallback decoder, return some of the extensions not handled by other decoders (so that they pass the default filter in file selection dialogs).
return { L"aac", L"asf", L"avi", L"m4a", L"m4b", L"mkv", L"mov", L"mp4", L"mpeg", L"mpg", L"shn", L"tta", L"webm", L"mpc", L"mp+", L"mpp", L"ape", L"apl" };
}
bool HandlerFFmpeg::GetTags( const std::wstring& /*filename*/, Tags& /*tags*/ ) const
{
return false;
}
bool HandlerFFmpeg::SetTags( const std::wstring& /*filename*/, const Tags& /*tags*/ ) const
{
return false;
}
Decoder::Ptr HandlerFFmpeg::OpenDecoder( const std::wstring& filename, const Decoder::Context context ) const
{
DecoderFFmpeg* decoderFFmpeg = nullptr;
try {
decoderFFmpeg = new DecoderFFmpeg( filename, context );
} catch ( const std::runtime_error& ) {
}
const Decoder::Ptr stream( decoderFFmpeg );
return stream;
}
Encoder::Ptr HandlerFFmpeg::OpenEncoder() const
{
return nullptr;
}
bool HandlerFFmpeg::IsDecoder() const
{
return true;
}
bool HandlerFFmpeg::IsEncoder() const
{
return false;
}
bool HandlerFFmpeg::CanConfigureEncoder() const
{
return false;
}
bool HandlerFFmpeg::ConfigureEncoder( const HINSTANCE /*instance*/, const HWND /*parent*/, std::string& /*settings*/ ) const
{
return false;
}
void HandlerFFmpeg::SettingsChanged( Settings& /*settings*/ )
{
}