Search in sources :

Example 1 with MetadataDescriptor

use of org.jaudiotagger.audio.asf.data.MetadataDescriptor in project MusicDNA by harjot-oberai.

the class AsfFileReader method determineVariableBitrate.

/**
     * Determines if the "isVbr" field is set in the extended content
     * description.<br>
     * 
     * @param header
     *            the header to look up.
     * @return <code>true</code> if &quot;isVbr&quot; is present with a
     *         <code>true</code> value.
     */
private boolean determineVariableBitrate(final AsfHeader header) {
    assert header != null;
    boolean result = false;
    final MetadataContainer extDesc = header.findExtendedContentDescription();
    if (extDesc != null) {
        final List<MetadataDescriptor> descriptors = extDesc.getDescriptorsByName("IsVBR");
        if (descriptors != null && !descriptors.isEmpty()) {
            result = Boolean.TRUE.toString().equals(descriptors.get(0).getString());
        }
    }
    return result;
}
Also used : MetadataContainer(org.jaudiotagger.audio.asf.data.MetadataContainer) MetadataDescriptor(org.jaudiotagger.audio.asf.data.MetadataDescriptor)

Aggregations

MetadataContainer (org.jaudiotagger.audio.asf.data.MetadataContainer)1 MetadataDescriptor (org.jaudiotagger.audio.asf.data.MetadataDescriptor)1