Skip to content

Commit c2cbb63

Browse files
authored
Merge pull request #210 from androidx/release-1.0.0-beta03
1.0.0-beta03
2 parents 5047581 + 6661b75 commit c2cbb63

File tree

620 files changed

+33382
-9022
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

620 files changed

+33382
-9022
lines changed

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ body:
1717
label: Media3 Version
1818
description: What version of Media3 are you using?
1919
options:
20+
- 1.0.0-beta03
2021
- 1.0.0-beta02
2122
- 1.0.0-beta01
2223
- 1.0.0-alpha03

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,6 @@ extensions/cronet/jniLibs/*
7676
!extensions/cronet/jniLibs/README.md
7777
extensions/cronet/libs/*
7878
!extensions/cronet/libs/README.md
79+
80+
# MIDI extension
81+
extensions/midi/lib

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ all of the information requested in the issue template.
2121

2222
## Pull requests
2323

24-
We will also consider high quality pull requests. These should normally merge
24+
We will also consider high quality pull requests. These should merge
2525
into the `main` branch. Before a pull request can be accepted you must submit
2626
a Contributor License Agreement, as described below.
2727

RELEASENOTES.md

Lines changed: 146 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,145 @@
1-
Release notes
1+
Release notes
2+
3+
### 1.0.0-beta03 (2022-11-22)
4+
5+
This release corresponds to the
6+
[ExoPlayer 2.18.2 release](https://github.com/google/ExoPlayer/releases/tag/r2.18.2).
7+
8+
* Core library:
9+
* Add `ExoPlayer.isTunnelingEnabled` to check if tunneling is enabled for
10+
the currently selected tracks
11+
([#2518](https://github.com/google/ExoPlayer/issues/2518)).
12+
* Add `WrappingMediaSource` to simplify wrapping a single `MediaSource`
13+
([#7279](https://github.com/google/ExoPlayer/issues/7279)).
14+
* Discard back buffer before playback gets stuck due to insufficient
15+
available memory.
16+
* Close the Tracing "doSomeWork" block when offload is enabled.
17+
* Fix session tracking problem with fast seeks in `PlaybackStatsListener`
18+
([#180](https://github.com/androidx/media/issues/180)).
19+
* Send missing `onMediaItemTransition` callback when calling `seekToNext`
20+
or `seekToPrevious` in a single-item playlist
21+
([#10667](https://github.com/google/ExoPlayer/issues/10667)).
22+
* Add `Player.getSurfaceSize` that returns the size of the surface on
23+
which the video is rendered.
24+
* Fix bug where removing listeners during the player release can cause an
25+
`IllegalStateException`
26+
([#10758](https://github.com/google/ExoPlayer/issues/10758)).
27+
* Build:
28+
* Enforce minimum `compileSdkVersion` to avoid compilation errors
29+
([#10684](https://github.com/google/ExoPlayer/issues/10684)).
30+
* Avoid publishing block when included in another gradle build.
31+
* Track selection:
32+
* Prefer other tracks to Dolby Vision if display does not support it.
33+
([#8944](https://github.com/google/ExoPlayer/issues/8944)).
34+
* Downloads:
35+
* Fix potential infinite loop in `ProgressiveDownloader` caused by
36+
simultaneous download and playback with the same `PriorityTaskManager`
37+
([#10570](https://github.com/google/ExoPlayer/pull/10570)).
38+
* Make download notification appear immediately
39+
([#183](https://github.com/androidx/media/pull/183)).
40+
* Limit parallel download removals to 1 to avoid excessive thread creation
41+
([#10458](https://github.com/google/ExoPlayer/issues/10458)).
42+
* Video:
43+
* Try alternative decoder for Dolby Vision if display does not support it.
44+
([#9794](https://github.com/google/ExoPlayer/issues/9794)).
45+
* Audio:
46+
* Use `SingleThreadExecutor` for releasing `AudioTrack` instances to avoid
47+
OutOfMemory errors when releasing multiple players at the same time
48+
([#10057](https://github.com/google/ExoPlayer/issues/10057)).
49+
* Adds `AudioOffloadListener.onExperimentalOffloadedPlayback` for the
50+
AudioTrack offload state.
51+
([#134](https://github.com/androidx/media/issues/134)).
52+
* Make `AudioTrackBufferSizeProvider` a public interface.
53+
* Add `ExoPlayer.setPreferredAudioDevice` to set the preferred audio
54+
output device ([#135](https://github.com/androidx/media/issues/135)).
55+
* Rename `androidx.media3.exoplayer.audio.AudioProcessor` to
56+
`androidx.media3.common.audio.AudioProcessor`.
57+
* Map 8-channel and 12-channel audio to the 7.1 and 7.1.4 channel masks
58+
respectively on all Android versions
59+
([#10701](https://github.com/google/ExoPlayer/issues/10701)).
60+
* Metadata:
61+
* `MetadataRenderer` can now be configured to render metadata as soon as
62+
they are available. Create an instance with
63+
`MetadataRenderer(MetadataOutput, Looper, MetadataDecoderFactory,
64+
boolean)` to specify whether the renderer will output metadata early or
65+
in sync with the player position.
66+
* DRM:
67+
* Work around a bug in the Android 13 ClearKey implementation that returns
68+
a non-empty but invalid license URL.
69+
* Fix `setMediaDrmSession failed: session not opened` error when switching
70+
between DRM schemes in a playlist (e.g. Widevine to ClearKey).
71+
* Text:
72+
* CEA-608: Ensure service switch commands on field 2 are handled correctly
73+
([#10666](https://github.com/google/ExoPlayer/issues/10666)).
74+
* DASH:
75+
* Parse `EventStream.presentationTimeOffset` from manifests
76+
([#10460](https://github.com/google/ExoPlayer/issues/10460)).
77+
* UI:
78+
* Use current overrides of the player as preset in
79+
`TrackSelectionDialogBuilder`
80+
([#10429](https://github.com/google/ExoPlayer/issues/10429)).
81+
* Session:
82+
* Ensure commands are always executed in the correct order even if some
83+
require asynchronous resolution
84+
([#85](https://github.com/androidx/media/issues/85)).
85+
* Add `DefaultMediaNotificationProvider.Builder` to build
86+
`DefaultMediaNotificationProvider` instances. The builder can configure
87+
the notification ID, the notification channel ID and the notification
88+
channel name used by the provider. Also, add method
89+
`DefaultMediaNotificationProvider.setSmallIcon(int)` to set the
90+
notifications small icon.
91+
([#104](https://github.com/androidx/media/issues/104)).
92+
* Ensure commands sent before `MediaController.release()` are not dropped
93+
([#99](https://github.com/androidx/media/issues/99)).
94+
* `SimpleBitmapLoader` can load bitmap from `file://` URIs
95+
([#108](https://github.com/androidx/media/issues/108)).
96+
* Fix assertion that prevents `MediaController` to seek over an ad in a
97+
period ([#122](https://github.com/androidx/media/issues/122)).
98+
* When playback ends, the `MediaSessionService` is stopped from the
99+
foreground and a notification is shown to restart playback of the last
100+
played media item
101+
([#112](https://github.com/androidx/media/issues/112)).
102+
* Don't start a foreground service with a pending intent for pause
103+
([#167](https://github.com/androidx/media/issues/167)).
104+
* Manually hide the 'badge' associated with the notification created by
105+
`DefaultNotificationProvider` on API 26 and API 27 (the badge is
106+
automatically hidden on API 28+)
107+
([#131](https://github.com/androidx/media/issues/131)).
108+
* Fix bug where a second binder connection from a legacy MediaSession to a
109+
Media3 MediaController causes IllegalStateExceptions
110+
([#49](https://github.com/androidx/media/issues/49)).
111+
* RTSP:
112+
* Add H263 fragmented packet handling
113+
([#119](https://github.com/androidx/media/pull/119)).
114+
* Add support for MP4A-LATM
115+
([#162](https://github.com/androidx/media/pull/162)).
116+
* IMA:
117+
* Add timeout for loading ad information to handle cases where the IMA SDK
118+
gets stuck loading an ad
119+
([#10510](https://github.com/google/ExoPlayer/issues/10510)).
120+
* Prevent skipping mid-roll ads when seeking to the end of the content
121+
([#10685](https://github.com/google/ExoPlayer/issues/10685)).
122+
* Correctly calculate window duration for live streams with server-side
123+
inserted ads, for example IMA DAI
124+
([#10764](https://github.com/google/ExoPlayer/issues/10764)).
125+
* FFmpeg extension:
126+
* Add newly required flags to link FFmpeg libraries with NDK 23.1.7779620
127+
and above ([#9933](https://github.com/google/ExoPlayer/issues/9933)).
128+
* AV1 extension:
129+
* Update CMake version to avoid incompatibilities with the latest Android
130+
Studio releases
131+
([#9933](https://github.com/google/ExoPlayer/issues/9933)).
132+
* Cast extension:
133+
* Implement `getDeviceInfo()` to be able to identify `CastPlayer` when
134+
controlling playback with a `MediaController`
135+
([#142](https://github.com/androidx/media/issues/142)).
136+
* Transformer:
137+
* Add muxer watchdog timer to detect when generating an output sample is
138+
too slow.
139+
* Remove deprecated symbols:
140+
* Remove `Transformer.Builder.setOutputMimeType(String)`. This feature has
141+
been removed. The MIME type will always be MP4 when the default muxer is
142+
used.
2143

3144
### 1.0.0-beta02 (2022-07-21)
4145

@@ -32,6 +173,8 @@ This release corresponds to the
32173
* RTSP:
33174
* Add VP8 fragmented packet handling
34175
([#110](https://github.com/androidx/media/pull/110)).
176+
* Support frames/fragments in VP9
177+
([#115](https://github.com/androidx/media/pull/115)).
35178
* Leanback extension:
36179
* Listen to `playWhenReady` changes in `LeanbackAdapter`
37180
([10420](https://github.com/google/ExoPlayer/issues/10420)).
@@ -266,6 +409,8 @@ This release corresponds to the
266409
`DEFAULT_TRACK_SELECTOR_PARAMETERS_WITHOUT_CONTEXT` otherwise.
267410
* Remove constructor `DefaultTrackSelector(ExoTrackSelection.Factory)`.
268411
Use `DefaultTrackSelector(Context, ExoTrackSelection.Factory)` instead.
412+
* Remove `Transformer.Builder.setContext`. The `Context` should be passed
413+
to the `Transformer.Builder` constructor instead.
269414

270415
### 1.0.0-alpha03 (2022-03-14)
271416

common_library_config.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ android {
2222
targetSdkVersion project.ext.targetSdkVersion
2323
consumerProguardFiles 'proguard-rules.txt'
2424
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
25+
aarMetadata {
26+
minCompileSdk = project.ext.compileSdkVersion
27+
}
2528
}
2629

2730
compileOptions {

constants.gradle

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,18 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414
project.ext {
15-
releaseVersion = '1.0.0-beta02'
16-
releaseVersionCode = 1_000_000_1_02
15+
releaseVersion = '1.0.0-beta03'
16+
releaseVersionCode = 1_000_000_1_03
1717
minSdkVersion = 16
18-
appTargetSdkVersion = 29
18+
appTargetSdkVersion = 33
19+
// API version before restricting local file access.
20+
// https://developer.android.com/training/data-storage/app-specific
21+
mainDemoAppTargetSdkVersion = 29
1922
// Upgrading this requires [Internal ref: b/193254928] to be fixed, or some
2023
// additional robolectric config.
2124
targetSdkVersion = 30
22-
compileSdkVersion = 32
23-
dexmakerVersion = '2.28.1'
25+
compileSdkVersion = 33
26+
dexmakerVersion = '2.28.3'
2427
junitVersion = '4.13.2'
2528
// Use the same Guava version as the Android repo:
2629
// https://cs.android.com/android/platform/superproject/+/master:external/guava/METADATA
@@ -40,7 +43,7 @@ project.ext {
4043
androidxConstraintLayoutVersion = '2.0.4'
4144
androidxCoreVersion = '1.7.0'
4245
androidxFuturesVersion = '1.1.0'
43-
androidxMediaVersion = '1.4.3'
46+
androidxMediaVersion = '1.6.0'
4447
androidxMedia2Version = '1.2.0'
4548
androidxMultidexVersion = '2.0.1'
4649
androidxRecyclerViewVersion = '1.2.1'

core_settings.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ project(modulePrefix + 'lib-extractor').projectDir = new File(rootDir, 'librarie
7878
include modulePrefix + 'lib-cast'
7979
project(modulePrefix + 'lib-cast').projectDir = new File(rootDir, 'libraries/cast')
8080

81+
include modulePrefix + 'lib-effect'
82+
project(modulePrefix + 'lib-effect').projectDir = new File(rootDir, 'libraries/effect')
83+
8184
include modulePrefix + 'lib-transformer'
8285
project(modulePrefix + 'lib-transformer').projectDir = new File(rootDir, 'libraries/transformer')
8386

demos/cast/src/main/AndroidManifest.xml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,13 @@
2222

2323
<uses-sdk/>
2424

25-
<application android:label="@string/application_name" android:icon="@mipmap/ic_launcher"
26-
android:largeHeap="true" android:allowBackup="false">
25+
<application
26+
android:name="androidx.multidex.MultiDexApplication"
27+
android:label="@string/application_name"
28+
android:icon="@mipmap/ic_launcher"
29+
android:largeHeap="true"
30+
android:allowBackup="false"
31+
android:taskAffinity="">
2732

2833
<meta-data android:name="com.google.android.gms.cast.framework.OPTIONS_PROVIDER_CLASS_NAME"
2934
android:value="androidx.media3.cast.DefaultCastOptionsProvider"/>

demos/gl/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ dependencies {
5252
implementation project(modulePrefix + 'lib-exoplayer-smoothstreaming')
5353
implementation project(modulePrefix + 'lib-ui')
5454
implementation 'androidx.annotation:annotation:' + androidxAnnotationVersion
55+
implementation 'androidx.multidex:multidex:' + androidxMultidexVersion
5556
compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion
5657
compileOnly 'org.checkerframework:checker-compat-qual:' + checkerframeworkCompatVersion
5758
}

demos/gl/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<uses-sdk/>
2323

2424
<application
25+
android:name="androidx.multidex.MultiDexApplication"
2526
android:allowBackup="false"
2627
android:icon="@mipmap/ic_launcher"
2728
android:label="@string/application_name">

demos/gl/src/main/java/androidx/media3/demo/gl/BitmapOverlayVideoProcessor.java

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import androidx.media3.common.C;
3030
import androidx.media3.common.util.GlProgram;
3131
import androidx.media3.common.util.GlUtil;
32+
import androidx.media3.common.util.Log;
3233
import java.io.IOException;
3334
import java.util.Locale;
3435
import javax.microedition.khronos.opengles.GL10;
@@ -41,6 +42,7 @@
4142
/* package */ final class BitmapOverlayVideoProcessor
4243
implements VideoProcessingGLSurfaceView.VideoProcessor {
4344

45+
private static final String TAG = "BitmapOverlayVP";
4446
private static final int OVERLAY_WIDTH = 512;
4547
private static final int OVERLAY_HEIGHT = 256;
4648

@@ -85,6 +87,9 @@ public void initialize() {
8587
/* fragmentShaderFilePath= */ "bitmap_overlay_video_processor_fragment.glsl");
8688
} catch (IOException e) {
8789
throw new IllegalStateException(e);
90+
} catch (GlUtil.GlException e) {
91+
Log.e(TAG, "Failed to initialize the shader program", e);
92+
return;
8893
}
8994
program.setBufferAttribute(
9095
"aFramePosition",
@@ -119,7 +124,11 @@ public void draw(int frameTexture, long frameTimestampUs, float[] transformMatri
119124
GLES20.glBindTexture(GL10.GL_TEXTURE_2D, textures[0]);
120125
GLUtils.texSubImage2D(
121126
GL10.GL_TEXTURE_2D, /* level= */ 0, /* xoffset= */ 0, /* yoffset= */ 0, overlayBitmap);
122-
GlUtil.checkGlError();
127+
try {
128+
GlUtil.checkGlError();
129+
} catch (GlUtil.GlException e) {
130+
Log.e(TAG, "Failed to populate the texture", e);
131+
}
123132

124133
// Run the shader program.
125134
GlProgram program = checkNotNull(this.program);
@@ -128,16 +137,28 @@ public void draw(int frameTexture, long frameTimestampUs, float[] transformMatri
128137
program.setFloatUniform("uScaleX", bitmapScaleX);
129138
program.setFloatUniform("uScaleY", bitmapScaleY);
130139
program.setFloatsUniform("uTexTransform", transformMatrix);
131-
program.bindAttributesAndUniforms();
140+
try {
141+
program.bindAttributesAndUniforms();
142+
} catch (GlUtil.GlException e) {
143+
Log.e(TAG, "Failed to update the shader program", e);
144+
}
132145
GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT);
133146
GLES20.glDrawArrays(GLES20.GL_TRIANGLE_STRIP, /* first= */ 0, /* count= */ 4);
134-
GlUtil.checkGlError();
147+
try {
148+
GlUtil.checkGlError();
149+
} catch (GlUtil.GlException e) {
150+
Log.e(TAG, "Failed to draw a frame", e);
151+
}
135152
}
136153

137154
@Override
138155
public void release() {
139156
if (program != null) {
140-
program.delete();
157+
try {
158+
program.delete();
159+
} catch (GlUtil.GlException e) {
160+
Log.e(TAG, "Failed to delete the shader program", e);
161+
}
141162
}
142163
}
143164
}

demos/gl/src/main/java/androidx/media3/demo/gl/MainActivity.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616
package androidx.media3.demo.gl;
1717

18+
import static androidx.media3.common.util.Assertions.checkNotNull;
19+
1820
import android.app.Activity;
1921
import android.content.Context;
2022
import android.content.Intent;
@@ -83,7 +85,8 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
8385
VideoProcessingGLSurfaceView videoProcessingGLSurfaceView =
8486
new VideoProcessingGLSurfaceView(
8587
context, requestSecureSurface, new BitmapOverlayVideoProcessor(context));
86-
FrameLayout contentFrame = findViewById(R.id.exo_content_frame);
88+
checkNotNull(playerView);
89+
FrameLayout contentFrame = playerView.findViewById(R.id.exo_content_frame);
8790
contentFrame.addView(videoProcessingGLSurfaceView);
8891
this.videoProcessingGLSurfaceView = videoProcessingGLSurfaceView;
8992
}

demos/gl/src/main/java/androidx/media3/demo/gl/VideoProcessingGLSurfaceView.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import androidx.media3.common.Format;
2929
import androidx.media3.common.util.Assertions;
3030
import androidx.media3.common.util.GlUtil;
31+
import androidx.media3.common.util.Log;
3132
import androidx.media3.common.util.TimedValueQueue;
3233
import androidx.media3.exoplayer.ExoPlayer;
3334
import androidx.media3.exoplayer.video.VideoFrameMetadataListener;
@@ -70,6 +71,7 @@ public interface VideoProcessor {
7071
}
7172

7273
private static final int EGL_PROTECTED_CONTENT_EXT = 0x32C0;
74+
private static final String TAG = "VPGlSurfaceView";
7375

7476
private final VideoRenderer renderer;
7577
private final Handler mainHandler;
@@ -239,7 +241,11 @@ public VideoRenderer(VideoProcessor videoProcessor) {
239241

240242
@Override
241243
public synchronized void onSurfaceCreated(GL10 gl, EGLConfig config) {
242-
texture = GlUtil.createExternalTexture();
244+
try {
245+
texture = GlUtil.createExternalTexture();
246+
} catch (GlUtil.GlException e) {
247+
Log.e(TAG, "Failed to create an external texture", e);
248+
}
243249
surfaceTexture = new SurfaceTexture(texture);
244250
surfaceTexture.setOnFrameAvailableListener(
245251
surfaceTexture -> {

0 commit comments

Comments
 (0)