annotate src/Modules/Output/Graphics/Devices/GraphicsOutputDeviceMovie.h @ 611:0fbaf443ec82

Carfac C++ revision 3, indluding more style improvements. The output structs are now classes again, and have separate storage methods for each output structure along with flags in the Run and RunSegment methods to allow for only storing NAPs if desired.
author alexbrandmeyer
date Fri, 17 May 2013 19:52:45 +0000
parents 256caa099e32
children
rev   line source
tomwalters@116 1 // Copyright 2006-2010, Willem van Engen, Thomas Walters
tomwalters@116 2 //
tomwalters@116 3 // AIM-C: A C++ implementation of the Auditory Image Model
tomwalters@116 4 // http://www.acousticscale.org/AIMC
tomwalters@116 5 //
tomwalters@116 6 // Licensed under the Apache License, Version 2.0 (the "License");
tomwalters@116 7 // you may not use this file except in compliance with the License.
tomwalters@116 8 // You may obtain a copy of the License at
tomwalters@116 9 //
tomwalters@116 10 // http://www.apache.org/licenses/LICENSE-2.0
tomwalters@116 11 //
tomwalters@116 12 // Unless required by applicable law or agreed to in writing, software
tomwalters@116 13 // distributed under the License is distributed on an "AS IS" BASIS,
tomwalters@116 14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
tomwalters@116 15 // See the License for the specific language governing permissions and
tomwalters@116 16 // limitations under the License.
tomwalters@116 17
tomwalters@116 18 /*!
tomwalters@116 19 * \file
tomwalters@116 20 * \brief Output device for output to a movie
tomwalters@116 21 *
tomwalters@116 22 * \author Willem van Engen <cnbh@willem.engen.nl>
tomwalters@116 23 * \date created 2006/10/16
tomwalters@116 24 * \version \$Id: $
tomwalters@116 25 */
tomwalters@116 26
tomwalters@116 27 #ifndef __GRAPHICS_OUTPUT_DEVICE_MOVIE_H__
tomwalters@116 28 #define __GRAPHICS_OUTPUT_DEVICE_MOVIE_H__
tomwalters@116 29
tomwalters@237 30 #include <string>
sness@602 31 #include <unistd.h>
tomwalters@116 32 #include "Modules/Output/Graphics/Devices/GraphicsOutputDeviceCairo.h"
tomwalters@116 33
tom@230 34 namespace aimc {
tom@230 35
tomwalters@116 36 /*!
tomwalters@116 37 * \class GraphicsOutputDeviceMovie "Output/GraphicsOutputDeviceMovie.h"
tomwalters@116 38 * \brief Output class for output to a movie
tomwalters@116 39 */
tomwalters@116 40 // GraphicsOutputDevicePlotutils is also possible here
tomwalters@116 41 class GraphicsOutputDeviceMovie : public GraphicsOutputDeviceCairo {
tomwalters@116 42 public:
tomwalters@237 43 GraphicsOutputDeviceMovie(Parameters *parameters);
tomwalters@228 44 virtual ~GraphicsOutputDeviceMovie() { };
tomwalters@116 45
tomwalters@228 46 /*! \brief Initializes this output device, prepares plotting tools.
tomwalters@228 47 * \param sSoundFile Sound file for the movie
tomwalters@228 48 * \param sMovieFile Movie filename to produce
tomwalters@228 49 * \return true on success, false on failure.
tomwalters@228 50 *
tomwalters@228 51 * As usual, make sure to call this function before any other. If this
tomwalters@228 52 * Initialize() failed, you shouldn't try the other functions either.
tomwalters@228 53 */
tomwalters@237 54 bool Initialize(Parameters *global_parameters);
tomwalters@116 55
tomwalters@228 56 void Start();
tomwalters@228 57 //! \brief This function now also generates the output movie.
tomwalters@228 58 void Stop();
tomwalters@244 59
tomwalters@244 60 void Reset(Parameters* global_parameters);
tomwalters@244 61
tomwalters@116 62
tomwalters@116 63 protected:
tomwalters@228 64 /*! \brief Plots a summary of relevant parameters on the output
tomwalters@228 65 *
tomwalters@228 66 * This is intended for use in a movie as the first frame, which has no
tomwalters@228 67 * interesting data anyway, since at least one buffer of data is needed
tomwalters@228 68 * to be able to show someting.
tomwalters@228 69 *
tomwalters@228 70 * The caller must do the gGrab() and gRelease().
tomwalters@228 71 */
tomwalters@228 72 void PlotParameterScreen();
tomwalters@116 73
tomwalters@228 74 //! \brief Name of the sound file to be merged with the video
tomwalters@237 75 string sound_filename_;
tomwalters@228 76 //! \brief Name of the movie file to produce
tomwalters@237 77 string movie_filename_;
tomwalters@116 78 };
tom@230 79 } // namespace aimc
tomwalters@116 80 #endif /* __GRAPHICS_OUTPUT_DEVICE_MOVIE_H__ */