com.liferay.portlet.documentlibrary.util
Class LiferayConverter
java.lang.Object
com.liferay.portlet.documentlibrary.util.LiferayConverter
- Direct Known Subclasses:
- LiferayAudioConverter, LiferayVideoConverter, LiferayVideoThumbnailConverter
public abstract class LiferayConverter
- extends java.lang.Object
- Author:
- Juan González, Sergio González, Brian Wing Shun Chan, Alexander Chow
|
Method Summary |
protected void |
cleanUp(com.xuggle.xuggler.IPacket inputIPacket,
com.xuggle.xuggler.IPacket outputIPacket)
|
protected void |
cleanUp(com.xuggle.xuggler.IStreamCoder[] inputIStreamCoders,
com.xuggle.xuggler.IStreamCoder[] outputIStreamCoders)
|
protected void |
cleanUp(com.xuggle.ferry.RefCounted[] inputRefCountedArray,
com.xuggle.ferry.RefCounted[] outputRefCountedArray)
|
abstract void |
convert()
|
protected int |
countNonKeyAfterKey(com.xuggle.xuggler.IPacket inputIPacket,
java.lang.Boolean keyPacketFound,
int nonKeyAfterKeyCount)
|
protected com.xuggle.xuggler.IAudioResampler |
createIAudioResampler(com.xuggle.xuggler.IStreamCoder inputIStreamCoder,
com.xuggle.xuggler.IStreamCoder outputIStreamCoder)
|
protected com.xuggle.xuggler.IVideoResampler |
createIVideoResampler(com.xuggle.xuggler.IStreamCoder inputIStreamCoder,
com.xuggle.xuggler.IStreamCoder outputIStreamCoder,
int height,
int width)
|
protected void |
decodeAudio(com.xuggle.xuggler.IAudioResampler iAudioResampler,
com.xuggle.xuggler.IAudioSamples inputIAudioSample,
com.xuggle.xuggler.IAudioSamples resampledIAudioSample,
com.xuggle.xuggler.IPacket inputIPacket,
com.xuggle.xuggler.IPacket outputIPacket,
com.xuggle.xuggler.IStreamCoder inputIStreamCoder,
com.xuggle.xuggler.IStreamCoder outputIStreamCoder,
com.xuggle.xuggler.IContainer outputIContainer,
int currentPacketSize,
int previousPacketSize,
int streamIndex,
long timeStampOffset)
|
protected int |
decodeVideo(com.xuggle.xuggler.IVideoResampler iVideoResampler,
com.xuggle.xuggler.IVideoPicture inputIVideoPicture,
com.xuggle.xuggler.IVideoPicture resampledIVideoPicture,
com.xuggle.xuggler.IPacket inputIPacket,
com.xuggle.xuggler.IPacket outputIPacket,
com.xuggle.xuggler.IStreamCoder inputIStreamCoder,
com.xuggle.xuggler.IStreamCoder outputIStreamCoder,
com.xuggle.xuggler.IContainer outputIContainer,
java.io.File thumbnailFile,
java.lang.String thumbnailExtension,
int thumbnailHeight,
int thumbnailWidth,
long timeStampOffset)
|
protected void |
encodeAudio(com.xuggle.xuggler.IStreamCoder outputIStreamCoder,
com.xuggle.xuggler.IPacket outputIPacket,
com.xuggle.xuggler.IAudioSamples outputIAudioSample,
com.xuggle.xuggler.IContainer outputIContainer)
|
protected void |
encodeVideo(com.xuggle.xuggler.IStreamCoder outputIStreamCoder,
com.xuggle.xuggler.IVideoPicture outputIVideoPicture,
com.xuggle.xuggler.IPacket outputIPacket,
com.xuggle.xuggler.IContainer outputIContainer)
|
protected void |
flush(com.xuggle.xuggler.IStreamCoder[] outputIStreamCoders,
com.xuggle.xuggler.IContainer outputIContainer)
|
protected void |
flush(com.xuggle.xuggler.IStreamCoder outputIStreamCoder,
com.xuggle.xuggler.IContainer outputIContainer,
com.xuggle.xuggler.IPacket iPacket)
|
protected int |
getAudioEncodingChannels(com.xuggle.xuggler.IContainer outputIContainer,
int channels)
|
protected com.xuggle.xuggler.ICodec |
getAudioEncodingICodec(com.xuggle.xuggler.IContainer outputIContainer)
|
protected abstract com.xuggle.xuggler.IContainer |
getInputIContainer()
|
protected long |
getSeekTimeStamp(int percentage)
|
protected long |
getStreamTimeStampOffset(com.xuggle.xuggler.IStream iStream)
|
protected boolean |
isKeyPacketFound(com.xuggle.xuggler.IPacket inputIPacket,
boolean keyPacketFound)
|
protected boolean |
isStartDecoding(com.xuggle.xuggler.IPacket inputIPacket,
com.xuggle.xuggler.IStreamCoder inputIStreamCoder,
boolean keyPacketFound,
int nonKeyAfterKeyCount,
boolean onlyDecodeKeyPackets)
|
protected void |
openContainer(com.xuggle.xuggler.IContainer iContainer,
java.lang.String url,
boolean writeContainer)
|
protected void |
openStreamCoder(com.xuggle.xuggler.IStreamCoder iStreamCoder)
|
protected void |
prepareAudio(com.xuggle.xuggler.IAudioResampler[] iAudioResamplers,
com.xuggle.xuggler.IAudioSamples[] inputIAudioSamples,
com.xuggle.xuggler.IAudioSamples[] outputIAudioSamples,
com.xuggle.xuggler.IStreamCoder inputIStreamCoder,
com.xuggle.xuggler.IStreamCoder[] outputIStreamCoders,
com.xuggle.xuggler.IContainer outputIContainer,
com.xuggle.xuggler.IStream[] outputIStreams,
com.xuggle.xuggler.ICodec.Type inputICodecType,
java.lang.String outputURL,
int index)
|
protected com.xuggle.xuggler.IAudioSamples |
resampleAudio(com.xuggle.xuggler.IAudioResampler iAudioResampler,
com.xuggle.xuggler.IAudioSamples inputIAudioSample,
com.xuggle.xuggler.IAudioSamples resampledIAudioSample)
|
protected com.xuggle.xuggler.IVideoPicture |
resampleVideo(com.xuggle.xuggler.IVideoResampler iVideoResampler,
com.xuggle.xuggler.IVideoPicture inputIVideoPicture,
com.xuggle.xuggler.IVideoPicture resampledIVideoPicture)
|
protected void |
rewind()
|
protected int |
rewind(int index)
|
protected int |
seek(int index,
long timeStamp)
|
protected long |
seek(long timeStamp)
|
protected void |
updateAudioTimeStamp(com.xuggle.xuggler.IAudioSamples inputAudioSample,
long timeStampOffset)
|
protected void |
updateVideoTimeStamp(com.xuggle.xuggler.IVideoPicture inputIVideoPicture,
long timeStampOffset)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DECODE_VIDEO_THUMBNAIL
protected static final int DECODE_VIDEO_THUMBNAIL
- See Also:
- Constant Field Values
LiferayConverter
public LiferayConverter()
convert
public abstract void convert()
throws java.lang.Exception
- Throws:
java.lang.Exception
cleanUp
protected void cleanUp(com.xuggle.xuggler.IPacket inputIPacket,
com.xuggle.xuggler.IPacket outputIPacket)
cleanUp
protected void cleanUp(com.xuggle.xuggler.IStreamCoder[] inputIStreamCoders,
com.xuggle.xuggler.IStreamCoder[] outputIStreamCoders)
cleanUp
protected void cleanUp(com.xuggle.ferry.RefCounted[] inputRefCountedArray,
com.xuggle.ferry.RefCounted[] outputRefCountedArray)
countNonKeyAfterKey
protected int countNonKeyAfterKey(com.xuggle.xuggler.IPacket inputIPacket,
java.lang.Boolean keyPacketFound,
int nonKeyAfterKeyCount)
createIAudioResampler
protected com.xuggle.xuggler.IAudioResampler createIAudioResampler(com.xuggle.xuggler.IStreamCoder inputIStreamCoder,
com.xuggle.xuggler.IStreamCoder outputIStreamCoder)
throws java.lang.Exception
- Throws:
java.lang.Exception
createIVideoResampler
protected com.xuggle.xuggler.IVideoResampler createIVideoResampler(com.xuggle.xuggler.IStreamCoder inputIStreamCoder,
com.xuggle.xuggler.IStreamCoder outputIStreamCoder,
int height,
int width)
throws java.lang.Exception
- Throws:
java.lang.Exception
decodeAudio
protected void decodeAudio(com.xuggle.xuggler.IAudioResampler iAudioResampler,
com.xuggle.xuggler.IAudioSamples inputIAudioSample,
com.xuggle.xuggler.IAudioSamples resampledIAudioSample,
com.xuggle.xuggler.IPacket inputIPacket,
com.xuggle.xuggler.IPacket outputIPacket,
com.xuggle.xuggler.IStreamCoder inputIStreamCoder,
com.xuggle.xuggler.IStreamCoder outputIStreamCoder,
com.xuggle.xuggler.IContainer outputIContainer,
int currentPacketSize,
int previousPacketSize,
int streamIndex,
long timeStampOffset)
throws java.lang.Exception
- Throws:
java.lang.Exception
decodeVideo
protected int decodeVideo(com.xuggle.xuggler.IVideoResampler iVideoResampler,
com.xuggle.xuggler.IVideoPicture inputIVideoPicture,
com.xuggle.xuggler.IVideoPicture resampledIVideoPicture,
com.xuggle.xuggler.IPacket inputIPacket,
com.xuggle.xuggler.IPacket outputIPacket,
com.xuggle.xuggler.IStreamCoder inputIStreamCoder,
com.xuggle.xuggler.IStreamCoder outputIStreamCoder,
com.xuggle.xuggler.IContainer outputIContainer,
java.io.File thumbnailFile,
java.lang.String thumbnailExtension,
int thumbnailHeight,
int thumbnailWidth,
long timeStampOffset)
throws java.lang.Exception
- Throws:
java.lang.Exception
encodeAudio
protected void encodeAudio(com.xuggle.xuggler.IStreamCoder outputIStreamCoder,
com.xuggle.xuggler.IPacket outputIPacket,
com.xuggle.xuggler.IAudioSamples outputIAudioSample,
com.xuggle.xuggler.IContainer outputIContainer)
throws java.lang.Exception
- Throws:
java.lang.Exception
encodeVideo
protected void encodeVideo(com.xuggle.xuggler.IStreamCoder outputIStreamCoder,
com.xuggle.xuggler.IVideoPicture outputIVideoPicture,
com.xuggle.xuggler.IPacket outputIPacket,
com.xuggle.xuggler.IContainer outputIContainer)
throws java.lang.Exception
- Throws:
java.lang.Exception
flush
protected void flush(com.xuggle.xuggler.IStreamCoder[] outputIStreamCoders,
com.xuggle.xuggler.IContainer outputIContainer)
flush
protected void flush(com.xuggle.xuggler.IStreamCoder outputIStreamCoder,
com.xuggle.xuggler.IContainer outputIContainer,
com.xuggle.xuggler.IPacket iPacket)
getAudioEncodingChannels
protected int getAudioEncodingChannels(com.xuggle.xuggler.IContainer outputIContainer,
int channels)
getAudioEncodingICodec
protected com.xuggle.xuggler.ICodec getAudioEncodingICodec(com.xuggle.xuggler.IContainer outputIContainer)
getInputIContainer
protected abstract com.xuggle.xuggler.IContainer getInputIContainer()
getSeekTimeStamp
protected long getSeekTimeStamp(int percentage)
throws java.lang.Exception
- Throws:
java.lang.Exception
getStreamTimeStampOffset
protected long getStreamTimeStampOffset(com.xuggle.xuggler.IStream iStream)
isKeyPacketFound
protected boolean isKeyPacketFound(com.xuggle.xuggler.IPacket inputIPacket,
boolean keyPacketFound)
isStartDecoding
protected boolean isStartDecoding(com.xuggle.xuggler.IPacket inputIPacket,
com.xuggle.xuggler.IStreamCoder inputIStreamCoder,
boolean keyPacketFound,
int nonKeyAfterKeyCount,
boolean onlyDecodeKeyPackets)
openContainer
protected void openContainer(com.xuggle.xuggler.IContainer iContainer,
java.lang.String url,
boolean writeContainer)
throws java.lang.Exception
- Throws:
java.lang.Exception
openStreamCoder
protected void openStreamCoder(com.xuggle.xuggler.IStreamCoder iStreamCoder)
throws java.lang.Exception
- Throws:
java.lang.Exception
prepareAudio
protected void prepareAudio(com.xuggle.xuggler.IAudioResampler[] iAudioResamplers,
com.xuggle.xuggler.IAudioSamples[] inputIAudioSamples,
com.xuggle.xuggler.IAudioSamples[] outputIAudioSamples,
com.xuggle.xuggler.IStreamCoder inputIStreamCoder,
com.xuggle.xuggler.IStreamCoder[] outputIStreamCoders,
com.xuggle.xuggler.IContainer outputIContainer,
com.xuggle.xuggler.IStream[] outputIStreams,
com.xuggle.xuggler.ICodec.Type inputICodecType,
java.lang.String outputURL,
int index)
throws java.lang.Exception
- Throws:
java.lang.Exception
resampleAudio
protected com.xuggle.xuggler.IAudioSamples resampleAudio(com.xuggle.xuggler.IAudioResampler iAudioResampler,
com.xuggle.xuggler.IAudioSamples inputIAudioSample,
com.xuggle.xuggler.IAudioSamples resampledIAudioSample)
throws java.lang.Exception
- Throws:
java.lang.Exception
resampleVideo
protected com.xuggle.xuggler.IVideoPicture resampleVideo(com.xuggle.xuggler.IVideoResampler iVideoResampler,
com.xuggle.xuggler.IVideoPicture inputIVideoPicture,
com.xuggle.xuggler.IVideoPicture resampledIVideoPicture)
throws java.lang.Exception
- Throws:
java.lang.Exception
rewind
protected void rewind()
throws java.lang.Exception
- Throws:
java.lang.Exception
rewind
protected int rewind(int index)
throws java.lang.Exception
- Throws:
java.lang.Exception
seek
protected int seek(int index,
long timeStamp)
throws java.lang.Exception
- Throws:
java.lang.Exception
seek
protected long seek(long timeStamp)
throws java.lang.Exception
- Throws:
java.lang.Exception
updateAudioTimeStamp
protected void updateAudioTimeStamp(com.xuggle.xuggler.IAudioSamples inputAudioSample,
long timeStampOffset)
updateVideoTimeStamp
protected void updateVideoTimeStamp(com.xuggle.xuggler.IVideoPicture inputIVideoPicture,
long timeStampOffset)