Examples of MP4Container


Examples of net.sourceforge.jaad.mp4.MP4Container

        return false;
    }

    private void initDecoder(long sample) throws IOException {
        in.seek(0);
        MP4Container cont = new MP4Container(in);
        Movie movie = cont.getMovie();
        List<net.sourceforge.jaad.mp4.api.Track> tracks = movie.getTracks(AudioTrack.AudioCodec.AAC);

        if (tracks == null || tracks.isEmpty()) {
            throw new IOException("Could not find AAC track");
        }
View Full Code Here

Examples of net.sourceforge.jaad.mp4.MP4Container

  private AudioFormat audioFormat;
  private byte[] saved;

  MP4AudioInputStream(InputStream in, AudioFormat format, long length) throws IOException {
    super(in, format, length);
    final MP4Container cont = new MP4Container(in);
    final Movie movie = cont.getMovie();
    final List<Track> tracks = movie.getTracks(AudioTrack.AudioCodec.AAC);
    if(tracks.isEmpty()) throw new IOException("movie does not contain any AAC track");
    track = (AudioTrack) tracks.get(0);

    decoder = new Decoder(track.getDecoderSpecificInfo());
View Full Code Here

Examples of net.sourceforge.jaad.mp4.MP4Container

 
  private void decodeMP4(String in) throws Exception {
    byte[] b;
    try {
      //create container
      final MP4Container cont = new MP4Container(new RandomAccessFile(in, "r"));
      final Movie movie = cont.getMovie();
      //find AAC track
      List<net.sourceforge.jaad.mp4.api.Track> tracks = movie.getTracks(AudioTrack.AudioCodec.AAC);
      if(tracks.isEmpty()) throw new Exception("movie does not contain any AAC track");
      audioTrack = (AudioTrack) tracks.get(0);
      //create audio format
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.