M300RTK 视频解码

Completed

Comments

12 comments

  • DJI Developer Support
    resetKeyFrame是跟解码器重新申请I帧,其他机型不需要这个函数,唯独M300需要。这是因为M300本身的输出的码流不带PPS,SPS和I帧,是一种特殊的编码方式。
    0
    Comment actions Permalink
  • 博尔

    如果不使用 DJICodecManager,直接通过VideoFeeder回调数据,怎么实现

    0
    Comment actions Permalink
  • DJI Developer Support
    mReceivedVideoDataListener = new VideoFeeder.VideoDataListener() 你可以直接init一个getPrimaryVideoFeed拿到数据,不需要DJICodecManager或者其他。
    0
    Comment actions Permalink
  • 博尔
    public void onReceive(byte[] bytes, int size) {
    这个bytes是啥类型数据?
    如果解码怎么获取关键帧等参数
    0
    Comment actions Permalink
  • DJI Developer Support
    bytes是字节数组,保存下来后你可以尝试用FFMPEG解析。
    0
    Comment actions Permalink
  • 博尔
    使用 djivideojni 和 MediaCodec 对 public void onReceive(byte[] bytes, int size) 返回数据怎么处理?
    M300RTK 码流不带PPS,SPS和I帧怎么解码?
    0
    Comment actions Permalink
  • DJI Developer Support
    M300比较特殊,你从getPrimaryVideoFeed里面拿到这种特殊的码流,送到DJICodecManager里面之后,就可以从ProvideTranscodedFeed中获取标准H.264码流了。
    1
    Comment actions Permalink
  • 博尔

    首先我现在不需要在UI 上面显示视频,所以DJICodecManager我不知道该怎么获取,在api中只有下面两个构造

    DJICodecManager(Context context, SurfaceTexture surfaceTexture,int width,int height)
    DJICodecManager(Context context, SurfaceHolder surfaceHolder, int width, int height)
    SurfaceTexture 和 SurfaceHolder 目前我都没有用到。所以不知道该怎么获取到DJICodecManager。
    0
    Comment actions Permalink
  • DJI Developer Support
    你现在需要用视频流做什么,DJICodecManager你需要构造一个出来,而且必须绑定surface,如果你想要取yuv数据,直接把surface那里传null就行了。
    0
    Comment actions Permalink
  • 博尔

    ok了  已经解决了   多谢

    0
    Comment actions Permalink
  • 博尔

    主要还是因为 provideTranscodedVideoFeed,其他机型VideoFeeder.getInstance().getPrimaryVideoFeed().addVideoDataListener 直接就ok 了。

    0
    Comment actions Permalink
  • DJI Developer Support
    是的,M300是最特殊的机型。
    0
    Comment actions Permalink

Please sign in to leave a comment.