PlayerGlobalInfo.cpp 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #include "PlayerGlobalInfo.h"
  2. /* 移动构造函数 */
  3. Image_YUV420::Image_YUV420(Image_YUV420&& other)
  4. {
  5. yData = std::move(other.yData);
  6. uData = std::move(other.uData);
  7. vData = std::move(other.vData);
  8. width = other.width;
  9. height = other.height;
  10. }
  11. /* 拷贝构造函数 */
  12. Image_YUV420::Image_YUV420(const Image_YUV420& other)
  13. {
  14. yData = other.yData;
  15. uData = other.uData;
  16. vData = other.vData;
  17. width = other.width;
  18. height = other.height;
  19. }
  20. /* 重载= */
  21. Image_YUV420& Image_YUV420::operator=(const Image_YUV420& other)
  22. {
  23. yData = other.yData;
  24. uData = other.uData;
  25. vData = other.vData;
  26. width = other.width;
  27. height = other.height;
  28. return *this;
  29. }
  30. Image_QImage::Image_QImage()
  31. {
  32. width = 0;
  33. height = 0;
  34. /* 设置为RGB888 */
  35. image = QImage(1, 1, QImage::Format_RGB888);
  36. }
  37. /* 移动构造函数 */
  38. Image_QImage::Image_QImage(Image_QImage&& other)
  39. {
  40. width = other.width;
  41. height = other.height;
  42. image = std::move(other.image);
  43. }
  44. /* 拷贝构造函数 */
  45. Image_QImage::Image_QImage(const Image_QImage& other)
  46. {
  47. width = other.width;
  48. height = other.height;
  49. image = other.image;
  50. }
  51. /* 重载= */
  52. Image_QImage& Image_QImage::operator=(const Image_QImage& other)
  53. {
  54. width = other.width;
  55. height = other.height;
  56. image = other.image;
  57. return *this;
  58. }
  59. /* 移动幅值函数 */
  60. void Image_QImage::moveFrom(Image_QImage& other)
  61. {
  62. width = other.width;
  63. height = other.height;
  64. image = std::move(other.image);
  65. }