77 Commits

Author SHA1 Message Date
olly
0fc53f6e37 Fix Flac test + bring v2 fully in sync (I think!).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=120335929
2016-06-15 19:39:10 +01:00
olly
7638bea016 Bring V2 ogg extractor up to date.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=120332721
2016-06-15 19:39:10 +01:00
olly
2e0518f47b Apply Android studio code analysis suggestions.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=120326293
2016-06-15 19:39:09 +01:00
eguven
a7d7859478 Shared super class for LibflacAudioTrackRenderer and LibopusAudioTrackRenderer.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=120225655
2016-06-15 19:39:09 +01:00
andrewlewis
d7ac074088 Fix Android NDK links.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=120107182
2016-06-15 19:39:08 +01:00
olly
628a209b9b Add Eclipse projects for extension tests.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=119843448
2016-06-15 19:39:08 +01:00
andrewlewis
e4ee19513c Remove ExoPlayer.STATE_PREPARING.
prepare(SampleSource) is renamed to setSource(SampleSource). The player
immediately transitions to STATE_BUFFERING when the source is set, at which
point doSomeWork is called.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=119838825
2016-06-15 19:39:08 +01:00
eguven
2b0f2ec3bc Add opus and flac tests to MOE
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=119759105
2016-06-15 19:39:07 +01:00
eguven
ba7b1b7bf1 Copy vp9 extension v1 -> v2
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=119748182
2016-06-15 19:39:07 +01:00
andrewlewis
e594eccd4d Merge SampleSourceTrackRenderer into TrackRenderer.
TrackRenderer and SampleSourceTrackRenderer both now use a TrackStream
so they can be merged.

(This may also be useful for adding playlist support, in case TrackStreams need
to be replaced during playback.)
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=119743228
2016-06-15 19:39:07 +01:00
olly
730e4ac953 Remove workaround for FrameworkSampleSource.
FrameworkSampleSource will still be useful for audio, where
sample interleaving isn't an issue. We could optionally add
a "don't wait for first frame" boolean to the video renderer
if we *really* need to keep some form of this workaround in
place, but I'd rather not do so for now.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=119733224
2016-06-15 19:39:07 +01:00
andrewlewis
72025d7ea5 Add cd command to FLAC readme. Set executable bit in opus.
Also add jni/flac directory to .gitignore.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=119730955
2016-06-15 19:39:07 +01:00
eguven
192f566a1b Copy opus extension v1->v2
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=119643009
2016-06-15 19:39:07 +01:00
eguven
087cf9546f Copy main/extensions/flac -> experimental/extensions/flac
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=119544516
2016-06-15 19:39:06 +01:00
olly
e9fcbafcb4 Make OkHttp extension work in Eclipse/[].
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=118921673
2016-06-15 19:39:05 +01:00
olly
e4d815d164 Add OkHttp extension to V2.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=118775995
2016-06-15 19:39:05 +01:00
olly
cdae9ac5d2 ExoPlayer V2 Refactor - Steps 1/2.
GitHub note - Apologies for the cryptic change descriptions,
they relate to a design doc that's not externally visible.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=113043764
2016-06-15 18:53:40 +01:00
olly
da2752137b Add proguard config for Opus extension.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=112776882
2016-01-22 13:58:57 +00:00
olly
d804446b34 Implement seeking via a single code path.
When a seek is performed, renderers currently perform the
actions that they need to take in two places: Some changes
are performed in seekTo implementations. Other changes are
performed when discontinuities are read from the source.

In HLS we need to perform what is effectively a seek
originating in the source. To support this, this CL allows
discontinuities read from the source to modify the playback
position. All actions that renderers perform as a result
of a seek are moved to be performed when a discontinuity is
received.

Best way to understand CL:
- Look at SampleSource interface change and then at the
  concrete implementations, to make sure they've been
  changed properly.
- Look at SampleSourceTrackRenderer change.
- Look at concrete renderers. The general pattern is that
  code previously performed in seekTo and READ_DISCONTINUITY
  is merged into onDiscontinuity().

Note: This will be further untangled in V2.

Issue #676
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=112720746
2016-01-22 12:11:16 +00:00
Oliver Woodman
00068c8954 Add vpx extension playback test. 2016-01-22 11:36:21 +00:00
olly
949317a41a Minor tweaks to merged pull requests.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=112161860
2016-01-14 18:12:28 +00:00
vigneshv
bb55fd8e47 opus: Add CodecCounters support
Fixes Issue #1047
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=111708934
2016-01-14 17:08:25 +00:00
Yu-Hsuan Lin
9cdd246a55 support okhttp3 2016-01-07 19:50:15 +00:00
andrewlewis
f4c10dc560 Don't hold a lock while rendering in VpxRenderer. 2015-12-17 12:15:48 +00:00
andrewlewis
8d6c4b8eb5 Only allow one input buffer to be dequeued at a time.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=110238340
2015-12-16 20:41:51 +00:00
andrewlewis
3a958ed522 Only return true from isReady after rendering.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=110231626
2015-12-16 20:41:51 +00:00
anjalibh
0b0baa28be Expose and support colorspaces in LibVpx.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=109851975
2015-12-14 10:39:42 +00:00
anjalibh
e487fe6fa7 Allow custom VPX output buffer renderers.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=109832096
2015-12-14 10:39:38 +00:00
vigneshv
00f84fc85f Move APP_PLATFORM to Application.mk
Fixes github Issue #944
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=109563981
2015-12-07 19:55:17 +00:00
vigneshv
e4cf93d04c Fix libyuv clone URL
Fixes Github issue #1015
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=109559497
2015-12-07 19:55:13 +00:00
vigneshv
42984653fb Update libyuv URL in vp9 extension instructions
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=109559103
2015-12-07 19:55:02 +00:00
andrewlewis
c685e27972 Fix {Opus,Vpx}DecoderWrapper flush() buffer handling.
Currently, input/output buffers can 'leak' if they are dequeued then the decoder
is flush()ed. This happens if an input buffer is dequeued then a discontinuity
is read, or an output buffer is dequeued and is early. If this happens several
times, no more buffers are available.

This change makes flush() work like MediaCodec: it returns all dequeued
input/output buffers to the codec. Keeping the behavior in line with MediaCodec
might make it easier to factor out a common decoder interface in the future.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=109054178
2015-12-02 17:01:48 +00:00
Oliver Woodman
9925f8f9b8 Add proguard config for VP9 extension 2015-11-27 18:09:56 +00:00
Oliver Woodman
81040e8d23 Remove stray author tag 2015-11-27 15:56:46 +00:00
Oliver Woodman
0236831e48 Remove author tags. 2015-11-25 17:07:09 +00:00
Oliver Woodman
dc94e44b1f Make output mode a tri-state flag instead of binary
This CL fixes the case when a surface is attached *after* playback
has started.
2015-11-25 17:03:11 +00:00
Oliver Woodman
57ee90a96c Clean up AudioTrack. 2015-11-17 16:29:42 +00:00
Oliver Woodman
80d699920c If we have an output buffer, we're ready. 2015-11-17 16:21:03 +00:00
Oliver Woodman
830229c821 Fix Libopus renderer's isReady to take into account outputBuffer avail. 2015-11-17 15:45:42 +00:00
Oliver Woodman
62a89ae90c tweak javadoc 2015-10-27 18:57:26 +00:00
Oliver Woodman
dd4d4e8f7e Add libopus/libvpx availability checks 2015-10-27 18:36:24 +00:00
Oliver Woodman
c0f0cbcb7a Move to target API level 23 2015-10-26 15:02:32 +00:00
Oliver Woodman
d8b1f9efcc Add API to get the version of native decoders
Add API to get the version of underlying libvpx and libopus
decoders. Also update the demo app to show the version in the UI.
2015-10-26 14:53:27 +00:00
Oliver Woodman
5b81612c3b Tweak okhttp package name 2015-10-01 17:33:02 +01:00
Oliver Woodman
ba6cb05e0a Update ReadMe files. 2015-09-29 21:55:51 +01:00
Oliver Woodman
0ff03e40bd Okhttp extension - Update gradle build 2015-09-29 21:27:37 +01:00
Oliver Woodman
af1ffeccc7 OkHttp extension - Add eclipse project 2015-09-29 21:24:45 +01:00
Oliver Woodman
434a2733a3 OkHttp extension modifications.
1. Change package name (rm "datasource")
2. Require injection of OkHttpClient through all constructors, and
   remove allowCrossProtocolRedirect/connectTimeout/readTimeout
   constructor arguments. The client should be configured with these
   prior to injection.
3. Fix code style to be consistent with the project.
4. Simplify call to get contentLength. I'm pretty sure okhttp returns
   the correct value when gzip is enabled, so there's no need to check
   this in the data source.
5. Misc cleanups.
2015-09-29 21:10:34 +01:00
ojw28
2112bc24e3 Merge pull request #735 from b95505017/okhttp_http_data_source
Add an extension that provide DataSource using OkHttp
2015-09-29 21:06:46 +01:00
Oliver Woodman
e96e618046 Clean up expansion of sample buffers.
- The old approach was technically incorrect, because the checks
were "capacity < sampleSize" and hence neglected the fact that
the buffer position may be greater than 0 (e.g. if the caller
wants to prefix the sample with some additional data).

- Also proactively throw an exception if the buffer is too small,
rather than wait for the failure when we actually do the write.
2015-09-28 20:23:45 +01:00