Installing GStreamer on Linux

CrM·2024년 1월 2일

GStreamer

목록 보기
2/3

https://gstreamer.freedesktop.org/documentation/installing/on-linux.html?gi-language=c


Prerequisites

  • Linux - Ubuntu 20.04 LTS
    • GStreamer는 모든 Linux 배포 버전에 포함되어 있긴 하지만, 최신 버전을 권장 (Fedora, non-LTS Ubuntu 등)
  • superuser (root) 권한
  • gcc compiler
  • text editor

Install

sudo apt-get install -y libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio

Build

# to use GStreamer library
pkg-config --cflags --libs <gstreamer_libraries>
 
# ex
pkg-config --cflags --libs gstreamer-1.0 gstreamer-video-1.0

GStreamer library를 여러 개 사용하는 경우, 공백으로 구분하여 연속 나열


Tutorial Source Code

# clone git repo
git clone https://gitlab.freedesktop.org/gstreamer/gstreamer
 
# build
gcc basic-tutorial-1.c -o basic-tutorial-1 `pkg-config --cflags --libs gstreamer-1.0`
 
# run
./basic-tutorial-1
  • Tutorial의 source code 위치(directory)
    • subprojects/gst-docs/examples/tutorials

0개의 댓글