Can't compile code using gst-rtsp server

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't compile code using gst-rtsp server

garrett
I'm trying to make a simple, c program that uses the gstreamer rtsp server. I downloaded, configured, make and make installed gst-rtsp-0.10.8.

Inside gst-rtsp-0.10.8/examples I copied test-video.c as test-video2.c and I would like to compile it.

I used: "gcc test-video2.c -o test-video2 -Wall $(pkg-config --cflags --libs gstreamer-0.10)" to try to compile it, but I get:

"test-video2.c:22:41: fatal error: gst/rtsp-server/rtsp-server.h: No such file or directory
compilation terminated."

What do I need to do to build a c file that has "#include <gst/rtsp-server/rtsp-server.h>"?

--
W.A. Garrett Weaver 


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Can't compile code using gst-rtsp server

pushpa

Try to include the header file path of your rtsp server for compilation and also link the rtsp server library
For example:
"gcc  -I/usr/include/gstreamer-0.10  -O0 -g3 -Wall -c -fmessage-length=0 `pkg-config --cflags --libs gstreamer-0.10` "
        gcc  -o"rtsp"  ./main.o   -lgstrtspserver-0.10 -lgstreamer-0.10


Regards,
Pushpa
Reply | Threaded
Open this post in threaded view
|

Re: Can't compile code using gst-rtsp server

garrett
Thank you pushpa,

My rtsp-server header files were stored into /usr/local.include/gstreamer-0.10/gst/rtsp-server. So I included that path in my gcc call:

gcc -I /usr/local/include/gstreamer-0.10/ test-video2.c -o test-video2 -Wall $(pkg-config --cflags --libs gstreamer-0.10)

The output of that was not a compiled file, instead it was:
/tmp/ccVmTq7u.o: In function `timeout':
main.c:(.text+0x17): undefined reference to `gst_rtsp_server_get_session_pool'
main.c:(.text+0x27): undefined reference to `gst_rtsp_session_pool_cleanup'
/tmp/ccVmTq7u.o: In function `main':
main.c:(.text+0x74): undefined reference to `gst_rtsp_server_new'
main.c:(.text+0x84): undefined reference to `gst_rtsp_server_get_media_mapping'
main.c:(.text+0x8d): undefined reference to `gst_rtsp_media_factory_new'
main.c:(.text+0xa2): undefined reference to `gst_rtsp_media_factory_set_launch'
main.c:(.text+0xb7): undefined reference to `gst_rtsp_media_mapping_add_factory'
main.c:(.text+0xd4): undefined reference to `gst_rtsp_server_attach'
collect2: ld returned 1 exit status

So I did something wrong somewhere. I just don't know where.

On Wed, Jul 11, 2012 at 9:53 PM, pushpa <[hidden email]> wrote:

Try to include the header file path of your rtsp server for compilation and
also link the rtsp server library
For example:
"gcc  -I/usr/include/gstreamer-0.10  -O0 -g3 -Wall -c -fmessage-length=0
`pkg-config --cflags --libs gstreamer-0.10` "
        gcc  -o"rtsp"  ./main.o   -lgstrtspserver-0.10 -lgstreamer-0.10


Regards,
Pushpa

--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Can-t-compile-code-using-gst-rtsp-server-tp4655577p4655578.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



--
W.A. Garrett Weaver 


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Can't compile code using gst-rtsp server

Tim-Philipp Müller-2
In reply to this post by garrett
On Wed, 2012-07-11 at 17:16 -0700, W.A. Garrett Weaver wrote:

Hi,

> I'm trying to make a simple, c program that uses the gstreamer rtsp
> server. I downloaded, configured, make and make installed
> gst-rtsp-0.10.8.
>
> Inside gst-rtsp-0.10.8/examples I copied test-video.c as test-video2.c
> and I would like to compile it.
>
> I used: "gcc test-video2.c -o test-video2 -Wall $(pkg-config --cflags
> --libs gstreamer-0.10)" to try to compile it, but I get:
>
> "test-video2.c:22:41: fatal error: gst/rtsp-server/rtsp-server.h: No
> such file or directory
> compilation terminated."
>
> What do I need to do to build a c file that has "#include
> <gst/rtsp-server/rtsp-server.h>"?

$ pkg-config --list-all | grep rtsp
gstreamer-rtsp-0.10    GStreamer RTSP Library - RTSP base classes and
helper functions
gst-rtsp-server-0.10   gst-rtsp-server - GStreamer based RTSP server

==> add gst-rtsp-server-0.10 to your pkg-config lines after
gstreamer-0.10.

Cheers
 -Tim

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Can't compile code using gst-rtsp server

Mazahir Poonawalla
In reply to this post by garrett
Hi Garrett,

I am stuck at the similar point i.e. I am trying to compile the rtsp example and i get the following error:
main.c:(.text+0x17): undefined reference to `gst_rtsp_server_get_session_pool'
main.c:(.text+0x27): undefined reference to `gst_rtsp_session_pool_cleanup'
/tmp/ccVmTq7u.o: In function `main':
main.c:(.text+0x74): undefined reference to `gst_rtsp_server_new'
main.c:(.text+0x84): undefined reference to `gst_rtsp_server_get_media_mapping'
main.c:(.text+0x8d): undefined reference to `gst_rtsp_media_factory_new'
main.c:(.text+0xa2): undefined reference to `gst_rtsp_media_factory_set_launch'
main.c:(.text+0xb7): undefined reference to `gst_rtsp_media_mapping_add_factory'
main.c:(.text+0xd4): undefined reference to `gst_rtsp_server_attach'

Can you please let me know as to how did you eliminated the error. I have included all the possible include paths and libraries.

Thanks,
Maz