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.
|
|
|
|
*/
|
2020-04-02 03:19:34 +00:00
|
|
|
struct MultiMediaTarget: public MachineTypes::MediaTarget {
|
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.
|
2020-01-24 03:57:51 +00:00
|
|
|
bool insert_media(const Analyser::Static::Media &media) final;
|
2018-01-30 02:49:49 +00:00
|
|
|
|
|
|
|
private:
|
2020-04-02 03:19:34 +00:00
|
|
|
std::vector<MachineTypes::MediaTarget *> targets_;
|
2018-01-30 02:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-07-11 01:32:28 +00:00
|
|
|
#endif /* MultiMediaTarget_hpp */
|