FFmpegfs Fuse Multi Media Filesystem 2.19
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
FFMPEGFS_PARAMS Struct Reference

Global program parameters. More...

#include <ffmpegfs.h>

Public Member Functions

 FFMPEGFS_PARAMS (const FFMPEGFS_PARAMS &other)
 Make copy from other FFMPEGFS_PARAMS object.
 
bool smart_transcode () const
 Check for smart transcode mode.
 
const FFmpegfs_Formatcurrent_format (LPCVIRTUALFILE virtualfile) const
 Get FFmpegfs_Format for a virtual file.
 
FFMPEGFS_PARAMSoperator= (const FFMPEGFS_PARAMS &other) noexcept
 Make copy from other FFMPEGFS_PARAMS object.
 

Public Attributes

std::string m_basepath
 Base path: Files from this directory (including all sub directories) will be mapped to m_mountpath.
 
std::string m_mountpath
 Mount path: Files from m_mountpath will be mapped to this directory.
 
AVCodecID m_audio_codec
 Either AV_CODEC_ID_NONE for default, or a user selected codec.
 
AVCodecID m_video_codec
 Either AV_CODEC_ID_NONE for default, or a user selected codec.
 
AUTOCOPY m_autocopy
 Copy streams if codec matches.
 
RECODESAME m_recodesame
 Recode to same format options.
 
PROFILE m_profile
 Target profile: Firefox, MS Edge/IE or other.
 
PRORESLEVEL m_level
 Level, currently proxy/hq/lt/HQ (ProRes only)
 
BITRATE m_audiobitrate
 Output audio bit rate (bits per second)
 
int m_audiosamplerate
 Output audio sample rate (in Hz)
 
int m_audiochannels
 Max. number of audio channels.
 
SAMPLE_FMT m_sample_fmt
 Sample format.
 
BITRATE m_videobitrate
 Output video bit rate (bits per second)
 
int m_videowidth
 Output video width.
 
int m_videoheight
 Output video height.
 
int m_deinterlace
 1: deinterlace video, 0: no deinterlace
 
int64_t m_segment_duration
 Duration of one HLS segment file, in AV_TIME_BASE fractional seconds.
 
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.
 
HWACCELAPI m_hwaccel_enc_API
 Encoder API.
 
AVHWDeviceType m_hwaccel_enc_device_type
 Enable hardware acceleration buffering for encoder.
 
std::string m_hwaccel_enc_device
 Encoder device. May be AUTO to auto detect or empty.
 
HWACCELAPI m_hwaccel_dec_API
 Decoder API.
 
AVHWDeviceType m_hwaccel_dec_device_type
 Enable hardware acceleration buffering for decoder.
 
std::string m_hwaccel_dec_device
 Decoder device. May be AUTO to auto detect or empty.
 
HWACCEL_BLOCKED_MAPm_hwaccel_dec_blocked
 List of blocked decoders and optional profiles.
 
int m_no_subtitles
 0: allow subtitles, 1: do no transcode subtitles
 
int m_noalbumarts
 Skip album arts.
 
int m_enablescript
 Enable virtual script.
 
std::string m_scriptfile
 Script name.
 
std::string m_scriptsource
 Source script.
 
int m_debug
 Debug mode (stay in foreground.
 
std::string m_log_maxlevel
 Max. log level.
 
int m_log_stderr
 Log output to standard error.
 
int m_log_syslog
 Log output to system log.
 
std::string m_logfile
 Output filename if logging to file.
 
time_t m_expiry_time
 Time (seconds) after which an cache entry is deleted.
 
time_t m_max_inactive_suspend
 Time (seconds) that must elapse without access until transcoding is suspended.
 
time_t m_max_inactive_abort
 Time (seconds) that must elapse without access until transcoding is aborted.
 
time_t m_prebuffer_time
 Playing time that will be decoded before the output can be accessed.
 
size_t m_prebuffer_size
 Number of bytes that will be decoded before the output can be accessed.
 
size_t m_max_cache_size
 Max. cache size in MB. When exceeded, oldest entries will be pruned.
 
size_t m_min_diskspace
 Min. diskspace required for cache.
 
std::string m_cachepath
 Disk cache path, defaults to $XDG_CACHE_HOME.
 
int m_disable_cache
 Disable cache.
 
time_t m_cache_maintenance
 Prune timer interval.
 
int m_prune_cache
 Prune cache immediately.
 
int m_clear_cache
 Clear cache on start up.
 
unsigned int m_max_threads
 Max. number of recoder threads.
 
int m_decoding_errors
 Break transcoding on decoding error.
 
int m_min_dvd_chapter_duration
 Min. DVD chapter duration. Shorter chapters will be ignored.
 
int m_oldnamescheme
 Use old output name scheme, can create duplicate filenames.
 
std::unique_ptr< MATCHVECm_include_extensions
 Set of extensions to include. If empty, include all. Must be a pointer as the fuse API cannot handle advanced c++ objects.
 
std::unique_ptr< MATCHVECm_hide_extensions
 Set of extensions to block/hide. Must be a pointer as the fuse API cannot handle advanced c++ objects.
 
int m_win_smb_fix
 Experimental Windows fix for access to EOF at file open.
 

Detailed Description

Global program parameters.

Definition at line 161 of file ffmpegfs.h.

Constructor & Destructor Documentation

◆ FFMPEGFS_PARAMS() [1/2]

FFMPEGFS_PARAMS::FFMPEGFS_PARAMS ( )

Definition at line 83 of file ffmpegfs.cc.

◆ FFMPEGFS_PARAMS() [2/2]

FFMPEGFS_PARAMS::FFMPEGFS_PARAMS ( const FFMPEGFS_PARAMS other)

Make copy from other FFMPEGFS_PARAMS object.

Parameters
[in]other- Reference to source FFmpeg_Frame object.

Definition at line 154 of file ffmpegfs.cc.

◆ ~FFMPEGFS_PARAMS()

FFMPEGFS_PARAMS::~FFMPEGFS_PARAMS ( )

Definition at line 159 of file ffmpegfs.cc.

Member Function Documentation

◆ current_format()

const FFmpegfs_Format * FFMPEGFS_PARAMS::current_format ( LPCVIRTUALFILE  virtualfile) const

◆ operator=()

FFMPEGFS_PARAMS & FFMPEGFS_PARAMS::operator= ( const FFMPEGFS_PARAMS other)
noexcept

Make copy from other FFMPEGFS_PARAMS object.

Parameters
[in]other- Reference to source FFmpeg_Frame object.
Returns
Reference to new FFmpeg_Frame object.

Definition at line 164 of file ffmpegfs.cc.

References m_basepath.

◆ smart_transcode()

bool FFMPEGFS_PARAMS::smart_transcode ( ) const

Check for smart transcode mode.

Returns
true if smart transcode is active, false if not

Definition at line 237 of file ffmpegfs.cc.

References ffmpeg_format.

Referenced by find_original(), get_format(), guess_format_idx(), and print_params().

Member Data Documentation

◆ m_audio_codec

AVCodecID FFMPEGFS_PARAMS::m_audio_codec

Either AV_CODEC_ID_NONE for default, or a user selected codec.

Definition at line 196 of file ffmpegfs.h.

Referenced by Format_Options::audio_codec(), ffmpegfs_opt_proc(), and main().

◆ m_audiobitrate

BITRATE FFMPEGFS_PARAMS::m_audiobitrate

◆ m_audiochannels

int FFMPEGFS_PARAMS::m_audiochannels

Max. number of audio channels.

Definition at line 205 of file ffmpegfs.h.

Referenced by FFmpeg_Transcoder::add_stream(), FFmpeg_Transcoder::FFmpeg_Transcoder(), ffmpegfs_opt_proc(), and print_params().

◆ m_audiosamplerate

int FFMPEGFS_PARAMS::m_audiosamplerate

◆ m_autocopy

AUTOCOPY FFMPEGFS_PARAMS::m_autocopy

Copy streams if codec matches.

Definition at line 198 of file ffmpegfs.h.

Referenced by FFmpeg_Transcoder::can_copy_stream(), ffmpegfs_opt_proc(), and print_params().

◆ m_basepath

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 192 of file ffmpegfs.h.

Referenced by ffmpegfs_init(), ffmpegfs_opt_proc(), insert_file(), main(), operator=(), print_params(), and Logging::Logger::~Logger().

◆ m_cache_maintenance

time_t FFMPEGFS_PARAMS::m_cache_maintenance

Prune timer interval.

Definition at line 247 of file ffmpegfs.h.

Referenced by ffmpegfs_init(), ffmpegfs_opt_proc(), and print_params().

◆ m_cachepath

std::string FFMPEGFS_PARAMS::m_cachepath

Disk cache path, defaults to $XDG_CACHE_HOME.

Definition at line 245 of file ffmpegfs.h.

Referenced by ffmpegfs_opt_proc(), main(), and transcoder_cache_path().

◆ m_clear_cache

int FFMPEGFS_PARAMS::m_clear_cache

Clear cache on start up.

Definition at line 249 of file ffmpegfs.h.

Referenced by main(), and print_params().

◆ m_debug

int FFMPEGFS_PARAMS::m_debug

Debug mode (stay in foreground.

Definition at line 232 of file ffmpegfs.h.

Referenced by main().

◆ m_decoding_errors

int FFMPEGFS_PARAMS::m_decoding_errors

Break transcoding on decoding error.

Definition at line 252 of file ffmpegfs.h.

Referenced by FFmpeg_Transcoder::decode_frame(), and print_params().

◆ m_deinterlace

int FFMPEGFS_PARAMS::m_deinterlace

◆ m_disable_cache

int FFMPEGFS_PARAMS::m_disable_cache

Disable cache.

Definition at line 246 of file ffmpegfs.h.

Referenced by print_params(), and transcoder_new().

◆ m_enablescript

int FFMPEGFS_PARAMS::m_enablescript

Enable virtual script.

Definition at line 228 of file ffmpegfs.h.

Referenced by ffmpegfs_init(), ffmpegfs_readdir(), prepare_script(), and print_params().

◆ m_expiry_time

time_t FFMPEGFS_PARAMS::m_expiry_time

Time (seconds) after which an cache entry is deleted.

Definition at line 238 of file ffmpegfs.h.

Referenced by Cache_Entry::expired(), ffmpegfs_opt_proc(), and print_params().

◆ m_hide_extensions

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 256 of file ffmpegfs.h.

Referenced by ffmpegfs_opt_proc(), and print_params().

◆ m_hwaccel_dec_API

HWACCELAPI FFMPEGFS_PARAMS::m_hwaccel_dec_API

◆ m_hwaccel_dec_blocked

HWACCEL_BLOCKED_MAP* FFMPEGFS_PARAMS::m_hwaccel_dec_blocked

List of blocked decoders and optional profiles.

Definition at line 222 of file ffmpegfs.h.

Referenced by check_hwaccel_dec_blocked(), and ffmpegfs_opt_proc().

◆ m_hwaccel_dec_device

std::string FFMPEGFS_PARAMS::m_hwaccel_dec_device

Decoder device. May be AUTO to auto detect or empty.

Definition at line 221 of file ffmpegfs.h.

Referenced by ffmpegfs_opt_proc(), FFmpeg_Transcoder::open_decoder(), and print_params().

◆ m_hwaccel_dec_device_type

AVHWDeviceType FFMPEGFS_PARAMS::m_hwaccel_dec_device_type

Enable hardware acceleration buffering for decoder.

Definition at line 220 of file ffmpegfs.h.

Referenced by ffmpegfs_opt_proc(), FFmpeg_Transcoder::get_format(), FFmpeg_Transcoder::get_pix_formats(), FFmpeg_Transcoder::open_decoder(), and print_params().

◆ m_hwaccel_enc_API

HWACCELAPI FFMPEGFS_PARAMS::m_hwaccel_enc_API

◆ m_hwaccel_enc_device

std::string FFMPEGFS_PARAMS::m_hwaccel_enc_device

Encoder device. May be AUTO to auto detect or empty.

Definition at line 218 of file ffmpegfs.h.

Referenced by ffmpegfs_opt_proc(), FFmpeg_Transcoder::open_bestmatch_video(), and print_params().

◆ m_hwaccel_enc_device_type

AVHWDeviceType FFMPEGFS_PARAMS::m_hwaccel_enc_device_type

Enable hardware acceleration buffering for encoder.

Definition at line 217 of file ffmpegfs.h.

Referenced by FFmpeg_Transcoder::add_stream(), ffmpegfs_opt_proc(), FFmpeg_Transcoder::hwframe_ctx_set(), FFmpeg_Transcoder::open_bestmatch_video(), and print_params().

◆ m_include_extensions

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 255 of file ffmpegfs.h.

Referenced by ffmpegfs_opt_proc(), and print_params().

◆ m_level

PRORESLEVEL FFMPEGFS_PARAMS::m_level

Level, currently proxy/hq/lt/HQ (ProRes only)

Definition at line 201 of file ffmpegfs.h.

Referenced by FFmpeg_Transcoder::add_stream(), ffmpegfs_opt_proc(), print_params(), set_defaults(), and FFmpeg_Transcoder::video_size().

◆ m_log_maxlevel

std::string FFMPEGFS_PARAMS::m_log_maxlevel

Max. log level.

Definition at line 233 of file ffmpegfs.h.

Referenced by ffmpegfs_opt_proc(), main(), and print_params().

◆ m_log_stderr

int FFMPEGFS_PARAMS::m_log_stderr

Log output to standard error.

Definition at line 234 of file ffmpegfs.h.

Referenced by main(), and print_params().

◆ m_log_syslog

int FFMPEGFS_PARAMS::m_log_syslog

Log output to system log.

Definition at line 235 of file ffmpegfs.h.

Referenced by main(), and print_params().

◆ m_logfile

std::string FFMPEGFS_PARAMS::m_logfile

Output filename if logging to file.

Definition at line 236 of file ffmpegfs.h.

Referenced by ffmpegfs_opt_proc(), main(), and print_params().

◆ m_max_cache_size

size_t FFMPEGFS_PARAMS::m_max_cache_size

Max. cache size in MB. When exceeded, oldest entries will be pruned.

Definition at line 243 of file ffmpegfs.h.

Referenced by ffmpegfs_opt_proc(), and print_params().

◆ m_max_inactive_abort

time_t FFMPEGFS_PARAMS::m_max_inactive_abort

Time (seconds) that must elapse without access until transcoding is aborted.

Definition at line 240 of file ffmpegfs.h.

Referenced by Cache_Entry::decode_timeout(), ffmpegfs_opt_proc(), log_transcoding_result(), and print_params().

◆ m_max_inactive_suspend

time_t FFMPEGFS_PARAMS::m_max_inactive_suspend

Time (seconds) that must elapse without access until transcoding is suspended.

Definition at line 239 of file ffmpegfs.h.

Referenced by ffmpegfs_opt_proc(), print_params(), Cache_Entry::suspend_timeout(), and transcode().

◆ m_max_threads

unsigned int FFMPEGFS_PARAMS::m_max_threads

Max. number of recoder threads.

Definition at line 250 of file ffmpegfs.h.

Referenced by ffmpegfs_init(), main(), and print_params().

◆ m_min_diskspace

size_t FFMPEGFS_PARAMS::m_min_diskspace

Min. diskspace required for cache.

Definition at line 244 of file ffmpegfs.h.

Referenced by ffmpegfs_opt_proc(), and print_params().

◆ m_min_dvd_chapter_duration

int FFMPEGFS_PARAMS::m_min_dvd_chapter_duration

Min. DVD chapter duration. Shorter chapters will be ignored.

Definition at line 253 of file ffmpegfs.h.

Referenced by create_dvd_virtualfile(), and print_params().

◆ m_min_seek_time_diff

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 214 of file ffmpegfs.h.

Referenced by ffmpegfs_opt_proc(), print_params(), FFmpeg_Transcoder::start_new_segment(), and transcoder_read().

◆ m_mountpath

std::string FFMPEGFS_PARAMS::m_mountpath

Mount path: Files from m_mountpath will be mapped to this directory.

Definition at line 193 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().

◆ m_no_subtitles

int FFMPEGFS_PARAMS::m_no_subtitles

0: allow subtitles, 1: do no transcode subtitles

Definition at line 224 of file ffmpegfs.h.

Referenced by FFmpeg_Transcoder::open_input_file(), and print_params().

◆ m_noalbumarts

int FFMPEGFS_PARAMS::m_noalbumarts

Skip album arts.

Definition at line 226 of file ffmpegfs.h.

Referenced by FFmpeg_Transcoder::open_albumarts(), FFmpeg_Transcoder::open_output_filestreams(), and print_params().

◆ m_oldnamescheme

int FFMPEGFS_PARAMS::m_oldnamescheme

Use old output name scheme, can create duplicate filenames.

Definition at line 254 of file ffmpegfs.h.

Referenced by print_params(), and virtual_name().

◆ m_prebuffer_size

size_t FFMPEGFS_PARAMS::m_prebuffer_size

Number of bytes that will be decoded before the output can be accessed.

Definition at line 242 of file ffmpegfs.h.

Referenced by ffmpegfs_opt_proc(), print_params(), and transcode().

◆ m_prebuffer_time

time_t FFMPEGFS_PARAMS::m_prebuffer_time

Playing time that will be decoded before the output can be accessed.

Definition at line 241 of file ffmpegfs.h.

Referenced by ffmpegfs_opt_proc(), print_params(), and transcode().

◆ m_profile

PROFILE FFMPEGFS_PARAMS::m_profile

Target profile: Firefox, MS Edge/IE or other.

Definition at line 200 of file ffmpegfs.h.

Referenced by ffmpegfs_opt_proc(), FFmpeg_Transcoder::prepare_codec(), FFmpeg_Transcoder::prepare_format(), and print_params().

◆ m_prune_cache

int FFMPEGFS_PARAMS::m_prune_cache

Prune cache immediately.

Definition at line 248 of file ffmpegfs.h.

Referenced by main().

◆ m_recodesame

RECODESAME FFMPEGFS_PARAMS::m_recodesame

Recode to same format options.

Definition at line 199 of file ffmpegfs.h.

Referenced by ffmpegfs_opt_proc(), ffmpegfs_readdir(), print_params(), and virtual_name().

◆ m_sample_fmt

SAMPLE_FMT FFMPEGFS_PARAMS::m_sample_fmt

◆ m_scriptfile

std::string FFMPEGFS_PARAMS::m_scriptfile

Script name.

Definition at line 229 of file ffmpegfs.h.

Referenced by ffmpegfs_opt_proc(), ffmpegfs_readdir(), and print_params().

◆ m_scriptsource

std::string FFMPEGFS_PARAMS::m_scriptsource

Source script.

Definition at line 230 of file ffmpegfs.h.

Referenced by ffmpegfs_opt_proc(), prepare_script(), and print_params().

◆ m_segment_duration

int64_t FFMPEGFS_PARAMS::m_segment_duration

◆ m_video_codec

AVCodecID FFMPEGFS_PARAMS::m_video_codec

Either AV_CODEC_ID_NONE for default, or a user selected codec.

Definition at line 197 of file ffmpegfs.h.

Referenced by ffmpegfs_opt_proc(), main(), and Format_Options::video_codec().

◆ m_videobitrate

BITRATE FFMPEGFS_PARAMS::m_videobitrate

◆ m_videoheight

int FFMPEGFS_PARAMS::m_videoheight

Output video height.

Definition at line 210 of file ffmpegfs.h.

Referenced by Cache_Entry::clear(), FFmpeg_Transcoder::get_video_size(), Cache_Entry::outdated(), and print_params().

◆ m_videowidth

int FFMPEGFS_PARAMS::m_videowidth

Output video width.

Definition at line 209 of file ffmpegfs.h.

Referenced by Cache_Entry::clear(), FFmpeg_Transcoder::get_video_size(), Cache_Entry::outdated(), and print_params().

◆ m_win_smb_fix

int FFMPEGFS_PARAMS::m_win_smb_fix

Experimental Windows fix for access to EOF at file open.

Definition at line 258 of file ffmpegfs.h.

Referenced by print_params(), and transcoder_read().


The documentation for this struct was generated from the following files: