FFmpegfs Fuse Multi Media Filesystem 2.19
Loading...
Searching...
No Matches
ffmpeg_swscontext.h
Go to the documentation of this file.
1/*
2 * This file is part of FFmpegfs.
3 *
4 * FFmpegfs is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 */
9
17#ifndef FFMPEG_SWSCONTEXT_H
18#define FFMPEG_SWSCONTEXT_H
19
20struct SwsContext;
21
29{
30public:
35
40 explicit FFmpeg_SwsContext(SwsContext *ctx);
41
46
47 FFmpeg_SwsContext(const FFmpeg_SwsContext&) = delete;
48 FFmpeg_SwsContext& operator=(const FFmpeg_SwsContext&) = delete;
49
55
61 FFmpeg_SwsContext& operator=(FFmpeg_SwsContext&& ctx) noexcept;
62
67 SwsContext *get() const;
68
73 SwsContext *release();
74
80 bool reset(SwsContext *ctx = nullptr);
81
86 bool empty() const;
87
91 explicit operator bool() const;
92
96 operator SwsContext *() const;
97
102 SwsContext *operator->() const;
103
104private:
105 SwsContext *m_ctx;
106};
107
108#endif // FFMPEG_SWSCONTEXT_H
RAII wrapper for SwsContext.
bool empty() const
Check whether the wrapper currently owns a scaler context.
FFmpeg_SwsContext()
Construct an empty scaler-context wrapper.
SwsContext * release()
Release ownership without freeing the scaler context.
~FFmpeg_SwsContext()
Release the owned scaler context, if any.
bool reset(SwsContext *ctx=nullptr)
Replace the owned context.
SwsContext * operator->() const
Access members of the underlying scaler context.
SwsContext * m_ctx
Pointer to underlying SwsContext.
SwsContext * get() const
Get the owned FFmpeg scaler context pointer.