MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / CameraFeedAndroid

Method CameraFeedAndroid

modules/camera/camera_android.cpp:68–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66// CameraFeedAndroid - Subclass for our camera feed on Android
67
68CameraFeedAndroid::CameraFeedAndroid(ACameraManager *manager, ACameraMetadata *metadata, const char *id,
69 CameraFeed::FeedPosition position, int32_t orientation) :
70 CameraFeed() {
71 this->manager = manager;
72 this->metadata = metadata;
73 this->orientation = orientation;
74 _add_formats();
75 camera_id = id;
76 set_position(position);
77
78 // Position
79 switch (position) {
80 case CameraFeed::FEED_BACK:
81 name = vformat("%s | BACK", id);
82 break;
83 case CameraFeed::FEED_FRONT:
84 name = vformat("%s | FRONT", id);
85 break;
86 default:
87 name = vformat("%s", id);
88 break;
89 }
90
91 image_y.instantiate();
92 image_uv.instantiate();
93}
94
95CameraFeedAndroid::~CameraFeedAndroid() {
96 if (is_active()) {

Callers

nothing calls this directly

Calls 2

vformatFunction · 0.85
instantiateMethod · 0.45

Tested by

no test coverage detected