-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* `Frame Processor` -> `FrameProcessors` * fix: Remove almost empty `cpp/` folder * fix: Add wrap ctor to `MutableRawBuffer` * fix: Add `.clang-format` file again * fix: Remove `cpp` folder references from everywhere
- Loading branch information
Showing
39 changed files
with
90 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// | ||
// MutableRawBuffer.h | ||
// VisionCamera | ||
// | ||
// Created by Marc Rousavy on 17.01.24. | ||
// Copyright © 2024 mrousavy. All rights reserved. | ||
// | ||
|
||
#pragma once | ||
|
||
#include <jsi/jsi.h> | ||
#include <memory> | ||
|
||
namespace vision { | ||
|
||
using namespace facebook; | ||
|
||
class MutableRawBuffer : public jsi::MutableBuffer { | ||
|
||
public: | ||
explicit MutableRawBuffer(uint8_t* data, size_t size, bool freeOnDealloc) { | ||
_size = size; | ||
_data = data; | ||
_freeOnDealloc = freeOnDealloc; | ||
} | ||
explicit MutableRawBuffer(size_t size) : MutableRawBuffer(new uint8_t[size], size, true) {} | ||
|
||
~MutableRawBuffer() { | ||
if (_freeOnDealloc) { | ||
delete[] _data; | ||
} | ||
} | ||
|
||
public: | ||
uint8_t* data() override { | ||
return _data; | ||
} | ||
size_t size() const override { | ||
return _size; | ||
} | ||
|
||
private: | ||
uint8_t* _data; | ||
size_t _size; | ||
bool _freeOnDealloc; | ||
}; | ||
|
||
} // namespace vision |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters