Music Hub  ..
A session-wide music playback service
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 reset ()
 
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)
 
media::Player::Orientation orientation_lut (const gchar *orientation)
 
void set_audio_stream_role (media::Player::AudioStreamRole new_audio_role)
 
void set_lifetime (media::Player::Lifetime lifetime)
 
uint64_t position () const
 
uint64_t duration () const
 
void set_uri (const std::string &uri, const core::ubuntu::media::Player::HeadersType &headers=core::ubuntu::media::Player::HeadersType())
 
void setup_source (GstElement *source)
 
std::string uri () const
 
bool set_state_and_wait (GstState new_state)
 
bool seek (const std::chrono::microseconds &ms)
 
void get_video_dimensions ()
 
int get_video_height () const
 
int get_video_width () const
 
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 source_setup (GstElement *, GstElement *source, gpointer user_data)
 
static std::string get_audio_role_str (media::Player::AudioStreamRole audio_role)
 

Public Attributes

GstElement * pipeline
 
gstreamer::Bus bus
 
MediaFileType file_type
 
SurfaceTextureClientHybris stc_hybris
 
GstElement * video_sink
 
uint32_t video_height
 
uint32_t video_width
 
core::Connection on_new_message_connection
 
bool is_seeking
 
core::ubuntu::media::Player::HeadersType request_headers
 
media::Player::Lifetime player_lifetime
 
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< media::Player::Orientation >   on_orientation_changed
 
   core::Signal< uint32_t, uint32_t >   on_add_frame_dimension
 
   core::Signal< void >   client_disconnected
 
signals
 

Detailed Description

Definition at line 44 of file playbin.h.

Member Enumeration Documentation

Enumerator
MEDIA_FILE_TYPE_NONE 
MEDIA_FILE_TYPE_AUDIO 
MEDIA_FILE_TYPE_VIDEO 

Definition at line 53 of file playbin.h.

Enumerator
GST_PLAY_FLAG_VIDEO 
GST_PLAY_FLAG_AUDIO 
GST_PLAY_FLAG_TEXT 

Definition at line 46 of file playbin.h.

Constructor & Destructor Documentation

gstreamer::Playbin::Playbin ( )
inline

Definition at line 83 of file playbin.h.

References pipeline.

gstreamer::Playbin::~Playbin ( )
inline

Definition at line 122 of file playbin.h.

References pipeline.

Member Function Documentation

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

Definition at line 66 of file playbin.h.

References about_to_finish, and signals.

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

Definition at line 252 of file playbin.h.

References pipeline, and video_sink.

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

Definition at line 348 of file playbin.h.

References pipeline.

static std::string gstreamer::Playbin::get_audio_role_str ( media::Player::AudioStreamRole  audio_role)
inlinestatic

Translate the AudioStreamRole enum into a string

Definition at line 276 of file playbin.h.

Referenced by set_audio_stream_role().

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

Definition at line 478 of file playbin.h.

Referenced by is_audio_file(), and is_video_file().

void gstreamer::Playbin::get_video_dimensions ( )
inline

Definition at line 455 of file playbin.h.

References signals, video_height, video_sink, and video_width.

Referenced by set_state_and_wait().

int gstreamer::Playbin::get_video_height ( ) const
inline

Definition at line 468 of file playbin.h.

References video_height.

int gstreamer::Playbin::get_video_width ( ) const
inline

Definition at line 473 of file playbin.h.

References video_width.

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

Definition at line 520 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 534 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 548 of file playbin.h.

References file_type.

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

Definition at line 207 of file playbin.h.

References bus.

media::Player::Orientation gstreamer::Playbin::orientation_lut ( const gchar *  orientation)
inline

Definition at line 298 of file playbin.h.

Referenced by on_new_message().

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

Definition at line 60 of file playbin.h.

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

Definition at line 339 of file playbin.h.

References pipeline.

void gstreamer::Playbin::reset ( )
inline

Definition at line 128 of file playbin.h.

References player_lifetime, reset_pipeline(), and signals.

+ Here is the call graph for this function:

void gstreamer::Playbin::reset_pipeline ( )
inline

Definition at line 144 of file playbin.h.

References file_type, MEDIA_FILE_TYPE_NONE, and pipeline.

Referenced by reset(), and set_uri().

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

Definition at line 445 of file playbin.h.

References is_seeking, and pipeline.

void gstreamer::Playbin::set_audio_stream_role ( media::Player::AudioStreamRole  new_audio_role)
inline

Sets the new audio stream role on the pulsesink in playbin

Definition at line 313 of file playbin.h.

References get_audio_role_str(), and pipeline.

+ Here is the call graph for this function:

void gstreamer::Playbin::set_lifetime ( media::Player::Lifetime  lifetime)
inline

Definition at line 334 of file playbin.h.

References player_lifetime.

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

Definition at line 404 of file playbin.h.

References get_video_dimensions(), and pipeline.

+ Here is the call graph for this function:

void gstreamer::Playbin::set_uri ( const std::string &  uri,
const core::ubuntu::media::Player::HeadersType headers = core::ubuntu::media::Player::HeadersType() 
)
inline

Definition at line 357 of file playbin.h.

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

+ Here is the call graph for this function:

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

Definition at line 270 of file playbin.h.

References pipeline.

void gstreamer::Playbin::setup_pipeline_for_audio_video ( )
inline
void gstreamer::Playbin::setup_source ( GstElement *  source)
inline

Definition at line 371 of file playbin.h.

References request_headers.

Referenced by source_setup().

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

Definition at line 73 of file playbin.h.

References setup_source().

+ Here is the call graph for this function:

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

Definition at line 393 of file playbin.h.

References pipeline.

Member Data Documentation

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

Definition at line 566 of file playbin.h.

Referenced by about_to_finish().

gstreamer::Bus gstreamer::Playbin::bus

Definition at line 554 of file playbin.h.

Referenced by message_bus().

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

Definition at line 577 of file playbin.h.

MediaFileType gstreamer::Playbin::file_type

Definition at line 555 of file playbin.h.

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

bool gstreamer::Playbin::is_seeking

Definition at line 561 of file playbin.h.

Referenced by on_new_message(), and seek().

core::Signal<uint32_t, uint32_t> gstreamer::Playbin::on_add_frame_dimension

Definition at line 576 of file playbin.h.

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

Definition at line 573 of file playbin.h.

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

Definition at line 567 of file playbin.h.

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

Definition at line 569 of file playbin.h.

core::Connection gstreamer::Playbin::on_new_message_connection

Definition at line 560 of file playbin.h.

core::Signal<media::Player::Orientation> gstreamer::Playbin::on_orientation_changed

Definition at line 575 of file playbin.h.

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

Definition at line 574 of file playbin.h.

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

Definition at line 572 of file playbin.h.

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

Definition at line 571 of file playbin.h.

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

Definition at line 570 of file playbin.h.

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

Definition at line 568 of file playbin.h.

media::Player::Lifetime gstreamer::Playbin::player_lifetime

Definition at line 563 of file playbin.h.

Referenced by reset(), and set_lifetime().

core::ubuntu::media::Player::HeadersType gstreamer::Playbin::request_headers

Definition at line 562 of file playbin.h.

Referenced by set_uri(), and setup_source().

struct { ... } gstreamer::Playbin::signals
SurfaceTextureClientHybris gstreamer::Playbin::stc_hybris

Definition at line 556 of file playbin.h.

uint32_t gstreamer::Playbin::video_height

Definition at line 558 of file playbin.h.

Referenced by get_video_dimensions(), and get_video_height().

GstElement* gstreamer::Playbin::video_sink
uint32_t gstreamer::Playbin::video_width

Definition at line 559 of file playbin.h.

Referenced by get_video_dimensions(), and get_video_width().


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