Jump to content

GstRtspSink - Building the plug-in: Difference between revisions

added android cerbero recipe
mNo edit summary
(added android cerbero recipe)
 
Line 144: Line 144:
|style=width:unset;
|style=width:unset;
}}
}}
== Building for Android ==
To include the plugin in an Android, it needs to be compiled as a static library. For this, it is recommended to use the [https://gstreamer.freedesktop.org/modules/cerbero.html Cerbero] build system with the correct configuration for the target system.
After bootstrapping Cerbero with the chosen configuration, include the following recipe template within the recipes directory:
<syntaxhighlight lang='python'>
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python
class Recipe(recipe.Recipe):
    name = 'gst-rr-rtsp-sink'
    version = 'gst-rr-rtsp-sink'
    commit = '76f30f4ff3c11fcafdec6714faf3b654ce1fe55c'
    remotes = {'origin': RTSP_SINK_GIT_REPO}
    config_sh = 'cd src && autoreconf -fiv && sh ./configure'
    configure_options = '--enable-static-plugins --enable-static --disable-shared  PLATFORM=MX6 CFLAGS="-O0 -ggdb3 -I$CERBERO_PREFIX/../../android-ndk-21/sysroot/usr/include/ -I$CERBERO_PREFIX/../../android-ndk-21/sysroot/usr/include/arm-linux-androideabi/  -I$CERBERO_PREFIX/include -DGST_PLUGIN_BUILD_STATIC -funwind-tables -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -fPIC -mthumb -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -DANDROID -DPIC -D__ARM_ARCH_7A__ -Wa,--noexecstack"'
    make = 'cd src && make'
    make_install = 'cd src && make install'
</syntaxhighlight>
Modify it to include the path to the android NDK version used by Cerbero, the target architecture, and any other compiler flags necessary for the target; for example, the recipe above targets an IMX6 platform with ARM v7 architecture. 
For detailed steps on how to cross-compile for Android using Cerbero, check out [[Android GStreamer audio video playback optimization#Porting GStreamer 1.6.0 for Android|this guide]].


{{GstRtspSink/Foot|previous=Evaluating_GstRtspSink|next=Basic_usage}}
{{GstRtspSink/Foot|previous=Evaluating_GstRtspSink|next=Basic_usage}}
30

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.