tvaLib
Public Member Functions | Static Public Attributes | List of all members
lib.metadata.VideoSequence Class Reference
Inheritance diagram for lib.metadata.VideoSequence:

Public Member Functions

def __init__ (self, cameraView, videoFilename, startTime, duration, dataFilename='', durationUnit='s', configurationFilename='', translationX=0.0, translationY=0.0, rotation=0.0)
 
def getVideoSequenceFilename (self, relativeToSiteFilename=True)
 

Static Public Attributes

 idx = Column(Integer, primary_key=True)
 
 videoFilename = Column(String)
 
 startTime = Column(DateTime)
 
 duration = Column(Float)
 
 durationUnit = Column(String, default = 's')
 
 configurationFilename = Column(String)
 
 dataFilename = Column(String)
 
 translationX = Column(Float, default = 0.0)
 
 translationY = Column(Float, default = 0.0)
 
 rotation = Column(Float, default = 0.0)
 
 cameraViewId = Column(Integer, ForeignKey('camera_views.idx'))
 
 cameraView = relationship('CameraView', backref=backref('video_sequences', order_by = idx))
 

Detailed Description

Definition at line 158 of file metadata.py.

Constructor & Destructor Documentation

◆ __init__()

def lib.metadata.VideoSequence.__init__ (   self,
  cameraView,
  videoFilename,
  startTime,
  duration,
  dataFilename = '',
  durationUnit = 's',
  configurationFilename = '',
  translationX = 0.0,
  translationY = 0.0,
  rotation = 0.0 
)
startTime is passed as string in utils.datetimeFormat, e.g.
    2011-06-22 10:00:39. startTime can also be passed as a
    datetimeFormat (e.g. %Y%m%d-%H%M) to be read directly off of the
    video file instead.

Definition at line 174 of file metadata.py.

174  def __init__(self, cameraView, videoFilename, startTime, duration, dataFilename='', durationUnit='s', configurationFilename='', translationX=0.0, translationY=0.0, rotation=0.0):
175  ''' startTime is passed as string in utils.datetimeFormat, e.g.
176  2011-06-22 10:00:39. startTime can also be passed as a
177  datetimeFormat (e.g. %Y%m%d-%H%M) to be read directly off of the
178  video file instead.
179  '''
180  self.cameraView = cameraView
181  self.videoFilename = videoFilename
182  if(type(startTime) == str):
183  try: self.startTime = datetime.strptime(startTime, datetimeFormat)
184  except: self.startTime = datetime.strptime(os.path.splitext(videoFilename)[0], startTime)
185  else: self.startTime = startTime
186  self.duration = duration
187  if(not dataFilename): self.dataFilename = os.path.splitext(videoFilename)[0]+'.sqlite'
188  else: self.dataFilename = dataFilename
189  self.durationUnit = durationUnit
190  self.configurationFilename = configurationFilename
191  self.translationX = translationX
192  self.translationY = translationY
193  self.rotation = rotation
194 

Member Function Documentation

◆ getVideoSequenceFilename()

def lib.metadata.VideoSequence.getVideoSequenceFilename (   self,
  relativeToSiteFilename = True 
)

Definition at line 195 of file metadata.py.

195  def getVideoSequenceFilename(self, relativeToSiteFilename = True):
196  if(relativeToSiteFilename): return self.site.getFilename()+os.path.sep+self.name
197  else: return self.name
198 
199 

Member Data Documentation

◆ cameraView

lib.metadata.VideoSequence.cameraView = relationship('CameraView', backref=backref('video_sequences', order_by = idx))
static

Definition at line 172 of file metadata.py.

◆ cameraViewId

lib.metadata.VideoSequence.cameraViewId = Column(Integer, ForeignKey('camera_views.idx'))
static

Definition at line 171 of file metadata.py.

◆ configurationFilename

lib.metadata.VideoSequence.configurationFilename = Column(String)
static

Definition at line 165 of file metadata.py.

◆ dataFilename

lib.metadata.VideoSequence.dataFilename = Column(String)
static

Definition at line 166 of file metadata.py.

◆ duration

lib.metadata.VideoSequence.duration = Column(Float)
static

Definition at line 163 of file metadata.py.

◆ durationUnit

lib.metadata.VideoSequence.durationUnit = Column(String, default = 's')
static

Definition at line 164 of file metadata.py.

◆ idx

lib.metadata.VideoSequence.idx = Column(Integer, primary_key=True)
static

Definition at line 160 of file metadata.py.

◆ rotation

lib.metadata.VideoSequence.rotation = Column(Float, default = 0.0)
static

Definition at line 169 of file metadata.py.

◆ startTime

lib.metadata.VideoSequence.startTime = Column(DateTime)
static

Definition at line 162 of file metadata.py.

◆ translationX

lib.metadata.VideoSequence.translationX = Column(Float, default = 0.0)
static

Definition at line 167 of file metadata.py.

◆ translationY

lib.metadata.VideoSequence.translationY = Column(Float, default = 0.0)
static

Definition at line 168 of file metadata.py.

◆ videoFilename

lib.metadata.VideoSequence.videoFilename = Column(String)
static

Definition at line 161 of file metadata.py.


The documentation for this class was generated from the following file: