Olive
project
footage.h
Go to the documentation of this file.
1
/***
2
3
Olive - Non-Linear Video Editor
4
Copyright (C) 2019 Olive Team
5
6
This program is free software: you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation, either version 3 of the License, or
9
(at your option) any later version.
10
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
15
16
You should have received a copy of the GNU General Public License
17
along with this program. If not, see <http://www.gnu.org/licenses/>.
18
19
***/
20
21
#ifndef FOOTAGE_H
22
#define FOOTAGE_H
23
24
#include <QString>
25
#include <QVector>
26
#include <QMetaType>
27
#include <QVariant>
28
#include <QMutex>
29
#include <QPixmap>
30
#include <QIcon>
31
32
#include "
project/marker.h
"
33
34
enum
VideoInterlacingMode
{
35
VIDEO_PROGRESSIVE
,
36
VIDEO_TOP_FIELD_FIRST
,
37
VIDEO_BOTTOM_FIELD_FIRST
38
};
39
40
class
Sequence
;
41
class
Clip
;
42
class
PreviewGenerator
;
43
44
struct
FootageStream
{
45
int
file_index
;
46
int
video_width
;
47
int
video_height
;
48
bool
infinite_length
;
49
double
video_frame_rate
;
50
int
video_interlacing
;
51
int
video_auto_interlacing
;
52
int
audio_channels
;
53
int
audio_layout
;
54
int
audio_frequency
;
55
bool
enabled
;
56
57
// preview thumbnail/waveform
58
bool
preview_done
;
59
QImage
video_preview
;
60
QIcon
video_preview_square
;
61
QVector<char>
audio_preview
;
62
void
make_square_thumb
();
63
};
64
65
struct
Footage
{
66
Footage
();
67
~Footage
();
68
69
// footage metadata
70
QString
url
;
71
QString
name
;
72
int64_t
length
;
73
QVector<FootageStream>
video_tracks
;
74
QVector<FootageStream>
audio_tracks
;
75
int
save_id
;
76
bool
ready
;
77
bool
invalid
;
78
double
speed
;
79
bool
alpha_is_premultiplied
;
80
81
// proxy config
82
bool
proxy
;
83
QString
proxy_path
;
84
85
// thumbnail/waveform generation
86
PreviewGenerator
*
preview_gen
;
87
QMutex
ready_lock
;
88
89
// in/out points
90
bool
using_inout
;
91
long
in
;
92
long
out
;
93
94
// markers
95
QVector<Marker>
markers
;
96
97
// functions
98
long
get_length_in_frames
(
double
frame_rate);
99
FootageStream
*
get_stream_from_file_index
(
bool
video,
int
index);
100
void
reset
();
101
};
102
103
using
FootagePtr
= std::shared_ptr<Footage>;
104
105
#endif // FOOTAGE_H
Footage::ready_lock
QMutex ready_lock
Definition:
footage.h:87
FootageStream::preview_done
bool preview_done
Definition:
footage.h:58
Footage::markers
QVector< Marker > markers
Definition:
footage.h:95
Footage::get_stream_from_file_index
FootageStream * get_stream_from_file_index(bool video, int index)
Definition:
footage.cpp:65
Sequence
Definition:
sequence.h:31
FootageStream::audio_preview
QVector< char > audio_preview
Definition:
footage.h:61
FootageStream::file_index
int file_index
Definition:
footage.h:45
FootageStream::video_frame_rate
double video_frame_rate
Definition:
footage.h:49
FootageStream::video_auto_interlacing
int video_auto_interlacing
Definition:
footage.h:51
VIDEO_PROGRESSIVE
Definition:
footage.h:35
PreviewGenerator
Definition:
previewgenerator.h:38
Footage::reset
void reset()
Definition:
footage.cpp:51
Footage::url
QString url
Definition:
footage.h:70
FootageStream::video_preview_square
QIcon video_preview_square
Definition:
footage.h:60
Footage::proxy
bool proxy
Definition:
footage.h:82
FootagePtr
std::shared_ptr< Footage > FootagePtr
Definition:
footage.h:103
Footage::ready
bool ready
Definition:
footage.h:76
Footage::video_tracks
QVector< FootageStream > video_tracks
Definition:
footage.h:73
Footage::alpha_is_premultiplied
bool alpha_is_premultiplied
Definition:
footage.h:79
Footage::in
long in
Definition:
footage.h:91
VideoInterlacingMode
VideoInterlacingMode
Definition:
footage.h:34
FootageStream::audio_frequency
int audio_frequency
Definition:
footage.h:54
Footage::preview_gen
PreviewGenerator * preview_gen
Definition:
footage.h:86
Footage::~Footage
~Footage()
Definition:
footage.cpp:47
Footage::get_length_in_frames
long get_length_in_frames(double frame_rate)
Definition:
footage.cpp:60
Footage::out
long out
Definition:
footage.h:92
FootageStream::video_interlacing
int video_interlacing
Definition:
footage.h:50
Footage::speed
double speed
Definition:
footage.h:78
FootageStream
Definition:
footage.h:44
FootageStream::make_square_thumb
void make_square_thumb()
Definition:
footage.cpp:82
FootageStream::video_preview
QImage video_preview
Definition:
footage.h:59
FootageStream::video_width
int video_width
Definition:
footage.h:46
VIDEO_TOP_FIELD_FIRST
Definition:
footage.h:36
Footage::name
QString name
Definition:
footage.h:71
FootageStream::infinite_length
bool infinite_length
Definition:
footage.h:48
Footage::save_id
int save_id
Definition:
footage.h:75
Footage::using_inout
bool using_inout
Definition:
footage.h:90
Footage::proxy_path
QString proxy_path
Definition:
footage.h:83
Footage::Footage
Footage()
Definition:
footage.cpp:34
FootageStream::enabled
bool enabled
Definition:
footage.h:55
FootageStream::audio_channels
int audio_channels
Definition:
footage.h:52
Clip
Definition:
clip.h:50
VIDEO_BOTTOM_FIELD_FIRST
Definition:
footage.h:37
FootageStream::audio_layout
int audio_layout
Definition:
footage.h:53
Footage::invalid
bool invalid
Definition:
footage.h:77
Footage::length
int64_t length
Definition:
footage.h:72
marker.h
Footage
Definition:
footage.h:65
FootageStream::video_height
int video_height
Definition:
footage.h:47
Footage::audio_tracks
QVector< FootageStream > audio_tracks
Definition:
footage.h:74
Generated by
1.8.15