avtp: Update documentation

- Mention that a new capability is required by "avtpsink" element;
 - Use "clockselect" element to change pipeline clock, instead of a
   gst-launch option that never saw the light of day.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1443>
This commit is contained in:
Ederson de Souza 2020-07-16 13:32:56 -07:00
parent 3803fa29b2
commit 51d5aee94d

View file

@ -134,12 +134,13 @@
* ### Capabilities * ### Capabilities
* *
* The `avtpsink` and `avtpsrc` elements open `AF_PACKET` sockets, which require * The `avtpsink` and `avtpsrc` elements open `AF_PACKET` sockets, which require
* `CAP_NET_RAW` capability. Therefore, applications must have that capability * `CAP_NET_RAW` capability. Also, `avtpsink` needs `CAP_NET_ADMIN` to use ETF.
* in order to successfully use this element. For instance, one can use: * Therefore, applications must have those capabilities in order to successfully
* use these elements. For instance, one can use:
* *
* $ sudo setcap cap_net_raw+ep <application> * $ sudo setcap cap_net_raw,cap_net_admin+ep <application>
* *
* Applications can drop this capability after the sockets are open, after * Applications can drop these capabilities after the sockets are open, after
* `avtpsrc` or `avtpsink` elements transition to PAUSED state. See setcap(8) * `avtpsrc` or `avtpsink` elements transition to PAUSED state. See setcap(8)
* man page for more information. * man page for more information.
* *
@ -182,25 +183,27 @@
* *
* ### Running a sample pipeline * ### Running a sample pipeline
* *
* The following pipelines assume a hypothetical `-k ptp` flag that forces the * The following pipelines uses debugutilsbad "clockselect" element to force
* pipeline clock to be GstPtpClock. A real application would programmatically * the pipeline clock to be GstPtpClock. A real application would
* define GstPtpClock as the pipeline clock (see next section). It is also * programmatically define GstPtpClock as the pipeline clock (see next section).
* assumed that `gst-launch-1.0` has CAP_NET_RAW capability. * It is also assumes that `gst-launch-1.0` has CAP_NET_RAW and CAP_NET_ADMIN
* capabilities.
* *
* On the AVTP talker, the following pipeline can be used to generate an H.264 * On the AVTP talker, the following pipeline can be used to generate an H.264
* stream to be sent via network using AVTP: * stream to be sent via network using AVTP:
* *
* $ gst-launch-1.0 -k ptp videotestsrc is-live=true ! clockoverlay ! \ * $ gst-launch-1.0 clockselect. \( clockid=ptp \
* x264enc ! avtpcvfpay processing-deadline=20000000 ! \ * videotestsrc is-live=true ! clockoverlay ! x264enc ! \
* avtpcrfsync ifname=$IFNAME ! avtpsink ifname=$IFNAME * avtpcvfpay processing-deadline=20000000 ! \
* avtpcrfsync ifname=$IFNAME ! avtpsink ifname=$IFNAME \)
* *
* On the AVTP listener host, the following pipeline can be used to get the * On the AVTP listener host, the following pipeline can be used to get the
* AVTP stream, depacketize it and show it on the screen: * AVTP stream, depacketize it and show it on the screen:
* *
* $ gst-launch-1.0 -k ptp avtpsrc ifname=$IFNAME ! \ * $ gst-launch-1.0 clockselect. \( clockid=ptp avtpsrc ifname=$IFNAME ! \
* avtpcrfcheck ifname=$IFNAME ! avtpcvfdepay ! \ * avtpcrfcheck ifname=$IFNAME ! avtpcvfdepay ! \
* vaapih264dec ! videoconvert ! clockoverlay halignment=right ! \ * vaapih264dec ! videoconvert ! clockoverlay halignment=right ! \
* queue ! autovideosink * queue ! autovideosink \)
* *
* ### Pipeline clock * ### Pipeline clock
* *