Interface AudioFrameProvider
-
- All Known Subinterfaces:
AudioFrameBuffer,AudioPlayer,AudioTrackExecutor,InternalAudioTrack
- All Known Implementing Classes:
AbstractAudioFrameBuffer,AdtsAudioTrack,AllocatingAudioFrameBuffer,BandcampAudioTrack,BaseAudioTrack,BeamAudioTrack,DefaultAudioPlayer,DelegatedAudioTrack,FlacAudioTrack,GetyarnAudioTrack,HlsStreamTrack,HttpAudioTrack,LocalAudioTrack,LocalAudioTrackExecutor,M3uStreamAudioTrack,MatroskaAudioTrack,Mp3AudioTrack,MpegAdtsAudioTrack,MpegAudioTrack,MpegTsM3uStreamAudioTrack,NicoAudioTrack,NonAllocatingAudioFrameBuffer,OggAudioTrack,PrimordialAudioTrackExecutor,SoundCloudAudioTrack,SoundCloudM3uAudioTrack,TwitchStreamAudioTrack,VimeoAudioTrack,WavAudioTrack,YandexMusicAudioTrack,YoutubeAudioTrack,YoutubeMpegStreamAudioTrack
public interface AudioFrameProviderA provider for audio frames
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AudioFrameprovide()AudioFrameprovide(long timeout, java.util.concurrent.TimeUnit unit)booleanprovide(MutableAudioFrame targetFrame)booleanprovide(MutableAudioFrame targetFrame, long timeout, java.util.concurrent.TimeUnit unit)
-
-
-
Method Detail
-
provide
AudioFrame provide()
- Returns:
- Provided frame, or null if none available
-
provide
AudioFrame provide(long timeout, java.util.concurrent.TimeUnit unit) throws java.util.concurrent.TimeoutException, java.lang.InterruptedException
- Parameters:
timeout- Specifies the maximum time to wait for data. Pass 0 for non-blocking mode.unit- Specifies the time unit of the maximum wait time.- Returns:
- Provided frame. In case wait time is above zero, null indicates that no data is not available at the current moment, otherwise null means the end of the track.
- Throws:
java.util.concurrent.TimeoutException- When wait time is above zero, but no track info is found in that time.java.lang.InterruptedException- When interrupted externally (or for seek/stop).
-
provide
boolean provide(MutableAudioFrame targetFrame)
- Parameters:
targetFrame- Frame to update with the details and data of the provided frame.- Returns:
trueif a frame was provided.
-
provide
boolean provide(MutableAudioFrame targetFrame, long timeout, java.util.concurrent.TimeUnit unit) throws java.util.concurrent.TimeoutException, java.lang.InterruptedException
- Parameters:
targetFrame- Frame to update with the details and data of the provided frame.timeout- Timeout.unit- Time unit for the timeout value.- Returns:
trueif a frame was provided.- Throws:
java.util.concurrent.TimeoutException- If no frame became available within the timeout.java.lang.InterruptedException- When interrupted externally (or for seek/stop).
-
-