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