1. 30 Mar, 2020 11 commits
    • Add ReleaseInputBuffer callback · 265670cf
      The release_input_buffer callback will be called when the library
      is done consuming an "input buffer". The buffer passed into
      EnqueueFrame must be kept valid until this callback is called. If
      frame parallel is false, then this callback can be nullptr (in
      this case the buffer has to be kept valid until the next call to
      DequeueFrame). If frame parallel is true, this callback cannot be
      nullptr.
      
      PiperOrigin-RevId: 296276083
      vigneshv committed
    • Remove duplicate SCTE-35 format and add sample to TsExtractorTest · 8591e69b
      It's not clear why we're currently outputting the format in both init()
      and consume() - it seems likely that this was accidentally introduced
      in <unknown commit>
      when we started outputting the format in consume() but didn't remove it
      from init().
      Oliver Woodman committed
    • Change libgav1's frame buffer callback API. · 908a76e8
      1. Have frame buffer callbacks return Libgav1StatusCode instead of int.
      The 0 (success), -1 (failure) return value convention is less obvious.
      Note: The callers of frame buffer callbacks,
      BufferPool::OnFrameBufferSizeChanged() and YuvBuffer::Realloc(),
      currently return bool, so more work is needed to propagate the frame
      buffer callbacks' Libgav1StatusCode return value to the Decoder API.
      
      2. Allow the FrameBufferSizeChangedCallback to be omitted if the frame
      buffer size information is not useful to the application.
      
      3. Remove the old (version 1) frame buffer callback API. Remove the
      frame buffer callback adaptor.
      
      frame_buffer2.h is renamed frame_buffer.h.
      Libgav1FrameBuffer2 is renamed Libgav1FrameBuffer.
      GetFrameBufferCallback2 and ReleaseFrameBufferCallback2 are renamed
      GetFrameBufferCallback and ReleaseFrameBufferCallback.
      
      PiperOrigin-RevId: 295971183
      olly committed
    • Use &id_ as buffer_private_data for libgav1. · 75bd4ebc
      This avoids the issue of whether it is defined behaviour to cast an
      arbitrary int (or even intptr_t) value to a void* pointer. This is the
      original approach used before commit 0915998a.
      
      PiperOrigin-RevId: 295552115
      olly committed
    • Use libgav1 frame buffer callback helper functions · 766b383d
      Libgav1 recently added the ComputeFrameBufferInfo() and SetFrameBuffer()
      helper functions for writing frame buffer callbacks. Using them
      simplifies the Libgav1GetFrameBuffer() function.
      
      Also resurrect the AlignTo16() function.
      
      PiperOrigin-RevId: 295548330
      olly committed
    • gav1_jni: fix pointer->int conversion warnings · b73f6b6e
      fixes:
      gav1_jni.cc:446:25: error: cast from pointer to smaller type 'int' loses information
        const int buffer_id = reinterpret_cast<int>(buffer_private_data);
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      gav1_jni.cc:730:9: error: cast from pointer to smaller type 'int' loses information
              reinterpret_cast<int>(decoder_buffer->buffer_private_data);
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      after https://github.com/google/ExoPlayer/commit/0915998add5918214fa0282a69b50a159168a6d5
      
      PiperOrigin-RevId: 295211245
      olly committed
    • Cast void* to JniContext* using static_cast. · 0acc95cf
      static_cast is more appropriate than reinrerpret_cast for casting from
      void* to JniContext*. See Section 7.2.1 (page 173) in The C++
      Programming Language, 4th Edition and
      https://stackoverflow.com/questions/310451/should-i-use-static-cast-or-reinterpret-cast-when-casting-a-void-to-whatever
      
      PiperOrigin-RevId: 293812940
      olly committed
    • Switch to new libgav1 frame buffer callback API. · 11635191
      The new code in Libgav1GetFrameBuffer is copied from
      libgav1/src/frame_buffer_callback_adaptor.cc. It may become libgav1
      utility functions available to libgav1 clients in the future.
      
      The Libgav1FrameBuffer struct in the old frame buffer callback API is
      defined as follows:
      
        typedef struct Libgav1FrameBuffer {
          uint8_t* data[3];
          size_t size[3];
          void* private_data;
        } Libgav1FrameBuffer;
      
      Copy these three fields to the JniFrameBuffer class as private data
      members and add the RawBuffer() and Id() getter methods.
      
      The existing AlignTo16 function is replaced by the copied Align template
      function.
      
      PiperOrigin-RevId: 293709205
      olly committed
    • Catch-and-log all subtitle decode errors · 1818921a
      issue:#6885
      PiperOrigin-RevId: 295931197
      ibaker committed
    • Update stale comment in TrimmingAudioProcessor · ed1eade9
      The part about leaving the pending trim start byte count unmodified
      if the processor was just configured is not correct.
      
      PiperOrigin-RevId: 295745371
      andrewlewis committed
    • Add missing IntDef to switch · 23e42362
      PiperOrigin-RevId: 295692163
      olly committed
  2. 18 Feb, 2020 6 commits
  3. 13 Feb, 2020 7 commits
  4. 03 Feb, 2020 2 commits
  5. 01 Feb, 2020 6 commits
  6. 27 Jan, 2020 6 commits
  7. 17 Jan, 2020 2 commits
    • Release notes: Move download segment merging out of 2.11.2 · ce1ec1d5
      PiperOrigin-RevId: 290276507
      olly committed
    • Tidy up DownloadService restart. Final change for #6798. · b137cfbd
      - Add additional Listener methods to DownloadManager, to inform of
        changes to whether the downloads are paused or waiting for requirements.
      
      - Only schedule the Scheduler if we really are waiting for requirements.
      
      - Only restart the service if we're no longer waiting for requirements,
        and if there are queued downloads that will now be restarted.
        Previously the service would be restarted whenever the requirements
        were met, regardless of whether there was any work to do.
      
      - Restart service if it might be stopping, as well as if it's already
        stopped. Also restart service if there's a download state change to a
        state for which the service should be started, if.
      
      Issue: #6798
      PiperOrigin-RevId: 290270547
      olly committed