# class StreamInterface2

###

Module | phonon
Namespace | Phonon
Class | StreamInterface2
Inherits | QObject,Phonon::StreamInterface

### methods

- StreamInterface2 (parent)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  parent | QObject | 0

- needData (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | quint32 |

  Call this function to tell the AbstractMediaStream that you need more data. The data will arrive through writeData. Don't rely on writeData getting called from needData, though some AbstractMediaStream implementations might do so.

  Depending on the buffering you need you either treat needData as a replacement for a read call like QIODevice.read, or you start calling needData whenever your buffer reaches a certain lower threshold.