Media Player D-Bus API

From gPodderWiki

Jump to: navigation, search

This API specification aims at providing a documented, easy-to-use API for getting and setting the media player position via D-Bus. This should allow media players (such as Panucci) and podcast aggregators (such as gPodder) to work together and synchronize the playback position of media files.

Contents

[edit] Interface: org.gpodder.player

[edit] PlaybackStarted

  • uint32 position
  • string file_uri

Emitted when the media player starts playback of a given file at file_uri at the position position.

[edit] PlaybackStopped

  • uint32 start_position
  • uint32 end_position
  • uint32 total_time
  • string file_uri

Emitted when the user stops/pauses playback, when the playback ends or the player is closed. The file URI is in file_uri, the start time of the segment that has just been played is in start_position, the stop time in end_position and the (detected) total time of the file is in total_time.

Seeking in the file should also emit a PlaybackStopped signal (at the position where the seek is initialized) and a PlaybackStarted signal (at the position to which the seek jumps).

[edit] ChapterAdded

  • uint32 start_position
  • uint32 end_position
  • string file_uri
  • string name
  • bool advertising

Emitted when the user adds a new chapter to the media player. The start of the chapter is in start_position, the end in end_position (if it's a simple marker, the end_position must be set to the same value as start_position). The file_uri mentions the file in question and the name is a user-defined display name / description for the chapter. The advertising flag should be true when the user defined that the marked chapter is non-content (advertising, etc..).

[edit] ChapterRemoved

  • uint32 start_position
  • uint32 end_position
  • string file_uri

Emitted when the user removes a chapter from the media player. The receiving party should remove all chapters in its database that have the same start_position and end_position, even if there are multiple chapters saved. The file/episode for which the chapter should be deleted is file_uri.

[edit] Additions to the gPodder D-Bus Object

[edit] GetChapterList

  • string file_uri

Return a list of chapters for the given file.

Personal tools
Toolbox
LANGUAGES
© 2005-2011 Thomas Perl and the gPodder Team