mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
faq: developing: turn questions into sub-sections
Additionally: Add missing markup to CLI examples.
This commit is contained in:
parent
a7a86d1ea8
commit
692c55d0fd
1 changed files with 35 additions and 27 deletions
|
@ -1,6 +1,6 @@
|
||||||
# Developing applications with GStreamer
|
# Developing applications with GStreamer
|
||||||
|
|
||||||
> How do I compile programs that use GStreamer ?
|
## How do I compile programs that use GStreamer ?
|
||||||
|
|
||||||
<!-- FIXME: update for windows, macOS, and meson build, get rid of libtool things -->
|
<!-- FIXME: update for windows, macOS, and meson build, get rid of libtool things -->
|
||||||
|
|
||||||
|
@ -14,15 +14,17 @@ familiar with using it already then you're basically set.
|
||||||
|
|
||||||
If you're not familiar with `pkg-config` to compile and link a small
|
If you're not familiar with `pkg-config` to compile and link a small
|
||||||
one-file program, pass the `--cflags` and `--libs` arguments to `pkg-config`.
|
one-file program, pass the `--cflags` and `--libs` arguments to `pkg-config`.
|
||||||
For
|
For example:
|
||||||
example:
|
|
||||||
|
|
||||||
$ libtool --mode=link gcc `pkg-config --cflags --libs gstreamer-1.0` -o myprog myprog.c
|
|
||||||
|
|
||||||
|
```
|
||||||
|
$ libtool --mode=link gcc `pkg-config --cflags --libs gstreamer-1.0` -o myprog myprog.c
|
||||||
|
```
|
||||||
would be sufficient for a gstreamer-only program. If (for example) your
|
would be sufficient for a gstreamer-only program. If (for example) your
|
||||||
application also used GTK+ 3.0, you could use
|
application also used GTK+ 3.0, you could use
|
||||||
|
|
||||||
$ libtool --mode=link gcc `pkg-config --cflags --libs gstreamer-1.0 gtk+-3.0` -o myprog myprog.c
|
```
|
||||||
|
$ libtool --mode=link gcc `pkg-config --cflags --libs gstreamer-1.0 gtk+-3.0` -o myprog myprog.c
|
||||||
|
```
|
||||||
|
|
||||||
Those are back-ticks (on the same key with the tilde on US keyboards),
|
Those are back-ticks (on the same key with the tilde on US keyboards),
|
||||||
not single quotes.
|
not single quotes.
|
||||||
|
@ -31,7 +33,7 @@ For bigger projects, you should integrate pkg-config use in your
|
||||||
Makefile, or integrate with autoconf using the pkg.m4 macro (providing
|
Makefile, or integrate with autoconf using the pkg.m4 macro (providing
|
||||||
`PKG_CONFIG_CHECK`).
|
`PKG_CONFIG_CHECK`).
|
||||||
|
|
||||||
> How do I develop against an uninstalled GStreamer copy ?
|
## How do I develop against an uninstalled GStreamer copy ?
|
||||||
|
|
||||||
It is possible to develop and compile against an uninstalled copy
|
It is possible to develop and compile against an uninstalled copy
|
||||||
of gstreamer and gst-plugins-\* (for example, against git checkouts).
|
of gstreamer and gst-plugins-\* (for example, against git checkouts).
|
||||||
|
@ -69,7 +71,7 @@ environment is used.
|
||||||
[gst-uninstalled]: http://cgit.freedesktop.org/gstreamer/gstreamer/tree/scripts/gst-uninstalled
|
[gst-uninstalled]: http://cgit.freedesktop.org/gstreamer/gstreamer/tree/scripts/gst-uninstalled
|
||||||
[create-uninstalled]: http://cgit.freedesktop.org/gstreamer/gstreamer/tree/scripts/create-uninstalled-setup.sh
|
[create-uninstalled]: http://cgit.freedesktop.org/gstreamer/gstreamer/tree/scripts/create-uninstalled-setup.sh
|
||||||
|
|
||||||
> How can I use GConf to get the system-wide defaults ?
|
## How can I use GConf to get the system-wide defaults ?
|
||||||
|
|
||||||
For GNOME applications it's a good idea to use GConf to find the
|
For GNOME applications it's a good idea to use GConf to find the
|
||||||
default ways of outputting audio and video. You can do this by using the
|
default ways of outputting audio and video. You can do this by using the
|
||||||
|
@ -78,14 +80,16 @@ output. They will take care of everything GConf-related for you and
|
||||||
automatically use the outputs that the user configured. If you are using
|
automatically use the outputs that the user configured. If you are using
|
||||||
gconfaudiosink, your application should set the 'profile' property.
|
gconfaudiosink, your application should set the 'profile' property.
|
||||||
|
|
||||||
> How do I debug these funny shell scripts that libtool makes ?
|
## How do I debug these funny shell scripts that libtool makes ?
|
||||||
|
|
||||||
When you link a program against uninstalled GStreamer using
|
When you link a program against uninstalled GStreamer using
|
||||||
libtool, funny shell scripts are made to modify your shared object
|
libtool, funny shell scripts are made to modify your shared object
|
||||||
search path and then run your program. For instance, to debug
|
search path and then run your program. For instance, to debug
|
||||||
gst-launch, try
|
gst-launch, try
|
||||||
|
|
||||||
libtool --mode=execute gdb /path/to/gst-launch
|
```
|
||||||
|
libtool --mode=execute gdb /path/to/gst-launch
|
||||||
|
```
|
||||||
|
|
||||||
If this does not work, you're probably using a broken version of
|
If this does not work, you're probably using a broken version of
|
||||||
libtool.
|
libtool.
|
||||||
|
@ -95,7 +99,7 @@ be used and this is not a problem. You can run `gdb`, `valgrind` or any
|
||||||
debugging tools directly on the binaries Meson creates in the build
|
debugging tools directly on the binaries Meson creates in the build
|
||||||
directory.
|
directory.
|
||||||
|
|
||||||
> Why is mail traffic so low on gstreamer-devel ?
|
## Why is mail traffic so low on gstreamer-devel ?
|
||||||
|
|
||||||
Our main arena for coordination and discussion are IRC and bugzilla, not
|
Our main arena for coordination and discussion are IRC and bugzilla, not
|
||||||
mailing lists. Join us in [`#gstreamer`][irc-gstreamer] on irc.freenode.net.
|
mailing lists. Join us in [`#gstreamer`][irc-gstreamer] on irc.freenode.net.
|
||||||
|
@ -106,7 +110,7 @@ mailing list is never a bad idea, however.
|
||||||
[irc-gstreamer]: irc://irc.freenode.net/#gstreamer
|
[irc-gstreamer]: irc://irc.freenode.net/#gstreamer
|
||||||
[webchat-gstreamer]: https://webchat.freenode.net
|
[webchat-gstreamer]: https://webchat.freenode.net
|
||||||
|
|
||||||
> What kind of versioning scheme does GStreamer use ?
|
## What kind of versioning scheme does GStreamer use ?
|
||||||
|
|
||||||
For public releases, GStreamer uses a standard MAJOR.MINOR.MICRO
|
For public releases, GStreamer uses a standard MAJOR.MINOR.MICRO
|
||||||
version scheme. If the release consists of mostly bug fixes or
|
version scheme. If the release consists of mostly bug fixes or
|
||||||
|
@ -129,7 +133,7 @@ not supported. Additionally, if you didn't get this package or tarball
|
||||||
from the GStreamer team, don't have high hopes on it doing whatever you
|
from the GStreamer team, don't have high hopes on it doing whatever you
|
||||||
want it to do.
|
want it to do.
|
||||||
|
|
||||||
> What is the coding style for GStreamer code?
|
## What is the coding style for GStreamer code?
|
||||||
|
|
||||||
The core and almost all plugin modules are basically coded in
|
The core and almost all plugin modules are basically coded in
|
||||||
K\&R with 2-space indenting. Just follow what's already there and you'll
|
K\&R with 2-space indenting. Just follow what's already there and you'll
|
||||||
|
@ -142,19 +146,21 @@ course, the goal.
|
||||||
|
|
||||||
Simply run your code (only the \*.c files, not the header files) through
|
Simply run your code (only the \*.c files, not the header files) through
|
||||||
|
|
||||||
indent \
|
```
|
||||||
--braces-on-if-line \
|
indent \
|
||||||
--case-brace-indentation0 \
|
--braces-on-if-line \
|
||||||
--case-indentation2 \
|
--case-brace-indentation0 \
|
||||||
--braces-after-struct-decl-line \
|
--case-indentation2 \
|
||||||
--line-length80 \
|
--braces-after-struct-decl-line \
|
||||||
--no-tabs \
|
--line-length80 \
|
||||||
--cuddle-else \
|
--no-tabs \
|
||||||
--dont-line-up-parentheses \
|
--cuddle-else \
|
||||||
--continuation-indentation4 \
|
--dont-line-up-parentheses \
|
||||||
--honour-newlines \
|
--continuation-indentation4 \
|
||||||
--tab-size8 \
|
--honour-newlines \
|
||||||
--indent-level2
|
--tab-size8 \
|
||||||
|
--indent-level2
|
||||||
|
```
|
||||||
|
|
||||||
before submitting a patch. (This is using GNU indent.) There is also a
|
before submitting a patch. (This is using GNU indent.) There is also a
|
||||||
`gst-indent` script in the GStreamer core source tree in the tools
|
`gst-indent` script in the GStreamer core source tree in the tools
|
||||||
|
@ -179,7 +185,9 @@ See [How to submit patches][submit-patches] for more details.
|
||||||
|
|
||||||
[submit-patches]: contribute/index.md#how-to-submit-patches
|
[submit-patches]: contribute/index.md#how-to-submit-patches
|
||||||
|
|
||||||
> I have translated one of the module .po files into a new language. How do I get it included?
|
## How do I get my translations included?
|
||||||
|
|
||||||
|
I have translated one of the module .po files into a new language. How do I get it included?
|
||||||
|
|
||||||
GStreamer translations are uniformly managed through the
|
GStreamer translations are uniformly managed through the
|
||||||
[Translation Project](http://translationproject.org). There are some
|
[Translation Project](http://translationproject.org). There are some
|
||||||
|
|
Loading…
Reference in a new issue