|
FFmpegfs Fuse Multi Media Filesystem 2.19
|
RAII wrapper for AVDictionary. More...
#include <ffmpeg_dictionary.h>
Public Member Functions | |
| FFmpeg_Dictionary () | |
| Construct an empty dictionary wrapper. | |
| ~FFmpeg_Dictionary () | |
| Release the owned dictionary, if any. | |
| FFmpeg_Dictionary (const FFmpeg_Dictionary &)=delete | |
| FFmpeg_Dictionary & | operator= (const FFmpeg_Dictionary &)=delete |
| FFmpeg_Dictionary (FFmpeg_Dictionary &&dict) noexcept | |
| Move-construct a dictionary wrapper. | |
| FFmpeg_Dictionary & | operator= (FFmpeg_Dictionary &&dict) noexcept |
| Move-assign a dictionary wrapper. | |
| void | reset () |
| Free the owned dictionary and reset the wrapper to empty. | |
| bool | empty () const |
| Check whether the wrapper currently owns a dictionary. | |
| AVDictionary * | get () |
| Get the owned FFmpeg dictionary pointer. | |
| const AVDictionary * | get () const |
| Get the owned FFmpeg dictionary pointer. | |
| AVDictionary ** | address () |
| Get a writable pointer-to-pointer for FFmpeg APIs. | |
| AVDictionary * | release () |
| Release ownership without freeing the dictionary. | |
| operator AVDictionary * () | |
| Convert to the underlying mutable dictionary pointer. | |
| operator const AVDictionary * () const | |
| Convert to the underlying const dictionary pointer. | |
Private Attributes | |
| AVDictionary * | m_dict |
| Pointer to underlying AVDictionary. | |
RAII wrapper for AVDictionary.
Owns an AVDictionary created by av_dict_set() / FFmpeg APIs and releases it with av_dict_free(). The wrapper is movable but not copyable.
Definition at line 30 of file ffmpeg_dictionary.h.
| FFmpeg_Dictionary::FFmpeg_Dictionary | ( | ) |
Construct an empty dictionary wrapper.
Definition at line 32 of file ffmpeg_dictionary.cc.
| FFmpeg_Dictionary::~FFmpeg_Dictionary | ( | ) |
Release the owned dictionary, if any.
Definition at line 37 of file ffmpeg_dictionary.cc.
References reset().
|
noexcept |
Move-construct a dictionary wrapper.
| [in,out] | dict | Source wrapper whose dictionary ownership is transferred. |
Definition at line 42 of file ffmpeg_dictionary.cc.
| AVDictionary ** FFmpeg_Dictionary::address | ( | ) |
Get a writable pointer-to-pointer for FFmpeg APIs.
Any currently owned dictionary is freed first so that FFmpeg can write a fresh dictionary pointer without leaking the previous one.
Definition at line 83 of file ffmpeg_dictionary.cc.
References m_dict.
Referenced by FFmpeg_Transcoder::add_albumart_stream(), FFmpeg_Transcoder::add_stream(), FFmpeg_Transcoder::add_subtitle_stream(), FFmpeg_Transcoder::open_decoder(), FFmpeg_Transcoder::open_input_file(), FFmpeg_Transcoder::open_output_frame_set(), and FFmpeg_Transcoder::write_output_file_header().
| bool FFmpeg_Dictionary::empty | ( | ) | const |
Check whether the wrapper currently owns a dictionary.
Definition at line 68 of file ffmpeg_dictionary.cc.
References m_dict.
| AVDictionary * FFmpeg_Dictionary::get | ( | ) |
Get the owned FFmpeg dictionary pointer.
Definition at line 73 of file ffmpeg_dictionary.cc.
References m_dict.
| const AVDictionary * FFmpeg_Dictionary::get | ( | ) | const |
Get the owned FFmpeg dictionary pointer.
Definition at line 78 of file ffmpeg_dictionary.cc.
References m_dict.
| FFmpeg_Dictionary::operator AVDictionary * | ( | ) |
Convert to the underlying mutable dictionary pointer.
Definition at line 95 of file ffmpeg_dictionary.cc.
| FFmpeg_Dictionary::operator const AVDictionary * | ( | ) | const |
Convert to the underlying const dictionary pointer.
Definition at line 100 of file ffmpeg_dictionary.cc.
|
noexcept |
Move-assign a dictionary wrapper.
| [in,out] | dict | Source wrapper whose dictionary ownership is transferred. |
Definition at line 48 of file ffmpeg_dictionary.cc.
| AVDictionary * FFmpeg_Dictionary::release | ( | ) |
Release ownership without freeing the dictionary.
Definition at line 88 of file ffmpeg_dictionary.cc.
References m_dict.
| void FFmpeg_Dictionary::reset | ( | ) |
Free the owned dictionary and reset the wrapper to empty.
Definition at line 60 of file ffmpeg_dictionary.cc.
References m_dict.
Referenced by ~FFmpeg_Dictionary().
|
private |