upipe-modules/upipe_file_sink.h header reference

Upipe sink module for files More

Header inclusion  

Members  

Types  

Functions  

Description  

Upipe sink module for files

Members detail  

#define UPIPE_FSINK_EXPECTED_FLOW_DEF  

This macro is declared in upipe-modules/upipe_file_sink.h source file, line 41.

#define UPIPE_FSINK_SIGNATURE  

This macro is declared in upipe-modules/upipe_file_sink.h source file, line 40.

#define _UPIPE_MODULES_UPIPE_FILE_SINK_H_  

This macro is declared in upipe-modules/upipe_file_sink.h source file, line 33.

enum upipe_fsink_command  

This enum is declared in upipe-modules/upipe_file_sink.h source file, line 57.

This enum extends upipe_command with specific commands for file sink.

IdentifierValueDescription
UPIPE_FSINK_SENTINELUPIPE_CONTROL_LOCAL
UPIPE_FSINK_GET_PATHunknownreturns the path of the currently opened file (const char **)
UPIPE_FSINK_SET_PATHunknownasks to open the given path (const char *, enum upipe_fsink_mode)
UPIPE_FSINK_SET_FDunknownassociates a stream with the upipe (int fildes, enum upip_fsink_mode)
UPIPE_FSINK_GET_FDunknownreturns the file descriptor of the currently opened file (int *)
UPIPE_FSINK_SET_SYNC_PERIODunknownsets fdatasync period (uint64_t)
UPIPE_FSINK_GET_SYNC_PERIODunknowngets fdatasync period (uint64_t *)
UPIPE_FSINK_CONTROL_LOCALUPIPE_CONTROL_LOCAL+0x1000outer pipes commands begin here

int upipe_fsink_get_fd(struct upipe *upipe, int *fd_p)  

This function is declared in upipe-modules/upipe_file_sink.h source file, line 134.

This function returns the file descriptor of the currently opened file.

Parameter list:

  • upipe: description structure of the pipe
  • fd_p: filled in with the file descriptor of the file

The return value is an error code

int upipe_fsink_get_path(struct upipe *upipe, const char **path_p)  

This function is declared in upipe-modules/upipe_file_sink.h source file, line 91.

This function returns the path of the currently opened file.

Parameter list:

  • upipe: description structure of the pipe
  • path_p: filled in with the path of the file

The return value is an error code

int upipe_fsink_get_sync_period(struct upipe *upipe, uint64_t *sync_period_p)  

This function is declared in upipe-modules/upipe_file_sink.h source file, line 147.

This function returns the sync period.

Parameter list:

  • upipe: description structure of the pipe
  • sync_period_p: filled in with the sync period

The return value is an error code

struct upipe_mgr * upipe_fsink_mgr_alloc(void )  

This function is declared in upipe-modules/upipe_file_sink.h source file, line 81.

This function returns the management structure for all file sinks.

The return value is pointer to manager

enum upipe_fsink_mode  

This enum is declared in upipe-modules/upipe_file_sink.h source file, line 45.

This enum defines file opening modes.

IdentifierValueDescription
UPIPE_FSINK_NONE0do not do anything besides opening the fd
UPIPE_FSINK_APPEND1append to an existing file (O_CREAT + lseek(SEEK_END))
UPIPE_FSINK_OVERWRITE2overwrite an existing file, or create it (O_CREAT + ftruncate(0))
UPIPE_FSINK_CREATE3create a file, fail if it already exists (O_CREAT | O_EXCL)

int upipe_fsink_set_fd(struct upipe *upipe, int fildes, enum upipe_fsink_mode mode)  

This function is declared in upipe-modules/upipe_file_sink.h source file, line 121.

This function associates a stream with the upipe

Parameter list:

  • upipe: description structure of the pipe
  • fildes: file descriptor
  • mode: mode of opening the file

The return value is an error code

int upipe_fsink_set_path(struct upipe *upipe, const char *path, enum upipe_fsink_mode mode)  

This function is declared in upipe-modules/upipe_file_sink.h source file, line 106.

This function asks to open the given file.

Parameter list:

  • upipe: description structure of the pipe
  • path: relative or absolute path of the file
  • mode: mode of opening the file

The return value is an error code

int upipe_fsink_set_sync_period(struct upipe *upipe, uint64_t sync_period)  

This function is declared in upipe-modules/upipe_file_sink.h source file, line 160.

This function sets the sync period.

Parameter list:

  • upipe: description structure of the pipe
  • sync_period: sync period

The return value is an error code

Valid XHTML 1.0 StrictGenerated by cmassiot on Fri Feb 2 23:57:18 2018 using MkDoc