当前位置: 首页 > 知识库问答 >
问题:

Kinesis视频流C++错误

贲宏硕
2023-03-14
DEBUG - Stream is ready
Error received from element source-actual-src-avfvide: Internal data stream error.
Debugging information: gstbasesrc.c(2939): void gst_base_src_loop(GstPad *) (): /GstPipeline:test-pipeline/GstAutoVideoSrc:source/GstAVFVideoSrc:source-actual-src-avfvide:
streaming stopped, reason not-negotiated (-4)
INFO - Freeing Kinesis Video Stream test

freeKinesisVideoStream(): Freeing Kinesis Video stream.DEBUG - streamDataAvailableHandler invoked
DEBUG - streamClosedHandler invoked

freeKinesisVideoClient(): Freeing Kinesis Video Client
commonHeapDebugCheckAllocator(): Heap is initialized
commonHeapDebugCheckAllocator(): Heap limit: 
536870912
commonHeapDebugCheckAllocator(): Heap size: 
0
commonHeapDebugCheckAllocator(): Number of allocations: 
0
aivHeapDebugCheckAllocator(): Allocated blocks pointer: 
0x0
aivHeapDebugCheckAllocator(): *******************************************
aivHeapDebugCheckAllocator(): *******************************************
aivHeapDebugCheckAllocator(): Free blocks pointer: 
0x107949000
aivHeapDebugCheckAllocator(): *******************************************
aivHeapDebugCheckAllocator(): Block:
0x107949000 size:
536870872
aivHeapDebugCheckAllocator(): *******************************************
heapRelease(): Freeing native heap.INFO - Curl shutdown

共有1个答案

通安宁
2023-03-14

查看源元素,就像是在Mac上一样。在开始运行sdk之前,可以尝试导出GST_Debug=4,并查找包含Creating caps事件的行。在同一行中,您应该看到width=(int)1280、height=(int)720,这是管道中协商的视频流的分辨率。在调试消息中查找此类宽度和高度信息的首次出现。它们看起来像:

avfvideosrc avfvideosrc.m:906:-[GstAVFVideoSrcImpl setCaps:]_block_invoke:<source-actual-src-avfvide> width: 1280 height: 720 format: UYVY

这是相机支持的分辨率。如果此解决方案与下游元素中设置的解决方案不一致,则将出现not-commediated错误。在您的例子中,下游元素可能没有设置720p的分辨率。可以通过将kinesis_video_gstreamer_sample_app.cpp中的第347,348,367,368行更改为

"width", GST_TYPE_INT_RANGE, 1280, 1920,
"height", GST_TYPE_INT_RANGE, 720, 1080,

更改后的值表示解决协商的下限。

 类似资料: