How to change from source element in GStreamer pipeline while playing on android?

olavarria folavarria at aquarov.cl
Tue Apr 2 21:46:24 UTC 2019


I want to create a android app that displays a default screen (a blue
screen), when a incoming stream is detected then the app changes to the
streaming screen.

Iḿ using three bins to do this, which are:

1) Default src bin: The default input to the sink bink.
2) Streaming src bin: The streaming input ot the sink bin.
3) Show sink bin: Bin that displays the input on screen.

The problem is that when i try to unlink the default src bin from the show
sink bin, because the unlinking method does nothing, so i can't link the
streaming src bin to the show sink bin to change to the streaming screen.
Even removing the default src does nothin because when i try to link the
streaming src pad to the show sink pad i'm getting GST_PAD_LINK_NO_FORMAT
error.

To do this i used a blocking/buffer probe on the streaming src bin source
pad to wait for the stream, when an incoming stream is detected then i add a
idle probe to the default src bin source pad to make the input change.

I don't have any clue of what is causing this problem, because in python it
works perfectly. I'm using GStreamer 1.15.1.

Pipeline descriptors:

1) Default src bin:
"videotestsrc pattern=6 ! "
"capsfilter name=defaultcaps caps=video/x-raw,width=(int)1280,"
"height=(int)800"

2) Streaming src bin:
"udpsrc port=5000 timeout=100000000 ! "
"application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264
! "
"rtph264depay ! queue ! avdec_h264 ! videoconvert ! capsfilter
name=streamingcaps caps=video/x-raw,format=RGBA"

3) Show sink bin:
"textoverlay name=top-left valignment=top halignment=left
font-desc=\"courier 12px\" text=\"Testing\" ! "
"textoverlay name=top-center valignment=top halignment=center
font-desc=\"courier 12px\" text=\"Testing\" ! "
"textoverlay name=top-right valignment=top halignment=right
font-desc=\"courier 12px\" text=\"Testing\" ! "
"textoverlay name=center-center valignment=center halignment=center
font-desc=\"courier 12px\" text=\"Testing\" ! "
"textoverlay name=bottom-left valignment=bottom halignment=left
font-desc=\"courier 12px\" text=\"Testing\" ! "
"textoverlay name=bottom-center valignment=bottom halignment=center
font-desc=\"courier 12px\" text=\"Testing\" ! "
"textoverlay name=bottom-right valignment=bottom halignment=right
font-desc=\"courier 12px\" text=\"Testing\" ! "
"glimagesink sync=false" 



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list