1 /////////////////////////////////////////////////////////////////////////////
2 // Name:        mediaenc.h
3 // Purpose:     Media Encoder Interface
4 // Author:      Alex Thuering
5 // Created:     24.02.2007
6 // RCS-ID:      $Id: mediaenc.h,v 1.13 2016/12/17 17:27:38 ntalex Exp $
7 // Copyright:   (c) Alex Thuering
8 // Licence:     GPL
9 /////////////////////////////////////////////////////////////////////////////
10 
11 #ifndef WX_MEDIA_ENCODER_H
12 #define WX_MEDIA_ENCODER_H
13 
14 #include <wx/image.h>
15 
16 enum VideoFormat {
17 	vfNONE = 0,
18 	vfCOPY,
19 	vfPAL,
20 	vfNTSC,
21 	vfPAL_CROPPED,
22 	vfNTSC_CROPPED,
23 	vfPAL_HALF_D1,
24 	vfNTSC_HALF_D1,
25 	vfPAL_VCD,
26 	vfNTSC_VCD,
27 	vfPAL_HALF_HD,
28 	vfNTSC_HALF_HD,
29 	vfPAL_HDV,
30 	vfNTSC_HDV,
31 	vfPAL_FULL_HD,
32 	vfNTSC_FULL_HD
33 };
34 
35 enum AudioFormat {
36 	afNONE = 0,
37 	afCOPY,
38 	afMP2,
39 	afAC3,
40 	afPCM
41 };
42 
43 enum SubtitleFormat {
44 	sfNONE = 0,
45 	sfCOPY,
46 	sfDVD
47 };
48 
49 enum AspectRatio {
50 	arAUTO = 0,
51 	ar4_3,
52 	ar16_9
53 };
54 
55 enum FirstField {
56 	ffAUTO = -1,
57 	ffBOTTOM = 0,
58 	ffTOP = 1
59 };
60 
61 enum WidescreenType {
62 	wtAUTO = 0,
63 	wtNOPANSCAN,
64 	wtNOLETTERBOX
65 };
66 
67 /** Returns frame size of given video format */
68 wxSize GetFrameSize(VideoFormat format);
69 /** Returns frame aspect ratio */
70 double GetFrameAspectRatio(AspectRatio aspect);
71 /** Returns true if video format is NTSC */
72 bool isNTSC(VideoFormat format);
73 /** Returns count of frames per second */
74 double GetFps(VideoFormat format, bool ntscFilm);
75 
76 /**
77  * Interface that have to be implemented with progress dialog.
78  */
79 class AbstractProgressDialog {
80 public:
~AbstractProgressDialog()81 	virtual ~AbstractProgressDialog() {}
82 	/** Return whether "Cancel" button was pressed */
83 	virtual bool WasCanceled() = 0;
84 };
85 
86 #endif // WX_MEDIA_ENCODER_H
87