mirror of
https://gitee.com/openharmony/xts_dcts
synced 2024-11-27 01:40:46 +00:00
!257 xts_dcts——Surface Refactoring step 1:separate IConsumerSurface from Surface
Merge pull request !257 from MingZhu/lmz_remote
This commit is contained in:
commit
98b240d002
@ -25,7 +25,7 @@ StreamCustomer::~StreamCustomer() {}
|
||||
sptr<OHOS::IBufferProducer> StreamCustomer::CreateProducer(CaptureMode mode,
|
||||
const std::function<void(void*, uint32_t)> callback)
|
||||
{
|
||||
consumer_ = OHOS::Surface::CreateSurfaceAsConsumer();
|
||||
consumer_ = OHOS::IConsumerSurface::Create();
|
||||
if (consumer_ == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "constants.h"
|
||||
#include "camera.h"
|
||||
#include "distributed_hardware_log.h"
|
||||
#include "iconsumer_surface.h"
|
||||
#include "v1_0/ioffline_stream_operator.h"
|
||||
|
||||
namespace OHOS {
|
||||
@ -39,7 +40,7 @@ typedef enum {
|
||||
|
||||
class TestBuffersConsumerListener : public IBufferConsumerListener {
|
||||
public:
|
||||
TestBuffersConsumerListener(const sptr<Surface>& surface,
|
||||
TestBuffersConsumerListener(const sptr<IConsumerSurface>& surface,
|
||||
const std::function<void(void*, const uint32_t)> callback):callback_(callback), consumer_(surface)
|
||||
{
|
||||
}
|
||||
@ -73,7 +74,7 @@ public:
|
||||
}
|
||||
private:
|
||||
std::function<void(void*, uint32_t)> callback_;
|
||||
sptr<Surface> consumer_;
|
||||
sptr<IConsumerSurface> consumer_;
|
||||
};
|
||||
|
||||
class StreamCustomer {
|
||||
@ -84,7 +85,7 @@ public:
|
||||
const std::function<void(void*, uint32_t)> callback);
|
||||
|
||||
private:
|
||||
sptr<OHOS::Surface> consumer_ = nullptr;
|
||||
sptr<OHOS::IConsumerSurface> consumer_ = nullptr;
|
||||
};
|
||||
} // namespace OHOS::Camera
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user