mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-12 02:40:00 +01:00
Changed behavior of MediaPlayer: offer to either follow the active
source or to show a fixed MediaPlayer. List of available mediaplayers is maintained statically at the level of MediaPlayer class.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include <sstream>
|
||||
#include <set>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <utility>
|
||||
|
||||
#include <gst/gst.h>
|
||||
@@ -215,12 +216,21 @@ public:
|
||||
* Get name of the media
|
||||
* */
|
||||
std::string uri() const;
|
||||
std::string filename() const;
|
||||
|
||||
/**
|
||||
* Accept visitors
|
||||
* */
|
||||
void accept(Visitor& v);
|
||||
|
||||
/**
|
||||
* @brief registered
|
||||
* @return list of media players currently registered
|
||||
*/
|
||||
static std::list<MediaPlayer*> registered() { return registered_; }
|
||||
static std::list<MediaPlayer*>::const_iterator begin() { return registered_.cbegin(); }
|
||||
static std::list<MediaPlayer*>::const_iterator end() { return registered_.cend(); }
|
||||
|
||||
private:
|
||||
|
||||
bool addPlaySegment(GstClockTime begin, GstClockTime end);
|
||||
@@ -230,6 +240,7 @@ private:
|
||||
std::list< std::pair<guint64, guint64> > getPlaySegments() const;
|
||||
|
||||
std::string id_;
|
||||
std::string filename_;
|
||||
std::string uri_;
|
||||
guint textureindex_;
|
||||
guint width_;
|
||||
@@ -279,6 +290,7 @@ private:
|
||||
static void callback_discoverer_process (GstDiscoverer *discoverer, GstDiscovererInfo *info, GError *err, MediaPlayer *m);
|
||||
static void callback_discoverer_finished(GstDiscoverer *discoverer, MediaPlayer *m);
|
||||
|
||||
static std::list<MediaPlayer*> registered_;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user