If a MediaPeriod uses a Loadable, then there are typically
reference chains of the form:
LoadingThread[GCroot]->Loadable->MediaPeriod->Player
Where the player is the MediaPeriod callback. When the
player is released, this reference chain prevents the
player from being GC'd until Loadable cancellation
completes, which may not always be fast. This in turn
will typically prevent the application's activity from
being GC'd, since it'll normally be registered as a
listener on the player (directly or indirectly via
something like a view).
This change mitigates the issue by removing references
that the MediaPeriod holds back to the player. The
MediaPeriod will still not be eligible for GC, but the
player and application activity will be, which in most
cases will be most of the leak (in terms of size).
Issue: #4249
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199143646
This happens when the device screen is locked.
This fixes a previous attempt to fix the problem.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199130325
This helps to use the AnalyticsCollector without SimpleExoPlayer. Currently,
that may be problematic, if the contructor needs the player, but in order to
create the player, one already needs the AnalyticsCollector as a listener for
the renderers.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199105012
This simplifies Loadable implementations, and also removes the
possibility of an incorrect Loadable implementation causing the
wrong Loader.Callback method being called (perviously, for the
correct method to be called, we relied on isLoadCanceled being
implemented correctly).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198871133
There is the small (but unlikely) chance that the uids clash because the
Objects have the same hash code.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198855724
The bug here was that we'd create a VideoFrameReleaseTimeHelper
using whatever context DefaultRenderersFactory has, and it would
then hold a reference to that context via DisplayManager. A leak
could then occur if the player outlived the life of the context
used to create it (which would be strange/unusual, but not
impossible).
Issue: #4249
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198747599
As highlighted by the ref'd issue, we can end up with
memory leaks if Loadable.load implementations take a long
time to return upon cancelation. This change cuts off one
of the two problematic reference chains.
This doesn't do much about the ref'd issue, since there's
a second reference chain that's much harder to deal with:
Thread->LoadTask->loadable. But since it's easy just to
cut this one off, I figure it makes sense to do so.
Issue: #4249
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198735386
This makes the requirement that all calls are made on one thread more
explicit and also mentions this in the Getting Started guide.
Issue:#4278
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198694579
Set content length and redirect uri in a single transaction.
New: Fixed the code where DataSpec.uri is set to null in []
Automated g4 rollback of changelist 196765970.
*** Reason for rollback ***
Fixed the code where DataSpec.uri is set to null in []
*** Original change description ***
Automated g4 rollback of changelist 194932235.
*** Reason for rollback ***
This CL breaks the playability of Mango's offlined progressive videos.
*** Original change description ***
Set content length and redirect uri in a single transaction
NORELNOTES=true
NO_BUG
***
***
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198370211
When the player state is changed from an event listener callback, we may
get recursive listener notifications. These recursions can produce a wrong
order, skip or duplicate updates, and send different notifications to
different listeners.
This change serializes listener notifications by clustering all update data
in a helper data class and adding the updates to a queue which can be handled
in a loop on the outer layer of the recursion.
As playWhenReady updates also reference the current playbackInfo, we need to
redirect the listener notifcations for setPlayWhenReady to the same queue.
Issue:#4276
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198031431
The implementation keeps track of QoE sessions and forwards events to the
field reporters of the relevant sessions.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199269574
If a MediaPeriod uses a Loadable, then there are typically
reference chains of the form:
LoadingThread[GCroot]->Loadable->MediaPeriod->Player
Where the player is the MediaPeriod callback. When the
player is released, this reference chain prevents the
player from being GC'd until Loadable cancellation
completes, which may not always be fast. This in turn
will typically prevent the application's activity from
being GC'd, since it'll normally be registered as a
listener on the player (directly or indirectly via
something like a view).
This change mitigates the issue by removing references
that the MediaPeriod holds back to the player. The
MediaPeriod will still not be eligible for GC, but the
player and application activity will be, which in most
cases will be most of the leak (in terms of size).
Issue: #4249
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199143646
This happens when the device screen is locked.
This fixes a previous attempt to fix the problem.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199130325
This will allow the player to obtain the transfer listener used by the
bandwidth meter in order to pass it automatically to the relevant data
sources.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199124880
This helps to use the AnalyticsCollector without SimpleExoPlayer. Currently,
that may be problematic, if the contructor needs the player, but in order to
create the player, one already needs the AnalyticsCollector as a listener for
the renderers.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199105012
A CacheKeyFactory can be passed to the CacheDataSource constructor, allowing clients to dynamically generate a custom cache key for any given upstream uri.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198878723
This simplifies Loadable implementations, and also removes the
possibility of an incorrect Loadable implementation causing the
wrong Loader.Callback method being called (perviously, for the
correct method to be called, we relied on isLoadCanceled being
implemented correctly).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198871133
There is the small (but unlikely) chance that the uids clash because the
Objects have the same hash code.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198855724
This adds an optional parameter to ConcatenatingMediaSource to prepare
child sources only lazily when are needed. This is helpful for long playlists
of media sources with manifests to prevent a lot of simultaneous manifest
loads.
Issue:#3972
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198855676
This allows injection of custom implementations and configuration of
DefaultHlsPlaylistTracker without modifying the HlsMediaSource interface.
Issue:#2844
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198846607
The bug here was that we'd create a VideoFrameReleaseTimeHelper
using whatever context DefaultRenderersFactory has, and it would
then hold a reference to that context via DisplayManager. A leak
could then occur if the player outlived the life of the context
used to create it (which would be strange/unusual, but not
impossible).
Issue: #4249
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198747599
As highlighted by the ref'd issue, we can end up with
memory leaks if Loadable.load implementations take a long
time to return upon cancelation. This change cuts off one
of the two problematic reference chains.
This doesn't do much about the ref'd issue, since there's
a second reference chain that's much harder to deal with:
Thread->LoadTask->loadable. But since it's easy just to
cut this one off, I figure it makes sense to do so.
Issue: #4249
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198735386
This makes the requirement that all calls are made on one thread more
explicit and also mentions this in the Getting Started guide.
Issue:#4278
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198694579
Set content length and redirect uri in a single transaction.
New: Fixed the code where DataSpec.uri is set to null in []
Automated g4 rollback of changelist 196765970.
*** Reason for rollback ***
Fixed the code where DataSpec.uri is set to null in []
*** Original change description ***
Automated g4 rollback of changelist 194932235.
*** Reason for rollback ***
This CL breaks the playability of Mango's offlined progressive videos.
*** Original change description ***
Set content length and redirect uri in a single transaction
NORELNOTES=true
NO_BUG
***
***
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198370211
When the player state is changed from an event listener callback, we may
get recursive listener notifications. These recursions can produce a wrong
order, skip or duplicate updates, and send different notifications to
different listeners.
This change serializes listener notifications by clustering all update data
in a helper data class and adding the updates to a queue which can be handled
in a loop on the outer layer of the recursion.
As playWhenReady updates also reference the current playbackInfo, we need to
redirect the listener notifcations for setPlayWhenReady to the same queue.
Issue:#4276
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198031431
Use PixelCopy API for the first SurfaceCapturer implementation. This supports
devices from API 24+.
Github: #3609.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=197732711
Some module/extensions couldn't use the static test so far because all files
needed to be put on the blacklist. To ensure the test it set up for all
modules, this fixes at least one file for each of the modules.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=197731449