Closed louiewh closed 2 years ago
The log uses DefaultAudioSink
2022-06-20 10:53:05.527 29397-29397/com.example.karaoke D/KaraokeAudioSink: KaraokeAudioSink:com.google.android.exoplayer2.audio.DefaultAudioSink@5586f89 2022-06-20 10:53:05.528 29397-29397/com.example.karaoke D/KaraokeAudioSink: setListener:com.google.android.exoplayer2.audio.MediaCodecAudioRenderer$AudioSinkListener@5996b8e 2022-06-20 10:53:05.536 29397-29427/com.example.karaoke D/KaraokeAudioSink: setAudioSessionId:681 2022-06-20 10:53:05.608 29397-29397/com.example.karaoke D/KaraokeEventLogger: surfaceSize [eventTime=0.07, mediaPos=0.00, window=0, 1600, 2227] 2022-06-20 10:53:06.584 29397-29397/com.example.karaoke D/KaraokeEventLogger: timeline [eventTime=1.04, mediaPos=0.00, window=0, periodCount=1, windowCount=1, reason=PLAYLIST_CHANGED 2022-06-20 10:53:06.585 29397-29397/com.example.karaoke D/KaraokeEventLogger: period [?] 2022-06-20 10:53:06.585 29397-29397/com.example.karaoke D/KaraokeEventLogger: window [?, seekable=false, dynamic=true] 2022-06-20 10:53:06.585 29397-29397/com.example.karaoke D/KaraokeEventLogger: ] 2022-06-20 10:53:06.587 29397-29397/com.example.karaoke D/KaraokeEventLogger: mediaItem [eventTime=1.05, mediaPos=0.00, window=0, reason=PLAYLIST_CHANGED] 2022-06-20 10:53:06.592 29397-29397/com.example.karaoke D/KaraokeEventLogger: state [eventTime=1.05, mediaPos=0.00, window=0, BUFFERING] 2022-06-20 10:53:06.600 29397-29397/com.example.karaoke D/KaraokeEventLogger: playWhenReady [eventTime=1.06, mediaPos=0.00, window=0, true, USER_REQUEST] 2022-06-20 10:53:06.617 29397-29397/com.example.karaoke D/KaraokeEventLogger: timeline [eventTime=1.08, mediaPos=0.00, window=0, period=0, periodCount=1, windowCount=1, reason=SOURCE_UPDATE 2022-06-20 10:53:06.618 29397-29397/com.example.karaoke D/KaraokeEventLogger: period [?] 2022-06-20 10:53:06.618 29397-29397/com.example.karaoke D/KaraokeEventLogger: window [?, seekable=false, dynamic=false] 2022-06-20 10:53:06.618 29397-29397/com.example.karaoke D/KaraokeEventLogger: ] 2022-06-20 10:53:06.618 29397-29397/com.example.karaoke D/KaraokeEventLogger: loading [eventTime=1.08, mediaPos=0.00, window=0, period=0, true] 2022-06-20 10:53:07.270 29397-29397/com.example.karaoke D/KaraokeEventLogger: timeline [eventTime=1.73, mediaPos=0.00, window=0, period=0, periodCount=1, windowCount=1, reason=SOURCE_UPDATE 2022-06-20 10:53:07.270 29397-29397/com.example.karaoke D/KaraokeEventLogger: period [230.74] 2022-06-20 10:53:07.270 29397-29397/com.example.karaoke D/KaraokeEventLogger: window [230.74, seekable=true, dynamic=false] 2022-06-20 10:53:07.270 29397-29397/com.example.karaoke D/KaraokeEventLogger: ] 2022-06-20 10:53:07.313 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(2, null, null, audio/mp4a-latm, mp4a.40.2, -1, en, [-1, -1, -1.0], [2, 48000]) 2022-06-20 10:53:07.314 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:false 2022-06-20 10:53:07.314 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(null, null, null, audio/raw, null, -1, null, [-1, -1, -1.0], [2, 48000]) 2022-06-20 10:53:07.314 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:true 2022-06-20 10:53:07.314 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(2, null, null, audio/mp4a-latm, mp4a.40.2, -1, en, [-1, -1, -1.0], [2, 48000]) 2022-06-20 10:53:07.314 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:false 2022-06-20 10:53:07.315 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(2, null, null, audio/mp4a-latm, mp4a.40.2, -1, en, [-1, -1, -1.0], [2, 48000]) 2022-06-20 10:53:07.315 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:false 2022-06-20 10:53:07.315 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(null, null, null, audio/raw, null, -1, null, [-1, -1, -1.0], [2, 48000]) 2022-06-20 10:53:07.315 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:true 2022-06-20 10:53:07.315 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(2, null, null, audio/mp4a-latm, mp4a.40.2, -1, en, [-1, -1, -1.0], [2, 48000]) 2022-06-20 10:53:07.315 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:false 2022-06-20 10:53:07.315 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(1, null, null, audio/mp4a-latm, mp4a.40.2, -1, und, [-1, -1, -1.0], [2, 44100]) 2022-06-20 10:53:07.315 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:false 2022-06-20 10:53:07.315 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(null, null, null, audio/raw, null, -1, null, [-1, -1, -1.0], [2, 44100]) 2022-06-20 10:53:07.315 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:true 2022-06-20 10:53:07.315 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(1, null, null, audio/mp4a-latm, mp4a.40.2, -1, und, [-1, -1, -1.0], [2, 44100]) 2022-06-20 10:53:07.315 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:false 2022-06-20 10:53:07.316 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(1, null, null, audio/mp4a-latm, mp4a.40.2, -1, und, [-1, -1, -1.0], [2, 44100]) 2022-06-20 10:53:07.316 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:false 2022-06-20 10:53:07.316 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(null, null, null, audio/raw, null, -1, null, [-1, -1, -1.0], [2, 44100]) 2022-06-20 10:53:07.316 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:true 2022-06-20 10:53:07.316 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(1, null, null, audio/mp4a-latm, mp4a.40.2, -1, und, [-1, -1, -1.0], [2, 44100]) 2022-06-20 10:53:07.316 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:false 2022-06-20 10:53:07.316 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(1, null, null, audio/mp4a-latm, mp4a.40.2, -1, und, [-1, -1, -1.0], [2, 44100]) 2022-06-20 10:53:07.316 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:false 2022-06-20 10:53:07.316 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(null, null, null, audio/raw, null, -1, null, [-1, -1, -1.0], [2, 44100]) 2022-06-20 10:53:07.316 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:true 2022-06-20 10:53:07.316 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(1, null, null, audio/mp4a-latm, mp4a.40.2, -1, und, [-1, -1, -1.0], [2, 44100]) 2022-06-20 10:53:07.316 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:false 2022-06-20 10:53:07.317 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(1, null, null, audio/mp4a-latm, mp4a.40.2, -1, und, [-1, -1, -1.0], [2, 44100]) 2022-06-20 10:53:07.317 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:false 2022-06-20 10:53:07.317 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(null, null, null, audio/raw, null, -1, null, [-1, -1, -1.0], [2, 44100]) 2022-06-20 10:53:07.317 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:true 2022-06-20 10:53:07.317 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(1, null, null, audio/mp4a-latm, mp4a.40.2, -1, und, [-1, -1, -1.0], [2, 44100]) 2022-06-20 10:53:07.317 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:false 2022-06-20 10:53:07.320 29397-29427/com.example.karaoke D/KaraokeAudioSink: disableTunneling: 2022-06-20 10:53:07.320 29397-29427/com.example.karaoke D/KaraokeAudioSink: flush: 2022-06-20 10:53:07.320 29397-29397/com.example.karaoke D/KaraokeEventLogger: videoEnabled [eventTime=1.78, mediaPos=0.00, window=0, period=0] 2022-06-20 10:53:07.321 29397-29397/com.example.karaoke D/KaraokeEventLogger: audioEnabled [eventTime=1.78, mediaPos=0.00, window=0, period=0] 2022-06-20 10:53:07.323 29397-29397/com.example.karaoke D/KaraokeEventLogger: tracks [eventTime=1.78, mediaPos=0.00, window=0, period=0 2022-06-20 10:53:07.323 29397-29397/com.example.karaoke D/KaraokeEventLogger: MediaCodecVideoRenderer [ 2022-06-20 10:53:07.323 29397-29397/com.example.karaoke D/KaraokeEventLogger: Group:0, adaptive_supported=N/A [ 2022-06-20 10:53:07.323 29397-29397/com.example.karaoke D/KaraokeEventLogger: [X] Track:0, id=1, mimeType=video/avc, codecs=avc1.640028, res=1920x1080, fps=25.0, supported=YES 2022-06-20 10:53:07.323 29397-29397/com.example.karaoke D/KaraokeEventLogger: ] 2022-06-20 10:53:07.323 29397-29397/com.example.karaoke D/KaraokeEventLogger: ] 2022-06-20 10:53:07.324 29397-29397/com.example.karaoke D/KaraokeEventLogger: MediaCodecAudioRenderer [ 2022-06-20 10:53:07.324 29397-29397/com.example.karaoke D/KaraokeEventLogger: Group:0, adaptive_supported=N/A [ 2022-06-20 10:53:07.324 29397-29397/com.example.karaoke D/KaraokeEventLogger: [ ] Track:0, id=2, mimeType=audio/mp4a-latm, codecs=mp4a.40.2, channels=2, sample_rate=48000, language=en, supported=YES 2022-06-20 10:53:07.324 29397-29397/com.example.karaoke D/KaraokeEventLogger: ] 2022-06-20 10:53:07.324 29397-29397/com.example.karaoke D/KaraokeEventLogger: Group:1, adaptive_supported=N/A [ 2022-06-20 10:53:07.324 29397-29397/com.example.karaoke D/KaraokeEventLogger: [ ] Track:0, id=1, mimeType=audio/mp4a-latm, codecs=mp4a.40.2, channels=2, sample_rate=44100, language=und, supported=YES 2022-06-20 10:53:07.324 29397-29397/com.example.karaoke D/KaraokeEventLogger: ] 2022-06-20 10:53:07.324 29397-29397/com.example.karaoke D/KaraokeEventLogger: Group:2, adaptive_supported=N/A [ 2022-06-20 10:53:07.324 29397-29397/com.example.karaoke D/KaraokeEventLogger: [X] Track:0, id=1, mimeType=audio/mp4a-latm, codecs=mp4a.40.2, channels=2, sample_rate=44100, language=und, supported=YES 2022-06-20 10:53:07.324 29397-29397/com.example.karaoke D/KaraokeEventLogger: ] 2022-06-20 10:53:07.324 29397-29397/com.example.karaoke D/KaraokeEventLogger: Metadata [ 2022-06-20 10:53:07.324 29397-29397/com.example.karaoke D/KaraokeEventLogger: TALB: description=null: value= 2022-06-20 10:53:07.324 29397-29397/com.example.karaoke D/KaraokeEventLogger: TPE1: description=null: value=周杰伦 2022-06-20 10:53:07.324 29397-29397/com.example.karaoke D/KaraokeEventLogger: ----: domain=com.apple.iTunes, description=cdec 2022-06-20 10:53:07.324 29397-29397/com.example.karaoke D/KaraokeEventLogger: ----: domain=com.apple.iTunes, description=iTunSMPB 2022-06-20 10:53:07.324 29397-29397/com.example.karaoke D/KaraokeEventLogger: TIT2: description=null: value=夜曲 2022-06-20 10:53:07.324 29397-29397/com.example.karaoke D/KaraokeEventLogger: TSSE: description=null: value=Nero AAC codec / 1.5.4.0 2022-06-20 10:53:07.324 29397-29397/com.example.karaoke D/KaraokeEventLogger: ] 2022-06-20 10:53:07.324 29397-29397/com.example.karaoke D/KaraokeEventLogger: ] 2022-06-20 10:53:07.324 29397-29397/com.example.karaoke D/KaraokeEventLogger: TextRenderer [] 2022-06-20 10:53:07.324 29397-29397/com.example.karaoke D/KaraokeEventLogger: MetadataRenderer [] 2022-06-20 10:53:07.324 29397-29397/com.example.karaoke D/KaraokeEventLogger: CameraMotionRenderer [] 2022-06-20 10:53:07.324 29397-29397/com.example.karaoke D/KaraokeEventLogger: ] 2022-06-20 10:53:07.328 29397-29397/com.example.karaoke D/KaraokeEventLogger: downstreamFormat [eventTime=1.79, mediaPos=0.00, window=0, period=0, id=1, mimeType=video/avc, codecs=avc1.640028, res=1920x1080, fps=25.0] 2022-06-20 10:53:07.358 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(1, null, null, audio/mp4a-latm, mp4a.40.2, -1, und, [-1, -1, -1.0], [2, 44100]) 2022-06-20 10:53:07.358 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:false 2022-06-20 10:53:07.359 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(1, null, null, audio/mp4a-latm, mp4a.40.2, -1, und, [-1, -1, -1.0], [2, 44100]) 2022-06-20 10:53:07.359 29397-29427/com.example.karaoke D/KaraokeAudioSink: supportsFormat:false 2022-06-20 10:53:07.359 29397-29397/com.example.karaoke D/KaraokeEventLogger: videoDecoderInitialized [eventTime=1.82, mediaPos=0.00, window=0, period=0, OMX.qcom.video.decoder.avc] 2022-06-20 10:53:07.360 29397-29397/com.example.karaoke D/KaraokeEventLogger: videoInputFormat [eventTime=1.82, mediaPos=0.00, window=0, period=0, id=1, mimeType=video/avc, codecs=avc1.640028, res=1920x1080, fps=25.0] 2022-06-20 10:53:07.388 29397-29397/com.example.karaoke D/KaraokeEventLogger: audioDecoderInitialized [eventTime=1.85, mediaPos=0.00, window=0, period=0, c2.android.aac.decoder] 2022-06-20 10:53:07.390 29397-29397/com.example.karaoke D/KaraokeEventLogger: audioInputFormat [eventTime=1.85, mediaPos=0.00, window=0, period=0, id=1, mimeType=audio/mp4a-latm, codecs=mp4a.40.2, channels=2, sample_rate=44100, language=und] 2022-06-20 10:53:07.398 29397-29427/com.example.karaoke D/KaraokeAudioSink: configureFormat(null, null, null, audio/raw, null, -1, null, [-1, -1, -1.0], [2, 44100]) 2022-06-20 10:53:07.410 29397-29427/com.example.karaoke D/KaraokeAudioSink: /storage/emulated/0/Android/data/com.example.karaoke/cache/AudioSlink.pcm 2022-06-20 10:53:07.472 29397-29397/com.example.karaoke D/KaraokeEventLogger: videoSize [eventTime=1.93, mediaPos=0.00, window=0, period=0, 1920, 1080] 2022-06-20 10:53:07.488 29397-29397/com.example.karaoke D/KaraokeEventLogger: surfaceSize [eventTime=1.95, mediaPos=0.00, window=0, period=0, 1600, 900] 2022-06-20 10:53:07.491 29397-29397/com.example.karaoke D/KaraokeEventLogger: renderedFirstFrame [eventTime=1.95, mediaPos=0.00, window=0, period=0, Surface(name=null)/@0xdfde92e] 2022-06-20 10:53:08.030 29397-29427/com.example.karaoke D/KaraokeAudioSink: play 2022-06-20 10:53:08.037 29397-29397/com.example.karaoke D/KaraokeEventLogger: state [eventTime=2.50, mediaPos=0.00, window=0, period=0, READY] 2022-06-20 10:53:08.040 29397-29397/com.example.karaoke D/KaraokeEventLogger: isPlaying [eventTime=2.50, mediaPos=0.00, window=0, period=0, true] 2022-06-20 10:53:08.040 29397-29427/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1000000000000 2022-06-20 10:53:08.040 29397-29427/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1000000000000 2022-06-20 10:53:08.050 29397-29427/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1000000000000 2022-06-20 10:53:08.050 29397-29427/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1000000000000 2022-06-20 10:53:08.059 29397-29427/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1000000000000 2022-06-20 10:53:08.060 29397-29427/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1000000000000 2022-06-20 10:53:08.069 29397-29427/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1000000000000 2022-06-20 10:53:08.070 29397-29427/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1000000000000 2022-06-20 10:53:08.080 29397-29427/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1000000000000 2022-06-20 10:53:08.080 29397-29427/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1000000000000 2022-06-20 10:53:08.090 29397-29427/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1000000000000 2022-06-20 10:53:08.091 29397-29427/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1000000000000 2022-06-20 10:53:08.102 29397-29427/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1000000000000 2022-06-20 10:53:08.102 29397-29427/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1000000000000 2022-06-20 10:53:08.111 29397-29427/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1000000000000 2022-06-20 10:53:08.112 29397-29427/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1000000000000 2022-06-20 10:53:08.123 29397-29427/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1000000000000 2022-06-20 10:53:08.123 29397-29427/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1000000000000 2022-06-20 10:53:08.134 29397-29427/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1000000000000 2022-06-20 10:53:08.134 29397-29427/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1000000000000 2022-06-20 10:53:08.144 29397-29427/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1000000000000 2022-06-20 10:53:08.144 29397-29427/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1000000000000 2022-06-20 10:53:08.155 29397-29427/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1000000000000
The log uses AudioCompatSink I find mediaPos and getCurrentPositionUs is exception
2022-06-20 10:55:00.715 29542-29542/com.example.karaoke D/KaraokeAudioSink: KaraokeAudioSink:com.tme.karaoke.support.player.audio.AudioCompatSink@b47e78d 2022-06-20 10:55:00.715 29542-29542/com.example.karaoke D/KaraokeAudioSink: setListener:com.google.android.exoplayer2.audio.MediaCodecAudioRenderer$AudioSinkListener@a38bd42 2022-06-20 10:55:00.724 29542-29573/com.example.karaoke D/KaraokeAudioSink: setAudioSessionId:697 2022-06-20 10:55:00.795 29542-29542/com.example.karaoke D/KaraokeEventLogger: surfaceSize [eventTime=0.07, mediaPos=0.00, window=0, 1600, 2227] 2022-06-20 10:55:01.478 29542-29542/com.example.karaoke D/KaraokeEventLogger: timeline [eventTime=0.75, mediaPos=0.00, window=0, periodCount=1, windowCount=1, reason=PLAYLIST_CHANGED 2022-06-20 10:55:01.478 29542-29542/com.example.karaoke D/KaraokeEventLogger: period [?] 2022-06-20 10:55:01.478 29542-29542/com.example.karaoke D/KaraokeEventLogger: window [?, seekable=false, dynamic=true] 2022-06-20 10:55:01.478 29542-29542/com.example.karaoke D/KaraokeEventLogger: ] 2022-06-20 10:55:01.481 29542-29542/com.example.karaoke D/KaraokeEventLogger: mediaItem [eventTime=0.75, mediaPos=0.00, window=0, reason=PLAYLIST_CHANGED] 2022-06-20 10:55:01.486 29542-29542/com.example.karaoke D/KaraokeEventLogger: state [eventTime=0.76, mediaPos=0.00, window=0, BUFFERING] 2022-06-20 10:55:01.496 29542-29542/com.example.karaoke D/KaraokeEventLogger: playWhenReady [eventTime=0.77, mediaPos=0.00, window=0, true, USER_REQUEST] 2022-06-20 10:55:01.513 29542-29542/com.example.karaoke D/KaraokeEventLogger: timeline [eventTime=0.79, mediaPos=0.00, window=0, period=0, periodCount=1, windowCount=1, reason=SOURCE_UPDATE 2022-06-20 10:55:01.513 29542-29542/com.example.karaoke D/KaraokeEventLogger: period [?] 2022-06-20 10:55:01.513 29542-29542/com.example.karaoke D/KaraokeEventLogger: window [?, seekable=false, dynamic=false] 2022-06-20 10:55:01.513 29542-29542/com.example.karaoke D/KaraokeEventLogger: ] 2022-06-20 10:55:01.513 29542-29542/com.example.karaoke D/KaraokeEventLogger: loading [eventTime=0.79, mediaPos=0.00, window=0, period=0, true] 2022-06-20 10:55:02.362 29542-29542/com.example.karaoke D/KaraokeEventLogger: timeline [eventTime=1.64, mediaPos=0.00, window=0, period=0, periodCount=1, windowCount=1, reason=SOURCE_UPDATE 2022-06-20 10:55:02.362 29542-29542/com.example.karaoke D/KaraokeEventLogger: period [230.74] 2022-06-20 10:55:02.362 29542-29542/com.example.karaoke D/KaraokeEventLogger: window [230.74, seekable=true, dynamic=false] 2022-06-20 10:55:02.362 29542-29542/com.example.karaoke D/KaraokeEventLogger: ] 2022-06-20 10:55:02.415 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(2, null, null, audio/mp4a-latm, mp4a.40.2, -1, en, [-1, -1, -1.0], [2, 48000]) 2022-06-20 10:55:02.415 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:false 2022-06-20 10:55:02.415 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(null, null, null, audio/raw, null, -1, null, [-1, -1, -1.0], [2, 48000]) 2022-06-20 10:55:02.415 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:true 2022-06-20 10:55:02.415 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(2, null, null, audio/mp4a-latm, mp4a.40.2, -1, en, [-1, -1, -1.0], [2, 48000]) 2022-06-20 10:55:02.416 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:false 2022-06-20 10:55:02.416 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(2, null, null, audio/mp4a-latm, mp4a.40.2, -1, en, [-1, -1, -1.0], [2, 48000]) 2022-06-20 10:55:02.416 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:false 2022-06-20 10:55:02.417 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(null, null, null, audio/raw, null, -1, null, [-1, -1, -1.0], [2, 48000]) 2022-06-20 10:55:02.417 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:true 2022-06-20 10:55:02.417 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(2, null, null, audio/mp4a-latm, mp4a.40.2, -1, en, [-1, -1, -1.0], [2, 48000]) 2022-06-20 10:55:02.417 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:false 2022-06-20 10:55:02.417 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(1, null, null, audio/mp4a-latm, mp4a.40.2, -1, und, [-1, -1, -1.0], [2, 44100]) 2022-06-20 10:55:02.417 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:false 2022-06-20 10:55:02.417 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(null, null, null, audio/raw, null, -1, null, [-1, -1, -1.0], [2, 44100]) 2022-06-20 10:55:02.417 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:true 2022-06-20 10:55:02.417 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(1, null, null, audio/mp4a-latm, mp4a.40.2, -1, und, [-1, -1, -1.0], [2, 44100]) 2022-06-20 10:55:02.417 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:false 2022-06-20 10:55:02.418 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(1, null, null, audio/mp4a-latm, mp4a.40.2, -1, und, [-1, -1, -1.0], [2, 44100]) 2022-06-20 10:55:02.418 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:false 2022-06-20 10:55:02.418 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(null, null, null, audio/raw, null, -1, null, [-1, -1, -1.0], [2, 44100]) 2022-06-20 10:55:02.418 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:true 2022-06-20 10:55:02.418 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(1, null, null, audio/mp4a-latm, mp4a.40.2, -1, und, [-1, -1, -1.0], [2, 44100]) 2022-06-20 10:55:02.418 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:false 2022-06-20 10:55:02.418 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(1, null, null, audio/mp4a-latm, mp4a.40.2, -1, und, [-1, -1, -1.0], [2, 44100]) 2022-06-20 10:55:02.418 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:false 2022-06-20 10:55:02.418 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(null, null, null, audio/raw, null, -1, null, [-1, -1, -1.0], [2, 44100]) 2022-06-20 10:55:02.419 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:true 2022-06-20 10:55:02.419 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(1, null, null, audio/mp4a-latm, mp4a.40.2, -1, und, [-1, -1, -1.0], [2, 44100]) 2022-06-20 10:55:02.419 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:false 2022-06-20 10:55:02.419 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(1, null, null, audio/mp4a-latm, mp4a.40.2, -1, und, [-1, -1, -1.0], [2, 44100]) 2022-06-20 10:55:02.419 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:false 2022-06-20 10:55:02.419 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(null, null, null, audio/raw, null, -1, null, [-1, -1, -1.0], [2, 44100]) 2022-06-20 10:55:02.419 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:true 2022-06-20 10:55:02.419 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(1, null, null, audio/mp4a-latm, mp4a.40.2, -1, und, [-1, -1, -1.0], [2, 44100]) 2022-06-20 10:55:02.419 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:false 2022-06-20 10:55:02.423 29542-29573/com.example.karaoke D/KaraokeAudioSink: disableTunneling: 2022-06-20 10:55:02.423 29542-29573/com.example.karaoke D/KaraokeAudioSink: flush: 2022-06-20 10:55:02.423 29542-29542/com.example.karaoke D/KaraokeEventLogger: videoEnabled [eventTime=1.70, mediaPos=0.00, window=0, period=0] 2022-06-20 10:55:02.424 29542-29542/com.example.karaoke D/KaraokeEventLogger: audioEnabled [eventTime=1.70, mediaPos=0.00, window=0, period=0] 2022-06-20 10:55:02.426 29542-29542/com.example.karaoke D/KaraokeEventLogger: tracks [eventTime=1.70, mediaPos=0.00, window=0, period=0 2022-06-20 10:55:02.426 29542-29542/com.example.karaoke D/KaraokeEventLogger: MediaCodecVideoRenderer [ 2022-06-20 10:55:02.426 29542-29542/com.example.karaoke D/KaraokeEventLogger: Group:0, adaptive_supported=N/A [ 2022-06-20 10:55:02.426 29542-29542/com.example.karaoke D/KaraokeEventLogger: [X] Track:0, id=1, mimeType=video/avc, codecs=avc1.640028, res=1920x1080, fps=25.0, supported=YES 2022-06-20 10:55:02.426 29542-29542/com.example.karaoke D/KaraokeEventLogger: ] 2022-06-20 10:55:02.426 29542-29542/com.example.karaoke D/KaraokeEventLogger: ] 2022-06-20 10:55:02.426 29542-29542/com.example.karaoke D/KaraokeEventLogger: MediaCodecAudioRenderer [ 2022-06-20 10:55:02.426 29542-29542/com.example.karaoke D/KaraokeEventLogger: Group:0, adaptive_supported=N/A [ 2022-06-20 10:55:02.426 29542-29542/com.example.karaoke D/KaraokeEventLogger: [ ] Track:0, id=2, mimeType=audio/mp4a-latm, codecs=mp4a.40.2, channels=2, sample_rate=48000, language=en, supported=YES 2022-06-20 10:55:02.426 29542-29542/com.example.karaoke D/KaraokeEventLogger: ] 2022-06-20 10:55:02.426 29542-29542/com.example.karaoke D/KaraokeEventLogger: Group:1, adaptive_supported=N/A [ 2022-06-20 10:55:02.426 29542-29542/com.example.karaoke D/KaraokeEventLogger: [ ] Track:0, id=1, mimeType=audio/mp4a-latm, codecs=mp4a.40.2, channels=2, sample_rate=44100, language=und, supported=YES 2022-06-20 10:55:02.426 29542-29542/com.example.karaoke D/KaraokeEventLogger: ] 2022-06-20 10:55:02.426 29542-29542/com.example.karaoke D/KaraokeEventLogger: Group:2, adaptive_supported=N/A [ 2022-06-20 10:55:02.426 29542-29542/com.example.karaoke D/KaraokeEventLogger: [X] Track:0, id=1, mimeType=audio/mp4a-latm, codecs=mp4a.40.2, channels=2, sample_rate=44100, language=und, supported=YES 2022-06-20 10:55:02.426 29542-29542/com.example.karaoke D/KaraokeEventLogger: ] 2022-06-20 10:55:02.426 29542-29542/com.example.karaoke D/KaraokeEventLogger: Metadata [ 2022-06-20 10:55:02.426 29542-29542/com.example.karaoke D/KaraokeEventLogger: TALB: description=null: value= 2022-06-20 10:55:02.426 29542-29542/com.example.karaoke D/KaraokeEventLogger: TPE1: description=null: value=周杰伦 2022-06-20 10:55:02.426 29542-29542/com.example.karaoke D/KaraokeEventLogger: ----: domain=com.apple.iTunes, description=cdec 2022-06-20 10:55:02.426 29542-29542/com.example.karaoke D/KaraokeEventLogger: ----: domain=com.apple.iTunes, description=iTunSMPB 2022-06-20 10:55:02.426 29542-29542/com.example.karaoke D/KaraokeEventLogger: TIT2: description=null: value=夜曲 2022-06-20 10:55:02.426 29542-29542/com.example.karaoke D/KaraokeEventLogger: TSSE: description=null: value=Nero AAC codec / 1.5.4.0 2022-06-20 10:55:02.426 29542-29542/com.example.karaoke D/KaraokeEventLogger: ] 2022-06-20 10:55:02.426 29542-29542/com.example.karaoke D/KaraokeEventLogger: ] 2022-06-20 10:55:02.427 29542-29542/com.example.karaoke D/KaraokeEventLogger: TextRenderer [] 2022-06-20 10:55:02.427 29542-29542/com.example.karaoke D/KaraokeEventLogger: MetadataRenderer [] 2022-06-20 10:55:02.427 29542-29542/com.example.karaoke D/KaraokeEventLogger: CameraMotionRenderer [] 2022-06-20 10:55:02.427 29542-29542/com.example.karaoke D/KaraokeEventLogger: ] 2022-06-20 10:55:02.430 29542-29542/com.example.karaoke D/KaraokeEventLogger: downstreamFormat [eventTime=1.71, mediaPos=0.00, window=0, period=0, id=1, mimeType=video/avc, codecs=avc1.640028, res=1920x1080, fps=25.0] 2022-06-20 10:55:02.464 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(1, null, null, audio/mp4a-latm, mp4a.40.2, -1, und, [-1, -1, -1.0], [2, 44100]) 2022-06-20 10:55:02.464 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:false 2022-06-20 10:55:02.464 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:Format(1, null, null, audio/mp4a-latm, mp4a.40.2, -1, und, [-1, -1, -1.0], [2, 44100]) 2022-06-20 10:55:02.464 29542-29573/com.example.karaoke D/KaraokeAudioSink: supportsFormat:false 2022-06-20 10:55:02.465 29542-29542/com.example.karaoke D/KaraokeEventLogger: videoDecoderInitialized [eventTime=1.74, mediaPos=0.00, window=0, period=0, OMX.qcom.video.decoder.avc] 2022-06-20 10:55:02.465 29542-29542/com.example.karaoke D/KaraokeEventLogger: videoInputFormat [eventTime=1.74, mediaPos=0.00, window=0, period=0, id=1, mimeType=video/avc, codecs=avc1.640028, res=1920x1080, fps=25.0] 2022-06-20 10:55:02.491 29542-29542/com.example.karaoke D/KaraokeEventLogger: audioDecoderInitialized [eventTime=1.77, mediaPos=0.00, window=0, period=0, c2.android.aac.decoder] 2022-06-20 10:55:02.492 29542-29542/com.example.karaoke D/KaraokeEventLogger: audioInputFormat [eventTime=1.77, mediaPos=0.00, window=0, period=0, id=1, mimeType=audio/mp4a-latm, codecs=mp4a.40.2, channels=2, sample_rate=44100, language=und] 2022-06-20 10:55:02.502 29542-29573/com.example.karaoke D/KaraokeAudioSink: configureFormat(null, null, null, audio/raw, null, -1, null, [-1, -1, -1.0], [2, 44100]) 2022-06-20 10:55:02.507 29542-29573/com.example.karaoke D/KaraokeAudioSink: /storage/emulated/0/Android/data/com.example.karaoke/cache/AudioSlink.pcm 2022-06-20 10:55:02.564 29542-29542/com.example.karaoke D/KaraokeEventLogger: videoSize [eventTime=1.84, mediaPos=0.00, window=0, period=0, 1920, 1080] 2022-06-20 10:55:02.565 29542-29542/com.example.karaoke D/KaraokeEventLogger: renderedFirstFrame [eventTime=1.84, mediaPos=0.00, window=0, period=0, Surface(name=null)/@0x352a0e2] 2022-06-20 10:55:02.577 29542-29542/com.example.karaoke D/KaraokeEventLogger: surfaceSize [eventTime=1.85, mediaPos=0.00, window=0, period=0, 1600, 900] 2022-06-20 10:55:03.116 29542-29573/com.example.karaoke D/KaraokeAudioSink: play 2022-06-20 10:55:03.124 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:0 2022-06-20 10:55:03.124 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:0 2022-06-20 10:55:03.126 29542-29542/com.example.karaoke D/KaraokeEventLogger: state [eventTime=2.40, mediaPos=-1000000.00, window=0, period=0, READY] 2022-06-20 10:55:03.128 29542-29542/com.example.karaoke D/KaraokeEventLogger: isPlaying [eventTime=2.40, mediaPos=-1000000.00, window=0, period=0, true] 2022-06-20 10:55:03.284 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:140000 2022-06-20 10:55:03.285 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:140000 2022-06-20 10:55:03.292 29542-29542/com.example.karaoke D/KaraokeEventLogger: loading [eventTime=2.57, mediaPos=-999999.88, window=0, period=0, false] 2022-06-20 10:55:03.294 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:160000 2022-06-20 10:55:03.294 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:160000 2022-06-20 10:55:03.394 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:280000 2022-06-20 10:55:03.394 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:280000 2022-06-20 10:55:03.404 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:280000 2022-06-20 10:55:03.404 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:280000 2022-06-20 10:55:03.416 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:300000 2022-06-20 10:55:03.416 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:300000 2022-06-20 10:55:03.427 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:300000 2022-06-20 10:55:03.427 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:300000 2022-06-20 10:55:03.554 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:440000 2022-06-20 10:55:03.554 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:440000 2022-06-20 10:55:03.564 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:440000 2022-06-20 10:55:03.564 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:440000 2022-06-20 10:55:03.694 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:580000 2022-06-20 10:55:03.695 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:580000 2022-06-20 10:55:03.704 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:580000 2022-06-20 10:55:03.704 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:580000 2022-06-20 10:55:03.715 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:600000 2022-06-20 10:55:03.715 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:600000 2022-06-20 10:55:03.724 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:600000 2022-06-20 10:55:03.724 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:600000 2022-06-20 10:55:03.854 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:740000 2022-06-20 10:55:03.854 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:740000 2022-06-20 10:55:03.864 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:740000 2022-06-20 10:55:03.865 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:740000 2022-06-20 10:55:03.875 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:760000 2022-06-20 10:55:03.875 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:760000 2022-06-20 10:55:04.001 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:880000 2022-06-20 10:55:04.002 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:880000 2022-06-20 10:55:04.011 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:900000 2022-06-20 10:55:04.011 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:900000 2022-06-20 10:55:04.139 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1020000 2022-06-20 10:55:04.140 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1020000 2022-06-20 10:55:04.150 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1040000 2022-06-20 10:55:04.151 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1040000 2022-06-20 10:55:04.278 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1160000 2022-06-20 10:55:04.279 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1160000 2022-06-20 10:55:04.294 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1180000 2022-06-20 10:55:04.294 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1180000 2022-06-20 10:55:04.305 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1180000 2022-06-20 10:55:04.305 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1180000 2022-06-20 10:55:04.420 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1300000 2022-06-20 10:55:04.421 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1300000 2022-06-20 10:55:04.430 29542-29573/com.example.karaoke D/KaraokeAudioSink: getCurrentPositionUs:1320000
I'm afraid we don't have resources to answer questions of the form "I've implemented interface X, it doesn't work, what have I done wrong?".
If you want to implement a relatively complicated and low-level interface like AudioSink
then I'm afraid it's really up to you to do most of the debugging on any problems you encounter.
We are able to assist with very specific questions about implementing these interfaces, like "When implementing method Y of interface X, should I do clearly-defined behaviour A or B?".
I'll leave this question open for now - but unless the question can be made more specific I'm afraid we're not going to be able to help.
Thanks replay
I resolve this problem by
at handBuffer
if(startMediaTimeUsNeedsInit){ startMediaTimeUs = max(0, presentationTimeUs); if(startMediaTimeUs > 0) { startMediaTimeUsNeedsInit = false; } }
at getCurrentPositionUs
if(mAudioOutput != null){ try { long pos = (0xFFFFFFFFL & mAudioOutput.getPlaybackHeadPosition()) * C.MICROS_PER_SECOND / 44100; Log.e(TAG, "getCurrentPositionUs->"+pos); return pos + startMediaTimeUs; } catch (IOException e) { Log.e(TAG, "getCurrentPositionUs", e); } } return CURRENT_POSITION_NOT_SET;
but at log I find some dropFrame log . Any suggestion ?
AudioSlink Api may simple, such as DataSource ?
I override the DefaultAudioSink.
this is my AudioSink AudioOutput is a abstract class and the AudioOutput of AudioCompatSink param is using AudioTrack。 But there are some issure.
This is my AudioOutput code