upipe-modules/upipe_file_sink.h header reference
Upipe sink module for files More
Header inclusion
Members
Types
- enum upipe_fsink_command
- enum upipe_fsink_mode
Functions
- int upipe_fsink_get_fd(struct upipe *upipe, int *fd_p)
- int upipe_fsink_get_path(struct upipe *upipe, const char **path_p)
- int upipe_fsink_get_sync_period(struct upipe *upipe, uint64_t *sync_period_p)
- struct upipe_mgr * upipe_fsink_mgr_alloc(void )
- int upipe_fsink_set_fd(struct upipe *upipe, int fildes, enum upipe_fsink_mode mode)
- int upipe_fsink_set_path(struct upipe *upipe, const char *path, enum upipe_fsink_mode mode)
- int upipe_fsink_set_sync_period(struct upipe *upipe, uint64_t sync_period)
Description
Upipe sink module for files
Members detail
This macro is declared in upipe-modules/upipe_file_sink.h source file, line 41.
This macro is declared in upipe-modules/upipe_file_sink.h source file, line 40.
This macro is declared in upipe-modules/upipe_file_sink.h source file, line 33.
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.
Identifier | Value | Description |
---|---|---|
UPIPE_FSINK_SENTINEL | UPIPE_CONTROL_LOCAL | |
UPIPE_FSINK_GET_PATH | unknown | returns the path of the currently opened file (const char **) |
UPIPE_FSINK_SET_PATH | unknown | asks to open the given path (const char *, enum upipe_fsink_mode) |
UPIPE_FSINK_SET_FD | unknown | associates a stream with the upipe (int fildes, enum upip_fsink_mode) |
UPIPE_FSINK_GET_FD | unknown | returns the file descriptor of the currently opened file (int *) |
UPIPE_FSINK_SET_SYNC_PERIOD | unknown | sets fdatasync period (uint64_t) |
UPIPE_FSINK_GET_SYNC_PERIOD | unknown | gets fdatasync period (uint64_t *) |
UPIPE_FSINK_CONTROL_LOCAL | UPIPE_CONTROL_LOCAL+0x1000 | outer pipes commands begin here |
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
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
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
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
This enum is declared in upipe-modules/upipe_file_sink.h source file, line 45.
This enum defines file opening modes.
Identifier | Value | Description |
---|---|---|
UPIPE_FSINK_NONE | 0 | do not do anything besides opening the fd |
UPIPE_FSINK_APPEND | 1 | append to an existing file (O_CREAT + lseek(SEEK_END)) |
UPIPE_FSINK_OVERWRITE | 2 | overwrite an existing file, or create it (O_CREAT + ftruncate(0)) |
UPIPE_FSINK_CREATE | 3 | create 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
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