mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 04:36:20 +00:00
Improve building documentation
- Add apt-get install lines for Ubuntu 18.04 - add gstreamer-webrtc-1.0 and gstreamer-sdp-1.0 to CFLAGS - make the CLAGS match LIBS in Makefile dependencies
This commit is contained in:
parent
a63902e621
commit
92bce589d8
4 changed files with 36 additions and 6 deletions
|
@ -18,6 +18,12 @@ One thing to note is that it's written in Python 2, so you may need to replace a
|
||||||
|
|
||||||
## Building GStreamer manually from source
|
## Building GStreamer manually from source
|
||||||
|
|
||||||
|
Here are the commands for Ubuntu 18.04.
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt-get install -y gstreamer1.0-tools gstreamer1.0-nice gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-plugins-good libgstreamer1.0-dev git libglib2.0-dev libgstreamer-plugins-bad1.0-dev libsoup2.4-dev libjson-glib-dev
|
||||||
|
```
|
||||||
|
|
||||||
For hacking on the webrtc plugin, you may want to build manually using the git repositories:
|
For hacking on the webrtc plugin, you may want to build manually using the git repositories:
|
||||||
|
|
||||||
- http://cgit.freedesktop.org/gstreamer/gstreamer
|
- http://cgit.freedesktop.org/gstreamer/gstreamer
|
||||||
|
@ -61,7 +67,7 @@ http://blog.nirbheek.in/2018/02/gstreamer-webrtc.html
|
||||||
|
|
||||||
#### Running the C version
|
#### Running the C version
|
||||||
|
|
||||||
* Build the sources in the `gst/` directory on your machine
|
* Build the sources in the `gst/` directory on your machine. Use `make` or
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ gcc webrtc-sendrecv.c $(pkg-config --cflags --libs gstreamer-webrtc-1.0 gstreamer-sdp-1.0 libsoup-2.4 json-glib-1.0) -o webrtc-sendrecv
|
$ gcc webrtc-sendrecv.c $(pkg-config --cflags --libs gstreamer-webrtc-1.0 gstreamer-sdp-1.0 libsoup-2.4 json-glib-1.0) -o webrtc-sendrecv
|
||||||
|
|
|
@ -428,6 +428,7 @@ start_pipeline (void)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
err:
|
err:
|
||||||
|
g_print ("State change failure\n");
|
||||||
if (pipeline)
|
if (pipeline)
|
||||||
g_clear_object (&pipeline);
|
g_clear_object (&pipeline);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -517,6 +518,7 @@ do_join_room (const gchar * text)
|
||||||
}
|
}
|
||||||
|
|
||||||
app_state = ROOM_JOINED;
|
app_state = ROOM_JOINED;
|
||||||
|
g_print ("Room joined\n");
|
||||||
/* Start recording, but not transmitting */
|
/* Start recording, but not transmitting */
|
||||||
if (!start_pipeline ()) {
|
if (!start_pipeline ()) {
|
||||||
cleanup_and_quit_loop ("ERROR: Failed to start pipeline",
|
cleanup_and_quit_loop ("ERROR: Failed to start pipeline",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
CC := gcc
|
CC := gcc
|
||||||
LIBS := $(shell pkg-config --libs --cflags gstreamer-webrtc-1.0 gstreamer-sdp-1.0 libsoup-2.4 json-glib-1.0)
|
LIBS := $(shell pkg-config --libs --cflags glib-2.0 gstreamer-1.0 gstreamer-sdp-1.0 gstreamer-webrtc-1.0 json-glib-1.0 libsoup-2.4)
|
||||||
CFLAGS := -O0 -ggdb -Wall -fno-omit-frame-pointer
|
CFLAGS := -O0 -ggdb -Wall -fno-omit-frame-pointer \
|
||||||
|
$(shell pkg-config --cflags glib-2.0 gstreamer-1.0 gstreamer-sdp-1.0 gstreamer-webrtc-1.0 json-glib-1.0 libsoup-2.4)
|
||||||
webrtc-sendrecv: webrtc-sendrecv.c
|
webrtc-sendrecv: webrtc-sendrecv.c
|
||||||
"$(CC)" $(CFLAGS) $^ $(LIBS) -o $@
|
"$(CC)" $(CFLAGS) $^ $(LIBS) -o $@
|
||||||
|
|
|
@ -16,6 +16,8 @@ $ ./generate_cert.sh
|
||||||
$ ./simple-server.py
|
$ ./simple-server.py
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Session Based
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ ./session-client.py
|
$ ./session-client.py
|
||||||
Our uid is 'ws-test-client-8f63b9'
|
Our uid is 'ws-test-client-8f63b9'
|
||||||
|
@ -24,3 +26,23 @@ Our uid is 'ws-test-client-8f63b9'
|
||||||
```console
|
```console
|
||||||
$ ./session-client.py --call ws-test-client-8f63b9
|
$ ./session-client.py --call ws-test-client-8f63b9
|
||||||
```
|
```
|
||||||
|
### Room Based
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ ./room-client.py --room 123
|
||||||
|
Our uid is 'ws-test-client-bdb5b9'
|
||||||
|
Got ROOM_OK for room '123'
|
||||||
|
```
|
||||||
|
|
||||||
|
Another window
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ ./room-client.py --room 123
|
||||||
|
Our uid is 'ws-test-client-78b59a'
|
||||||
|
Got ROOM_OK for room '123'
|
||||||
|
Sending offer to 'ws-test-client-bdb5b9'
|
||||||
|
Sent: ROOM_PEER_MSG ws-test-client-bdb5b9 {"sdp": "initial sdp"}
|
||||||
|
Got answer from 'ws-test-client-bdb5b9': {"sdp": "reply sdp"}
|
||||||
|
```
|
||||||
|
|
||||||
|
.. and similar output with more clients in the same room.
|
||||||
|
|
Loading…
Reference in a new issue