OpenShot Video Editor  2.0.0
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
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
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 = []
def __init__(self, project=None)
Constructor.
Definition: files.py:39
The generic folder object for OpenShot.
Definition: files.py:67
def __init__(self, project=None)
Constructor.
Definition: files.py:72
The generic file object for OpenShot.
Definition: files.py:34