net.sf.ext.mediamanager.ebm.matroska
Class MatroskaFile

java.lang.Object
  extended bynet.sf.ext.mediamanager.ebm.matroska.MatroskaFile

public class MatroskaFile
extends java.lang.Object

Title: JEBML

Description: Java Classes to Read EBML Elements

Copyright: Copyright (c) 2004 Jory Stone

Version:
1.0
Author:
jcsston

Nested Class Summary
 class MatroskaFile.MatroskaFileSimpleTag
           
 class MatroskaFile.MatroskaFileTagEntry
           
 class MatroskaFile.MatroskaFileTrack
          Matroska Track Class
 class MatroskaFile.MatroskaFrame
          Matroska Frame, holds a Matroska frame timecode, duration, and Data
static interface MatroskaFile.MatroskaFramePuller
          Matroska Frame Puller interface
 
Field Summary
static int CLUSTER_TRACK_SEARCH_COUNT
          Number of Clusters to search before assuming that a track has ended
protected  double Duration
           
protected  java.util.LinkedList FrameQueue
           
protected  DataSource ioDS
           
protected  Element level0
           
protected  java.lang.String MuxingApp
           
protected  EBMLReader reader
           
protected  java.lang.String SegmentTitle
           
protected  java.util.ArrayList TagList
           
protected  long TimecodeScale
           
protected  java.util.ArrayList TrackList
           
protected  java.lang.String WritingApp
           
 
Constructor Summary
MatroskaFile(DataSource inputDataSource)
           
MatroskaFile(java.io.InputStream inputStream)
          Primary Constructor for Matroska File class.
 
Method Summary
protected  boolean badMP3Headers()
           
 java.lang.String getAudChannels()
           
 java.lang.String getAudCodec()
           
 java.lang.String getAudRate()
           
 int getDuration()
           
 java.lang.String getLanguage()
           
 java.lang.String getMuxingApp()
           
 MatroskaFile.MatroskaFrame getNextFrame()
          Get the Next MatroskaFrame
 MatroskaFile.MatroskaFrame getNextFrame(int TrackNo)
          Get the Next MatroskaFrame, limited by TrackNo
 java.lang.String getReport()
          Get a String report for the Matroska file.
 java.lang.String getResolution()
           
 java.lang.String getSegmentTitle()
           
 java.lang.String getSubLang()
           
 long getTimecodeScale()
           
 MatroskaFile.MatroskaFileTrack getTrack(int TrackNo)
          This differs from the getTrackList method in that this method scans each track and returns the one that has the same track number as TrackNo TrackNo != track index
 MatroskaFile.MatroskaFileTrack[] getTrackList()
          Returns an array of the tracks
 java.lang.String getVidCodec()
           
 java.lang.String getWritingApp()
           
 void readFile()
          Read / Parse the Matroska file.
 void setAudChannels(java.lang.String i)
           
 void setData()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLUSTER_TRACK_SEARCH_COUNT

public static int CLUSTER_TRACK_SEARCH_COUNT
Number of Clusters to search before assuming that a track has ended


ioDS

protected DataSource ioDS

reader

protected EBMLReader reader

level0

protected Element level0

SegmentTitle

protected java.lang.String SegmentTitle

MuxingApp

protected java.lang.String MuxingApp

WritingApp

protected java.lang.String WritingApp

TimecodeScale

protected long TimecodeScale

Duration

protected double Duration

TrackList

protected java.util.ArrayList TrackList

TagList

protected java.util.ArrayList TagList

FrameQueue

protected java.util.LinkedList FrameQueue
Constructor Detail

MatroskaFile

public MatroskaFile(java.io.InputStream inputStream)
Primary Constructor for Matroska File class.

Parameters:
inputStream - InputStream to read the Matroska file from

MatroskaFile

public MatroskaFile(DataSource inputDataSource)
Method Detail

readFile

public void readFile()
Read / Parse the Matroska file.

Throws:
java.lang.RuntimeException - On various errors

getNextFrame

public MatroskaFile.MatroskaFrame getNextFrame()
Get the Next MatroskaFrame

Returns:
The next MatroskaFrame in the queue, or null if the file has ended

getNextFrame

public MatroskaFile.MatroskaFrame getNextFrame(int TrackNo)
Get the Next MatroskaFrame, limited by TrackNo

Parameters:
TrackNo - The track number to only get MatroskaFrames from
Returns:
The next MatroskaFrame in the queue, or null if there are no more frames for the TrackNo track

badMP3Headers

protected boolean badMP3Headers()

getReport

public java.lang.String getReport()
Get a String report for the Matroska file. Call readFile() before this method, else the report will be empty.

Returns:
String Report

setData

public void setData()

getSubLang

public java.lang.String getSubLang()

getVidCodec

public java.lang.String getVidCodec()

getResolution

public java.lang.String getResolution()

getAudCodec

public java.lang.String getAudCodec()

getAudRate

public java.lang.String getAudRate()

getLanguage

public java.lang.String getLanguage()

setAudChannels

public void setAudChannels(java.lang.String i)

getAudChannels

public java.lang.String getAudChannels()

getWritingApp

public java.lang.String getWritingApp()

getTrackList

public MatroskaFile.MatroskaFileTrack[] getTrackList()
Returns an array of the tracks


getTrack

public MatroskaFile.MatroskaFileTrack getTrack(int TrackNo)
This differs from the getTrackList method in that this method scans each track and returns the one that has the same track number as TrackNo TrackNo != track index


getTimecodeScale

public long getTimecodeScale()

getSegmentTitle

public java.lang.String getSegmentTitle()

getMuxingApp

public java.lang.String getMuxingApp()

getDuration

public int getDuration()