ryanmelt / qtbindings

An easy to install gem version of the Ruby bindings to Qt
http://github.com/ryanmelt/qtbindings
Other
340 stars 63 forks source link

Support for QtMultimedia? #132

Closed Traverse-B closed 6 years ago

Traverse-B commented 8 years ago

I'm hoping to use some classes from the QtMultimedia module with my project, such as Qt::AudioInput. A method might look something like this

 def record
  @file.setFileName('name.wav')
  @file.open(Qt::IODevice::WriteOnly | Qt::IODevice::Truncate)
  format = Qt::AudioFormat
  format.setFrequency(8000)
  format.setChannels(1)
  format.setSampleSize(8)
  format.setCodec('audio/wav')
  format.setByteOrder(Qt::AudioFormat::LittleEndian)
  format.setSampleType(Qt::AudioFormat::UnSignedInt)
  @recorder = Qt::AudioInput.new self
  @recorder.start
end

However I keep getting a name error for every class in QtMultimedia. Is QtMultimedia treated as an outside resource that I need to include somehow with rbrcc before I can use it? I'm too new at this and can't find any documentation. Thanks

ghost commented 6 years ago

QtMultimedia is not supported. It could be, but would require writing a small wrapper extension similar to how QtDeclarative is handled. (See the ext folder).