MSDK中视频源概念

Completed

Comments

5 comments

  • DJI Developer Support
    assignSourceToPrimaryChannel是分配视频源,定义主路和副路图传到底是什么相机的视频源。DJICodecManager的构造函数不是你描述的DJICodecManager.VideoSource.CAMERA啊,他的构造函数参数分别是Context,SurfaceTexture和两个int。
    0
    Comment actions Permalink
  • 糖醋咸鱼

    DJICodecManager有一个构造函数的签名是这样的:

    0
    Comment actions Permalink
  • DJI Developer Support
    文档没有开出的构造函数不建议使用,这个应该是内部的一个使用方法。
    0
    Comment actions Permalink
  • 糖醋咸鱼

    当需要通过Payload.setVideoDataReceivedCallback接口解析并显示视频流时,需要使用一下方法构建使用DJICodecManager对象才能正常播放:

    • 通过DJICodecManager(Context, SurfaceHolder, int, int, DJICodecManager.VideoSource)构建DJICodecManager对象
    • 通过sendDataToDecoder(byte[], int, VideoSource)接口传输获取到的Payload视频数据

    其中VideoSource对象都设置为DJICodecManager.VideoSource.SECONDARY_CAMERA,目前我的疑问是这个SECONDARY_CAMERA字段的意义是什么?

    目前DJICodecManager.VideoSource枚举对象包含了:CAMERA、FPV、SECONDARY_CAMERA

    如果存在多Camera对象、多Payload对象情况下,分别需要设置为什么才能正常获取对应云台的视频流?

    0
    Comment actions Permalink
  • DJI Developer Support
    SECONDARY_CAMERA指得是副路图传,也就是你assignSourceToPrimaryChannel的第二个参数。主路和副路是由assignSourceToPrimaryChannel定义的,DJICodecManager(Context, SurfaceHolder, int, int, DJICodecManager.VideoSource)决定得是这个解码器解哪一路图传,宽高多少,在哪个surface显示。多路图传你就需要多个DJICodecManager。
    0
    Comment actions Permalink

Please sign in to leave a comment.