<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi Matthew and Tim,<br>I could finally get it working on the command line (as below).<br><br>gst-launch-1.0 playbin uri=rtsp://192.168.0.1/?h26x=4<br><br>[And video opens up in Gstreamer D3D video sink (internal window)]<br><br>Also I tried following codes in my program, there also it opened up the video when I ran the program in *.exe and debug mode.<br><br><p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size:
9.5pt;font-family:Consolas;color:green;background:white;mso-highlight:white">//open
another stream for viewing jpeg</span><span style="font-size:9.5pt;font-family:
Consolas;color:black;background:white;mso-highlight:white"></span></p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><span style="mso-tab-count:1"> </span></span><span style="font-size:9.5pt;
font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">GstElement</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white"> *pipeline;</span></p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><span style="mso-tab-count:1"> </span>pipeline = gst_parse_launch (</span><span style="font-size:9.5pt;font-family:Consolas;color:#A31515;background:white;
mso-highlight:white">"playbin uri=rtsp://192.168.0.1/?h26x=0"</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white">, </span><span style="font-size:9.5pt;font-family:Consolas;
color:#6F008A;background:white;mso-highlight:white">NULL</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white">);</span></p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><span style="mso-tab-count:1"> </span></span><span style="font-size:9.5pt;
font-family:Consolas;color:blue;background:white;mso-highlight:white">if</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white"> (pipeline==</span><span style="font-size:9.5pt;
font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">NULL</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white">) g_print(</span><span style="font-size:9.5pt;font-family:
Consolas;color:#A31515;background:white;mso-highlight:white">"Error
creating pipeline.\n"</span><span style="font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white">);</span></p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><span style="mso-tab-count:1"> </span>gst_element_set_state (pipeline, </span><span style="font-size:9.5pt;font-family:Consolas;color:darkslategray;background:
white;mso-highlight:white">GST_STATE_PLAYING</span><span style="font-size:9.5pt;
font-family:Consolas;color:black;background:white;mso-highlight:white">);</span></p><br><br>So far so good. <br><br>cheers<br>...manny<br><br><br><div>> Date: Mon, 12 May 2014 18:04:02 -0700<br>> From: mbrush@codebrainz.ca<br>> To: gstreamer-devel@lists.freedesktop.org<br>> Subject: Re: access camera with assigned IP address<br>> <br>> On 14-05-12 05:40 PM, Manir wrote:<br>> > Hi,<br>> > It still did not work. Looks like it does not like gst-launch.<br>> > All I am trying to do is to open a webpage (IP address) of a camera.<br>> > I am not able to do so far.<br>> ><br>> <br>> You could try to go into the camera's settings and double-check which <br>> stream(s) are activated to ensure RTSP stream is on, that you're using <br>> the correct address for that stream, and that there is no authentication <br>> required. I wouldn't even write a single line of C code until you can <br>> access it using gst-launch on the command line.<br>> <br>> Cheers,<br>> Matthew Brush<br>> <br>> > sample code:<br>> ><br>> > #include <gst/gst.h><br>> ><br>> > int main(int argc, char *argv[]) {<br>> > GstElement *pipeline;<br>> > GstBus *bus;<br>> > GstMessage *msg;<br>> ><br>> > // /* Initialize GStreamer */<br>> > gst_init (&argc, &argv);<br>> ><br>> > // data.rtspsrc = gst_element_factory_make("rtspsrc",NULL);<br>> > // /* Build the pipeline */<br>> ><br>> > pipeline = gst_parse_launch ("playbin2 uri=rtsp://172.31.11.141/axis-media/media.amp?videocodec=h264", NULL);<br>> > //pipeline = gst_parse_launch ("playbin2 uri=rtsp://172.31.11.141:8554", NULL);<br>> > //pipeline = "uri=rtsp://172.31.11.141/axis-media/media.amp?videocodec=h264";<br>> > //g_object_set( pipeline, "location", "rtsp://172.31.11.145/?h26x=4 &inst=2", "latency", 0, "buffer-mode", 0, "debug", FALSE, "rtp-blocksize", 65536, NULL);<br>> ><br>> > //gst-launch rtspsrc location=rtsp://$RTSP_IP/test ! rtph264depay ! ffdec_h264 ! xvimagesink sync=false<br>> > //gst_parse_launch rtspsrc location= rtsp://172.31.11.141/test ! rtph264depay ! ffdec_h264 ! xvimagesink sync=false<br>> ><br>> > //<br>> > // /* Start playing */<br>> > gst_element_set_state (pipeline, GST_STATE_PLAYING);<br>> > //<br>> > // /* Wait until error or EOS */<br>> > bus = gst_element_get_bus (pipeline);<br>> > msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE, GST_MESSAGE_EOS);<br>> > //<br>> > // /* Free resources */<br>> > if (msg != NULL)<br>> > gst_message_unref (msg);<br>> > gst_object_unref (bus);<br>> > gst_element_set_state (pipeline, GST_STATE_NULL);<br>> > gst_object_unref (pipeline);<br>> > system("PAUSE");<br>> > return 0;<br>> > }<br>> ><br>> > Any help will be appreciated.<br>> > regards<br>> > ..manny<br>> ><br>> >> Subject: Re: access camera with assigned IP address<br>> >> From: tim@centricular.com<br>> >> To: gstreamer-devel@lists.freedesktop.org<br>> >> Date: Sat, 10 May 2014 12:34:05 +0100<br>> >><br>> >> On Fri, 2014-05-09 at 20:44 -0700, Manir wrote:<br>> >><br>> >> Hi,<br>> >><br>> >>> I am new to gstreamer and trying to develop live video streaming<br>> >>> application with gstreamer 1.2.4 and BOSCH DINION 1080P HDR camera.<br>> >>> I have installed the camera and already accessed through browser using<br>> >>> its camera's default IP address (192.168.0.1).<br>> >>> All I am trying to do is access or connect to that IP address and see<br>> >>> or play the live video. So I used one of basic tutorial programme with<br>> >>> modification<br>> >>> to achieve that but it is not working at all.<br>> >>> I guess I just do not know how to create "pipeline" with IP address<br>> >>> for live video.<br>> >>> I will appreciate any help to achieve this goal.<br>> >><br>> >> Maybe try with gst-launch-1.0 first. Does this work:<br>> >><br>> >> gst-launch-1.0 playbin uri=rtsp://...<br>> >><br>> >> Note that if you're using 1.x it should be 'playbin', not 'playbin2'.<br>> >><br>> >> Cheer<br>> >> -Tim<br>> >><br>> >>> Best regards<br>> >>> manny..<br>> >>> Costa Mesa, CA<br>> >>><br>> >>> My code sample as below: (Pls help to access camera with assigned IP<br>> >>> address. :)<br>> >>><br>> >>> #include <gst/gst.h><br>> >>> //<br>> >>> int main(int argc, char *argv[]) {<br>> >>> GstElement *pipeline;<br>> >>> //GstElement *rtspsrc;<br>> >>> GstBus *bus;<br>> >>> GstMessage *msg;<br>> >>> //<br>> >>> // /* Initialize GStreamer */<br>> >>> gst_init (&argc, &argv);<br>> >>> //<br>> >>> // data.rtspsrc = gst_element_factory_make("rtspsrc",NULL);<br>> >>> // /* Build the pipeline */<br>> >>><br>> >>> g_object_set( pipeline, "location", "rtsp://172.31.11.145/?h26x=4<br>> >>> &inst=2", "latency", 0, "buffer-mode", 0, "debug", FALSE,<br>> >>> "rtp-blocksize", 65536, NULL);<br>> >>><br>> >>> //pipeline = gst_parse_launch ("playbin2<br>> >>> uri=http://docs.gstreamer.com/media/sintel_trailer-480p.webm", NULL);<br>> >>><br>> >>> //pipeline =<br>> >>> "uri=rtsp://172.31.11.141/axis-media/media.amp?videocodec=h264";<br>> >>> //pipeline = gst_element_factory_make("rtspsrc", NULL);<br>> >>><br>> >>> //pipeline = gst_parse_launch ("playbin2<br>> >>> rtsp=rtsp://172.31.11.145/?h26x=4", NULL);<br>> >>> //gst-launch rtspsrc location=rtsp://$RTSP_IP/test ! rtph264depay !<br>> >>> ffdec_h264 ! xvimagesink sync=false<br>> >>> //gst_parse_launch rtspsrc location= rtsp://172.31.11.141/test !<br>> >>> rtph264depay ! ffdec_h264 ! xvimagesink sync=false<br>> >>><br>> >>> //<br>> >>> // /* Start playing */<br>> >>> gst_element_set_state (pipeline, GST_STATE_PLAYING);<br>> >>> //<br>> >>> // /* Wait until error or EOS */<br>> >>> bus = gst_element_get_bus (pipeline);<br>> >>> msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE,<br>> >>> GST_MESSAGE_EOS);<br>> >>> //<br>> >>> // /* Free resources */<br>> >>> if (msg != NULL)<br>> >>> gst_message_unref (msg);<br>> >>> gst_object_unref (bus);<br>> >>> gst_element_set_state (pipeline, GST_STATE_NULL);<br>> >>> gst_object_unref (pipeline);<br>> >>> system("PAUSE");<br>> >>> return 0;<br>> >>> }<br>> >>><br>> >>> _______________________________________________<br>> >>> gstreamer-devel mailing list<br>> >>> gstreamer-devel@lists.freedesktop.org<br>> >>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel<br>> >><br>> >> --<br>> >> Tim Müller, Centricular Ltd - http://www.centricular.com<br>> >><br>> >> _______________________________________________<br>> >> gstreamer-devel mailing list<br>> >> gstreamer-devel@lists.freedesktop.org<br>> >> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel<br>> > <br>> ><br>> ><br>> ><br>> > _______________________________________________<br>> > gstreamer-devel mailing list<br>> > gstreamer-devel@lists.freedesktop.org<br>> > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel<br>> ><br>> <br>> _______________________________________________<br>> gstreamer-devel mailing list<br>> gstreamer-devel@lists.freedesktop.org<br>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel<br></div> </div></body>
</html>