mobile CCTV,mobile surveillance,police body worn cameras

 forgetPW
 registerNow
search
view: 3429|reply: 8
打印 prevThread nextThread

视频流推流出错,请问是什么格式的

[copyURL]

30

主题

94

帖子

324

积分

midMem

Rank: 3Rank: 3

积分
324
jumpTo
owner
poston 2021-10-19 21:04 | authorOnly 回帖奖励 |倒序浏览 |阅读模式

    public static void inputVideoData(byte[] lpVideoFrame, int dwSize, long dwTimeStamp, int iWidth, int iHeight) {

        PUCore.getSDK().inputVideoData(lpVideoFrame, dwSize, dwTimeStamp, iWidth, iHeight);
        BVCU.getData().inputVideoData(lpVideoFrame, dwSize, dwTimeStamp, iWidth, iHeight);

        if (global_mcu.getMcuShareDate().getPlatformIndex() == PlatformSettingActivity.Platform_28181) {
            BV28181.getData().inputVideoData(lpVideoFrame, dwSize, dwTimeStamp, iWidth, iHeight);
        } else if (global_mcu.getMcuShareDate().getPlatformIndex() == PlatformSettingActivity.Platform_RtspServer) {
            BVRtspServer.getInstance().inputVideoData(lpVideoFrame, dwSize, dwTimeStamp, iWidth, iHeight);
        }
    }

红色标注的出错了。


2021-10-19 20:36:54.783 16720-16720/? A/DEBUG: backtrace:
2021-10-19 20:36:54.783 16720-16720/? A/DEBUG:       #00 pc 0003382c  /apex/com.android.runtime/lib/bionic/libc.so (arena_run_heap_remove+1312) (BuildId: 86eafa5c12a5d92a0234bc4649e9b5e8)
2021-10-19 20:36:54.783 16720-16720/? A/DEBUG:       #01 pc 000331b3  /apex/com.android.runtime/lib/bionic/libc.so (arena_run_split_remove+286) (BuildId: 86eafa5c12a5d92a0234bc4649e9b5e8)
2021-10-19 20:36:54.783 16720-16720/? A/DEBUG:       #02 pc 000345f7  /apex/com.android.runtime/lib/bionic/libc.so (arena_run_split_small+142) (BuildId: 86eafa5c12a5d92a0234bc4649e9b5e8)
2021-10-19 20:36:54.783 16720-16720/? A/DEBUG:       #03 pc 0002e2bb  /apex/com.android.runtime/lib/bionic/libc.so (arena_bin_malloc_hard+382) (BuildId: 86eafa5c12a5d92a0234bc4649e9b5e8)
2021-10-19 20:36:54.783 16720-16720/? A/DEBUG:       #04 pc 0002decb  /apex/com.android.runtime/lib/bionic/libc.so (je_arena_tcache_fill_small+174) (BuildId: 86eafa5c12a5d92a0234bc4649e9b5e8)
2021-10-19 20:36:54.783 16720-16720/? A/DEBUG:       #05 pc 00049fe5  /apex/com.android.runtime/lib/bionic/libc.so (je_tcache_alloc_small_hard+16) (BuildId: 86eafa5c12a5d92a0234bc4649e9b5e8)
2021-10-19 20:36:54.783 16720-16720/? A/DEBUG:       #06 pc 0003f3b1  /apex/com.android.runtime/lib/bionic/libc.so (je_calloc+656) (BuildId: 86eafa5c12a5d92a0234bc4649e9b5e8)
2021-10-19 20:36:54.783 16720-16720/? A/DEBUG:       #07 pc 0002a191  /apex/com.android.runtime/lib/bionic/libc.so (calloc+24) (BuildId: 86eafa5c12a5d92a0234bc4649e9b5e8)
2021-10-19 20:36:54.783 16720-16720/? A/DEBUG:       #08 pc 0000c9fb  /data/app/com.rokid.smarteye.dev-aKPr7tyS24Z76zbCvq4BqA==/lib/arm/libBugly.so (getProcessName+14) (BuildId: 300e8325e67d6fc6c209450a33e8f85a292b8797)
2021-10-19 20:36:54.783 16720-16720/? A/DEBUG:       #09 pc 000064c9  /data/app/com.rokid.smarteye.dev-aKPr7tyS24Z76zbCvq4BqA==/lib/arm/libBugly.so (BuildId: 300e8325e67d6fc6c209450a33e8f85a292b8797)
2021-10-19 20:36:54.783 16720-16720/? A/DEBUG:       #10 pc 000033bb  /system/bin/app_process32 (art::SignalChain::Handler(int, siginfo*, void*)+218) (BuildId: 3828d29d4d168f5ce591a33e42fd0f43)
2021-10-19 20:36:54.783 16720-16720/? A/DEBUG:       #11 pc 0004ea90  /apex/com.android.runtime/lib/bionic/libc.so (__restore_rt) (BuildId: 86eafa5c12a5d92a0234bc4649e9b5e8)
2021-10-19 20:36:54.783 16720-16720/? A/DEBUG:       #12 pc 0003413c  /apex/com.android.runtime/lib/bionic/libc.so (arena_bin_nonfull_run_tryget+24) (BuildId: 86eafa5c12a5d92a0234bc4649e9b5e8)
2021-10-19 20:36:54.784 16720-16720/? A/DEBUG:       #13 pc 0002e163  /apex/com.android.runtime/lib/bionic/libc.so (arena_bin_malloc_hard+38) (BuildId: 86eafa5c12a5d92a0234bc4649e9b5e8)
2021-10-19 20:36:54.784 16720-16720/? A/DEBUG:       #14 pc 0002decb  /apex/com.android.runtime/lib/bionic/libc.so (je_arena_tcache_fill_small+174) (BuildId: 86eafa5c12a5d92a0234bc4649e9b5e8)
2021-10-19 20:36:54.784 16720-16720/? A/DEBUG:       #15 pc 00049fe5  /apex/com.android.runtime/lib/bionic/libc.so (je_tcache_alloc_small_hard+16) (BuildId: 86eafa5c12a5d92a0234bc4649e9b5e8)
2021-10-19 20:36:54.784 16720-16720/? A/DEBUG:       #16 pc 0003df01  /apex/com.android.runtime/lib/bionic/libc.so (je_malloc+596) (BuildId: 86eafa5c12a5d92a0234bc4649e9b5e8)
2021-10-19 20:36:54.784 16720-16720/? A/DEBUG:       #17 pc 0002a253  /apex/com.android.runtime/lib/bionic/libc.so (malloc+18) (BuildId: 86eafa5c12a5d92a0234bc4649e9b5e8)
2021-10-19 20:36:54.784 16720-16720/? A/DEBUG:       #18 pc 00046cc5  /system/lib/libc++.so (operator new(unsigned int)+16) (BuildId: fa0397c630f1e14558b6409ed72175a4)
2021-10-19 20:36:54.784 16720-16720/? A/DEBUG:       #19 pc 000a4ce1  /system/lib/libstagefright.so (android::MediaCodec::dequeueInputBuffer(unsigned int*, long long)+32) (BuildId: 45e042a01c822aa959a187af6e6a4155)
2021-10-19 20:36:54.784 16720-16720/? A/DEBUG:       #20 pc 0000dc01  /system/lib/libmediandk.so (AMediaCodec_dequeueInputBuffer+20) (BuildId: 4a7af1c45b6319f41551e53c94ac9eb7)
2021-10-19 20:36:54.784 16720-16720/? A/DEBUG:       #21 pc 0003c37d  /data/app/com.rokid.smarteye.dev-aKPr7tyS24Z76zbCvq4BqA==/lib/arm/libbvcu.so (VideoEncode::encodeFrame(_SAV_Frame*)+232) (BuildId: 1ed5513f502d373d09f26e6f31a53cd716bc7f04)
2021-10-19 20:36:54.784 16720-16720/? A/DEBUG:       #22 pc 0002af21  /data/app/com.rokid.smarteye.dev-aKPr7tyS24Z76zbCvq4BqA==/lib/arm/libbvcu.so (CodecThread::videoEncProcess(PUDialog*)+152) (BuildId: 1ed5513f502d373d09f26e6f31a53cd716bc7f04)
2021-10-19 20:36:54.784 16720-16720/? A/DEBUG:       #23 pc 0002b42d  /data/app/com.rokid.smarteye.dev-aKPr7tyS24Z76zbCvq4BqA==/lib/arm/libbvcu.so (CodecThread::run()+152) (BuildId: 1ed5513f502d373d09f26e6f31a53cd716bc7f04)
2021-10-19 20:36:54.784 16720-16720/? A/DEBUG:       #24 pc 00005025  /data/app/com.rokid.smarteye.dev-aKPr7tyS24Z76zbCvq4BqA==/lib/arm/libframework.so (SimpleThread::__run(void*)+24) (BuildId: b0143d7bdbf61b2cf079b55ffe2414b85b5c24f9)
2021-10-19 20:36:54.784 16720-16720/? A/DEBUG:       #25 pc 0009c547  /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+20) (BuildId: 86eafa5c12a5d92a0234bc4649e9b5e8)
2021-10-19 20:36:54.784 16720-16720/? A/DEBUG:       #26 pc 000559f7  /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30) (BuildId: 86eafa5c12a5d92a0234bc4649e9b5e8)
2021-10-19 20:36:55.100 1549-3046/? E/WifiPermissionsUtil: getUidPermission is DENIED and permissionType android.permission.ACCESS_FINE_LOCATIONuid 10034
2021-10-19 20:36:55.100 1549-3046/? E/WifiService: enforceCanAccessScanResults: hiding ssid and bssidUID 10034 has no location permission
2021-10-19 20:36:55.102 1549-3046/? E/WifiService: enforceCanAccessScanResults: hiding ssid and bssidUID 10034 has no location permission
2021-10-19 20:36:55.104 1549-3046/? E/WifiService: enforceCanAccessScanResults: hiding ssid and bssidUID 10034 has no location permission
2021-10-19 20:36:55.104 1549-3046/? E/WifiPermissionsUtil: getUidPermission is DENIED and permissionType android.permission.ACCESS_FINE_LOCATIONuid 10034
2021-10-19 20:36:55.105 1549-3031/? E/WifiPermissionsUtil: getUidPermission is DENIED and permissionType android.permission.ACCESS_FINE_LOCATIONuid 10034
2021-10-19 20:36:55.105 1549-3031/? E/WifiService: enforceCanAccessScanResults: hiding ssid and bssidUID 10034 has no location permission

===========================    上面是崩溃的Log信息   ============================================================
reply

使用道具 report

13

主题

373

帖子

2037

积分

vipMem

Rank: 6Rank: 6

积分
2037
sofa
poston 2021-10-19 21:08 | authorOnly
should be NV21
reply agree Against

使用道具 report

4

主题

70

帖子

242

积分

midMem

Rank: 3Rank: 3

积分
242
bench
poston 2021-10-19 21:11 | authorOnly
我们程序使用的是NV21,看日志是编码相关的错误

本帖子中包含更多资源

pls login 才可以下载或查看,没有帐号?registerNow

x
reply agree Against

使用道具 report

30

主题

94

帖子

324

积分

midMem

Rank: 3Rank: 3

积分
324
ground
 Owner| poston 2021-10-19 21:19 | authorOnly
如果我们用h264的编码, 可以调用哪个接口呢?
reply agree Against

使用道具 report

4

主题

70

帖子

242

积分

midMem

Rank: 3Rank: 3

积分
242
5#
poston 2021-10-19 21:25 | authorOnly
编码是SDK内部完成,java层只需要调用inputVideoData接口将nv21的数据传入即可
reply agree Against

使用道具 report

4

主题

70

帖子

242

积分

midMem

Rank: 3Rank: 3

积分
242
6#
poston 2021-10-19 21:27 | authorOnly
PUCore.getSDK().inputVideoData(lpVideoFrame, dwSize, dwTimeStamp, iWidth, iHeight);
此方法是将数据传入库中用于视频录制,将时间等信息叠加上

BVCU.getData().inputVideoData(lpVideoFrame, dwSize, dwTimeStamp, iWidth, iHeight);
此方法用于smarteye平台网传,内部会自动编码并完成传输
reply agree Against

使用道具 report

30

主题

94

帖子

324

积分

midMem

Rank: 3Rank: 3

积分
324
7#
 Owner| poston 2021-10-19 21:40 | authorOnly
我在文档
http://up.besovideo.com:7780/android_sdk_bvcu_api/index.html
中发现了
int inputEncodeVideoData(int hDialog, byte[] data, int size, long stamp, int dataType)这个方法,

这个方法不是支持264的么?  这个可以拿到么?
reply agree Against

使用道具 report

4

主题

70

帖子

242

积分

midMem

Rank: 3Rank: 3

积分
242
8#
poston 2021-10-19 21:47 | authorOnly
这个目前还不能用,内部逻辑还没完善
reply agree Against

使用道具 report

4

主题

70

帖子

242

积分

midMem

Rank: 3Rank: 3

积分
242
9#
poston 2021-10-20 09:20 | authorOnly
查看代码,inputEncodeVideoData可以使用,使用方法如下:
打开网传成功时会回调BVCU_PasvDialogCmd的OnDialogCmd方法,然后调用
BVCU.getData().inputEncodeVideoChannelData(pParam.pTarget[0].iIndexMajor, data, data.length,
                                    System.currentTimeMillis() * 1000, IData.VIDEO_DATA_TYPE_H264_EXTRA_DATA);
将拓展数据 sps pps传入
然后调用
BVCU.getData().inputEncodeVideoChannelData(channel, data, data.length,
                                        System.currentTimeMillis() * 1000, IData.VIDEO_DATA_TYPE_H264_FRAME); // channel是通道号,一般默认0即可
reply agree Against

使用道具 report

creditRule

QQ|wireless surveillance

GMT+8, 2024-12-22 09:12 , Processed in 0.061525 second(s), 20 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

QuickReply backToTop BackToList