I just got brought onto a project that a previous employee was working on so I'm still learning his code. There has been an issue where, while streaming, the stream randomly stops.
The app I'm using is connected to a network, and on the same network there is a dongle that is connected to an Over-the-air Dish. This dish just catches local TV station's free over-the-air broadcasts and converts into HLS streaming that can be used by the Android device to stream on the native Android player.
This is what I found in the log files around the time the stream stops:
12-20 11:34:50.346 2706 29045 V LiveSession: [audio] dequeueAccessUnit: time 154389333 us, original 155277333 us
12-20 11:34:50.346 2706 29045 V LiveSession: [audio] dequeueAccessUnit: time 154410666 us, original 155298666 us
12-20 11:34:50.346 2706 29045 V LiveSession: [audio] dequeueAccessUnit: time 154432000 us, original 155320000 us
12-20 11:34:50.366 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 154007533 us, original 154895533 us
12-20 11:34:50.401 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 154040900 us, original 154928900 us
12-20 11:34:50.411 2706 29045 V LiveSession: [audio] dequeueAccessUnit: time 154453333 us, original 155341333 us
12-20 11:34:50.411 2706 29045 V LiveSession: [audio] dequeueAccessUnit: time 154474666 us, original 155362666 us
12-20 11:34:50.411 2706 29045 V LiveSession: [audio] dequeueAccessUnit: time 154496000 us, original 155384000 us
12-20 11:34:50.436 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 154174366 us, original 155062366 us
12-20 11:34:50.471 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 154107633 us, original 154995633 us
12-20 11:34:50.476 2706 29045 V LiveSession: [audio] dequeueAccessUnit: time 154517333 us, original 155405333 us
12-20 11:34:50.476 2706 29045 V LiveSession: [audio] dequeueAccessUnit: time 154538666 us, original 155426666 us
12-20 11:34:50.476 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.486 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.496 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.506 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 154141000 us, original 155029000 us
12-20 11:34:50.511 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.521 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.531 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.536 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 154274466 us, original 155162466 us
12-20 11:34:50.541 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.551 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.561 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.571 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 154207733 us, original 155095733 us
12-20 11:34:50.571 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.581 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.591 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.601 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.611 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 154241100 us, original 155129100 us
12-20 11:34:50.611 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.626 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.636 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.646 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 154374566 us, original 155262566 us
12-20 11:34:50.646 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.656 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.666 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.676 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.676 2706 29007 V LiveSession: onPollBuffering: mSwitchInProgress 0, mReconfigurationInProgress 0, mInPreparationPhase 0, mCurBandwidthIndex 0, mStreamMask 0x3
12-20 11:34:50.676 2706 29007 V LiveSession: [audio] buffered 0 us
12-20 11:34:50.676 2706 29007 V LiveSession: [video] buffered 900900 us
12-20 11:34:50.676 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 154307833 us, original 155195833 us
12-20 11:34:50.686 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.696 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.711 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.711 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 154341200 us, original 155229200 us
12-20 11:34:50.721 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.726 4330 4330 D NetworkController: updateCarrierText : DR-GB02
12-20 11:34:50.731 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.741 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.741 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 154474666 us, original 155362666 us
12-20 11:34:50.751 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.761 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.771 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 154407933 us, original 155295933 us
12-20 11:34:50.771 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.781 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.791 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.801 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 154441300 us, original 155329300 us
12-20 11:34:50.801 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.811 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.821 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.836 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.841 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 154574766 us, original 155462766 us
12-20 11:34:50.846 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.856 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.866 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.876 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.876 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 154508033 us, original 155396033 us
12-20 11:34:50.886 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.896 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.906 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 154541400 us, original 155429400 us
12-20 11:34:50.906 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.916 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.926 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.936 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 154674866 us, original 155562866 us
12-20 11:34:50.936 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.946 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.961 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.971 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.971 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 154608133 us, original 155496133 us
12-20 11:34:50.981 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:50.991 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:51.001 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:51.006 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 154641500 us, original 155529500 us
12-20 11:34:51.011 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:51.021 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:51.031 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:51.041 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 154774966 us, original 155662966 us
12-20 11:34:51.041 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:51.041 2706 29008 V PlaylistFetcher: [fetcher-0] [audio] buffered 0
12-20 11:34:51.041 2706 29008 V PlaylistFetcher: [fetcher-0] [video] buffered 500500
12-20 11:34:51.041 2706 29008 V PlaylistFetcher: [fetcher-0] monitoring, buffered=0 < 30000000
12-20 11:34:51.046 2706 29008 I PlaylistFetcher: lastDownLoadDiff[2]
12-20 11:34:51.046 2706 29008 I PlaylistFetcher: mNumRetries[5]
12-20 11:34:51.046 21652 21731 D MediaHTTPConnection: setReadTimeOut = 300000000ms
12-20 11:34:51.051 2706 29008 V MediaHTTP: connection established
12-20 11:34:51.051 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:51.051 21652 21901 I System.out: (HTTPLog)-Static: Hongbao
12-20 11:34:51.056 21652 21901 D MediaHTTPConnection: setReadTimeout with 300000000ms
12-20 11:34:51.056 21652 21901 I System.out: (HTTPLog)-Static: isSBSettingEnabled false
12-20 11:34:51.056 21652 21901 I System.out: (HTTPLog)-Static: Hongbao
12-20 11:34:51.056 21652 21901 I System.out: (HTTPLog)-Static: isSBSettingEnabled false
12-20 11:34:51.061 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:51.071 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 154708233 us, original 155596233 us
12-20 11:34:51.071 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=0)
12-20 11:34:51.076 21652 21901 I MediaHTTPConnection: response code = 200
12-20 11:34:51.076 21652 21901 V MediaHTTPConnection: mTotalSize is 283
12-20 11:34:51.081 2706 29008 V MediaHTTP: disconnect called
12-20 11:34:51.081 2706 29008 V MediaHTTP: disconnect called
12-20 11:34:51.081 2706 29008 E PlaylistFetcher: Cannot find sequence number 1146 in playlist (contains 1140 - 1145)
12-20 11:34:51.081 2706 29008 V PlaylistFetcher: [fetcher-0] [video] queueAccessUnit, timeUs=156130100
12-20 11:34:51.081 2706 29008 V PlaylistFetcher: [fetcher-0] [audio] queueAccessUnit, timeUs=155448000
12-20 11:34:51.081 2706 29007 E LiveSession: XXX Received error -1011 from PlaylistFetcher.
12-20 11:34:51.081 2706 29045 V LiveSession: [audio] dequeueAccessUnit: time 154560000 us, original 155448000 us
12-20 11:34:51.081 2706 29007 V LiveSession: cancelBandwidthSwitch: mSwitchGen(0)++, orig 0, cur 0
12-20 11:34:51.081 2706 29007 V LiveSession: notifyBufferingUpdate: percentage=100%
12-20 11:34:51.081 2706 29007 V LiveSession: stopBufferingIfNecessary: mInPreparationPhase=0, mBuffering=0
12-20 11:34:51.081 2706 29006 V NuPlayer: kWhatSourceNotify with buffering-update for NuPlayer 100
12-20 11:34:51.081 2706 29006 V NuPlayer: msg : 3, ext1 : 100, ext2 : 0
12-20 11:34:51.081 2706 29006 D NuPlayerDriver: notifyListener_l(0xa7c82640), (3, 100, 0)
12-20 11:34:51.081 2706 29006 V MediaPlayerService: [90] notify (0xaf25b280, 3, 100, 0)
12-20 11:34:51.081 2706 29045 V LiveSession: [audio] dequeueAccessUnit: no buffer available (finalResult=-1011)
12-20 11:34:51.081 2706 29045 I NuPlayerDecoder: End of Stream
12-20 11:34:51.086 21652 21731 V MediaPlayer: message received msg=3, ext1=100, ext2=0
12-20 11:34:51.086 2706 29045 I NuPlayerDecoder: [audio] saw output EOS
12-20 11:34:51.086 2706 29042 I NuPlayerRenderer: onQueueEOS audio finalResult : -1011
12-20 11:34:51.086 2706 29042 I NuPlayerRenderer: [audio] notifyEOS() End of Stream, delayUs : 319992
12-20 11:34:51.086 2706 29042 V AudioSink: stop
12-20 11:34:51.086 21652 21731 V MediaPlayer: buffering 100
12-20 11:34:51.086 21652 21731 V MediaPlayer: callback application
12-20 11:34:51.086 21652 21731 V MediaPlayer: back from callback
12-20 11:34:51.106 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 154741600 us, original 155629600 us
12-20 11:34:51.146 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 154875066 us, original 155763066 us
12-20 11:34:51.176 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 154808333 us, original 155696333 us
12-20 11:34:51.211 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 154841700 us, original 155729700 us
12-20 11:34:51.246 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 154975166 us, original 155863166 us
12-20 11:34:51.276 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 154908433 us, original 155796433 us
12-20 11:34:51.311 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 154941800 us, original 155829800 us
12-20 11:34:51.346 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 155075266 us, original 155963266 us
12-20 11:34:51.381 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 155008533 us, original 155896533 us
12-20 11:34:51.406 2706 29006 I NuPlayerRenderer: reachedAudioEOS (1)
12-20 11:34:51.406 2706 29006 V NuPlayer: reached audio EOS
12-20 11:34:51.411 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 155041900 us, original 155929900 us
12-20 11:34:51.431 2706 3488 D AudioSAEffectSec: EffectRelease pContext = 0xadf2e7c0, SessionId = 1035
12-20 11:34:51.431 2706 3488 D AudioSAEffectSec: EffectRelease : All effects are no longer instantiated
12-20 11:34:51.431 2706 3488 D AudioSAEffectSec: AudioSAEffectSec::releaseSA
12-20 11:34:51.431 2706 3488 D AudioSASec: AudioSASec::Close
12-20 11:34:51.431 2706 3488 D AudioSAEffectSec: AudioSAEffectSec::~AudioSAEffectSec
12-20 11:34:51.431 2706 3488 D AudioSASec: AudioSASec::~AudioSASec() +
12-20 11:34:51.436 2706 3488 D AudioSASec: Samsung_SoundAlive_play_Factory::Destroy(mSoundAlive)
12-20 11:34:51.436 2706 3488 D AudioSASec: AudioSASec::~AudioSASec() -
12-20 11:34:51.436 2706 3488 W MySoundEffect: MySoundEffect_setEnabled() MySound is already disabled
12-20 11:34:51.436 2706 3488 D MySoundEffect: EffectRelease : All effects are no longer instantiated
12-20 11:34:51.436 2706 3488 D MySound : MySound::Close
12-20 11:34:51.436 2706 3488 D MySoundEffect: MySoundEffect::~MySoundEffect
12-20 11:34:51.436 2706 3488 W MySpaceEffect: MySpaceEffect_setEnabled() MySpace is already disabled
12-20 11:34:51.436 2706 3488 D MySpaceEffect: EffectRelease : All effects are no longer instantiated
12-20 11:34:51.436 2706 3488 D MySpace : MySpace::Close
12-20 11:34:51.436 2706 3488 D MySpaceEffect: MySpaceEffect::~MySpaceEffect
12-20 11:34:51.436 2706 3488 D MySpace : MySpace::~MySpace() -
12-20 11:34:51.436 2706 3488 I APM::AudioPolicyManager: stopOutput() output 2, stream 3, session 1035
12-20 11:34:51.451 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 155175366 us, original 156063366 us
12-20 11:34:51.456 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 155108633 us, original 155996633 us
12-20 11:34:51.461 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 155142000 us, original 156030000 us
12-20 11:34:51.476 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 155275466 us, original 156163466 us
12-20 11:34:51.541 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 155208733 us, original 156096733 us
12-20 11:34:51.616 2706 29043 V LiveSession: [video] dequeueAccessUnit: time 155242100 us, original 156130100 us
12-20 11:34:51.646 2706 29043 V LiveSession: [video] dequeueAccessUnit: no buffer available (finalResult=-1011)
At 11:34:50.476, there is a point where there is no buffer available. Then at 11:34:51.081, there is a message saying that PlaylistFetcher cannot find sequence number and then a few lines later, there is the following error:
12-20 11:34:51.081 2706 29007 E LiveSession: XXX Received error -1011 from PlaylistFetcher.
What is Live Session error -1011?
Live Session error -1011 is
stagefright/MediaErrors.h
:android.googlesource.com
Looks like the source went AWOL and your input buffer underflowed.