Class: Poppler::Media

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Instance Method Details

#auto_playBoolean

Returns the auto-play parameter.

Returns:

  • (Boolean)

    true if media should auto-play, false otherwise

#filenameString

Returns the media clip filename, in case of non-embedded media. filename might be a local relative or absolute path or a URI

Returns:

  • (String)

    a filename, return value is owned by Poppler::Media and should not be freed

#is_embeddedBoolean

Whether the media clip is embedded in the PDF. If the result is true, the embedded stream can be saved with poppler_media_save() or poppler_media_save_to_callback() function. If the result is false, the media clip filename can be retrieved with poppler_media_get_filename() function.

Returns:

  • (Boolean)

    true if media clip is embedded, false otherwise

#mime_typeString

Returns the media clip mime-type

Returns:

  • (String)

    the mime-type, return value is owned by Poppler::Media and should not be freed

#repeat_countPoppler::gfloat

Returns the repeat count parameter.

Returns:

  • (Poppler::gfloat)

    Repeat count parameter (float)

#save(filename) ⇒ Boolean

Saves embedded stream of poppler_media to a file indicated by filename. If error is set, false will be returned. Possible errors include those in the #G_FILE_ERROR domain and whatever the save function generates.

Parameters:

  • filename (String)

    name of file to save

Returns:

  • (Boolean)

    true, if the file successfully saved

#save_to_callback(save_func, user_data) ⇒ Boolean

Saves embedded stream of poppler_media 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, false will be returned. Possible errors include those in the #G_FILE_ERROR domain and whatever the save function generates.

Parameters:

  • save_func (Poppler::MediaSaveFunc)

    a function that is called to save each block of data that the save routine generates.

  • user_data (GObject)

    user data to pass to the save function.

Returns:

  • (Boolean)

    true, if the save successfully completed

#save_to_fd(fd) ⇒ Boolean

Saves embedded stream of poppler_media to a file referred to by fd. If error is set, false will 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.

Parameters:

  • fd (Integer)

    a valid file descriptor open for writing

Returns:

  • (Boolean)

    true, if the file successfully saved

#show_controlsBoolean

Returns the show controls parameter.

Returns:

  • (Boolean)

    true if media should show controls, false otherwise