116 Commits

Author SHA1 Message Date
ibaker
ecea2b9e90 Rollback of e705999cf3
*** Original commit ***

Rollback of 57182ac7bd

*** Original commit ***

Remove `@Nullable` from `MediaSource.Factory` setters

The null-behaviour of these methods creates a minimization footgun,
because **any** call to these setters will prevent R8 from removing
the default implementation (even if it's never used by the app) - this
is because R8 can't tell the default imple...

***

PiperOrigin-RevId: 450453325
2022-05-23 17:12:22 +01:00
ibaker
274f3a13a2 Rollback of 57182ac7bd32db54d11fd41e21338a2bbfaf043c
*** Original commit ***

Remove `@Nullable` from `MediaSource.Factory` setters

The null-behaviour of these methods creates a minimization footgun,
because **any** call to these setters will prevent R8 from removing
the default implementation (even if it's never used by the app) - this
is because R8 can't tell the default implementation is only used if the
parameter is `null`.

******

PiperOrigin-RevId: 450410833
2022-05-23 13:01:22 +01:00
ibaker
57182ac7bd Remove @Nullable from MediaSource.Factory setters
The null-behaviour of these methods creates a minimization footgun,
because **any** call to these setters will prevent R8 from removing
the default implementation (even if it's never used by the app) - this
is because R8 can't tell the default implementation is only used if the
parameter is `null`.

PiperOrigin-RevId: 450386627
2022-05-24 12:16:55 +01:00
Ian Baker
f28f8026ff Merge pull request #64 from ittiam-systems:rtp-vp9
PiperOrigin-RevId: 448978892
2022-05-24 11:13:17 +01:00
claincly
010a00e458 Add support for static RTP payload types.
Some RTP foramts are statically assigned, so they don't have the rtpmap
attribute. Create the missing rtpmap attribute in this case.

PiperOrigin-RevId: 448239724
2022-05-24 10:48:29 +01:00
ibaker
1809a0b9f9 Migrate usages from C.TYPE_* to C.CONTENT_TYPE_*
PiperOrigin-RevId: 446156308
2022-05-09 12:00:38 +01:00
claincly
5d1af64605 Ignore mandatory SDP fields as ExoPlayer doesn't use them
Issue: google/ExoPlayer#10049
PiperOrigin-RevId: 444833508
2022-05-09 10:27:25 +01:00
claincly
85bd080a17 Catch unchecked exception in RtspSessionTiming parsing.
Issue: google/ExoPlayer#10165
#minor-release
PiperOrigin-RevId: 443653894
2022-04-26 16:41:11 +01:00
claincly
084dfc04c5 Fix Basic authentication header
Issue: google/ExoPlayer#9544

The header must include the word "Basic", but the word is missing.

#minor-release

PiperOrigin-RevId: 443386880
2022-04-26 16:20:01 +01:00
claincly
4938028703 Support colon (:) in RTSP timing.
Some RTSP servers use `npt`: notation rather than `npt=`

PiperOrigin-RevId: 439333319
2022-04-07 17:13:25 +01:00
Ian Baker
349c72aba7 Merge pull request #35 from ittiam-systems:rtp-mpeg4
PiperOrigin-RevId: 438000682
2022-04-07 15:13:10 +01:00
Ian Baker
930709e592 Merge pull request #56 from ittiam-systems:rtp_wav
PiperOrigin-RevId: 437783926
2022-04-07 15:02:40 +01:00
Ian Baker
d76658e6fc Merge pull request #47 from ittiam-systems:rtp-vp8
PiperOrigin-RevId: 437710223
2022-04-07 14:31:07 +01:00
Ian Baker
a4c05fab7d Merge pull request #46 from ittiam-systems:rtp_amr
PiperOrigin-RevId: 437274290
2022-04-07 14:24:15 +01:00
Ian Baker
e36ea3b77d Merge pull request #36 from ittiam-systems:rtp-h265
PiperOrigin-RevId: 429566102
2022-02-18 16:46:09 +00:00
tonihei
17050e8b59 Fix the position of IntDefs to match TYPE_USE
#minor-release

PiperOrigin-RevId: 427131569
2022-02-08 12:34:06 +00:00
olly
2db8807aac Revert of b19ced30c4c2853b09af3382b86f84c31b3a5af5
PiperOrigin-RevId: 426996878
2022-02-08 12:33:53 +00:00
ibaker
b19ced30c4 Fix the position of IntDefs to match TYPE_USE
#minor-release

PiperOrigin-RevId: 426855255
2022-02-07 11:17:31 +00:00
ibaker
0c2e77daca Mark all non-public IntDefs as only TYPE_USE
This only changes IntDefs that cannot be used by apps because they're
either private or package-private.

A follow-up change will fix the positions of existing usages to match
this new config.

#minor-release

PiperOrigin-RevId: 426372273
2022-02-04 15:07:19 +00:00
ibaker
032df64f15 Fix parameter comments
PiperOrigin-RevId: 425874534
2022-02-04 09:52:19 +00:00
olly
319ef63510 Use ImmutableMap.Builder.buildOrThrow() instead of deprecated build().
More info: ​go/immutable-map-buildorthrow-lsc

NOTE: if the source of truth for this code is *NOT* `third_party`, please let me know and I'll revert this CL (and please consider upstreaming this change yourself).

#inlineme

Tested:
    TAP for global presubmit queue passed after automated deflaking of failures: http://mondo/deflaker/run/530857d2-45cb-4069-a234-48c5efe945f1 http://mondo/deflaker/run/0dce4296-e6bb-42d2-8b64-b393f45b6ad3
    http://test/OCL:425453729:BASE:425451020:1643699365244:811c1a24
PiperOrigin-RevId: 425616165
2022-02-02 10:36:25 +00:00
claincly
cd076f7622 Ignore invalid RTP-Info header value.
Issue: google/ExoPlayer#9619

(and a few other GH issues related to invalid RTP-Info header)

PiperOrigin-RevId: 423283017
2022-01-25 19:29:51 +00:00
claincly
5a60db3328 Handle when RTSP track timing is not available.
Issue: google/ExoPlayer#9775

We got a few issues for this on GH already. Some RTSP servers do not provide
track timing in PLAY responses, or the timings are invalid.

Missing timing means the RTSP stream is not seekable. Added method to
1. Update the timeline that seek is not possible
2. Report read discontinuity so that playback can start from the beginning.

PiperOrigin-RevId: 423281439
2022-01-25 19:26:04 +00:00
claincly
ea6d0ceb44 Use RTSP server for RTSP auth realm.
PiperOrigin-RevId: 420053894
2022-01-07 16:46:25 +00:00
claincly
40ecb6c195 Prefers DIGEST when RTSP servers sends both BASIC and DIGEST auth info.
Issue: google/ExoPlayer#9800

Added test for RTSP authentication.

PiperOrigin-RevId: 420048821
2022-01-07 16:42:46 +00:00
claincly
90912b0710 Allow continuous seeking.
PiperOrigin-RevId: 419629912
2022-01-05 12:41:50 +00:00
ibaker
5e8d1eb7f3 Add MediaSource.Factory and deprecate MediaSourceFactory
This more closely matches the pattern we have for all implementations
except DefaultMediaSourceFactory (e.g. ProgressiveMediaSource.Factory)
and other factory interfaces like (Http)DataSource.Factory.

PiperOrigin-RevId: 417826803
2022-01-04 12:51:47 +00:00
ibaker
bb1357b678 Delete deprecated methods from MediaSourceFactory
Some have been deprecated since 2.13.0
([commit](5b9fa7d7d9)):
* `setDrmSessionManager(DrmSessionManager)`
* `setDrmHttpDataSourceFactory(HttpDataSource.Factory)`
* `setDrmUserAgent(String)`

And the rest have been deprecated since 2.12.0
([commit](d1bbd3507a)):
* `setStreamKeys(List<String>)`
* `createMediaSource(Uri)`

PiperOrigin-RevId: 417622794
2021-12-21 17:26:06 +00:00
Oliver Woodman
e288f9428f Merge pull request #9606 from ened:rtsp-socket-factory
PiperOrigin-RevId: 413751821
2021-12-06 12:36:42 +00:00
claincly
fb37572bcb Remove the check for dynamic payload type.
Issue: google/ExoPlayer#9744

We do not rely on the payload type to determine the sample MIME type, we depend
on the SDP message, so it's worthless checking the payload type.

After removing the line, a server can use payload type 35 (an unassigned
payload type) for H264; while normally H264 requires payload type >= 96).

PiperOrigin-RevId: 413658076
2021-12-06 12:29:40 +00:00
tonihei
d53d51d57c Add optional id to TrackGroup.
This allows to give TrackGroups an identifier. The underlying goal is
to provide a way to make otherwise identical TrackGroups
distinguishable.

Also set this id in all internal sources that may produce identical
TrackGroups in certain edge cases.

Issue: google/ExoPlayer#9718
PiperOrigin-RevId: 413430719
2021-12-02 15:21:33 +00:00
claincly
e158f9ab0e
Merge branch 'dev-v2' into rtsp-socket-factory 2021-11-24 11:21:34 +00:00
claincly
f401d46229 Fix sequence number calculation logic.
Issue: google/ExoPlayer#9697

Before, the `MAX_SEQUENCE_NUMBER` is 65535, such that the logic to get the next
sequence number:

`previousSeqNumber + 1 % MAX_SEQUENCE_NUMBER`

yields 0 when `previousSeqNumber` is 65534. However, the next sequence number
should be 65535.

PiperOrigin-RevId: 410530098
2021-11-18 13:35:13 +00:00
Sebastian Roth
c09fa7560d PR feedback 2021-11-10 16:41:48 +00:00
Sebastian Roth
d89e18fe6d Merge branch 'dev-v2' into rtsp-socket-factory 2021-11-05 11:09:48 +00:00
tonihei
7b9b878aeb Add missing RetentionPolicy for IntDef
PiperOrigin-RevId: 407162673
2021-11-03 15:12:19 +00:00
Sebastian Roth
0830c06cd7 PR feedback 2021-11-02 14:58:15 +00:00
ibaker
1c824561c6 Migrate callers of deprecated C.java methods to Util.java
#minor-release

PiperOrigin-RevId: 406166670
2021-10-29 11:31:50 +01:00
Andrew Lewis
933e207b3e Update to androidx.media3
PiperOrigin-RevId: 405656499
2021-10-27 09:12:46 +01:00
andrewlewis
0ad1cdbfa1 Tidy READMEs
PiperOrigin-RevId: 405598530
2021-10-26 14:08:21 +01:00
Sebastian Roth
4001592c93 Add a test 2021-10-26 12:58:03 +01:00
Sebastian Roth
c14a9c09b3 docs 2021-10-25 16:11:38 +01:00
Sebastian Roth
8e24d29040 Make the RTSP SocketFactory configurable 2021-10-25 13:13:08 +01:00
olly
d601875452 Rename releaseArtifact to releaseArtifactId
PiperOrigin-RevId: 404059404
2021-10-18 22:45:47 +01:00
olly
18cf01cda6 Move DataSource utils into a DataSourceUtil class
PiperOrigin-RevId: 403910535
2021-10-18 15:25:43 +01:00
samrobinson
3c19850ed3 Migrate library usages of SimpleExoPlayer to ExoPlayer.
PiperOrigin-RevId: 402853522
2021-10-14 12:03:11 +01:00
jaewan
11becc050a Separate command code for prepare() and stop()
PiperOrigin-RevId: 402757305
2021-10-13 19:58:02 +01:00
olly
e160649d9c README updates for MediaSource, DataSource and UI modules
PiperOrigin-RevId: 401793145
2021-10-09 18:21:54 +01:00
ibaker
e4221c3844 Rollback of ed23b2905b
*** Original commit ***

Migrate callers of ExoPlayer.Builder#build() to buildExoPlayer()

An upcoming change will update build() to return Player.

PiperOrigin-RevId: 401468532
2021-10-07 21:53:57 +01:00
ibaker
ed23b2905b Migrate callers of ExoPlayer.Builder#build() to buildExoPlayer()
An upcoming change will update build() to return Player.

PiperOrigin-RevId: 399382297
2021-09-28 16:38:20 +01:00