나는 openmax의 코덱을 사용하여 안드로이드 화상 회의 응용 프로그램을 작성하려고합니다. avc 디코딩을 위해 OpenMAX IL을 사용했을 때 빈 버퍼 명령을 보내면 버퍼가 채워지는 대기 시간이 커졌습니다. 완료 콜백. 제 경우는 B-Slices가없는 4-cif h.264 기본 스트림을 다루고 있습니다. omx의 호출 순서는 다음과 같습니다.openmax avc 디코더의 대기 시간을 단축하는 방법은 무엇입니까?
- avc 디코딩 역할의 openmax 노드를 할당합니다.
- 중계 노드 상태를 유휴 상태로 전환합니다.
- 포트 정의를 구성합니다.
- 입력 및 출력 포트에 버퍼를 할당합니다.
- transit 노드가 실행 중임을 나타냅니다.
- 빈 버퍼 용으로 하나의 스레드를 시작하고 채우기 버퍼 용으로 다른 스레드를 시작하십시오.
로그 출력 도착 메시지 FILL_BUFFER_DONE # 1에 송신되는 빈 버퍼 # 9 명령 8 프레임 대기 시간 있다는 것을 나타낸다. 나는 삼성 전자 -not2와 htc-one-x 및 일부 다른 휴대 전화에서 이것을 테스트했다. 에는 모두 큰 디코딩 대기 시간이있다.
이 대기 시간은 화상 회의 앱이 수락 할 때 커집니다. 이 대기 시간을 단축하는 데 도움을 줄 수있는 사람은 누구입니까?
로그 출력은 간다 : 나는 상대적으로 대기 시간을 신경 아니라 시간 단위의 대기 시간을 측정하고 대기 시간이 생성되는 위치를 식별하려고하지 않을
I/java:TestKdavc(19867): video test started
I/java:TestKdavc(19867): set video source: /sdcard/DCIM/vidrev.dat
I/testkdavc/testkdavc.cpp(19867): [[email protected]] frame dimesion: 704 x 576
I/OMXClient(19867): Using client-side OMX mux.
D/avc/omxctrl.cpp(19867): [[email protected]] mComType = 1
D/avc/omxctrl.cpp(19867): [[email protected]] tid = 1074982704
D/avc/omxctrl.cpp(19867): [[email protected]] m_node = 4136a16c
D/avc/omxctrl.cpp(19867): [[email protected]] nPorts = 2, iport = 0, oport = 1
D/avc/omxctrl.cpp(19867): [[email protected]] mComType = 1, port = 0, info.nBufferCountActual = 5, info.nBufferSize = 50688, info.nBufferCountMin = 5
D/avc/omxctrl.cpp(19867): [[email protected]] mComType = 1, port = 1, info.nBufferCountActual = 2, info.nBufferSize = 608256, info.nBufferCountMin = 2
D/avc/omxctrl.cpp(19867): [[email protected]] mComType = 1, portIndex = 0, def.nBufferCountActual = 5, def.nBufferSize = 608256, def.nBufferCountMin = 5, buffersize = 608256
D/avc/omxctrl.cpp(19867): [[email protected]] before useBuffer
D/avc/omxctrl.cpp(19867): [[email protected]] before useBuffer
D/avc/omxctrl.cpp(19867): [[email protected]] before useBuffer
D/avc/omxctrl.cpp(19867): [[email protected]] before useBuffer
D/avc/omxctrl.cpp(19867): [[email protected]] before useBuffer
D/avc/omxctrl.cpp(19867): [[email protected]] mComType = 1, portIndex = 1, def.nBufferCountActual = 2, def.nBufferSize = 608256, def.nBufferCountMin = 2, buffersize = 608256
D/avc/omxctrl.cpp(19867): [[email protected]] before allocateBufferWithBackup
D/avc/omxctrl.cpp(19867): [[email protected]] before allocateBufferWithBackup
D/avc/omxctrl.cpp(19867): [[email protected]] mComType: 1, OMX_CommandStateSet, state: 2
I/avc/omxctrl.cpp(19867): [[email protected]] message type: EVENT
D/avc/omxctrl.cpp(19867): [[email protected]] mComType: 1, OMX_CommandStateSet, state: 3
I/avc/omxctrl.cpp(19867): [[email protected]] message type: EVENT
D/avc/omxctrl.cpp(19867): [[email protected]] mComType = 1, m_vecOutputBuffers.size() = 2, err = 0
I/testkdavc/testkdavc.cpp(19867): [[email protected]] found AVC/H264 decoder: OMX.SEC.AVC.Decoder, color format: OMX_COLOR_FormatYUV420Planar
I/testkdavc/testkdavc.cpp(19867): [[email protected]] start feed
I/avc/omxctrl.cpp(19867): [[email protected]] empty buffer #1
I/avc/omxctrl.cpp(19867): [[email protected]] empty buffer #2
I/avc/omxctrl.cpp(19867): [[email protected]] empty buffer #3
I/avc/omxctrl.cpp(19867): [[email protected]] empty buffer #4
I/avc/omxctrl.cpp(19867): [[email protected]] empty buffer #5
I/avc/omxctrl.cpp(19867): [[email protected]] fill buffer #1
I/avc/omxctrl.cpp(19867): [[email protected]] fill buffer #2
I/avc/omxctrl.cpp(19867): [[email protected]] message type: EMPTY_BUFFER_DONE #1
I/avc/omxctrl.cpp(19867): [[email protected]] empty buffer #6
I/avc/omxctrl.cpp(19867): [[email protected]] message type: EMPTY_BUFFER_DONE #2
I/avc/omxctrl.cpp(19867): [[email protected]] empty buffer #7
I/avc/omxctrl.cpp(19867): [[email protected]] message type: EMPTY_BUFFER_DONE #3
I/avc/omxctrl.cpp(19867): [[email protected]] empty buffer #8
I/avc/omxctrl.cpp(19867): [[email protected]] message type: EMPTY_BUFFER_DONE #4
I/avc/omxctrl.cpp(19867): [[email protected]] empty buffer #9
I/avc/omxctrl.cpp(19867): [[email protected]] message type: FILL_BUFFER_DONE #1
I/testkdavc/testkdavc.cpp(19867): [[email protected]] get frame #1 of 704 x 576
I/avc/omxctrl.cpp(19867): [[email protected]] message type: EMPTY_BUFFER_DONE #5
I/avc/omxctrl.cpp(19867): [[email protected]] fill buffer #3
I/avc/omxctrl.cpp(19867): [[email protected]] empty buffer #10
I/avc/omxctrl.cpp(19867): [[email protected]] message type: FILL_BUFFER_DONE #2
I/testkdavc/testkdavc.cpp(19867): [[email protected]] get frame #2 of 704 x 576
I/avc/omxctrl.cpp(19867): [[email protected]] message type: EMPTY_BUFFER_DONE #6
I/testkdavc/testkdavc.cpp(19867): [[email protected]] retry put data
I/avc/omxctrl.cpp(19867): [[email protected]] message type: FILL_BUFFER_DONE #3
I/testkdavc/testkdavc.cpp(19867): [[email protected]] get frame #3 of 704 x 576
실제 상황을 모방하기 위해 일부 Sleep을 PushData 스레드에 추가 한 후 (예 : 각 비어있는 버퍼 명령을 보낸 후 40ms를 대기) SamSung Note2에서 대기 시간이 4 프레임 미만으로 단축됩니다. 하지만 내가 원하는 것은 프레임 기반의 지연없이 IOMX를 제어하는 방법을 찾는 것입니다. – Zighouse