Music Hub  ..
A session-wide music playback service
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
gstreamer::Playbin Struct Reference

#include <playbin.h>

+ Collaboration diagram for gstreamer::Playbin:

Public Types

enum  PlayFlags {
  GST_PLAY_FLAG_VIDEO = (1 << 0),
  GST_PLAY_FLAG_AUDIO = (1 << 1),
  GST_PLAY_FLAG_TEXT = (1 << 2)
}
 
enum  MediaFileType {
  MEDIA_FILE_TYPE_NONE,
  MEDIA_FILE_TYPE_AUDIO,
  MEDIA_FILE_TYPE_VIDEO
}
 

Public Member Functions

 Playbin ()
 
 ~Playbin ()
 
void on_client_died ()
 
void reset_pipeline ()
 
void on_new_message (const Bus::Message &message)
 
gstreamer::Busmessage_bus ()
 
void setup_pipeline_for_audio_video ()
 
void create_video_sink (uint32_t texture_id)
 
void set_volume (double new_volume)
 
uint64_t position () const
 
uint64_t duration () const
 
void set_uri (const std::string &uri)
 
std::string uri () const
 
bool set_state_and_wait (GstState new_state)
 
bool seek (const std::chrono::microseconds &ms)
 
std::string get_file_content_type (const std::string &uri) const
 
bool is_audio_file (const std::string &uri) const
 
bool is_video_file (const std::string &uri) const
 
MediaFileType media_file_type () const
 

Static Public Member Functions

static const std::string & pipeline_name ()
 
static void about_to_finish (GstElement *, gpointer user_data)
 
static void on_client_died_cb (void *context)
 

Public Attributes

GstElement * pipeline
 
gstreamer::Bus bus
 
MediaFileType file_type
 
SurfaceTextureClientHybris stc_hybris
 
core::Connection on_new_message_connection
 
bool is_seeking
 
struct {
   core::Signal< void >   about_to_finish
 
   core::Signal
< Bus::Message::Detail::ErrorWarningInfo >   on_error
 
   core::Signal
< Bus::Message::Detail::ErrorWarningInfo >   on_warning
 
   core::Signal
< Bus::Message::Detail::ErrorWarningInfo >   on_info
 
   core::Signal
< Bus::Message::Detail::Tag >   on_tag_available
 
   core::Signal
< Bus::Message::Detail::StateChanged >   on_state_changed
 
   core::Signal< uint64_t >   on_seeked_to
 
   core::Signal< void >   on_end_of_stream
 
   core::Signal
< media::Player::PlaybackStatus >   on_playback_status_changed
 
   core::Signal< void >   client_disconnected
 
signals
 

Detailed Description

Definition at line 38 of file playbin.h.

Member Enumeration Documentation

Enumerator
MEDIA_FILE_TYPE_NONE 
MEDIA_FILE_TYPE_AUDIO 
MEDIA_FILE_TYPE_VIDEO 

Definition at line 47 of file playbin.h.

Enumerator
GST_PLAY_FLAG_VIDEO 
GST_PLAY_FLAG_AUDIO 
GST_PLAY_FLAG_TEXT 

Definition at line 40 of file playbin.h.

Constructor & Destructor Documentation

gstreamer::Playbin::Playbin ( )
inline

Definition at line 67 of file playbin.h.

References pipeline.

gstreamer::Playbin::~Playbin ( )
inline

Definition at line 97 of file playbin.h.

References pipeline.

Member Function Documentation

static void gstreamer::Playbin::about_to_finish ( GstElement *  ,
gpointer  user_data 
)
inlinestatic

Definition at line 60 of file playbin.h.

References about_to_finish, and signals.

void gstreamer::Playbin::create_video_sink ( uint32_t  texture_id)
inline

Definition at line 221 of file playbin.h.

References pipeline.

uint64_t gstreamer::Playbin::duration ( ) const
inline

Definition at line 254 of file playbin.h.

References pipeline.

std::string gstreamer::Playbin::get_file_content_type ( const std::string &  uri) const
inline

Definition at line 324 of file playbin.h.

Referenced by is_audio_file(), and is_video_file().

bool gstreamer::Playbin::is_audio_file ( const std::string &  uri) const
inline

Definition at line 366 of file playbin.h.

References get_file_content_type().

Referenced by set_uri().

+ Here is the call graph for this function:

bool gstreamer::Playbin::is_video_file ( const std::string &  uri) const
inline

Definition at line 380 of file playbin.h.

References get_file_content_type().

Referenced by set_uri().

+ Here is the call graph for this function:

MediaFileType gstreamer::Playbin::media_file_type ( ) const
inline

Definition at line 394 of file playbin.h.

References file_type.

gstreamer::Bus& gstreamer::Playbin::message_bus ( )
inline

Definition at line 176 of file playbin.h.

References bus.

void gstreamer::Playbin::on_client_died ( )
inline

Definition at line 112 of file playbin.h.

References reset_pipeline(), and signals.

Referenced by on_client_died_cb().

+ Here is the call graph for this function:

static void gstreamer::Playbin::on_client_died_cb ( void *  context)
inlinestatic

Definition at line 103 of file playbin.h.

References on_client_died().

+ Here is the call graph for this function:

static const std::string& gstreamer::Playbin::pipeline_name ( )
inlinestatic

Definition at line 54 of file playbin.h.

uint64_t gstreamer::Playbin::position ( ) const
inline

Definition at line 245 of file playbin.h.

References pipeline.

void gstreamer::Playbin::reset_pipeline ( )
inline

Definition at line 123 of file playbin.h.

References file_type, MEDIA_FILE_TYPE_NONE, and pipeline.

Referenced by on_client_died().

bool gstreamer::Playbin::seek ( const std::chrono::microseconds &  ms)
inline

Definition at line 314 of file playbin.h.

References is_seeking, and pipeline.

bool gstreamer::Playbin::set_state_and_wait ( GstState  new_state)
inline

Definition at line 283 of file playbin.h.

References pipeline.

void gstreamer::Playbin::set_uri ( const std::string &  uri)
inline

Definition at line 263 of file playbin.h.

References file_type, is_audio_file(), is_video_file(), MEDIA_FILE_TYPE_AUDIO, MEDIA_FILE_TYPE_VIDEO, and pipeline.

+ Here is the call graph for this function:

void gstreamer::Playbin::set_volume ( double  new_volume)
inline

Definition at line 240 of file playbin.h.

References pipeline.

void gstreamer::Playbin::setup_pipeline_for_audio_video ( )
inline

Definition at line 181 of file playbin.h.

References GST_PLAY_FLAG_AUDIO, GST_PLAY_FLAG_TEXT, GST_PLAY_FLAG_VIDEO, and pipeline.

std::string gstreamer::Playbin::uri ( ) const
inline

Definition at line 272 of file playbin.h.

References pipeline.

Member Data Documentation

core::Signal<void> gstreamer::Playbin::about_to_finish

Definition at line 407 of file playbin.h.

Referenced by about_to_finish().

gstreamer::Bus gstreamer::Playbin::bus

Definition at line 400 of file playbin.h.

Referenced by message_bus().

core::Signal<void> gstreamer::Playbin::client_disconnected

Definition at line 416 of file playbin.h.

MediaFileType gstreamer::Playbin::file_type

Definition at line 401 of file playbin.h.

Referenced by media_file_type(), reset_pipeline(), and set_uri().

bool gstreamer::Playbin::is_seeking

Definition at line 404 of file playbin.h.

Referenced by on_new_message(), and seek().

core::Signal<void> gstreamer::Playbin::on_end_of_stream

Definition at line 414 of file playbin.h.

core::Signal<Bus::Message::Detail::ErrorWarningInfo> gstreamer::Playbin::on_error

Definition at line 408 of file playbin.h.

core::Signal<Bus::Message::Detail::ErrorWarningInfo> gstreamer::Playbin::on_info

Definition at line 410 of file playbin.h.

core::Connection gstreamer::Playbin::on_new_message_connection

Definition at line 403 of file playbin.h.

core::Signal<media::Player::PlaybackStatus> gstreamer::Playbin::on_playback_status_changed

Definition at line 415 of file playbin.h.

core::Signal<uint64_t> gstreamer::Playbin::on_seeked_to

Definition at line 413 of file playbin.h.

core::Signal<Bus::Message::Detail::StateChanged> gstreamer::Playbin::on_state_changed

Definition at line 412 of file playbin.h.

core::Signal<Bus::Message::Detail::Tag> gstreamer::Playbin::on_tag_available

Definition at line 411 of file playbin.h.

core::Signal<Bus::Message::Detail::ErrorWarningInfo> gstreamer::Playbin::on_warning

Definition at line 409 of file playbin.h.

GstElement* gstreamer::Playbin::pipeline
struct { ... } gstreamer::Playbin::signals
SurfaceTextureClientHybris gstreamer::Playbin::stc_hybris

Definition at line 402 of file playbin.h.


The documentation for this struct was generated from the following file: