FFmpegfs Fuse Multi Media Filesystem 2.19
Loading...
Searching...
No Matches
ffmpeg_dictionary.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2017-2026 by Norbert Schlia (nschlia@oblivion-software.de)
3 *
4 * This program 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_DICTIONARY_H
18#define FFMPEG_DICTIONARY_H
19
20#pragma once
21
22struct AVDictionary;
23
31{
32public:
37
42
43 FFmpeg_Dictionary(const FFmpeg_Dictionary&) = delete;
44 FFmpeg_Dictionary& operator=(const FFmpeg_Dictionary&) = delete;
45
50 FFmpeg_Dictionary(FFmpeg_Dictionary&& dict) noexcept;
51
57 FFmpeg_Dictionary& operator=(FFmpeg_Dictionary&& dict) noexcept;
58
62 void reset();
63
68 bool empty() const;
69
74 AVDictionary* get();
75
80 const AVDictionary* get() const;
81
90 AVDictionary** address();
91
96 AVDictionary* release();
97
101 operator AVDictionary*();
102
106 operator const AVDictionary*() const;
107
108private:
109 AVDictionary * m_dict;
110};
111
112#endif // FFMPEG_DICTIONARY_H
RAII wrapper for AVDictionary.
AVDictionary * m_dict
Pointer to underlying AVDictionary.
AVDictionary * get()
Get the owned FFmpeg dictionary pointer.
AVDictionary ** address()
Get a writable pointer-to-pointer for FFmpeg APIs.
void reset()
Free the owned dictionary and reset the wrapper to empty.
AVDictionary * release()
Release ownership without freeing the dictionary.
bool empty() const
Check whether the wrapper currently owns a dictionary.
~FFmpeg_Dictionary()
Release the owned dictionary, if any.
FFmpeg_Dictionary()
Construct an empty dictionary wrapper.