//qWarning() << "update"; QPixmap pixmap = this->grab(); QImage image = pixmap.toImage(); //qWarning() << "byteCount " << image.byteCount(); // BYTE * rgb = new BYTE[bufsize]; // BYTE * yuv = new BYTE[bufsize * 3 / 2]; // RGB2YUV(&pStream, &yuv, 4, 640, 480) int w = image.width(); int h = image.height(); // image.invertPixels(QImage::InvertRgb); //============================================================== AVFrame *pFrameRGB = avcodec_alloc_frame(); // Determine required buffer size and allocate buffer int numBytes1 = avpicture_get_s