| |
- exceptions.Exception
-
- ACodecError
- ACodecError
- __builtin__.object
-
- Decoder
- Encoder
class Decoder(__builtin__.object) |
|
Decoder is a class which can decode compressed audio stream into raw uncomressed format( PCM )
suitable for playing through the sound module.
The following methods available:
decode( fragment ) -> audio_frame
Convert audio compressed data into pcm fragment.
Returns list of audio frames. frame is an object that stores data about audio frame in PCM format. Possible members are:
sample_rate
bitrate
channels
data
reset() -> None
Reset current state of codec |
|
Methods defined here:
- __getattribute__(...)
- x.__getattribute__('name') <==> x.name
- decode(...)
- decode( fragment ) -> audio_frame
Convert audio compressed data into pcm fragment.
Returns list of audio frames. frame is an object that stores data about audio frame in PCM format. Possible members are:
sample_rate
bitrate
channels
data
- reset(...)
- reset() -> None
Reset current state of codec
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0x010A52C0>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class Encoder(__builtin__.object) |
|
Encoder( codecParams ) -> Codec
Decoder(default) or encoder that will not use any demuxer to work with the stream
it will assume that the whole string coming for decode() will contain one frame onlyThe following methods available once you create Codec instance:
encode( samples ) -> ( frames ) list of encoded string
Encodes audio frame(s). It accepts audio samples
as string, buffers them, and returns list of encoded frames. Note, that its
behaviour is different from vcodec - vcodec returns only one frame. |
|
Methods defined here:
- __getattribute__(...)
- x.__getattribute__('name') <==> x.name
- encode(...)
- encode( samples ) -> ( frames ) list of encoded string
Encodes audio frame(s). It accepts audio samples
as string, buffers them, and returns list of encoded frames. Note, that its
behaviour is different from vcodec - vcodec returns only one frame.
- getParams(...)
- getParams() -> params
Parameters that represents the current state of codec
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0x010A5380>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
|