12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- #include "PlayerGlobalInfo.h"
- /* 移动构造函数 */
- Image_YUV420::Image_YUV420(Image_YUV420&& other)
- {
- yData = std::move(other.yData);
- uData = std::move(other.uData);
- vData = std::move(other.vData);
- width = other.width;
- height = other.height;
- }
- /* 拷贝构造函数 */
- Image_YUV420::Image_YUV420(const Image_YUV420& other)
- {
- yData = other.yData;
- uData = other.uData;
- vData = other.vData;
- width = other.width;
- height = other.height;
- }
- /* 重载= */
- Image_YUV420& Image_YUV420::operator=(const Image_YUV420& other)
- {
- yData = other.yData;
- uData = other.uData;
- vData = other.vData;
- width = other.width;
- height = other.height;
- return *this;
- }
- Image_QImage::Image_QImage()
- {
- width = 0;
- height = 0;
- /* 设置为RGB888 */
- image = QImage(1, 1, QImage::Format_RGB888);
- }
- /* 移动构造函数 */
- Image_QImage::Image_QImage(Image_QImage&& other)
- {
- width = other.width;
- height = other.height;
- image = std::move(other.image);
- }
- /* 拷贝构造函数 */
- Image_QImage::Image_QImage(const Image_QImage& other)
- {
- width = other.width;
- height = other.height;
- image = other.image;
- }
- /* 重载= */
- Image_QImage& Image_QImage::operator=(const Image_QImage& other)
- {
- width = other.width;
- height = other.height;
- image = other.image;
- return *this;
- }
- /* 移动幅值函数 */
- void Image_QImage::moveFrom(Image_QImage& other)
- {
- width = other.width;
- height = other.height;
- image = std::move(other.image);
- }
|