fix some comments from copy/paste

This commit is contained in:
Dan Jenkins
2022-08-16 09:02:14 +01:00
parent b7e14819ef
commit 8253c81e6d
5 changed files with 8 additions and 22 deletions

View File

@@ -1,13 +1,6 @@
// This example uses gstreamer's discoverer api. // This example uses gstreamer's device monitor api.
// //
// https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/GstDiscoverer.html // https://gstreamer.freedesktop.org/documentation/gstreamer/gstdevicemonitor.html
// 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.
// This allows to handle e.g. network problems gracefully. When the timeout hits before
// discoverer was able to detect anything, discoverer will report an error.
// In this example, we catch this error and stop the application.
// Discovered information could for example contain the stream's duration or whether it is
// seekable (filesystem) or not (some http servers).
package main package main
import ( import (

View File

@@ -1,13 +1,6 @@
// This example uses gstreamer's discoverer api. // This example uses gstreamer's device provider api.
// //
// https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/GstDiscoverer.html // https://gstreamer.freedesktop.org/documentation/gstreamer/gstdeviceprovider.html
// 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.
// This allows to handle e.g. network problems gracefully. When the timeout hits before
// discoverer was able to detect anything, discoverer will report an error.
// In this example, we catch this error and stop the application.
// Discovered information could for example contain the stream's duration or whether it is
// seekable (filesystem) or not (some http servers).
package main package main
import ( import (

View File

@@ -38,7 +38,7 @@ func (d *DeviceMonitor) RemoveFilter(filterId uint) bool {
return gobool(C.gst_device_monitor_remove_filter(d.ptr, C.guint(filterId))) return gobool(C.gst_device_monitor_remove_filter(d.ptr, C.guint(filterId)))
} }
// GetPipelineBus returns the message bus for this pipeline. // GetBus returns the message bus for this pipeline.
func (d *DeviceMonitor) GetBus() *Bus { func (d *DeviceMonitor) GetBus() *Bus {
if d.bus == nil { if d.bus == nil {
cBus := C.gst_device_monitor_get_bus(d.ptr) cBus := C.gst_device_monitor_get_bus(d.ptr)

View File

@@ -9,7 +9,7 @@ import (
"github.com/tinyzimmer/go-glib/glib" "github.com/tinyzimmer/go-glib/glib"
) )
// DeviceMonitor is a Go representation of a GstDeviceMonitor. // DeviceProvider is a Go representation of a GstDeviceProvider.
type DeviceProvider struct { type DeviceProvider struct {
ptr *C.GstDeviceProvider ptr *C.GstDeviceProvider
bus *Bus bus *Bus
@@ -29,7 +29,7 @@ func (d *DeviceProvider) GetDevices() []*Device {
return out return out
} }
// GetPipelineBus returns the message bus for this pipeline. // GetBus returns the message bus for this pipeline.
func (d *DeviceProvider) GetBus() *Bus { func (d *DeviceProvider) GetBus() *Bus {
if d.bus == nil { if d.bus == nil {
cBus := C.gst_device_provider_get_bus(d.ptr) cBus := C.gst_device_provider_get_bus(d.ptr)

View File

@@ -7,7 +7,7 @@ import (
"unsafe" "unsafe"
) )
// DeviceMonitor is a Go representation of a GstDeviceMonitor. // DeviceProviderFactory is a Go representation of a GstDeviceProviderFactory.
type DeviceProviderFactory struct { type DeviceProviderFactory struct {
ptr *C.GstDeviceProviderFactory ptr *C.GstDeviceProviderFactory
} }