Class: VNCRec::Writers::RawVideo

Inherits:
Object
  • Object
show all
Defined in:
lib/vncrec/writers.rb

Overview

Raw video writer. Very similar to File

Instance Method Summary collapse

Constructor Details

#initialize(filename) ⇒ RawVideo

Returns a new instance of RawVideo


10
11
12
13
# File 'lib/vncrec/writers.rb', line 10

def initialize(filename)
  @filename = filename
  @file = File.open(filename, 'w')
end

Instance Method Details

#closeObject


20
21
22
# File 'lib/vncrec/writers.rb', line 20

def close
  @file.close
end

#closed?Boolean

Returns:

  • (Boolean)

24
25
26
# File 'lib/vncrec/writers.rb', line 24

def closed?
  @file.closed?
end

#sizeObject


28
29
30
# File 'lib/vncrec/writers.rb', line 28

def size
  @file.size
end

#write(data) ⇒ Object


15
16
17
18
# File 'lib/vncrec/writers.rb', line 15

def write(data)
  @file.write data
  @file.flush
end