Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ cscope.po.out
*.swp

# Visual Studio Code
.vscode/
*.code-workspace
.history/

Expand Down Expand Up @@ -378,4 +377,7 @@ $RECYCLE.BIN/
*.msm
*.msp
*.lnk
.vscode/c_cpp_properties.json
.vscode/settings.json
*.generated.props
*.ogv
77 changes: 77 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Godot Editor",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/bin/godot.macos.editor.dev.arm64",
"args": [
"--editor",
"--path",
"${workspaceFolder}/examples/camera",
],
"stopAtEntry": false,
"externalConsole": false,
"cwd": "${workspaceFolder}",
"environment": [],
"MIMode": "lldb",
"preLaunchTask": "Build Godot"
},
{
"name": "Godot Project",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/bin/godot.macos.editor.dev.arm64",
"args": [
"--path",
"${workspaceFolder}/examples/camera",
"--write-movie",
"test.ogv",
"--fixed-fps",
"15"
],
"stopAtEntry": false,
"externalConsole": false,
"cwd": "${workspaceFolder}",
"environment": [],
"MIMode": "lldb",
"preLaunchTask": "Build Godot"
},
{
"name": "Godot Attach",
"type": "cppdbg",
"request": "attach",
"processId": "${command:pickProcess}"
},
{
// configuration type, request and name. "launch" is used to deploy the app
// to your device and start a debugging session.
"type": "android",
"request": "launch",
"name": "Debug Android export template",
// Location of the App source files. This value must point to the root of
// your App source tree (containing AndroidManifest.xml).
"appSrcRoot": "${workspaceRoot}/platform/android/java/app",
// Fully qualified path to the built APK (Android Application Package).
"apkFile": "${workspaceRoot}/bin/android_debug.apk",
// `host:port` configuration for connecting to the ADB (Android Debug Bridge) server instance.
// Default: localhost:5037
"adbSocket": "localhost:5037",
// Automatically launch 'adb start-server' if not already started.
// Default: true
"autoStartADB": true,
// Launch behaviour if source files have been saved after the APK was built.
// One of: [ ignore warn stop ]. Default: warn
"staleBuild": "warn",
// Time in milliseconds to wait after launching an app before attempting to attach
// the debugger. Default: 1000ms
"postLaunchPause": 1000,
// Set to true to output debugging logs for diagnostics.
"trace": false
}
]
}
215 changes: 215 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,215 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Clean Godot",
"group": "build",
"type": "shell",
"command": "scons",
"args": [
"--clean",
"dev_build=yes"
],
"problemMatcher": {
"base": "$gcc",
"fileLocation": [
"autoDetect",
"${workspaceFolder}"
]
}
},
{
"label": "Build Godot",
"group": "build",
"type": "shell",
"command": "scons",
"args": [
"dev_build=yes",
"debug_symbols=yes",
"progress=no",
"vulkan=yes"
],
"problemMatcher": {
"base": "$gcc",
"fileLocation": [
"autoDetect",
"${workspaceFolder}"
]
}
},
{
"label": "Build Android debug template ARM32",
"group": "build",
"type": "shell",
"command": "scons",
"args": [
"platform=android",
"arch=arm32",
"target=template_debug",
"progress=no"
],
"problemMatcher": {
"base": "$gcc",
"fileLocation": [
"autoDetect",
"${workspaceFolder}"
]
}
},
{
"label": "Build Android debug template ARM64",
"group": "build",
"type": "shell",
"command": "scons",
"args": [
"platform=android",
"arch=arm64",
"target=template_debug",
"progress=no"
],
"problemMatcher": {
"base": "$gcc",
"fileLocation": [
"autoDetect",
"${workspaceFolder}"
]
}
},
{
"label": "Build Android debug template X86_32",
"group": "build",
"type": "shell",
"command": "scons",
"args": [
"platform=android",
"arch=x86_32",
"target=template_debug",
"progress=no"
],
"problemMatcher": {
"base": "$gcc",
"fileLocation": [
"autoDetect",
"${workspaceFolder}"
]
}
},
{
"label": "Build Android debug template X86_64",
"group": "build",
"type": "shell",
"command": "scons",
"args": [
"platform=android",
"arch=x86_64",
"target=template_debug",
"progress=no"
],
"problemMatcher": {
"base": "$gcc",
"fileLocation": [
"autoDetect",
"${workspaceFolder}"
]
}
},
{
"label": "Build Android release template ARM32",
"group": "build",
"type": "shell",
"command": "scons",
"args": [
"platform=android",
"arch=arm32",
"target=template_release",
"progress=no"
],
"problemMatcher": {
"base": "$gcc",
"fileLocation": [
"autoDetect",
"${workspaceFolder}"
]
}
},
{
"label": "Build Android release template ARM64",
"group": "build",
"type": "shell",
"command": "scons",
"args": [
"platform=android",
"arch=arm64",
"target=template_release",
"progress=no"
],
"problemMatcher": {
"base": "$gcc",
"fileLocation": [
"autoDetect",
"${workspaceFolder}"
]
}
},
{
"label": "Build Android release template X86_32",
"group": "build",
"type": "shell",
"command": "scons",
"args": [
"platform=android",
"arch=x86_32",
"target=template_release",
"progress=no"
],
"problemMatcher": {
"base": "$gcc",
"fileLocation": [
"autoDetect",
"${workspaceFolder}"
]
}
},
{
"label": "Build Android release template X86_64",
"group": "build",
"type": "shell",
"command": "scons",
"args": [
"platform=android",
"arch=x86_64",
"target=template_release",
"progress=no"
],
"problemMatcher": {
"base": "$gcc",
"fileLocation": [
"autoDetect",
"${workspaceFolder}"
]
}
},
{
"label": "Install Android export templates",
"group": "build",
"type": "shell",
"command": "./gradlew",
"args": ["generateGodotTemplates"],
"options": {
"cwd": "${workspaceFolder}/platform/android/java"
},
"dependsOrder": "sequence",
"dependsOn":["Build Android debug template ARM32",
"Build Android debug template ARM64",
"Build Android debug template X86_32",
"Build Android debug template X86_64",
"Build Android release template ARM32",
"Build Android release template ARM64",
"Build Android release template X86_32",
"Build Android release template X86_64"
]
}
]
}
36 changes: 15 additions & 21 deletions doc/classes/CameraFeed.xml
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CameraFeed" inherits="RefCounted" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A camera feed gives you access to a single physical camera attached to your device.
A camera feed gives you access to a physical camera attached to your device.
</brief_description>
<description>
A camera feed gives you access to a single physical camera attached to your device. When enabled, Godot will start capturing frames from the camera which can then be used. See also [CameraServer].
[b]Note:[/b] Many cameras will return YCbCr images which are split into two textures and need to be combined in a shader. Godot does this automatically for you if you set the environment to show the camera image in the background.
A camera feed gives you access to a physical camera attached to your device with specific media size and format. When enabled, Godot will start capturing frames from the camera which can then be user as texture in other nodes. See also [CameraServer].
[b]Note:[/b] Some media formats, like YUV or N12 produce two textures (one for the Y plane and one for the UV plane). These textures need be drawn using a suitable shader where the Y plane is provided as TEXTURE and the UV plane as NORMAL_TEXTURE. See the camera project in the examples folder.
</description>
<tutorials>
</tutorials>
<methods>
<method name="get_datatype" qualifiers="const">
<return type="int" enum="CameraFeed.FeedDataType" />
<description>
Returns feed image data type.
</description>
</method>
<method name="get_id" qualifiers="const">
<return type="int" />
<description>
Expand All @@ -34,6 +28,18 @@
Returns the position of camera on the device.
</description>
</method>
<method name="get_width" qualifiers="const">
<return type="int" />
<description>
Returns the width of the captured camera frames.
</description>
</method>
<method name="get_height" qualifiers="const">
<return type="int" />
<description>
Returns the height of the captured camera frames.
</description>
</method>
</methods>
<members>
<member name="feed_is_active" type="bool" setter="set_active" getter="is_active" default="false">
Expand All @@ -44,18 +50,6 @@
</member>
</members>
<constants>
<constant name="FEED_NOIMAGE" value="0" enum="FeedDataType">
No image set for the feed.
</constant>
<constant name="FEED_RGB" value="1" enum="FeedDataType">
Feed supplies RGB images.
</constant>
<constant name="FEED_YCBCR" value="2" enum="FeedDataType">
Feed supplies YCbCr images that need to be converted to RGB.
</constant>
<constant name="FEED_YCBCR_SEP" value="3" enum="FeedDataType">
Feed supplies separate Y and CbCr images that need to be combined and converted to RGB.
</constant>
<constant name="FEED_UNSPECIFIED" value="0" enum="FeedPosition">
Unspecified position.
</constant>
Expand Down
Loading