Using gstreamer plugins bad in android


Question: 

I am trying to show h264 encodes streams inside an android application using the GStreamer SDK and Android NDK. My Android.mk looks like:

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE    := App
LOCAL_SRC_FILES := App.cpp

LOCAL_SHARED_LIBRARIES := gstreamer_android
LOCAL_LDLIBS := -llog -landroid

include $(BUILD_SHARED_LIBRARY)

ifndef GSTREAMER_ROOT
    ifndef GSTREAMER_ROOT_ANDROID
        $(error GSTREAMER_ROOT_ANDROID is not defined!)
    endif
    GSTREAMER_ROOT        := $(GSTREAMER_ROOT_ANDROID)
endif

GSTREAMER_NDK_BUILD_PATH  := $(GSTREAMER_ROOT)/share/gst-android/ndk-build/
include $(GSTREAMER_NDK_BUILD_PATH)/plugins.mk
GSTREAMER_PLUGINS         := $(GSTREAMER_PLUGINS_CORE) $(GSTREAMER_PLUGINS_SYS) $(GSTREAMER_PLUGINS_EFFECTS) $(GSTREAMER_PLUGINS_NET)
GSTREAMER_EXTRA_DEPS      := gstreamer-video-1.0
include $(GSTREAMER_NDK_BUILD_PATH)/gstreamer-1.0.mk

Beacause of missing plugins-bad I get the following error:

priv_gst_parse_yyparse no element "h264parse"

My pipe looks like the following:

udpsrc address=192.168.0.1 port=5000 ! application/x-rtp, encoding-name=H264, payload=96 ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink

So how can I include the gstreamer-plugins-bad into android build?




1 Answer: 

Try adding this line instead the one you have:

GSTREAMER_PLUGINS         := $(GSTREAMER_PLUGINS_CORE) $(GSTREAMER_PLUGINS_PLAYBACK) $(GSTREAMER_PLUGINS_CODECS) $(GSTREAMER_PLUGINS_NET) $(GSTREAMER_PLUGINS_SYS) $(GSTREAMER_PLUGINS_CODECS_RESTRICTED)

Specifically this one should do the job $(GSTREAMER_PLUGINS_CODECS_RESTRICTED)

 

More Articles


android - Can't find class [org/drinkless/td/libcore/telegram/TdApi$Object]

I am getting this error "Can't find class [org/drinkless/td/libcore/telegram/TdApi$Object]" but I haven't used this class anywhere in my project.I haven't used that class anywhere.But i am getting the above errorCan anyone please let me know how to solve the above error.

java - Location mocking - google map detects the movement but my own application not triggering location change

I am facing a strange issue. I modified official mock provider source code provided by google to mock some route for my application.Using this code. mockLocation.setElapsedRealtimeNanos(elapsedTimeNanos); mockLocation.setTime(currentTime); // Set the loc

python - Heap that supports modification of its elements?

Here is my scenario. I want to implement A* (in Python) without having to resort to linear-time min or in operations. I need a heap to be able to efficiently get the lowest weight item. My immediate response was 'Easy! I'll use heapq!' Then I discovered that life is rarely as simple as we would like


java - gRPC: Generate certificateChainFile and privateKeyFile to make TLS/SSL work

I want to make tls/ssl connection between client and server(Not mutual, one way). This is my setup:Server: Server server = ServerBuilder.forPort(8443) // Enable TLS .useTransportSecurity(certChainFile, privateKeyFile) .addService(new GreetingServiceImpl()) .build();Cli

r - split string at every character

I want to split every character in a string and output it as comma or tab separated characters:I need to use file_in and file_out since I have very many lines.inputTTTGGCTTTGTGCAATGG........outputT,T,T,G,G,CT,T,T,GT,G,C,A,A,T,G,GI have used this, but it prints every character vertically: /usr/bin/p

c++ - How To Return Elapsed Time From steady_clock as a Primitive Data Type (double)

First and foremost, let me say that I just starting using this library yesterday, so my understanding of it is still fairly basic. I'm trying to capture the FPS of a vision processing program I'm creating and output it to a screen using the chrono library. In my case, I need to cast the elapsed time


hashtable - Powershell 2 and .NET: Optimize for extremely large hash tables?

I am dabbling in Powershell and completely new to .NET.I am running a PS script that starts with an empty hash table. The hash table will grow to at least 15,000 to 20,000 entries. Keys of the hash table will be email addresses in string form, and values will be booleans. (I simply need to track whe

Missing plugin for GStreamer for Android SDK

I changed the stream url in the included Tutorial 5 (a basic media player) to a h.264/mp3 media stream (from its original ogv stream) and it started complaining about some missing plugins.After doing some googling I found Prajnashi's gst-ffmpeg plugin for Android https://github.com/prajnashi/gst-ffm

powershell - How to add key/value pair at the end of hash table?

I am trying to calculate code count using PowerShell script.I found a script on the Internet and am trying to add the total line at the end.I have added the column$CountHash.Add("Total", $Total)at the end.Param( [string]$path, [string]$outputFile, [string]$include = "*.*", [string]

.net - HMACSHA256.ComputeHash - Unexpected Result

I'm trying to generate a signature in VB.NET using the following vendor documentation as a reference guide:https://shuttle.support.signiant.com/customer/en/portal/articles/2807676-media-shuttle-metadata-developer-s-guide#AppendixAThey also provide this sample JS code:https://github.com/Signiant/medi