<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
<!ENTITY pi "&#960;">
<!ENTITY solidus "&#8260;">
]>
<refentry id="GtkVideo">
<refmeta>
<refentrytitle role="top_of_page" id="GtkVideo.top_of_page">GtkVideo</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkVideo</refname>
<refpurpose>A widget for displaying video</refpurpose>
</refnamediv>

<refsect1 id="GtkVideo.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-video-new">gtk_video_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-video-new-for-media-stream">gtk_video_new_for_media_stream</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-video-new-for-file">gtk_video_new_for_file</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-video-new-for-filename">gtk_video_new_for_filename</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-video-new-for-resource">gtk_video_new_for_resource</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkMediaStream"><returnvalue>GtkMediaStream</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-video-get-media-stream">gtk_video_get_media_stream</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-video-set-media-stream">gtk_video_set_media_stream</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GFile"><returnvalue>GFile</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-video-get-file">gtk_video_get_file</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-video-set-file">gtk_video_set_file</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-video-set-filename">gtk_video_set_filename</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-video-set-resource">gtk_video_set_resource</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-video-get-autoplay">gtk_video_get_autoplay</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-video-set-autoplay">gtk_video_set_autoplay</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-video-get-loop">gtk_video_get_loop</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-video-set-loop">gtk_video_set_loop</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkVideo.properties" role="properties">
<title role="properties.title">Properties</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="properties_type" colwidth="150px"/>
<colspec colname="properties_name" colwidth="300px"/>
<colspec colname="properties_flags" colwidth="200px"/>
<tbody>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkVideo--autoplay">autoplay</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GFile"><type>GFile</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkVideo--file">file</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkVideo--loop">loop</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GtkMediaStream"><type>GtkMediaStream</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkVideo--media-stream">media-stream</link></entry><entry role="property_flags">Read / Write</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkVideo.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="other_proto_type" colwidth="150px"/>
<colspec colname="other_proto_name"/>
<tbody>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GtkVideo-struct">GtkVideo</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkVideo.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GInitiallyUnowned">GInitiallyUnowned</link>
        <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GtkWidget">GtkWidget</link>
            <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkVideo
</screen>
</refsect1>
<refsect1 id="GtkVideo.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GtkVideo implements
 <link linkend="GtkAccessible">GtkAccessible</link>,  <link linkend="GtkBuildable">GtkBuildable</link> and  <link linkend="GtkConstraintTarget">GtkConstraintTarget</link>.</para>

</refsect1>

<refsect1 id="GtkVideo.includes"><title>Includes</title><synopsis>#include &lt;gtk/gtk.h&gt;
</synopsis></refsect1>

<refsect1 id="GtkVideo.description" role="desc">
<title role="desc.title">Description</title>
<para>GtkVideo is a widget to show a <link linkend="GtkMediaStream"><type>GtkMediaStream</type></link> with media controls
as provided by <link linkend="GtkMediaControls"><type>GtkMediaControls</type></link>. 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 <link linkend="GtkPicture"><type>GtkPicture</type></link>.</para>
<para>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 <link linkend="GdkPaintable"><type>GdkPaintable</type></link> API and a media framework such
as Gstreamer directly.</para>

</refsect1>
<refsect1 id="GtkVideo.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-video-new" role="function">
<title>gtk_video_new&#160;()</title>
<indexterm zone="gtk-video-new"><primary>gtk_video_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_video_new (<parameter><type>void</type></parameter>);</programlisting>
<para>Creates a new empty <link linkend="GtkVideo"><type>GtkVideo</type></link>.</para>
<refsect3 id="gtk-video-new.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GtkVideo"><type>GtkVideo</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-video-new-for-media-stream" role="function">
<title>gtk_video_new_for_media_stream&#160;()</title>
<indexterm zone="gtk-video-new-for-media-stream"><primary>gtk_video_new_for_media_stream</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_video_new_for_media_stream (<parameter><link linkend="GtkMediaStream"><type>GtkMediaStream</type></link> *stream</parameter>);</programlisting>
<para>Creates a <link linkend="GtkVideo"><type>GtkVideo</type></link> to play back the given <parameter>stream</parameter>
.</para>
<refsect3 id="gtk-video-new-for-media-stream.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>stream</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkMediaStream"><type>GtkMediaStream</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-video-new-for-media-stream.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GtkVideo"><type>GtkVideo</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-video-new-for-file" role="function">
<title>gtk_video_new_for_file&#160;()</title>
<indexterm zone="gtk-video-new-for-file"><primary>gtk_video_new_for_file</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_video_new_for_file (<parameter><link linkend="GFile"><type>GFile</type></link> *file</parameter>);</programlisting>
<para>Creates a <link linkend="GtkVideo"><type>GtkVideo</type></link> to play back the given <parameter>file</parameter>
.</para>
<refsect3 id="gtk-video-new-for-file.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>file</para></entry>
<entry role="parameter_description"><para>a <link linkend="GFile"><type>GFile</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-video-new-for-file.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GtkVideo"><type>GtkVideo</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-video-new-for-filename" role="function">
<title>gtk_video_new_for_filename&#160;()</title>
<indexterm zone="gtk-video-new-for-filename"><primary>gtk_video_new_for_filename</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_video_new_for_filename (<parameter>const <link linkend="char"><type>char</type></link> *filename</parameter>);</programlisting>
<para>Creates a <link linkend="GtkVideo"><type>GtkVideo</type></link> to play back the given <parameter>filename</parameter>
.</para>
<para>This is a utility function that calls <link linkend="gtk-video-new-for-file"><function>gtk_video_new_for_file()</function></link>,
See that function for details.</para>
<refsect3 id="gtk-video-new-for-filename.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>filename</para></entry>
<entry role="parameter_description"><para>filename to play back. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>][<acronym>type</acronym> filename]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-video-new-for-filename.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GtkVideo"><type>GtkVideo</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-video-new-for-resource" role="function">
<title>gtk_video_new_for_resource&#160;()</title>
<indexterm zone="gtk-video-new-for-resource"><primary>gtk_video_new_for_resource</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_video_new_for_resource (<parameter>const <link linkend="char"><type>char</type></link> *resource_path</parameter>);</programlisting>
<para>Creates a <link linkend="GtkVideo"><type>GtkVideo</type></link> to play back the resource at the
given <parameter>resource_path</parameter>
.</para>
<para>This is a utility function that calls <link linkend="gtk-video-new-for-file"><function>gtk_video_new_for_file()</function></link>,</para>
<refsect3 id="gtk-video-new-for-resource.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>resource_path</para></entry>
<entry role="parameter_description"><para>resource path to play back. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-video-new-for-resource.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GtkVideo"><type>GtkVideo</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-video-get-media-stream" role="function">
<title>gtk_video_get_media_stream&#160;()</title>
<indexterm zone="gtk-video-get-media-stream"><primary>gtk_video_get_media_stream</primary></indexterm>
<programlisting language="C"><link linkend="GtkMediaStream"><returnvalue>GtkMediaStream</returnvalue></link>&#160;*
gtk_video_get_media_stream (<parameter><link linkend="GtkVideo"><type>GtkVideo</type></link> *self</parameter>);</programlisting>
<para>Gets the media stream managed by <parameter>self</parameter>
 or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if none.</para>
<refsect3 id="gtk-video-get-media-stream.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkVideo"><type>GtkVideo</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-video-get-media-stream.returns" role="returns">
<title>Returns</title>
<para>The media stream managed by <parameter>self</parameter>
. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-video-set-media-stream" role="function">
<title>gtk_video_set_media_stream&#160;()</title>
<indexterm zone="gtk-video-set-media-stream"><primary>gtk_video_set_media_stream</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_video_set_media_stream (<parameter><link linkend="GtkVideo"><type>GtkVideo</type></link> *self</parameter>,
                            <parameter><link linkend="GtkMediaStream"><type>GtkMediaStream</type></link> *stream</parameter>);</programlisting>
<para>Sets the media stream to be played back. <parameter>self</parameter>
 will take full control
of managing the media stream. If you want to manage a media stream
yourself, consider using a <link linkend="GtkImage"><type>GtkImage</type></link> for display.</para>
<para>If you want to display a file, consider using <link linkend="gtk-video-set-file"><function>gtk_video_set_file()</function></link>
instead.</para>
<refsect3 id="gtk-video-set-media-stream.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkVideo"><type>GtkVideo</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>stream</para></entry>
<entry role="parameter_description"><para>The media stream to play or <link linkend="NULL:CAPS"><literal>NULL</literal></link> to unset. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-video-get-file" role="function">
<title>gtk_video_get_file&#160;()</title>
<indexterm zone="gtk-video-get-file"><primary>gtk_video_get_file</primary></indexterm>
<programlisting language="C"><link linkend="GFile"><returnvalue>GFile</returnvalue></link>&#160;*
gtk_video_get_file (<parameter><link linkend="GtkVideo"><type>GtkVideo</type></link> *self</parameter>);</programlisting>
<para>Gets the file played by <parameter>self</parameter>
 or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if not playing back
a file.</para>
<refsect3 id="gtk-video-get-file.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkVideo"><type>GtkVideo</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-video-get-file.returns" role="returns">
<title>Returns</title>
<para>The file played by <parameter>self</parameter>
. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-video-set-file" role="function">
<title>gtk_video_set_file&#160;()</title>
<indexterm zone="gtk-video-set-file"><primary>gtk_video_set_file</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_video_set_file (<parameter><link linkend="GtkVideo"><type>GtkVideo</type></link> *self</parameter>,
                    <parameter><link linkend="GFile"><type>GFile</type></link> *file</parameter>);</programlisting>
<para>Makes <parameter>self</parameter>
 play the given <parameter>file</parameter>
.</para>
<refsect3 id="gtk-video-set-file.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkVideo"><type>GtkVideo</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>file</para></entry>
<entry role="parameter_description"><para>the file to play. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-video-set-filename" role="function">
<title>gtk_video_set_filename&#160;()</title>
<indexterm zone="gtk-video-set-filename"><primary>gtk_video_set_filename</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_video_set_filename (<parameter><link linkend="GtkVideo"><type>GtkVideo</type></link> *self</parameter>,
                        <parameter>const <link linkend="char"><type>char</type></link> *filename</parameter>);</programlisting>
<para>Makes <parameter>self</parameter>
 play the given <parameter>filename</parameter>
.</para>
<para>This is a utility function that calls <link linkend="gtk-video-set-file"><function>gtk_video_set_file()</function></link>,</para>
<refsect3 id="gtk-video-set-filename.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkVideo"><type>GtkVideo</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>filename</para></entry>
<entry role="parameter_description"><para>the filename to play. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-video-set-resource" role="function">
<title>gtk_video_set_resource&#160;()</title>
<indexterm zone="gtk-video-set-resource"><primary>gtk_video_set_resource</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_video_set_resource (<parameter><link linkend="GtkVideo"><type>GtkVideo</type></link> *self</parameter>,
                        <parameter>const <link linkend="char"><type>char</type></link> *resource_path</parameter>);</programlisting>
<para>Makes <parameter>self</parameter>
 play the resource at the given <parameter>resource_path</parameter>
.</para>
<para>This is a utility function that calls <link linkend="gtk-video-set-file"><function>gtk_video_set_file()</function></link>,</para>
<refsect3 id="gtk-video-set-resource.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkVideo"><type>GtkVideo</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>resource_path</para></entry>
<entry role="parameter_description"><para>the resource to set. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-video-get-autoplay" role="function">
<title>gtk_video_get_autoplay&#160;()</title>
<indexterm zone="gtk-video-get-autoplay"><primary>gtk_video_get_autoplay</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_video_get_autoplay (<parameter><link linkend="GtkVideo"><type>GtkVideo</type></link> *self</parameter>);</programlisting>
<para>Returns <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if videos have been set to loop via <link linkend="gtk-video-set-loop"><function>gtk_video_set_loop()</function></link>.</para>
<refsect3 id="gtk-video-get-autoplay.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkVideo"><type>GtkVideo</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-video-get-autoplay.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if streams should autoplay</para>
</refsect3></refsect2>
<refsect2 id="gtk-video-set-autoplay" role="function">
<title>gtk_video_set_autoplay&#160;()</title>
<indexterm zone="gtk-video-set-autoplay"><primary>gtk_video_set_autoplay</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_video_set_autoplay (<parameter><link linkend="GtkVideo"><type>GtkVideo</type></link> *self</parameter>,
                        <parameter><link linkend="gboolean"><type>gboolean</type></link> autoplay</parameter>);</programlisting>
<para>Sets whether <parameter>self</parameter>
 automatically starts playback when it becomes visible
or when a new file gets loaded.</para>
<refsect3 id="gtk-video-set-autoplay.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkVideo"><type>GtkVideo</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>autoplay</para></entry>
<entry role="parameter_description"><para>whether media streams should autoplay</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-video-get-loop" role="function">
<title>gtk_video_get_loop&#160;()</title>
<indexterm zone="gtk-video-get-loop"><primary>gtk_video_get_loop</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_video_get_loop (<parameter><link linkend="GtkVideo"><type>GtkVideo</type></link> *self</parameter>);</programlisting>
<para>Returns <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if videos have been set to loop via <link linkend="gtk-video-set-loop"><function>gtk_video_set_loop()</function></link>.</para>
<refsect3 id="gtk-video-get-loop.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkVideo"><type>GtkVideo</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-video-get-loop.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if streams should loop</para>
</refsect3></refsect2>
<refsect2 id="gtk-video-set-loop" role="function">
<title>gtk_video_set_loop&#160;()</title>
<indexterm zone="gtk-video-set-loop"><primary>gtk_video_set_loop</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_video_set_loop (<parameter><link linkend="GtkVideo"><type>GtkVideo</type></link> *self</parameter>,
                    <parameter><link linkend="gboolean"><type>gboolean</type></link> loop</parameter>);</programlisting>
<para>Sets whether new files loaded by <parameter>self</parameter>
 should be set to loop.</para>
<refsect3 id="gtk-video-set-loop.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkVideo"><type>GtkVideo</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>loop</para></entry>
<entry role="parameter_description"><para>whether media streams should loop</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkVideo.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkVideo-struct" role="struct">
<title>GtkVideo</title>
<indexterm zone="GtkVideo-struct"><primary>GtkVideo</primary></indexterm>
<programlisting language="C">typedef struct _GtkVideo GtkVideo;</programlisting>
</refsect2>

</refsect1>
<refsect1 id="GtkVideo.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkVideo--autoplay" role="property"><title>The <literal>“autoplay”</literal> property</title>
<indexterm zone="GtkVideo--autoplay"><primary>GtkVideo:autoplay</primary></indexterm>
<programlisting>  “autoplay”                 <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>If the video should automatically begin playing.</para>
<para>Owner: GtkVideo</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkVideo--file" role="property"><title>The <literal>“file”</literal> property</title>
<indexterm zone="GtkVideo--file"><primary>GtkVideo:file</primary></indexterm>
<programlisting>  “file”                     <link linkend="GFile"><type>GFile</type></link>&#160;*</programlisting>
<para>The file played by this video if the video is playing a file.</para>
<para>Owner: GtkVideo</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="GtkVideo--loop" role="property"><title>The <literal>“loop”</literal> property</title>
<indexterm zone="GtkVideo--loop"><primary>GtkVideo:loop</primary></indexterm>
<programlisting>  “loop”                     <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>If new media files should be set to loop.</para>
<para>Owner: GtkVideo</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkVideo--media-stream" role="property"><title>The <literal>“media-stream”</literal> property</title>
<indexterm zone="GtkVideo--media-stream"><primary>GtkVideo:media-stream</primary></indexterm>
<programlisting>  “media-stream”             <link linkend="GtkMediaStream"><type>GtkMediaStream</type></link>&#160;*</programlisting>
<para>The media-stream played</para>
<para>Owner: GtkVideo</para>
<para>Flags: Read / Write</para>
</refsect2>

</refsect1>
<refsect1 id="GtkVideo.see-also">
<title>See Also</title>
<para><link linkend="GtkMediaControls"><type>GtkMediaControls</type></link>, <link linkend="GtkMediaStream"><type>GtkMediaStream</type></link></para>

</refsect1>

</refentry>
