void init() { if (pixfmt_ff == QTAV_PIX_FMT_C(NONE)) { qWarning("Invalid pixel format"); return; } planes = qMax(av_pix_fmt_count_planes(pixfmt_ff), 0); bpps.resize(planes); bpps_pad.resize(planes); pixdesc = const_cast<AVPixFmtDescriptor*>(av_pix_fmt_desc_get(pixfmt_ff)); if (!pixdesc) return; initBpp(); }
void init() { // TODO: what if other formats not supported by ffmpeg? give attributes in QtAV? if (pixfmt_ff == QTAV_PIX_FMT_C(NONE)) { qWarning("Invalid pixel format"); return; } planes = qMax(av_pix_fmt_count_planes(pixfmt_ff), 0); bpps.reserve(planes); channels.reserve(planes); bpps.resize(planes); channels.resize(planes); pixdesc = const_cast<AVPixFmtDescriptor*>(av_pix_fmt_desc_get(pixfmt_ff)); if (!pixdesc) return; initBpp(); }
void init() { // FIXME: hack for invalid ffmpeg formats if (pixfmt == VideoFormat::Format_VYUY) { pixfmt_ff = QTAV_PIX_FMT_C(UYVY422); } // TODO: what if other formats not supported by ffmpeg? give attributes in QtAV? if (pixfmt_ff == QTAV_PIX_FMT_C(NONE)) { qWarning("Invalid pixel format"); return; } planes = qMax(av_pix_fmt_count_planes(pixfmt_ff), 0); bpps.resize(planes); bpps_pad.resize(planes); pixdesc = const_cast<AVPixFmtDescriptor*>(av_pix_fmt_desc_get(pixfmt_ff)); if (!pixdesc) return; initBpp(); }