File indexing completed on 2024-05-12 16:23:36
0001 /*************************************************************************** 0002 * Copyright (C) 2005-2008 by Bjoern Erik Nilsen & Fredrik Berg Kjoelstad* 0003 * bjoern.nilsen@bjoernen.com & fredrikbk@hotmail.com * 0004 * * 0005 * This program is free software; you can redistribute it and/or modify * 0006 * it under the terms of the GNU General Public License as published by * 0007 * the Free Software Foundation; either version 2 of the License, or * 0008 * (at your option) any later version. * 0009 * * 0010 * This program is distributed in the hope that it will be useful, * 0011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 0013 * GNU General Public License for more details. * 0014 * * 0015 * You should have received a copy of the GNU General Public License * 0016 * along with this program; if not, write to the * 0017 * Free Software Foundation, Inc., * 0018 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 0019 ***************************************************************************/ 0020 #ifndef VIDEOENCODER_H 0021 #define VIDEOENCODER_H 0022 0023 /** 0024 * Class for gathering information needed to export a stopmotion project to 0025 * a video file. 0026 * @author Bjoern Erik Nilsen & Fredrik Berg Kjoelstad 0027 */ 0028 class VideoEncoder 0029 { 0030 public: 0031 VideoEncoder(); 0032 ~VideoEncoder(); 0033 0034 /** 0035 * Gets the command line registered by the user in the preferences menu. 0036 * This is the command which should be used to start the encoder. 0037 * @return the start command 0038 */ 0039 const char* getStartCommand(); 0040 0041 /** 0042 * Gets the command line registered by the user in the preferences menu. 0043 * This is the command which should be used to stop the encoder. 0044 * @return the stop command 0045 */ 0046 const char* getStopCommand(); 0047 0048 /** 0049 * Gets the output file generated by the encoder. 0050 * @return the output file 0051 */ 0052 const char* getOutputFile(); 0053 0054 /** 0055 * Sets the start command to be used for starting the encoder and generate 0056 * a video file. 0057 * @param command the start command to be used for generating the video file 0058 */ 0059 void setStartCommand(const char* command); 0060 0061 /** 0062 * Sets the stop command to be used for stopping the encoder. 0063 * @param command the stop command to be used in case the user want to 0064 * cancel the export 0065 */ 0066 void setStopCommand(const char* command); 0067 0068 /** 0069 * Sets the file which should be generated by the encoder. 0070 */ 0071 void setOutputFile(const char* file); 0072 0073 /** 0074 * Checks if the registered encoder is a valid one. Checks if the encoder can 0075 * be executed, the output file is a valid file etc. 0076 * @return true if valid, false otherwise 0077 */ 0078 bool isValid(); 0079 0080 private: 0081 char *startCommand; 0082 char *stopCommand; 0083 char *outputFile; 0084 }; 0085 0086 #endif