TrackPrivateBaseGStreamer.h [plain text]
#ifndef TrackPrivateBaseGStreamer_h
#define TrackPrivateBaseGStreamer_h
#if ENABLE(VIDEO) && USE(GSTREAMER) && ENABLE(VIDEO_TRACK)
#include "GRefPtrGStreamer.h"
#include <wtf/ThreadingPrimitives.h>
#include <wtf/glib/GThreadSafeMainLoopSource.h>
#include <wtf/text/WTFString.h>
namespace WebCore {
class TrackPrivateBase;
class TrackPrivateBaseGStreamer {
public:
virtual ~TrackPrivateBaseGStreamer();
GstPad* pad() const { return m_pad.get(); }
virtual void disconnect();
virtual void setActive(bool) { }
void setIndex(int index) { m_index = index; }
void activeChanged();
void tagsChanged();
void notifyTrackOfActiveChanged();
void notifyTrackOfTagsChanged();
protected:
TrackPrivateBaseGStreamer(TrackPrivateBase* owner, gint index, GRefPtr<GstPad>);
gint m_index;
AtomicString m_label;
AtomicString m_language;
GRefPtr<GstPad> m_pad;
private:
bool getLanguageCode(GstTagList* tags, AtomicString& value);
template<class StringType>
bool getTag(GstTagList* tags, const gchar* tagName, StringType& value);
TrackPrivateBase* m_owner;
GThreadSafeMainLoopSource m_activeTimerHandler;
GThreadSafeMainLoopSource m_tagTimerHandler;
Mutex m_tagMutex;
GRefPtr<GstTagList> m_tags;
};
}
#endif // ENABLE(VIDEO) && USE(GSTREAMER) && ENABLE(VIDEO_TRACK)
#endif // TrackPrivateBaseGStreamer_h