Part Number: AM5728
Tool/software: TI C/C++ Compiler
Hai sir,
I am using AM5728 Evaluation board i am using below commands those are properly working but in c code those are not working.
1.Gst-launch-1.0 -v rtsp location="rtsp://admin:password@10.10.11.84:554" latency=0 ! rtpjitterbuffer ! rtph264depay ! h264parse ! ducatih264dec ! vpe ! videoconvert ! kmssink
2.Gst-launch-1.0 -v filesrc location=/home/root/video-samples/TearsofSteel-Short-720x420.h264 ! typefind ! h264parse ! ducatih264decvpe! kmssink
3. Gst-launch-1.0 playbin uri="rtsp://admin:password@10.10.11.84:554" latency=0 videosink=kmssink
above three properly working.
below code number 3 working 1&2 pipelnes not working
#include <gst/gst.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
GstElement *pipeline;
GstBus *bus;
GstMessage *msg;
const gchar *nano_str;
guint major, minor, micro, nano;
/* Initialize GStreamer */
gst_init (&argc, &argv);
gst_version (&major, &minor, µ, &nano);
printf ("GStreamer Version: %d.%d.%d\n",major, minor, micro);
/* Build the pipeline */
/*------1--------*/
//pipeline = gst_parse_launch("rtsp location=rtsp://admin:password@10.10.11.84:554 latency=0 ! rtpjitterbuffer ! rtph264depay ! h264parse ! ducatih264dec ! vpe ! videoconvert ! kmssink", NULL);
/*------2--------*/
//pipeline = gst_parse_launch("filesrc location=/home/root/video-samples/TearsofSteel-Short-720x420.h264 ! typefind ! h264parse ! ducatih264decvpe! kmssink", NULL);
/*------3--------*/
pipeline = gst_parse_launch("rtsp://admin:password@10.10.11.84:554 latency=0 videosink=kmssink", NULL);
/* Start playing */
gst_element_set_state (pipeline, GST_STATE_PLAYING);
/* Wait until error or EOS */
bus = gst_element_get_bus (pipeline);
msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE, GST_MESSAGE_ERROR | GST_MESSAGE_EOS);
/* Free resources */
if (msg != NULL)
gst_message_unref (msg);
gst_object_unref (bus);
gst_element_set_state (pipeline, GST_STATE_NULL);
gst_object_unref (pipeline);
return 0;
}
This is how you could build it on the board in case your .c is named capture.c
gcc capture.c -o capture `pkg-config --libs --cflags gstreamer-1.0`
this is how to run it:
/etc/init.d/weston stop
./capture
1st and 2nd option not working only 3rd option is working
only displaying gstreamer-1.0 version showing no error
1st&2nd commented while required time un commenting and using
how to run the 1st and 2nd commands in c code
thanking you,
Ramachandra.PC