16 #ifndef ALEXA_CLIENT_SDK_MEDIAPLAYER_GSTREAMERMEDIAPLAYER_INCLUDE_MEDIAPLAYER_BASESTREAMSOURCE_H_ 17 #define ALEXA_CLIENT_SDK_MEDIAPLAYER_GSTREAMERMEDIAPLAYER_INCLUDE_MEDIAPLAYER_BASESTREAMSOURCE_H_ 21 #include <unordered_set> 24 #include <gst/app/gstappsrc.h> 31 namespace mediaPlayer {
50 void addObserver(std::shared_ptr<SourceObserverInterface> observer)
override;
51 void removeObserver(std::shared_ptr<SourceObserverInterface> observer)
override;
76 virtual void close() = 0;
138 static void onNeedData(GstElement* pipeline, guint size, gpointer source);
145 gboolean handleNeedData();
153 static void onEnoughData(GstElement* pipeline, gpointer source);
160 gboolean handleEnoughData();
162 static gboolean onSeekData(GstElement* pipeline, guint64 offset, gpointer source);
170 static gboolean onReadData(gpointer source);
182 guint m_sourceRetryCount;
185 const std::function<gboolean()> m_handleNeedDataFunction;
188 const std::function<gboolean()> m_handleEnoughDataFunction;
191 guint m_needDataHandlerId;
194 guint m_enoughDataHandlerId;
197 guint m_seekDataHandlerId;
200 std::mutex m_callbackIdMutex;
203 guint m_needDataCallbackId;
206 guint m_enoughDataCallbackId;
209 std::mutex m_observersMutex;
212 std::unordered_set<std::shared_ptr<SourceObserverInterface>> m_observers;
218 #endif // ALEXA_CLIENT_SDK_MEDIAPLAYER_GSTREAMERMEDIAPLAYER_INCLUDE_MEDIAPLAYER_BASESTREAMSOURCE_H_
::std::string string
Definition: gtest-port.h:1097
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36