mediapipe/mediapipe/gpu/image_frame_view.h
MediaPipe Team cc6a2f7af6 Project import generated by Copybara.
GitOrigin-RevId: 73d686c40057684f8bfaca285368bf1813f9fc26
2022-03-21 12:12:39 -07:00

24 lines
674 B
C++

#ifndef MEDIAPIPE_GPU_IMAGE_FRAME_VIEW_H_
#define MEDIAPIPE_GPU_IMAGE_FRAME_VIEW_H_
#include "mediapipe/framework/formats/image_frame.h"
#include "mediapipe/gpu/gpu_buffer_storage.h"
namespace mediapipe {
namespace internal {
template <>
class ViewProvider<ImageFrame> {
public:
virtual ~ViewProvider() = default;
virtual std::shared_ptr<const ImageFrame> GetReadView(
types<ImageFrame>, std::shared_ptr<GpuBuffer> gpu_buffer) const = 0;
virtual std::shared_ptr<ImageFrame> GetWriteView(
types<ImageFrame>, std::shared_ptr<GpuBuffer> gpu_buffer) = 0;
};
} // namespace internal
} // namespace mediapipe
#endif // MEDIAPIPE_GPU_IMAGE_FRAME_VIEW_H_