OpenShot Video Editor
2.0.0
Main Page
Namespaces
Classes
Files
File List
src
classes
legacy
openshot
classes
files.py
Go to the documentation of this file.
1
##
2
#
3
# @file
4
# @brief This file is for legacy support of OpenShot 1.x project files
5
# @author Jonathan Thomas <jonathan@openshot.org>
6
#
7
# @section LICENSE
8
#
9
# Copyright (c) 2008-2018 OpenShot Studios, LLC
10
# (http://www.openshotstudios.com). This file is part of
11
# OpenShot Video Editor (http://www.openshot.org), an open-source project
12
# dedicated to delivering high quality video editing and animation solutions
13
# to the world.
14
#
15
# OpenShot Video Editor is free software: you can redistribute it and/or modify
16
# it under the terms of the GNU General Public License as published by
17
# the Free Software Foundation, either version 3 of the License, or
18
# (at your option) any later version.
19
#
20
# OpenShot Video Editor is distributed in the hope that it will be useful,
21
# but WITHOUT ANY WARRANTY; without even the implied warranty of
22
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
# GNU General Public License for more details.
24
#
25
# You should have received a copy of the GNU General Public License
26
# along with OpenShot Library. If not, see <http://www.gnu.org/licenses/>.
27
#
28
29
import
uuid
30
31
32
##
33
# The generic file object for OpenShot
34
class
OpenShotFile
:
35
36
# ----------------------------------------------------------------------
37
##
38
# Constructor
39
def
__init__
(self, project=None):
40
self.
project
= project
41
42
# init the variables for the File Object
43
self.
name
=
""
# short / friendly name of the file
44
self.
length
= 0.0
# length in seconds
45
self.
videorate
= (30, 0)
# audio rate or video framerate
46
self.
file_type
=
""
# video, audio, image, image sequence
47
self.
max_frames
= 0.0
48
self.
fps
= 0.0
49
self.
height
= 0
50
self.
width
= 0
51
self.
label
=
""
# user description of the file
52
self.
thumb_location
=
""
# file uri of preview thumbnail
53
self.
ttl
= 1
# time-to-live - only used for image sequence. Represents the # of frames per image.
54
55
self.
unique_id
= str(uuid.uuid1())
56
self.
parent
=
None
57
self.
project
= project
# reference to project
58
59
self.
video_codec
=
""
60
self.
audio_codec
=
""
61
self.
audio_frequency
=
""
62
self.
audio_channels
=
""
63
64
65
##
66
# The generic folder object for OpenShot
67
class
OpenShotFolder
:
68
69
# ----------------------------------------------------------------------
70
##
71
# Constructor
72
def
__init__
(self, project=None):
73
74
# Init the variables for the Folder Object
75
self.
name
=
""
# short / friendly name of the folder
76
self.
location
=
""
# file system location
77
self.
parent
=
None
78
self.
project
= project
79
80
self.
label
=
""
# user description of the folder
81
self.
unique_id
= str(uuid.uuid1())
82
83
# init the list of files & folders
84
# this list can contain OpenShotFolder or OpenShotFile objects
85
# the order of this list determines the order of the tree items
86
self.
items
= []
87
88
# this queue holds files that are currently being added. this prevents
89
# duplicate files to be added at the same time
90
self.
queue
= []
files.OpenShotFile.video_codec
video_codec
Definition:
files.py:59
files.OpenShotFile.audio_codec
audio_codec
Definition:
files.py:60
files.OpenShotFolder.unique_id
unique_id
Definition:
files.py:81
files.OpenShotFolder.queue
queue
Definition:
files.py:90
files.OpenShotFolder.parent
parent
Definition:
files.py:77
files.OpenShotFile.length
length
Definition:
files.py:44
files.OpenShotFolder.project
project
Definition:
files.py:78
files.OpenShotFile.audio_frequency
audio_frequency
Definition:
files.py:61
files.OpenShotFolder.items
items
Definition:
files.py:86
files.OpenShotFile.videorate
videorate
Definition:
files.py:45
files.OpenShotFile.max_frames
max_frames
Definition:
files.py:47
files.OpenShotFolder.__init__
def __init__
Constructor.
Definition:
files.py:72
files.OpenShotFile.parent
parent
Definition:
files.py:56
files.OpenShotFolder
The generic folder object for OpenShot.
Definition:
files.py:67
files.OpenShotFile.project
project
Definition:
files.py:40
files.OpenShotFile.__init__
def __init__
Constructor.
Definition:
files.py:39
files.OpenShotFile.width
width
Definition:
files.py:50
files.OpenShotFolder.location
location
Definition:
files.py:76
files.OpenShotFile.fps
fps
Definition:
files.py:48
files.OpenShotFolder.label
label
Definition:
files.py:80
files.OpenShotFile.audio_channels
audio_channels
Definition:
files.py:62
files.OpenShotFile.unique_id
unique_id
Definition:
files.py:55
files.OpenShotFolder.name
name
Definition:
files.py:75
files.OpenShotFile.thumb_location
thumb_location
Definition:
files.py:52
files.OpenShotFile.height
height
Definition:
files.py:49
files.OpenShotFile.label
label
Definition:
files.py:51
files.OpenShotFile.file_type
file_type
Definition:
files.py:46
files.OpenShotFile.name
name
Definition:
files.py:43
files.OpenShotFile
The generic file object for OpenShot.
Definition:
files.py:34
files.OpenShotFile.ttl
ttl
Definition:
files.py:53
Generated on Thu Mar 21 2019 08:17:08 for OpenShot Video Editor by
1.8.6