home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2004 March / PCWELT_3_2004.ISO / pcwsoft / flaskmpeg_078_39_src.z.exe / flaskmpeg / FlasKMPEG.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-10-28  |  4.0 KB  |  182 lines

  1. /* 
  2.  *  FlasKMPEG.h 
  3.  *
  4.  *    Copyright (C) Alberto Vigata - January 2000 - ultraflask@yahoo.com
  5.  *
  6.  *  This file is part of FlasKMPEG, a free MPEG to MPEG/AVI converter
  7.  *    
  8.  *  FlasKMPEG is free software; you can redistribute it and/or modify
  9.  *  it under the terms of the GNU General Public License as published by
  10.  *  the Free Software Foundation; either version 2, or (at your option)
  11.  *  any later version.
  12.  *   
  13.  *  FlasKMPEG is distributed in the hope that it will be useful,
  14.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16.  *  GNU General Public License for more details.
  17.  *   
  18.  *  You should have received a copy of the GNU General Public License
  19.  *  along with GNU Make; see the file COPYING.  If not, write to
  20.  *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 
  21.  *
  22.  */
  23.  
  24. #ifndef FLASKMPEG_H
  25. #define FLASKMPEG_H
  26.  
  27. #include <windows.h>
  28. #include <winbase.h>
  29. #include <wingdi.h>
  30. #include <CommCtrl.h> 
  31. #include <stdio.h>
  32. #include <stdlib.h>
  33. #include <fcntl.h>
  34.  
  35.  
  36. #include "./FlasKTypes.h"
  37. #include "FormatDefs.h"
  38. #include "./Audio/Audio.h"
  39.  
  40. #include <io.h>
  41.  
  42.  
  43. #define MAXFILENAME 1024
  44. #define PROFILE_VERSION 3000
  45.  
  46. typedef struct{
  47.   int scale;
  48.   int sampleSize;
  49. } timebase_s;
  50.  
  51. struct TProfile
  52. {
  53.   int         nProfileVersion;
  54.   char        profile_name[MAXFILENAME];
  55.  
  56.     //Video options
  57.   bool        bResize;
  58.     int                    InterpolatedWidth;
  59.     int                    InterpolatedHeight;
  60.     timebase_s  timeBase;
  61.     bool                recons_progressive;
  62.  
  63.     //Crop and letterboxing
  64.     bool                crop;
  65.     int                    cropTopOffset;
  66.     int                    cropHeight;
  67.     int                    cropLeftOffset;
  68.     int                    cropWidth;
  69.  
  70.     bool                letterbox;
  71.     int                    letterboxTop;
  72.     int                    letterboxBottom;
  73.     int                    letterboxLeft;
  74.     int                    letterboxRight;
  75.  
  76.   // Video controls
  77.   bool  videocontrols;
  78.   int  brightness;
  79.   int  hue;
  80.   int  contrast;
  81.  
  82.     //Interlacing
  83.     bool                deinterlace;
  84.     int                    threshold;
  85.     int                    blend;
  86.  
  87.     int                    keepAspect;
  88.  
  89.  
  90.     //Audio options
  91.     int                audioMode; 
  92.     int                      outSampleFrequency;
  93.     bool                  sampleFreqSameAsInput;
  94.   TAudioProperties sAudioProperties;
  95.  
  96.     //Interpolation filter options
  97.     int                    filter;
  98.  
  99. };
  100.  
  101. /* FlasK MPEG options */
  102. typedef struct tagTConfig
  103. {
  104.   int         version;
  105.   //Miscelaneous
  106.   bool                firstTimeRunning;
  107.   bool        showDetailsInProgress;
  108.   
  109.   int                    outputFormat;       // Output plugin selected
  110.   int         hOutputFile;
  111.   int                    priority;
  112.   int         selected_language;
  113.   int         selected_profile;
  114.   
  115.   bool                displayVideo;
  116.   ui32            presentFrame;
  117.  
  118.   bool        bDualPass;
  119.   bool        compileWhole;
  120.   int                    displayTimeUnits; /* general diag box: 0 = seconds, 1 = frames */
  121.   unsigned long        framesToCompile;
  122.   int                    selectedTab;
  123.  
  124.      bool                warn_overwrite;
  125.   bool                shutdown;
  126.   int                    lurk_size;
  127.  
  128.   bool              idctAutoSelect;
  129.   int         idctIndex;
  130.  
  131.   // Output Format
  132.   bool        bProcessingFormatAuto;
  133.   int         nProcessingFormat;
  134.   
  135.   //File options
  136.   char                inputFile[MAXFILENAME];
  137.   char                    inputDir[MAXFILENAME];
  138.   char                outputFile[MAXFILENAME];
  139.   char                    outputDir[MAXFILENAME];
  140.   char                audioOutFile[MAXFILENAME];
  141.   char                    audioOutDir[MAXFILENAME];
  142.   
  143.   
  144.   // Last opened files
  145.     char              lastFiles[4][MAXFILENAME];
  146. } TConfig;
  147.  
  148.  
  149. //audioTypes
  150. #define AC3            0
  151. #define MPEG        1
  152. #define NO            2
  153.  
  154. // aspect ratio types (use: bool use_ar43 = profile.keepAspect & AR43;)
  155. #define KEEP_AR        1
  156. #define AR_BITS        254
  157. #define AR_11        2
  158. #define AR_43        4
  159. #define AR_169        8
  160.  
  161. typedef struct
  162. {
  163.     ULONG        totalFileSize;
  164.     ULONG        currentPosition;
  165. } TFileProgress;
  166.  
  167.  
  168. int LoadRegistryConfig( TConfig *Config );
  169. void SaveRegistryConfig( TConfig *Config );
  170. void ShowInConsole(char *buffer);
  171.  
  172.  
  173. #define INPUT_NOEXIST            1
  174. #define IS_TRANSPORTSTREAM      2
  175. #define NOT_RECOGNIZED            3
  176. #define NO_AUDIOVIDEO           4
  177.  
  178.  
  179.  
  180.  
  181.  
  182. #endif