FFmpegfs Fuse Multi Media Filesystem 2.16
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. More...
 
bool smart_transcode () const
 Check for smart transcode mode. More...
 
const FFmpegfs_Formatcurrent_format (LPCVIRTUALFILE virtualfile) const
 Get FFmpegfs_Format for a virtual file. More...
 
FFMPEGFS_PARAMSoperator= (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_MAPm_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< 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. More...
 
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. More...
 
int m_win_smb_fix
 Experimental Windows fix for access to EOF at file open. More...
 

Detailed Description

Global program parameters.

Definition at line 165 of file ffmpegfs.h.

Constructor & Destructor Documentation

◆ FFMPEGFS_PARAMS() [1/2]

FFMPEGFS_PARAMS::FFMPEGFS_PARAMS ( )

Definition at line 76 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 147 of file ffmpegfs.cc.

◆ ~FFMPEGFS_PARAMS()

FFMPEGFS_PARAMS::~FFMPEGFS_PARAMS ( )

Definition at line 152 of file ffmpegfs.cc.

Member Function Documentation

◆ current_format()

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

Get FFmpegfs_Format for a virtual file.

Parameters
[in]virtualfile- VIRTUALFILE struct of a file.
Returns
On success, returns pointer to format. On error, returns nullptr.

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().

◆ 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 157 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 230 of file ffmpegfs.cc.

References AUDIO, and ffmpeg_format.

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

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

Referenced by Format_Options::audio_codec().

◆ m_audiobitrate

BITRATE FFMPEGFS_PARAMS::m_audiobitrate

◆ m_audiochannels

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().

◆ m_audiosamplerate

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().

◆ m_autocopy

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().

◆ 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 196 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 251 of file ffmpegfs.h.

Referenced by ffmpegfs_init().

◆ m_cachepath

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().

◆ m_clear_cache

int FFMPEGFS_PARAMS::m_clear_cache

Clear cache on start up.

Definition at line 253 of file ffmpegfs.h.

◆ m_debug

int FFMPEGFS_PARAMS::m_debug

Debug mode (stay in foreground.

Definition at line 236 of file ffmpegfs.h.

Referenced by main().

◆ m_decoding_errors

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().

◆ m_deinterlace

int FFMPEGFS_PARAMS::m_deinterlace

◆ m_disable_cache

int FFMPEGFS_PARAMS::m_disable_cache

Disable cache.

Definition at line 250 of file ffmpegfs.h.

Referenced by transcoder_new().

◆ m_enablescript

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().

◆ m_expiry_time

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().

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

◆ m_hwaccel_dec_API

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().

◆ m_hwaccel_dec_blocked

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().

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

Referenced by FFmpeg_Transcoder::open_decoder().

◆ m_hwaccel_dec_device_type

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().

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

Referenced by FFmpeg_Transcoder::open_bestmatch_video().

◆ m_hwaccel_enc_device_type

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().

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

◆ m_level

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().

◆ m_log_maxlevel

std::string FFMPEGFS_PARAMS::m_log_maxlevel

Max. log level.

Definition at line 237 of file ffmpegfs.h.

Referenced by main().

◆ m_log_stderr

int FFMPEGFS_PARAMS::m_log_stderr

Log output to standard error.

Definition at line 238 of file ffmpegfs.h.

Referenced by main().

◆ m_log_syslog

int FFMPEGFS_PARAMS::m_log_syslog

Log output to system log.

Definition at line 239 of file ffmpegfs.h.

Referenced by main().

◆ m_logfile

std::string FFMPEGFS_PARAMS::m_logfile

Output filename if logging to file.

Definition at line 240 of file ffmpegfs.h.

Referenced by main().

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

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

Referenced by Cache_Entry::decode_timeout(), and transcoder_thread().

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

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

◆ m_max_threads

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().

◆ m_min_diskspace

size_t FFMPEGFS_PARAMS::m_min_diskspace

Min. diskspace required for cache.

Definition at line 248 of file ffmpegfs.h.

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

Referenced by create_dvd_virtualfile().

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

Referenced by FFmpeg_Transcoder::start_new_segment().

◆ m_mountpath

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().

◆ m_no_subtitles

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().

◆ m_noalbumarts

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().

◆ m_oldnamescheme

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().

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

Referenced by 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 245 of file ffmpegfs.h.

Referenced by transcode().

◆ m_profile

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().

◆ m_prune_cache

int FFMPEGFS_PARAMS::m_prune_cache

Prune cache immediately.

Definition at line 252 of file ffmpegfs.h.

Referenced by main().

◆ m_recodesame

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().

◆ m_sample_fmt

SAMPLE_FMT FFMPEGFS_PARAMS::m_sample_fmt

◆ m_scriptfile

std::string FFMPEGFS_PARAMS::m_scriptfile

Script name.

Definition at line 233 of file ffmpegfs.h.

Referenced by ffmpegfs_readdir().

◆ m_scriptsource

std::string FFMPEGFS_PARAMS::m_scriptsource

Source script.

Definition at line 234 of file ffmpegfs.h.

Referenced by prepare_script().

◆ m_segment_duration

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().

◆ m_video_codec

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().

◆ m_videobitrate

BITRATE FFMPEGFS_PARAMS::m_videobitrate

◆ m_videoheight

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().

◆ m_videowidth

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().

◆ m_win_smb_fix

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.


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