net.sf.fmj.theora_java
Class NativeOggParser
java.lang.Object
net.sf.fmj.media.AbstractControls
net.sf.fmj.media.AbstractPlugIn
net.sf.fmj.media.AbstractDemultiplexer
net.sf.fmj.theora_java.NativeOggParser
- All Implemented Interfaces:
- Controls, Demultiplexer, Duration, MediaHandler, PlugIn
public class NativeOggParser
- extends AbstractDemultiplexer
Uses theora-jna to parse Ogg files, and decode vorbis and theora data within them.
Adapted from theora-jna's PlayerExample, which is adapted from player_example.c.
- Author:
- Ken Larson
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NativeOggParser
public NativeOggParser()
getSupportedInputContentDescriptors
public ContentDescriptor[] getSupportedInputContentDescriptors()
- Specified by:
getSupportedInputContentDescriptors
in interface Demultiplexer
- Specified by:
getSupportedInputContentDescriptors
in class AbstractDemultiplexer
getTracks
public Track[] getTracks()
throws java.io.IOException,
BadHeaderException
- Specified by:
getTracks
in interface Demultiplexer
- Specified by:
getTracks
in class AbstractDemultiplexer
- Throws:
java.io.IOException
BadHeaderException
setSource
public void setSource(DataSource source)
throws java.io.IOException,
IncompatibleSourceException
- Specified by:
setSource
in interface MediaHandler
- Specified by:
setSource
in class AbstractDemultiplexer
- Throws:
java.io.IOException
IncompatibleSourceException
open
public void open()
throws ResourceUnavailableException
- Specified by:
open
in interface PlugIn
- Overrides:
open
in class AbstractPlugIn
- Throws:
ResourceUnavailableException
close
public void close()
- Specified by:
close
in interface PlugIn
- Overrides:
close
in class AbstractPlugIn
start
public void start()
throws java.io.IOException
- Specified by:
start
in interface Demultiplexer
- Overrides:
start
in class AbstractDemultiplexer
- Throws:
java.io.IOException
isPositionable
public boolean isPositionable()
- Specified by:
isPositionable
in interface Demultiplexer
- Overrides:
isPositionable
in class AbstractDemultiplexer
isRandomAccess
public boolean isRandomAccess()
- Specified by:
isRandomAccess
in interface Demultiplexer
- Overrides:
isRandomAccess
in class AbstractDemultiplexer
convertCodecPixelFormat
public static VideoFormat convertCodecPixelFormat(net.sf.theora_java.jna.TheoraLibrary.theora_info ti)
convertCodecAudioFormat
public static AudioFormat convertCodecAudioFormat(net.sf.theora_java.jna.VorbisLibrary.vorbis_info vi)