summaryrefslogtreecommitdiff
path: root/modules/camera
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2022-01-25 10:07:01 +0200
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2022-02-01 15:58:30 +0200
commit33d6d4bdf718c9d71e9e97339a5181ae53706880 (patch)
tree56bfa3a6f9acf83f885013ba20d44eb646da324b /modules/camera
parentea12094f19b028c1dcf6d402b8cbb3296b2065a8 (diff)
[macOS] Enable Objective-C ARC
Diffstat (limited to 'modules/camera')
-rw-r--r--modules/camera/camera_osx.h1
-rw-r--r--modules/camera/camera_osx.mm27
2 files changed, 0 insertions, 28 deletions
diff --git a/modules/camera/camera_osx.h b/modules/camera/camera_osx.h
index 9d67235839..b0db844599 100644
--- a/modules/camera/camera_osx.h
+++ b/modules/camera/camera_osx.h
@@ -39,7 +39,6 @@
class CameraOSX : public CameraServer {
public:
CameraOSX();
- ~CameraOSX();
void update_feeds();
};
diff --git a/modules/camera/camera_osx.mm b/modules/camera/camera_osx.mm
index 391006bfc2..d199c31b2f 100644
--- a/modules/camera/camera_osx.mm
+++ b/modules/camera/camera_osx.mm
@@ -114,18 +114,12 @@
if (output) {
[self removeOutput:output];
[output setSampleBufferDelegate:nil queue:nullptr];
- [output release];
output = nullptr;
}
[self commitConfiguration];
}
-- (void)dealloc {
- // bye bye
- [super dealloc];
-}
-
- (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection {
// This gets called every time our camera has a new image for us to process.
// May need to investigate in a way to throttle this if we get more images then we're rendering frames..
@@ -208,7 +202,6 @@ public:
AVCaptureDevice *get_device() const;
CameraFeedOSX();
- ~CameraFeedOSX();
void set_device(AVCaptureDevice *p_device);
@@ -227,7 +220,6 @@ CameraFeedOSX::CameraFeedOSX() {
void CameraFeedOSX::set_device(AVCaptureDevice *p_device) {
device = p_device;
- [device retain];
// get some info
NSString *device_name = p_device.localizedName;
@@ -240,18 +232,6 @@ void CameraFeedOSX::set_device(AVCaptureDevice *p_device) {
};
};
-CameraFeedOSX::~CameraFeedOSX() {
- if (capture_session != nullptr) {
- [capture_session release];
- capture_session = nullptr;
- };
-
- if (device != nullptr) {
- [device release];
- device = nullptr;
- };
-};
-
bool CameraFeedOSX::activate_feed() {
if (capture_session) {
// Already recording!
@@ -282,7 +262,6 @@ void CameraFeedOSX::deactivate_feed() {
// end camera capture if we have one
if (capture_session) {
[capture_session cleanup];
- [capture_session release];
capture_session = nullptr;
};
};
@@ -317,8 +296,6 @@ void CameraFeedOSX::deactivate_feed() {
// remove notifications
[[NSNotificationCenter defaultCenter] removeObserver:self name:AVCaptureDeviceWasConnectedNotification object:nil];
[[NSNotificationCenter defaultCenter] removeObserver:self name:AVCaptureDeviceWasDisconnectedNotification object:nil];
-
- [super dealloc];
}
@end
@@ -376,7 +353,3 @@ CameraOSX::CameraOSX() {
// should only have one of these....
device_notifications = [[MyDeviceNotifications alloc] initForServer:this];
};
-
-CameraOSX::~CameraOSX() {
- [device_notifications release];
-};