Video
open class Video : Widget, VideoProtocol
GtkVideo is a widget to show a GtkMediaStream with media controls.

The controls are available separately as [classGtk.MediaControls].
If you just want to display a video without controls, you can treat it
like any other paintable and for example put it into a [classGtk.Picture].
GtkVideo aims to cover use cases such as previews, embedded animations,
etc. It supports autoplay, looping, and simple media controls. It does
not have support for video overlays, multichannel audio, device
selection, or input. If you are writing a full-fledged video player,
you may want to use the [classGdk.Paintable] API and a media framework
such as Gstreamer directly.
The Video type acts as a reference-counted owner of an underlying GtkVideo instance.
It provides the methods that can operate on this data type through VideoProtocol conformance.
Use Video as a strong reference or owner of a GtkVideo instance.
-
Designated initialiser from the underlying `C` data type.This creates an instance without performing an unbalanced retain i.e., ownership is transferred to the
Videoinstance.Declaration
Swift
@inlinable public init(_ op: UnsafeMutablePointer<GtkVideo>)Parameters
oppointer to the underlying object
-
Designated initialiser from a constant pointer to the underlying
Cdata type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to theVideoinstance.Declaration
Swift
@inlinable public init(_ op: UnsafePointer<GtkVideo>)Parameters
oppointer to the underlying object
-
Optional initialiser from a non-mutating
gpointerto the underlyingCdata type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to theVideoinstance.Declaration
Swift
@inlinable override public init!(gpointer op: gpointer?)Parameters
opgpointer to the underlying object
-
Optional initialiser from a non-mutating
gconstpointerto the underlyingCdata type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to theVideoinstance.Declaration
Swift
@inlinable override public init!(gconstpointer op: gconstpointer?)Parameters
oppointer to the underlying object
-
Optional initialiser from a constant pointer to the underlying
Cdata type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to theVideoinstance.Declaration
Swift
@inlinable public init!(_ op: UnsafePointer<GtkVideo>?)Parameters
oppointer to the underlying object
-
Optional initialiser from the underlying
Cdata type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to theVideoinstance.Declaration
Swift
@inlinable public init!(_ op: UnsafeMutablePointer<GtkVideo>?)Parameters
oppointer to the underlying object
-
Designated initialiser from the underlying
Cdata type. Will retainGtkVideo. i.e., ownership is transferred to theVideoinstance.Declaration
Swift
@inlinable public init(retaining op: UnsafeMutablePointer<GtkVideo>)Parameters
oppointer to the underlying object
-
Reference intialiser for a related type that implements
VideoProtocolWill retainGtkVideo.Declaration
Swift
@inlinable public init<T>(video other: T) where T : VideoProtocolParameters
otheran instance of a related type that implements
VideoProtocol -
Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
VideoProtocol.Declaration
Swift
@inlinable override public init<T>(cPointer p: UnsafeMutablePointer<T>)Parameters
cPointerpointer to the underlying object
-
Unsafe typed, retaining initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
VideoProtocol.Declaration
Swift
@inlinable override public init<T>(retainingCPointer cPointer: UnsafeMutablePointer<T>)Parameters
cPointerpointer to the underlying object
-
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
VideoProtocol.Declaration
Swift
@inlinable override public init(raw p: UnsafeRawPointer)Parameters
praw pointer to the underlying object
-
Unsafe untyped, retaining initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
VideoProtocol.Declaration
Swift
@inlinable override public init(retainingRaw raw: UnsafeRawPointer) -
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
VideoProtocol.Declaration
Swift
@inlinable public required init(raw p: UnsafeMutableRawPointer)Parameters
pmutable raw pointer to the underlying object
-
Unsafe untyped, retaining initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
VideoProtocol.Declaration
Swift
@inlinable required public init(retainingRaw raw: UnsafeMutableRawPointer)Parameters
rawmutable raw pointer to the underlying object
-
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
VideoProtocol.Declaration
Swift
@inlinable override public init(opaquePointer p: OpaquePointer)Parameters
popaque pointer to the underlying object
-
Unsafe untyped, retaining initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
VideoProtocol.Declaration
Swift
@inlinable override public init(retainingOpaquePointer p: OpaquePointer)Parameters
popaque pointer to the underlying object
-
Creates a new empty
GtkVideo.Declaration
Swift
@inlinable public init() -
Creates a
GtkVideoto play back the givenfile.Declaration
Swift
@inlinable public init<FileT>(file: FileT?) where FileT : FileProtocol -
Creates a
GtkVideoto play back the givenfilename.This is a utility function that calls [ctor
Gtk.Video.new_for_file], See that function for details.Declaration
Swift
@inlinable public init(filename: UnsafePointer<CChar>? = nil) -
Creates a
GtkVideoto play back the givenstream.Declaration
Swift
@inlinable public init<MediaStreamT>(mediaStream stream: MediaStreamT?) where MediaStreamT : MediaStreamProtocol -
Creates a
GtkVideoto play back the resource at the givenresource_path.This is a utility function that calls [ctor
Gtk.Video.new_for_file].Declaration
Swift
@inlinable public init(resource resourcePath: UnsafePointer<CChar>? = nil) -
Creates a
GtkVideoto play back the givenfile.Declaration
Swift
@inlinable public static func newFor<FileT>(file: FileT?) -> Widget! where FileT : FileProtocol -
Creates a
GtkVideoto play back the givenfilename.This is a utility function that calls [ctor
Gtk.Video.new_for_file], See that function for details.Declaration
Swift
@inlinable public static func newFor(filename: UnsafePointer<CChar>? = nil) -> Widget! -
Creates a
GtkVideoto play back the givenstream.Declaration
Swift
@inlinable public static func newForMedia<MediaStreamT>(mediaStream stream: MediaStreamT?) -> Widget! where MediaStreamT : MediaStreamProtocol -
Creates a
GtkVideoto play back the resource at the givenresource_path.This is a utility function that calls [ctor
Gtk.Video.new_for_file].Declaration
Swift
@inlinable public static func newFor(resource resourcePath: UnsafePointer<CChar>? = nil) -> Widget!
View on GitHub
Install in Dash
Video Class Reference