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 Object
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,
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,
File thumbnailFile,
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 |
getAudioBitRate(com.xuggle.xuggler.ICodec outputICodec,
int originalBitRate)
|
protected int |
getAudioEncodingChannels(com.xuggle.xuggler.IContainer outputIContainer,
int channels)
|
protected com.xuggle.xuggler.ICodec |
getAudioEncodingICodec(com.xuggle.xuggler.IContainer outputIContainer)
|
protected com.xuggle.xuggler.IAudioSamples.Format |
getAudioSampleFormat(com.xuggle.xuggler.ICodec outputICodec,
com.xuggle.xuggler.IAudioSamples.Format originalSampleFormat)
|
protected int |
getAudioSampleRate()
|
protected abstract com.xuggle.xuggler.IContainer |
getInputIContainer()
|
protected int |
getProperty(int originalValue,
int defaultValue,
int maxValue)
|
protected int |
getProperty(Properties properties,
String propertyName,
String prettyPropertyName,
String container,
int defaultValue,
int maxValue)
|
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,
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,
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 |
AUDIO_BIT_RATE_DEFAULT
protected static final int AUDIO_BIT_RATE_DEFAULT
- See Also:
- Constant Field Values
AUDIO_BIT_RATE_MAX
protected static final int AUDIO_BIT_RATE_MAX
- See Also:
- Constant Field Values
AUDIO_SAMPLE_RATE_DEFAULT
protected static final int AUDIO_SAMPLE_RATE_DEFAULT
- See Also:
- Constant Field Values
AUDIO_SAMPLE_RATE_MAX
protected static final int AUDIO_SAMPLE_RATE_MAX
- See Also:
- Constant Field Values
DECODE_VIDEO_THUMBNAIL
protected static final int DECODE_VIDEO_THUMBNAIL
- See Also:
- Constant Field Values
LiferayConverter
public LiferayConverter()
convert
public abstract void convert()
throws Exception
- Throws:
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,
Boolean keyPacketFound,
int nonKeyAfterKeyCount)
createIAudioResampler
protected com.xuggle.xuggler.IAudioResampler createIAudioResampler(com.xuggle.xuggler.IStreamCoder inputIStreamCoder,
com.xuggle.xuggler.IStreamCoder outputIStreamCoder)
throws Exception
- Throws:
Exception
createIVideoResampler
protected com.xuggle.xuggler.IVideoResampler createIVideoResampler(com.xuggle.xuggler.IStreamCoder inputIStreamCoder,
com.xuggle.xuggler.IStreamCoder outputIStreamCoder,
int height,
int width)
throws Exception
- Throws:
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 Exception
- Throws:
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,
File thumbnailFile,
String thumbnailExtension,
int thumbnailHeight,
int thumbnailWidth,
long timeStampOffset)
throws Exception
- Throws:
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 Exception
- Throws:
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 Exception
- Throws:
Exception
flush
protected void flush(com.xuggle.xuggler.IStreamCoder outputIStreamCoder,
com.xuggle.xuggler.IContainer outputIContainer,
com.xuggle.xuggler.IPacket iPacket)
flush
protected void flush(com.xuggle.xuggler.IStreamCoder[] outputIStreamCoders,
com.xuggle.xuggler.IContainer outputIContainer)
getAudioBitRate
protected int getAudioBitRate(com.xuggle.xuggler.ICodec outputICodec,
int originalBitRate)
getAudioEncodingChannels
protected int getAudioEncodingChannels(com.xuggle.xuggler.IContainer outputIContainer,
int channels)
getAudioEncodingICodec
protected com.xuggle.xuggler.ICodec getAudioEncodingICodec(com.xuggle.xuggler.IContainer outputIContainer)
getAudioSampleFormat
protected com.xuggle.xuggler.IAudioSamples.Format getAudioSampleFormat(com.xuggle.xuggler.ICodec outputICodec,
com.xuggle.xuggler.IAudioSamples.Format originalSampleFormat)
getAudioSampleRate
protected int getAudioSampleRate()
getInputIContainer
protected abstract com.xuggle.xuggler.IContainer getInputIContainer()
getProperty
protected int getProperty(int originalValue,
int defaultValue,
int maxValue)
getProperty
protected int getProperty(Properties properties,
String propertyName,
String prettyPropertyName,
String container,
int defaultValue,
int maxValue)
getSeekTimeStamp
protected long getSeekTimeStamp(int percentage)
throws Exception
- Throws:
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,
String url,
boolean writeContainer)
throws Exception
- Throws:
Exception
openStreamCoder
protected void openStreamCoder(com.xuggle.xuggler.IStreamCoder iStreamCoder)
throws Exception
- Throws:
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,
String outputURL,
int index)
throws Exception
- Throws:
Exception
resampleAudio
protected com.xuggle.xuggler.IAudioSamples resampleAudio(com.xuggle.xuggler.IAudioResampler iAudioResampler,
com.xuggle.xuggler.IAudioSamples inputIAudioSample,
com.xuggle.xuggler.IAudioSamples resampledIAudioSample)
throws Exception
- Throws:
Exception
resampleVideo
protected com.xuggle.xuggler.IVideoPicture resampleVideo(com.xuggle.xuggler.IVideoResampler iVideoResampler,
com.xuggle.xuggler.IVideoPicture inputIVideoPicture,
com.xuggle.xuggler.IVideoPicture resampledIVideoPicture)
throws Exception
- Throws:
Exception
rewind
protected void rewind()
throws Exception
- Throws:
Exception
rewind
protected int rewind(int index)
throws Exception
- Throws:
Exception
seek
protected int seek(int index,
long timeStamp)
throws Exception
- Throws:
Exception
seek
protected long seek(long timeStamp)
throws Exception
- Throws:
Exception
updateAudioTimeStamp
protected void updateAudioTimeStamp(com.xuggle.xuggler.IAudioSamples inputAudioSample,
long timeStampOffset)
updateVideoTimeStamp
protected void updateVideoTimeStamp(com.xuggle.xuggler.IVideoPicture inputIVideoPicture,
long timeStampOffset)