1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- #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_YUV420& Image_YUV420::operator=(Image_YUV420&& other)
- {
- yData = std::move(other.yData);
- uData = std::move(other.uData);
- vData = std::move(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);
- }
|