Android 6.0

时间:2016-07-03 07:31:43

标签: android mediaextractor

通常,我的代码基于ExtractMpegFramesTest示例。

在我的应用中,我只是录制视频,然后逐帧处理视频。 我的应用程序适用于任何低于6.0的Android版本。

我对这个问题究竟在哪里感到困惑。

这是我的logcat的一部分:

07-03 10:26:20.519: V/My Error(24259): outIndex = -1
07-03 10:26:20.519: D/Decoder(24259): dequeueOutputBuffer timed out!
07-03 10:26:20.519: D/Decoder(24259): Got index 3
07-03 10:26:20.519: V/My Error 1(24259): Start
07-03 10:26:20.519: D/Decoder(24259): InputBuffer ADVANCING
07-03 10:26:20.519: V/My Error 1(24259): End2
07-03 10:26:20.529: V/My Error(24259): outIndex = -1
07-03 10:26:20.529: D/Decoder(24259): dequeueOutputBuffer timed out!
07-03 10:26:20.529: D/Decoder(24259): Got index 4
07-03 10:26:20.529: V/My Error 1(24259): Start
07-03 10:26:20.529: D/Decoder(24259): InputBuffer ADVANCING
07-03 10:26:20.529: V/My Error 1(24259): End2
07-03 10:26:20.529: V/My Error(24259): outIndex = -3
07-03 10:26:20.529: D/Decoder(24259): INFO_OUTPUT_BUFFERS_CHANGED
07-03 10:26:20.539: I/ACodec(24259): [OMX.Exynos.avc.dec] Now Executing
07-03 10:26:20.539: D/Decoder(24259): Got index 0
07-03 10:26:20.539: V/My Error 1(24259): Start
07-03 10:26:20.539: D/Decoder(24259): InputBuffer ADVANCING
07-03 10:26:20.539: V/My Error 1(24259): End2
07-03 10:26:20.539: V/My Error(24259): outIndex = -2
07-03 10:26:20.539: D/Decoder(24259): New format {mime=video/raw, crop-top=0, crop-right=1919, slice-height=1088, remained_resource=15621120, color-format=261, height=1088, width=1920, max_capacity=17694720, what=1869968451, crop-bottom=1079, crop-left=0, stride=1920}
07-03 10:26:20.539: D/Decoder(24259): Got index 1
07-03 10:26:20.539: V/My Error 1(24259): Start
07-03 10:26:20.539: D/Decoder(24259): InputBuffer ADVANCING
07-03 10:26:20.539: V/My Error 1(24259): End2
07-03 10:26:20.539: V/My Error(24259): outIndex = 12
07-03 10:26:20.539: V/Decoder(24259): We can't use this buffer but render it due to the API limit, java.nio.DirectByteBuffer[position=0,limit=8,capacity=8]
07-03 10:26:20.539: V/sparsecounter(24259): sparsecounter = 32
07-03 10:26:20.539: V/My Error(24259): CURRENT_FRAME = 0
07-03 10:26:20.549: D/libEGL(24259): eglInitialize EGLDisplay = 0xef11a4e4
07-03 10:26:20.549: V/My Error(24259): start saveFrame 
07-03 10:26:20.549: V/My Error(24259): frame number 0
07-03 10:26:20.549: D/Decoder(24259): Got index 2
07-03 10:26:20.549: V/My Error 1(24259): Start
07-03 10:26:20.549: D/Decoder(24259): InputBuffer ADVANCING
07-03 10:26:20.549: V/My Error 1(24259): End2
07-03 10:26:20.549: V/My Error(24259): outIndex = 11
07-03 10:26:20.549: V/Decoder(24259): We can't use this buffer but render it due to the API limit, java.nio.DirectByteBuffer[position=0,limit=8,capacity=8]
07-03 10:26:20.549: V/sparsecounter(24259): sparsecounter = 33
07-03 10:26:20.549: V/My Error(24259): CURRENT_FRAME = 1
07-03 10:26:20.559: D/libEGL(24259): eglInitialize EGLDisplay = 0xef11a4e4
07-03 10:26:20.569: V/My Error(24259): start saveFrame 
07-03 10:26:20.569: V/My Error(24259): frame number 1
07-03 10:26:20.569: D/Decoder(24259): Got index 3
07-03 10:26:20.569: V/My Error 1(24259): Start
07-03 10:26:20.569: D/Decoder(24259): InputBuffer ADVANCING
07-03 10:26:20.569: V/My Error 1(24259): End2
07-03 10:26:20.569: V/My Error(24259): outIndex = 10
07-03 10:26:20.569: V/Decoder(24259): We can't use this buffer but render it due to the API limit, java.nio.DirectByteBuffer[position=0,limit=8,capacity=8]
07-03 10:26:20.569: V/sparsecounter(24259): sparsecounter = 34
07-03 10:26:20.589: V/My Error(24259): CURRENT_FRAME = 2
07-03 10:26:20.589: D/libEGL(24259): eglInitialize EGLDisplay = 0xef11a4e4
07-03 10:26:20.599: V/My Error(24259): start saveFrame 
07-03 10:26:20.599: V/My Error(24259): frame number 2
07-03 10:26:20.599: D/Decoder(24259): Got index 4
07-03 10:26:20.599: V/My Error 1(24259): Start
07-03 10:26:20.599: D/Decoder(24259): InputBuffer ADVANCING
07-03 10:26:20.599: V/My Error 1(24259): End2
07-03 10:26:20.599: V/My Error(24259): outIndex = 9
07-03 10:26:20.599: V/Decoder(24259): We can't use this buffer but render it due to the API limit, java.nio.DirectByteBuffer[position=0,limit=8,capacity=8]
07-03 10:26:20.599: V/sparsecounter(24259): sparsecounter = 35
07-03 10:26:20.619: V/My Error(24259): CURRENT_FRAME = 3
07-03 10:26:20.629: D/libEGL(24259): eglInitialize EGLDisplay = 0xef11a4e4
07-03 10:26:20.629: V/My Error(24259): start saveFrame 
07-03 10:26:20.629: V/My Error(24259): frame number 3
07-03 10:26:20.629: D/Decoder(24259): Got index 0
07-03 10:26:20.629: V/My Error 1(24259): Start
07-03 10:26:20.629: D/Decoder(24259): InputBuffer ADVANCING
07-03 10:26:20.639: V/My Error 1(24259): End2
07-03 10:26:20.639: V/My Error(24259): outIndex = 8
07-03 10:26:20.639: V/Decoder(24259): We can't use this buffer but render it due to the API limit, java.nio.DirectByteBuffer[position=0,limit=8,capacity=8]
07-03 10:26:20.639: V/sparsecounter(24259): sparsecounter = 36
07-03 10:26:20.649: V/My Error(24259): CURRENT_FRAME = 4
07-03 10:26:20.659: D/libEGL(24259): eglInitialize EGLDisplay = 0xef11a4e4
07-03 10:26:20.659: V/My Error(24259): start saveFrame 
07-03 10:26:20.659: V/My Error(24259): frame number 4
07-03 10:26:20.659: D/Decoder(24259): Got index 1
07-03 10:26:20.659: V/My Error 1(24259): Start
07-03 10:26:20.669: D/Decoder(24259): InputBuffer ADVANCING
07-03 10:26:20.669: V/My Error 1(24259): End2
07-03 10:26:20.669: V/My Error(24259): outIndex = 7
07-03 10:26:20.669: V/Decoder(24259): We can't use this buffer but render it due to the API limit, java.nio.DirectByteBuffer[position=0,limit=8,capacity=8]
07-03 10:26:20.669: V/sparsecounter(24259): sparsecounter = 37
07-03 10:26:20.689: V/My Error(24259): CURRENT_FRAME = 5
07-03 10:26:20.699: D/libEGL(24259): eglInitialize EGLDisplay = 0xef11a4e4
07-03 10:26:20.699: V/My Error(24259): start saveFrame 
07-03 10:26:20.699: V/My Error(24259): frame number 5
07-03 10:26:20.699: D/Decoder(24259): Got index 2
07-03 10:26:20.699: V/My Error 1(24259): Start
07-03 10:26:20.699: D/Decoder(24259): InputBuffer ADVANCING
07-03 10:26:20.699: V/My Error 1(24259): End2
07-03 10:26:20.699: V/My Error(24259): outIndex = 6
07-03 10:26:20.699: V/Decoder(24259): We can't use this buffer but render it due to the API limit, java.nio.DirectByteBuffer[position=0,limit=8,capacity=8]
07-03 10:26:20.699: V/sparsecounter(24259): sparsecounter = 38
07-03 10:26:20.719: V/My Error(24259): CURRENT_FRAME = 6
07-03 10:26:20.729: D/libEGL(24259): eglInitialize EGLDisplay = 0xef11a4e4
07-03 10:26:20.729: V/My Error(24259): start saveFrame 
07-03 10:26:20.729: V/My Error(24259): frame number 6
07-03 10:26:20.739: D/Decoder(24259): Got index 3
07-03 10:26:20.739: V/My Error 1(24259): Start
07-03 10:26:20.739: D/Decoder(24259): InputBuffer ADVANCING
07-03 10:26:20.739: V/My Error 1(24259): End2
07-03 10:26:20.739: V/My Error(24259): outIndex = 5
07-03 10:26:20.739: V/Decoder(24259): We can't use this buffer but render it due to the API limit, java.nio.DirectByteBuffer[position=0,limit=8,capacity=8]
07-03 10:26:20.739: V/sparsecounter(24259): sparsecounter = 39
07-03 10:26:20.759: V/My Error(24259): CURRENT_FRAME = 7
07-03 10:26:20.769: D/libEGL(24259): eglInitialize EGLDisplay = 0xef11a4e4
07-03 10:26:20.769: V/My Error(24259): start saveFrame 
07-03 10:26:20.769: V/My Error(24259): frame number 7
07-03 10:26:20.769: D/Decoder(24259): Got index 4
07-03 10:26:20.769: V/My Error 1(24259): Start
07-03 10:26:20.769: D/Decoder(24259): InputBuffer ADVANCING
07-03 10:26:20.769: V/My Error 1(24259): End2
07-03 10:26:20.769: V/My Error(24259): outIndex = 4

代码太复杂了,所以如果有人知道问题应该在哪里,请告诉我,我会添加具体的代码。

0 个答案:

没有答案