129 Commits

Author SHA1 Message Date
claincly
8fe0cd34a7 Fix outdated RtpDataLoadable javadoc
PiperOrigin-RevId: 469443086
(cherry picked from commit 5cf166c15767eaac16ce29df9d08d589946d6cae)
2022-08-23 13:41:49 +00:00
claincly
218e97fadf Handle initial RTSP seek
PiperOrigin-RevId: 469143613
(cherry picked from commit c611435521a868d6675556f05bd2e325355b7e02)
2022-08-22 10:39:48 +00:00
claincly
e9e7fb4e8a Factor out RTP timestamp to sample time method
PiperOrigin-RevId: 465337074
(cherry picked from commit a1be6d6eb39a40b91f9dee0524d13e5ac805246f)
2022-08-04 16:49:03 +00:00
claincly
19f6b5422b Clean up NOP constructor lines in RTP readers
PiperOrigin-RevId: 465067191
(cherry picked from commit 13e9ec9959b5dbd6f2f107f43d0a3a032ae8a717)
2022-08-03 15:51:48 +00:00
Marc Baechinger
6f3fe59936 Merge pull request #115 from ittiam-systems:rtp_vp9fix
PiperOrigin-RevId: 463852948
(cherry picked from commit 9ed04ef84223e2cc54aab8318b4b64be288d264a)
2022-10-19 15:19:39 +00:00
claincly
9953b288c1 Fix VP8 reader fragment packet size
Merging c37a767fdf

PiperOrigin-RevId: 463826373
(cherry picked from commit 4d5d592c351c75acef5779dfd2f1c7da560eeda7)
2022-07-28 13:50:54 +00:00
Oliver Woodman
867c997542 Merge pull request #119 from ittiam-systems:rtp_h263_test_and_fix
PiperOrigin-RevId: 463146426
(cherry picked from commit 92fc065bcdc230747fb1769132023ebbe9147af5)
2022-07-25 22:30:28 +01:00
ibaker
57dbf22bfd Annotate methods that always return this with @CanIgnoreReturnValue
It's always safe to ignore the result of these methods, because the
caller already has a reference to the returned value.

PiperOrigin-RevId: 462388947
(cherry picked from commit 21cab6124de7b65f1af016cfc260555fa0b6e738)
2022-07-21 16:24:07 +01:00
claincly
c691f461da Fix two typos in RtpVp8Reader and test
PiperOrigin-RevId: 460662425
(cherry picked from commit 918550060f461c35d90854a4d75b2713b1d95aaf)
2022-07-13 09:27:06 +00:00
Rohit Singh
344ac7bde0 Merge pull request #110 from ittiam-systems:rtp_vp8_test
PiperOrigin-RevId: 460513413
(cherry picked from commit c75b6a3a88e7e6ff2f5f25e334cfaae5567783ea)
2022-07-13 17:54:35 +00:00
Marc Baechinger
0a4684d045 Merge pull request #63 from ittiam-systems:rtp-h263
PiperOrigin-RevId: 455347182
(cherry picked from commit e220f5377bf8e72454218e8c13e297f0257bc49a)
2022-06-16 11:41:28 +00:00
Marc Baechinger
56079ba84e Merge pull request #69 from ittiam-systems:rtp_amr_test
PiperOrigin-RevId: 453905355
(cherry picked from commit 8a31e33d41c198279e7c6008fcad43f39202c837)
2022-06-09 18:08:16 +00:00
Marc Baechinger
68054de481 Merge pull request #53 from ittiam-systems:rtp_opus
PiperOrigin-RevId: 453490088
(cherry picked from commit ade3452e17773ae553f3e8ab6b0f6e6e6d6acc17)
2022-06-09 18:08:16 +00:00
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