FFmpegfs Fuse Multi Media Filesystem 2.16
|
Global program parameters. More...
#include <ffmpegfs.h>
Public Member Functions | |
FFMPEGFS_PARAMS (const FFMPEGFS_PARAMS &other) | |
Make copy from other FFMPEGFS_PARAMS object. More... | |
bool | smart_transcode () const |
Check for smart transcode mode. More... | |
const FFmpegfs_Format * | current_format (LPCVIRTUALFILE virtualfile) const |
Get FFmpegfs_Format for a virtual file. More... | |
FFMPEGFS_PARAMS & | operator= (const FFMPEGFS_PARAMS &other) noexcept |
Make copy from other FFMPEGFS_PARAMS object. More... | |
Public Attributes | |
std::string | m_basepath |
Base path: Files from this directory (including all sub directories) will be mapped to m_mountpath. More... | |
std::string | m_mountpath |
Mount path: Files from m_mountpath will be mapped to this directory. More... | |
AVCodecID | m_audio_codec |
Either AV_CODEC_ID_NONE for default, or a user selected codec. More... | |
AVCodecID | m_video_codec |
Either AV_CODEC_ID_NONE for default, or a user selected codec. More... | |
AUTOCOPY | m_autocopy |
Copy streams if codec matches. More... | |
RECODESAME | m_recodesame |
Recode to same format options. More... | |
PROFILE | m_profile |
Target profile: Firefox, MS Edge/IE or other. More... | |
PRORESLEVEL | m_level |
Level, currently proxy/hq/lt/HQ (ProRes only) More... | |
BITRATE | m_audiobitrate |
Output audio bit rate (bits per second) More... | |
int | m_audiosamplerate |
Output audio sample rate (in Hz) More... | |
int | m_audiochannels |
Max. number of audio channels. More... | |
SAMPLE_FMT | m_sample_fmt |
Sample format. More... | |
BITRATE | m_videobitrate |
Output video bit rate (bits per second) More... | |
int | m_videowidth |
Output video width. More... | |
int | m_videoheight |
Output video height. More... | |
int | m_deinterlace |
1: deinterlace video, 0: no deinterlace More... | |
int64_t | m_segment_duration |
Duration of one HLS segment file, in AV_TIME_BASE fractional seconds. More... | |
int64_t | m_min_seek_time_diff |
Minimum time diff from current to next requested segment to perform a seek, in AV_TIME_BASE fractional seconds. More... | |
HWACCELAPI | m_hwaccel_enc_API |
Encoder API. More... | |
AVHWDeviceType | m_hwaccel_enc_device_type |
Enable hardware acceleration buffering for encoder. More... | |
std::string | m_hwaccel_enc_device |
Encoder device. May be AUTO to auto detect or empty. More... | |
HWACCELAPI | m_hwaccel_dec_API |
Decoder API. More... | |
AVHWDeviceType | m_hwaccel_dec_device_type |
Enable hardware acceleration buffering for decoder. More... | |
std::string | m_hwaccel_dec_device |
Decoder device. May be AUTO to auto detect or empty. More... | |
HWACCEL_BLOCKED_MAP * | m_hwaccel_dec_blocked |
List of blocked decoders and optional profiles. More... | |
int | m_no_subtitles |
0: allow subtitles, 1: do no transcode subtitles More... | |
int | m_noalbumarts |
Skip album arts. More... | |
int | m_enablescript |
Enable virtual script. More... | |
std::string | m_scriptfile |
Script name. More... | |
std::string | m_scriptsource |
Source script. More... | |
int | m_debug |
Debug mode (stay in foreground. More... | |
std::string | m_log_maxlevel |
Max. log level. More... | |
int | m_log_stderr |
Log output to standard error. More... | |
int | m_log_syslog |
Log output to system log. More... | |
std::string | m_logfile |
Output filename if logging to file. More... | |
time_t | m_expiry_time |
Time (seconds) after which an cache entry is deleted. More... | |
time_t | m_max_inactive_suspend |
Time (seconds) that must elapse without access until transcoding is suspended. More... | |
time_t | m_max_inactive_abort |
Time (seconds) that must elapse without access until transcoding is aborted. More... | |
time_t | m_prebuffer_time |
Playing time that will be decoded before the output can be accessed. More... | |
size_t | m_prebuffer_size |
Number of bytes that will be decoded before the output can be accessed. More... | |
size_t | m_max_cache_size |
Max. cache size in MB. When exceeded, oldest entries will be pruned. More... | |
size_t | m_min_diskspace |
Min. diskspace required for cache. More... | |
std::string | m_cachepath |
Disk cache path, defaults to $XDG_CACHE_HOME. More... | |
int | m_disable_cache |
Disable cache. More... | |
time_t | m_cache_maintenance |
Prune timer interval. More... | |
int | m_prune_cache |
Prune cache immediately. More... | |
int | m_clear_cache |
Clear cache on start up. More... | |
unsigned int | m_max_threads |
Max. number of recoder threads. More... | |
int | m_decoding_errors |
Break transcoding on decoding error. More... | |
int | m_min_dvd_chapter_duration |
Min. DVD chapter duration. Shorter chapters will be ignored. More... | |
int | m_oldnamescheme |
Use old output name scheme, can create duplicate filenames. More... | |
std::unique_ptr< MATCHVEC > | m_include_extensions |
Set of extensions to include. If empty, include all. Must be a pointer as the fuse API cannot handle advanced c++ objects. More... | |
std::unique_ptr< MATCHVEC > | m_hide_extensions |
Set of extensions to block/hide. Must be a pointer as the fuse API cannot handle advanced c++ objects. More... | |
int | m_win_smb_fix |
Experimental Windows fix for access to EOF at file open. More... | |
Global program parameters.
Definition at line 165 of file ffmpegfs.h.
FFMPEGFS_PARAMS::FFMPEGFS_PARAMS | ( | ) |
Definition at line 76 of file ffmpegfs.cc.
FFMPEGFS_PARAMS::FFMPEGFS_PARAMS | ( | const FFMPEGFS_PARAMS & | other | ) |
Make copy from other FFMPEGFS_PARAMS object.
[in] | other | - Reference to source FFmpeg_Frame object. |
Definition at line 147 of file ffmpegfs.cc.
FFMPEGFS_PARAMS::~FFMPEGFS_PARAMS | ( | ) |
Definition at line 152 of file ffmpegfs.cc.
const FFmpegfs_Format * FFMPEGFS_PARAMS::current_format | ( | LPCVIRTUALFILE | virtualfile | ) | const |
Get FFmpegfs_Format for a virtual file.
[in] | virtualfile | - VIRTUALFILE struct of a file. |
Definition at line 235 of file ffmpegfs.cc.
References ffmpeg_format.
Referenced by Cache_Entry::Cache_Entry(), FFmpeg_Transcoder::encode_finish(), ffmpegfs_getattr(), ffmpegfs_readdir(), get_format(), Buffer::init(), load_path(), make_hls_fileset(), FFmpeg_Transcoder::open_input_file(), transcode(), transcoder_read(), and transcoder_set_filesize().
|
noexcept |
Make copy from other FFMPEGFS_PARAMS object.
[in] | other | - Reference to source FFmpeg_Frame object. |
Definition at line 157 of file ffmpegfs.cc.
References m_basepath.
bool FFMPEGFS_PARAMS::smart_transcode | ( | ) | const |
Check for smart transcode mode.
Definition at line 230 of file ffmpegfs.cc.
References AUDIO, and ffmpeg_format.
Referenced by find_original(), get_format(), and guess_format_idx().
AVCodecID FFMPEGFS_PARAMS::m_audio_codec |
Either AV_CODEC_ID_NONE for default, or a user selected codec.
Definition at line 200 of file ffmpegfs.h.
Referenced by Format_Options::audio_codec().
BITRATE FFMPEGFS_PARAMS::m_audiobitrate |
Output audio bit rate (bits per second)
Definition at line 207 of file ffmpegfs.h.
Referenced by FFmpeg_Transcoder::add_stream(), FFmpeg_Transcoder::audio_size(), FFmpeg_Transcoder::can_copy_stream(), Cache_Entry::clear(), and Cache_Entry::outdated().
int FFMPEGFS_PARAMS::m_audiochannels |
Max. number of audio channels.
Definition at line 209 of file ffmpegfs.h.
Referenced by FFmpeg_Transcoder::add_stream(), and FFmpeg_Transcoder::FFmpeg_Transcoder().
int FFMPEGFS_PARAMS::m_audiosamplerate |
Output audio sample rate (in Hz)
Definition at line 208 of file ffmpegfs.h.
Referenced by FFmpeg_Transcoder::add_stream(), FFmpeg_Transcoder::audio_size(), Cache_Entry::clear(), and Cache_Entry::outdated().
AUTOCOPY FFMPEGFS_PARAMS::m_autocopy |
Copy streams if codec matches.
Definition at line 202 of file ffmpegfs.h.
Referenced by FFmpeg_Transcoder::can_copy_stream().
std::string FFMPEGFS_PARAMS::m_basepath |
Base path: Files from this directory (including all sub directories) will be mapped to m_mountpath.
Definition at line 196 of file ffmpegfs.h.
Referenced by ffmpegfs_init(), ffmpegfs_opt_proc(), insert_file(), main(), operator=(), print_params(), and Logging::Logger::~Logger().
time_t FFMPEGFS_PARAMS::m_cache_maintenance |
std::string FFMPEGFS_PARAMS::m_cachepath |
Disk cache path, defaults to $XDG_CACHE_HOME.
Definition at line 249 of file ffmpegfs.h.
Referenced by main(), and transcoder_cache_path().
int FFMPEGFS_PARAMS::m_clear_cache |
Clear cache on start up.
Definition at line 253 of file ffmpegfs.h.
int FFMPEGFS_PARAMS::m_debug |
int FFMPEGFS_PARAMS::m_decoding_errors |
Break transcoding on decoding error.
Definition at line 256 of file ffmpegfs.h.
Referenced by FFmpeg_Transcoder::decode_frame().
int FFMPEGFS_PARAMS::m_deinterlace |
1: deinterlace video, 0: no deinterlace
Definition at line 215 of file ffmpegfs.h.
Referenced by FFmpeg_Transcoder::calculate_predicted_filesize(), Cache_Entry::clear(), FFmpeg_Transcoder::open_output_filestreams(), FFmpeg_Transcoder::open_output_frame_set(), and Cache_Entry::outdated().
int FFMPEGFS_PARAMS::m_disable_cache |
int FFMPEGFS_PARAMS::m_enablescript |
Enable virtual script.
Definition at line 232 of file ffmpegfs.h.
Referenced by ffmpegfs_init(), ffmpegfs_readdir(), and prepare_script().
time_t FFMPEGFS_PARAMS::m_expiry_time |
Time (seconds) after which an cache entry is deleted.
Definition at line 242 of file ffmpegfs.h.
Referenced by Cache_Entry::expired().
std::unique_ptr<MATCHVEC> FFMPEGFS_PARAMS::m_hide_extensions |
Set of extensions to block/hide. Must be a pointer as the fuse API cannot handle advanced c++ objects.
Definition at line 260 of file ffmpegfs.h.
HWACCELAPI FFMPEGFS_PARAMS::m_hwaccel_dec_API |
Decoder API.
Definition at line 223 of file ffmpegfs.h.
Referenced by FFmpeg_Transcoder::get_hw_decoder_name(), and FFmpeg_Transcoder::open_decoder().
HWACCEL_BLOCKED_MAP* FFMPEGFS_PARAMS::m_hwaccel_dec_blocked |
List of blocked decoders and optional profiles.
Definition at line 226 of file ffmpegfs.h.
Referenced by check_hwaccel_dec_blocked().
std::string FFMPEGFS_PARAMS::m_hwaccel_dec_device |
Decoder device. May be AUTO to auto detect or empty.
Definition at line 225 of file ffmpegfs.h.
Referenced by FFmpeg_Transcoder::open_decoder().
AVHWDeviceType FFMPEGFS_PARAMS::m_hwaccel_dec_device_type |
Enable hardware acceleration buffering for decoder.
Definition at line 224 of file ffmpegfs.h.
Referenced by FFmpeg_Transcoder::get_format(), FFmpeg_Transcoder::get_pix_formats(), and FFmpeg_Transcoder::open_decoder().
HWACCELAPI FFMPEGFS_PARAMS::m_hwaccel_enc_API |
Encoder API.
Definition at line 220 of file ffmpegfs.h.
Referenced by FFmpeg_Transcoder::add_stream(), FFmpeg_Transcoder::get_hw_encoder_name(), and FFmpeg_Transcoder::open_bestmatch_video().
std::string FFMPEGFS_PARAMS::m_hwaccel_enc_device |
Encoder device. May be AUTO to auto detect or empty.
Definition at line 222 of file ffmpegfs.h.
Referenced by FFmpeg_Transcoder::open_bestmatch_video().
AVHWDeviceType FFMPEGFS_PARAMS::m_hwaccel_enc_device_type |
Enable hardware acceleration buffering for encoder.
Definition at line 221 of file ffmpegfs.h.
Referenced by FFmpeg_Transcoder::add_stream(), FFmpeg_Transcoder::hwframe_ctx_set(), and FFmpeg_Transcoder::open_bestmatch_video().
std::unique_ptr<MATCHVEC> FFMPEGFS_PARAMS::m_include_extensions |
Set of extensions to include. If empty, include all. Must be a pointer as the fuse API cannot handle advanced c++ objects.
Definition at line 259 of file ffmpegfs.h.
PRORESLEVEL FFMPEGFS_PARAMS::m_level |
Level, currently proxy/hq/lt/HQ (ProRes only)
Definition at line 205 of file ffmpegfs.h.
Referenced by set_defaults(), and FFmpeg_Transcoder::video_size().
std::string FFMPEGFS_PARAMS::m_log_maxlevel |
int FFMPEGFS_PARAMS::m_log_stderr |
int FFMPEGFS_PARAMS::m_log_syslog |
std::string FFMPEGFS_PARAMS::m_logfile |
Output filename if logging to file.
Definition at line 240 of file ffmpegfs.h.
Referenced by main().
size_t FFMPEGFS_PARAMS::m_max_cache_size |
Max. cache size in MB. When exceeded, oldest entries will be pruned.
Definition at line 247 of file ffmpegfs.h.
time_t FFMPEGFS_PARAMS::m_max_inactive_abort |
Time (seconds) that must elapse without access until transcoding is aborted.
Definition at line 244 of file ffmpegfs.h.
Referenced by Cache_Entry::decode_timeout(), and transcoder_thread().
time_t FFMPEGFS_PARAMS::m_max_inactive_suspend |
Time (seconds) that must elapse without access until transcoding is suspended.
Definition at line 243 of file ffmpegfs.h.
Referenced by Cache_Entry::suspend_timeout(), and transcode().
unsigned int FFMPEGFS_PARAMS::m_max_threads |
Max. number of recoder threads.
Definition at line 254 of file ffmpegfs.h.
Referenced by ffmpegfs_init(), and main().
size_t FFMPEGFS_PARAMS::m_min_diskspace |
Min. diskspace required for cache.
Definition at line 248 of file ffmpegfs.h.
int FFMPEGFS_PARAMS::m_min_dvd_chapter_duration |
Min. DVD chapter duration. Shorter chapters will be ignored.
Definition at line 257 of file ffmpegfs.h.
Referenced by create_dvd_virtualfile().
int64_t FFMPEGFS_PARAMS::m_min_seek_time_diff |
Minimum time diff from current to next requested segment to perform a seek, in AV_TIME_BASE fractional seconds.
Definition at line 218 of file ffmpegfs.h.
Referenced by FFmpeg_Transcoder::start_new_segment().
std::string FFMPEGFS_PARAMS::m_mountpath |
Mount path: Files from m_mountpath will be mapped to this directory.
Definition at line 197 of file ffmpegfs.h.
Referenced by ffmpegfs_init(), ffmpegfs_opt_proc(), insert_file(), main(), Buffer::make_cachefile_name(), print_params(), virtual_name(), and Logging::Logger::~Logger().
int FFMPEGFS_PARAMS::m_no_subtitles |
0: allow subtitles, 1: do no transcode subtitles
Definition at line 228 of file ffmpegfs.h.
Referenced by FFmpeg_Transcoder::open_input_file().
int FFMPEGFS_PARAMS::m_noalbumarts |
Skip album arts.
Definition at line 230 of file ffmpegfs.h.
Referenced by FFmpeg_Transcoder::open_albumarts(), and FFmpeg_Transcoder::open_output_filestreams().
int FFMPEGFS_PARAMS::m_oldnamescheme |
Use old output name scheme, can create duplicate filenames.
Definition at line 258 of file ffmpegfs.h.
Referenced by virtual_name().
size_t FFMPEGFS_PARAMS::m_prebuffer_size |
Number of bytes that will be decoded before the output can be accessed.
Definition at line 246 of file ffmpegfs.h.
Referenced by transcode().
time_t FFMPEGFS_PARAMS::m_prebuffer_time |
Playing time that will be decoded before the output can be accessed.
Definition at line 245 of file ffmpegfs.h.
Referenced by transcode().
PROFILE FFMPEGFS_PARAMS::m_profile |
Target profile: Firefox, MS Edge/IE or other.
Definition at line 204 of file ffmpegfs.h.
Referenced by FFmpeg_Transcoder::prepare_codec(), and FFmpeg_Transcoder::prepare_format().
int FFMPEGFS_PARAMS::m_prune_cache |
RECODESAME FFMPEGFS_PARAMS::m_recodesame |
Recode to same format options.
Definition at line 203 of file ffmpegfs.h.
Referenced by ffmpegfs_readdir(), and virtual_name().
SAMPLE_FMT FFMPEGFS_PARAMS::m_sample_fmt |
Sample format.
Definition at line 210 of file ffmpegfs.h.
Referenced by Format_Options::audio_codec(), Format_Options::audio_codec_list(), Format_Options::is_audio_codec_supported(), Format_Options::is_sample_fmt_supported(), Format_Options::is_video_codec_supported(), Format_Options::sample_format(), Format_Options::subtitle_codec(), Format_Options::video_codec(), and Format_Options::video_codec_list().
std::string FFMPEGFS_PARAMS::m_scriptfile |
std::string FFMPEGFS_PARAMS::m_scriptsource |
int64_t FFMPEGFS_PARAMS::m_segment_duration |
Duration of one HLS segment file, in AV_TIME_BASE fractional seconds.
Definition at line 217 of file ffmpegfs.h.
Referenced by FFmpeg_Transcoder::get_next_segment(), VIRTUALFILE::get_segment_count(), make_hls_fileset(), FFmpeg_Transcoder::process_single_fr(), and FFmpeg_Transcoder::start_new_segment().
AVCodecID FFMPEGFS_PARAMS::m_video_codec |
Either AV_CODEC_ID_NONE for default, or a user selected codec.
Definition at line 201 of file ffmpegfs.h.
Referenced by Format_Options::video_codec().
BITRATE FFMPEGFS_PARAMS::m_videobitrate |
Output video bit rate (bits per second)
Definition at line 212 of file ffmpegfs.h.
Referenced by FFmpeg_Transcoder::add_stream(), FFmpeg_Transcoder::can_copy_stream(), Cache_Entry::clear(), Cache_Entry::outdated(), and FFmpeg_Transcoder::video_size().
int FFMPEGFS_PARAMS::m_videoheight |
Output video height.
Definition at line 214 of file ffmpegfs.h.
Referenced by Cache_Entry::clear(), FFmpeg_Transcoder::get_video_size(), and Cache_Entry::outdated().
int FFMPEGFS_PARAMS::m_videowidth |
Output video width.
Definition at line 213 of file ffmpegfs.h.
Referenced by Cache_Entry::clear(), FFmpeg_Transcoder::get_video_size(), and Cache_Entry::outdated().
int FFMPEGFS_PARAMS::m_win_smb_fix |
Experimental Windows fix for access to EOF at file open.
Definition at line 262 of file ffmpegfs.h.