2018-01-30 02:49:49 +00:00
|
|
|
//
|
2018-07-11 01:32:28 +00:00
|
|
|
// MultiMediaTarget.hpp
|
2018-01-30 02:49:49 +00:00
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 29/01/2018.
|
2018-05-13 19:19:52 +00:00
|
|
|
// Copyright 2018 Thomas Harte. All rights reserved.
|
2018-01-30 02:49:49 +00:00
|
|
|
//
|
|
|
|
|
2018-07-11 01:32:28 +00:00
|
|
|
#ifndef MultiMediaTarget_hpp
|
|
|
|
#define MultiMediaTarget_hpp
|
2018-01-30 02:49:49 +00:00
|
|
|
|
2018-07-11 01:32:28 +00:00
|
|
|
#include "../../../../Machines/MediaTarget.hpp"
|
2018-01-30 02:49:49 +00:00
|
|
|
#include "../../../../Machines/DynamicMachine.hpp"
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
namespace Analyser {
|
|
|
|
namespace Dynamic {
|
|
|
|
|
2018-02-19 21:03:17 +00:00
|
|
|
/*!
|
2018-07-11 01:42:09 +00:00
|
|
|
Provides a class that multiplexes the media target interface to multiple machines.
|
2018-02-19 21:03:17 +00:00
|
|
|
|
|
|
|
Makes a static internal copy of the list of machines; makes no guarantees about the
|
|
|
|
order of delivered messages.
|
|
|
|
*/
|
2018-07-11 01:32:28 +00:00
|
|
|
struct MultiMediaTarget: public MediaTarget::Machine {
|
2018-01-30 02:49:49 +00:00
|
|
|
public:
|
2018-07-11 01:32:28 +00:00
|
|
|
MultiMediaTarget(const std::vector<std::unique_ptr<::Machine::DynamicMachine>> &machines);
|
2018-01-30 02:49:49 +00:00
|
|
|
|
2018-07-11 01:32:28 +00:00
|
|
|
// Below is the standard MediaTarget::Machine interface; see there for documentation.
|
2018-01-30 02:49:49 +00:00
|
|
|
bool insert_media(const Analyser::Static::Media &media) override;
|
|
|
|
|
|
|
|
private:
|
2018-07-11 01:32:28 +00:00
|
|
|
std::vector<MediaTarget::Machine *> targets_;
|
2018-01-30 02:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-07-11 01:32:28 +00:00
|
|
|
#endif /* MultiMediaTarget_hpp */
|