#include <playbin.h>
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 } |
Signals | |
| void | errorOccurred (const Bus::Message::Detail::ErrorWarningInfo &) |
| void | warningOccurred (const Bus::Message::Detail::ErrorWarningInfo &) |
| void | infoOccurred (const Bus::Message::Detail::ErrorWarningInfo &) |
| void | aboutToFinish () |
| void | seekedTo (uint64_t offset) |
| void | stateChanged (const Bus::Message::Detail::StateChanged &state, const QByteArray &source) |
| void | mediaFileTypeChanged () |
| void | tagAvailable (Bus::Message::Detail::Tag tag) |
| void | orientationChanged (lomiri::MediaHubService::Player::Orientation o) |
| void | videoDimensionChanged (const QSize &size) |
| void | bufferingChanged (int progress) |
| void | clientDisconnected () |
| void | endOfStream () |
Static Public Member Functions | |
| static std::string | get_audio_role_str (lomiri::MediaHubService::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 void | streams_changed (GstElement *, gpointer user_data) |
Public Attributes | |
| GstElement * | pipeline |
| gstreamer::Bus | bus |
| MediaFileType | m_fileType |
| GstElement * | video_sink |
| GstElement * | audio_sink |
| bool | is_seeking |
| uint64_t | previous_position |
| lomiri::MediaHubService::Player::HeadersType | request_headers |
| lomiri::MediaHubService::Player::Lifetime | player_lifetime |
| gulong | about_to_finish_handler_id |
| gulong | source_setup_handler_id |
| gulong | m_audioChangedHandlerId |
| gulong | m_videoChangedHandlerId |
| bool | is_missing_audio_codec |
| bool | is_missing_video_codec |
| gint | audio_stream_id |
| gint | video_stream_id |
| GstState | current_new_state |
Protected Member Functions | |
| void | setMediaFileType (MediaFileType fileType) |
| gstreamer::Playbin::Playbin | ( | const lomiri::MediaHubService::Player::PlayerKey | key | ) |
Definition at line 137 of file playbin.cpp.
References about_to_finish(), about_to_finish_handler_id, audio_sink, audio_stream_id, bus, current_new_state, is_missing_audio_codec, is_missing_video_codec, is_seeking, m_audioChangedHandlerId, m_fileType, m_videoChangedHandlerId, MEDIA_FILE_TYPE_NONE, on_new_message(), pipeline, pipeline_name(), player_lifetime, previous_position, setup_pipeline_for_audio_video(), source_setup(), source_setup_handler_id, streams_changed(), video_sink, and video_stream_id.
Referenced by about_to_finish(), and source_setup().
| gstreamer::Playbin::~Playbin | ( | ) |
Definition at line 209 of file playbin.cpp.
References about_to_finish_handler_id, m_audioChangedHandlerId, m_videoChangedHandlerId, pipeline, and source_setup_handler_id.
|
static |
Definition at line 111 of file playbin.cpp.
References Playbin().
Referenced by Playbin().
|
signal |
Referenced by gstreamer::EnginePrivate::EnginePrivate().
|
signal |
Referenced by gstreamer::EnginePrivate::EnginePrivate(), and on_new_message().
| bool gstreamer::Playbin::can_play_streams | ( | ) | const |
Definition at line 817 of file playbin.cpp.
References audio_stream_id, is_missing_audio_codec, is_missing_video_codec, and video_stream_id.
|
signal |
Referenced by gstreamer::EnginePrivate::EnginePrivate().
| void gstreamer::Playbin::create_video_sink | ( | uint32_t | texture_id | ) |
Definition at line 480 of file playbin.cpp.
References video_sink.
| uint64_t gstreamer::Playbin::duration | ( | ) | const |
Returns the current stream duration in nanoseconds
Definition at line 576 of file playbin.cpp.
References pipeline.
Referenced by position().
|
signal |
Referenced by gstreamer::EnginePrivate::EnginePrivate(), and on_new_message().
|
signal |
Referenced by gstreamer::EnginePrivate::EnginePrivate(), and on_new_message().
| QString gstreamer::Playbin::file_info_from_uri | ( | const QUrl & | uri | ) | const |
Definition at line 755 of file playbin.cpp.
References uri().
Referenced by get_file_content_type().
|
static |
Translate the AudioStreamRole enum into a string
Definition at line 496 of file playbin.cpp.
References lomiri::MediaHubService::Player::alarm, lomiri::MediaHubService::Player::alert, lomiri::MediaHubService::Player::multimedia, and lomiri::MediaHubService::Player::phone.
Referenced by set_audio_stream_role().
| QString gstreamer::Playbin::get_file_content_type | ( | const QUrl & | uri | ) | const |
Definition at line 761 of file playbin.cpp.
References file_info_from_uri(), MH_INFO, MH_WARNING, and uri().
Referenced by is_audio_file(), and is_video_file().
| QSize gstreamer::Playbin::get_video_dimensions | ( | ) | const |
Definition at line 720 of file playbin.cpp.
References MH_DEBUG, and video_sink.
Referenced by processVideoSinkStateChanged().
|
signal |
Referenced by gstreamer::EnginePrivate::EnginePrivate(), and on_new_message().
| bool gstreamer::Playbin::is_audio_file | ( | const QUrl & | uri | ) | const |
Definition at line 784 of file playbin.cpp.
References get_file_content_type(), MH_INFO, and uri().
Referenced by set_uri().
| bool gstreamer::Playbin::is_video_file | ( | const QUrl & | uri | ) | const |
Definition at line 798 of file playbin.cpp.
References get_file_content_type(), MH_INFO, and uri().
Referenced by set_uri().
| gstreamer::Playbin::MediaFileType gstreamer::Playbin::mediaFileType | ( | ) | const |
Definition at line 812 of file playbin.cpp.
References m_fileType.
|
signal |
Referenced by gstreamer::Engine::Engine(), and setMediaFileType().
| gstreamer::Bus & gstreamer::Playbin::message_bus | ( | ) |
Definition at line 432 of file playbin.cpp.
References bus.
| void gstreamer::Playbin::on_new_message | ( | const Bus::Message & | message | ) |
Definition at line 364 of file playbin.cpp.
References audio_stream_id, gstreamer::Bus::Message::Detail::buffering, bufferingChanged(), gstreamer::Bus::Message::detail, endOfStream(), gstreamer::Bus::Message::Detail::error_warning_info, errorOccurred(), infoOccurred(), is_seeking, gstreamer::Bus::Message::message, MH_DEBUG, orientation_lut(), orientationChanged(), gstreamer::Bus::Message::Detail::percent, pipeline, process_message_element(), processVideoSinkStateChanged(), seekedTo(), gstreamer::Bus::Message::source, gstreamer::Bus::Message::Detail::state_changed, stateChanged(), gstreamer::Bus::Message::Detail::tag, gstreamer::Bus::Message::Detail::Tag::tag_list, tagAvailable(), gstreamer::Bus::Message::type, video_stream_id, and warningOccurred().
Referenced by Playbin().
| media::Player::Orientation gstreamer::Playbin::orientation_lut | ( | const gchar * | orientation | ) |
Definition at line 518 of file playbin.cpp.
References lomiri::MediaHubService::Player::rotate0, lomiri::MediaHubService::Player::rotate180, lomiri::MediaHubService::Player::rotate270, and lomiri::MediaHubService::Player::rotate90.
Referenced by on_new_message().
|
signal |
Referenced by gstreamer::EnginePrivate::EnginePrivate(), and on_new_message().
|
static |
Definition at line 105 of file playbin.cpp.
Referenced by Playbin().
| uint64_t gstreamer::Playbin::position | ( | ) | const |
Returns the current stream position in nanoseconds
Definition at line 556 of file playbin.cpp.
References duration(), is_seeking, pipeline, and previous_position.
| void gstreamer::Playbin::process_message_element | ( | GstMessage * | message | ) |
Definition at line 326 of file playbin.cpp.
References lomiri::MediaHubService::video::BufferMetadata::fourcc, lomiri::MediaHubService::video::BufferMetadata::height, MH_DEBUG, MH_ERROR, lomiri::MediaHubService::video::BufferMetadata::offset, lomiri::MediaHubService::video::BufferMetadata::stride, updateMediaFileType(), and lomiri::MediaHubService::video::BufferMetadata::width.
Referenced by on_new_message().
| void gstreamer::Playbin::processVideoSinkStateChanged | ( | const Bus::Message::Detail::StateChanged & | state | ) |
Definition at line 304 of file playbin.cpp.
References get_video_dimensions(), MH_WARNING, gstreamer::Bus::Message::Detail::StateChanged::new_state, and videoDimensionChanged().
Referenced by on_new_message().
| void gstreamer::Playbin::reset | ( | ) |
Definition at line 233 of file playbin.cpp.
References MH_INFO, player_lifetime, reset_pipeline(), and lomiri::MediaHubService::Player::resumable.
| void gstreamer::Playbin::reset_pipeline | ( | ) |
Definition at line 246 of file playbin.cpp.
References audio_stream_id, is_missing_audio_codec, is_missing_video_codec, MEDIA_FILE_TYPE_NONE, MH_TRACE, MH_WARNING, pipeline, setMediaFileType(), and video_stream_id.
Referenced by reset(), and set_uri().
| bool gstreamer::Playbin::seek | ( | const std::chrono::microseconds & | ms | ) |
Definition at line 710 of file playbin.cpp.
References is_seeking, and pipeline.
|
signal |
Referenced by gstreamer::EnginePrivate::EnginePrivate(), and on_new_message().
| void gstreamer::Playbin::set_audio_stream_role | ( | lomiri::MediaHubService::Player::AudioStreamRole | new_audio_role | ) |
Sets the new audio stream role on the pulsesink in playbin
Definition at line 533 of file playbin.cpp.
References audio_sink, get_audio_role_str(), MH_INFO, and MH_WARNING.
| void gstreamer::Playbin::set_lifetime | ( | lomiri::MediaHubService::Player::Lifetime | lifetime | ) |
Definition at line 551 of file playbin.cpp.
References player_lifetime.
| bool gstreamer::Playbin::set_state | ( | GstState | new_state | ) |
Definition at line 690 of file playbin.cpp.
| void gstreamer::Playbin::set_uri | ( | const QUrl & | uri, |
| const lomiri::MediaHubService::Player::HeadersType & | headers, | ||
| bool | do_pipeline_reset = true ) |
Definition at line 585 of file playbin.cpp.
References is_audio_file(), is_video_file(), MEDIA_FILE_TYPE_AUDIO, MEDIA_FILE_TYPE_VIDEO, pipeline, request_headers, reset_pipeline(), setMediaFileType(), and uri().
| void gstreamer::Playbin::set_volume | ( | double | new_volume | ) |
Definition at line 490 of file playbin.cpp.
References pipeline.
|
protected |
Definition at line 927 of file playbin.cpp.
References m_fileType, and mediaFileTypeChanged().
Referenced by reset_pipeline(), set_uri(), and updateMediaFileType().
| void gstreamer::Playbin::setup_pipeline_for_audio_video | ( | ) |
Definition at line 437 of file playbin.cpp.
References audio_sink, GST_PLAY_FLAG_AUDIO, GST_PLAY_FLAG_TEXT, GST_PLAY_FLAG_VIDEO, lomiri::MediaHubService::AVBackend::hybris, MH_ERROR, lomiri::MediaHubService::AVBackend::mir, pipeline, and video_sink.
Referenced by Playbin().
| void gstreamer::Playbin::setup_source | ( | GstElement * | source | ) |
Definition at line 618 of file playbin.cpp.
References request_headers.
Referenced by source_setup().
|
static |
Definition at line 117 of file playbin.cpp.
References Playbin(), and setup_source().
Referenced by Playbin().
|
signal |
Referenced by gstreamer::EnginePrivate::EnginePrivate(), and on_new_message().
|
static |
|
signal |
Referenced by gstreamer::EnginePrivate::EnginePrivate(), and on_new_message().
| void gstreamer::Playbin::updateMediaFileType | ( | ) |
Definition at line 665 of file playbin.cpp.
References MEDIA_FILE_TYPE_AUDIO, MEDIA_FILE_TYPE_VIDEO, MH_DEBUG, pipeline, and setMediaFileType().
Referenced by process_message_element().
| QUrl gstreamer::Playbin::uri | ( | ) | const |
Definition at line 679 of file playbin.cpp.
References pipeline.
Referenced by file_info_from_uri(), get_file_content_type(), is_audio_file(), is_video_file(), and set_uri().
|
signal |
Referenced by gstreamer::EnginePrivate::EnginePrivate(), and processVideoSinkStateChanged().
|
signal |
Referenced by gstreamer::EnginePrivate::EnginePrivate(), and on_new_message().
| gulong gstreamer::Playbin::about_to_finish_handler_id |
Definition at line 136 of file playbin.h.
Referenced by Playbin(), and ~Playbin().
| GstElement* gstreamer::Playbin::audio_sink |
Definition at line 131 of file playbin.h.
Referenced by Playbin(), set_audio_stream_role(), and setup_pipeline_for_audio_video().
| gint gstreamer::Playbin::audio_stream_id |
Definition at line 142 of file playbin.h.
Referenced by can_play_streams(), on_new_message(), Playbin(), and reset_pipeline().
| gstreamer::Bus gstreamer::Playbin::bus |
Definition at line 128 of file playbin.h.
Referenced by message_bus(), and Playbin().
| GstState gstreamer::Playbin::current_new_state |
| bool gstreamer::Playbin::is_missing_audio_codec |
Definition at line 140 of file playbin.h.
Referenced by can_play_streams(), Playbin(), and reset_pipeline().
| bool gstreamer::Playbin::is_missing_video_codec |
Definition at line 141 of file playbin.h.
Referenced by can_play_streams(), Playbin(), and reset_pipeline().
| bool gstreamer::Playbin::is_seeking |
Definition at line 132 of file playbin.h.
Referenced by on_new_message(), Playbin(), position(), and seek().
| gulong gstreamer::Playbin::m_audioChangedHandlerId |
Definition at line 138 of file playbin.h.
Referenced by Playbin(), and ~Playbin().
| MediaFileType gstreamer::Playbin::m_fileType |
Definition at line 129 of file playbin.h.
Referenced by mediaFileType(), Playbin(), and setMediaFileType().
| gulong gstreamer::Playbin::m_videoChangedHandlerId |
Definition at line 139 of file playbin.h.
Referenced by Playbin(), and ~Playbin().
| GstElement* gstreamer::Playbin::pipeline |
Definition at line 127 of file playbin.h.
Referenced by duration(), on_new_message(), Playbin(), position(), reset_pipeline(), seek(), set_state(), set_uri(), set_volume(), setup_pipeline_for_audio_video(), streams_changed(), updateMediaFileType(), uri(), and ~Playbin().
| lomiri::MediaHubService::Player::Lifetime gstreamer::Playbin::player_lifetime |
Definition at line 135 of file playbin.h.
Referenced by Playbin(), reset(), and set_lifetime().
|
mutable |
Definition at line 133 of file playbin.h.
Referenced by Playbin(), and position().
| lomiri::MediaHubService::Player::HeadersType gstreamer::Playbin::request_headers |
Definition at line 134 of file playbin.h.
Referenced by set_uri(), and setup_source().
| gulong gstreamer::Playbin::source_setup_handler_id |
Definition at line 137 of file playbin.h.
Referenced by Playbin(), and ~Playbin().
| GstElement* gstreamer::Playbin::video_sink |
Definition at line 130 of file playbin.h.
Referenced by create_video_sink(), get_video_dimensions(), Playbin(), and setup_pipeline_for_audio_video().
| gint gstreamer::Playbin::video_stream_id |
Definition at line 143 of file playbin.h.
Referenced by can_play_streams(), on_new_message(), Playbin(), and reset_pipeline().