gmerlin
Modules | Macros
Messages from the player

Modules

 Player states
 State definitions for the player.
 

Macros

#define BG_PLAYER_MSG_TIME_CHANGED   0
 Display time changed. More...
 
#define BG_PLAYER_MSG_TRACK_CHANGED   1
 Track changed. More...
 
#define BG_PLAYER_MSG_STATE_CHANGED   2
 State changed. More...
 
#define BG_PLAYER_MSG_TRACK_NAME   3
 Track name. More...
 
#define BG_PLAYER_MSG_TRACK_DURATION   5
 Duration changed. More...
 
#define BG_PLAYER_MSG_TRACK_NUM_STREAMS   4
 Get info about the streams. More...
 
#define BG_PLAYER_MSG_AUDIO_STREAM   6
 Get information about the current audio stream. More...
 
#define BG_PLAYER_MSG_VIDEO_STREAM   7
 Get information about the current video stream. More...
 
#define BG_PLAYER_MSG_SUBTITLE_STREAM   9
 Get information about the current subtitle stream. More...
 
#define BG_PLAYER_MSG_METADATA   10
 Metadata changed. More...
 
#define BG_PLAYER_MSG_VOLUME_CHANGED   16
 Volume changed. More...
 
#define BG_PLAYER_MSG_AUDIO_STREAM_INFO   17
 Audio stream info. More...
 
#define BG_PLAYER_MSG_VIDEO_STREAM_INFO   18
 Video stream info. More...
 
#define BG_PLAYER_MSG_SUBTITLE_STREAM_INFO   19
 Subtitle stream info. More...
 
#define BG_PLAYER_MSG_ACCEL
 A key was pressed in the video window. More...
 
#define BG_PLAYER_MSG_CLEANUP   21
 Player just cleaned up. More...
 
#define BG_PLAYER_MSG_MUTE   22
 Player changed the mute state. More...
 
#define BG_PLAYER_MSG_NUM_CHAPTERS   23
 Number of chapters. More...
 
#define BG_PLAYER_MSG_CHAPTER_INFO   24
 Chapter info. More...
 
#define BG_PLAYER_MSG_CHAPTER_CHANGED   25
 Chapter changed. More...
 
#define BG_PLAYER_MSG_INTERRUPT   26
 Playback interrupted. More...
 
#define BG_PLAYER_MSG_INTERRUPT_RESUME   27
 Interrupted playback resumed. More...
 
#define BG_PLAYER_MSG_INPUT   28
 Input info arg0: Plugin name (string) arg1: Location (string) arg2: Track (int) More...
 
#define BG_PLAYER_MSG_AUDIO_PEAK   29
 Audio peaks arg0: Number of samples processed arg1: Left peak arg2: Right peak. More...
 

Detailed Description

Macro Definition Documentation

#define BG_PLAYER_MSG_TIME_CHANGED   0

Display time changed.

arg0: New time (gavl_time_t)

This is called periodically during playback if the time changed.

#define BG_PLAYER_MSG_TRACK_CHANGED   1

Track changed.

arg0: Track index (int)

This message is only emitted for input plugins, which do playback themselves.

#define BG_PLAYER_MSG_STATE_CHANGED   2

State changed.

arg0: New state (Player states)

arg1 depends on the state:

  • BG_PLAYER_STATE_BUFFERING: Buffering percentage (float, 0.0..1.0)
  • BG_PLAYER_STATE_ERROR: String describing the error (char*)
  • BG_PLAYER_STATE_PLAYING: 1 if player can seek within the current track, 0 else (int)
  • BG_PLAYER_STATE_CHANGING: 1 if player needs the next track, 0 else
#define BG_PLAYER_MSG_TRACK_NAME   3

Track name.

arg0: Track name (char*)

This is set whenever the track name changes. For internet radio stations, it can be sent multiple times for one URL.

#define BG_PLAYER_MSG_TRACK_DURATION   5

Duration changed.

arg0: Total duration in seconds (gavl_time_t)

#define BG_PLAYER_MSG_TRACK_NUM_STREAMS   4

Get info about the streams.

arg0: Number of audio streams (int)

arg1: Number of video streams (int)

arg2: Number of subtitle streams (int)

#define BG_PLAYER_MSG_AUDIO_STREAM   6

Get information about the current audio stream.

arg0: Stream index (int)

arg1: Input Format (gavl_audio_format_t)

arg2: Output Format (gavl_audio_format_t)

#define BG_PLAYER_MSG_VIDEO_STREAM   7

Get information about the current video stream.

arg0: Stream index (int)

arg1: Input Format (gavl_video_format_t)

arg2: Output Format (gavl_video_format_t)

#define BG_PLAYER_MSG_SUBTITLE_STREAM   9

Get information about the current subtitle stream.

arg0: Stream index (int)

arg1: 1 if the subtitle is a text subtitle, 0 else

arg2: Format (gavl_video_format_t)

#define BG_PLAYER_MSG_METADATA   10

Metadata changed.

arg0: Metadata (bg_metadata_t)

#define BG_PLAYER_MSG_VOLUME_CHANGED   16

Volume changed.

arg0: New volume in dB (float)

#define BG_PLAYER_MSG_AUDIO_STREAM_INFO   17

Audio stream info.

arg0: stream index (int)

arg1: stream name (char*)

arg2: stream language (char*)

This message is sent for all available audio streams regardless of what you selected

#define BG_PLAYER_MSG_VIDEO_STREAM_INFO   18

Video stream info.

arg0: stream index (int)

arg1: stream name (char*)

arg2: stream language (char*)

This message is sent for all available video streams regardless of what you selected

#define BG_PLAYER_MSG_SUBTITLE_STREAM_INFO   19

Subtitle stream info.

arg0: stream index (int)

arg1: stream name (char*)

arg2: stream language (char*)

This message is sent for all available video streams regardless of what you selected

#define BG_PLAYER_MSG_ACCEL
Value:
20 /* A key shortcut
was pressed */

A key was pressed in the video window.

arg0: keycode (see System independent keycode definitions)

arg1: mask (see System independent keycode definitions)

This message is only emitted if key+mask were not handled by the video plugin or by the player.

#define BG_PLAYER_MSG_CLEANUP   21

Player just cleaned up.

A previously triggerend cleanup operation is finished.

#define BG_PLAYER_MSG_MUTE   22

Player changed the mute state.

arg0: 1 when player is muted now, 0 else

#define BG_PLAYER_MSG_NUM_CHAPTERS   23

Number of chapters.

arg0: Number

#define BG_PLAYER_MSG_CHAPTER_INFO   24

Chapter info.

arg0: Chapter index arg1: Name (string) arg2: Start time (time)

#define BG_PLAYER_MSG_CHAPTER_CHANGED   25

Chapter changed.

arg0: Chapter index

#define BG_PLAYER_MSG_INTERRUPT   26

Playback interrupted.

#define BG_PLAYER_MSG_INTERRUPT_RESUME   27

Interrupted playback resumed.

#define BG_PLAYER_MSG_INPUT   28

Input info arg0: Plugin name (string) arg1: Location (string) arg2: Track (int)

#define BG_PLAYER_MSG_AUDIO_PEAK   29

Audio peaks arg0: Number of samples processed arg1: Left peak arg2: Right peak.