Audio-WMA

 view release on metacpan or  search on metacpan

WMA.pm  view on Meta::CPAN

    # * Stream Number              bits         7 (0x007F)      number of this stream.  1 <= valid <= 127
    # * Reserved                   bits         8 (0x7F80)      reserved - set to zero
    # * Encrypted Content Flag     bits         1 (0x8000)      stream contents encrypted if set
    # Reserved                     DWORD        32              reserved - set to zero
    # Type-Specific Data           BYTESTREAM   variable        type-specific format data, depending on value of Stream Type
    # Error Correction Data        BYTESTREAM   variable        error-correction-specific format data, depending on 
    #                                 value of Error Correct Type
    #
    # There is one ASF_Stream_Properties_Object for each stream (audio, video) but the
    # stream number isn't known until halfway through decoding the structure, hence it
    # it is decoded to a temporary variable and then stuck in the appropriate index later
    my $method = $inline ? '_readAndIncrementInlineOffset' : '_readAndIncrementOffset';

    $stream{'stream_type'}        = $self->$method($GUID);
    $stream{'stream_type_guid'}   = _byteStringToGUID($stream{'stream_type'});
    $stream{'error_correct_type'} = $self->$method($GUID);
    $stream{'error_correct_guid'} = _byteStringToGUID($stream{'error_correct_type'});

    $stream{'time_offset'}        = unpack('v', $self->$method($QWORD));
    $stream{'type_data_length'}   = unpack('V', $self->$method($DWORD));
    $stream{'error_data_length'}  = unpack('V', $self->$method($DWORD));



( run in 0.319 second using v1.01-cache-2.11-cpan-26ccb49234f )