#ifndef MEDIA_H #define MEDIA_H #include #include #include #include #include #define YUV420 1 #define YUV422 2 // YUV 转换为 RGB 的辅助函数 void yuvToRgb(int y, int u, int v, int& r, int& g, int& b); // 转换YUV422 QImage convertYUV422ToQImage(const QByteArray& yuv422Data, int width, int height); QImage convertYUV420ToQImage(const QByteArray& yuv420Data, int width, int height); // 显示图片和视频的函数 void showPic(QLabel* leftLens_m_imageLabel, QLabel* rightLens_m_imageLabel, const QString& client, const QByteArray& valData); //void showVideo(QLabel* videoLabel, const QString& client, const QByteArray& valData); #endif // MEDIA_H