#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 pipeline.
gstreamer::Playbin::~Playbin | ( | ) |
Definition at line 209 of file playbin.cpp.
|
static |
Definition at line 111 of file playbin.cpp.
References aboutToFinish().
|
signal |
Referenced by about_to_finish().
|
signal |
bool gstreamer::Playbin::can_play_streams | ( | ) | const |
Definition at line 817 of file playbin.cpp.
|
signal |
void gstreamer::Playbin::create_video_sink | ( | uint32_t | texture_id | ) |
Definition at line 480 of file playbin.cpp.
uint64_t gstreamer::Playbin::duration | ( | ) | const |
Returns the current stream duration in nanoseconds
Definition at line 576 of file playbin.cpp.
|
signal |
|
signal |
QString gstreamer::Playbin::file_info_from_uri | ( | const QUrl & | uri | ) | const |
Definition at line 755 of file playbin.cpp.
|
static |
Translate the AudioStreamRole enum into a string
Definition at line 496 of file playbin.cpp.
QString gstreamer::Playbin::get_file_content_type | ( | const QUrl & | uri | ) | const |
Definition at line 761 of file playbin.cpp.
References MH_INFO, and MH_WARNING.
QSize gstreamer::Playbin::get_video_dimensions | ( | ) | const |
Definition at line 720 of file playbin.cpp.
References MH_DEBUG.
|
signal |
bool gstreamer::Playbin::is_audio_file | ( | const QUrl & | uri | ) | const |
Definition at line 784 of file playbin.cpp.
References MH_INFO.
bool gstreamer::Playbin::is_video_file | ( | const QUrl & | uri | ) | const |
Definition at line 798 of file playbin.cpp.
References MH_INFO.
gstreamer::Playbin::MediaFileType gstreamer::Playbin::mediaFileType | ( | ) | const |
Definition at line 812 of file playbin.cpp.
|
signal |
Referenced by gstreamer::Engine::Engine().
gstreamer::Bus & gstreamer::Playbin::message_bus | ( | ) |
Definition at line 432 of file playbin.cpp.
void gstreamer::Playbin::on_new_message | ( | const Bus::Message & | message | ) |
Definition at line 364 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, MH_DEBUG, 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 518 of file playbin.cpp.
|
signal |
|
static |
Definition at line 105 of file playbin.cpp.
uint64_t gstreamer::Playbin::position | ( | ) | const |
Returns the current stream position in nanoseconds
Definition at line 556 of file playbin.cpp.
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, and lomiri::MediaHubService::video::BufferMetadata::width.
void gstreamer::Playbin::processVideoSinkStateChanged | ( | const Bus::Message::Detail::StateChanged & | state | ) |
Definition at line 304 of file playbin.cpp.
References MH_WARNING, and gstreamer::Bus::Message::Detail::StateChanged::new_state.
void gstreamer::Playbin::reset | ( | ) |
Definition at line 233 of file playbin.cpp.
References MH_INFO.
void gstreamer::Playbin::reset_pipeline | ( | ) |
Definition at line 246 of file playbin.cpp.
References MH_TRACE, and MH_WARNING.
bool gstreamer::Playbin::seek | ( | const std::chrono::microseconds & | ms | ) |
Definition at line 710 of file playbin.cpp.
|
signal |
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 MH_INFO, and MH_WARNING.
void gstreamer::Playbin::set_lifetime | ( | lomiri::MediaHubService::Player::Lifetime | ) |
Definition at line 551 of file playbin.cpp.
bool gstreamer::Playbin::set_state | ( | GstState | new_state | ) |
Definition at line 690 of file playbin.cpp.
References MH_DEBUG.
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.
void gstreamer::Playbin::set_volume | ( | double | new_volume | ) |
Definition at line 490 of file playbin.cpp.
|
protected |
Definition at line 927 of file playbin.cpp.
void gstreamer::Playbin::setup_pipeline_for_audio_video | ( | ) |
Definition at line 437 of file playbin.cpp.
void gstreamer::Playbin::setup_source | ( | GstElement * | source | ) |
Definition at line 618 of file playbin.cpp.
|
static |
Definition at line 117 of file playbin.cpp.
|
signal |
|
static |
Definition at line 127 of file playbin.cpp.
|
signal |
void gstreamer::Playbin::updateMediaFileType | ( | ) |
Definition at line 665 of file playbin.cpp.
References MH_DEBUG.
QUrl gstreamer::Playbin::uri | ( | ) | const |
Definition at line 679 of file playbin.cpp.
|
signal |
|
signal |
gstreamer::Bus gstreamer::Playbin::bus |
MediaFileType gstreamer::Playbin::m_fileType |
GstElement* gstreamer::Playbin::pipeline |
lomiri::MediaHubService::Player::Lifetime gstreamer::Playbin::player_lifetime |
lomiri::MediaHubService::Player::HeadersType gstreamer::Playbin::request_headers |