29 mFFmpeg.av_dict_copy(&mAVDictionary, rhs, 0);
40 : mFFmpeg(rhs.mFFmpeg)
42 *
this = std::move(rhs);
48 assert(&mFFmpeg == &rhs.mFFmpeg);
50 if (rhs.mAVDictionary !=
nullptr)
51 mFFmpeg.av_dict_copy(&mAVDictionary, rhs.mAVDictionary, 0);
59 assert(&mFFmpeg == &rhs.mFFmpeg);
61 std::swap(mAVDictionary, rhs.mAVDictionary);
82 const std::string_view&
key,
const std::string& value,
85 mFFmpeg.av_dict_set(&mAVDictionary,
key.data(), value.data(), flags);
89 const std::string_view&
key,
const wxString& value,
int flags)
noexcept
91 mFFmpeg.av_dict_set(&mAVDictionary,
key.data(), value.ToUTF8().data(), flags);
95 const std::string_view&
key,
const char* value,
int flags)
noexcept
98 &mAVDictionary,
key.data(), value, flags);
102 const std::string_view&
key,
const std::string_view& defaultValue,
111 if (
entry !=
nullptr)
118 const std::string_view&
key,
int flags)
const noexcept
120 if (mAVDictionary ==
nullptr)
124 mFFmpeg.av_dict_get(mAVDictionary,
key.data(),
nullptr, flags);
126 return entry !=
nullptr;
struct AVDictionary AVDictionary
static ProjectFileIORegistry::AttributeWriterEntry entry
const FFmpegFunctions & mFFmpeg
AVDictionaryWrapper & operator=(const AVDictionaryWrapper &rhs) noexcept
bool HasValue(const std::string_view &key, int flags=0) const noexcept
AVDictionaryWrapper(const AVDictionaryWrapper &rhs) noexcept
Unlike the other FFmpeg wrapper classes, this one is copyable.
std::string_view Get(const std::string_view &key, const std::string_view &defaultValue, int flags=0) const
AVDictionary * mAVDictionary
void Set(const std::string_view &key, const std::string &value, int flags=0) noexcept
virtual ~AVDictionaryWrapper()
AVDictionary * Release() noexcept
AVDictionary * GetWrappedValue() noexcept
void swap(std::unique_ptr< Alg_seq > &a, std::unique_ptr< Alg_seq > &b)
void(* av_dict_free)(AVDictionary **m)
AudacityAVDictionaryEntry *(* av_dict_get)(const AVDictionary *m, const char *key, const AudacityAVDictionaryEntry *prev, int flags)
Simply an overlay of AVDictionaryEntry, but we avoid including that type.