Module: QTRefMovie

Defined in:
lib/qtrefmovie.rb

Defined Under Namespace

Classes: QTBase, QTCPUSpeed, QTDataRate, QTDataReference, QTMovie, QTQuality, QTRefMovie, QTRefMovieDescriptor

Instance Method Summary collapse

Instance Method Details

#qt_easier_sample_codeObject



47
48
49
50
51
52
53
54
55
# File 'lib/qtrefmovie.rb', line 47

def qt_easier_sample_code
  movie = QTMovie.new [{:reference => "rtsp://127.0.0.1:80/test.mov",
                        :data_rate => 'intranet',
                        :cpu_speed => 'fast'},
                       {:reference => "rtsp://127.0.0.1:80/test2.mov",
                        :data_rate => 't1',
                        :quality   => 650}]
  movie.to_s
end

#qt_sample_codeObject

USAGE



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/qtrefmovie.rb', line 17

def qt_sample_code
  ref_movie = QTRefMovie.new
  
  data_reference = QTDataReference.new "rtsp://127.0.0.1:80/test.mov"
  data_rate = QTDataRate.new("intranet")
  cpu_speed = QTCPUSpeed.new("fast")
  
  movie_descriptor = QTRefMovieDescriptor.new
  movie_descriptor.add_chunk data_reference
  movie_descriptor.add_chunk data_rate
  movie_descriptor.add_chunk cpu_speed
  
  ref_movie.add_chunk movie_descriptor
  
  data_reference = QTDataReference.new "rtsp://127.0.0.1:80/test2.mov"
  data_rate = QTDataRate.new("t1")
  cpu_speed = QTQuality.new(650)
  
  movie_descriptor = QTRefMovieDescriptor.new
  movie_descriptor.add_chunk data_reference
  movie_descriptor.add_chunk data_rate
  movie_descriptor.add_chunk cpu_speed
  
  ref_movie.add_chunk movie_descriptor
  
  movie = QTMovie.new
  movie.add_chunk ref_movie
  movie.to_s
end