LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-29-2021, 08:14 AM   #1
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,732
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
GStreamer 1.19 error: gst/sdp/sdp.h: No such file or directory


Ubuntu 18.04
Code:
$ gst-inspect-1.0 --gst-version
GStreamer Core Library version 1.19.0.1
My helloworld program has these includes:
Code:
#include <gst/gst.h>
#include <glib.h>
#include <gst/sdp/sdp.h>
Compiling it as follows:
Code:
$ gcc -Wall helloworld.c -o helloworld $(pkg-config --cflags --libs gstreamer-1.0)
helloworld.c:3:10: fatal error: gst/sdp/sdp.h: No such file or directory
 #include <gst/sdp/sdp.h>
          ^~~~~~~~~~~~~~~
compilation terminated.
I followed this: https://www.collabora.com/news-and-b...mer-gst-build/
Code:
$ locate gst/sdp
/home/.../work/gstreamer-setup/gst-build/builddir/subprojects/gst-plugins-bad/gst/sdp
/home/.../work/gstreamer-setup/gst-build/builddir/subprojects/gst-plugins-base/gst-libs/gst/sdp
/home/.../work/gstreamer-setup/gst-build/builddir/subprojects/gst-plugins-base/gst-libs/gst/sdp/libgstsdp-1.0.so
/home/.../work/gstreamer-setup/gst-build/builddir/subprojects/gst-plugins-base/gst-libs/gst/sdp/libgstsdp-1.0.so.0
/home/.../work/gstreamer-setup/gst-build/subprojects/gst-plugins-bad/gst/sdp
/home/.../work/gstreamer-setup/gst-build/subprojects/gst-plugins-bad/gst/sdp/gstsdpdemux.c
/home/.../work/gstreamer-setup/gst-build/subprojects/gst-plugins-bad/gst/sdp/gstsdpdemux.h
/home/.../work/gstreamer-setup/gst-build/subprojects/gst-plugins-bad/gst/sdp/gstsdpelem.c
/home/.../work/gstreamer-setup/gst-build/subprojects/gst-plugins-bad/gst/sdp/gstsdpsrc.c
/home/.../work/gstreamer-setup/gst-build/subprojects/gst-plugins-bad/gst/sdp/gstsdpsrc.h
/home/.../work/gstreamer-setup/gst-build/subprojects/gst-plugins-bad/gst/sdp/meson.build
/home/.../work/gstreamer-setup/gst-build/subprojects/gst-plugins-base/gst-libs/gst/sdp
/home/.../work/gstreamer-setup/gst-build/subprojects/gst-plugins-base/gst-libs/gst/sdp/gstmikey.c
/home/.../work/gstreamer-setup/gst-build/subprojects/gst-plugins-base/gst-libs/gst/sdp/gstmikey.h
/home/.../work/gstreamer-setup/gst-build/subprojects/gst-plugins-base/gst-libs/gst/sdp/gstsdp.h
/home/.../work/gstreamer-setup/gst-build/subprojects/gst-plugins-base/gst-libs/gst/sdp/gstsdpmessage.c
/home/.../work/gstreamer-setup/gst-build/subprojects/gst-plugins-base/gst-libs/gst/sdp/gstsdpmessage.h
/home/.../work/gstreamer-setup/gst-build/subprojects/gst-plugins-base/gst-libs/gst/sdp/meson.build
/home/.../work/gstreamer-setup/gst-build/subprojects/gst-plugins-base/gst-libs/gst/sdp/sdp-prelude.h
/home/.../work/gstreamer-setup/gst-build/subprojects/gst-plugins-base/gst-libs/gst/sdp/sdp.h
Code:
$ GST_DEBUG=videotestsrc:1 gst-launch-1.0 videotestsrc num-buffers=1 ! fakevideosink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 0:00:00.033698197
Setting pipeline to NULL ...
Freeing pipeline ...
Installed "libgstreamer-plugins-base1.0-dev"
Code:
$sudo apt-get install libgstreamer-plugins-base1.0-dev
$locate gst/sdp
...
/usr/include/gstreamer-1.0/gst/sdp
/usr/include/gstreamer-1.0/gst/sdp/gstmikey.h
/usr/include/gstreamer-1.0/gst/sdp/gstsdp.h
/usr/include/gstreamer-1.0/gst/sdp/gstsdpmessage.h
/usr/include/gstreamer-1.0/gst/sdp/sdp-prelude.h
/usr/include/gstreamer-1.0/gst/sdp/sdp.h
[gst-master] xyz:~/.../work/gstreamer-setup/gst-build$ gcc -Wall helloworld.c -o helloworld $(pkg-config --cflags --libs gstreamer-1.0)
helloworld.c:3:10: fatal error: gst/sdp/sdp.h: No such file or directory
 #include <gst/sdp/sdp.h>
          ^~~~~~~~~~~~~~~
compilation terminated.
What information should I present here for you to help me?

Last edited by Aquarius_Girl; 01-29-2021 at 08:50 AM.
 
Old 01-29-2021, 11:14 AM   #2
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,688

Rep: Reputation: Disabled
Quote:
Originally Posted by TheIndependentAquarius View Post
Code:
/usr/include/gstreamer-1.0/gst/sdp/sdp.h
As you can see from above, it's either <gstreamer-1.0/gst/sdp/sdp.h> or pkg-config --cflags gstreamer-1.0 plus <gst/sdp/sdp.h>, i.e. place $(pkg-config --cflags) before, and $(pkg-config --libs) after the source on the command line:
Code:
gcc -Wall $(pkg-config --cflags gstreamer-1.0) helloworld.c $(pkg-config --libs gstreamer-1.0) -o helloworld
Alternatively, you can do it like this:
Code:
CFLAGS="$(pkg-config --cflags gstreamer-1.0)"
LDFLAGS="$(pkg-config --libs gstreamer-1.0)"
gcc -Wall $CFLAGS helloworld.c $LDFLAGS -o helloworld
GCC reads its options from left to right. If it encounters helloworld.c first, it processes the file, sees <gst/sdp/sdp.h> in it, but cannot find /usr/include/gst/sdp/sdp.h, even although pkg-config sets -I/usr/include/gstreamer-1.0 afterwards.

Last edited by shruggy; 01-29-2021 at 11:55 AM.
 
2 members found this post helpful.
Old 01-29-2021, 09:54 PM   #3
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,732

Original Poster
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
I am thankful for your help.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Cross-compiling with gst-build and GStreamer LXer Syndicated Linux News 0 05-16-2020 11:20 AM
gstreamer: play-pause of audio file hangs with gst-play command on Raspberry pi 2 Roronoa Zoro Linux - Newbie 2 10-14-2015 11:33 AM
[SOLVED] error: asm/ppc_asm.h: No such file or directory and error: asm/processor.h: No such f Thirupathip Linux - Newbie 3 01-25-2013 03:02 AM
[SOLVED] [gst-python] Python warning with gstreamer Snark1994 Programming 2 01-09-2011 09:56 AM
how to compile gstreamer (problem with gst-inspect can't cd to...)? ogara Linux - General 1 12-10-2010 06:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration