1. 12 Apr, 2023 4 commits
    • Fix audio encode timestamp off by one · d43fe347
      Simplify the audio encoder input timestamp calculation. The new calculation
      avoids drifting by tracking the total number of bytes encoded rather than
      tracking the timestamp and remainder separately, and also makes the timestamps
      match the decoder output buffer timestamps.
      
      Also switch one of the export tests that was passing through AMR samples over
      to using WAVE audio. The problem with using AMR is that the compressed samples
      are not necessarily an integer number of audio frames and the shadow decoder
      would pass them from input to output, so the audio encoder was receiving
      non-integer numbers of audio frames.
      
      Tested by logging the timestamps at the decoder output and encoder input with
      forcing transcoding audio, and verifying that after this change the audio
      timestamps are no longer off by one.
      
      PiperOrigin-RevId: 523409869
      andrewlewis committed
    • Release sample pipelines before asset loaders · 0b40bc37
      The video asset loader renders decoder output to a surface texture, and if the
      video sample pipeline is in the process of updating the surface texture image
      at the moment when the asset loader video decoder is released this seems to
      cause `MediaCodec.release` to get stuck.
      
      Swap the release order so that we stop updating the texture before trying to
      release the codec.
      
      PiperOrigin-RevId: 523401619
      andrewlewis committed
    • Improve error logging · ba2c3273
      Log at debug level immediately when MediaCodec throws. This logging will be
      output closer to the time when the error actually happened so should make it
      easier to identify the order of components failing.
      
      Downgrade logging of errors after export ends to warning level, as output may
      still be fine if there was a problem after exporting completed (though it's
      still worth logging a warning as the device may not be in a good state).
      
      PiperOrigin-RevId: 523370457
      andrewlewis committed
    • Replace deprecated onBackPressed call · be85684d
      PiperOrigin-RevId: 523361561
      tonihei committed
  2. 11 Apr, 2023 9 commits
  3. 05 Apr, 2023 27 commits