DvppRgbMemory.hpp 647 Bytes
#include<string>

#include "dvpp_headers.h"

using namespace std;

class DvppRgbMemory : public DeviceRgbMemory
{
public:
     DvppRgbMemory(int _channel, int _width, int _height, int _size, string _id, string _dev_id, bool _key_frame)
     :DeviceRgbMemory(_channel, _width, _height, _id, _dev_id, _key_frame, false){
        data_size = _size;
        int ret = acldvppMalloc((void **)&pHwRgb, data_size);
        if(ret != ACL_ERROR_NONE){
            cout << "acldvppMalloc failed" << endl;
        }
    }

    ~DvppRgbMemory(){
        if (pHwRgb) {
            acldvppFree((uint8_t*)pHwRgb);
            pHwRgb = nullptr;
        }
    }
};