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>
|
tomwalters@116
|
31 #include "Modules/Output/Graphics/Devices/GraphicsOutputDeviceCairo.h"
|
tomwalters@116
|
32
|
tom@230
|
33 namespace aimc {
|
tom@230
|
34
|
tomwalters@116
|
35 /*!
|
tomwalters@116
|
36 * \class GraphicsOutputDeviceMovie "Output/GraphicsOutputDeviceMovie.h"
|
tomwalters@116
|
37 * \brief Output class for output to a movie
|
tomwalters@116
|
38 */
|
tomwalters@116
|
39 // GraphicsOutputDevicePlotutils is also possible here
|
tomwalters@116
|
40 class GraphicsOutputDeviceMovie : public GraphicsOutputDeviceCairo {
|
tomwalters@116
|
41 public:
|
tomwalters@237
|
42 GraphicsOutputDeviceMovie(Parameters *parameters);
|
tomwalters@228
|
43 virtual ~GraphicsOutputDeviceMovie() { };
|
tomwalters@116
|
44
|
tomwalters@228
|
45 /*! \brief Initializes this output device, prepares plotting tools.
|
tomwalters@228
|
46 * \param sSoundFile Sound file for the movie
|
tomwalters@228
|
47 * \param sMovieFile Movie filename to produce
|
tomwalters@228
|
48 * \return true on success, false on failure.
|
tomwalters@228
|
49 *
|
tomwalters@228
|
50 * As usual, make sure to call this function before any other. If this
|
tomwalters@228
|
51 * Initialize() failed, you shouldn't try the other functions either.
|
tomwalters@228
|
52 */
|
tomwalters@237
|
53 bool Initialize(Parameters *global_parameters);
|
tomwalters@116
|
54
|
tomwalters@228
|
55 void Start();
|
tomwalters@228
|
56 //! \brief This function now also generates the output movie.
|
tomwalters@228
|
57 void Stop();
|
tomwalters@116
|
58
|
tomwalters@116
|
59 protected:
|
tomwalters@228
|
60 /*! \brief Plots a summary of relevant parameters on the output
|
tomwalters@228
|
61 *
|
tomwalters@228
|
62 * This is intended for use in a movie as the first frame, which has no
|
tomwalters@228
|
63 * interesting data anyway, since at least one buffer of data is needed
|
tomwalters@228
|
64 * to be able to show someting.
|
tomwalters@228
|
65 *
|
tomwalters@228
|
66 * The caller must do the gGrab() and gRelease().
|
tomwalters@228
|
67 */
|
tomwalters@228
|
68 void PlotParameterScreen();
|
tomwalters@116
|
69
|
tomwalters@228
|
70 //! \brief Name of the sound file to be merged with the video
|
tomwalters@237
|
71 string sound_filename_;
|
tomwalters@228
|
72 //! \brief Name of the movie file to produce
|
tomwalters@237
|
73 string movie_filename_;
|
tomwalters@116
|
74 };
|
tom@230
|
75 } // namespace aimc
|
tomwalters@116
|
76 #endif /* __GRAPHICS_OUTPUT_DEVICE_MOVIE_H__ */
|