Olive
footage.h
1 #ifndef FOOTAGE_H
2 #define FOOTAGE_H
3 
4 #include <QString>
5 #include <QVector>
6 #include <QMetaType>
7 #include <QVariant>
8 #include <QMutex>
9 #include <QPixmap>
10 #include <QIcon>
11 
12 #include "project/marker.h"
13 
14 enum VideoInterlacingMode {
15  VIDEO_PROGRESSIVE,
16  VIDEO_TOP_FIELD_FIRST,
17  VIDEO_BOTTOM_FIELD_FIRST
18 };
19 
20 struct Sequence;
21 class Clip;
22 class PreviewGenerator;
23 class MediaThrobber;
24 
25 struct FootageStream {
26  int file_index;
27  int video_width;
28  int video_height;
29  bool infinite_length;
30  double video_frame_rate;
31  int video_interlacing;
32  int video_auto_interlacing;
33  int audio_channels;
34  int audio_layout;
35  int audio_frequency;
36  bool enabled;
37 
38  // preview thumbnail/waveform
39  bool preview_done;
40  QImage video_preview;
41  QIcon video_preview_square;
42  QVector<char> audio_preview;
43  void make_square_thumb();
44 };
45 
46 struct Footage {
47  Footage();
48  ~Footage();
49 
50  // footage metadata
51  QString url;
52  QString name;
53  int64_t length;
54  QVector<FootageStream> video_tracks;
55  QVector<FootageStream> audio_tracks;
56  int save_id;
57  bool ready;
58  bool invalid;
59  double speed;
60  bool alpha_is_premultiplied;
61 
62  // proxy config
63  bool proxy;
64  QString proxy_path;
65 
66  // thumbnail/waveform generation
67  PreviewGenerator* preview_gen;
68  QMutex ready_lock;
69 
70  // in/out points
71  bool using_inout;
72  long in;
73  long out;
74 
75  // markers
76  QVector<Marker> markers;
77 
78  // functions
79  long get_length_in_frames(double frame_rate);
80  FootageStream *get_stream_from_file_index(bool video, int index);
81  void reset();
82 };
83 
84 #endif // FOOTAGE_H
Definition: sequence.h:13
Definition: previewgenerator.h:19
Definition: project.h:111
Definition: footage.h:25
Definition: clip.h:33
Definition: footage.h:46