mareksuma1985 / gstreamer_tutorial_udpsink Goto Github PK
View Code? Open in Web Editor NEWStreams video from main camera to a given IP address.
Streams video from main camera to a given IP address.
``Hi ,
Thank you for trying. I'm working on it. Now I have some problems. Can we discuss them together?
I am currently building with the following versions
NDK: 21.4.7075529
Gstreamer: 1.22.7
SDK: 32
During this build, I ran into problems with “undefined reference to gst_photography_get_type' and ”undefined reference to
gst_photography_set_autofocus' in function `gst_native_set_auto_focus'。
I'm stuck here and don't know how to proceed.
This is my Android.mk and Application.mk and build. Gradle
Please help me! Thank you!
Android.mk:
`LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_CFLAGS := -DGST_USE_UNSTABLE_API
LOCAL_MODULE :=android_camera
LOCAL_SRC_FILES := android_camera.c dummy.cpp
LOCAL_SHARED_LIBRARIES := gstreamer_android
LOCAL_LDLIBS += -landroid -ldl -llog
include $(BUILD_SHARED_LIBRARY)
GST_V4L2_USE_LIBV4L2 := 1
GSTREAMER_ROOT_PATH := D:\CodeRepo\AndroidProject\gstreamer-1.0-android-universal-1.22.7
ifndef GSTREAMER_ROOT_ANDROID
$(error GSTREAMER_ROOT_ANDROID is not defined!)
endif
ifeq ($(TARGET_ARCH_ABI),armeabi)
GSTREAMER_ROOT := $(GSTREAMER_ROOT_ANDROID)/arm
else ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
GSTREAMER_ROOT := $(GSTREAMER_ROOT_ANDROID)/armv7
else ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
GSTREAMER_ROOT := $(GSTREAMER_ROOT_ANDROID)/arm64
else ifeq ($(TARGET_ARCH_ABI),x86)
GSTREAMER_ROOT := $(GSTREAMER_ROOT_ANDROID)/x86
else ifeq ($(TARGET_ARCH_ABI),x86_64)
GSTREAMER_ROOT := $(GSTREAMER_ROOT_ANDROID)/x86_64
else
endif
GSTREAMER_NDK_BUILD_PATH := $(GSTREAMER_ROOT)/share/gst-android/ndk-build/
include $(GSTREAMER_NDK_BUILD_PATH)/plugins.mk
GSTREAMER_PLUGINS :=
GSTREAMER_EXTRA_DEPS := gstreamer-video-1.0 gstreamer-player-1.0 gio-2.0 glib-2.0
GSTREAMER_EXTRA_LIBS := -liconv
include $(GSTREAMER_NDK_BUILD_PATH)/gstreamer-1.0.mk`
Application.mk:
APP_ABI = armeabi armeabi-v7a arm64-v8a x86 x86_64 APP_STL = c++_shared
build.gradle:
`plugins {
id 'com.android.application'
}
android {
compileSdk 32
defaultConfig {
applicationId "com.huracan.androidgstreamerapp"
minSdk 21
targetSdk 32
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
externalNativeBuild {
ndkBuild {
def gstRoot
if (project.hasProperty('gstAndroidRoot'))
gstRoot = project.gstAndroidRoot
else
gstRoot = System.env.GSTREAMER_ROOT_ANDROID
if (gstRoot == null)
throw new GradleException('GSTREAMER_ROOT_ANDROID must be set, or "gstAndroidRoot" must be defined in your gradle.properties in the top level directory of the unpacked universal GStreamer Android binaries')
arguments "NDK_APPLICATION_MK=jni/Application.mk", "GSTREAMER_JAVA_SRC_DIR=src", "GSTREAMER_ROOT_ANDROID=$gstRoot", "GSTREAMER_ASSETS_DIR=src/assets"
targets "android_camera"
// All archs except MIPS and MIPS64 are supported
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
externalNativeBuild {
ndkBuild {
path file('jni/Android.mk')
}
}
ndkVersion '21.4.7075529'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.4.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}`
How to play this streamed video using rtsp url from gstreamer android tutorial 4 or any other android network players like vlc etc
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.