Bug
5287555 create StreamSourceAppProxy once
Create StreamSourceAppProxy once in the StreamPlayer constructor,
rather than dynamically in StreamPlayer::registerQueueCallback.
As StreamPlayer::registerQueueCallback can be called multiple times
(or even not at all), this guarantees we always have only one
StreamSourceAppProxy that never changes.
Also fix bug where we weren't using a stream protector for AudioPlayer
with MPEG-2 TS AndroidBufferQueue data source (we weren't calling
setCallbackProtector on it).
This has some unexpected side benefits of simplifying the code:
- remove unused parameters and member variables
- mAppProxyLock not needed since the callback protector is created early
- remove GenericPlayer::setCallbackProtector
- inline android_StreamPlayer_realize_l for the use case
AUDIOPLAYER_FROM_TS_ANDROIDBUFFERQUEUE to be like MediaPlayer
Change-Id: I090c11cde9474285185481192dba2b5c01338a50