2011-05-23 04:43:56 +02:00
|
|
|
/*
|
2011-12-10 03:18:48 +01:00
|
|
|
PlayProcess - state frame for an ongoing play/render process
|
2011-05-23 04:43:56 +02:00
|
|
|
|
|
|
|
|
Copyright (C) Lumiera.org
|
2011-05-23 05:46:40 +02:00
|
|
|
2011, Hermann Vosseler <Ichthyostega@web.de>
|
2011-05-23 04:43:56 +02:00
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
|
modify it under the terms of the GNU General Public License as
|
|
|
|
|
published by the Free Software Foundation; either version 2 of
|
|
|
|
|
the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
|
|
|
|
|
* *****************************************************/
|
|
|
|
|
|
|
|
|
|
|
2011-05-23 05:46:40 +02:00
|
|
|
#include "proc/play/play-process.hpp"
|
2011-12-17 04:45:42 +01:00
|
|
|
#include "proc/play/play-service.hpp"
|
2011-12-10 03:18:48 +01:00
|
|
|
#include "proc/play/render-configurator.hpp"
|
2011-06-25 17:44:28 +02:00
|
|
|
#include "lib/itertools.hpp"
|
2011-05-23 04:43:56 +02:00
|
|
|
|
2011-05-23 05:46:40 +02:00
|
|
|
//#include <string>
|
|
|
|
|
//#include <memory>
|
2011-06-25 17:44:28 +02:00
|
|
|
#include <tr1/functional>
|
2011-05-23 05:46:40 +02:00
|
|
|
//#include <boost/scoped_ptr.hpp>
|
2011-05-23 04:43:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-06-25 17:44:28 +02:00
|
|
|
namespace proc {
|
|
|
|
|
namespace play {
|
2011-05-23 04:43:56 +02:00
|
|
|
|
2011-05-23 05:46:40 +02:00
|
|
|
// using std::string;
|
|
|
|
|
// using lumiera::Subsys;
|
|
|
|
|
// using std::auto_ptr;
|
|
|
|
|
// using boost::scoped_ptr;
|
|
|
|
|
// using std::tr1::bind;
|
2011-12-17 04:45:42 +01:00
|
|
|
using lib::transform;
|
2011-06-25 17:44:28 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace { // Implementation details...
|
|
|
|
|
|
2011-05-23 04:43:56 +02:00
|
|
|
|
2011-06-25 17:44:28 +02:00
|
|
|
} // (End) hidden service impl details
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-17 04:45:42 +01:00
|
|
|
|
2011-06-25 17:44:28 +02:00
|
|
|
/**
|
|
|
|
|
* Factory: Initialise and configure a new PlayProcess.
|
|
|
|
|
* The caller gets to own and manage the returned process entry.
|
|
|
|
|
*/
|
|
|
|
|
PlayProcess*
|
2011-12-17 22:37:53 +01:00
|
|
|
PlayProcess::initiate (ModelPorts dataGenerators, function<Feed(ModelPort)> activeOutputFeedBuilder)
|
2011-06-25 17:44:28 +02:00
|
|
|
{
|
|
|
|
|
return new PlayProcess (transform (dataGenerators,
|
2011-12-17 04:45:42 +01:00
|
|
|
activeOutputFeedBuilder));
|
2011-06-25 17:44:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** @internal actually create and configure a play process instance */
|
2011-12-17 04:45:42 +01:00
|
|
|
PlayProcess::PlayProcess (Connections pipeConnections)
|
2011-06-25 17:44:28 +02:00
|
|
|
{
|
|
|
|
|
if (isnil (pipeConnections))
|
|
|
|
|
throw error::State ("creating a PlayProcess without any usable output connections"
|
|
|
|
|
, LUMIERA_ERROR_CANT_PLAY);
|
|
|
|
|
|
|
|
|
|
UNIMPLEMENTED ("iterate over the connections and allocate/establish each of them, creating and storing Feed objects");
|
|
|
|
|
while (pipeConnections)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** */
|
2011-12-17 04:45:42 +01:00
|
|
|
Feed::Feed (engine::CalcStreams const& newActiveRenderingConnections)
|
|
|
|
|
: renderStreams_(newActiveRenderingConnections)
|
2011-12-10 03:18:48 +01:00
|
|
|
{ }
|
2011-06-25 17:44:28 +02:00
|
|
|
|
2011-05-23 04:43:56 +02:00
|
|
|
|
|
|
|
|
|
2011-05-23 05:46:40 +02:00
|
|
|
}} // namespace proc::play
|