All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jcodec.containers.mp4.boxes.WaveExtension Maven / Gradle / Ivy

There is a newer version: 0.2.5
Show newest version
package org.jcodec.containers.mp4.boxes;

import java.util.HashMap;
import java.util.Map;

import org.jcodec.codecs.mpeg4.mp4.EsdsBox;

/**
 * This class is part of JCodec ( www.jcodec.org ) This software is distributed
 * under FreeBSD License
 * 
 * Wave extension to audio sample entry
 * 
 * @author The JCodec project
 * 
 */
public class WaveExtension extends NodeBox {
    private static final MyFactory FACTORY = new MyFactory();

    public static String fourcc() {
        return "wave";
    }

    public WaveExtension(Header atom) {
        super(atom);
        factory = FACTORY;

    }

    public static class MyFactory extends BoxFactory {
        private Map> mappings = new HashMap>();

        public MyFactory() {
            mappings.put(FormatBox.fourcc(), FormatBox.class);
            mappings.put(EndianBox.fourcc(), EndianBox.class);
//            mappings.put(EsdsBox.fourcc(), EsdsBox.class);
        }

        public Class toClass(String fourcc) {
            return mappings.get(fourcc);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy