19 #ifndef MEDIAPLAYERGENERIC_H
20 #define MEDIAPLAYERGENERIC_H
25 #include "mediaplayer.h"
34 MediaPlayer::RMFPlayerState rmf_playerState()
const;
35 MediaPlayer::RMFVideoBufferState rmf_videoState()
const;
36 bool rmf_load(
const std::string &url);
40 bool rmf_canItPlay()
const;
41 bool rmf_isPaused()
const;
42 void rmf_setRate(
float speed);
43 float rmf_getRate()
const;
44 void rmf_setVolume(
float volume);
45 float rmf_getVolume()
const;
46 void rmf_setMute(
bool mute);
47 bool rmf_isMuted()
const;
48 float rmf_getDuration()
const;
49 float rmf_getCurrentTime()
const;
50 void rmf_seekToLivePosition();
51 void rmf_seekToStartPosition();
52 void rmf_seek(
float time);
53 bool rmf_isSeeking()
const;
54 unsigned long rmf_getCCDecoderHandle()
const;
55 std::string rmf_getAudioLanguages()
const;
56 void rmf_setAudioLanguage(
const std::string &audioLang);
57 void rmf_setAudioMute(
bool isMuted);
58 void rmf_setEissFilterStatus(
bool status);
59 void rmf_setVideoZoom(
unsigned short zoomVal);
60 void rmf_setVideoBufferLength(
float bufferLength);
61 void rmf_setInProgressRecording(
bool isInProgress);
62 bool rmf_isItInProgressRecording()
const;
63 std::string rmf_getMediaErrorMessage()
const;
64 void rmf_changeSpeed(
float speed,
short overshootTime);
65 std::string rmf_getMediaWarnDescription()
const;
66 int rmf_getMediaWarnData()
const;
67 std::string rmf_getAvailableAudioTracks()
const;
68 std::string rmf_getCaptionDescriptor()
const;
69 std::string rmf_getEISSDataBuffer()
const;
70 void rmf_setNetworkBufferSize(
int bufferSize);
71 int rmf_getNetworkBufferSize()
const;
72 void rmf_setVideoRectangle(
unsigned x,
unsigned y,
unsigned w,
unsigned h);
73 MediaPlayerSink* rmf_getPlayerSink() {
return nullptr; };
74 IRMFMediaSource* rmf_getSource() {
return nullptr; };
75 int rmf_getVideoPid();
76 int rmf_getAudioPid();
77 void rmf_setVideoKeySlot(
const char* str);
78 void rmf_setAudioKeySlot(
const char* str);
79 void rmf_deleteVideoKeySlot();
80 void rmf_deleteAudioKeySlot();
81 uint32_t getPATBuffer(std::vector<uint8_t>& buf) {
return 0; }
82 uint32_t getPMTBuffer(std::vector<uint8_t>& buf) {
return 0; }
83 uint32_t getCATBuffer(std::vector<uint8_t>& buf) {
return 0; }
84 bool getAudioPidFromPMT(uint32_t *pid,
const std::string& audioLang) { };
85 bool getAudioMute()
const { };
86 void setFilter(uint16_t pid,
char* filterParam, uint32_t *pFilterId) { }
87 uint32_t getSectionData(uint32_t *filterId, std::vector<uint8_t>& sectionData) {
return 0; }
88 void releaseFilter(uint32_t filterId) { }
89 void resumeFilter(uint32_t filterId) { }
90 void pauseFilter(uint32_t filterId) { }
93 static void busMessageCallback(GstBus* bus, GstMessage* msg, gpointer data);
95 GstElement* pipeline()
const;
98 bool changePipelineState(GstState newState);
99 void handleBusMessage(GstBus* bus, GstMessage* msg);
101 void notifyError(
const char *message);
102 void loadingFailed(MediaPlayer::RMFPlayerState error);
106 GstElement* m_pipeline;
107 MediaPlayer::RMFPlayerState m_playerState;
108 MediaPlayer::RMFVideoBufferState m_videoState;
110 std::string m_errorMsg;
112 bool m_seekIsPending;