Class: MobyUtil::TDriverCam

Inherits:
Object show all
Defined in:
lib/tdriver/util/video/camera.rb

Overview

Base class and interface for camera recorders in TDriver

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTDriverCam

Returns a new instance of TDriverCam.

Raises:

  • (RuntimeError)


44
45
46
47
48
# File 'lib/tdriver/util/video/camera.rb', line 44

def initialize

  raise RuntimeError.new("TDriverCam abstract class")

end

Class Method Details

.new_cam(*args) ⇒ Object

Automatically select the right kind of camera implementation for the detected platform.



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/tdriver/util/video/camera.rb', line 26

def self.new_cam( *args )

  if EnvironmentHelper.windows?

    MobyUtil::TDriverWinCam.new( *args )

  elsif EnvironmentHelper.linux?

    MobyUtil::TDriverLinuxCam.new( *args )

  else

    raise RuntimeError.new("Unidentified platform type, unable to select platform specific camera. Supported platform types: Linux, Windows.")

  end

end

Instance Method Details

#start_recordingObject

Raises:

  • (RuntimeError)


50
51
52
53
54
# File 'lib/tdriver/util/video/camera.rb', line 50

def start_recording

  raise RuntimeError.new("TDriverCam abstract class")

end

#stop_recordingObject

Raises:

  • (RuntimeError)


56
57
58
59
60
# File 'lib/tdriver/util/video/camera.rb', line 56

def stop_recording

  raise RuntimeError.new("TDriverCam abstract class")

end