media/libraries
andrewlewis b25d00a795 Retain stream time offsets through codecs
ExoPlayer applies a large time offset to buffers so that, if the input has negative timestamps, generally buffers seen by the decoders should have positive timestamps. Modify how the offset is handled in `Transformer` so that decoders and encoders generally see positive timestamps, by leaving the offset on samples when reading them in the base renderer (remove the code that removed the offset), and then removing the offset when muxing. Also update the frame processor chain and slow motion flattening code to retain the existing behavior after this change (these both need original media presentation timestamps)

Tested via existing end-to-end tests and manually verified that the overlay frame processor shows the expected original media timestamps.

Aside: we don't need the same logic as ExoPlayer to track stream offsets across the decoder yet, because we don't try to handle stream changes during playback in single asset editing. (There is an edge case of multi-period DASH that may not work but I doubt anyone will use that as input to `Transformer` before we change the code to handle multi-asset properly.) In future we should try to refactor interaction with the decoder to use the same code for Transformer and ExoPlayer.
PiperOrigin-RevId: 451846055
2022-05-30 16:45:15 +00:00
..
cast Create new class to store cues and timestamp. 2022-05-24 10:49:48 +01:00
common Wrap framework AudioAttributes in new AudioAttributesV21 class 2022-05-30 16:44:27 +00:00
database Mark all non-public IntDefs as only TYPE_USE 2022-02-21 16:56:36 +00:00
datasource Remove InvalidResponseCodeException#headerFields from the stable API 2022-05-26 11:51:27 +00:00
datasource_cronet Remove references to deprecated DefaultDataSourceFactory from dev guide 2022-03-24 15:13:09 +00:00
datasource_okhttp Workaround for OkHttp Interrupt issues. 2022-05-09 10:59:41 +01:00
datasource_rtmp Remove references to deprecated DefaultDataSourceFactory from dev guide 2022-03-24 15:13:09 +00:00
decoder Expect PresentationTime Discontinuity During Stream Transitions 2022-04-26 14:21:36 +01:00
decoder_av1 Make sure native library loads use correct class loader 2022-02-22 11:25:44 +00:00
decoder_ffmpeg Force CMake version 3.21.0+ for the FFMPEG extension 2022-03-14 13:42:31 +00:00
decoder_flac Make sure native library loads use correct class loader 2022-02-22 11:25:44 +00:00
decoder_opus Make sure native library loads use correct class loader 2022-02-22 11:25:44 +00:00
decoder_vp9 Make sure native library loads use correct class loader 2022-02-22 11:25:44 +00:00
exoplayer Wrap framework AudioAttributes in new AudioAttributesV21 class 2022-05-30 16:44:27 +00:00
exoplayer_dash Rollback of e01bb47263 2022-05-23 17:12:22 +01:00
exoplayer_hls Rollback of e01bb47263 2022-05-23 17:12:22 +01:00
exoplayer_ima Simplify DefaultMediaSourceFactory instantiation in a test 2022-05-30 16:32:59 +00:00
exoplayer_rtsp Rollback of e01bb47263 2022-05-23 17:12:22 +01:00
exoplayer_smoothstreaming Rollback of e01bb47263 2022-05-23 17:12:22 +01:00
exoplayer_workmanager Reformat some javadoc 2022-02-18 14:54:02 +00:00
extractor Refactor MIDI and Flac extractor loaders for deduplication 2022-05-24 10:33:06 +01:00
session Fix typo 2022-05-30 16:43:34 +00:00
test_data Use video passthrough if clipping starts at key frame. 2022-05-30 16:37:19 +00:00
test_exoplayer_playback Move TrackGroupArray back to ExoPlayer 2022-03-17 13:08:56 +00:00
test_session_common Create new class to store cues and timestamp. 2022-05-24 10:49:48 +01:00
test_session_current Migrate leaf listeners of Player to new onCues override 2022-05-24 11:02:03 +01:00
test_utils Fix typos flagged by lint 2022-05-30 16:30:11 +00:00
test_utils_robolectric Migrate leaf listeners of Player to new onCues override 2022-05-24 11:02:03 +01:00
transformer Retain stream time offsets through codecs 2022-05-30 16:45:15 +00:00
ui Migrate leaf listeners of Player to new onCues override 2022-05-24 11:02:03 +01:00
ui_leanback Fixes for some minor misc issues 2021-11-19 14:44:25 +00:00