libgpac
Documentation of the core library of GPAC
|
FileIO object for file IO callbacks from libgpac. More...
Public Member Functions | |
def | __init__ (self, url, obj) |
constructor for FileIO More... | |
Data Fields | |
url | |
the underlying gfio:// URL to be provided to GPAC | |
The FileIO object is used to create input or output interfaces in which GPAC will read or write. This allows generating content in python without any disk IO, or passing python data as input to GPAC without intermediate file.
This object passed to the FileIO constructor must implement the following callbacks:
Opens the file in read or write mode.
Closes the file
Writes the file
Reads the file
Seeks current position in file (same as fopen)
Gets current position in file (same as ftell)
Checks if the current position is at the end of the file (same as feof)
Checks if the given URL exists. This callback is optional
The URL passed to the constructor indentifies the file name wrapped. Some file types such as HLS or DASH manifest may imply reading or writing several files. To handle these cases, the object passed to the constructor will be cloned for each call to open().
All FileIO callbacks will be done in the main thread.
def python.libgpac.libgpac.FileIO.__init__ | ( | self, | |
url, | |||
obj | |||
) |
url | url for this fileIO factory |
obj | instance of the class used for IOs. This instance will be cloned (shallow copy) for each new file to open |