Compare commits

..

No commits in common. "master" and "2.1.1" have entirely different histories.

7 changed files with 39 additions and 34 deletions

View File

@ -1,10 +1,18 @@
name: "Camera"
platforms:
osx:
x86_64-osx:
context:
frameworks: ["AVFoundation", "CoreMedia"]
ios:
x86-osx:
context:
frameworks: ["AVFoundation", "CoreMedia"]
arm64-ios:
context:
frameworks: ["AVFoundation", "CoreMedia", "UIKit"]
armv7-ios:
context:
frameworks: ["AVFoundation", "CoreMedia", "UIKit"]

View File

@ -1,7 +1,3 @@
repositories {
mavenCentral()
}
dependencies {
implementation 'androidx.core:core:1.2.0'
compile 'androidx.core:core:1.2.0'
}

View File

@ -7,6 +7,7 @@
#define MODULE_NAME "camera"
// Defold SDK
#define DLIB_LOG_DOMAIN LIB_NAME
#include <dmsdk/sdk.h>
#if defined(DM_PLATFORM_IOS) || defined(DM_PLATFORM_OSX) || defined(DM_PLATFORM_ANDROID)
@ -70,7 +71,7 @@ static void Camera_ProcessQueue()
if (message == CAMERA_STARTED)
{
// Increase ref count
dmScript::LuaHBuffer luabuffer(g_DefoldCamera.m_VideoBuffer, dmScript::OWNER_C);
dmScript::LuaHBuffer luabuffer = {g_DefoldCamera.m_VideoBuffer, false};
dmScript::PushBuffer(L, luabuffer);
g_DefoldCamera.m_VideoBufferLuaRef = dmScript::Ref(L, LUA_REGISTRYINDEX);
}

View File

@ -34,4 +34,7 @@ tccutil reset Camera
## Source code
The source code is available on [GitHub](https://github.com/defold/extension-camera)
The source code is available on [GitHub](https://github.com/defold/extension-adinfo)
## API reference

View File

@ -1,8 +0,0 @@
font: "/builtins/fonts/vera_mo_bd.ttf"
material: "/builtins/fonts/font-df.material"
size: 14
antialias: 1
alpha: 1.0
shadow_alpha: 0.0
shadow_blur: 0
output_format: TYPE_DISTANCE_FIELD

View File

@ -16,19 +16,14 @@ embedded_instances {
" z: 0.0\n"
" w: 1.0\n"
" }\n"
" property_decls {\n"
" }\n"
"}\n"
"embedded_components {\n"
" id: \"sprite\"\n"
" type: \"sprite\"\n"
" data: \"default_animation: \\\"logo\\\"\\n"
" data: \"tile_set: \\\"/main/camera.atlas\\\"\\n"
"default_animation: \\\"logo\\\"\\n"
"material: \\\"/builtins/materials/sprite.material\\\"\\n"
"blend_mode: BLEND_MODE_ALPHA\\n"
"textures {\\n"
" sampler: \\\"texture_sampler\\\"\\n"
" texture: \\\"/main/camera.atlas\\\"\\n"
"}\\n"
"\"\n"
" position {\n"
" x: 0.0\n"
@ -65,13 +60,10 @@ embedded_instances {
data: "embedded_components {\n"
" id: \"sprite\"\n"
" type: \"sprite\"\n"
" data: \"default_animation: \\\"logo\\\"\\n"
" data: \"tile_set: \\\"/main/logo.atlas\\\"\\n"
"default_animation: \\\"logo\\\"\\n"
"material: \\\"/builtins/materials/sprite.material\\\"\\n"
"blend_mode: BLEND_MODE_ALPHA\\n"
"textures {\\n"
" sampler: \\\"texture_sampler\\\"\\n"
" texture: \\\"/main/logo.atlas\\\"\\n"
"}\\n"
"\"\n"
" position {\n"
" x: 0.0\n"
@ -94,6 +86,12 @@ embedded_instances {
" z: 0.0\\n"
" w: 0.0\\n"
"}\\n"
"scale {\\n"
" x: 1.0\\n"
" y: 1.0\\n"
" z: 1.0\\n"
" w: 0.0\\n"
"}\\n"
"color {\\n"
" x: 1.0\\n"
" y: 1.0\\n"
@ -118,8 +116,8 @@ embedded_instances {
"blend_mode: BLEND_MODE_ALPHA\\n"
"line_break: false\\n"
"text: \\\"Space/Touch to toggle capture\\\"\\n"
"font: \\\"/main/default.font\\\"\\n"
"material: \\\"/builtins/fonts/label-df.material\\\"\\n"
"font: \\\"/builtins/fonts/system_font.font\\\"\\n"
"material: \\\"/builtins/fonts/label.material\\\"\\n"
"\"\n"
" position {\n"
" x: 90.0\n"
@ -142,6 +140,12 @@ embedded_instances {
" z: 0.0\\n"
" w: 0.0\\n"
"}\\n"
"scale {\\n"
" x: 1.0\\n"
" y: 1.0\\n"
" z: 1.0\\n"
" w: 0.0\\n"
"}\\n"
"color {\\n"
" x: 1.0\\n"
" y: 1.0\\n"
@ -168,8 +172,8 @@ embedded_instances {
"text: \\\"label\\\\n"
"\\\"\\n"
" \\\"\\\"\\n"
"font: \\\"/main/default.font\\\"\\n"
"material: \\\"/builtins/fonts/label-df.material\\\"\\n"
"font: \\\"/builtins/fonts/system_font.font\\\"\\n"
"material: \\\"/builtins/fonts/label.material\\\"\\n"
"\"\n"
" position {\n"
" x: 90.0\n"

View File

@ -3,6 +3,7 @@ local function stop_capture(self)
if self.cameraframe == nil then
return
end
self.cameraframe = nil
camera.stop_capture()