forked from jfchapman/VUPlayer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
HandlerFlac.h
50 lines (36 loc) · 1.67 KB
/
HandlerFlac.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
#pragma once
#include "Handler.h"
#include "FLAC++\all.h"
// FLAC handler
class HandlerFlac : public Handler
{
public:
HandlerFlac();
virtual ~HandlerFlac();
// Returns a description of the handler.
std::wstring GetDescription() const override;
// Returns the supported file extensions, as a set of lowercase strings.
std::set<std::wstring> GetSupportedFileExtensions() const override;
// Reads 'tags' from 'filename', returning true if the tags were read.
bool GetTags( const std::wstring& filename, Tags& tags ) const override;
// Writes 'tags' to 'filename', returning true if the tags were written.
bool SetTags( const std::wstring& filename, const Tags& tags ) const override;
// Returns a decoder for 'filename', or nullptr if a decoder cannot be created.
Decoder::Ptr OpenDecoder( const std::wstring& filename ) const override;
// Returns an encoder, or nullptr if an encoder cannot be created.
Encoder::Ptr OpenEncoder() const override;
// Returns whether the handler can decode.
bool IsDecoder() const override;
// Returns whether the handler can encode.
bool IsEncoder() const override;
// Returns whether the handler supports encoder configuration.
bool CanConfigureEncoder() const override;
// Displays an encoder configuration dialog for the handler.
// 'instance' - application instance handle.
// 'parent' - application window handle.
// 'settings' - in/out, encoder settings.
// Returns whether the encoder has been configured.
bool ConfigureEncoder( const HINSTANCE instance, const HWND parent, std::string& settings ) const override;
// Called when the application 'settings' have changed.
void SettingsChanged( Settings& settings ) override;
};