if (!yplane || !uplane || !vplane) {
RTC_LOG(LS_INFO) << "ELSCU yplane uplane vplane buffer is NULL";
} else {
RTC_LOG(LS_INFO) << "ELSCU write buffer";
std::fstream ifs;
ifs.open("/sdcard/capturedI420Buf2.yuv", std::ios::out | std::ios::binary);
ifs.write(reinterpret_cast<const char *>(yplane), stride*h);
ifs.write(reinterpret_cast<const char *>(uplane), stride*h/4);
ifs.write(reinterpret_cast<const char *>(vplane), stride*h/4);
ifs.close();
}
连续dump
RTC_LOG(LS_INFO) << "ELSCU write buffer";
std::fstream ifs;
std::string finalpath ="/sdcard/capturedbuff" + std::to_string(frameCount) + ".I420";
ifs.open(finalpath, std::ios::out | std::ios::binary);
ifs.write(reinterpret_cast<const char *>(yplane), stride * h);
ifs.write(reinterpret_cast<const char *>(uplane), stride * h / 4);
ifs.write(reinterpret_cast<const char *>(vplane), stride * h / 4);
ifs.close();