cc6a2f7af6
GitOrigin-RevId: 73d686c40057684f8bfaca285368bf1813f9fc26
24 lines
674 B
C++
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_
|