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 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)
 
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)
 
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 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
 
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 73 of file playbin.h.

References pipeline.

gstreamer::Playbin::~Playbin ( )
inline

Definition at line 103 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 228 of file playbin.h.

References pipeline, and video_sink.

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

Definition at line 319 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 252 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 422 of file playbin.h.

Referenced by is_audio_file(), and is_video_file().

void gstreamer::Playbin::get_video_dimensions ( )
inline

Definition at line 399 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 412 of file playbin.h.

References video_height.

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

Definition at line 417 of file playbin.h.

References video_width.

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

Definition at line 464 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 478 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 492 of file playbin.h.

References file_type.

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

Definition at line 183 of file playbin.h.

References bus.

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

Definition at line 274 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 310 of file playbin.h.

References pipeline.

void gstreamer::Playbin::reset ( )
inline

Definition at line 109 of file playbin.h.

References reset_pipeline(), and signals.

+ Here is the call graph for this function:

void gstreamer::Playbin::reset_pipeline ( )
inline

Definition at line 120 of file playbin.h.

References file_type, MEDIA_FILE_TYPE_NONE, and pipeline.

Referenced by reset().

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

Definition at line 389 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 289 of file playbin.h.

References get_audio_role_str(), and pipeline.

+ Here is the call graph for this function:

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

Definition at line 348 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)
inline

Definition at line 328 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 246 of file playbin.h.

References pipeline.

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

Definition at line 337 of file playbin.h.

References pipeline.

Member Data Documentation

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

Definition at line 508 of file playbin.h.

Referenced by about_to_finish().

gstreamer::Bus gstreamer::Playbin::bus

Definition at line 498 of file playbin.h.

Referenced by message_bus().

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

Definition at line 519 of file playbin.h.

MediaFileType gstreamer::Playbin::file_type

Definition at line 499 of file playbin.h.

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

bool gstreamer::Playbin::is_seeking

Definition at line 505 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 518 of file playbin.h.

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

Definition at line 515 of file playbin.h.

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

Definition at line 509 of file playbin.h.

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

Definition at line 511 of file playbin.h.

core::Connection gstreamer::Playbin::on_new_message_connection

Definition at line 504 of file playbin.h.

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

Definition at line 517 of file playbin.h.

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

Definition at line 516 of file playbin.h.

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

Definition at line 514 of file playbin.h.

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

Definition at line 513 of file playbin.h.

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

Definition at line 512 of file playbin.h.

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

Definition at line 510 of file playbin.h.

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

Definition at line 500 of file playbin.h.

uint32_t gstreamer::Playbin::video_height

Definition at line 502 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 503 of file playbin.h.

Referenced by get_video_dimensions(), and get_video_width().


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