add doc strings to all examples

This commit is contained in:
tinyzimmer
2020-10-04 14:05:40 +03:00
parent 02475beef9
commit 05c99cc6b9
5 changed files with 12 additions and 7 deletions

View File

@@ -1,3 +1,4 @@
// This example shows how to use the appsink element.
package main package main
import ( import (

View File

@@ -1,3 +1,4 @@
// This example shows how to use the appsrc element.
package main package main
import ( import (

View File

@@ -1,3 +1,4 @@
// This example demonstrates the use of custom events in a pipeline.
package main package main
import ( import (

View File

@@ -1,26 +1,27 @@
// This example demonstrates the use of the decodebin element // This example demonstrates the use of the decodebin element.
//
// The decodebin element tries to automatically detect the incoming // The decodebin element tries to automatically detect the incoming
// format and to autoplug the appropriate demuxers / decoders to handle it. // format and to autoplug the appropriate demuxers / decoders to handle it.
// and decode it to raw audio, video or subtitles. // and decode it to raw audio, video or subtitles.
// Before the pipeline hasn't been prerolled, the decodebin can't possibly know what // Before the pipeline hasn't been prerolled, the decodebin can't possibly know what
// format it gets as its input. So at first, the pipeline looks like this: // format it gets as its input. So at first, the pipeline looks like this:
//
// {filesrc} - {decodebin} // {filesrc} - {decodebin}
//
// As soon as the decodebin has detected the stream format, it will try to decode every // As soon as the decodebin has detected the stream format, it will try to decode every
// contained stream to its raw format. // contained stream to its raw format.
// The application connects a signal-handler to decodebin's pad-added signal, which tells us // The application connects a signal-handler to decodebin's pad-added signal, which tells us
// whenever the decodebin provided us with another contained (raw) stream from the input file. // whenever the decodebin provided us with another contained (raw) stream from the input file.
//
// This application supports audio and video streams. Video streams are // This application supports audio and video streams. Video streams are
// displayed using an autovideosink, and audiostreams are played back using autoaudiosink. // displayed using an autovideosink, and audiostreams are played back using autoaudiosink.
// So for a file that contains one audio and one video stream, // So for a file that contains one audio and one video stream,
// the pipeline looks like the following: // the pipeline looks like the following:
//
// /-[audio]-{audioconvert}-{audioresample}-{autoaudiosink} // /-[audio]-{audioconvert}-{audioresample}-{autoaudiosink}
// {filesrc}-{decodebin}-| // {filesrc}-{decodebin}-|
// \-[video]-{viceoconvert}-{videoscale}-{autovideosink} // \-[video]-{viceoconvert}-{videoscale}-{autovideosink}
//
// Both auto-sinks at the end automatically select the best available (actual) sink. Since the // Both auto-sinks at the end automatically select the best available (actual) sink. Since the
// selection of available actual sinks is platform specific // selection of available actual sinks is platform specific
// (like using pulseaudio for audio output on linux, e.g.), // (like using pulseaudio for audio output on linux, e.g.),

View File

@@ -1,4 +1,5 @@
// This example uses gstreamer's discoverer api // This example uses gstreamer's discoverer api.
//
// https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/GstDiscoverer.html // https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/GstDiscoverer.html
// To detect as much information from a given URI. // To detect as much information from a given URI.
// The amount of time that the discoverer is allowed to use is limited by a timeout. // The amount of time that the discoverer is allowed to use is limited by a timeout.