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)
 
void on_new_message_async (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)
 
void set_lifetime (core::ubuntu::media::Player::Lifetime)
 
core::ubuntu::media::Player::Orientation orientation_lut (const gchar *orientation)
 
void set_audio_stream_role (core::ubuntu::media::Player::AudioStreamRole new_audio_role)
 
uint64_t position () const
 
uint64_t duration () const
 
void set_uri (const std::string &uri, const core::ubuntu::media::Player::HeadersType &headers, bool do_pipeline_reset=true)
 
std::string uri () const
 
void setup_source (GstElement *source)
 
bool set_state_and_wait (GstState new_state)
 
bool seek (const std::chrono::microseconds &ms)
 
core::ubuntu::media::video::Dimensions get_video_dimensions () const
 
void emit_video_dimensions_changed_if_changed (const core::ubuntu::media::video::Dimensions &new_dimensions)
 
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 std::string get_audio_role_str (core::ubuntu::media::Player::AudioStreamRole audio_role)
 
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)
 

Public Attributes

GstElement * pipeline
 
gstreamer::Bus bus
 
MediaFileType file_type
 
GstElement * video_sink
 
core::Connection on_new_message_connection_async
 
bool is_seeking
 
uint64_t previous_position
 
core::ubuntu::media::video::Dimensions cached_video_dimensions
 
core::ubuntu::media::Player::HeadersType request_headers
 
core::ubuntu::media::Player::Lifetime player_lifetime
 
gulong about_to_finish_handler_id
 
gulong source_setup_handler_id
 
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< std::pair< Bus::Message::Detail::StateChanged, std::string > >   on_state_changed
 
   core::Signal< uint64_t >   on_seeked_to
 
   core::Signal< void >   on_end_of_stream
 
   core::Signal< core::ubuntu::media::Player::PlaybackStatus >   on_playback_status_changed
 
   core::Signal< core::ubuntu::media::Player::Orientation >   on_orientation_changed
 
   core::Signal< core::ubuntu::media::video::Dimensions >   on_video_dimensions_changed
 
   core::Signal< void >   client_disconnected
 
signals
 

Detailed Description

Definition at line 41 of file playbin.h.

Member Enumeration Documentation

Enumerator
MEDIA_FILE_TYPE_NONE 
MEDIA_FILE_TYPE_AUDIO 
MEDIA_FILE_TYPE_VIDEO 

Definition at line 50 of file playbin.h.

Enumerator
GST_PLAY_FLAG_VIDEO 
GST_PLAY_FLAG_AUDIO 
GST_PLAY_FLAG_TEXT 

Definition at line 43 of file playbin.h.

Constructor & Destructor Documentation

gstreamer::Playbin::Playbin ( )

Definition at line 90 of file playbin.cpp.

References pipeline.

gstreamer::Playbin::~Playbin ( )

Definition at line 132 of file playbin.cpp.

Member Function Documentation

static void gstreamer::Playbin::about_to_finish ( GstElement *  ,
gpointer  user_data 
)
static
void gstreamer::Playbin::create_video_sink ( uint32_t  texture_id)

Definition at line 264 of file playbin.cpp.

uint64_t gstreamer::Playbin::duration ( ) const

Definition at line 363 of file playbin.cpp.

void gstreamer::Playbin::emit_video_dimensions_changed_if_changed ( const core::ubuntu::media::video::Dimensions new_dimensions)

Definition at line 513 of file playbin.cpp.

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

Translate the AudioStreamRole enum into a string

Definition at line 280 of file playbin.cpp.

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

Definition at line 521 of file playbin.cpp.

core::ubuntu::media::video::Dimensions gstreamer::Playbin::get_video_dimensions ( ) const

Definition at line 492 of file playbin.cpp.

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

Definition at line 562 of file playbin.cpp.

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

Definition at line 576 of file playbin.cpp.

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

Definition at line 590 of file playbin.cpp.

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

Definition at line 219 of file playbin.cpp.

void gstreamer::Playbin::on_new_message ( const Bus::Message message)
media::Player::Orientation gstreamer::Playbin::orientation_lut ( const gchar *  orientation)

Definition at line 302 of file playbin.cpp.

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

Definition at line 68 of file playbin.cpp.

uint64_t gstreamer::Playbin::position ( ) const

Definition at line 343 of file playbin.cpp.

void gstreamer::Playbin::reset ( )

Definition at line 141 of file playbin.cpp.

void gstreamer::Playbin::reset_pipeline ( )

Definition at line 156 of file playbin.cpp.

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

Definition at line 482 of file playbin.cpp.

void gstreamer::Playbin::set_audio_stream_role ( core::ubuntu::media::Player::AudioStreamRole  new_audio_role)

Sets the new audio stream role on the pulsesink in playbin

Definition at line 317 of file playbin.cpp.

void gstreamer::Playbin::set_lifetime ( core::ubuntu::media::Player::Lifetime  )

Definition at line 338 of file playbin.cpp.

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

Definition at line 422 of file playbin.cpp.

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

Definition at line 372 of file playbin.cpp.

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

Definition at line 274 of file playbin.cpp.

void gstreamer::Playbin::setup_pipeline_for_audio_video ( )

Definition at line 224 of file playbin.cpp.

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

Definition at line 389 of file playbin.cpp.

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

Definition at line 80 of file playbin.cpp.

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

Definition at line 411 of file playbin.cpp.

Member Data Documentation

void gstreamer::Playbin::about_to_finish

Definition at line 127 of file playbin.h.

gulong gstreamer::Playbin::about_to_finish_handler_id

Definition at line 123 of file playbin.h.

gstreamer::Bus gstreamer::Playbin::bus

Definition at line 114 of file playbin.h.

core::ubuntu::media::video::Dimensions gstreamer::Playbin::cached_video_dimensions

Definition at line 120 of file playbin.h.

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

Definition at line 138 of file playbin.h.

MediaFileType gstreamer::Playbin::file_type

Definition at line 115 of file playbin.h.

bool gstreamer::Playbin::is_seeking

Definition at line 118 of file playbin.h.

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

Definition at line 134 of file playbin.h.

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

Definition at line 128 of file playbin.h.

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

Definition at line 130 of file playbin.h.

core::Connection gstreamer::Playbin::on_new_message_connection_async

Definition at line 117 of file playbin.h.

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

Definition at line 136 of file playbin.h.

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

Definition at line 135 of file playbin.h.

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

Definition at line 133 of file playbin.h.

core::Signal<std::pair<Bus::Message::Detail::StateChanged,std::string> > gstreamer::Playbin::on_state_changed

Definition at line 132 of file playbin.h.

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

Definition at line 131 of file playbin.h.

core::Signal<core::ubuntu::media::video::Dimensions> gstreamer::Playbin::on_video_dimensions_changed

Definition at line 137 of file playbin.h.

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

Definition at line 129 of file playbin.h.

GstElement* gstreamer::Playbin::pipeline

Definition at line 113 of file playbin.h.

Referenced by Playbin().

core::ubuntu::media::Player::Lifetime gstreamer::Playbin::player_lifetime

Definition at line 122 of file playbin.h.

uint64_t gstreamer::Playbin::previous_position
mutable

Definition at line 119 of file playbin.h.

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

Definition at line 121 of file playbin.h.

struct { ... } gstreamer::Playbin::signals
gulong gstreamer::Playbin::source_setup_handler_id

Definition at line 124 of file playbin.h.

GstElement* gstreamer::Playbin::video_sink

Definition at line 116 of file playbin.h.


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