#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 (const core::ubuntu::media::Player::PlayerKey key) | |
| ~Playbin () | |
| void | reset () |
| void | reset_pipeline () |
| void | on_new_message (const Bus::Message &message) |
| void | on_new_message_async (const Bus::Message &message) |
| void | process_message_element (GstMessage *message) |
| gstreamer::Bus & | message_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 use_main_thread=false) |
| 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 | file_info_from_uri (const std::string &uri) const |
| std::string | encode_uri (const std::string &uri) const |
| std::string | decode_uri (const std::string &uri) 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 |
| bool | can_play_streams () 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) |
| static gboolean | set_state_in_main_thread (gpointer user_data) |
| gstreamer::Playbin::Playbin | ( | const core::ubuntu::media::Player::PlayerKey | key | ) |
Definition at line 121 of file playbin.cpp.
References about_to_finish, about_to_finish_handler_id, pipeline, setup_pipeline_for_audio_video(), source_setup(), and source_setup_handler_id.
Here is the call graph for this function:| gstreamer::Playbin::~Playbin | ( | ) |
Definition at line 190 of file playbin.cpp.
|
static |
| bool gstreamer::Playbin::can_play_streams | ( | ) | const |
Definition at line 914 of file playbin.cpp.
Referenced by gstreamer::Engine::Private::on_playbin_state_changed().
| void gstreamer::Playbin::create_video_sink | ( | uint32_t | texture_id | ) |
Definition at line 421 of file playbin.cpp.
| std::string gstreamer::Playbin::decode_uri | ( | const std::string & | uri | ) | const |
Definition at line 848 of file playbin.cpp.
| uint64_t gstreamer::Playbin::duration | ( | ) | const |
Returns the current stream duration in nanoseconds
Definition at line 517 of file playbin.cpp.
| void gstreamer::Playbin::emit_video_dimensions_changed_if_changed | ( | const core::ubuntu::media::video::Dimensions & | new_dimensions | ) |
Definition at line 735 of file playbin.cpp.
| std::string gstreamer::Playbin::encode_uri | ( | const std::string & | uri | ) | const |
Definition at line 782 of file playbin.cpp.
References MH_DEBUG, and MH_WARNING.
| std::string gstreamer::Playbin::file_info_from_uri | ( | const std::string & | uri | ) | const |
Definition at line 743 of file playbin.cpp.
|
static |
Translate the AudioStreamRole enum into a string
Definition at line 437 of file playbin.cpp.
| std::string gstreamer::Playbin::get_file_content_type | ( | const std::string & | uri | ) | const |
Definition at line 862 of file playbin.cpp.
References MH_INFO, and MH_WARNING.
| core::ubuntu::media::video::Dimensions gstreamer::Playbin::get_video_dimensions | ( | ) | const |
Definition at line 696 of file playbin.cpp.
References MH_DEBUG.
| bool gstreamer::Playbin::is_audio_file | ( | const std::string & | uri | ) | const |
Definition at line 881 of file playbin.cpp.
References MH_INFO.
| bool gstreamer::Playbin::is_video_file | ( | const std::string & | uri | ) | const |
Definition at line 895 of file playbin.cpp.
References MH_INFO.
| gstreamer::Playbin::MediaFileType gstreamer::Playbin::media_file_type | ( | ) | const |
Definition at line 909 of file playbin.cpp.
| gstreamer::Bus & gstreamer::Playbin::message_bus | ( | ) |
Definition at line 377 of file playbin.cpp.
| void gstreamer::Playbin::on_new_message | ( | const Bus::Message & | message | ) |
| void gstreamer::Playbin::on_new_message_async | ( | const Bus::Message & | message | ) |
Definition at line 319 of file playbin.cpp.
References gstreamer::Bus::Message::Detail::buffering, gstreamer::Bus::Message::detail, gstreamer::Bus::Message::Detail::error_warning_info, gstreamer::Bus::Message::message, gstreamer::Bus::Message::Detail::percent, gstreamer::Bus::Message::source, gstreamer::Bus::Message::Detail::state_changed, gstreamer::Bus::Message::Detail::tag, gstreamer::Bus::Message::Detail::Tag::tag_list, and gstreamer::Bus::Message::type.
| media::Player::Orientation gstreamer::Playbin::orientation_lut | ( | const gchar * | orientation | ) |
Definition at line 459 of file playbin.cpp.
|
static |
Definition at line 99 of file playbin.cpp.
| uint64_t gstreamer::Playbin::position | ( | ) | const |
Returns the current stream position in nanoseconds
Definition at line 497 of file playbin.cpp.
| void gstreamer::Playbin::process_message_element | ( | GstMessage * | message | ) |
Definition at line 285 of file playbin.cpp.
References core::ubuntu::media::video::BufferMetadata::fourcc, core::ubuntu::media::video::BufferMetadata::height, MH_DEBUG, MH_ERROR, core::ubuntu::media::video::BufferMetadata::offset, core::ubuntu::media::video::BufferMetadata::stride, and core::ubuntu::media::video::BufferMetadata::width.
| void gstreamer::Playbin::reset | ( | ) |
Definition at line 212 of file playbin.cpp.
References MH_INFO.
Referenced by gstreamer::Engine::Private::from_gst_errorwarning(), and gstreamer::Engine::Private::on_playbin_state_changed().
| void gstreamer::Playbin::reset_pipeline | ( | ) |
Definition at line 227 of file playbin.cpp.
References MH_TRACE, and MH_WARNING.
| bool gstreamer::Playbin::seek | ( | const std::chrono::microseconds & | ms | ) |
Definition at line 686 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 474 of file playbin.cpp.
References MH_INFO, and MH_WARNING.
Referenced by gstreamer::Engine::Private::on_audio_stream_role_changed().
| void gstreamer::Playbin::set_lifetime | ( | core::ubuntu::media::Player::Lifetime | ) |
Definition at line 492 of file playbin.cpp.
Referenced by gstreamer::Engine::Private::on_lifetime_changed().
| bool gstreamer::Playbin::set_state_and_wait | ( | GstState | new_state, |
| bool | use_main_thread = false |
||
| ) |
Definition at line 607 of file playbin.cpp.
References MH_DEBUG, MH_WARNING, and set_state_in_main_thread().
Here is the call graph for this function:
|
static |
Definition at line 597 of file playbin.cpp.
References MH_TRACE.
Referenced by set_state_and_wait().
| 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 526 of file playbin.cpp.
References MH_DEBUG.
| void gstreamer::Playbin::set_volume | ( | double | new_volume | ) |
Definition at line 431 of file playbin.cpp.
Referenced by gstreamer::Engine::Private::on_volume_changed().
| void gstreamer::Playbin::setup_pipeline_for_audio_video | ( | ) |
Definition at line 382 of file playbin.cpp.
Referenced by Playbin().
| void gstreamer::Playbin::setup_source | ( | GstElement * | source | ) |
Definition at line 564 of file playbin.cpp.
|
static |
Definition at line 111 of file playbin.cpp.
Referenced by Playbin().
| std::string gstreamer::Playbin::uri | ( | ) | const |
Definition at line 586 of file playbin.cpp.
Referenced by gstreamer::Engine::Private::on_tag_available().
| void gstreamer::Playbin::about_to_finish |
| gulong gstreamer::Playbin::about_to_finish_handler_id |
| gstreamer::Bus gstreamer::Playbin::bus |
| core::ubuntu::media::video::Dimensions gstreamer::Playbin::cached_video_dimensions |
| core::Signal<void> gstreamer::Playbin::client_disconnected |
| MediaFileType gstreamer::Playbin::file_type |
| core::Signal<int> gstreamer::Playbin::on_buffering_changed |
| core::Signal<Bus::Message::Detail::ErrorWarningInfo> gstreamer::Playbin::on_error |
| core::Signal<Bus::Message::Detail::ErrorWarningInfo> gstreamer::Playbin::on_info |
| core::Connection gstreamer::Playbin::on_new_message_connection_async |
| core::Signal<core::ubuntu::media::Player::Orientation> gstreamer::Playbin::on_orientation_changed |
| core::Signal<core::ubuntu::media::Player::PlaybackStatus> gstreamer::Playbin::on_playback_status_changed |
| core::Signal<std::pair<Bus::Message::Detail::StateChanged,std::string> > gstreamer::Playbin::on_state_changed |
| core::Signal<Bus::Message::Detail::Tag> gstreamer::Playbin::on_tag_available |
| core::Signal<core::ubuntu::media::video::Dimensions> gstreamer::Playbin::on_video_dimensions_changed |
| core::Signal<Bus::Message::Detail::ErrorWarningInfo> gstreamer::Playbin::on_warning |
| GstElement* gstreamer::Playbin::pipeline |
| core::ubuntu::media::Player::Lifetime gstreamer::Playbin::player_lifetime |
| core::ubuntu::media::Player::HeadersType gstreamer::Playbin::request_headers |
| struct { ... } gstreamer::Playbin::signals |
| gulong gstreamer::Playbin::source_setup_handler_id |