Summary:
Introducing new toBlob API that works directly on the ImageHostObject rather than fetching the instance from the JSContext. This is a step towards deprecating the NativeJSRef in favor of a full JSI supported API.
(temporarily changed the blobType to Blob::kBlobTypeImageRGB + std::string("new_func") to differentiate between the toBlob(std::string& refId) and std::unique_ptr<torchlive::media::Blob> toBlob(std::shared_ptr<IImage> image) function calls
(temporarily changed the blobType to Blob::kBlobTypeImageRGB + std::string("new_func") to differentiate between the toBlob(std::string& refId) and std::unique_ptr<torchlive::media::Blob> toBlob(std::shared_ptr<IImage> image) function calls
Summary: Introducing new toBlob API that works directly on the
ImageHostObject
rather than fetching the instance from theJSContext
. This is a step towards deprecating theNativeJSRef
in favor of a full JSI supported API.Playground.tsx
Before Android Output
After Android Output
(temporarily changed the
blobType
toBlob::kBlobTypeImageRGB + std::string("new_func")
to differentiate between thetoBlob(std::string& refId)
andstd::unique_ptr<torchlive::media::Blob> toBlob(std::shared_ptr<IImage> image)
function callsBefore iOS Output
After iOS Output
(temporarily changed the
blobType
toBlob::kBlobTypeImageRGB + std::string("new_func")
to differentiate between thetoBlob(std::string& refId)
andstd::unique_ptr<torchlive::media::Blob> toBlob(std::shared_ptr<IImage> image)
function callsDifferential Revision: D40747567