Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    t113多路解码占用cpu到100%

    T Series
    1
    1
    161
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      likaienjoy LV 3 last edited by likaienjoy

      我现在需要解码4路15帧的h264视频
      AWStreamPlayer* pPlayerNew[4];
      for(int i = 0; i < 4; i++)
      {
      pPlayerNew[i] = AWStreamPlayer::create(&decodeParam);
      }
      解码的时候:
      while (decodePos < fileSize)
      {
      readTmpLen = ((fileSize - decodePos) < intputLen) ? (fileSize - decodePos) : intputLen;
      fread(inputBuf, 1, readTmpLen, inFile);
      nalLen = 0;
      ret = find264NALFragment((char*)inputBuf, readTmpLen, &nalLen);
      if (nalLen < 4) {
      ALOGD("find264NALFragment fail nalLen:%d,ret:%d", nalLen, ret);
      break;
      }
      ret = pPlayerNew[0]->decodeFrameDrectly((unsigned char *)inputBuf, nalLen);

          decodePos += nalLen;
          fseek(inFile, decodePos, SEEK_SET); //go to the real decode position.
          
           if (decodePos >= fileSize)
           {
               decodePos = 0;
               fseek(inFile, 0, SEEK_SET);
           }        
      }  
      for(int i = 0; i < 4; i++)
      {
      	AWStreamPlayer::destroy(pPlayerNew[i]);
      }
      

      发现create调用了initial函数里面的InitializeVideoDecoder会卡死cpu到100%。怎么解决?只是解码1路视频流,但是cpu会卡死

      1 Reply Last reply Reply Quote Share 0
      • 1 / 1
      • First post
        Last post

      Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

      行为准则 | 用户协议 | 隐私权政策