├── .gitignore ├── .idea ├── gradle.xml ├── misc.xml ├── modules.xml ├── runConfigurations.xml └── vcs.xml ├── README.md ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── hyq │ │ └── hm │ │ └── openglexo │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── hyq │ │ │ └── hm │ │ │ └── openglexo │ │ │ ├── EGLUtils.java │ │ │ ├── GLFramebuffer.java │ │ │ ├── GuideActivity.java │ │ │ ├── MainActivity.java │ │ │ └── ShaderUtils.java │ └── res │ │ ├── drawable-v24 │ │ └── ic_launcher_foreground.xml │ │ ├── drawable │ │ ├── ic_launcher_background.xml │ │ └── ic_play.xml │ │ ├── layout │ │ ├── activity_guide.xml │ │ └── activity_main.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ └── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── hyq │ └── hm │ └── openglexo │ └── ExampleUnitTest.java ├── build.gradle ├── exoplayer ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── example │ │ └── exoplayer │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── google │ │ │ └── android │ │ │ └── exoplayer2 │ │ │ ├── BaseRenderer.java │ │ │ ├── C.java │ │ │ ├── ControlDispatcher.java │ │ │ ├── DefaultControlDispatcher.java │ │ │ ├── DefaultLoadControl.java │ │ │ ├── DefaultMediaClock.java │ │ │ ├── DefaultRenderersFactory.java │ │ │ ├── ExoPlaybackException.java │ │ │ ├── ExoPlayer.java │ │ │ ├── ExoPlayerFactory.java │ │ │ ├── ExoPlayerImpl.java │ │ │ ├── ExoPlayerImplInternal.java │ │ │ ├── ExoPlayerLibraryInfo.java │ │ │ ├── Format.java │ │ │ ├── FormatHolder.java │ │ │ ├── IllegalSeekPositionException.java │ │ │ ├── LoadControl.java │ │ │ ├── MediaPeriodHolder.java │ │ │ ├── MediaPeriodInfo.java │ │ │ ├── MediaPeriodQueue.java │ │ │ ├── NoSampleRenderer.java │ │ │ ├── ParserException.java │ │ │ ├── PlaybackInfo.java │ │ │ ├── PlaybackParameters.java │ │ │ ├── PlaybackPreparer.java │ │ │ ├── Player.java │ │ │ ├── PlayerMessage.java │ │ │ ├── Renderer.java │ │ │ ├── RendererCapabilities.java │ │ │ ├── RendererConfiguration.java │ │ │ ├── RenderersFactory.java │ │ │ ├── SeekParameters.java │ │ │ ├── SimpleExoPlayer.java │ │ │ ├── Timeline.java │ │ │ ├── audio │ │ │ ├── Ac3Util.java │ │ │ ├── AudioAttributes.java │ │ │ ├── AudioCapabilities.java │ │ │ ├── AudioCapabilitiesReceiver.java │ │ │ ├── AudioDecoderException.java │ │ │ ├── AudioProcessor.java │ │ │ ├── AudioRendererEventListener.java │ │ │ ├── AudioSink.java │ │ │ ├── ChannelMappingAudioProcessor.java │ │ │ ├── DefaultAudioSink.java │ │ │ ├── DtsUtil.java │ │ │ ├── FloatResamplingAudioProcessor.java │ │ │ ├── MediaCodecAudioRenderer.java │ │ │ ├── ResamplingAudioProcessor.java │ │ │ ├── SimpleDecoderAudioRenderer.java │ │ │ ├── Sonic.java │ │ │ ├── SonicAudioProcessor.java │ │ │ └── TrimmingAudioProcessor.java │ │ │ ├── decoder │ │ │ ├── Buffer.java │ │ │ ├── CryptoInfo.java │ │ │ ├── Decoder.java │ │ │ ├── DecoderCounters.java │ │ │ ├── DecoderInputBuffer.java │ │ │ ├── OutputBuffer.java │ │ │ ├── SimpleDecoder.java │ │ │ └── SimpleOutputBuffer.java │ │ │ ├── drm │ │ │ ├── ClearKeyUtil.java │ │ │ ├── DecryptionException.java │ │ │ ├── DefaultDrmSession.java │ │ │ ├── DefaultDrmSessionManager.java │ │ │ ├── DrmInitData.java │ │ │ ├── DrmSession.java │ │ │ ├── DrmSessionManager.java │ │ │ ├── ErrorStateDrmSession.java │ │ │ ├── ExoMediaCrypto.java │ │ │ ├── ExoMediaDrm.java │ │ │ ├── FrameworkMediaCrypto.java │ │ │ ├── FrameworkMediaDrm.java │ │ │ ├── HttpMediaDrmCallback.java │ │ │ ├── KeysExpiredException.java │ │ │ ├── LocalMediaDrmCallback.java │ │ │ ├── MediaDrmCallback.java │ │ │ ├── OfflineLicenseHelper.java │ │ │ ├── UnsupportedDrmException.java │ │ │ └── WidevineUtil.java │ │ │ ├── extractor │ │ │ ├── ChunkIndex.java │ │ │ ├── DefaultExtractorInput.java │ │ │ ├── DefaultExtractorsFactory.java │ │ │ ├── DummyTrackOutput.java │ │ │ ├── Extractor.java │ │ │ ├── ExtractorInput.java │ │ │ ├── ExtractorOutput.java │ │ │ ├── ExtractorsFactory.java │ │ │ ├── GaplessInfoHolder.java │ │ │ ├── MpegAudioHeader.java │ │ │ ├── PositionHolder.java │ │ │ ├── SeekMap.java │ │ │ ├── SeekPoint.java │ │ │ ├── TrackOutput.java │ │ │ ├── flv │ │ │ │ ├── AudioTagPayloadReader.java │ │ │ │ ├── FlvExtractor.java │ │ │ │ ├── ScriptTagPayloadReader.java │ │ │ │ ├── TagPayloadReader.java │ │ │ │ └── VideoTagPayloadReader.java │ │ │ ├── mkv │ │ │ │ ├── DefaultEbmlReader.java │ │ │ │ ├── EbmlReader.java │ │ │ │ ├── EbmlReaderOutput.java │ │ │ │ ├── MatroskaExtractor.java │ │ │ │ ├── Sniffer.java │ │ │ │ └── VarintReader.java │ │ │ ├── mp3 │ │ │ │ ├── ConstantBitrateSeeker.java │ │ │ │ ├── Mp3Extractor.java │ │ │ │ ├── VbriSeeker.java │ │ │ │ └── XingSeeker.java │ │ │ ├── mp4 │ │ │ │ ├── Atom.java │ │ │ │ ├── AtomParsers.java │ │ │ │ ├── DefaultSampleValues.java │ │ │ │ ├── FixedSampleSizeRechunker.java │ │ │ │ ├── FragmentedMp4Extractor.java │ │ │ │ ├── MetadataUtil.java │ │ │ │ ├── Mp4Extractor.java │ │ │ │ ├── PsshAtomUtil.java │ │ │ │ ├── Sniffer.java │ │ │ │ ├── Track.java │ │ │ │ ├── TrackEncryptionBox.java │ │ │ │ ├── TrackFragment.java │ │ │ │ └── TrackSampleTable.java │ │ │ ├── ogg │ │ │ │ ├── DefaultOggSeeker.java │ │ │ │ ├── FlacReader.java │ │ │ │ ├── OggExtractor.java │ │ │ │ ├── OggPacket.java │ │ │ │ ├── OggPageHeader.java │ │ │ │ ├── OggSeeker.java │ │ │ │ ├── OpusReader.java │ │ │ │ ├── StreamReader.java │ │ │ │ ├── VorbisBitArray.java │ │ │ │ ├── VorbisReader.java │ │ │ │ └── VorbisUtil.java │ │ │ ├── rawcc │ │ │ │ └── RawCcExtractor.java │ │ │ ├── ts │ │ │ │ ├── Ac3Extractor.java │ │ │ │ ├── Ac3Reader.java │ │ │ │ ├── AdtsExtractor.java │ │ │ │ ├── AdtsReader.java │ │ │ │ ├── DefaultTsPayloadReaderFactory.java │ │ │ │ ├── DtsReader.java │ │ │ │ ├── DvbSubtitleReader.java │ │ │ │ ├── ElementaryStreamReader.java │ │ │ │ ├── H262Reader.java │ │ │ │ ├── H264Reader.java │ │ │ │ ├── H265Reader.java │ │ │ │ ├── Id3Reader.java │ │ │ │ ├── LatmReader.java │ │ │ │ ├── MpegAudioReader.java │ │ │ │ ├── NalUnitTargetBuffer.java │ │ │ │ ├── PesReader.java │ │ │ │ ├── PsExtractor.java │ │ │ │ ├── SectionPayloadReader.java │ │ │ │ ├── SectionReader.java │ │ │ │ ├── SeiReader.java │ │ │ │ ├── SpliceInfoSectionReader.java │ │ │ │ ├── TsExtractor.java │ │ │ │ └── TsPayloadReader.java │ │ │ └── wav │ │ │ │ ├── WavExtractor.java │ │ │ │ ├── WavHeader.java │ │ │ │ └── WavHeaderReader.java │ │ │ ├── mediacodec │ │ │ ├── MediaCodecInfo.java │ │ │ ├── MediaCodecRenderer.java │ │ │ ├── MediaCodecSelector.java │ │ │ └── MediaCodecUtil.java │ │ │ ├── metadata │ │ │ ├── Metadata.java │ │ │ ├── MetadataDecoder.java │ │ │ ├── MetadataDecoderException.java │ │ │ ├── MetadataDecoderFactory.java │ │ │ ├── MetadataInputBuffer.java │ │ │ ├── MetadataOutput.java │ │ │ ├── MetadataRenderer.java │ │ │ ├── emsg │ │ │ │ ├── EventMessage.java │ │ │ │ ├── EventMessageDecoder.java │ │ │ │ └── EventMessageEncoder.java │ │ │ ├── id3 │ │ │ │ ├── ApicFrame.java │ │ │ │ ├── BinaryFrame.java │ │ │ │ ├── ChapterFrame.java │ │ │ │ ├── ChapterTocFrame.java │ │ │ │ ├── CommentFrame.java │ │ │ │ ├── GeobFrame.java │ │ │ │ ├── Id3Decoder.java │ │ │ │ ├── Id3Frame.java │ │ │ │ ├── PrivFrame.java │ │ │ │ ├── TextInformationFrame.java │ │ │ │ └── UrlLinkFrame.java │ │ │ └── scte35 │ │ │ │ ├── PrivateCommand.java │ │ │ │ ├── SpliceCommand.java │ │ │ │ ├── SpliceInfoDecoder.java │ │ │ │ ├── SpliceInsertCommand.java │ │ │ │ ├── SpliceNullCommand.java │ │ │ │ ├── SpliceScheduleCommand.java │ │ │ │ └── TimeSignalCommand.java │ │ │ ├── offline │ │ │ ├── DownloadException.java │ │ │ ├── Downloader.java │ │ │ ├── DownloaderConstructorHelper.java │ │ │ ├── ProgressiveDownloader.java │ │ │ └── SegmentDownloader.java │ │ │ ├── source │ │ │ ├── AbstractConcatenatedTimeline.java │ │ │ ├── AdaptiveMediaSourceEventListener.java │ │ │ ├── BehindLiveWindowException.java │ │ │ ├── ClippingMediaPeriod.java │ │ │ ├── ClippingMediaSource.java │ │ │ ├── CompositeMediaSource.java │ │ │ ├── CompositeSequenceableLoader.java │ │ │ ├── CompositeSequenceableLoaderFactory.java │ │ │ ├── ConcatenatingMediaSource.java │ │ │ ├── DefaultCompositeSequenceableLoaderFactory.java │ │ │ ├── DeferredMediaPeriod.java │ │ │ ├── DynamicConcatenatingMediaSource.java │ │ │ ├── EmptySampleStream.java │ │ │ ├── ExtractorMediaPeriod.java │ │ │ ├── ExtractorMediaSource.java │ │ │ ├── ForwardingTimeline.java │ │ │ ├── LoopingMediaSource.java │ │ │ ├── MediaPeriod.java │ │ │ ├── MediaSource.java │ │ │ ├── MediaSourceEventListener.java │ │ │ ├── MergingMediaPeriod.java │ │ │ ├── MergingMediaSource.java │ │ │ ├── SampleMetadataQueue.java │ │ │ ├── SampleQueue.java │ │ │ ├── SampleStream.java │ │ │ ├── SequenceableLoader.java │ │ │ ├── ShuffleOrder.java │ │ │ ├── SinglePeriodTimeline.java │ │ │ ├── SingleSampleMediaPeriod.java │ │ │ ├── SingleSampleMediaSource.java │ │ │ ├── TrackGroup.java │ │ │ ├── TrackGroupArray.java │ │ │ ├── UnrecognizedInputFormatException.java │ │ │ ├── ads │ │ │ │ ├── AdPlaybackState.java │ │ │ │ ├── AdsLoader.java │ │ │ │ ├── AdsMediaSource.java │ │ │ │ └── SinglePeriodAdTimeline.java │ │ │ ├── chunk │ │ │ │ ├── BaseMediaChunk.java │ │ │ │ ├── BaseMediaChunkOutput.java │ │ │ │ ├── Chunk.java │ │ │ │ ├── ChunkExtractorWrapper.java │ │ │ │ ├── ChunkHolder.java │ │ │ │ ├── ChunkSampleStream.java │ │ │ │ ├── ChunkSource.java │ │ │ │ ├── ChunkedTrackBlacklistUtil.java │ │ │ │ ├── ContainerMediaChunk.java │ │ │ │ ├── DataChunk.java │ │ │ │ ├── InitializationChunk.java │ │ │ │ ├── MediaChunk.java │ │ │ │ └── SingleSampleMediaChunk.java │ │ │ ├── dash │ │ │ │ ├── DashChunkSource.java │ │ │ │ ├── DashManifestStaleException.java │ │ │ │ ├── DashMediaPeriod.java │ │ │ │ ├── DashMediaSource.java │ │ │ │ ├── DashSegmentIndex.java │ │ │ │ ├── DashUtil.java │ │ │ │ ├── DashWrappingSegmentIndex.java │ │ │ │ ├── DefaultDashChunkSource.java │ │ │ │ ├── EventSampleStream.java │ │ │ │ ├── PlayerEmsgHandler.java │ │ │ │ ├── manifest │ │ │ │ │ ├── AdaptationSet.java │ │ │ │ │ ├── DashManifest.java │ │ │ │ │ ├── DashManifestParser.java │ │ │ │ │ ├── Descriptor.java │ │ │ │ │ ├── EventStream.java │ │ │ │ │ ├── FilteringDashManifestParser.java │ │ │ │ │ ├── Period.java │ │ │ │ │ ├── RangedUri.java │ │ │ │ │ ├── Representation.java │ │ │ │ │ ├── RepresentationKey.java │ │ │ │ │ ├── SegmentBase.java │ │ │ │ │ ├── SingleSegmentIndex.java │ │ │ │ │ ├── UrlTemplate.java │ │ │ │ │ └── UtcTimingElement.java │ │ │ │ └── offline │ │ │ │ │ └── DashDownloader.java │ │ │ ├── hls │ │ │ │ ├── Aes128DataSource.java │ │ │ │ ├── DefaultHlsDataSourceFactory.java │ │ │ │ ├── DefaultHlsExtractorFactory.java │ │ │ │ ├── HlsChunkSource.java │ │ │ │ ├── HlsDataSourceFactory.java │ │ │ │ ├── HlsExtractorFactory.java │ │ │ │ ├── HlsManifest.java │ │ │ │ ├── HlsMediaChunk.java │ │ │ │ ├── HlsMediaPeriod.java │ │ │ │ ├── HlsMediaSource.java │ │ │ │ ├── HlsSampleStream.java │ │ │ │ ├── HlsSampleStreamWrapper.java │ │ │ │ ├── SampleQueueMappingException.java │ │ │ │ ├── TimestampAdjusterProvider.java │ │ │ │ ├── WebvttExtractor.java │ │ │ │ ├── offline │ │ │ │ │ └── HlsDownloader.java │ │ │ │ └── playlist │ │ │ │ │ ├── FilteringHlsPlaylistParser.java │ │ │ │ │ ├── HlsMasterPlaylist.java │ │ │ │ │ ├── HlsMediaPlaylist.java │ │ │ │ │ ├── HlsPlaylist.java │ │ │ │ │ ├── HlsPlaylistParser.java │ │ │ │ │ └── HlsPlaylistTracker.java │ │ │ └── smoothstreaming │ │ │ │ ├── DefaultSsChunkSource.java │ │ │ │ ├── SsChunkSource.java │ │ │ │ ├── SsMediaPeriod.java │ │ │ │ ├── SsMediaSource.java │ │ │ │ ├── manifest │ │ │ │ ├── FilteringSsManifestParser.java │ │ │ │ ├── SsManifest.java │ │ │ │ ├── SsManifestParser.java │ │ │ │ ├── SsUtil.java │ │ │ │ └── TrackKey.java │ │ │ │ └── offline │ │ │ │ └── SsDownloader.java │ │ │ ├── text │ │ │ ├── CaptionStyleCompat.java │ │ │ ├── Cue.java │ │ │ ├── SimpleSubtitleDecoder.java │ │ │ ├── SimpleSubtitleOutputBuffer.java │ │ │ ├── Subtitle.java │ │ │ ├── SubtitleDecoder.java │ │ │ ├── SubtitleDecoderException.java │ │ │ ├── SubtitleDecoderFactory.java │ │ │ ├── SubtitleInputBuffer.java │ │ │ ├── SubtitleOutputBuffer.java │ │ │ ├── TextOutput.java │ │ │ ├── TextRenderer.java │ │ │ ├── cea │ │ │ │ ├── Cea608Decoder.java │ │ │ │ ├── Cea708Cue.java │ │ │ │ ├── Cea708Decoder.java │ │ │ │ ├── CeaDecoder.java │ │ │ │ ├── CeaSubtitle.java │ │ │ │ └── CeaUtil.java │ │ │ ├── dvb │ │ │ │ ├── DvbDecoder.java │ │ │ │ ├── DvbParser.java │ │ │ │ └── DvbSubtitle.java │ │ │ ├── pgs │ │ │ │ ├── PgsDecoder.java │ │ │ │ └── PgsSubtitle.java │ │ │ ├── ssa │ │ │ │ ├── SsaDecoder.java │ │ │ │ └── SsaSubtitle.java │ │ │ ├── subrip │ │ │ │ ├── SubripDecoder.java │ │ │ │ └── SubripSubtitle.java │ │ │ ├── ttml │ │ │ │ ├── TtmlDecoder.java │ │ │ │ ├── TtmlNode.java │ │ │ │ ├── TtmlRegion.java │ │ │ │ ├── TtmlRenderUtil.java │ │ │ │ ├── TtmlStyle.java │ │ │ │ └── TtmlSubtitle.java │ │ │ ├── tx3g │ │ │ │ ├── Tx3gDecoder.java │ │ │ │ └── Tx3gSubtitle.java │ │ │ └── webvtt │ │ │ │ ├── CssParser.java │ │ │ │ ├── Mp4WebvttDecoder.java │ │ │ │ ├── Mp4WebvttSubtitle.java │ │ │ │ ├── WebvttCssStyle.java │ │ │ │ ├── WebvttCue.java │ │ │ │ ├── WebvttCueParser.java │ │ │ │ ├── WebvttDecoder.java │ │ │ │ ├── WebvttParserUtil.java │ │ │ │ └── WebvttSubtitle.java │ │ │ ├── trackselection │ │ │ ├── AdaptiveTrackSelection.java │ │ │ ├── BaseTrackSelection.java │ │ │ ├── DefaultTrackSelector.java │ │ │ ├── FixedTrackSelection.java │ │ │ ├── MappingTrackSelector.java │ │ │ ├── RandomTrackSelection.java │ │ │ ├── TrackSelection.java │ │ │ ├── TrackSelectionArray.java │ │ │ ├── TrackSelector.java │ │ │ └── TrackSelectorResult.java │ │ │ ├── ui │ │ │ ├── AspectRatioFrameLayout.java │ │ │ ├── DebugTextViewHelper.java │ │ │ ├── DefaultTimeBar.java │ │ │ ├── PlaybackControlView.java │ │ │ ├── PlayerControlView.java │ │ │ ├── PlayerView.java │ │ │ ├── SimpleExoPlayerView.java │ │ │ ├── SubtitlePainter.java │ │ │ ├── SubtitleView.java │ │ │ └── TimeBar.java │ │ │ ├── upstream │ │ │ ├── Allocation.java │ │ │ ├── Allocator.java │ │ │ ├── AssetDataSource.java │ │ │ ├── BandwidthMeter.java │ │ │ ├── ByteArrayDataSink.java │ │ │ ├── ByteArrayDataSource.java │ │ │ ├── ContentDataSource.java │ │ │ ├── DataSchemeDataSource.java │ │ │ ├── DataSink.java │ │ │ ├── DataSource.java │ │ │ ├── DataSourceException.java │ │ │ ├── DataSourceInputStream.java │ │ │ ├── DataSpec.java │ │ │ ├── DefaultAllocator.java │ │ │ ├── DefaultBandwidthMeter.java │ │ │ ├── DefaultDataSource.java │ │ │ ├── DefaultDataSourceFactory.java │ │ │ ├── DefaultHttpDataSource.java │ │ │ ├── DefaultHttpDataSourceFactory.java │ │ │ ├── DummyDataSource.java │ │ │ ├── FileDataSource.java │ │ │ ├── FileDataSourceFactory.java │ │ │ ├── HttpDataSource.java │ │ │ ├── Loader.java │ │ │ ├── LoaderErrorThrower.java │ │ │ ├── ParsingLoadable.java │ │ │ ├── PriorityDataSource.java │ │ │ ├── PriorityDataSourceFactory.java │ │ │ ├── RawResourceDataSource.java │ │ │ ├── TeeDataSource.java │ │ │ ├── TransferListener.java │ │ │ ├── UdpDataSource.java │ │ │ ├── cache │ │ │ │ ├── Cache.java │ │ │ │ ├── CacheDataSink.java │ │ │ │ ├── CacheDataSinkFactory.java │ │ │ │ ├── CacheDataSource.java │ │ │ │ ├── CacheDataSourceFactory.java │ │ │ │ ├── CacheEvictor.java │ │ │ │ ├── CacheSpan.java │ │ │ │ ├── CacheUtil.java │ │ │ │ ├── CachedContent.java │ │ │ │ ├── CachedContentIndex.java │ │ │ │ ├── CachedRegionTracker.java │ │ │ │ ├── LeastRecentlyUsedCacheEvictor.java │ │ │ │ ├── NoOpCacheEvictor.java │ │ │ │ ├── SimpleCache.java │ │ │ │ └── SimpleCacheSpan.java │ │ │ └── crypto │ │ │ │ ├── AesCipherDataSink.java │ │ │ │ ├── AesCipherDataSource.java │ │ │ │ ├── AesFlushingCipher.java │ │ │ │ └── CryptoUtil.java │ │ │ ├── util │ │ │ ├── Assertions.java │ │ │ ├── AtomicFile.java │ │ │ ├── Clock.java │ │ │ ├── CodecSpecificDataUtil.java │ │ │ ├── ColorParser.java │ │ │ ├── ConditionVariable.java │ │ │ ├── ErrorMessageProvider.java │ │ │ ├── EventLogger.java │ │ │ ├── FlacStreamInfo.java │ │ │ ├── HandlerWrapper.java │ │ │ ├── LibraryLoader.java │ │ │ ├── LongArray.java │ │ │ ├── MediaClock.java │ │ │ ├── MimeTypes.java │ │ │ ├── NalUnitUtil.java │ │ │ ├── ParsableBitArray.java │ │ │ ├── ParsableByteArray.java │ │ │ ├── ParsableNalUnitBitArray.java │ │ │ ├── Predicate.java │ │ │ ├── PriorityTaskManager.java │ │ │ ├── RepeatModeUtil.java │ │ │ ├── ReusableBufferedOutputStream.java │ │ │ ├── SlidingPercentile.java │ │ │ ├── StandaloneMediaClock.java │ │ │ ├── SystemClock.java │ │ │ ├── SystemHandlerWrapper.java │ │ │ ├── TimestampAdjuster.java │ │ │ ├── TraceUtil.java │ │ │ ├── UriUtil.java │ │ │ ├── Util.java │ │ │ └── XmlPullParserUtil.java │ │ │ └── video │ │ │ ├── AvcConfig.java │ │ │ ├── ColorInfo.java │ │ │ ├── DummySurface.java │ │ │ ├── HevcConfig.java │ │ │ ├── MediaCodecVideoRenderer.java │ │ │ ├── VideoFrameReleaseTimeHelper.java │ │ │ ├── VideoListener.java │ │ │ ├── VideoRendererEventListener.java │ │ │ └── VideoTimeListener.java │ ├── javadoc │ │ └── com │ │ │ └── google │ │ │ └── android │ │ │ └── exoplayer2 │ │ │ └── doc-files │ │ │ ├── exoplayer-threading-model.svg │ │ │ ├── renderer-states.svg │ │ │ ├── timeline-advanced.svg │ │ │ ├── timeline-live-indefinite.svg │ │ │ ├── timeline-live-limited.svg │ │ │ ├── timeline-live-multi-period.svg │ │ │ ├── timeline-period.svg │ │ │ ├── timeline-playlist.svg │ │ │ ├── timeline-single-file-midrolls.svg │ │ │ ├── timeline-single-file.svg │ │ │ └── timeline-window.svg │ └── res │ │ ├── drawable-anydpi-v21 │ │ ├── exo_controls_fastforward.xml │ │ ├── exo_controls_fullscreen_enter.xml │ │ ├── exo_controls_fullscreen_exit.xml │ │ ├── exo_controls_next.xml │ │ ├── exo_controls_pause.xml │ │ ├── exo_controls_play.xml │ │ ├── exo_controls_previous.xml │ │ ├── exo_controls_repeat_all.xml │ │ ├── exo_controls_repeat_off.xml │ │ ├── exo_controls_repeat_one.xml │ │ ├── exo_controls_rewind.xml │ │ └── exo_controls_shuffle.xml │ │ ├── drawable-hdpi │ │ ├── exo_controls_fastforward.png │ │ ├── exo_controls_fullscreen_enter.png │ │ ├── exo_controls_fullscreen_exit.png │ │ ├── exo_controls_next.png │ │ ├── exo_controls_pause.png │ │ ├── exo_controls_play.png │ │ ├── exo_controls_previous.png │ │ ├── exo_controls_repeat_all.png │ │ ├── exo_controls_repeat_off.png │ │ ├── exo_controls_repeat_one.png │ │ ├── exo_controls_rewind.png │ │ └── exo_controls_shuffle.png │ │ ├── drawable-ldpi │ │ ├── exo_controls_fastforward.png │ │ ├── exo_controls_fullscreen_enter.png │ │ ├── exo_controls_fullscreen_exit.png │ │ ├── exo_controls_next.png │ │ ├── exo_controls_pause.png │ │ ├── exo_controls_play.png │ │ ├── exo_controls_previous.png │ │ ├── exo_controls_repeat_all.png │ │ ├── exo_controls_repeat_off.png │ │ ├── exo_controls_repeat_one.png │ │ ├── exo_controls_rewind.png │ │ └── exo_controls_shuffle.png │ │ ├── drawable-mdpi │ │ ├── exo_controls_fastforward.png │ │ ├── exo_controls_fullscreen_enter.png │ │ ├── exo_controls_fullscreen_exit.png │ │ ├── exo_controls_next.png │ │ ├── exo_controls_pause.png │ │ ├── exo_controls_play.png │ │ ├── exo_controls_previous.png │ │ ├── exo_controls_repeat_all.png │ │ ├── exo_controls_repeat_off.png │ │ ├── exo_controls_repeat_one.png │ │ ├── exo_controls_rewind.png │ │ └── exo_controls_shuffle.png │ │ ├── drawable-xhdpi │ │ ├── exo_controls_fastforward.png │ │ ├── exo_controls_fullscreen_enter.png │ │ ├── exo_controls_fullscreen_exit.png │ │ ├── exo_controls_next.png │ │ ├── exo_controls_pause.png │ │ ├── exo_controls_play.png │ │ ├── exo_controls_previous.png │ │ ├── exo_controls_repeat_all.png │ │ ├── exo_controls_repeat_off.png │ │ ├── exo_controls_repeat_one.png │ │ ├── exo_controls_rewind.png │ │ └── exo_controls_shuffle.png │ │ ├── drawable-xxhdpi │ │ ├── exo_controls_fastforward.png │ │ ├── exo_controls_fullscreen_enter.png │ │ ├── exo_controls_fullscreen_exit.png │ │ ├── exo_controls_next.png │ │ ├── exo_controls_pause.png │ │ ├── exo_controls_play.png │ │ ├── exo_controls_previous.png │ │ ├── exo_controls_repeat_all.png │ │ ├── exo_controls_repeat_off.png │ │ ├── exo_controls_repeat_one.png │ │ ├── exo_controls_rewind.png │ │ └── exo_controls_shuffle.png │ │ ├── drawable │ │ └── exo_edit_mode_logo.xml │ │ ├── layout │ │ ├── exo_playback_control_view.xml │ │ ├── exo_player_control_view.xml │ │ ├── exo_player_view.xml │ │ └── exo_simple_player_view.xml │ │ ├── values-af │ │ └── strings.xml │ │ ├── values-am │ │ └── strings.xml │ │ ├── values-ar │ │ └── strings.xml │ │ ├── values-az-rAZ │ │ └── strings.xml │ │ ├── values-b+sr+Latn │ │ └── strings.xml │ │ ├── values-be-rBY │ │ └── strings.xml │ │ ├── values-bg │ │ └── strings.xml │ │ ├── values-bn-rBD │ │ └── strings.xml │ │ ├── values-bs-rBA │ │ └── strings.xml │ │ ├── values-ca │ │ └── strings.xml │ │ ├── values-cs │ │ └── strings.xml │ │ ├── values-da │ │ └── strings.xml │ │ ├── values-de │ │ └── strings.xml │ │ ├── values-el │ │ └── strings.xml │ │ ├── values-en-rAU │ │ └── strings.xml │ │ ├── values-en-rGB │ │ └── strings.xml │ │ ├── values-en-rIN │ │ └── strings.xml │ │ ├── values-es-rUS │ │ └── strings.xml │ │ ├── values-es │ │ └── strings.xml │ │ ├── values-et-rEE │ │ └── strings.xml │ │ ├── values-eu-rES │ │ └── strings.xml │ │ ├── values-fa │ │ └── strings.xml │ │ ├── values-fi │ │ └── strings.xml │ │ ├── values-fr-rCA │ │ └── strings.xml │ │ ├── values-fr │ │ └── strings.xml │ │ ├── values-gl-rES │ │ └── strings.xml │ │ ├── values-gu-rIN │ │ └── strings.xml │ │ ├── values-hi │ │ └── strings.xml │ │ ├── values-hr │ │ └── strings.xml │ │ ├── values-hu │ │ └── strings.xml │ │ ├── values-hy-rAM │ │ └── strings.xml │ │ ├── values-in │ │ └── strings.xml │ │ ├── values-is-rIS │ │ └── strings.xml │ │ ├── values-it │ │ └── strings.xml │ │ ├── values-iw │ │ └── strings.xml │ │ ├── values-ja │ │ └── strings.xml │ │ ├── values-ka-rGE │ │ └── strings.xml │ │ ├── values-kk-rKZ │ │ └── strings.xml │ │ ├── values-km-rKH │ │ └── strings.xml │ │ ├── values-kn-rIN │ │ └── strings.xml │ │ ├── values-ko │ │ └── strings.xml │ │ ├── values-ky-rKG │ │ └── strings.xml │ │ ├── values-lo-rLA │ │ └── strings.xml │ │ ├── values-lt │ │ └── strings.xml │ │ ├── values-lv │ │ └── strings.xml │ │ ├── values-mk-rMK │ │ └── strings.xml │ │ ├── values-ml-rIN │ │ └── strings.xml │ │ ├── values-mn-rMN │ │ └── strings.xml │ │ ├── values-mr-rIN │ │ └── strings.xml │ │ ├── values-ms-rMY │ │ └── strings.xml │ │ ├── values-my-rMM │ │ └── strings.xml │ │ ├── values-nb │ │ └── strings.xml │ │ ├── values-ne-rNP │ │ └── strings.xml │ │ ├── values-nl │ │ └── strings.xml │ │ ├── values-pa-rIN │ │ └── strings.xml │ │ ├── values-pl │ │ └── strings.xml │ │ ├── values-pt-rBR │ │ └── strings.xml │ │ ├── values-pt-rPT │ │ └── strings.xml │ │ ├── values-pt │ │ └── strings.xml │ │ ├── values-ro │ │ └── strings.xml │ │ ├── values-ru │ │ └── strings.xml │ │ ├── values-si-rLK │ │ └── strings.xml │ │ ├── values-sk │ │ └── strings.xml │ │ ├── values-sl │ │ └── strings.xml │ │ ├── values-sq-rAL │ │ └── strings.xml │ │ ├── values-sr │ │ └── strings.xml │ │ ├── values-sv │ │ └── strings.xml │ │ ├── values-sw │ │ └── strings.xml │ │ ├── values-ta-rIN │ │ └── strings.xml │ │ ├── values-te-rIN │ │ └── strings.xml │ │ ├── values-th │ │ └── strings.xml │ │ ├── values-tl │ │ └── strings.xml │ │ ├── values-tr │ │ └── strings.xml │ │ ├── values-uk │ │ └── strings.xml │ │ ├── values-ur-rPK │ │ └── strings.xml │ │ ├── values-uz-rUZ │ │ └── strings.xml │ │ ├── values-vi │ │ └── strings.xml │ │ ├── values-zh-rCN │ │ └── strings.xml │ │ ├── values-zh-rHK │ │ └── strings.xml │ │ ├── values-zh-rTW │ │ └── strings.xml │ │ ├── values-zu │ │ └── strings.xml │ │ └── values │ │ ├── attrs.xml │ │ ├── constants.xml │ │ ├── ids.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── example │ └── exoplayer │ └── ExampleUnitTest.java ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── img ├── after.png ├── befor.png └── 图解.png └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 19 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 26 | 27 | 28 | 29 | 30 | 31 | 33 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ExoPlayerVideoBlur 2 | ## Gussin 3 | 4 | 该Demo文章地址:https://blog.csdn.net/liosen/article/details/83896721 5 | 6 | ### 效果图 7 |
8 | 图片加载失败时 9 | 10 | 图片加载失败时 11 |
12 | 13 | |名词|解释| 14 | |:---|:---| 15 | |radius|偏移量| 16 | |blurX|X轴方向偏移次数| 17 | |blurY|Y轴方向偏移次数| 18 | |trans|亮度| 19 | 20 | 原理大概是: 21 | 22 | 将原图层亮度调为原来的 trans倍(trans为自定义参数,默认0.005),然后copy一层X轴方向偏移,copy一层Y轴偏移,偏移量为radius。 23 | 24 | 画个图解释一下 25 | 26 | 图片加载失败时 27 | 28 | 贴出关键滤镜代码 29 | ``` 30 | #GaussianBlurEffect 31 | #extension GL_OES_EGL_image_external : require 32 | precision mediump float; 33 | varying vec2 vTextureCoord; 34 | uniform samplerExternalOES sTexture; 35 | const float resolution=1024.0; 36 | const float radius = radius; 37 | vec2 dir = vec2(1.0,1.0); 38 | void main() { 39 | vec4 sum = vec4(0.0); 40 | vec2 tc = vTextureCoord; 41 | float blur = radius/resolution; 42 | float hstep = dir.x; 43 | float vstep = dir.y; 44 | int x = blurX; 45 | int y = blurY; 46 | for(int i = x;i > 0;i--){ 47 | for(int j = y; j > 0; j--){ 48 | sum = texture2D(sTexture, vec2(tc.x + float(i)*blur*hstep, tc.y + float(j)*blur*vstep)) *trans; 49 | sum = texture2D(sTexture, vec2(tc.x - float(i)*blur*hstep, tc.y + float(j)*blur*vstep)) *trans; 50 | sum = texture2D(sTexture, vec2(tc.x - float(i)*blur*hstep, tc.y - float(j)*blur*vstep)) *trans; 51 | sum = texture2D(sTexture, vec2(tc.x + float(i)*blur*hstep, tc.y - float(j)*blur*vstep)) *trans; 52 | } 53 | } 54 | vec4 cc= texture2D(sTexture,vTextureCoord ); 55 | 56 | gl_FragColor =vec4(sum.rgb, cc.a); 57 | } 58 | ``` 59 | 60 | 其他具体内容,请移步博客: 61 | https://blog.csdn.net/liosen/article/details/83896721 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 26 5 | defaultConfig { 6 | applicationId "com.hyq.hm.openglexo" 7 | minSdkVersion 17 8 | targetSdkVersion 26 9 | versionCode 1 10 | versionName "1.0" 11 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | implementation fileTree(include: ['*.jar'], dir: 'libs') 23 | implementation 'com.android.support:appcompat-v7:26.0.0-beta1' 24 | implementation 'com.android.support.constraint:constraint-layout:1.0.2' 25 | testImplementation 'junit:junit:4.12' 26 | androidTestImplementation 'com.android.support.test:runner:0.5' 27 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2' 28 | implementation project(':exoplayer') 29 | } 30 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/hyq/hm/openglexo/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.hyq.hm.openglexo; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumented test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.hyq.hm.openglexo", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_play.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_guide.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 11 | 15 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | OpenGLExo 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/test/java/com/hyq/hm/openglexo/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.hyq.hm.openglexo; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | 5 | repositories { 6 | google() 7 | jcenter() 8 | } 9 | dependencies { 10 | classpath 'com.android.tools.build:gradle:3.0.1' 11 | 12 | 13 | // NOTE: Do not place your application dependencies here; they belong 14 | // in the individual module build.gradle files 15 | } 16 | } 17 | 18 | allprojects { 19 | repositories { 20 | google() 21 | jcenter() 22 | } 23 | } 24 | 25 | task clean(type: Delete) { 26 | delete rootProject.buildDir 27 | } 28 | -------------------------------------------------------------------------------- /exoplayer/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /exoplayer/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 26 5 | 6 | 7 | 8 | defaultConfig { 9 | minSdkVersion 15 10 | targetSdkVersion 26 11 | versionCode 1 12 | versionName "1.0" 13 | 14 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 15 | 16 | } 17 | 18 | buildTypes { 19 | release { 20 | minifyEnabled false 21 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 22 | } 23 | } 24 | 25 | } 26 | 27 | dependencies { 28 | implementation fileTree(dir: 'libs', include: ['*.jar']) 29 | 30 | implementation 'com.android.support:appcompat-v7:26.0.0-beta1' 31 | testImplementation 'junit:junit:4.12' 32 | androidTestImplementation 'com.android.support.test:runner:0.5' 33 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2' 34 | } 35 | -------------------------------------------------------------------------------- /exoplayer/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /exoplayer/src/androidTest/java/com/example/exoplayer/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.example.exoplayer; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumented test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.example.exoplayer.test", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /exoplayer/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/DefaultControlDispatcher.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2; 17 | 18 | import com.google.android.exoplayer2.Player.RepeatMode; 19 | 20 | /** 21 | * Default {@link ControlDispatcher} that dispatches all operations to the player without 22 | * modification. 23 | */ 24 | public class DefaultControlDispatcher implements ControlDispatcher { 25 | 26 | @Override 27 | public boolean dispatchSetPlayWhenReady(Player player, boolean playWhenReady) { 28 | player.setPlayWhenReady(playWhenReady); 29 | return true; 30 | } 31 | 32 | @Override 33 | public boolean dispatchSeekTo(Player player, int windowIndex, long positionMs) { 34 | player.seekTo(windowIndex, positionMs); 35 | return true; 36 | } 37 | 38 | @Override 39 | public boolean dispatchSetRepeatMode(Player player, @RepeatMode int repeatMode) { 40 | player.setRepeatMode(repeatMode); 41 | return true; 42 | } 43 | 44 | @Override 45 | public boolean dispatchSetShuffleModeEnabled(Player player, boolean shuffleModeEnabled) { 46 | player.setShuffleModeEnabled(shuffleModeEnabled); 47 | return true; 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/FormatHolder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2; 17 | 18 | /** 19 | * Holds a {@link Format}. 20 | */ 21 | public final class FormatHolder { 22 | 23 | /** 24 | * The held {@link Format}. 25 | */ 26 | public Format format; 27 | 28 | } 29 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/IllegalSeekPositionException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2; 17 | 18 | /** 19 | * Thrown when an attempt is made to seek to a position that does not exist in the player's 20 | * {@link Timeline}. 21 | */ 22 | public final class IllegalSeekPositionException extends IllegalStateException { 23 | 24 | /** 25 | * The {@link Timeline} in which the seek was attempted. 26 | */ 27 | public final Timeline timeline; 28 | /** 29 | * The index of the window being seeked to. 30 | */ 31 | public final int windowIndex; 32 | /** 33 | * The seek position in the specified window. 34 | */ 35 | public final long positionMs; 36 | 37 | /** 38 | * @param timeline The {@link Timeline} in which the seek was attempted. 39 | * @param windowIndex The index of the window being seeked to. 40 | * @param positionMs The seek position in the specified window. 41 | */ 42 | public IllegalSeekPositionException(Timeline timeline, int windowIndex, long positionMs) { 43 | this.timeline = timeline; 44 | this.windowIndex = windowIndex; 45 | this.positionMs = positionMs; 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/ParserException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2; 17 | 18 | import java.io.IOException; 19 | 20 | /** 21 | * Thrown when an error occurs parsing media data and metadata. 22 | */ 23 | public class ParserException extends IOException { 24 | 25 | public ParserException() { 26 | super(); 27 | } 28 | 29 | /** 30 | * @param message The detail message for the exception. 31 | */ 32 | public ParserException(String message) { 33 | super(message); 34 | } 35 | 36 | /** 37 | * @param cause The cause for the exception. 38 | */ 39 | public ParserException(Throwable cause) { 40 | super(cause); 41 | } 42 | 43 | /** 44 | * @param message The detail message for the exception. 45 | * @param cause The cause for the exception. 46 | */ 47 | public ParserException(String message, Throwable cause) { 48 | super(message, cause); 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/PlaybackPreparer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2; 17 | 18 | /** Called to prepare a playback. */ 19 | public interface PlaybackPreparer { 20 | 21 | /** Called to prepare a playback. */ 22 | void preparePlayback(); 23 | } 24 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/audio/AudioDecoderException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.audio; 17 | 18 | /** Thrown when an audio decoder error occurs. */ 19 | public class AudioDecoderException extends Exception { 20 | 21 | /** @param message The detail message for this exception. */ 22 | public AudioDecoderException(String message) { 23 | super(message); 24 | } 25 | 26 | /** 27 | * @param message The detail message for this exception. 28 | * @param cause the cause (which is saved for later retrieval by the {@link #getCause()} method). 29 | * A null value is permitted, and indicates that the cause is nonexistent or unknown. 30 | */ 31 | public AudioDecoderException(String message, Throwable cause) { 32 | super(message, cause); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/decoder/OutputBuffer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.decoder; 17 | 18 | /** 19 | * Output buffer decoded by a {@link Decoder}. 20 | */ 21 | public abstract class OutputBuffer extends Buffer { 22 | 23 | /** 24 | * The presentation timestamp for the buffer, in microseconds. 25 | */ 26 | public long timeUs; 27 | 28 | /** 29 | * The number of buffers immediately prior to this one that were skipped in the {@link Decoder}. 30 | */ 31 | public int skippedOutputBufferCount; 32 | 33 | /** 34 | * Releases the output buffer for reuse. Must be called when the buffer is no longer needed. 35 | */ 36 | public abstract void release(); 37 | 38 | } 39 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/drm/DecryptionException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.drm; 17 | 18 | /** 19 | * Thrown when a non-platform component fails to decrypt data. 20 | */ 21 | public class DecryptionException extends Exception { 22 | 23 | /** 24 | * A component specific error code. 25 | */ 26 | public final int errorCode; 27 | 28 | /** 29 | * @param errorCode A component specific error code. 30 | * @param message The detail message. 31 | */ 32 | public DecryptionException(int errorCode, String message) { 33 | super(message); 34 | this.errorCode = errorCode; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/drm/ErrorStateDrmSession.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.drm; 17 | 18 | import com.google.android.exoplayer2.util.Assertions; 19 | import java.util.Map; 20 | 21 | /** 22 | * A {@link DrmSession} that's in a terminal error state. 23 | */ 24 | /* package */ final class ErrorStateDrmSession implements DrmSession { 25 | 26 | private final DrmSessionException error; 27 | 28 | public ErrorStateDrmSession(DrmSessionException error) { 29 | this.error = Assertions.checkNotNull(error); 30 | } 31 | 32 | @Override 33 | public int getState() { 34 | return STATE_ERROR; 35 | } 36 | 37 | @Override 38 | public DrmSessionException getError() { 39 | return error; 40 | } 41 | 42 | @Override 43 | public T getMediaCrypto() { 44 | return null; 45 | } 46 | 47 | @Override 48 | public Map queryKeyStatus() { 49 | return null; 50 | } 51 | 52 | @Override 53 | public byte[] getOfflineLicenseKeySetId() { 54 | return null; 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/drm/ExoMediaCrypto.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.drm; 17 | 18 | /** 19 | * An opaque {@link android.media.MediaCrypto} equivalent. 20 | */ 21 | public interface ExoMediaCrypto { 22 | 23 | /** 24 | * @see android.media.MediaCrypto#requiresSecureDecoderComponent(String) 25 | */ 26 | boolean requiresSecureDecoderComponent(String mimeType); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/drm/KeysExpiredException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.drm; 17 | 18 | /** 19 | * Thrown when the drm keys loaded into an open session expire. 20 | */ 21 | public final class KeysExpiredException extends Exception { 22 | } 23 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/drm/MediaDrmCallback.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.drm; 17 | 18 | import com.google.android.exoplayer2.drm.ExoMediaDrm.KeyRequest; 19 | import com.google.android.exoplayer2.drm.ExoMediaDrm.ProvisionRequest; 20 | import java.util.UUID; 21 | 22 | /** 23 | * Performs {@link ExoMediaDrm} key and provisioning requests. 24 | */ 25 | public interface MediaDrmCallback { 26 | 27 | /** 28 | * Executes a provisioning request. 29 | * 30 | * @param uuid The UUID of the content protection scheme. 31 | * @param request The request. 32 | * @return The response data. 33 | * @throws Exception If an error occurred executing the request. 34 | */ 35 | byte[] executeProvisionRequest(UUID uuid, ProvisionRequest request) throws Exception; 36 | 37 | /** 38 | * Executes a key request. 39 | * 40 | * @param uuid The UUID of the content protection scheme. 41 | * @param request The request. 42 | * @return The response data. 43 | * @throws Exception If an error occurred executing the request. 44 | */ 45 | byte[] executeKeyRequest(UUID uuid, KeyRequest request) throws Exception; 46 | 47 | } 48 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/extractor/ExtractorOutput.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.extractor; 17 | 18 | /** 19 | * Receives stream level data extracted by an {@link Extractor}. 20 | */ 21 | public interface ExtractorOutput { 22 | 23 | /** 24 | * Called by the {@link Extractor} to get the {@link TrackOutput} for a specific track. 25 | *

26 | * The same {@link TrackOutput} is returned if multiple calls are made with the same {@code id}. 27 | * 28 | * @param id A track identifier. 29 | * @param type The type of the track. Typically one of the {@link com.google.android.exoplayer2.C} 30 | * {@code TRACK_TYPE_*} constants. 31 | * @return The {@link TrackOutput} for the given track identifier. 32 | */ 33 | TrackOutput track(int id, int type); 34 | 35 | /** 36 | * Called when all tracks have been identified, meaning no new {@code trackId} values will be 37 | * passed to {@link #track(int, int)}. 38 | */ 39 | void endTracks(); 40 | 41 | /** 42 | * Called when a {@link SeekMap} has been extracted from the stream. 43 | * 44 | * @param seekMap The extracted {@link SeekMap}. 45 | */ 46 | void seekMap(SeekMap seekMap); 47 | 48 | } 49 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/extractor/ExtractorsFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.extractor; 17 | 18 | /** 19 | * Factory for arrays of {@link Extractor}s. 20 | */ 21 | public interface ExtractorsFactory { 22 | 23 | /** 24 | * Returns an array of new {@link Extractor} instances. 25 | */ 26 | Extractor[] createExtractors(); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/extractor/PositionHolder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.extractor; 17 | 18 | /** 19 | * Holds a position in the stream. 20 | */ 21 | public final class PositionHolder { 22 | 23 | /** 24 | * The held position. 25 | */ 26 | public long position; 27 | 28 | } 29 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/extractor/mp4/DefaultSampleValues.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.extractor.mp4; 17 | 18 | /* package */ final class DefaultSampleValues { 19 | 20 | public final int sampleDescriptionIndex; 21 | public final int duration; 22 | public final int size; 23 | public final int flags; 24 | 25 | public DefaultSampleValues(int sampleDescriptionIndex, int duration, int size, int flags) { 26 | this.sampleDescriptionIndex = sampleDescriptionIndex; 27 | this.duration = duration; 28 | this.size = size; 29 | this.flags = flags; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/metadata/MetadataDecoder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.metadata; 17 | 18 | /** 19 | * Decodes metadata from binary data. 20 | */ 21 | public interface MetadataDecoder { 22 | 23 | /** 24 | * Decodes a {@link Metadata} element from the provided input buffer. 25 | * 26 | * @param inputBuffer The input buffer to decode. 27 | * @return The decoded metadata object. 28 | * @throws MetadataDecoderException If a problem occurred decoding the data. 29 | */ 30 | Metadata decode(MetadataInputBuffer inputBuffer) throws MetadataDecoderException; 31 | 32 | } 33 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/metadata/MetadataDecoderException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.metadata; 17 | 18 | /** 19 | * Thrown when an error occurs decoding metadata. 20 | */ 21 | public class MetadataDecoderException extends Exception { 22 | 23 | /** 24 | * @param message The detail message for this exception. 25 | */ 26 | public MetadataDecoderException(String message) { 27 | super(message); 28 | } 29 | 30 | /** 31 | * @param message The detail message for this exception. 32 | * @param cause The cause of this exception. 33 | */ 34 | public MetadataDecoderException(String message, Throwable cause) { 35 | super(message, cause); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/metadata/MetadataInputBuffer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.metadata; 17 | 18 | import com.google.android.exoplayer2.Format; 19 | import com.google.android.exoplayer2.decoder.DecoderInputBuffer; 20 | 21 | /** 22 | * A {@link DecoderInputBuffer} for a {@link MetadataDecoder}. 23 | */ 24 | public final class MetadataInputBuffer extends DecoderInputBuffer { 25 | 26 | /** 27 | * An offset that must be added to the metadata's timestamps after it's been decoded, or 28 | * {@link Format#OFFSET_SAMPLE_RELATIVE} if {@link #timeUs} should be added. 29 | */ 30 | public long subsampleOffsetUs; 31 | 32 | public MetadataInputBuffer() { 33 | super(DecoderInputBuffer.BUFFER_REPLACEMENT_MODE_NORMAL); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/metadata/MetadataOutput.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.metadata; 17 | 18 | /** 19 | * Receives metadata output. 20 | */ 21 | public interface MetadataOutput { 22 | 23 | /** 24 | * Called when there is metadata associated with current playback time. 25 | * 26 | * @param metadata The metadata. 27 | */ 28 | void onMetadata(Metadata metadata); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/metadata/id3/Id3Frame.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.metadata.id3; 17 | 18 | import com.google.android.exoplayer2.metadata.Metadata; 19 | import com.google.android.exoplayer2.util.Assertions; 20 | 21 | /** 22 | * Base class for ID3 frames. 23 | */ 24 | public abstract class Id3Frame implements Metadata.Entry { 25 | 26 | /** 27 | * The frame ID. 28 | */ 29 | public final String id; 30 | 31 | public Id3Frame(String id) { 32 | this.id = Assertions.checkNotNull(id); 33 | } 34 | 35 | @Override 36 | public int describeContents() { 37 | return 0; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/metadata/scte35/SpliceCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.metadata.scte35; 17 | 18 | import com.google.android.exoplayer2.metadata.Metadata; 19 | 20 | /** 21 | * Superclass for SCTE35 splice commands. 22 | */ 23 | public abstract class SpliceCommand implements Metadata.Entry { 24 | 25 | @Override 26 | public int describeContents() { 27 | return 0; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/metadata/scte35/SpliceNullCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.metadata.scte35; 17 | 18 | import android.os.Parcel; 19 | 20 | /** 21 | * Represents a splice null command as defined in SCTE35, Section 9.3.1. 22 | */ 23 | public final class SpliceNullCommand extends SpliceCommand { 24 | 25 | // Parcelable implementation. 26 | 27 | @Override 28 | public void writeToParcel(Parcel dest, int flags) { 29 | // Do nothing. 30 | } 31 | 32 | public static final Creator CREATOR = 33 | new Creator() { 34 | 35 | @Override 36 | public SpliceNullCommand createFromParcel(Parcel in) { 37 | return new SpliceNullCommand(); 38 | } 39 | 40 | @Override 41 | public SpliceNullCommand[] newArray(int size) { 42 | return new SpliceNullCommand[size]; 43 | } 44 | 45 | }; 46 | 47 | } 48 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/offline/DownloadException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.offline; 17 | 18 | import java.io.IOException; 19 | 20 | /** Thrown on an error during downloading. */ 21 | public final class DownloadException extends IOException { 22 | 23 | /** @param message The message for the exception. */ 24 | public DownloadException(String message) { 25 | super(message); 26 | } 27 | 28 | /** @param cause The cause for the exception. */ 29 | public DownloadException(Throwable cause) { 30 | super(cause); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/source/AdaptiveMediaSourceEventListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.source; 17 | 18 | /** 19 | * Interface for callbacks to be notified of {@link MediaSource} events. 20 | * 21 | * @deprecated Use {@link MediaSourceEventListener}. 22 | */ 23 | @Deprecated 24 | public interface AdaptiveMediaSourceEventListener extends MediaSourceEventListener {} 25 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/source/BehindLiveWindowException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.source; 17 | 18 | import java.io.IOException; 19 | 20 | /** 21 | * Thrown when a live playback falls behind the available media window. 22 | */ 23 | public final class BehindLiveWindowException extends IOException { 24 | 25 | public BehindLiveWindowException() { 26 | super(); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/source/CompositeSequenceableLoaderFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.source; 17 | 18 | /** 19 | * A factory to create composite {@link SequenceableLoader}s. 20 | */ 21 | public interface CompositeSequenceableLoaderFactory { 22 | 23 | /** 24 | * Creates a composite {@link SequenceableLoader}. 25 | * 26 | * @param loaders The sub-loaders that make up the {@link SequenceableLoader} to be built. 27 | * @return A composite {@link SequenceableLoader} that comprises the given loaders. 28 | */ 29 | SequenceableLoader createCompositeSequenceableLoader(SequenceableLoader... loaders); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/source/DefaultCompositeSequenceableLoaderFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.source; 17 | 18 | /** 19 | * Default implementation of {@link CompositeSequenceableLoaderFactory}. 20 | */ 21 | public final class DefaultCompositeSequenceableLoaderFactory 22 | implements CompositeSequenceableLoaderFactory { 23 | 24 | @Override 25 | public SequenceableLoader createCompositeSequenceableLoader(SequenceableLoader... loaders) { 26 | return new CompositeSequenceableLoader(loaders); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/source/EmptySampleStream.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.source; 17 | 18 | import com.google.android.exoplayer2.C; 19 | import com.google.android.exoplayer2.FormatHolder; 20 | import com.google.android.exoplayer2.decoder.DecoderInputBuffer; 21 | import java.io.IOException; 22 | 23 | /** 24 | * An empty {@link SampleStream}. 25 | */ 26 | public final class EmptySampleStream implements SampleStream { 27 | 28 | @Override 29 | public boolean isReady() { 30 | return true; 31 | } 32 | 33 | @Override 34 | public void maybeThrowError() throws IOException { 35 | // Do nothing. 36 | } 37 | 38 | @Override 39 | public int readData(FormatHolder formatHolder, DecoderInputBuffer buffer, 40 | boolean formatRequired) { 41 | buffer.setFlags(C.BUFFER_FLAG_END_OF_STREAM); 42 | return C.RESULT_BUFFER_READ; 43 | } 44 | 45 | @Override 46 | public int skipData(long positionUs) { 47 | return 0; 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/source/UnrecognizedInputFormatException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.source; 17 | 18 | import android.net.Uri; 19 | import com.google.android.exoplayer2.ParserException; 20 | 21 | /** 22 | * Thrown if the input format was not recognized. 23 | */ 24 | public class UnrecognizedInputFormatException extends ParserException { 25 | 26 | /** 27 | * The {@link Uri} from which the unrecognized data was read. 28 | */ 29 | public final Uri uri; 30 | 31 | /** 32 | * @param message The detail message for the exception. 33 | * @param uri The {@link Uri} from which the unrecognized data was read. 34 | */ 35 | public UnrecognizedInputFormatException(String message, Uri uri) { 36 | super(message); 37 | this.uri = uri; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/source/chunk/ChunkHolder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.source.chunk; 17 | 18 | /** 19 | * Holds a chunk or an indication that the end of the stream has been reached. 20 | */ 21 | public final class ChunkHolder { 22 | 23 | /** 24 | * The chunk. 25 | */ 26 | public Chunk chunk; 27 | 28 | /** 29 | * Indicates that the end of the stream has been reached. 30 | */ 31 | public boolean endOfStream; 32 | 33 | /** 34 | * Clears the holder. 35 | */ 36 | public void clear() { 37 | chunk = null; 38 | endOfStream = false; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/source/dash/DashManifestStaleException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.source.dash; 17 | 18 | import java.io.IOException; 19 | 20 | /** Thrown when a live playback's manifest is stale and a new manifest could not be loaded. */ 21 | public final class DashManifestStaleException extends IOException {} 22 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/source/dash/manifest/FilteringDashManifestParser.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.source.dash.manifest; 17 | 18 | import android.net.Uri; 19 | import com.google.android.exoplayer2.upstream.ParsingLoadable.Parser; 20 | import java.io.IOException; 21 | import java.io.InputStream; 22 | import java.util.ArrayList; 23 | 24 | /** 25 | * A parser of media presentation description files which includes only the representations 26 | * identified by the given keys. 27 | */ 28 | public final class FilteringDashManifestParser implements Parser { 29 | 30 | private final DashManifestParser dashManifestParser; 31 | private final ArrayList filter; 32 | 33 | /** @param filter The representation keys that should be retained in the parsed manifests. */ 34 | public FilteringDashManifestParser(ArrayList filter) { 35 | this.dashManifestParser = new DashManifestParser(); 36 | this.filter = filter; 37 | } 38 | 39 | @Override 40 | public DashManifest parse(Uri uri, InputStream inputStream) throws IOException { 41 | return dashManifestParser.parse(uri, inputStream).copy(filter); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/source/dash/manifest/UtcTimingElement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.source.dash.manifest; 17 | 18 | /** 19 | * Represents a UTCTiming element. 20 | */ 21 | public final class UtcTimingElement { 22 | 23 | public final String schemeIdUri; 24 | public final String value; 25 | 26 | public UtcTimingElement(String schemeIdUri, String value) { 27 | this.schemeIdUri = schemeIdUri; 28 | this.value = value; 29 | } 30 | 31 | @Override 32 | public String toString() { 33 | return schemeIdUri + ", " + value; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/source/hls/DefaultHlsDataSourceFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.source.hls; 17 | 18 | import com.google.android.exoplayer2.upstream.DataSource; 19 | 20 | /** 21 | * Default implementation of {@link HlsDataSourceFactory}. 22 | */ 23 | public final class DefaultHlsDataSourceFactory implements HlsDataSourceFactory { 24 | 25 | private final DataSource.Factory dataSourceFactory; 26 | 27 | /** 28 | * @param dataSourceFactory The {@link DataSource.Factory} to use for all data types. 29 | */ 30 | public DefaultHlsDataSourceFactory(DataSource.Factory dataSourceFactory) { 31 | this.dataSourceFactory = dataSourceFactory; 32 | } 33 | 34 | @Override 35 | public DataSource createDataSource(int dataType) { 36 | return dataSourceFactory.createDataSource(); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/source/hls/HlsDataSourceFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.source.hls; 17 | 18 | import com.google.android.exoplayer2.C; 19 | import com.google.android.exoplayer2.upstream.DataSource; 20 | 21 | /** 22 | * Creates {@link DataSource}s for HLS playlists, encryption and media chunks. 23 | */ 24 | public interface HlsDataSourceFactory { 25 | 26 | /** 27 | * Creates a {@link DataSource} for the given data type. 28 | * 29 | * @param dataType The data type for which the {@link DataSource} will be used. One of {@link C} 30 | * {@code .DATA_TYPE_*} constants. 31 | * @return A {@link DataSource} for the given data type. 32 | */ 33 | DataSource createDataSource(int dataType); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/source/hls/HlsManifest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.source.hls; 17 | 18 | import com.google.android.exoplayer2.source.hls.playlist.HlsMasterPlaylist; 19 | import com.google.android.exoplayer2.source.hls.playlist.HlsMediaPlaylist; 20 | 21 | /** 22 | * Holds a master playlist along with a snapshot of one of its media playlists. 23 | */ 24 | public final class HlsManifest { 25 | 26 | /** 27 | * The master playlist of an HLS stream. 28 | */ 29 | public final HlsMasterPlaylist masterPlaylist; 30 | /** 31 | * A snapshot of a media playlist referred to by {@link #masterPlaylist}. 32 | */ 33 | public final HlsMediaPlaylist mediaPlaylist; 34 | 35 | /** 36 | * @param masterPlaylist The master playlist. 37 | * @param mediaPlaylist The media playlist. 38 | */ 39 | HlsManifest(HlsMasterPlaylist masterPlaylist, HlsMediaPlaylist mediaPlaylist) { 40 | this.masterPlaylist = masterPlaylist; 41 | this.mediaPlaylist = mediaPlaylist; 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/source/hls/SampleQueueMappingException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.source.hls; 17 | 18 | import com.google.android.exoplayer2.source.SampleQueue; 19 | import com.google.android.exoplayer2.source.TrackGroup; 20 | import java.io.IOException; 21 | 22 | /** Thrown when it is not possible to map a {@link TrackGroup} to a {@link SampleQueue}. */ 23 | public final class SampleQueueMappingException extends IOException { 24 | 25 | /** @param mimeType The mime type of the track group whose mapping failed. */ 26 | public SampleQueueMappingException(String mimeType) { 27 | super("Unable to bind a sample queue to TrackGroup with mime type " + mimeType + "."); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/source/hls/playlist/FilteringHlsPlaylistParser.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.source.hls.playlist; 17 | 18 | import android.net.Uri; 19 | import com.google.android.exoplayer2.upstream.ParsingLoadable.Parser; 20 | import java.io.IOException; 21 | import java.io.InputStream; 22 | import java.util.List; 23 | 24 | /** A HLS playlists parser which includes only the renditions identified by the given urls. */ 25 | public final class FilteringHlsPlaylistParser implements Parser { 26 | 27 | private final HlsPlaylistParser hlsPlaylistParser; 28 | private final List filter; 29 | 30 | /** @param filter The urls to renditions that should be retained in the parsed playlists. */ 31 | public FilteringHlsPlaylistParser(List filter) { 32 | this.hlsPlaylistParser = new HlsPlaylistParser(); 33 | this.filter = filter; 34 | } 35 | 36 | @Override 37 | public HlsPlaylist parse(Uri uri, InputStream inputStream) throws IOException { 38 | HlsPlaylist hlsPlaylist = hlsPlaylistParser.parse(uri, inputStream); 39 | if (hlsPlaylist instanceof HlsMasterPlaylist) { 40 | return ((HlsMasterPlaylist) hlsPlaylist).copy(filter); 41 | } else { 42 | return hlsPlaylist; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylist.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.source.hls.playlist; 17 | 18 | import java.util.Collections; 19 | import java.util.List; 20 | 21 | /** 22 | * Represents an HLS playlist. 23 | */ 24 | public abstract class HlsPlaylist { 25 | 26 | /** 27 | * The base uri. Used to resolve relative paths. 28 | */ 29 | public final String baseUri; 30 | /** 31 | * The list of tags in the playlist. 32 | */ 33 | public final List tags; 34 | 35 | /** 36 | * @param baseUri See {@link #baseUri}. 37 | * @param tags See {@link #tags}. 38 | */ 39 | protected HlsPlaylist(String baseUri, List tags) { 40 | this.baseUri = baseUri; 41 | this.tags = Collections.unmodifiableList(tags); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/FilteringSsManifestParser.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.source.smoothstreaming.manifest; 17 | 18 | import android.net.Uri; 19 | import com.google.android.exoplayer2.upstream.ParsingLoadable.Parser; 20 | import java.io.IOException; 21 | import java.io.InputStream; 22 | import java.util.List; 23 | 24 | /** 25 | * A parser of SmoothStreaming manifest which includes only the tracks identified by the given keys. 26 | */ 27 | public final class FilteringSsManifestParser implements Parser { 28 | 29 | private final SsManifestParser ssManifestParser; 30 | private final List filter; 31 | 32 | /** @param filter The track keys that should be retained in the parsed manifests. */ 33 | public FilteringSsManifestParser(List filter) { 34 | this.ssManifestParser = new SsManifestParser(); 35 | this.filter = filter; 36 | } 37 | 38 | @Override 39 | public SsManifest parse(Uri uri, InputStream inputStream) throws IOException { 40 | return ssManifestParser.parse(uri, inputStream).copy(filter); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.source.smoothstreaming.manifest; 17 | 18 | import android.net.Uri; 19 | import com.google.android.exoplayer2.util.Util; 20 | 21 | /** SmoothStreaming related utility methods. */ 22 | public final class SsUtil { 23 | 24 | /** Returns a fixed SmoothStreaming client manifest {@link Uri}. */ 25 | public static Uri fixManifestUri(Uri manifestUri) { 26 | if (Util.toLowerInvariant(manifestUri.getLastPathSegment()).matches("manifest(\\(.+\\))?")) { 27 | return manifestUri; 28 | } 29 | return Uri.withAppendedPath(manifestUri, "Manifest"); 30 | } 31 | 32 | private SsUtil() {} 33 | } 34 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/text/SimpleSubtitleOutputBuffer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.text; 17 | 18 | /** 19 | * A {@link SubtitleOutputBuffer} for decoders that extend {@link SimpleSubtitleDecoder}. 20 | */ 21 | /* package */ final class SimpleSubtitleOutputBuffer extends SubtitleOutputBuffer { 22 | 23 | private final SimpleSubtitleDecoder owner; 24 | 25 | /** 26 | * @param owner The decoder that owns this buffer. 27 | */ 28 | public SimpleSubtitleOutputBuffer(SimpleSubtitleDecoder owner) { 29 | super(); 30 | this.owner = owner; 31 | } 32 | 33 | @Override 34 | public final void release() { 35 | owner.releaseOutputBuffer(this); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/text/SubtitleDecoder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.text; 17 | 18 | import com.google.android.exoplayer2.decoder.Decoder; 19 | 20 | /** 21 | * Decodes {@link Subtitle}s from {@link SubtitleInputBuffer}s. 22 | */ 23 | public interface SubtitleDecoder extends 24 | Decoder { 25 | 26 | /** 27 | * Informs the decoder of the current playback position. 28 | *

29 | * Must be called prior to each attempt to dequeue output buffers from the decoder. 30 | * 31 | * @param positionUs The current playback position in microseconds. 32 | */ 33 | void setPositionUs(long positionUs); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/text/SubtitleDecoderException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.text; 17 | 18 | /** 19 | * Thrown when an error occurs decoding subtitle data. 20 | */ 21 | public class SubtitleDecoderException extends Exception { 22 | 23 | /** 24 | * @param message The detail message for this exception. 25 | */ 26 | public SubtitleDecoderException(String message) { 27 | super(message); 28 | } 29 | 30 | /** 31 | * @param message The detail message for this exception. 32 | * @param cause The cause of this exception. 33 | */ 34 | public SubtitleDecoderException(String message, Throwable cause) { 35 | super(message, cause); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/text/SubtitleInputBuffer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.text; 17 | 18 | import com.google.android.exoplayer2.Format; 19 | import com.google.android.exoplayer2.decoder.DecoderInputBuffer; 20 | 21 | /** A {@link DecoderInputBuffer} for a {@link SubtitleDecoder}. */ 22 | public class SubtitleInputBuffer extends DecoderInputBuffer { 23 | 24 | /** 25 | * An offset that must be added to the subtitle's event times after it's been decoded, or 26 | * {@link Format#OFFSET_SAMPLE_RELATIVE} if {@link #timeUs} should be added. 27 | */ 28 | public long subsampleOffsetUs; 29 | 30 | public SubtitleInputBuffer() { 31 | super(DecoderInputBuffer.BUFFER_REPLACEMENT_MODE_NORMAL); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/text/TextOutput.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.text; 17 | 18 | import java.util.List; 19 | 20 | /** 21 | * Receives text output. 22 | */ 23 | public interface TextOutput { 24 | 25 | /** 26 | * Called when there is a change in the {@link Cue}s. 27 | * 28 | * @param cues The {@link Cue}s. 29 | */ 30 | void onCues(List cues); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/text/cea/CeaSubtitle.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.text.cea; 17 | 18 | import com.google.android.exoplayer2.C; 19 | import com.google.android.exoplayer2.text.Cue; 20 | import com.google.android.exoplayer2.text.Subtitle; 21 | import com.google.android.exoplayer2.util.Assertions; 22 | import java.util.Collections; 23 | import java.util.List; 24 | 25 | /** 26 | * A representation of a CEA subtitle. 27 | */ 28 | /* package */ final class CeaSubtitle implements Subtitle { 29 | 30 | private final List cues; 31 | 32 | /** 33 | * @param cues The subtitle cues. 34 | */ 35 | public CeaSubtitle(List cues) { 36 | this.cues = cues; 37 | } 38 | 39 | @Override 40 | public int getNextEventTimeIndex(long timeUs) { 41 | return timeUs < 0 ? 0 : C.INDEX_UNSET; 42 | } 43 | 44 | @Override 45 | public int getEventTimeCount() { 46 | return 1; 47 | } 48 | 49 | @Override 50 | public long getEventTime(int index) { 51 | Assertions.checkArgument(index == 0); 52 | return 0; 53 | } 54 | 55 | @Override 56 | public List getCues(long timeUs) { 57 | return timeUs >= 0 ? cues : Collections.emptyList(); 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/text/dvb/DvbSubtitle.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.text.dvb; 17 | 18 | import com.google.android.exoplayer2.C; 19 | import com.google.android.exoplayer2.text.Cue; 20 | import com.google.android.exoplayer2.text.Subtitle; 21 | import java.util.List; 22 | 23 | /** 24 | * A representation of a DVB subtitle. 25 | */ 26 | /* package */ final class DvbSubtitle implements Subtitle { 27 | 28 | private final List cues; 29 | 30 | public DvbSubtitle(List cues) { 31 | this.cues = cues; 32 | } 33 | 34 | @Override 35 | public int getNextEventTimeIndex(long timeUs) { 36 | return C.INDEX_UNSET; 37 | } 38 | 39 | @Override 40 | public int getEventTimeCount() { 41 | return 1; 42 | } 43 | 44 | @Override 45 | public long getEventTime(int index) { 46 | return 0; 47 | } 48 | 49 | @Override 50 | public List getCues(long timeUs) { 51 | return cues; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/text/pgs/PgsSubtitle.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.text.pgs; 17 | 18 | import com.google.android.exoplayer2.C; 19 | import com.google.android.exoplayer2.text.Cue; 20 | import com.google.android.exoplayer2.text.Subtitle; 21 | import java.util.List; 22 | 23 | /** A representation of a PGS subtitle. */ 24 | /* package */ final class PgsSubtitle implements Subtitle { 25 | 26 | private final List cues; 27 | 28 | public PgsSubtitle(List cues) { 29 | this.cues = cues; 30 | } 31 | 32 | @Override 33 | public int getNextEventTimeIndex(long timeUs) { 34 | return C.INDEX_UNSET; 35 | } 36 | 37 | @Override 38 | public int getEventTimeCount() { 39 | return 1; 40 | } 41 | 42 | @Override 43 | public long getEventTime(int index) { 44 | return 0; 45 | } 46 | 47 | @Override 48 | public List getCues(long timeUs) { 49 | return cues; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlRegion.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.text.ttml; 17 | 18 | import com.google.android.exoplayer2.text.Cue; 19 | 20 | /** 21 | * Represents a TTML Region. 22 | */ 23 | /* package */ final class TtmlRegion { 24 | 25 | public final String id; 26 | public final float position; 27 | public final float line; 28 | @Cue.LineType public final int lineType; 29 | @Cue.AnchorType public final int lineAnchor; 30 | public final float width; 31 | 32 | public TtmlRegion(String id) { 33 | this(id, Cue.DIMEN_UNSET, Cue.DIMEN_UNSET, Cue.TYPE_UNSET, Cue.TYPE_UNSET, Cue.DIMEN_UNSET); 34 | } 35 | 36 | public TtmlRegion(String id, float position, float line, @Cue.LineType int lineType, 37 | @Cue.AnchorType int lineAnchor, float width) { 38 | this.id = id; 39 | this.position = position; 40 | this.line = line; 41 | this.lineType = lineType; 42 | this.lineAnchor = lineAnchor; 43 | this.width = width; 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/text/webvtt/Mp4WebvttSubtitle.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.text.webvtt; 17 | 18 | import com.google.android.exoplayer2.C; 19 | import com.google.android.exoplayer2.text.Cue; 20 | import com.google.android.exoplayer2.text.Subtitle; 21 | import com.google.android.exoplayer2.util.Assertions; 22 | import java.util.Collections; 23 | import java.util.List; 24 | 25 | /** 26 | * Representation of a Webvtt subtitle embedded in a MP4 container file. 27 | */ 28 | /* package */ final class Mp4WebvttSubtitle implements Subtitle { 29 | 30 | private final List cues; 31 | 32 | public Mp4WebvttSubtitle(List cueList) { 33 | cues = Collections.unmodifiableList(cueList); 34 | } 35 | 36 | @Override 37 | public int getNextEventTimeIndex(long timeUs) { 38 | return timeUs < 0 ? 0 : C.INDEX_UNSET; 39 | } 40 | 41 | @Override 42 | public int getEventTimeCount() { 43 | return 1; 44 | } 45 | 46 | @Override 47 | public long getEventTime(int index) { 48 | Assertions.checkArgument(index == 0); 49 | return 0; 50 | } 51 | 52 | @Override 53 | public List getCues(long timeUs) { 54 | return timeUs >= 0 ? cues : Collections.emptyList(); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/upstream/Allocation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.upstream; 17 | 18 | /** 19 | * An allocation within a byte array. 20 | *

21 | * The allocation's length is obtained by calling {@link Allocator#getIndividualAllocationLength()} 22 | * on the {@link Allocator} from which it was obtained. 23 | */ 24 | public final class Allocation { 25 | 26 | /** 27 | * The array containing the allocated space. The allocated space might not be at the start of the 28 | * array, and so {@link #offset} must be used when indexing into it. 29 | */ 30 | public final byte[] data; 31 | 32 | /** 33 | * The offset of the allocated space in {@link #data}. 34 | */ 35 | public final int offset; 36 | 37 | /** 38 | * @param data The array containing the allocated space. 39 | * @param offset The offset of the allocated space in {@code data}. 40 | */ 41 | public Allocation(byte[] data, int offset) { 42 | this.data = data; 43 | this.offset = offset; 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/upstream/BandwidthMeter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.upstream; 17 | 18 | /** 19 | * Provides estimates of the currently available bandwidth. 20 | */ 21 | public interface BandwidthMeter { 22 | 23 | /** 24 | * A listener of {@link BandwidthMeter} events. 25 | */ 26 | interface EventListener { 27 | 28 | /** 29 | * Called periodically to indicate that bytes have been transferred. 30 | *

31 | * Note: The estimated bitrate is typically derived from more information than just 32 | * {@code bytes} and {@code elapsedMs}. 33 | * 34 | * @param elapsedMs The time taken to transfer the bytes, in milliseconds. 35 | * @param bytes The number of bytes transferred. 36 | * @param bitrate The estimated bitrate in bits/sec, or {@link #NO_ESTIMATE} if an estimate is 37 | * not available. 38 | */ 39 | void onBandwidthSample(int elapsedMs, long bytes, long bitrate); 40 | 41 | } 42 | 43 | /** 44 | * Indicates no bandwidth estimate is available. 45 | */ 46 | long NO_ESTIMATE = -1; 47 | 48 | /** 49 | * Returns the estimated bandwidth in bits/sec, or {@link #NO_ESTIMATE} if an estimate is not 50 | * available. 51 | */ 52 | long getBitrateEstimate(); 53 | 54 | } 55 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/upstream/DataSourceException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.upstream; 17 | 18 | import java.io.IOException; 19 | 20 | /** 21 | * Used to specify reason of a DataSource error. 22 | */ 23 | public final class DataSourceException extends IOException { 24 | 25 | public static final int POSITION_OUT_OF_RANGE = 0; 26 | 27 | /** 28 | * The reason of this {@link DataSourceException}. It can only be {@link #POSITION_OUT_OF_RANGE}. 29 | */ 30 | public final int reason; 31 | 32 | /** 33 | * Constructs a DataSourceException. 34 | * 35 | * @param reason Reason of the error. It can only be {@link #POSITION_OUT_OF_RANGE}. 36 | */ 37 | public DataSourceException(int reason) { 38 | this.reason = reason; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/upstream/DummyDataSource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.upstream; 17 | 18 | import android.net.Uri; 19 | import java.io.IOException; 20 | 21 | /** 22 | * A dummy DataSource which provides no data. {@link #open(DataSpec)} throws {@link IOException}. 23 | */ 24 | public final class DummyDataSource implements DataSource { 25 | 26 | public static final DummyDataSource INSTANCE = new DummyDataSource(); 27 | 28 | /** A factory that produces {@link DummyDataSource}. */ 29 | public static final Factory FACTORY = new Factory() { 30 | @Override 31 | public DataSource createDataSource() { 32 | return new DummyDataSource(); 33 | } 34 | }; 35 | 36 | private DummyDataSource() {} 37 | 38 | @Override 39 | public long open(DataSpec dataSpec) throws IOException { 40 | throw new IOException("Dummy source"); 41 | } 42 | 43 | @Override 44 | public int read(byte[] buffer, int offset, int readLength) throws IOException { 45 | throw new UnsupportedOperationException(); 46 | } 47 | 48 | @Override 49 | public Uri getUri() { 50 | return null; 51 | } 52 | 53 | @Override 54 | public void close() throws IOException { 55 | // do nothing. 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/upstream/FileDataSourceFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.upstream; 17 | 18 | /** 19 | * A {@link DataSource.Factory} that produces {@link FileDataSource}. 20 | */ 21 | public final class FileDataSourceFactory implements DataSource.Factory { 22 | 23 | private final TransferListener listener; 24 | 25 | public FileDataSourceFactory() { 26 | this(null); 27 | } 28 | 29 | public FileDataSourceFactory(TransferListener listener) { 30 | this.listener = listener; 31 | } 32 | 33 | @Override 34 | public DataSource createDataSource() { 35 | return new FileDataSource(listener); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/upstream/TransferListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.upstream; 17 | 18 | /** 19 | * A listener of data transfer events. 20 | */ 21 | public interface TransferListener { 22 | 23 | /** 24 | * Called when a transfer starts. 25 | * 26 | * @param source The source performing the transfer. 27 | * @param dataSpec Describes the data being transferred. 28 | */ 29 | void onTransferStart(S source, DataSpec dataSpec); 30 | 31 | /** 32 | * Called incrementally during a transfer. 33 | * 34 | * @param source The source performing the transfer. 35 | * @param bytesTransferred The number of bytes transferred since the previous call to this 36 | * method (or if the first call, since the transfer was started). 37 | */ 38 | void onBytesTransferred(S source, int bytesTransferred); 39 | 40 | /** 41 | * Called when a transfer ends. 42 | * 43 | * @param source The source performing the transfer. 44 | */ 45 | void onTransferEnd(S source); 46 | 47 | } 48 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/upstream/cache/CacheDataSinkFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.upstream.cache; 17 | 18 | import com.google.android.exoplayer2.upstream.DataSink; 19 | 20 | /** 21 | * A {@link DataSink.Factory} that produces {@link CacheDataSink}. 22 | */ 23 | public final class CacheDataSinkFactory implements DataSink.Factory { 24 | 25 | private final Cache cache; 26 | private final long maxCacheFileSize; 27 | private final int bufferSize; 28 | 29 | /** 30 | * @see CacheDataSink#CacheDataSink(Cache, long) 31 | */ 32 | public CacheDataSinkFactory(Cache cache, long maxCacheFileSize) { 33 | this(cache, maxCacheFileSize, CacheDataSink.DEFAULT_BUFFER_SIZE); 34 | } 35 | 36 | /** 37 | * @see CacheDataSink#CacheDataSink(Cache, long, int) 38 | */ 39 | public CacheDataSinkFactory(Cache cache, long maxCacheFileSize, int bufferSize) { 40 | this.cache = cache; 41 | this.maxCacheFileSize = maxCacheFileSize; 42 | this.bufferSize = bufferSize; 43 | } 44 | 45 | @Override 46 | public DataSink createDataSink() { 47 | return new CacheDataSink(cache, maxCacheFileSize, bufferSize); 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/upstream/cache/CacheEvictor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.upstream.cache; 17 | 18 | /** 19 | * Evicts data from a {@link Cache}. Implementations should call {@link Cache#removeSpan(CacheSpan)} 20 | * to evict cache entries based on their eviction policies. 21 | */ 22 | public interface CacheEvictor extends Cache.Listener { 23 | 24 | /** 25 | * Called when cache has been initialized. 26 | */ 27 | void onCacheInitialized(); 28 | 29 | /** 30 | * Called when a writer starts writing to the cache. 31 | * 32 | * @param cache The source of the event. 33 | * @param key The key being written. 34 | * @param position The starting position of the data being written. 35 | * @param maxLength The maximum length of the data being written. 36 | */ 37 | void onStartFile(Cache cache, String key, long position, long maxLength); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/upstream/cache/NoOpCacheEvictor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.upstream.cache; 17 | 18 | 19 | /** 20 | * Evictor that doesn't ever evict cache files. 21 | * 22 | * Warning: Using this evictor might have unforeseeable consequences if cache 23 | * size is not managed elsewhere. 24 | */ 25 | public final class NoOpCacheEvictor implements CacheEvictor { 26 | 27 | @Override 28 | public void onCacheInitialized() { 29 | // Do nothing. 30 | } 31 | 32 | @Override 33 | public void onStartFile(Cache cache, String key, long position, long maxLength) { 34 | // Do nothing. 35 | } 36 | 37 | @Override 38 | public void onSpanAdded(Cache cache, CacheSpan span) { 39 | // Do nothing. 40 | } 41 | 42 | @Override 43 | public void onSpanRemoved(Cache cache, CacheSpan span) { 44 | // Do nothing. 45 | } 46 | 47 | @Override 48 | public void onSpanTouched(Cache cache, CacheSpan oldSpan, CacheSpan newSpan) { 49 | // Do nothing. 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/upstream/crypto/CryptoUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.upstream.crypto; 17 | 18 | /** 19 | * Utility functions for the crypto package. 20 | */ 21 | /* package */ final class CryptoUtil { 22 | 23 | private CryptoUtil() {} 24 | 25 | /** 26 | * Returns the hash value of the input as a long using the 64 bit FNV-1a hash function. The hash 27 | * values produced by this function are less likely to collide than those produced by 28 | * {@link #hashCode()}. 29 | */ 30 | public static long getFNV64Hash(String input) { 31 | if (input == null) { 32 | return 0; 33 | } 34 | 35 | long hash = 0; 36 | for (int i = 0; i < input.length(); i++) { 37 | hash ^= input.charAt(i); 38 | // This is equivalent to hash *= 0x100000001b3 (the FNV magic prime number). 39 | hash += (hash << 1) + (hash << 4) + (hash << 5) + (hash << 7) + (hash << 8) + (hash << 40); 40 | } 41 | return hash; 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/util/Clock.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.util; 17 | 18 | import android.os.Handler; 19 | import android.os.Looper; 20 | import android.support.annotation.Nullable; 21 | 22 | /** 23 | * An interface through which system clocks can be read and {@link HandlerWrapper}s created. The 24 | * {@link #DEFAULT} implementation must be used for all non-test cases. 25 | */ 26 | public interface Clock { 27 | 28 | /** 29 | * Default {@link Clock} to use for all non-test cases. 30 | */ 31 | Clock DEFAULT = new SystemClock(); 32 | 33 | /** @see android.os.SystemClock#elapsedRealtime() */ 34 | long elapsedRealtime(); 35 | 36 | /** @see android.os.SystemClock#uptimeMillis() */ 37 | long uptimeMillis(); 38 | 39 | /** @see android.os.SystemClock#sleep(long) */ 40 | void sleep(long sleepTimeMs); 41 | 42 | /** 43 | * Creates a {@link HandlerWrapper} using a specified looper and a specified callback for handling 44 | * messages. 45 | * 46 | * @see Handler#Handler(Looper, Handler.Callback) 47 | */ 48 | HandlerWrapper createHandler(Looper looper, @Nullable Handler.Callback callback); 49 | } 50 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/util/ErrorMessageProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.util; 17 | 18 | import android.util.Pair; 19 | 20 | /** Converts throwables into error codes and user readable error messages. */ 21 | public interface ErrorMessageProvider { 22 | 23 | /** 24 | * Returns a pair consisting of an error code and a user readable error message for the given 25 | * throwable. 26 | * 27 | * @param throwable The throwable for which an error code and message should be generated. 28 | * @return A pair consisting of an error code and a user readable error message. 29 | */ 30 | Pair getErrorMessage(T throwable); 31 | } 32 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/util/MediaClock.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.util; 17 | 18 | import com.google.android.exoplayer2.PlaybackParameters; 19 | 20 | /** 21 | * Tracks the progression of media time. 22 | */ 23 | public interface MediaClock { 24 | 25 | /** 26 | * Returns the current media position in microseconds. 27 | */ 28 | long getPositionUs(); 29 | 30 | /** 31 | * Attempts to set the playback parameters and returns the active playback parameters, which may 32 | * differ from those passed in. 33 | * 34 | * @param playbackParameters The playback parameters. 35 | * @return The active playback parameters. 36 | */ 37 | PlaybackParameters setPlaybackParameters(PlaybackParameters playbackParameters); 38 | 39 | /** 40 | * Returns the active playback parameters. 41 | */ 42 | PlaybackParameters getPlaybackParameters(); 43 | 44 | } 45 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/util/Predicate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.util; 17 | 18 | /** 19 | * Determines a true of false value for a given input. 20 | * 21 | * @param The input type of the predicate. 22 | */ 23 | public interface Predicate { 24 | 25 | /** 26 | * Evaluates an input. 27 | * 28 | * @param input The input to evaluate. 29 | * @return The evaluated result. 30 | */ 31 | boolean evaluate(T input); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/util/SystemClock.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.google.android.exoplayer2.util; 17 | 18 | import android.os.Handler; 19 | import android.os.Handler.Callback; 20 | import android.os.Looper; 21 | import android.support.annotation.Nullable; 22 | 23 | /** 24 | * The standard implementation of {@link Clock}. 25 | */ 26 | /* package */ final class SystemClock implements Clock { 27 | 28 | @Override 29 | public long elapsedRealtime() { 30 | return android.os.SystemClock.elapsedRealtime(); 31 | } 32 | 33 | @Override 34 | public long uptimeMillis() { 35 | return android.os.SystemClock.uptimeMillis(); 36 | } 37 | 38 | @Override 39 | public void sleep(long sleepTimeMs) { 40 | android.os.SystemClock.sleep(sleepTimeMs); 41 | } 42 | 43 | @Override 44 | public HandlerWrapper createHandler(Looper looper, @Nullable Callback callback) { 45 | return new SystemHandlerWrapper(new Handler(looper, callback)); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /exoplayer/src/main/java/com/google/android/exoplayer2/video/VideoTimeListener.java: -------------------------------------------------------------------------------- 1 | package com.google.android.exoplayer2.video; 2 | 3 | import android.view.Surface; 4 | 5 | /** 6 | * Created by 海米 on 2018/4/2. 7 | */ 8 | 9 | public interface VideoTimeListener { 10 | void onVideoTimeChanged(long time); 11 | Surface onSurface(Surface surface, int width, int height); 12 | void onRelease(); 13 | } 14 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-anydpi-v21/exo_controls_fastforward.xml: -------------------------------------------------------------------------------- 1 | 15 | 20 | 21 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-anydpi-v21/exo_controls_fullscreen_enter.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-anydpi-v21/exo_controls_fullscreen_exit.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-anydpi-v21/exo_controls_next.xml: -------------------------------------------------------------------------------- 1 | 15 | 20 | 21 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-anydpi-v21/exo_controls_pause.xml: -------------------------------------------------------------------------------- 1 | 15 | 20 | 21 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-anydpi-v21/exo_controls_play.xml: -------------------------------------------------------------------------------- 1 | 15 | 20 | 21 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-anydpi-v21/exo_controls_previous.xml: -------------------------------------------------------------------------------- 1 | 15 | 20 | 21 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-anydpi-v21/exo_controls_repeat_all.xml: -------------------------------------------------------------------------------- 1 | 15 | 20 | 23 | 24 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-anydpi-v21/exo_controls_repeat_off.xml: -------------------------------------------------------------------------------- 1 | 15 | 20 | 23 | 24 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-anydpi-v21/exo_controls_repeat_one.xml: -------------------------------------------------------------------------------- 1 | 15 | 20 | 23 | 24 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-anydpi-v21/exo_controls_rewind.xml: -------------------------------------------------------------------------------- 1 | 15 | 20 | 21 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-anydpi-v21/exo_controls_shuffle.xml: -------------------------------------------------------------------------------- 1 | 15 | 20 | 21 | 26 | 27 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-hdpi/exo_controls_fastforward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-hdpi/exo_controls_fastforward.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-hdpi/exo_controls_fullscreen_enter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-hdpi/exo_controls_fullscreen_enter.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-hdpi/exo_controls_fullscreen_exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-hdpi/exo_controls_fullscreen_exit.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-hdpi/exo_controls_next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-hdpi/exo_controls_next.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-hdpi/exo_controls_pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-hdpi/exo_controls_pause.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-hdpi/exo_controls_play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-hdpi/exo_controls_play.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-hdpi/exo_controls_previous.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-hdpi/exo_controls_previous.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-hdpi/exo_controls_repeat_all.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-hdpi/exo_controls_repeat_all.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-hdpi/exo_controls_repeat_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-hdpi/exo_controls_repeat_off.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-hdpi/exo_controls_repeat_one.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-hdpi/exo_controls_repeat_one.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-hdpi/exo_controls_rewind.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-hdpi/exo_controls_rewind.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-hdpi/exo_controls_shuffle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-hdpi/exo_controls_shuffle.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-ldpi/exo_controls_fastforward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-ldpi/exo_controls_fastforward.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-ldpi/exo_controls_fullscreen_enter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-ldpi/exo_controls_fullscreen_enter.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-ldpi/exo_controls_fullscreen_exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-ldpi/exo_controls_fullscreen_exit.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-ldpi/exo_controls_next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-ldpi/exo_controls_next.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-ldpi/exo_controls_pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-ldpi/exo_controls_pause.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-ldpi/exo_controls_play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-ldpi/exo_controls_play.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-ldpi/exo_controls_previous.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-ldpi/exo_controls_previous.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-ldpi/exo_controls_repeat_all.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-ldpi/exo_controls_repeat_all.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-ldpi/exo_controls_repeat_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-ldpi/exo_controls_repeat_off.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-ldpi/exo_controls_repeat_one.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-ldpi/exo_controls_repeat_one.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-ldpi/exo_controls_rewind.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-ldpi/exo_controls_rewind.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-ldpi/exo_controls_shuffle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-ldpi/exo_controls_shuffle.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-mdpi/exo_controls_fastforward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-mdpi/exo_controls_fastforward.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-mdpi/exo_controls_fullscreen_enter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-mdpi/exo_controls_fullscreen_enter.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-mdpi/exo_controls_fullscreen_exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-mdpi/exo_controls_fullscreen_exit.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-mdpi/exo_controls_next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-mdpi/exo_controls_next.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-mdpi/exo_controls_pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-mdpi/exo_controls_pause.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-mdpi/exo_controls_play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-mdpi/exo_controls_play.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-mdpi/exo_controls_previous.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-mdpi/exo_controls_previous.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-mdpi/exo_controls_repeat_all.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-mdpi/exo_controls_repeat_all.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-mdpi/exo_controls_repeat_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-mdpi/exo_controls_repeat_off.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-mdpi/exo_controls_repeat_one.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-mdpi/exo_controls_repeat_one.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-mdpi/exo_controls_rewind.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-mdpi/exo_controls_rewind.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-mdpi/exo_controls_shuffle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-mdpi/exo_controls_shuffle.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-xhdpi/exo_controls_fastforward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-xhdpi/exo_controls_fastforward.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-xhdpi/exo_controls_fullscreen_enter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-xhdpi/exo_controls_fullscreen_enter.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-xhdpi/exo_controls_fullscreen_exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-xhdpi/exo_controls_fullscreen_exit.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-xhdpi/exo_controls_next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-xhdpi/exo_controls_next.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-xhdpi/exo_controls_pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-xhdpi/exo_controls_pause.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-xhdpi/exo_controls_play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-xhdpi/exo_controls_play.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-xhdpi/exo_controls_previous.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-xhdpi/exo_controls_previous.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-xhdpi/exo_controls_repeat_all.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-xhdpi/exo_controls_repeat_all.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-xhdpi/exo_controls_repeat_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-xhdpi/exo_controls_repeat_off.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-xhdpi/exo_controls_repeat_one.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-xhdpi/exo_controls_repeat_one.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-xhdpi/exo_controls_rewind.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-xhdpi/exo_controls_rewind.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-xhdpi/exo_controls_shuffle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-xhdpi/exo_controls_shuffle.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-xxhdpi/exo_controls_fastforward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-xxhdpi/exo_controls_fastforward.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-xxhdpi/exo_controls_fullscreen_enter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-xxhdpi/exo_controls_fullscreen_enter.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-xxhdpi/exo_controls_fullscreen_exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-xxhdpi/exo_controls_fullscreen_exit.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-xxhdpi/exo_controls_next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-xxhdpi/exo_controls_next.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-xxhdpi/exo_controls_pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-xxhdpi/exo_controls_pause.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-xxhdpi/exo_controls_play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-xxhdpi/exo_controls_play.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-xxhdpi/exo_controls_previous.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-xxhdpi/exo_controls_previous.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-xxhdpi/exo_controls_repeat_all.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-xxhdpi/exo_controls_repeat_all.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-xxhdpi/exo_controls_repeat_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-xxhdpi/exo_controls_repeat_off.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-xxhdpi/exo_controls_repeat_one.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-xxhdpi/exo_controls_repeat_one.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-xxhdpi/exo_controls_rewind.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-xxhdpi/exo_controls_rewind.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/drawable-xxhdpi/exo_controls_shuffle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/exoplayer/src/main/res/drawable-xxhdpi/exo_controls_shuffle.png -------------------------------------------------------------------------------- /exoplayer/src/main/res/layout/exo_player_control_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/layout/exo_player_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/values-az-rAZ/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | "Öncəki trek" 19 | "Növbəti trek" 20 | "Pauza" 21 | "Oyun" 22 | "Dayandır" 23 | "Geri sarıma" 24 | "Sürətlə irəli" 25 | "Bütün təkrarlayın" 26 | "Təkrar bir" 27 | "Heç bir təkrar" 28 | "Qarışdır" 29 | 30 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/values-be-rBY/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | "Папярэдні трэк" 19 | "Наступны трэк" 20 | "Прыпыніць" 21 | "Прайграць" 22 | "Спыніць" 23 | "Перамотка назад" 24 | "Перамотка ўперад" 25 | "Паўтарыць усё" 26 | "Паўтараць ні" 27 | "Паўтарыць адзін" 28 | "Перамяшаць" 29 | 30 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/values-bn-rBD/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | "পূর্ববর্তী ট্র্যাক" 19 | "পরবর্তী ট্র্যাক" 20 | "বিরাম দিন" 21 | "প্লে করুন" 22 | "থামান" 23 | "গুটিয়ে নিন" 24 | "দ্রুত সামনে এগোন" 25 | "সবগুলির পুনরাবৃত্তি করুন" 26 | "একটিরও পুনরাবৃত্তি করবেন না" 27 | "একটির পুনরাবৃত্তি করুন" 28 | "অদলবদল" 29 | 30 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/values-bs-rBA/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | "Prethodna numera" 19 | "Sljedeća numera" 20 | "Pauziraj" 21 | "Reproduciraj" 22 | "Zaustavi" 23 | "Premotaj" 24 | "Ubrzaj" 25 | "Ponovite sve" 26 | "Ne ponavljaju" 27 | "Ponovite jedan" 28 | "Izmiješaj" 29 | 30 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/values-et-rEE/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | "Eelmine lugu" 19 | "Järgmine lugu" 20 | "Peata" 21 | "Esita" 22 | "Peata" 23 | "Keri tagasi" 24 | "Keri edasi" 25 | "Korda kõike" 26 | "Ära korda midagi" 27 | "Korda ühte" 28 | "Esita juhuslikus järjekorras" 29 | 30 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/values-eu-rES/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | "Aurreko pista" 19 | "Hurrengo pista" 20 | "Pausatu" 21 | "Erreproduzitu" 22 | "Gelditu" 23 | "Atzeratu" 24 | "Aurreratu" 25 | "Errepikatu guztiak" 26 | "Ez errepikatu" 27 | "Errepikatu bat" 28 | "Erreproduzitu ausaz" 29 | 30 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/values-gl-rES/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | "Pista anterior" 19 | "Seguinte pista" 20 | "Pausar" 21 | "Reproducir" 22 | "Deter" 23 | "Rebobinar" 24 | "Avance rápido" 25 | "Repetir todo" 26 | "Non repetir" 27 | "Repetir un" 28 | "Reprodución aleatoria" 29 | 30 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/values-gu-rIN/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | "પહેલાનો ટ્રૅક" 19 | "આગલો ટ્રૅક" 20 | "થોભો" 21 | "ચલાવો" 22 | "રોકો" 23 | "રીવાઇન્ડ કરો" 24 | "ઝડપી ફોરવર્ડ કરો" 25 | "બધા પુનરાવર્તન કરો" 26 | "કંઈ પુનરાવર્તન કરો" 27 | "એક પુનરાવર્તન કરો" 28 | "શફલ કરો" 29 | 30 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/values-hy-rAM/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | "Նախորդը" 19 | "Հաջորդը" 20 | "Դադարեցնել" 21 | "Նվագարկել" 22 | "Դադարեցնել" 23 | "Հետ փաթաթել" 24 | "Արագ առաջ անցնել" 25 | "կրկնել այն ամենը" 26 | "Չկրկնել" 27 | "Կրկնել մեկը" 28 | "Խառնել" 29 | 30 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/values-is-rIS/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | "Fyrra lag" 19 | "Næsta lag" 20 | "Hlé" 21 | "Spila" 22 | "Stöðva" 23 | "Spóla til baka" 24 | "Spóla áfram" 25 | "Endurtaka allt" 26 | "Endurtaka ekkert" 27 | "Endurtaka eitt" 28 | "Stokka" 29 | 30 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/values-ka-rGE/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | "წინა ჩანაწერი" 19 | "შემდეგი ჩანაწერი" 20 | "პაუზა" 21 | "დაკვრა" 22 | "შეწყვეტა" 23 | "უკან გადახვევა" 24 | "წინ გადახვევა" 25 | "გამეორება ყველა" 26 | "გაიმეორეთ არცერთი" 27 | "გაიმეორეთ ერთი" 28 | "არეულად დაკვრა" 29 | 30 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/values-kk-rKZ/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | "Алдыңғы трек" 19 | "Келесі трек" 20 | "Кідірту" 21 | "Ойнату" 22 | "Тоқтату" 23 | "Кері айналдыру" 24 | "Жылдам алға айналдыру" 25 | "Барлығын қайталау" 26 | "Ешқайсысын қайталамау" 27 | "Біреуін қайталау" 28 | "Кездейсоқ ретпен ойнату" 29 | 30 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/values-km-rKH/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | "បទ​មុន" 19 | "បទ​បន្ទាប់" 20 | "ផ្អាក" 21 | "ចាក់" 22 | "បញ្ឈប់" 23 | "ខា​ថយក្រោយ" 24 | "ទៅ​មុខ​​​រហ័ស" 25 | "ធ្វើ​ម្ដង​ទៀត​ទាំងអស់" 26 | "មិន​ធ្វើ​ឡើង​វិញ" 27 | "ធ្វើ​​ឡើងវិញ​ម្ដង" 28 | "ច្របល់" 29 | 30 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/values-kn-rIN/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | "ಹಿಂದಿನ ಟ್ರ್ಯಾಕ್" 19 | "ಮುಂದಿನ ಟ್ರ್ಯಾಕ್" 20 | "ವಿರಾಮಗೊಳಿಸು" 21 | "ಪ್ಲೇ ಮಾಡು" 22 | "ನಿಲ್ಲಿಸು" 23 | "ರಿವೈಂಡ್ ಮಾಡು" 24 | "ವೇಗವಾಗಿ ಮುಂದಕ್ಕೆ" 25 | "ಎಲ್ಲವನ್ನು ಪುನರಾವರ್ತಿಸಿ" 26 | "ಯಾವುದನ್ನೂ ಪುನರಾವರ್ತಿಸಬೇಡಿ" 27 | "ಒಂದನ್ನು ಪುನರಾವರ್ತಿಸಿ" 28 | "ಬೆರೆಸು" 29 | 30 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/values-ky-rKG/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | "Мурунку трек" 19 | "Кийинки трек" 20 | "Тындыруу" 21 | "Ойнотуу" 22 | "Токтотуу" 23 | "Артка түрүү" 24 | "Алдыга түрүү" 25 | "Баарын кайталоо" 26 | "Эч бирин кайталабоо" 27 | "Бирөөнү кайталоо" 28 | "Аралаштыруу" 29 | 30 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/values-lo-rLA/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | "​ເພງ​ກ່ອນ​ໜ້າ" 19 | "​ເພງ​ຕໍ່​ໄປ" 20 | "ຢຸດຊົ່ວຄາວ" 21 | "ຫຼິ້ນ" 22 | "ຢຸດ" 23 | "​ຣີ​​ວາຍກັບ" 24 | "ເລື່ອນ​ໄປ​ໜ້າ" 25 | "ຫຼິ້ນ​ຊ້ຳ​ທັງ​ໝົດ" 26 | "​ບໍ່ຫຼິ້ນ​ຊ້ຳ" 27 | "ຫຼິ້ນ​ຊ້ຳ" 28 | "ຫຼີ້ນແບບສຸ່ມ" 29 | 30 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/values-mk-rMK/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | "Претходна песна" 19 | "Следна песна" 20 | "Пауза" 21 | "Пушти" 22 | "Запри" 23 | "Премотај назад" 24 | "Брзо премотај напред" 25 | "Повтори ги сите" 26 | "Не повторувај ниту една" 27 | "Повтори една" 28 | "По случаен избор" 29 | 30 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/values-ml-rIN/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | "മുമ്പത്തെ ട്രാക്ക്" 19 | "അടുത്ത ട്രാക്ക്" 20 | "താൽക്കാലികമായി നിർത്തുക" 21 | "പ്ലേ ചെയ്യുക" 22 | "നിര്‍ത്തുക" 23 | "റിവൈൻഡുചെയ്യുക" 24 | "വേഗത്തിലുള്ള കൈമാറൽ" 25 | "എല്ലാം ആവർത്തിക്കുക" 26 | "ഒന്നും ആവർത്തിക്കരുത്" 27 | "ഒന്ന് ആവർത്തിക്കുക" 28 | "ഷഫിൾ ചെയ്യുക" 29 | 30 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/values-mn-rMN/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | "Өмнөх трек" 19 | "Дараагийн трек" 20 | "Түр зогсоох" 21 | "Тоглуулах" 22 | "Зогсоох" 23 | "Буцааж хураах" 24 | "Хурдан урагшлуулах" 25 | "Бүгдийг давтах" 26 | "Алийг нь ч давтахгүй" 27 | "Нэгийг давтах" 28 | "Холих" 29 | 30 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/values-mr-rIN/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | "मागील ट्रॅक" 19 | "पुढील ट्रॅक" 20 | "विराम द्या" 21 | "प्ले करा" 22 | "थांबा" 23 | "रिवाईँड करा" 24 | "फास्ट फॉरवर्ड करा" 25 | "सर्व पुनरावृत्ती करा" 26 | "काहीही पुनरावृत्ती करू नका" 27 | "एक पुनरावृत्ती करा" 28 | "शफल करा" 29 | 30 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/values-ms-rMY/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | "Lagu sebelumnya" 19 | "Lagu seterusnya" 20 | "Jeda" 21 | "Main" 22 | "Berhenti" 23 | "Gulung semula" 24 | "Mara laju" 25 | "Ulang semua" 26 | "Tiada ulangan" 27 | "Ulangan" 28 | "Rombak" 29 | 30 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/values-my-rMM/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | "ယခင် တစ်ပုဒ်" 19 | "နောက် တစ်ပုဒ်" 20 | "ခဏရပ်ရန်" 21 | "ဖွင့်ရန်" 22 | "ရပ်ရန်" 23 | "ပြန်ရစ်ရန်" 24 | "ရှေ့သို့ သွားရန်" 25 | "အားလုံး ထပ်တလဲလဲဖွင့်ရန်" 26 | "ထပ်တလဲလဲမဖွင့်ရန်" 27 | "တစ်ခုအား ထပ်တလဲလဲဖွင့်ရန်" 28 | "မွှေနှောက်ဖွင့်ရန်" 29 | 30 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/values-ne-rNP/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | "अघिल्लो ट्रयाक" 19 | "अर्को ट्रयाक" 20 | "रोक्नुहोस्" 21 | "चलाउनुहोस्" 22 | "रोक्नुहोस्" 23 | "दोहोर्याउनुहोस्" 24 | "फास्ट फर्वार्ड" 25 | "सबै दोहोर्याउनुहोस्" 26 | "कुनै पनि नदोहोर्याउनुहोस्" 27 | "एउटा दोहोर्याउनुहोस्" 28 | "मिसाउनुहोस्" 29 | 30 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/values-pa-rIN/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | "ਪਿਛਲਾ ਟਰੈਕ" 19 | "ਅਗਲਾ ਟਰੈਕ" 20 | "ਰੋਕੋ" 21 | "ਪਲੇ ਕਰੋ" 22 | "ਰੋਕੋ" 23 | "ਰੀਵਾਈਂਡ ਕਰੋ" 24 | "ਅੱਗੇ ਭੇਜੋ" 25 | "ਸਭ ਨੂੰ ਦੁਹਰਾਓ" 26 | "ਕੋਈ ਵੀ ਨਹੀਂ ਦੁਹਰਾਓ" 27 | "ਇੱਕ ਦੁਹਰਾਓ" 28 | "ਸ਼ੱਫਲ" 29 | 30 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/values-pt-rBR/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | "Faixa anterior" 19 | "Próxima faixa" 20 | "Pausar" 21 | "Reproduzir" 22 | "Parar" 23 | "Retroceder" 24 | "Avançar" 25 | "Repetir tudo" 26 | "Não repetir" 27 | "Repetir um" 28 | "Reproduzir aleatoriamente" 29 | 30 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/values-si-rLK/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | "පෙර ගීතය" 19 | "ඊළඟ ගීතය" 20 | "විරාමය" 21 | "ධාවනය කරන්න" 22 | "නතර කරන්න" 23 | "නැවත ඔතන්න" 24 | "වේගයෙන් ඉදිරියට යන" 25 | "සියලු නැවත" 26 | "කිසිවක් නැවත" 27 | "නැවත නැවත එක්" 28 | "කලවම් කරන්න" 29 | 30 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/values-sq-rAL/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | "Kënga e mëparshme" 19 | "Kënga tjetër" 20 | "Pauzë" 21 | "Luaj" 22 | "Ndalo" 23 | "Kthehu pas" 24 | "Përparo me shpejtësi" 25 | "Përsërit të gjithë" 26 | "Përsëritni asnjë" 27 | "Përsëritni një" 28 | "Përziej" 29 | 30 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/values-ta-rIN/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | "முந்தைய ட்ராக்" 19 | "அடுத்த ட்ராக்" 20 | "இடைநிறுத்து" 21 | "இயக்கு" 22 | "நிறுத்து" 23 | "மீண்டும் காட்டு" 24 | "வேகமாக முன்செல்" 25 | "அனைத்தையும் மீண்டும் இயக்கு" 26 | "எதையும் மீண்டும் இயக்காதே" 27 | "ஒன்றை மட்டும் மீண்டும் இயக்கு" 28 | "குலை" 29 | 30 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/values-te-rIN/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | "మునుపటి ట్రాక్" 19 | "తదుపరి ట్రాక్" 20 | "పాజ్ చేయి" 21 | "ప్లే చేయి" 22 | "ఆపివేయి" 23 | "రివైండ్ చేయి" 24 | "వేగంగా ఫార్వార్డ్ చేయి" 25 | "అన్నీ పునరావృతం చేయి" 26 | "ఏదీ పునరావృతం చేయవద్దు" 27 | "ఒకదాన్ని పునరావృతం చేయి" 28 | "షఫుల్ చేయి" 29 | 30 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/values-ur-rPK/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | "پچھلا ٹریک" 19 | "اگلا ٹریک" 20 | "موقوف کریں" 21 | "چلائیں" 22 | "روکیں" 23 | "ریوائینڈ کریں" 24 | "تیزی سے فارورڈ کریں" 25 | "سبھی کو دہرائیں" 26 | "کسی کو نہ دہرائیں" 27 | "ایک کو دہرائیں" 28 | "شفل کریں" 29 | 30 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/values-uz-rUZ/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | "Avvalgi musiqa" 19 | "Keyingi musiqa" 20 | "To‘xtatib turish" 21 | "Ijro qilish" 22 | "To‘xtatish" 23 | "Orqaga o‘tkazish" 24 | "Oldinga o‘tkazish" 25 | "Barchasini takrorlash" 26 | "Takrorlamaslik" 27 | "Bir marta takrorlash" 28 | "Tasodifiy tartibda" 29 | 30 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/values/constants.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 71dp 19 | 52dp 20 | 21 | #FFF4F3F0 22 | 23 | 24 | -------------------------------------------------------------------------------- /exoplayer/src/main/res/values/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /exoplayer/src/test/java/com/example/exoplayer/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.example.exoplayer; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | android.enableAapt2=false 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Aug 21 13:59:49 CST 2018 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip 7 | -------------------------------------------------------------------------------- /img/after.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/img/after.png -------------------------------------------------------------------------------- /img/befor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/img/befor.png -------------------------------------------------------------------------------- /img/图解.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liosen/ExoPlayerVideoBlur/02614c49831edfe87fdaf915d0fd71df37f45d9c/img/图解.png -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':exoplayer' 2 | --------------------------------------------------------------------------------