1. 05 Mar, 2015 1 commit
  2. 02 Nov, 2011 1 commit
    • Glenn Kasten's avatar
      AudioPlayback_Parameters cleanup · 167a2af6
      Glenn Kasten authored
      Use AudioPlayback_Parameters more consistently in parameter list of
      constructors.  Also, StreamPlayer::StreamPlayer was over-assigning to
      mPlaybackParams (already assigned by its superclass's constructor).
      
      Move initialization of AudioPlayback_Parameters from each case
      to before the switch, as it is shared by each use case.
      
      Remove old asserts.
      
      Change-Id: I8925d36da031c80308457c7e940418d3a4e47b62
      167a2af6
  3. 11 Oct, 2011 1 commit
    • Glenn Kasten's avatar
      Multithread safety and code reduction · b4393ef4
      Glenn Kasten authored
      Remove unsafe GenericPlayer::getSampleRate().  getSampleRate() was not
      thread-safe as it accessed a member variable updated in the looper thread
      without a lock.  If getSampleRate() is ever needed again, the sample rate
      is available in the mPcmFormatValues array, which does have a lock.
      
      Replace member variables mChannelMask, mChannelCount, and mSampleRateHz
      by local variables for locality and performance.
      
      Change-Id: Ibf92ed090430153d748ded4d0b835e429df47eea
      b4393ef4
  4. 29 Sep, 2011 1 commit
  5. 21 Sep, 2011 1 commit
    • Glenn Kasten's avatar
      Bug 5090073 Callback protectors · f4b45a37
      Glenn Kasten authored
      Add callback protector for decode to PCM usage cases.
      Move callback protection up earlier for URI decode use case only.
      
      Other:
      Remove redundant mCallbackProtector field.
      Optimization: on exit from callback protector, only broadcast if !mSafeToEnterCb,
          that is if destroy has requested callback protectors to finish up.
      More callback protector logging.
      Add callback protector requestCbExit() [no wait], not yet used.
      
      Unrelated:
      3rd parameter of adecoder_writeToBufferQueue is always CAudioPlayer * instead of void *.
      
      Change-Id: I57a46acf0e5ecb213540b13ca08098177ad7ad6e
      f4b45a37
  6. 16 Sep, 2011 1 commit
    • Glenn Kasten's avatar
      Bug 5263052 play events for decoder use case · 7349b2e7
      Glenn Kasten authored
      This version should be more resilient to decode time vs. real time.
      
      Miscellaneous:
       - comment about GetPosition accuracy
       - remove unused AudioSfDecoder::onRender implementation
      
      Change-Id: I16a7726e0b1459ed1421fe50cb4d683d5c3bdd6b
      7349b2e7
  7. 20 Jul, 2011 1 commit
    • Jean-Michel Trivi's avatar
      Fix bug 5049371 Metadata for decode to PCM buffer queue · 54cad4f3
      Jean-Michel Trivi authored
      When decoding a URI or FD with OpenSL ES to a PCM buffer queue,
       you cannot rely on the information given by the extractor, or
       the OMXCodec before the latter has decoded one buffer.
      
      The fix consists in two parts:
      1/ where to retrieve the PCM format from:
        the information first retrieved from the extractor if available,
        but then overwritten by the OMXCodec values as soon as it
        issues INFO_FORMAT_CHANGED
      2/ when can the application retrieve the information:
        the information is available when the first buffer of decoded
        data is returned to the application via the buffer queue
        callback. The test app is updated to reflect this, and verify
        that the query can safely happen during the callback.
      
      Change-Id: Ic034c7ff9412c94e9df2aaa3c1d61e9d3bf507d9
      54cad4f3
  8. 30 Jun, 2011 1 commit
    • Jean-Michel Trivi's avatar
      Fix issues in GenericPlayer destruction · e6ded5c6
      Jean-Michel Trivi authored
      Added a preDestroy() mechanism for the subclasses of
       GenericPlayer.
      Added a lock around the update and use of the callback
       GenericPlayer is using for notifications to the
       OpenSL ES framework. This prevents notifications after
       the GenericPlayer is flagged for destruction.
      Added a lock to protect the update of the audio source
       running state, so it doesn't get used after the
       AudioSfDecoder is flagged for destruction.
      Before stopping the audio source of an AudioSfDecoder
       object, release the code buffer if necessary, to
       ensure proper teardown of the audio source (OMXCodec)
      
      Change-Id: I6cf08d169a6da622552dda5101dbc61e663ce6aa
      e6ded5c6
  9. 22 Jun, 2011 1 commit
    • Jean-Michel Trivi's avatar
      OpenSL ES: additional features when decoding to PCM · 7f5cc1af
      Jean-Michel Trivi authored
      Support the following features useful when decoding a compressed
       asset to PCM:
      - GetDuration in SLPlayItf
      - implemented SLMetadataExtractionItf on an AudioPlayer whose
        data sink is a buffer queue (i.e. it's a decoder)
      - added support for 6 new metadata keys that can be queried
        through SLMetadataExtractionItf, which match the fields
        of the SLDataFormat_PCM structure.
      Updated the decode sample code to use these features: the
       slesTestDecodeToBuffQueue app now displays:
      - the number of channels
      - the channel mask
      - the sample size
      - the container size
      - the sample rate
      - the format endianness
      
      Change-Id: I3ca1e29828fd8c16c89da43a28df429c9cdef7af
      7f5cc1af
  10. 13 Apr, 2011 1 commit
  11. 05 Apr, 2011 1 commit
    • Jean-Michel Trivi's avatar
      Move support for SL URI and FD playback under GenericPlayer class · 4ee246c5
      Jean-Michel Trivi authored
      The SfPlayer class was implementing URI and FD decode and playback
       in the application process. This CL removes this class entirely
       and moves its functionality under the GenericPlayer class. This
       means that the playback of URIs and FDs is now implemented through
       an android::MediaPlayer object running in the media service.
      
      The SfPlayer header had many StageFright and system includes, which
       are now moved to the relevant files where they are required,
       instead of automagically coming from sles_allinclusive.h.
      
      Note that this CL breaks support for the following OpenSL ES features
      due to missing Android MediaPlayer features:
       SLPlayItf.GetPosition
                 HEADATMARKER
                 HEADATNEWPOSITION
       SLVolumeItf.EnableStereoPosition
                 SetStereoPosition
       SLMuteSoloItf
       SLPlaybackRateItf
      
       Support for those features will be reintegrated in subsequent CLs.
      
      Change-Id: I8d7f6ea006eb7b876ef1ca1909d74b4517335850
      4ee246c5
  12. 28 Mar, 2011 1 commit
    • Jean-Michel Trivi's avatar
      Reduce include noise in SL and XA class definitions · 2b06e20a
      Jean-Michel Trivi authored
      In classes.h: we should only have to include the headers
       for the objects that are actually stored as member variables of
       the OpenSL ES and OpenMAX AL objects (so here AudioTrackProtector,
       Effect, and GenericPlayer).
      In CMediaPlayer.c: remove useless includes and change the video
       surface function prototypes to use const refs to strong pointers
       instead of pointers to access the GenericMediaPlayer objects.
      
      Note that android_SfPlayer.h is still in sles_allinclusive.h because
       it will be dealt with when the SfPlayer functionality is absorbed
       under LocAVPlayer.
      
      Change-Id: Ic2c9459862588399d9545a247cc15341effc0f66
      2b06e20a
  13. 17 Mar, 2011 1 commit
  14. 10 Feb, 2011 1 commit
    • Jean-Michel Trivi's avatar
      OpenSL ES: support decode to PCM buffer queue · 13837cf3
      Jean-Michel Trivi authored
      Created a new audio player class, APlayer, from which we derive
       subclasses to encapsulate OpenSL ES AudioPlayer implementations:
       - ASfPlayer derives from APlayer and encapsulates StageFright
         functionality for audio decoding to a buffer
       - ADecoder derives from ASfPlayer and encapsulates rendering
         the decoded audio data to a callback function. It interfaces
         with the OpenSL ES Buffer Queue interface to pass the decoded
         data back to an OpenSL ES application.
      
      For OpenSL ES, to support decoding to a Buffer Queue, we now
       allow an AudioPlayer to have its sink be a PCM buffer queue.
      
      Change-Id: I9aefeb0375a71f7ca770c5c62b4fb8faf59c9c23
      13837cf3