Poppler.Media¶
- Subclasses:
 None
Methods¶
- Inherited:
 - Structs:
 
  | 
|
  | 
|
  | 
|
  | 
|
  | 
Virtual Methods¶
- Inherited:
 
Properties¶
None
Signals¶
- Inherited:
 
Fields¶
- Inherited:
 
Class Details¶
- class Poppler.Media(**kwargs)¶
 - Bases:
 - Abstract:
 No
- get_auto_play()¶
 - 
Returns the auto-play parameter.
New in version 20.04.0.
 
- get_filename()¶
 - Returns:
 a filename, return value is owned by
Poppler.Mediaand should not be freed- Return type:
 
Returns the media clip filename, in case of non-embedded media. filename might be a local relative or absolute path or a URI
New in version 0.14.
- get_mime_type()¶
 - Returns:
 the mime-type, return value is owned by
Poppler.Mediaand should not be freed- Return type:
 
Returns the media clip mime-type
New in version 0.14.
- get_repeat_count()¶
 - Returns:
 Repeat count parameter (float)
- Return type:
 
Returns the repeat count parameter.
New in version 20.04.0.
- get_show_controls()¶
 - 
Returns the show controls parameter.
New in version 20.04.0.
 
- is_embedded()¶
 - 
Whether the media clip is embedded in the PDF. If the result is
True, the embedded stream can be saved withPoppler.Media.save() orPoppler.Media.save_to_callback() function. If the result isFalse, the media clip filename can be retrieved withPoppler.Media.get_filename() function.New in version 0.14.
 
- save(filename)¶
 - Parameters:
 filename (
str) – name of file to save- Raises:
 - Returns:
 True, if the file successfully saved- Return type:
 
Saves embedded stream of self to a file indicated by filename. If error is set,
Falsewill be returned. Possible errors include those in the #G_FILE_ERROR domain and whatever the save function generates.New in version 0.14.
- save_to_callback(save_func, *user_data)¶
 - Parameters:
 save_func (
Poppler.MediaSaveFunc) – a function that is called to save each block of data that the save routine generates.user_data (
objectorNone) – user data to pass to the save function.
- Raises:
 - Returns:
 True, if the save successfully completed- Return type:
 
Saves embedded stream of self by feeding the produced data to save_func. Can be used when you want to store the media clip stream to something other than a file, such as an in-memory buffer or a socket. If error is set,
Falsewill be returned. Possible errors include those in the #G_FILE_ERROR domain and whatever the save function generates.New in version 0.14.
- save_to_fd(fd)¶
 - Parameters:
 fd (
int) – a valid file descriptor open for writing- Raises:
 - Returns:
 True, if the file successfully saved- Return type:
 
Saves embedded stream of self to a file referred to by fd. If error is set,
Falsewill be returned. Possible errors include those in the #G_FILE_ERROR domain and whatever the save function generates. Note that this function takes ownership of fd; you must not operate on it again, nor close it.New in version 21.12.0.