用exoplayer进行直播hls时候,每次都要等待10来秒才能开始直播,而退出后重进基本就能立刻开始直播了。想知道如何改进。代码上就是下面这样实现的,
开始缓存时,只有这个说明:I/ExoPlayerImpl: Init b34881b [ExoPlayerLib/2.14.0] [generic_x86_arm, sdk_gphone_x86, Google, 30]
开始直播后:
I/OMXClient: IOmx service obtained
D/SurfaceUtils: connecting to surface 0xef34b068, reason connectToSurface
I/MediaCodec: [OMX.android.goldfish.h264.decoder] setting surface generation to 12218378
D/SurfaceUtils: disconnecting from surface 0xef34b068, reason connectToSurface(reconnect)
D/SurfaceUtils: connecting to surface 0xef34b068, reason connectToSurface(reconnect)
E/ACodec: [OMX.android.goldfish.h264.decoder] setPortMode on output to DynamicANWBuffer failed w/ err -1010
I/ACodec: codec does not support config priority (err -1010)
D/SurfaceUtils: disconnecting from surface 0xef34b068, reason setNativeWindowSizeFormatAndUsage
D/SurfaceUtils: connecting to surface 0xef34b068, reason setNativeWindowSizeFormatAndUsage
D/SurfaceUtils: set up nativeWindow 0xef34b068 for 1280x720, color 0x13, rotation 0, usage 0x1002900
W/ACodec: [OMX.android.goldfish.h264.decoder] BAD CODEC: Output format changed unexpectedly from (diff) AMessage(what = 0x00000000) = {
int32_t color-range = 2
int32_t android._dataspace = 260
} to (diff) AMessage(what = 0x00000000) = {
int32_t color-range = 1
int32_t android._dataspace = 146866176
}