FFmpegfs Fuse Multi Media Filesystem 2.16
Functions
cache_maintenance.h File Reference

Cache maintenance More...

#include <time.h>
Include dependency graph for cache_maintenance.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool start_cache_maintenance (time_t interval)
 Start cache maintenance timer. More...
 
bool stop_cache_maintenance ()
 Stop cache maintenance timer. More...
 

Detailed Description

Cache maintenance

Creates a POSIX timer that starts the cache maintenance in preset intervals. To ensure that only one instance of FFmpegfs cleans up the cache a shared memory area and a named semaphore is also created.

The first FFmpegfs process acts as master, all subsequently started instances will be clients. If the master process goes away one of the clients will automatically take over as master.

Author
Norbert Schlia (nschl.nosp@m.ia@o.nosp@m.blivi.nosp@m.on-s.nosp@m.oftwa.nosp@m.re.d.nosp@m.e)

Definition in file cache_maintenance.h.

Function Documentation

◆ start_cache_maintenance()

bool start_cache_maintenance ( time_t  interval)

Start cache maintenance timer.

Parameters
[in]interval- Interval in seconds to run timer at.
Returns
On success, returns true. On error, returns false. Check errno for details.

Definition at line 319 of file cache_maintenance.cc.

References link_up(), and start_timer().

Referenced by ffmpegfs_init().

◆ stop_cache_maintenance()

bool stop_cache_maintenance ( )

Stop cache maintenance timer.

Returns
On success, returns true. On error, returns false. Check errno for details.

Definition at line 331 of file cache_maintenance.cc.

References link_down(), and stop_timer().

Referenced by ffmpegfs_destroy().