public class TheoraFile extends HighLevelOggStreamPacket implements Closeable
Modifier and Type | Class and Description |
---|---|
protected static class |
TheoraFile.AudioVisualDataAndSid |
Constructor and Description |
---|
TheoraFile(File f)
Opens the given file for reading
|
TheoraFile(OggFile ogg)
Opens the given file for reading
|
TheoraFile(OggPacketReader r)
Loads a Theora File from the given packet reader.
|
TheoraFile(OutputStream out)
Opens for writing.
|
TheoraFile(OutputStream out,
int sid,
TheoraInfo info,
TheoraComments comments,
TheoraSetup setup)
Opens for writing, based on the settings
from a pre-read file, with a specific
Steam ID (SID).
|
TheoraFile(OutputStream out,
TheoraInfo info,
TheoraComments comments,
TheoraSetup setup)
Opens for writing, based on the settings
from a pre-read file.
|
Modifier and Type | Method and Description |
---|---|
int |
addSoundtrack(OggAudioHeaders audio)
Adds a new soundtrack to the video
|
void |
close()
In Reading mode, will close the underlying ogg
file and free its resources.
|
void |
ensureSkeleton() |
TheoraComments |
getComments() |
TheoraInfo |
getInfo() |
OggStreamAudioVisualData |
getNextAudioVisualPacket()
Returns the next audio or video packet across
any supported stream, or null if no more remain
|
OggStreamAudioVisualData |
getNextAudioVisualPacket(Set<Integer> sids)
Returns the next audio or video packet from any of
the specified streams, or null if no more remain
|
OggFile |
getOggFile()
Returns the underlying Ogg File instance
|
TheoraSetup |
getSetup() |
int |
getSid()
Returns the Ogg Stream ID
|
SkeletonStream |
getSkeleton()
Returns the Skeleton data describing all the
streams, or null if the file has no Skeleton stream
|
Collection<? extends OggAudioHeaders> |
getSoundtracks()
Returns all the soundtracks
|
Map<Integer,? extends OggAudioHeaders> |
getSoundtrackStreams()
Returns the soundtracks and their stream IDs
|
void |
writeAudioData(OggStreamAudioData data,
int audioSid)
Buffers the given audio ready for writing
out, to a given (pre-existing) audio stream.
|
void |
writeVideoData(TheoraVideoData data)
Buffers the given video ready for writing
out.
|
getData, getOggPacket, setData, write
public TheoraFile(File f) throws IOException, FileNotFoundException
IOException
FileNotFoundException
public TheoraFile(OggFile ogg) throws IOException
IOException
public TheoraFile(OggPacketReader r) throws IOException
IOException
public TheoraFile(OutputStream out)
public TheoraFile(OutputStream out, TheoraInfo info, TheoraComments comments, TheoraSetup setup)
public TheoraFile(OutputStream out, int sid, TheoraInfo info, TheoraComments comments, TheoraSetup setup)
public int getSid()
public TheoraInfo getInfo()
public TheoraComments getComments()
public TheoraSetup getSetup()
public SkeletonStream getSkeleton()
public void ensureSkeleton()
public Map<Integer,? extends OggAudioHeaders> getSoundtrackStreams()
public Collection<? extends OggAudioHeaders> getSoundtracks()
public int addSoundtrack(OggAudioHeaders audio)
public OggStreamAudioVisualData getNextAudioVisualPacket() throws IOException
IOException
public OggStreamAudioVisualData getNextAudioVisualPacket(Set<Integer> sids) throws IOException
IOException
public void writeVideoData(TheoraVideoData data)
close()
to do that,
because we assume you'll still be populating
the Info/Comment/Setup objectspublic void writeAudioData(OggStreamAudioData data, int audioSid)
close()
to do that,
because we assume you'll still be populating
the Info/Comment/Setup objectspublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public OggFile getOggFile()
Copyright © 2015. All rights reserved.