GstPipeline and bus call
Yaroslav
yaroslavrakhnenko at gmail.com
Mon Aug 14 11:12:34 UTC 2017
Hi all!
Now i need to play udp stream on my imx6 boards and show image(logo) when no
data on port.
Server:
gst-launch-1.0 -v filesrc location=/video/0001.mp4 ! decodebin ! vpuenc_h264
bitrate=8192 ! rtph264pay ! udpsink host=192.168.5.255 port=5555
Client (C code):
#define GST_PLAYER_UDP "udpsrc port=5555 caps=\"application/x-rtp,
media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264,
payload=(int)96\"\
! rtph264depay ! decodebin ! videoconvert ! autovideosink"
....
static gboolean bus_call (GstBus *bus, GstMessage *msg, gpointer
data)
{
printf("msg=%s (from
%s)\n",gst_message_type_get_name(GST_MESSAGE_TYPE(msg)),
GST_MESSAGE_SRC_NAME(msg));
return TRUE;
}
...
GstElement* gstLaunch()
{
GstElement *pipeline;
GError *error = NULL;
pipeline = gst_parse_launch (GST_PLAYER_UDP, &error);
if (!pipeline){
g_print ("\tParse error: %s\n", error->message);
return 0;
}
gst_element_set_state (pipeline, GST_STATE_PLAYING);
GstBus *bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
guint watch_id = gst_bus_add_watch (bus, bus_call, NULL);
gst_object_unref (bus);
return pipeline;
}
-----------------------------------------------------------------------------------------------
When i start streaming all work fine and i can see when streamig start:
display(/dev/fb0) resolution is (1280x800).
====== OVERLAYSINK: 4.0.9 build on May 12 2017 10:36:47. ======
display(/dev/fb0) resolution is (1280x800).
display(/dev/fb0) resolution is (1280x800).
msg=state-changed (from autovideosink0)
msg=state-changed (from videoconvert0)
msg=state-changed (from typefind)
msg=state-changed (from decodebin0)
msg=state-changed (from rtph264depay0)
msg=state-changed (from udpsrc0)
msg=state-changed (from pipeline0)
msg=state-changed (from videoconvert0)
msg=state-changed (from typefind)
msg=state-changed (from rtph264depay0)
msg=stream-status (from src)
msg=state-changed (from udpsrc0)
msg=state-changed (from pipeline0)
msg=stream-status (from src)
msg=new-clock (from pipeline0)
msg=state-changed (from videoconvert0)
msg=state-changed (from rtph264depay0)
msg=state-changed (from udpsrc0)
msg=state-changed (from h264parse0)
msg=state-changed (from h264parse0)
[INFO] Product Info: i.MX6Q/D/S
msg=state-changed (from vpudec0)
[INFO] Product Info: i.MX6Q/D/S
====== VPUDEC: 4.0.9 build on May 12 2017 10:36:53. ======
wrapper: 1.0.65 (VPUWRAPPER_ARM_LINUX Build on May 12 2017 10:30:05)
vpulib: 5.4.33
firmware: 3.1.1.46072
msg=state-changed (from vpudec0)
[INFO] bitstreamMode 1, chromaInterleave 1, mapType 0, tiled2LinearEnable 0
msg=state-changed (from decodebin0)
msg=stream-start (from pipeline0)
msg=state-changed (from autovideosink0-actual-sink-overlay)
msg=state-changed (from autovideosink0)
msg=async-done (from pipeline0)
msg=state-changed (from autovideosink0-actual-sink-overlay)
msg=state-changed (from autovideosink0)
msg=state-changed (from vpudec0)
msg=state-changed (from capsfilter0)
msg=state-changed (from h264parse0)
msg=state-changed (from typefind)
msg=state-changed (from decodebin0)
msg=state-changed (from pipeline0)
msg=qos (from autovideosink0-actual-sink-overlay)
msg=tag (from autovideosink0-actual-sink-overlay)
but when file play all or server not available there is no message on bus
What should I do to understand that the video data is not received by the
client(and i need to show splashscreen)??
PS please, help! I spent a lot of time and start despair...
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/GstPipeline-and-bus-call-tp4684199.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list