tomwalters@397: // Copyright 2006-2010, Willem van Engen, Thomas Walters tomwalters@397: // tomwalters@397: // AIM-C: A C++ implementation of the Auditory Image Model tomwalters@397: // http://www.acousticscale.org/AIMC tomwalters@397: // tomwalters@397: // Licensed under the Apache License, Version 2.0 (the "License"); tomwalters@397: // you may not use this file except in compliance with the License. tomwalters@397: // You may obtain a copy of the License at tomwalters@397: // tomwalters@397: // http://www.apache.org/licenses/LICENSE-2.0 tomwalters@397: // tomwalters@397: // Unless required by applicable law or agreed to in writing, software tomwalters@397: // distributed under the License is distributed on an "AS IS" BASIS, tomwalters@397: // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. tomwalters@397: // See the License for the specific language governing permissions and tomwalters@397: // limitations under the License. tomwalters@397: tomwalters@397: /*! tomwalters@397: * \file tomwalters@397: * \brief Output device for output to a movie tomwalters@397: * tomwalters@397: * \author Willem van Engen tomwalters@397: * \date created 2006/10/16 tomwalters@397: * \version \$Id: $ tomwalters@397: */ tomwalters@397: tomwalters@397: #ifndef __GRAPHICS_OUTPUT_DEVICE_MOVIE_H__ tomwalters@397: #define __GRAPHICS_OUTPUT_DEVICE_MOVIE_H__ tomwalters@397: tomwalters@411: #include sness@613: #include tomwalters@397: #include "Modules/Output/Graphics/Devices/GraphicsOutputDeviceCairo.h" tomwalters@397: tom@400: namespace aimc { tom@400: tomwalters@397: /*! tomwalters@397: * \class GraphicsOutputDeviceMovie "Output/GraphicsOutputDeviceMovie.h" tomwalters@397: * \brief Output class for output to a movie tomwalters@397: */ tomwalters@397: // GraphicsOutputDevicePlotutils is also possible here tomwalters@397: class GraphicsOutputDeviceMovie : public GraphicsOutputDeviceCairo { tomwalters@397: public: tomwalters@411: GraphicsOutputDeviceMovie(Parameters *parameters); tomwalters@398: virtual ~GraphicsOutputDeviceMovie() { }; tomwalters@397: tomwalters@398: /*! \brief Initializes this output device, prepares plotting tools. tomwalters@398: * \param sSoundFile Sound file for the movie tomwalters@398: * \param sMovieFile Movie filename to produce tomwalters@398: * \return true on success, false on failure. tomwalters@398: * tomwalters@398: * As usual, make sure to call this function before any other. If this tomwalters@398: * Initialize() failed, you shouldn't try the other functions either. tomwalters@398: */ tomwalters@411: bool Initialize(Parameters *global_parameters); tomwalters@397: tomwalters@398: void Start(); tomwalters@398: //! \brief This function now also generates the output movie. tomwalters@398: void Stop(); tomwalters@418: tomwalters@418: void Reset(Parameters* global_parameters); tomwalters@418: tomwalters@397: tomwalters@397: protected: tomwalters@398: /*! \brief Plots a summary of relevant parameters on the output tomwalters@398: * tomwalters@398: * This is intended for use in a movie as the first frame, which has no tomwalters@398: * interesting data anyway, since at least one buffer of data is needed tomwalters@398: * to be able to show someting. tomwalters@398: * tomwalters@398: * The caller must do the gGrab() and gRelease(). tomwalters@398: */ tomwalters@398: void PlotParameterScreen(); tomwalters@397: tomwalters@398: //! \brief Name of the sound file to be merged with the video tomwalters@411: string sound_filename_; tomwalters@398: //! \brief Name of the movie file to produce tomwalters@411: string movie_filename_; tomwalters@397: }; tom@400: } // namespace aimc tomwalters@397: #endif /* __GRAPHICS_OUTPUT_DEVICE_MOVIE_H__ */