<?xml version="1.0"?>
<?xml-stylesheet href="docbook.xsl" type="text/xsl" ?>
<book xmlns="http://docbook.org/ns/docbook" version="5.0">
  <info>
    <title>Media Service Specification</title>
    <titleabbrev>Media</titleabbrev>
    <releaseinfo>22.12</releaseinfo>
    <author>
      <orgname>ONVIF™</orgname>
      <uri>www.onvif.org</uri>
    </author>
    <pubdate>December, 2022</pubdate>
    <mediaobject>
      <imageobject>
        <imagedata fileref="media/logo.png" contentwidth="60mm"/>
      </imageobject>
    </mediaobject>
    <copyright>
      <year>2008-2022</year>
      <holder>ONVIF™ All rights reserved.</holder>
    </copyright>
    <legalnotice>
      <para>Recipients of this document may copy, distribute, publish, or display this document so long as this copyright notice, license and disclaimer are retained with all copies of the document. No license is granted to modify this document.</para>
      <para>THIS DOCUMENT IS PROVIDED "AS IS," AND THE CORPORATION AND ITS MEMBERS AND THEIR AFFILIATES, MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THIS DOCUMENT ARE SUITABLE FOR ANY PURPOSE; OR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.</para>
      <para>IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR RELATING TO ANY USE OR DISTRIBUTION OF THIS DOCUMENT, WHETHER OR NOT (1) THE CORPORATION, MEMBERS OR THEIR AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR (2) SUCH DAMAGES WERE REASONABLY FORESEEABLE, AND ARISING OUT OF OR RELATING TO ANY USE OR DISTRIBUTION OF THIS DOCUMENT.  THE FOREGOING DISCLAIMER AND LIMITATION ON LIABILITY DO NOT APPLY TO, INVALIDATE, OR LIMIT REPRESENTATIONS AND WARRANTIES MADE BY THE MEMBERS AND THEIR RESPECTIVE AFFILIATES TO THE CORPORATION AND OTHER MEMBERS IN CERTAIN WRITTEN POLICIES OF THE CORPORATION.</para>
    </legalnotice>
    <revhistory>
      <revision>
        <revnumber>2.1</revnumber>
        <date>Jul-2011</date>
        <author>
          <personname>Hans Busch</personname>
        </author>
        <revremark>Split from Core 2.0
Change Requests 65, 185, 197, 198, 225, 250</revremark>
      </revision>
      <revision>
        <revnumber>2.1.1</revnumber>
        <date>Jan-2012</date>
        <author>
          <personname>Hans Busch</personname>
        </author>
        <revremark>Change Requests 274, 281, 315, 387, 424, 493, 528, 535, 551, 571, 586</revremark>
      </revision>
      <revision>
        <revnumber>2.2</revnumber>
        <date>May-2012</date>
        <author>
          <personname>Hans Busch</personname>
        </author>
        <revremark>Change Requests 544, 552, 580, 641, 637, 642, 657</revremark>
      </revision>
      <revision>
        <revnumber>2.2.1</revnumber>
        <date>Dec-2012</date>
        <author>
          <personname>Michio Hirai</personname>
        </author>
        <revremark>Change Request 826, 855, 789</revremark>
      </revision>
      <revision>
        <revnumber>2.2.1</revnumber>
        <date>Dec-2012</date>
        <author>
          <personname>Hans Busch</personname>
        </author>
        <revremark>Change Request 708</revremark>
      </revision>
      <revision>
        <revnumber>2.3</revnumber>
        <date>May-2013</date>
        <author>
          <personname>Michio Hirai</personname>
        </author>
        <revremark>Change Request 790, 968, 1049, 1052</revremark>
      </revision>
      <revision>
        <revnumber>2.4</revnumber>
        <date>Mar-2013</date>
        <author>
          <personname>Hirokazu Kitaoka</personname>
        </author>
        <revremark>Addition of Video Source Mode feature.</revremark>
      </revision>
      <revision>
        <revnumber>2.4</revnumber>
        <date>Mar-2013</date>
        <author>
          <personname>Hermes Zhang</personname>
        </author>
        <revremark>Addition of OSD and update for change request 945, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 979, 1048</revremark>
      </revision>
      <revision>
        <revnumber>2.4</revnumber>
        <date>Aug-2013</date>
        <author>
          <personname>Takahiro Iwasaki</personname>
        </author>
        <revremark>Change Request 1048, 1117, 1125, 1126, 1127, 1128, 1146, 1149, 1150, 1151, 1156, 1160, 1161, 1183</revremark>
      </revision>
      <revision>
        <revnumber>2.4</revnumber>
        <date>Aug-2013</date>
        <author>
          <personname>Michio Hirai</personname>
        </author>
        <revremark>Change Request 1087</revremark>
      </revision>
      <revision>
        <revnumber>2.4.2</revnumber>
        <date>Jun-2014</date>
        <author>
          <personname>Michio Hirai</personname>
        </author>
        <revremark>Change Request 1342, 1050</revremark>
      </revision>
      <revision>
        <revnumber>2.5</revnumber>
        <date>Dec-2014</date>
        <author>
          <personname>Hans Busch</personname>
        </author>
        <author>
          <personname>Michio Hirai</personname>
        </author>
        <revremark>Add gzip compressed metadata
Change Request 1413, 1540</revremark>
      </revision>
      <revision>
        <revnumber>2.6</revnumber>
        <date>Jun-2015</date>
        <author>
          <personname>Michio Hirai</personname>
        </author>
        <revremark>Change Request 1587, 1602</revremark>
      </revision>
      <revision>
        <revnumber>2.6.1</revnumber>
        <date>Dec-2015</date>
        <author>
          <personname>Hiroyuki Sano</personname>
        </author>
        <revremark>Change Request 1672</revremark>
      </revision>
      <revision>
        <revnumber>16.06</revnumber>
        <date>Jun-2016</date>
        <author>
          <personname>Hiroyuki Sano</personname>
        </author>
        <revremark>Change Request 1796, 1869</revremark>
      </revision>
      <revision>
        <revnumber>17.06</revnumber>
        <date>Jun-2017</date>
        <author>
          <personname>Hans Busch</personname>
        </author>
        <author>
          <personname>Hiroyuki Sano</personname>
        </author>
        <revremark>Change Request 1843
Change Request 2105</revremark>
      </revision>
      <revision>
        <revnumber>18.06</revnumber>
        <date>Jun-2018</date>
        <author>
          <personname>Hiroyuki Sano</personname>
        </author>
        <revremark>Change Request 2216, 2250</revremark>
      </revision>
      <revision>
        <revnumber>19.06</revnumber>
        <date>Jun-2019</date>
        <author>
          <personname>Steve Wolf</personname>
        </author>
        <author>
          <personname>Hiroyuki Sano</personname>
        </author>
        <revremark>Added Active Sessions, Guaranteed Framerate
Change Request 2430, 2479</revremark>
      </revision>
      <revision>
        <revnumber>19.12</revnumber>
        <date>Dec-2019</date>
        <author>
          <personname>Hiroyuki Sano</personname>
        </author>
        <revremark>Change Request 2489, 2557, 2598</revremark>
      </revision>
      <revision>
        <revnumber>20.06</revnumber>
        <date>Jun-2020</date>
        <author>
          <personname>Michio Hirai</personname>
        </author>
        <revremark>Change Request 2571</revremark>
      </revision>
      <revision>
        <revnumber>21.12</revnumber>
        <date>Dec-2021</date>
        <author>
          <personname>Oksana Tyushkina</personname>
        </author>
        <revremark>Fix typo in commands names</revremark>
      </revision>
      <revision>
        <revnumber>22.12</revnumber>
        <date>Dec-2022</date>
        <author>
          <personname>Sujith Raman</personname>
        </author>
        <revremark>Ease profile requirements on analytics for multi-source devices.</revremark>
      </revision>
    </revhistory>
  </info>
  <chapter>
    <title>Scope</title>
    <bridgehead xml:id="_Toc241999828" renderas="sect1">Scope</bridgehead>
    <para>This document defines the web service interface for configuration of the so called media profiles. These include the selection of Video and Audio inputs as well as PTZ and Analytics modes and the configuration of Video and Audio encoders.</para>
    <para>Media streaming is out of scope of this document and covered by the ONVIF streaming specification.</para>
    <para>Web service usage is outside of the scope of this document. Please refer to the ONVIF core specification.</para>
  </chapter>
  <chapter>
    <title>Normative references</title>
    <para>ONVIF Core Specification</para>
    <para role="reference">&lt;<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.onvif.org/onvif/specs/core/ONVIF-Core-Specification.pdf"></link>&gt;</para>
    <para>ONVIF Media Service Specification</para>
    <para role="reference">&lt;<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.onvif.org/onvif/specs/srv/media/ONVIF-Media-Service-Spec.pdf"></link>&gt;</para>
    <para>ONVIF Imaging Service Specification</para>
    <para role="reference">&lt;<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.onvif.org/onvif/specs/srv/img/ONVIF-Imaging-Service-Spec.pdf"></link>&gt;</para>
    <para>ONVIF PTZ Service Specification</para>
    <para role="reference">&lt;<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.onvif.org/onvif/specs/srv/ptz/ONVIF-PTZ-Service-Spec.pdf"></link>&gt;</para>
    <para>ONVIF Streaming  Specification</para>
    <para role="reference">&lt;<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.onvif.org/onvif/specs/stream/ONVIF-Streaming-Spec.pdf"></link>&gt;</para>
    <para>ONVIF Video Analytics Specification</para>
    <para role="reference">&lt;<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.onvif.org/onvif/specs/srv/analytics/ONVIF-VideoAnalytics-Service-Spec.pdf"></link>&gt;</para>
    <para>W3C Efficient XML Interchange (EXI) Format 1.0</para>
    <para role="reference">&lt;<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.w3.org/TR/exi/"></link>&gt;</para>
  </chapter>
  <chapter>
    <title>Terms and Definitions</title>
    <section>
      <title>Definitions</title>
      <informaltable>
        <tgroup cols="2">
          <colspec colname="c1" colwidth="24*" />
          <colspec colname="c2" colwidth="76*" />
          <tbody valign="top">
            <row>
              <entry align="left">
                <para>
                  <emphasis role="bold">Configuration Entity</emphasis>
                </para>
              </entry>
              <entry align="left">
                <para>A network video device media abstract component that is used to produce a media stream on the network, i.e. video and/or audio stream. </para>
              </entry>
            </row>
            <row>
              <entry align="left">
                <para>
                  <emphasis role="bold">Control Plane</emphasis>
                </para>
              </entry>
              <entry align="left">
                <para>Consists of Media control functions, such as device control, media configuration and PTZ commands.</para>
              </entry>
            </row>
            <row>
              <entry align="left">
                <para>
                  <emphasis role="bold">Digital PTZ</emphasis>
                </para>
              </entry>
              <entry align="left">
                <para>Function that diminishes or crops an image to adjust the image position and ratio.</para>
              </entry>
            </row>
            <row>
              <entry valign="middle">
                <para>
                  <emphasis role="bold">GZIP</emphasis>
                </para>
              </entry>
              <entry valign="middle">
                <para>GNU data format for lossless compression.</para>
              </entry>
            </row>
            <row>
              <entry align="left">
                <para>
                  <emphasis role="bold">Media Plane</emphasis>
                </para>
              </entry>
              <entry align="left">
                <para>Consists of media stream, such as video, audio and metadata.</para>
              </entry>
            </row>
            <row>
              <entry align="left">
                <para>
                  <emphasis role="bold">Media Profile</emphasis>
                </para>
              </entry>
              <entry align="left">
                <para>Maps a video or an audio source or an audio output to a video or an audio encoder, a audio decoder configuration and PTZ and analytics configurations.</para>
              </entry>
            </row>
            <row>
              <entry align="left">
                <para>
                  <emphasis role="bold">Metadata</emphasis>
                </para>
              </entry>
              <entry align="left">
                <para>All streaming data except video and audio, including video analytics results, PTZ position data and other <phrase>metadata (such as textual data from POS applications)</phrase>.</para>
              </entry>
            </row>
            <row>
              <entry align="left">
                <para>
                  <emphasis role="bold">Video Analytics</emphasis>
                </para>
              </entry>
              <entry align="left">
                <para>Algorithms or programs used to analyze video data and to generate data describing object location and behaviour.</para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </informaltable>
    </section>
    <section>
      <title>Abbreviations</title>
      <informaltable>
        <tgroup cols="2">
          <colspec colname="c1" colwidth="24*" />
          <colspec colname="c2" colwidth="76*" />
          <tbody valign="top">
            <row>
              <entry valign="middle">
                <para>RTCP</para>
              </entry>
              <entry valign="middle">
                <para>RTP Control Protocol</para>
              </entry>
            </row>
            <row>
              <entry valign="middle">
                <para>RTP</para>
              </entry>
              <entry valign="middle">
                <para>Realtime Transport Protocol</para>
              </entry>
            </row>
            <row>
              <entry valign="middle">
                <para>RTSP</para>
              </entry>
              <entry valign="middle">
                <para>Real Time Streaming Protocol</para>
              </entry>
            </row>
            <row>
              <entry valign="middle">
                <para>TCP</para>
              </entry>
              <entry valign="middle">
                <para>Transmission Control Protocol</para>
              </entry>
            </row>
            <row>
              <entry valign="middle">
                <para>UDP</para>
              </entry>
              <entry valign="middle">
                <para>User Datagram Protocol</para>
              </entry>
            </row>
            <row>
              <entry valign="middle">
                <para>EXI</para>
              </entry>
              <entry valign="middle">
                <para>Efficient XML Interchange Format</para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </informaltable>
    </section>
  </chapter>
  <chapter>
    <title>Overview</title>
    <para>Media configurations are handled through the media service. Media configurations are used to determine the streaming properties of requested media streams as defined in this specification. The device provides media configuration through the media service. WSDL for this service is specified in <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.onvif.org/ver10/media/wsdl/media.wsdl">http://www.onvif.org/ver10/media/wsdl/media.wsdl</link>l .</para>
    <table>
      <title>Referenced namespaces (with prefix)</title>
      <tgroup cols="2">
        <colspec colname="c1" colwidth="13*" />
        <colspec colname="c2" colwidth="87*" />
        <thead>
          <row>
            <entry>
              <para>Prefix</para>
            </entry>
            <entry>
              <para>Namespace URI</para>
            </entry>
          </row>
        </thead>
        <tbody valign="top">
          <row>
            <entry>
              <para>env</para>
            </entry>
            <entry>
              <para>http://www.w3.org/2003/05/soap-envelope</para>
            </entry>
          </row>
          <row>
            <entry>
              <para>ter</para>
            </entry>
            <entry>
              <para>
                <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.onvif.org/ver10/error">http://www.onvif.org/ver10/error</link>
              </para>
            </entry>
          </row>
          <row>
            <entry>
              <para>xs </para>
            </entry>
            <entry>
              <para>http://www.w3.org/2001/XMLSchema </para>
            </entry>
          </row>
          <row>
            <entry>
              <para>tt</para>
            </entry>
            <entry>
              <para>http://www.onvif.org/ver10/schema</para>
            </entry>
          </row>
          <row>
            <entry>
              <para>trt</para>
            </entry>
            <entry>
              <para>http://www.onvif.org/ver10/media/wsdl</para>
            </entry>
          </row>
          <row>
            <entry>
              <para>tns1</para>
            </entry>
            <entry>
              <para>http://www.onvif.org/ver10/topics</para>
            </entry>
          </row>
        </tbody>
      </tgroup>
    </table>
    <section>
      <title>Media profiles</title>
      <para>Real-time video and audio streaming configurations are controlled using media profiles. A media profile maps a video and/or audio source to a video and/or an audio encoder, PTZ and analytics configurations. An ONVIF compliant device supporting the media service presents different available profiles depending on its capabilities (the set of available profiles might change dynamically though). </para>
      <figure>
        <title>A media profile</title>
        <mediaobject>
          <imageobject>
            <imagedata fileref="media/Media/image2.jpeg" contentwidth="92.54mm" />
          </imageobject>
        </mediaobject>
      </figure>
      <para> A device having the media service provides at least one media profile at boot. A device may provide “ready to use” profiles for the most common media configurations that the device offers. </para>
      <para>The Profile contains a “fixed” attribute that indicates if a profile can be deleted or not. The fixed attribute does not signal that a profile is immutable. Hence it shall be possible to add or remove configurations to or from a fixed profile. Whether a profile is fixed or not is defined by the device. </para>
      <para>A profile consists of a set of interconnected <emphasis>configuration entities. </emphasis>Configurations are provided by the device and can be either static or created dynamically by the device. For example, the dynamic configurations can be created by the device depending on current available encoding resources. A configuration entity is one of the following:</para>
      <itemizedlist>
        <listitem>
          <para>Video source configuration</para>
        </listitem>
        <listitem>
          <para>Audio source configuration</para>
        </listitem>
        <listitem>
          <para>Video encoder configuration</para>
        </listitem>
        <listitem>
          <para>Audio encoder configuration</para>
        </listitem>
        <listitem>
          <para>PTZ configuration</para>
        </listitem>
        <listitem>
          <para>Video analytics configuration</para>
        </listitem>
        <listitem>
          <para>Metadata configuration</para>
        </listitem>
        <listitem>
          <para>Audio output configuration</para>
        </listitem>
        <listitem>
          <para>Audio decoder configuration</para>
        </listitem>
      </itemizedlist>
      <para>A profile consists of all or a subset of these configuration entities. Depending on the capabilities of the device, a particular configuration entity can be part of a profile or not. For example, a profile with an audio source and an audio encoder configuration can exist only in a device with audio support. </para>
      <para>An example of a complete profile configuration is illustrated in <xref linkend="_Ref210451597" />.</para>
      <figure xml:id="_Ref210451597">
        <title>Figure 2: Complete profile configuration </title>
        <mediaobject>
          <imageobject>
            <imagedata fileref="media/Media/mediaProfile.svg" contentwidth="140mm" />
          </imageobject>
        </mediaobject>
      </figure>
      <para>A media profile describes how and what to present to the client in a media stream as well as how to handle PTZ input and Analytics. </para>
      <para>The following commands list existing sources:</para>
      <itemizedlist>
        <listitem>
          <para>
            <emphasis>GetVideoSources</emphasis> – Gets all existing video sources in the device.</para>
        </listitem>
        <listitem>
          <para>
            <emphasis>GetAudioSources</emphasis> – Gets all existing audio sources in the device.</para>
        </listitem>
        <listitem>
          <para>
            <emphasis>GetAudioOutputs </emphasis>– Gets all existing audio outputs in the device</para>
        </listitem>
      </itemizedlist>
      <para>The following commands manage Media Profiles:</para>
      <itemizedlist>
        <listitem>
          <para>
            <emphasis>CreateProfile </emphasis>– Creates a new media profile.</para>
        </listitem>
        <listitem>
          <para>
            <emphasis>GetProfiles</emphasis> – Gets all existing media profiles.</para>
        </listitem>
        <listitem>
          <para>
            <emphasis>GetProfile</emphasis> – Gets a specific media profile.</para>
        </listitem>
        <listitem>
          <para>
            <emphasis>DeleteProfile</emphasis> – Deletes a specific media profile.</para>
        </listitem>
        <listitem>
          <para>
            <emphasis>Add&lt;configuration entity&gt; </emphasis>– Adds a specific configuration entity to the media profile.</para>
        </listitem>
        <listitem>
          <para>
            <emphasis>Remove&lt;configuration entity&gt;</emphasis> – Removes a specific configuration entity from a media profile.</para>
        </listitem>
      </itemizedlist>
      <para>The following commands manage Configuration Entities:</para>
      <itemizedlist>
        <listitem>
          <para>
            <emphasis>Get&lt;configuration entity&gt;Options</emphasis> – Gets the valid property values for a specific configuration entity.</para>
        </listitem>
        <listitem>
          <para>
            <emphasis>Set&lt;configuration entity&gt;</emphasis> – Sets a configuration entity configuration.</para>
        </listitem>
        <listitem>
          <para>
            <emphasis>Get&lt;configuration entity&gt;s </emphasis>– Gets all existing configuration entities of the type.</para>
        </listitem>
        <listitem>
          <para>
            <emphasis>Get&lt;configuration entity&gt;</emphasis> – Gets a specific configuration entity.</para>
        </listitem>
        <listitem>
          <para>
            <emphasis>GetCompatible&lt;configuration entity&gt;s </emphasis>– Gets all configuration entities compatible with a specific media profile.</para>
        </listitem>
      </itemizedlist>
      <para>Where <emphasis>&lt;configuration entity&gt;</emphasis> is the type of configuration entity. For example, the complete command to get a video encoder configuration is:</para>
      <para>
        <emphasis>GetVideoEncoderConfiguration</emphasis>
      </para>
      <para>The following commands initiate and manipulate a video/audio stream:</para>
      <itemizedlist>
        <listitem>
          <para>
            <emphasis>GetStreamUri </emphasis>– Requests a valid RTSP or HTTP stream URI for a specific media profile and protocol.</para>
        </listitem>
        <listitem>
          <para>
            <emphasis>StartMulticastStreaming </emphasis>– Starts multicast streaming using a specified media profile.</para>
        </listitem>
        <listitem>
          <para>
            <emphasis>StopMulticastStreaming </emphasis>– Stops a multicast stream.</para>
        </listitem>
        <listitem>
          <para>
            <emphasis>SetSynchronizationPoint</emphasis> – Inserts a synchronization point (I-frame etc) in active streams.</para>
        </listitem>
        <listitem>
          <para>
            <emphasis>GetSnapshotUri </emphasis>– Requests a valid HTTP URI for a specific media profile that can be used to obtain a JPEG snapshot.</para>
        </listitem>
      </itemizedlist>
    </section>
    <section>
      <title>Video source mode</title>
      <para>A device can have the capability for changing video source mode which is a setting of video source as exclusion in same time. For example, device’s capability for max resolution (1920x1080@16:9 or 2048x1536@4:3) and frame rate (20fps or 30fps) can be changed by selecting each video source modes.</para>
      <para>The following commands manage video source mode.</para>
      <itemizedlist>
        <listitem>
          <para>
            <emphasis>GetVideoSourceModes</emphasis> - Get a list of video source modes.</para>
        </listitem>
        <listitem>
          <para>
            <emphasis>SetVideoSourceMode</emphasis> -  Set video source mode to specified mode.</para>
        </listitem>
      </itemizedlist>
    </section>
  </chapter>
  <chapter>
    <title>Service</title>
    <para>The media service is used to configure the device media streaming properties. </para>
    <para>The media service allows a client to configure media and other real time streaming configurations. Media configurations are handled through media profiles. An overview of the ONVIF media configuration model is given in Section <xref linkend="_Toc241999828" />.</para>
    <para>The media service commands are divided into two major categories:</para>
    <itemizedlist>
      <listitem>
        <para>Media configuration:</para>
        <itemizedlist>
          <listitem>
            <para>Media profile commands</para>
          </listitem>
          <listitem>
            <para>Video source commands</para>
          </listitem>
          <listitem>
            <para>Vide encoder commands</para>
          </listitem>
          <listitem>
            <para>Audio source commands</para>
          </listitem>
          <listitem>
            <para>Audio encoder commands</para>
          </listitem>
          <listitem>
            <para>Video analytics commands</para>
          </listitem>
          <listitem>
            <para>Metadata commands</para>
          </listitem>
          <listitem>
            <para>Audio output commands</para>
          </listitem>
          <listitem>
            <para>Audio decoder commands</para>
          </listitem>
        </itemizedlist>
      </listitem>
      <listitem>
        <para>Media streaming:</para>
        <itemizedlist>
          <listitem>
            <para>Request stream URI</para>
          </listitem>
          <listitem>
            <para>Get snapshot URI</para>
          </listitem>
          <listitem>
            <para>Multicast control commands</para>
          </listitem>
          <listitem>
            <para>Media synchronization point</para>
          </listitem>
        </itemizedlist>
      </listitem>
    </itemizedlist>
    <para>A basic set of operations are required for the media service; other operations are recommended to support. The detailed requirements are listed under the command descriptions. </para>
    <section>
      <title>Audio and video codecs</title>
      <para>An ONVIF compliant device streams audio and video data using suitable encoding algorithms. The device may also able to decode audio. A device supports any audio and video codecs, bitrates and resolution according to the manufacturer’s choice. In order to ensure interoperability between client and device, this standard mandates the following codec profiles:</para>
      <itemizedlist>
        <listitem>
          <para>An ONVIF compliant device shall support JPEG QVGA.</para>
        </listitem>
        <listitem>
          <para>An ONVIF compliant device shall support G.711μ Law (Simplex-Camera Microphone Only, 1ch) [ITU-T G.711] if the device supports audio.</para>
        </listitem>
      </itemizedlist>
    </section>
    <section>
      <title>Media Profile</title>
      <para>A media profile consists of a set of media configurations. Media profiles are used by a client to configure properties of a media stream from a device.</para>
      <para>A device shall provide at least one media profile at boot. A device should provide “ready to use” profiles for the most common media configurations that the device offers. </para>
      <para>A profile consists of a set of interconnected <emphasis>configuration entities. </emphasis>Configurations are provided by the device and can be either static or created dynamically by the device. For example, the dynamic configurations can be created by the device depending on current available encoding resources. A configuration entity is one of the following:</para>
      <itemizedlist>
        <listitem>
          <para>Video source configuration</para>
        </listitem>
        <listitem>
          <para>Audio source configuration</para>
        </listitem>
        <listitem>
          <para>Video encoder configuration</para>
        </listitem>
        <listitem>
          <para>Audio encoder configuration</para>
        </listitem>
        <listitem>
          <para>PTZ configuration</para>
        </listitem>
        <listitem>
          <para>Video analytics configuration</para>
        </listitem>
        <listitem>
          <para>Metadata configuration</para>
        </listitem>
        <listitem>
          <para>Audio output configuration</para>
        </listitem>
        <listitem>
          <para>Audio decoder configuration</para>
        </listitem>
      </itemizedlist>
      <para>A profile consists of all or a subset of these configuration entities. Depending on the capabilities of the device, a particular configuration entity can be part of a profile or not. For example, a profile with an audio source and an audio encoder configuration can exist only in a device with audio support. </para>
      <para>A device shall support at least one Analytics Configuration if Analytics service is supported. A device shall support at least one PTZ Configuration if PTZ service is supported.</para>
      <section>
        <title>CreateProfile</title>
        <para>This operation creates a new empty media profile. The media profile shall be created in the device and shall be persistent (remain after reboot). A device shall support the creation of media profiles as long as the number of existing profiles does not exceed the capability value MaximumNumberOfProfiles.</para>
        <para>A created profile shall be deletable and a device shall set the “fixed” attribute to false in the returned Profile.</para>
        <para>Optionally the token identifier can be defined by the client. In this case a device shall support at least a token length of 12 characters and characters "A-Z" | "a-z" | "0-9" | "-.".</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">Name [tt:Name]</para>
              <para role="text">Contains the friendly Name of the Profile to create as well as an optional Token parameter, specifying the unique identifier of the new media profile
</para>
              <para role="param">Token optional [tt:ReferenceToken]</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Profile [tt:Profile]</para>
              <para role="text">Returns an empty Profile structure with no configuration entities.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:ProfileExists</para>
              <para role="text">A profile with the token ProfileToken already exists.</para>
              <para role="param">env:Receiver - ter:Action - ter:MaxNVTProfiles</para>
              <para role="text">The maximum number of supported profiles supported by the device has been reached.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>GetProfiles</title>
        <para>Any endpoint can ask for the <emphasis>existing </emphasis>media profiles of a device using the GetProfiles command. Pre-configured or dynamically configured profiles can be retrieved using this command. This command lists <emphasis>all </emphasis>configured profiles in a device. The client does not need to know the media profile in order to use the command. The device shall support the retrieval of media profiles through the GetProfiles command.</para>
        <para>A device shall include the “fixed” attribute in all the returned Profile elements.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Profiles - optional, unbounded [tt:Profile]</para>
              <para role="text">The response contains a list of profiles. Each profile contains a set of configuration entities defining a specific configuration that can be used for media streaming, analytics, metadata streaming etc.
</para>
               <para>NOTE: If the device supports multiple video sources and several AnalyticsModules or Rules, to reduce the size of getprofiles response, device can choose not to include AnalyticsModule and Rule related configuration in <emphasis>VideoAnalyticsConfiguration</emphasis></para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="text">No command specific faults defined.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>GetProfile</title>
        <para>If the profile token is already known, a profile can be fetched through the GetProfile command. The device shall support the retrieval of a specific media profile through the GetProfile command.</para>
        <para>A device shall include the “fixed” attribute in the returned Profile element.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ProfileToken [tt:ReferenceToken]</para>
              <para role="text">This message contains the token to the requested profile.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Profile [tt:Profile]</para>
              <para role="text">The response contains the Profile indicated by the Token parameter. A Profile contains a set of configuration entities defining a specific configuration that can be used for media streaming, analytics, metadata streaming etc.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile tokenProfileTokendoes not exist.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section xml:id="_Add_video_source">
        <title>AddVideoSourceConfiguration</title>
        <para>This operation adds a VideoSourceConfiguration to an existing media profile. If such a configuration exists in the media profile, it will be replaced. The change shall be persistent. The device shall support addition of a video source configuration to a profile through the AddVideoSourceConfiguration command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ProfileToken [tt:ReferenceToken]</para>
              <para role="text">Contains a reference to the VideoSourceConfiguration to add and the Profile where it shall be added.
</para>
              <para role="param">ConfigurationToken [tt:ReferenceToken]</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile token ProfileToken does not exist.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The VideoSourceConfiguration indicated by the ConfigurationToken does not exist.</para>
              <para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
              <para role="text">Other configurations of the media profile conflicts with the one to add and adding it would cause a conflicting media profile.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>AddVideoEncoderConfiguration</title>
        <para>This operation adds a VideoEncoderConfiguration to an existing media profile. If a configuration exists in the media profile, it will be replaced. The change shall be persistent. A device shall support addition of a video encoder configuration to a profile through the AddVideoEncoderConfiguration command.</para>
        <para>A device shall support adding a compatible VideoEncoderconfiguration to a Profile containing a VideoSourceConfiguration and shall support streaming video data of such a Profile. </para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ProfileToken [tt:ReferenceToken]</para>
              <para role="text">Contains a reference to the VideoEncoderConfiguration to add and the Profile where it shall be added.
</para>
              <para role="param">ConfigurationToken [tt:ReferenceToken]</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile token ProfileToken does not exist.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The VideoEncoderConfiguration indicated by the ConfigurationToken does not exist.</para>
              <para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
              <para role="text">Other configurations of the media profile conflicts with the one to add and adding it would cause a conflicting media profile.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>AddAudioSourceConfiguration</title>
        <para>This operation adds an AudioSourceConfiguration to an existing media profile. If a configuration exists in the media profile, it will be replaced. The change shall be persistent. A device that supports audio streaming from device to client shall support addition of audio source configuration to a profile through the AddAudioSourceConfiguration command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ProfileToken [tt:ReferenceToken]</para>
              <para role="text">Contains a reference to the AudioSourceConfiguration to add and the Profile where it shall be added.
</para>
              <para role="param">ConfigurationToken [tt:ReferenceToken]</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile token ProfileToken does not exist.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The AudioSourceConfiguration indicated by the ConfigurationToken does not exist.</para>
              <para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
              <para role="text">Other configurations of the media profile conflicts with the one to add and adding it would cause a conflicting media profile.</para>
              <para role="param">env:Receiver - ter:ActionNotSupported - ter:AudioNotSupported</para>
              <para role="text">Audio is not supported.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>AddAudioEncoderConfiguration</title>
        <para>This operation adds an AudioEncoderConfiguration to an existing media profile. If a configuration exists in the media profile, it will be replaced. The change shall be persistent. A device that supports audio streaming from device to client shall support addition of audio encoder configurations to a profile through the AddAudioEncoderConfiguration command.</para>
        <para>A device shall support adding a compatible AudioEncoderConfiguration to a Profile containing an AudioSourceConfiguration and shall support streaming audio data of such a Profile.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ProfileToken [tt:ReferenceToken]</para>
              <para role="text">Contains a reference to the AudioEncoderConfiguration to add and the Profile where it shall be added.
</para>
              <para role="param">ConfigurationToken [tt:ReferenceToken]</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile token ProfileToken does not exist.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The AudioEncoderConfiguration indicated by the ConfigurationToken does not exist.</para>
              <para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
              <para role="text">Other configurations of the media profile conflicts with the one to add and adding it would cause a conflicting media profile.</para>
              <para role="param">env:Receiver - ter:ActionNotSupported - ter:AudioNotSupported</para>
              <para role="text">Audio is not supported.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>AddPTZConfiguration</title>
        <para>This operation adds a PTZConfiguration to an existing media profile. If a configuration exists in the media profile, it will be replaced. The change shall be persistent. A device that supports PTZ control shall support addition of PTZ configurations to a profile through the AddPTZConfiguration command<emphasis>.</emphasis></para>
        <para>Adding a PTZConfiguration to a media profile means that streams using that media profile can contain PTZ status (in the metadata), and that the media profile can be used for controlling PTZ movement, see document PTZ Service Specification.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ProfileToken [tt:ReferenceToken]</para>
              <para role="text">Contains a reference to the PTZConfiguration to add and the Profile where it shall be added.
</para>
              <para role="param">ConfigurationToken [tt:ReferenceToken]</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile token ProfileToken does not exist.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The PTZConfiguration indicated by the ConfigurationToken does not exist.</para>
              <para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
              <para role="text">Other configurations of the media profile conflicts with the one to add and adding it would cause a conflicting media profile.</para>
              <para role="param">env:Receiver - ter:ActionNotSupported - ter:PTZNotSupported</para>
              <para role="text">PTZ is not supported.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>AddVideoAnalyticsConfiguration</title>
        <para>This operation adds a VideoAnalytics configuration to an existing media profile. If a configuration exists in the media profile, it will be replaced. The change shall be persistent. A device that supports video analytics shall support addition of video analytics configurations to a profile through the AddVideoAnalyticsConfiguration command.</para>
        <para>Adding a VideoAnalyticsConfiguration to a media profile means that streams using that media profile can contain video analytics data (in the metadata) as defined by the submitted configuration reference. Video analytics data is specified in the document Video Analytics Specification and analytics configurations are managed through the commands defined in Section <xref linkend="_Toc214944342" />.</para>
        <para>A profile containing only a video analytics configuration but no video source configuration is incomplete. Therefore, a client should first add a video source configuration to a profile before adding a video analytics configuration. The device can deny adding of a video analytics configuration before a video source configuration. In this case, it should respond with a ConfigurationConflict Fault.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ProfileToken [tt:ReferenceToken]</para>
              <para role="text">Contains a reference to the VideoAnalyticsConfiguration to add and the Profile where it shall be added.
</para>
              <para role="param">ConfigurationToken [tt:ReferenceToken]</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile token ProfileToken does not exist.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The VideoAnalyticsConfiguration indicated by the ConfigurationToken does not exist.</para>
              <para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
              <para role="text">Other configurations of the media profile conflicts with the one to add and adding it would cause a conflicting media profile.</para>
              <para role="param">env:Receiver - ter:ActionNotSupported - ter:VideoAnalyticsNotSupported</para>
              <para role="text">VideoAnalytics is not supported.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>AddMetadataConfiguration</title>
        <para>This operation adds a Metadata configuration to an existing media profile. If a configuration exists in the media profile, it will be replaced. The change shall be persistent. A device shall support the addition of a metadata configuration to a profile though the AddMetadataConfiguration command.</para>
        <para>Adding a MetadataConfiguration to a Profile means that streams using that profile contain metadata. Metadata can consist of events, PTZ status, and/or video analytics data. Metadata configurations are handled through the commands defined in Section <xref linkend="_Ref215313674" /> and <xref linkend="_Toc213605157" />.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ProfileToken [tt:ReferenceToken]</para>
              <para role="text">Contains a reference to the MetadataConfiguration to add and the Profile where it shall be added.
</para>
              <para role="param">ConfigurationToken [tt:ReferenceToken]</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile token ProfileToken does not exist.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The MetadataConfiguration indicated by the ConfigurationToken does not exist.</para>
              <para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
              <para role="text">Other configurations of the media profile conflicts with the one to add and adding it would cause a conflicting media profile.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>AddAudioOutputConfiguration</title>
        <para>This operation adds an AudioOutputConfiguration to an existing media profile. If a configuration exists in the media profile, it will be replaced. The change shall be persistent. An device that signals support for Audio outputs via its Device IO AudioOutputs capability shall support the addition of an audio output configuration to a profile through the AddAudioOutputConfiguration command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ProfileToken [tt:ReferenceToken]</para>
              <para role="text">Contains a reference to the AudioOutputConfiguration to add and the Profile where it shall be added.
</para>
              <para role="param">ConfigurationToken [tt:ReferenceToken]</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile token ProfileToken does not exist.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The AudioOutputConfiguration indicated by the ConfigurationToken does not exist.</para>
              <para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
              <para role="text">Other configurations of the media profile conflicts with the one to add and adding it would cause a conflicting media profile.</para>
              <para role="param">env:Receiver - ter:ActionNotSupported - ter:AudioOutputNotSupported</para>
              <para role="text">Audio or Audio Output is not supported </para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>AddAudioDecoderConfiguration</title>
        <para>This operation adds an AudioDecoderConfiguration to an existing media profile. If a configuration exists in the media profile, it shall be replaced. The change shall be persistent. An device that signals support for Audio outputs via its Device IO AudioOutputs capability shall support the addition of an audio decoder configuration to a profile through the AddAudioDecoderConfiguration command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ProfileToken [tt:ReferenceToken]</para>
              <para role="text">Contains a reference to the AudioConfiguration to add and the Profile where it shall be added.
</para>
              <para role="param">ConfigurationToken [tt:ReferenceToken]</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile token ProfileToken does not exist.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The AudioDecoderConfiguration indicated by the ConfigurationToken does not exist.</para>
              <para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
              <para role="text">Other configurations of the media profile conflicts with the one to add and adding it would cause a conflicting media profile.</para>
              <para role="param">env:Receiver - ter:ActionNotSupported - ter:AudioDecodingNotSupported</para>
              <para role="text">Audio or Audio Decoding is not supported </para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>RemoveVideoSourceConfiguration</title>
        <para>This operation removes a VideoSourceConfiguration from an existing media profile. If the media profile does not contain a VideoSourceConfiguration, the operation has no effect. The removal shall be persistent. The device shall support removal of a video source configuration from a profile through the RemoveVideoSourceConfiguration command.</para>
        <para>
          <emphasis>Video source configurations should only be removed after removing a VideoEncoderConfiguration from the media profile.</emphasis>
        </para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ProfileToken [tt:ReferenceToken]</para>
              <para role="text">Contains a reference to the media profile from which the VideoSourceConfiguration shall be removed.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile tokenProfileTokendoes not exist.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">There exists no video source configuration in the media profile.Note: this fault code has become obsolete to respect the behaviour not to return this error</para>
              <para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
              <para role="text">Other configurations of the media profile are dependant on the VideoSourceConfiguration and removing it would cause a conflicting media profile.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>RemoveVideoEncoderConfiguration</title>
        <para>This operation removes a VideoEncoderConfiguration from an existing media profile. If the media profile does not contain a VideoEncoderConfiguration, the operation has no effect. The removal shall be persistent. The device shall support removal of a video encoder configuration from a profile through the RemoveVideoEncoderConfiguration command.<emphasis></emphasis></para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ProfileToken [tt:ReferenceToken]</para>
              <para role="text">Contains a reference to the media profile from which the VideoEncoderConfiguration shall be removed.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile tokenProfileTokendoes not exist.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">There exists no video encoder configuration in the media profile. Note: this fault code has become obsolete to respect the behaviour not to return this error</para>
              <para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
              <para role="text">Other configurations of the media profile are dependant on the VideoEncoderConfiguration and removing it would cause a conflicting media profile.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>RemoveAudioSourceConfiguration</title>
        <para>This operation removes an AudioSourceConfiguration from an existing media profile. If the media profile does not contain an AudioSourceConfiguration, the operation has no effect. The removal shall be persistent. A device that supports audio streaming from device to client shall support removal of an audio source configuration from a profile through the RemoveAudioSourceConfiguration command.<emphasis></emphasis></para>
        <para>
          <emphasis>Audio source configurations should only be removed after removing an AudioEncoderConfiguration from the media profile.</emphasis>
        </para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ProfileToken [tt:ReferenceToken]</para>
              <para role="text">Contains a reference to the media profile from which the AudioSourceConfiguration shall be removed.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile tokenProfileTokendoes not exist.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">There exists no audio source configuration in the media profile. Note: this fault code has become obsolete to respect the behaviour not to return this error</para>
              <para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
              <para role="text">Other configurations of the media profile are dependant on the AudioSourceConfiguration and removing it would cause a conflicting media profile.</para>
              <para role="param">env:Receiver - ter:ActionNotSupported - ter:AudioNotSupported</para>
              <para role="text">Audio is not supported.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>RemoveAudioEncoderConfiguration</title>
        <para>This operation removes an AudioEncoderConfiguration from an existing media profile. If the media profile does not contain an AudioEncoderConfiguration, the operation has no effect. The removal shall be persistent. A device that supports audio streaming from device to client shall support removal of audio encoder configurations from a profile through the RemoveAudioEncoderConfiguration command.<emphasis></emphasis></para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ProfileToken [tt:ReferenceToken]</para>
              <para role="text">Contains a reference to the media profile from which the AudioEncoderConfiguration shall be removed.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile tokenProfileTokendoes not exist.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">There exists no audio encoder configuration in the media profile. Note: this fault code has become obsolete to respect the behaviour not to return this error</para>
              <para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
              <para role="text">Other configurations of the media profile are dependant on the AudioEncoderConfiguration and removing it would cause a conflicting media profile.</para>
              <para role="param">env:Receiver - ter:ActionNotSupported - ter:AudioNotSupported</para>
              <para role="text">Audio is not supported.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>RemovePTZConfiguration</title>
        <para>This operation removes a PTZConfiguration from an existing media profile. If the media profile does not contain a PTZConfiguration, the operation has no effect. The removal shall be persistent. A device that supports PTZ control shall support removal of PTZ configurations from a profile through the RemovePTZConfiguration command.<emphasis></emphasis></para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ProfileToken [tt:ReferenceToken]</para>
              <para role="text">Contains a reference to the media profile from which the PTZConfiguration shall be removed.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile tokenProfileTokendoes not exist.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">There exists no PTZ configuration in the media profile. Note: this fault code has become obsolete to respect the behaviour not to return this error</para>
              <para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
              <para role="text">Other configurations of the media profile are dependant on the PTZConfiguration and removing it would cause a conflicting media profile.</para>
              <para role="param">env:Receiver - ter:ActionNotSupported - ter:PTZNotSupported</para>
              <para role="text">PTZ is not supported.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>RemoveVideoAnalyticsConfiguration</title>
        <para>This operation removes a VideoAnalyticsConfiguration from an existing media profile. If the media profile does not contain a VideoAnalyticsConfiguration, the operation has no effect. The removal shall be persistent. A device that supports video analytics shall support removal of a video analytics configuration from a profile through the RemoveVideoAnalyticsConfiguration command.<emphasis></emphasis></para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ProfileToken [tt:ReferenceToken]</para>
              <para role="text">Contains a reference to the media profile from which the VideoAnalyticsConfiguration shall be removed.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile tokenProfileTokendoes not exist.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">There exists no video analytics configuration in the media profile. Note: this fault code has become obsolete to respect the behaviour not to return this error</para>
              <para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
              <para role="text">Other configurations of the media profile are dependant on the VideoAnalyticsConfiguration and removing it would cause a conflicting media profile.</para>
              <para role="param">env:Receiver - ter:ActionNotSupported - ter:VideoAnalyticsNotSupported</para>
              <para role="text">VideoAnalytics is not supported.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>RemoveMetadataConfiguration</title>
        <para>This operation removes a MetadataConfiguration from an existing media profile. If the media profile does not contain a MetadataConfiguration, the operation has no effect. The removal shall be persistent. A device shall support the removal of a metadata configuration from a profile through the RemoveMetadataConfiguration command.<emphasis></emphasis></para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ProfileToken [tt:ReferenceToken]</para>
              <para role="text">Contains a reference to the media profile from which the MetadataConfiguration shall be removed.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile tokenProfileTokendoes not exist.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">There exists no metadata configuration in the media profile. Note: this fault code has become obsolete to respect the behaviour not to return this error</para>
              <para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
              <para role="text">Other configurations of the media profile are dependant on the MetadataConfiguration and removing it would cause a conflicting media profile.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>RemoveAudioOutputConfiguration</title>
        <para>This operation removes an AudioOutputConfiguration from an existing media profile. If the media profile does not contain an AudioOutputConfiguration, the operation has no effect. The removal shall be persistent. An device that signals support for Audio outputs via its Device IO AudioOutputs capability shall support the removal of an audio output configuration from a profile through the RemoveAudioOutputConfiguration command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ProfileToken [tt:ReferenceToken]</para>
              <para role="text">Contains a reference to the media profile from which the AudioOutputConfiguration shall be removed.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile tokenProfileTokendoes not exist.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">There exists no audio output configuration in the media profile. Note: this fault code has become obsolete to respect the behaviour not to return this error</para>
              <para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
              <para role="text">Other configurations of the media profile are dependant on the AudioOutputConfiguration and removing it would cause a conflicting media profile.</para>
              <para role="param">env: Receiver - ter:ActionNotSupported - ter:AudioOutputNotSupported</para>
              <para role="text"> Audio or Audio output is not supported</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>RemoveAudioDecoderConfiguration</title>
        <para>This operation removes an AudioDecoderConfiguration from an existing media profile. If the media profile does not contain an AudioDecoderConfiguration, the operation has no effect. The removal shall be persistent. An device that signals support for Audio outputs via its Device IO AudioOutputs capability shall support the removal of an audio decoder configuration from a profile through the RemoveAudioDecoderConfiguration command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ProfileToken [tt:ReferenceToken]</para>
              <para role="text">Contains a reference to the media profile from which the AudioDecoderConfiguration shall be removed.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile tokenProfileTokendoes not exist.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">There exists no audio decoder configuration in the media profile. Note: this fault code has become obsolete to respect the behaviour not to return this error</para>
              <para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
              <para role="text">Other configurations of the media profile are dependant on the AudioDecoder Configuration and removing it would cause a conflicting media profile.</para>
              <para role="param">env: Receiver - ter:ActionNotSupported - ter::AudioDecodingNotSupported</para>
              <para role="text">Audio or AudioDecoding is not supported</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>DeleteProfile</title>
        <para>This operation deletes a profile. This change shall always be persistent. The device shall support the deletion of a media profile through the DeleteProfile command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ProfileToken [tt:ReferenceToken]</para>
              <para role="text">Contains a ProfileToken that indicates what media profile to delete.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile tokenProfileTokendoes not exist.</para>
              <para role="param">env:Sender - ter:Action - ter:DeletionOfFixedProfile</para>
              <para role="text">The fixed Profile cannot be deleted.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
    </section>
    <section>
      <title>Video source</title>
      <para>A VideoSource represents unencoded video input. The structure contains the pixel resolution of the video, framerate and imaging settings. The imaging settings can be manipulated through the ImagingService if supported and contains parameters for focus, exposure and brightness, for example. <phrase>See the Imagaing Service Specification for more information.</phrase></para>
      <section>
        <title>GetVideoSources</title>
        <para>This operation lists all available video sources for the device. The device shall support the listing of available video sources through the GetVideoSources command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">VideoSources - optional, unbounded [tt:VideoSource]</para>
              <para role="text">Contains a list of structures describing all available video sources of the device.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="text">No command specific faults defined.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
    </section>
    <section>
      <title>Video source configuration</title>
      <para>A VideoSourceConfiguration contains a reference to a VideoSource and a Bounds structure containing either the whole VideoSource pixel area or a sub-portion of it. The Bounds and VideoSource define the image that is streamed to a client. If a VideoSourceConfiguration is used inside a profile its UseCount parameter is increased to indicate that changing this configuration could affect other users.</para>
      <section>
        <title>GetVideoSourceConfigurations</title>
        <para>This operation lists all <emphasis>existing</emphasis> video source configurations for a device. This command lists <emphasis>all </emphasis>video source configurations in a device. The client need not know anything about the video source configurations in order to use the command. The device shall support the listing of available video source configurations through the GetVideoSourceConfigurations command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Configurations - optional, unbounded [tt:VideoSourceConfiguration]</para>
              <para role="text">This message contains a list of all existing video source configurations in the device. A video source configuration does always point at a real video source with the SourceToken element.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="text">No command specific faults defined.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>GetVideoSourceConfiguration</title>
        <para>If the video source configuration token is already known, the video source configuration can be fetched through the GetVideoSourceConfiguration command. The device shall support retrieval of specific video source configurations through the GetVideoSourceConfiguration command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ConfigurationToken [tt:ReferenceToken]</para>
              <para role="text">This message contains the token of the requested video source configuration. 
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Configuration [tt:VideoSourceConfiguration]</para>
              <para role="text">This message contains the requested VideoSourceConfiguration with the matching token. A video source configuration does always point at a real video source with the SourceToken element.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The requested configuration indicated with ConfigurationTokendoes not exist.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>GetCompatibleVideoSourceConfigurations</title>
        <para>This operation requests all the video source configurations of the device that are compatible with a certain media profile. Each of the returned configurations shall be a valid input parameter for the AddVideoSourceConfiguration command on the media profile. The result will vary depending on the capabilities, configurations and settings in the device. The device shall support the listing of compatible (with a specific profile) video source configurations through the GetCompatibleVideoSourceConfigurations command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ProfileToken [tt:ReferenceToken]</para>
              <para role="text">Contains the token of an existing media profile.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Configurations - optional, unbounded [tt:VideoSourceConfiguration]</para>
              <para role="text">Contains a list of video source configurations that are compatible with the media profile.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile tokenProfileTokendoes not exist.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>GetVideoSourceConfigurationOptions</title>
        <para>This operation returns the available parameters and their valid ranges to the client. Any combination of the parameters obtained using a given media profile and video source configuration shall be a valid input for the SetVideoSourceConfiguration command. The device shall support the GetVideoSourceConfigurationOptions command.</para>
        <para>If a video source configuration token is provided, the device shall return the options compatible with that configuration. If a media profile token is specified, the device shall return the options compatible with that media profile. If both a media profile token and a video source configuration token are specified, the device shall return the options compatible with both that media profile and that configuration. If no tokens are specified, the options shall be considered generic for the device.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ConfigurationToken optional [tt:ReferenceToken]</para>
              <para role="text">This message may contain a media profile or video source configuration token, or both.
</para>
              <para role="param">ProfileToken optional [tt:ReferenceToken]</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Options [tt:VideoSourceConfigurationOptions]</para>
              <para role="text">This message contains the video configuration options. If a video source configuration is specified, the options shall concern that particular configuration. If a media profile is specified, the options shall be compatible with that media profile. If no tokens are specified, the options shall be considered generic for the device.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile tokenProfileTokendoes not exist.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The requested configuration does not exist.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>SetVideoSourceConfiguration</title>
        <para>This operation modifies a video source configuration. The ForcePersistence flag indicates if the changes shall remain after reboot of the device. Running streams using this configuration may be immediately updated according to the new settings. The changes are not guaranteed to take effect unless the client requests a new stream URI and restarts any affected stream. Client methods for changing a running stream are out of scope for this specification.  The device shall support the modification of video source parameters through the SetVideoSourceConfiguration command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">Configuration [tt:VideoSourceConfiguration]</para>
              <para role="text">The Configuration element contains the modified video source configuration. The configuration shall exist in the device.
The ForcePersistence element is obsolete and should always be assumed to be true.
</para>
              <para role="param">ForcePersistence [xs:boolean]</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The configuration does not exist.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:ConfigModify</para>
              <para role="text">The configuration parameters are not possible to set.</para>
              <para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
              <para role="text">The new settings conflicts with other uses of the configuration.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
    </section>
    <section>
      <title>Video encoder configuration</title>
      <para>A VideoEncoderConfiguration contains the following parameters for configuring the encoding of video data:</para>
      <itemizedlist>
        <listitem>
          <para>Encoder – The encoding used for the video data.</para>
        </listitem>
        <listitem>
          <para>Resolution – The pixel resolution of the encoded video data.</para>
        </listitem>
        <listitem>
          <para>Quality – Determines the quality of the video. A high value within supported quality range means higher quality.</para>
        </listitem>
        <listitem>
          <para>RateControl –  Defines parameters to configure the bitrate [kbps] as well as an EncodingInterval parameter (Interval at which images are encoded and transmitted) and a FrameRateLimit [fps] parameter to configure the output framerate.</para>
        </listitem>
        <listitem>
          <para>MPEG4/H264 specifics – Defines the encoding profile and GOV length [frame].</para>
        </listitem>
      </itemizedlist>
      <para>TheVideoEncoderConfiguration structure also contains multicast parameters and a session timeout to define video streaming behaviour. If a VideoEncoderConfiguration is used inside a profile its UseCount parameter is increased to indicate that changing this configuration could affect other users.</para>
      <para>If the whole RateControl parameter structure is missing the current state of rate control is undefined and vendor specific. A device, supporting disabling rate control mechanisms shall reflect that by omitting the RateControl element after removal by a client otherwise it shall return the current values used for RateControl. If RateControl is missing, the respective options define whether a RateControl element can be (re-)added.</para>
      <section>
        <title>GetVideoEncoderConfigurations</title>
        <para>This operation lists all <emphasis>existing</emphasis> video encoder configurations of a device. This command lists <emphasis>all </emphasis>configured video encoder configurations in a device. The client does not need to know anything apriori about the video encoder configurations in order to use the command. The device shall support the listing of available video encoder configurations through the GetVideoEncoderConfigurations command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Configurations - optional, unbounded [tt:VideoEncoderConfiguration]</para>
              <para role="text">This message contains a list of all existing video encoder configurations in the device.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="text">No command specific faults defined.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>GetVideoEncoderConfiguration</title>
        <para>If the video encoder configuration token is already known, the encoder configuration can be fetched through the GetVideoEncoderConfiguration command. The device shall support the retrieval of a specific video encoder configuration through the GetVideoEncoderConfiguration command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ConfigurationToken [tt:ReferenceToken]</para>
              <para role="text">This message contains the token of the requested video encoder configuration.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Configuration [tt:VideoEncoderConfiguration]</para>
              <para role="text">This message contains the requested VideoEncoderConfiguration with the matching token.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The requested configuration indicated with ConfigurationTokendoes not exist.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>GetCompatibleVideoEncoderConfigurations</title>
        <para>This operation lists all the video encoder configurations of the device that are compatible with a certain media profile. Each of the returned configurations shall be a valid input parameter for the AddVideoEncoderConfiguration command on the media profile. The result will vary depending on the capabilities, configurations and settings in the device. The device shall support the listing of compatible (with a specific profile) video encoder configurations through the GetCompatibleVideoEncoderConfigurations command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ProfileToken [tt:ReferenceToken]</para>
              <para role="text">Contains the token of an existing media profile.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Configurations - optional, unbounded [tt:VideoEncoderConfiguration]</para>
              <para role="text">Contains a list of video encoder configurations that are compatible with the given media profile.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile tokenProfileTokendoes not exist.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>GetVideoEncoderConfigurationOptions</title>
        <para>This operation returns the available parameters and their valid ranges to the client. Any combination of the parameters obtained using a given media profile and video encoder configuration shall be a valid input for the SetVideoEncoderConfiguration command. The device shall support the GetVideoEncoderConfigurationOptions command.</para>
        <para>If a video encoder configuration token is provided, the device shall return the options compatible with that configuration. If a media profile token is specified, the device shall return the options compatible with that media profile. If both a media profile token and a video encoder configuration token are specified, the device shall return the options compatible with both that media profile and that configuration. If no tokens are specified, the options shall be considered generic for the device.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ConfigurationToken optional [tt:ReferenceToken]</para>
              <para role="text">This message may contain a media profile or video encoder configuration token, or both.
</para>
              <para role="param">ProfileToken optional [tt:ReferenceToken]</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Options [tt:VideoEncoderConfigurationOptions]</para>
              <para role="text">This message contains the video configuration options. 
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile tokenProfileTokendoes not exist.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The requested configuration does not exist.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>SetVideoEncoderConfiguration</title>
        <para>This operation modifies a video encoder configuration. The ForcePersistence flag indicates if the changes shall remain after reboot of the device. Changes in the Multicast settings shall always be persistent. Running streams using this configuration may be immediately updated according to the new settings, but the changes are not guaranteed to take effect unless the client requests a new stream URI and restarts any affected stream. If the new settings invalidate any parameters already negotiated using RTSP, for example by changing codec type, the device must not apply these settings to existing streams. Instead it must either continue to stream using the old settings or stop sending data on the affected streams.</para>
        <para>Clientmethods for changing a running stream are out of scope for this specification. The device shall support the modification of video encoder parameters through the SetVideoEncoderConfiguration command.</para>
        <para>A device shall accept any combination of parameters that it returned in the GetVideoEncoderConfigurationOptionsResponse. If necessary the device may adapt parameter values for Quality and RateControl elements without returning an error. A device shall adapt an out of range BitrateLimit instead of returning a fault.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">Configuration [tt:VideoEncoderConfiguration]</para>
              <para role="text">The Configuration element contains the modified video encoder configuration. The configuration shall exist in the device.
The ForcePersistence element is obsolete and should always assumed to be true.
</para>
              <para role="param">ForcePersistence [xs:boolean]</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The configuration does not exist.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:ConfigModify</para>
              <para role="text">The configuration parameters are not possible to set.</para>
              <para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
              <para role="text">The new settings conflicts with other uses of the configuration.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>GetGuaranteedNumberOfVideoEncoderInstances</title>
        <para>The GetGuaranteedNumberOfVideoEncoderInstances command can be used to request the minimum number of guaranteed video encoder instances (applications) per Video Source Configuration. A device SHALL support this command. This command was added in ONVIF 1.02.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">tt: ReferenceToken ConfigurationToken [1][1]</para>
              <para role="text">This request contains a token to the video source configuration.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">TotalNumber [xs:int]</para>
              <para role="text">This message contains the minimum guaranteed TotalNumber of encoder instances (applications) per VideoSourceConfiguration. If a device limits the number of instances for respective Video Codecs the response contains the information how many Jpeg, H264 and Mpeg4 can be set up at the same time. In all other cases the device is able to deliver the TotalNumber of streams independent from the configured VideoCodec at the same time.
</para>
              <para role="param">JPEG optional [xs:int]</para>
              <para role="param">H264 optional [xs:int]</para>
              <para role="param">MPEG4 optional [xs:int]</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The requested configuration indicated with ConfigurationTokendoes not exist.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
    </section>
    <section>
      <title>Audio source</title>
      <para>An AudioSource represents unencoded audio input and states the number of input channels.</para>
      <section>
        <title>GetAudioSources</title>
        <para>This operation lists all available audio sources of the device. A device that supports audio streaming from device to client shall support listing of available audio sources through the GetAudioSources command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">AudioSources - optional, unbounded [tt:AudioSource]</para>
              <para role="text">Contains a list of structures describing all available audio sources of the device.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Receiver - ter:ActionNotSupported - ter:AudioNotSupported</para>
              <para role="text">The device does not support audio.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
    </section>
    <section>
      <title>Audio source configuration</title>
      <para>An AudioSourceConfiguration contains a reference to an AudioSource that is to be used for input in a media profile. If an AudioSourceConfiguration is used inside a profile its UseCount parameter is increased to indicate that changing this configuration could affect other users.</para>
      <section>
        <title>GetAudioSourceConfigurations</title>
        <para>This operation lists all <emphasis>existing</emphasis> audio source configurations of a device. This command lists <emphasis>all </emphasis>audio source configurations in a device. The client does not need to know anything apriori about the audio source configurations in order to use the command. A device that supports audio streaming from device to client shall support listing of available audio source configurations through the GetAudioSourceConfigurations command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Configurations - optional, unbounded [tt:AudioSourceConfiguration]</para>
              <para role="text">This message contains a list of all existing audio source configurations in the device. An audio source configuration does always point at a real audio source with the SourceToken element.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Receiver - ter:ActionNotSupported - ter:AudioNotSupported</para>
              <para role="text">The device does not support audio.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>GetAudioSourceConfiguration</title>
        <para>The GetAudioSourceConfiguration command fetches the audio source configurations if the audio source configuration token is already known. A device that supports audio streaming from device to client shall support the retrieval of a specific audio source configuration through the GetAudioSourceConfiguration command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ConfigurationToken [tt:ReferenceToken]</para>
              <para role="text">This message contains the token of the requested audio source configuration. An audio source configuration does always point at a real audio source with the SourceToken element.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Configuration [tt:AudioSourceConfiguration]</para>
              <para role="text">This message contains the requested AudioSourceConfiguration with the matching token. 
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The requested configuration indicated with ConfigurationTokendoes not exist.</para>
              <para role="param">env:Receiver - ter:ActionNotSupported - ter:AudioNotSupported</para>
              <para role="text">The device does not support audio.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>GetCompatibleAudioSourceConfigurations</title>
        <para>This operation requests all audio source configurations of a device that are compatible with a certain media profile. Each of the returned configurations shall be a valid input parameter for the AddAudioSourceConfiguration command on the media profile. The result varies depending on the capabilities, configurations and settings in the device. A device that supports audio streaming from device to client shall support listing of compatible (with a specific profile) audio source configurations through the GetCompatibleAudioSourceConfigurations command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ProfileToken [tt:ReferenceToken]</para>
              <para role="text">Contains the token of an existing media profile.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Configurations - optional, unbounded [tt:AudioSourceConfiguration]</para>
              <para role="text">Contains a list of audio source configurations that are compatible with the media profile.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile tokenProfileTokendoes not exist.</para>
              <para role="param">env:Receiver - ter:ActionNotSupported - ter:AudioNotSupported</para>
              <para role="text">The device does not support audio.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>GetAudioSourceConfigurationOptions</title>
        <para>This operation returns the available parameters and their valid ranges to the client. Any combination of the parameters obtained using a given media profile and audio source configuration shall be a valid input for the SetAudioSourceConfiguration command. A device that supports audio streaming from device to client shall support the GetAudioSourceConfigurationOptions command.</para>
        <para>If an audio source configuration token is provided, the device shall return the options compatible with that configuration. If a media profile token is specified, the device shall return the options compatible with that media profile. If both a media profile token and an audio source configuration token are specified, the device shall return the options compatible with both that media profile and that configuration. If no tokens are specified, the options shall be considered generic for the device.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ConfigurationToken optional [tt:ReferenceToken]</para>
              <para role="text">This message may contain a media profile or audio source configuration token, or both.
</para>
              <para role="param">ProfileToken optional [tt:ReferenceToken]</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Options [tt:AudioSourceConfigurationOptions]</para>
              <para role="text">This message contains the audio configuration options. If an audio source configuration is specified, the options shall concern that particular configuration. If a media profile is specified, the options shall be compatible with that media profile. If no tokens are specified, the options shall be considered generic for the device.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile tokenProfileTokendoes not exist.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The requested configuration does not exist.</para>
              <para role="param">env:Receiver - ter:ActionNotSupported - ter:AudioNotSupported</para>
              <para role="text">The device does not support audio.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>SetAudioSourceConfiguration</title>
        <para>This operation modifies an audio source configuration. The ForcePersistence flag indicates if the changes shall remain after reboot of the device. Running streams using this configuration may be immediately updated according to the new settings, but the changes are not guaranteed to take effect unless the client requests a new stream URI and restarts any affected stream. If the new settings invalidate any parameters already negotiated using RTSP, for example by changing codec type, the device must not apply these settings to existing streams. Instead it must either continue to stream using the old settings or stop sending data on the affected streams.</para>
        <para>Client methods for changing a running stream are out of scope for this specification. A device that supports audio streaming from device to client shall support the configuration of audio  source parameters through the SetAudioSourceConfiguration command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">Configuration [tt:AudioSourceConfiguration]</para>
              <para role="text">The Configuration element contains the modified audio source configuration. The configuration shall exist in the device.
The ForcePersistence element is obsolete and should always assumed to be true.
</para>
              <para role="param">ForcePersistence [xs:boolean]</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The configuration does not exist.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:ConfigModify</para>
              <para role="text">The configuration parameters are not possible to set.</para>
              <para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
              <para role="text">The new settings conflicts with other uses of the configuration.</para>
              <para role="param">env:Receiver - ter:ActionNotSupported - ter:AudioNotSupported</para>
              <para role="text">The device does not support audio.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
    </section>
    <section>
      <title>Audio encoder configuration</title>
      <para>An AudioEncoderConfiguration contains the following parameters for encoding audio data:</para>
      <itemizedlist>
        <listitem>
          <para>Encoder – The encoding used for audio data.</para>
        </listitem>
        <listitem>
          <para>Bitrate – The output bitrate [kbps].</para>
        </listitem>
        <listitem>
          <para>SampleRate – The output sample rate [kHz].</para>
        </listitem>
      </itemizedlist>
      <para>The AudioEncoderConfiguration structure also contains multicast parameters and a session timeout to define audio streaming behaviour.</para>
      <para>If an AudioEncoderConfiguration is used inside a profile its UseCount parameter is increased to indicate that changing this configuration could affect other users.</para>
      <section>
        <title>GetAudioEncoderConfigurations</title>
        <para>This operation lists all <emphasis>existing</emphasis> device audio encoder configurations. The client does not need to know anything apriori about the audio encoder configurations in order to use the command. A device that supports audio streaming from device to client shall support the listing of available audio encoder configurations through the GetAudioEncoderConfigurations command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Configurations - optional, unbounded [tt:AudioEncoderConfiguration]</para>
              <para role="text">This message contains a list of all existing audio encoder configurations in the device.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Receiver - ter:ActionNotSupported - ter:AudioNotSupported</para>
              <para role="text">The device does not support audio.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>GetAudioEncoderConfiguration</title>
        <para>The GetAudioEncoderConfiguration command fetches the encoder configuration if the audio encoder configuration token is known. A device that supports audio streaming from device to client shall support the listing of a specific audio encoder configuration through the GetAudioEncoderConfiguration command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ConfigurationToken [tt:ReferenceToken]</para>
              <para role="text">This message contains the token of the requested audio encoder configuration.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Configuration [tt:AudioEncoderConfiguration]</para>
              <para role="text">This message contains the requested AudioEncoderConfiguration with the matching token.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The configuration does not exist.</para>
              <para role="param">env:Receiver - ter:ActionNotSupported - ter:AudioNotSupported</para>
              <para role="text">The device does not support audio.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>GetCompatibleAudioEncoderConfigurations</title>
        <para>This operation requests all audio encoder configurations of the device that are compatible with a certain media profile. Each of the returned configurations shall be a valid input parameter for the AddAudioEncoderConfiguration command on the media profile. The result varies depending on the capabilities, configurations and settings in the device. A device that supports audio streaming from device to client shall support listing of compatible (with a specific profile) audio encoder configurations through the GetCompatibleAudioEncoderConfigurations command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ProfileToken [tt:ReferenceToken]</para>
              <para role="text">Contains the token of an existing media profile.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Configurations - optional, unbounded [tt:AudioEncoderConfiguration]</para>
              <para role="text">Contains a list of audio encoder configurations that are compatible with the given media profile.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile tokenProfileTokendoes not exist.</para>
              <para role="param">env:Receiver - ter:ActionNotSupported - ter:AudioNotSupported</para>
              <para role="text">The device does not support audio.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>GetAudioEncoderConfigurationOptions</title>
        <para>This operation returns the available parameters and their valid ranges to the client. Any combination of the parameters obtained using a given media profile and audio encoder configuration shall be a valid input for the SetAudioEncoderConfiguration command. A device that supports audio streaming from device to client shall support the GetAudioEncoderConfigurationOptions command.</para>
        <para>If an audio encoder configuration token is provided, the device shall return the options compatible with that configuration. If a media profile token is specified, the device shall return the options compatible with that media profile. If both a media profile token and an audio encoder configuration token are specified, the device shall return the options compatible with both that media profile and that configuration. If no tokens are specified, the options shall be considered generic for the device.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ConfigurationToken optional [tt:ReferenceToken]</para>
              <para role="text">This message may contain a media profile or audio encoder configuration token, or both.
</para>
              <para role="param">ProfileToken optional [tt:ReferenceToken]</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Options [tt:AudioEncoderConfigurationOptions]</para>
              <para role="text">This message contains the audio configuration options. If a audio encoder configuration is specified, the options shall concern that particular configuration. If a media profile is specified, the options shall be compatible with that media profile. If no tokens are specified, the options shall be considered generic for the device.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile tokendoes not exist.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The requested configuration does not exist.</para>
              <para role="param">env:Receiver - ter:ActionNotSupported - ter:AudioNotSupported</para>
              <para role="text">The device does not support audio.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>SetAudioEncoderConfiguration</title>
        <para>This operation modifies an audio encoder configuration. The ForcePersistence flag indicates if the changes shall remain after reboot of the device. Changes in the Multicast settings shall always be persistent. Running streams using this configuration may be immediately updated according to the new settings. The changes are not guaranteed to take effect unless the client requests a new stream URI and restarts any affected streams. Client methods for changing a running stream are out of scope for this specification.  A device that supports audio streaming from device to client shall support the configuration of audio  encoder parameters through the SetAudioEncoderConfiguration command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">Configuration [tt:AudioEncoderConfiguration]</para>
              <para role="text">The Configuration element contains the modified audio encoder configuration. The configuration shall exist in the device.
The ForcePersistence element is obsolete and should always assumed to be true.
</para>
              <para role="param">ForcePersistence [xs:boolean]</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The configuration does not exist.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:ConfigModify</para>
              <para role="text">The configuration parameters are not possible to set.</para>
              <para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
              <para role="text">The new settings conflicts with other uses of the configuration.</para>
              <para role="param">env:Receiver - ter:ActionNotSupported - ter:AudioNotSupported</para>
              <para role="text">The device does not support audio.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
    </section>
    <section xml:id="_Toc214944342">
      <title>Video analytics configuration</title>
      <para>VideoAnalyticsConfiguration contains parameters for an <emphasis>analytics engine </emphasis>and a <emphasis>rule engine </emphasis>(see the document Video Analytics Service Specification). Thereby, the analytics engine consists of multiple modules which can be managed by the analytics module part of the analytics service. Similarly, the rule engine consists of multiple rules which can be managed by the rule engine part of the analytics service. The subsequent commands are introduced to handle complete video analytics configuration in an atomar way. For instance, the ModifyVideoAnalyticsConfiguration command changes analytics and rule engine configuration in an atomar operation. When a video analytics configuration is present in a profile, the metadata configuration can activate the streaming of the scene description within the RTP streams (see Section <xref linkend="_Ref215313674" />).</para>
      <para>A device MAY NOT allow referencing the very same VideoAnalyticsConfiguration from multiple media profiles with different VideoSourceConfigurations. If the device allows it, it shall generate individual scene descriptions for each profile, since the coordinate system of a scene description relates to a specific VideoSourceConfiguration. Also masking and geometrical rules relate to the coordinate system of the VideoSourceConfiguration. This MAY require separate processing of the whole video analytics for each VideoSourceConfiguration, even if they refer to the very same VideoSource.</para>
      <para>Since the options of a VideoAnalyticsConfiguration are dynamic and often vendor specific, they can only be retrieved via the video analytics service.</para>
      <section>
        <title>GetVideoAnalyticsConfigurations</title>
        <para>This operation lists all video analytics configurations of a device. This command lists <emphasis>all </emphasis>configured video analytics in a device. The client does not need to know anything apriori about the video analytics in order to use the command. A device that supports video analytics shall support the listing of available video analytics configuration through the GetVideoAnalyticsConfigurations command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Configurations - optional, unbounded [tt:VideoAnalyticsConfiguration]</para>
              <para role="text">This message contains a list of all existing video analytics  configurations in the device.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:ActionNotSupported - ter:VideoAnalyticsNot-Supported</para>
              <para role="text">Device does not support video analytics.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>GetVideoAnalyticsConfiguration</title>
        <para>The GetVideoAnalyticsConfiguration command fetches the video analytics configuration if the video analytics token is known. A device that supports video analytics shall support the listing of a specific video analytics configuration through the GetVideoAnalyticsConfiguration command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ConfigurationToken [tt:ReferenceToken]</para>
              <para role="text">This message contains the token of an existing video analytics configuration.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Configuration [tt:VideoAnalyticsConfiguration]</para>
              <para role="text">This message contains the requested video analytics configuration.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The requested configuration indicated with ConfigurationTokendoes not exist.</para>
              <para role="param">env:Sender - ter:ActionNotSupported - ter:VideoAnalyticsNot-Supported</para>
              <para role="text">The device does not support video analytics.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>GetCompatibleVideoAnalyticsConfigurations</title>
        <para>This operation requests all video analytic configurations of the device that are compatible with a certain media profile. Each of the returned configurations shall be a valid input parameter for the AddVideoAnalyticsConfiguration command on the media profile. The result varies depending on the capabilities, configurations and settings in the device. A device that supports video analytics shall support the listing of compatible (with a specific profile) video analytics configuration through the GetCompatibleVideoAnalyticsConfigurations command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ProfileToken [tt:ReferenceToken]</para>
              <para role="text">Contains the token of an existing media profile.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Configurations - optional, unbounded [tt:VideoAnalyticsConfiguration]</para>
              <para role="text">Contains a list of video analytics configurations that are compatible with the given media profile.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile tokenProfileTokendoes not exist.</para>
              <para role="param">env:Sender - ter:ActionNotSupported - ter:VideoAnalyticsNot-Supported</para>
              <para role="text">The device does not support video analytics.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section xml:id="_Toc213605157">
        <title>SetVideoAnalyticsConfiguration</title>
        <para>A video analytics configuration is modified using this command. The ForcePersistence flag indicates if the changes shall remain after reboot of the device or not. Running streams using this configuration shall be immediately updated according to the new settings. Otherwise inconsistencies can occur between the scene description processed by the rule engine and the notifications produced by analytics engine and rule engine which reference the very same video analytics configuration token. A device that supports video analytics shall support the configuration of video analytics parameters through the SetVideoAnalyticsConfiguration command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">Configuration [tt:VideoAnalyticsConfiguration]</para>
              <para role="text">The Configuration element contains the modified video analytics configuration. The configuration shall exist in the device.
The ForcePersistence element is obsolete and should always assumed to be true.
</para>
              <para role="param">ForcePersistence [xs:boolean]</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The configuration does not exist.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:ConfigModify</para>
              <para role="text">The configuration parameters are not possible to set.</para>
              <para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
              <para role="text">The new settings conflicts with other uses of the configuration.</para>
              <para role="param">env:Sender - ter:ActionNotSupported - ter:VideoAnalyticsNot-Supported</para>
              <para role="text">The device does not support video analytics.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
    </section>
    <section xml:id="_Ref215313674">
      <title>Metadata configuration</title>
      <para>For PTZ transmission of status and position change information can be enabled separately.</para>
      <para>Event streaming can be enabled and controlled using topic filters. For topic filter configuration refer to section “Event Handling” of the ONVIF Core Specification.</para>
      <para>Streaming of scene description can be enabled. Optionally the AnalyticsEngineConfiguration allows to restrict streaming of scene description to the provided list of AnalyticsModules. Note that analytics modules only generate scene description if they are configured in the AnalyticsConfiguration of the profile as defined in section <xref linkend="_Toc214944342" />.</para>
      <para>A device shall ignore any analytics module parameters passed to the SetMetadataConfiguration command and should not list AnalyticsModule/Parameters.</para>
      <para>The structure also contains multicast parameters used to configure and control multicast of the metadata stream. A session timeout parameter defines the session timeout (see ONVIF Streaming Specification)</para>
      <para>If a MetadataConfiguration is used inside a profile its UseCount parameter is increased to indicate that changing this configuration could affect other users.</para>
      <para>Devices supporting compressed metadata shall signal available compression algorithm as defined in the MetadataCompressionType. Currently defined compression types are "GZIP" and "EXI".</para>
      <section>
        <title>Efficient XML Interchange (EXI)</title>
        <para>EXI encoding allows for a more compact representation of XML metadata. Provision is signalled if the CompressionType returned via GetMetadataConfigurationOptions contains "EXI". </para>
        <para>The ONVIF defined EXI configuration (see <xref linkend="_Ref11683239" /> and <xref linkend="_Ref422899119" />) shall be supported by a devices signalling the support for EXI compression via GetMetadataConfigurationOptions. </para>
        <para>The EXI header shall only be transmitted if a setting different then the ONVIF defined configuration is used. Except for the setting of the two elements “Presence Bit” and “EXI Options” the ONVIF defined EXI header settings (see <xref linkend="_Ref11683239" />) shall always be used.</para>
        <table xml:id="_Ref11683239">
          <title>Table 51 ONVIF defined EXI header settings</title>
          <tgroup cols="2">
            <colspec colname="c1" colwidth="33*" />
            <colspec colname="c2" colwidth="67*" />
            <thead>
              <row>
                <entry valign="middle">
                  <para>Exi header element</para>
                </entry>
                <entry valign="middle">
                  <para>Value</para>
                </entry>
              </row>
            </thead>
            <tbody valign="top">
              <row>
                <entry>
                  <para>EXI Cookie</para>
                </entry>
                <entry>
                  <para>mandatory</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>Distinguishing Bits</para>
                </entry>
                <entry>
                  <para>mandatory</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>EXI Format Version</para>
                </entry>
                <entry>
                  <para>0 0000</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>Presence Bit for EXI Options</para>
                </entry>
                <entry>
                  <para>0</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>Exi Options</para>
                </entry>
                <entry>
                  <para>see <xref linkend="_Ref422899119" /></para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>Padding Bits </para>
                </entry>
                <entry>
                  <para>If present must be “0“.</para>
                </entry>
              </row>
            </tbody>
          </tgroup>
        </table>
        <table xml:id="_Ref422899119">
          <title>ONVIF defined EXI configuration settings</title>
          <tgroup cols="2">
            <colspec colname="c1" colwidth="34*" />
            <colspec colname="c2" colwidth="66*" />
            <thead>
              <row>
                <entry valign="middle">
                  <para>Exi Option</para>
                </entry>
                <entry valign="middle">
                  <para>Value</para>
                </entry>
              </row>
            </thead>
            <tbody valign="top">
              <row>
                <entry>
                  <para>alignment</para>
                </entry>
                <entry>
                  <para>default (bit-packed)</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>compression</para>
                </entry>
                <entry>
                  <para>default (false)</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>strict</para>
                </entry>
                <entry>
                  <para>default (false)</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>fragment</para>
                </entry>
                <entry>
                  <para>default (false)</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>preserve</para>
                </entry>
                <entry>
                  <para>default (all false)</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>selfContained</para>
                </entry>
                <entry>
                  <para>default (false)</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>schemaID</para>
                </entry>
                <entry>
                  <para>Insert reference to schema obtained from device here.</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.w3.org/TR/2013/PER-exi-20131022/#key-datatypeRepresentationOption">datatypeRepresentationMap</link>
                  </para>
                </entry>
                <entry>
                  <para>none</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>blockSize</para>
                </entry>
                <entry>
                  <para>
                    <phrase>default (</phrase>1,000,000)</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.w3.org/TR/2013/PER-exi-20131022/#key-valueMaxLengthOption">valueMaxLength</link>
                  </para>
                </entry>
                <entry>
                  <para>default (unbounded)</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.w3.org/TR/2013/PER-exi-20131022/#key-valuePartitionCapacityOption">valuePartitionCapacity</link>
                  </para>
                </entry>
                <entry>
                  <para>default (unbounded)</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>
                    <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.w3.org/TR/2013/PER-exi-20131022/#key-userMetaData">user defined meta-data</link>
                  </para>
                </entry>
                <entry>
                  <para>none</para>
                </entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </section>
      <section>
        <title>GetMetadataConfigurations</title>
        <para>This operation lists all <emphasis>existing</emphasis> metadata configurations. The client does not need to know anything apriori about the metadata in order to use the command. A device or another device that supports metadata streaming shall support the listing of existing metadata configurations through the GetMetadataConfigurations command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Configurations - optional, unbounded [tt:MetadataConfiguration]</para>
              <para role="text">This message contains a list of all existing metadata configurations in the device.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="text">No command specific faults defined.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>GetMetadataConfiguration</title>
        <para>The GetMetadataConfiguration command fetches the metadata configuration if the metadata token is known. A device or another device that supports metadata streaming shall support the listing of a specific metadata configuration through the GetMetadataConfiguration command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ConfigurationToken [tt:ReferenceToken]</para>
              <para role="text">This message contains the token of an existing metadata configuration.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Configuration [tt:MetadataConfiguration]</para>
              <para role="text">This message contains the requested metadata configuration.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The requested configuration indicated with ConfigurationTokendoes not exist.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>GetCompatibleMetadataConfigurations</title>
        <para>This operation requests all the metadata configurations of the device that are compatible with a certain media profile. Each of the returned configurations shall be a valid input parameter for the AddMetadataConfiguration command on the media profile. The result varies depending on the capabilities, configurations and settings in the device. A device or other device that supports metadata streaming shall support the listing of compatible (with a specific profile) metadata configuration through the GetCompatibleMetadataConfigurations command. </para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ProfileToken [tt:ReferenceToken]</para>
              <para role="text">Contains the token of an existing media profile.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Configurations - optional, unbounded [tt:MetadataConfiguration]</para>
              <para role="text">Contains a list of metadata configurations that are compatible with the given media profile.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile tokenProfileTokendoes not exist.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>GetMetadataConfigurationOptions</title>
        <para>This operation returns the available parameters and their valid ranges to the client. Any combination of the parameters obtained using a given media profile and metadata configuration shall be a valid input for the SetMetadataConfiguration command. A device that supports metadata streaming shall support the GetMetadataConfigurationOptions command.</para>
        <para>If a metadata configuration token is provided, the device shall return the options compatible with that configuration. If a media profile token is specified, the device shall return the options compatible with that media profile. If both a media profile token and a metadata configuration token are specified, the device shall return the options compatible with both that media profile and that configuration. If no tokens are specified, the options shall be considered generic for the device.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ConfigurationToken optional [tt:ReferenceToken]</para>
              <para role="text">This message may contain a media profile or metadata configuration token, or both.
</para>
              <para role="param">ProfileToken optional [tt:ReferenceToken]</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Options [tt:MetadataConfigurationOptions]</para>
              <para role="text">This message contains the metadata configuration options. If a metadata configuration is specified, the options shall concern that particular configuration. If a media profile is specified, the options shall be compatible with that media profile. If no tokens are specified, the options shall be considered generic for the device.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile tokendoes not exist.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The requested configuration does not exist.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>SetMetadataConfiguration</title>
        <para>This operation modifies a metadata configuration. The ForcePersistence flag indicates if the changes shall remain after reboot of the device. Changes in the Multicast settings shall always be persistent. Running streams using this configuration may be updated immediately according to the new settings. The changes are not guaranteed to take effect unless the client requests a new stream URI and restarts any affected streams. Client methods for changing a running stream are out of scope for this specification. A device or another device that supports metadata streaming shall support the configuration of metadata parameters through the SetMetadataConfiguration command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">Configuration [tt:MetadataConfiguration]</para>
              <para role="text">The Configuration element contains multicast settings as well as a set of filters determining what data to include in the metadata stream.
The ForcePersistence element is obsolete and should always assumed to be true.
</para>
              <para role="param">ForcePersistence [xs:boolean]</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The configuration does not exist.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:ConfigModify</para>
              <para role="text">The configuration parameters are not possible to set.</para>
              <para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
              <para role="text">The new settings conflicts with other uses of the configuration.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
    </section>
    <section>
      <title>Audio outputs</title>
      <para>The Audio Output represents the physical audio outputs that can be connected to a loudspeaker. </para>
      <section>
        <title>GetAudioOutputs</title>
        <para>This command lists all available audio outputs of a device. An device that signals support for Audio outputs via its Device IO AudioOutputs capability shall support listing of available audio outputs through the GetAudioOutputs command. </para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">AudioOutputs - optional, unbounded [tt:AudioOutput]</para>
              <para role="text">Contains a list of structures describing all available audio outputs of the device. If a device has no AudioOutputs an empty list is returned.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Receiver - ter:ActionNotSupported - ter:AudioOutputNotSupported</para>
              <para role="text">Audio or Audio Outputs are not supported by the device</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
    </section>
    <section>
      <title>Audio output configuration</title>
      <para>The audio output configuration contains the following parameters:</para>
      <itemizedlist>
        <listitem>
          <para>SourceToken: a reference to an existing audio output. </para>
        </listitem>
        <listitem>
          <para>OutputLevel:   a parameter to configure the output volume</para>
        </listitem>
        <listitem>
          <para>SendPrimacy: a parameter that can be used for devices with a half duplex audio in/output to configure the active transmission direction (see Section <xref linkend="_Ref482351812" />).</para>
        </listitem>
      </itemizedlist>
      <para>If an AudioOutputConfiguration is used inside a profile its UseCount parameter is increased to indicate that changing this configuration could affect other users.</para>
      <section>
        <title>GetAudioOutputConfigurations</title>
        <para>This command lists all existing AudioOutputConfigurations of a device. The client does not need to know anything apriori about the audio configurations to use this command. A device that signals support for Audio outputs via its Device IO AudioOutputs capability shall support the listing of AudioOutputConfigurations through this command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Configurations - optional, unbounded [tt:AudioOutputConfiguration]</para>
              <para role="text">Contains a list of AudioOutputConfigurations that are available on the device
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env: Receiver - ter:ActionNotSupported - ter:AudioOutputNotSupported</para>
              <para role="text">Audio or Audio Outputs are not supported by the device</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>GetAudioOutputConfiguration</title>
        <para>If the audio output configuration token is already known, the output configuration can be fetched through the GetAudioOutputConfiguration command. An device that signals support for Audio outputs via its Device IO AudioOutputs capability shall support the retrieval of a specific audio output configuration through the GetAudioOutputConfiguration command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ConfigurationToken [tt:ReferenceToken]</para>
              <para role="text">This message contains the token of the requested AudioOutput configuration. 
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Configuration [tt:AudioOutputConfiguration]</para>
              <para role="text">This message contains the requested AudioOutputConfiguration with the matching token. 
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The requested configuration indicated with ConfigurationToken does not exist. </para>
              <para role="param">env: Receiver - ter:ActionNotSupported - ter::AudioOutputNotSupported</para>
              <para role="text">Audio or Audio Outputs are not supported by the device</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>GetCompatibleAudioOutputConfigurations</title>
        <para>This command lists all audio output configurations of a device that are compatible with a certain media profile. Each returned configuration shall be a valid input for the AddAudioOutputConfiguration command. An device that signals support for Audio outputs via its Device IO AudioOutputs capability shall support the listing of compatible (with a specific profile) AudioOutputConfigurations through the GetCompatibleAudioOutputConfigurations command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ProfileToken [tt:ReferenceToken]</para>
              <para role="text">Contains the token of an existing media profile. 
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Configurations - optional, unbounded [tt:AudioOutputConfiguration]</para>
              <para role="text">Contains a list of audio output configurations that are compatible with the given media profile. 
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile token ProfileToken does not exist. </para>
              <para role="param">env:Receiver - ter:ActionNotSupported - ter:AudioOutputNotSupported</para>
              <para role="text">Audio or Audio Outputs are not supported by the device</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>GetAudioOutputConfigurationOptions</title>
        <para>This operation returns the available parameters and their valid ranges to the client. Any combination of the parameters obtained using a given media profile and audio output configuration shall be a valid input for the SetAudioOutputConfiguration command. A device that supports audio streaming from client to device shall support the GetAudioOutputConfigurationOptions command.</para>
        <para>If an audio output configuration token is provided, the device shall return the options compatible with that configuration. If a media profile token is specified, the device shall return the options compatible with that media profile. If both a media profile token and an audio output configuration token are specified, the device shall return the options compatible with both that media profile and that configuration. If no tokens are specified, the options shall be considered generic for the device.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ConfigurationToken optional [tt:ReferenceToken]</para>
              <para role="text">This message may contain a media profile or audio output configuration token, or both.
</para>
              <para role="param">ProfileToken optional [tt:ReferenceToken]</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Options [tt:AudioOutputConfigurationOptions]</para>
              <para role="text">This message contains the audio output configuration options. If a audio output configuration is specified, the options shall concern that particular configuration. If a media profile is specified, the options shall be compatible with that media profile. If no tokens are specified, the options shall be considered generic for the device.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile tokenProfileTokendoes not exist.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The requested configuration does not exist.</para>
              <para role="param">env:Receiver - ter:ActionNotSupported - ter:AudioOutputNotSupported</para>
              <para role="text">Audio or Audio Outputs are not supported by the device</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>SetAudioOutputConfiguration </title>
        <para>This operation modifies an audio output configuration. The ForcePersistence flag indicates if the changes shall remain after reboot of the device. An device that signals support for Audio outputs via its Device IO AudioOutputs capability shall support the modification of audio output parameters through the SetAudioOutputConfiguration command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">Configuration [tt:AudioOutputConfiguration]</para>
              <para role="text">The Configuration element contains the modified Audio Output configuration. The configuration must exist in the device.
The ForcePersistence element is obsolete and should always assumed to be true.
</para>
              <para role="param">ForcePersistence [xs:boolean]</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The configuration does not exist.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:ConfigModify</para>
              <para role="text">The configuration parameters are not possible to set.</para>
              <para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
              <para role="text">The new settings conflicts with other uses of the configuration.</para>
              <para role="param">env: Receiver - ter:ActionNotSupported - ter:AudioOutputNotSupported</para>
              <para role="text">Audio or Audio Outputs are not supported by the device</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
    </section>
    <section>
      <title>Audio decoder configuration</title>
      <para>The Audio Decoder Configuration does not contain any parameter to configure the decoding .A decoder shall decode every data it receives (according to its capabilities).</para>
      <para>If an AudioDecoderConfiguration is used inside a profile its UseCount parameter is increased to indicate that changing this configuration could affect other users.</para>
      <section>
        <title>GetAudioDecoderConfigurations</title>
        <para>This command lists all existing AudioDecoderConfigurations of a device.</para>
        <para>The client does not need to know anything apriori about the audio decoder configurations in order to use this command. An device that signals support for Audio outputs via its Device IO AudioOutputs capability shall support the listing of AudioOutputConfigurations through this command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Configurations - optional, unbounded [tt:AudioDecoderConfiguration]</para>
              <para role="text">Contains a list of AudioDecoderConfigurations that are available on the device
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Receiver - ter:ActionNotSupported - ter:AudioDecodingNotSupported</para>
              <para role="text">Audio or Audio decoding is not supported by the device</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>GetAudioDecoderConfiguration</title>
        <para>If the audio decoder configuration token is already known, the decoder configuration can be fetched through the GetAudioDecoderConfiguration command. An device that signals support for Audio outputs via its Device IO AudioOutputs capability shall support the retrieval of a specific audio decoder configuration through the GetAudioDecoderConfiguration command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ConfigurationToken [tt:ReferenceToken]</para>
              <para role="text">This message contains the token of the requested AudioDecoder configuration. 
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Configuration [tt:AudioDecoderConfiguration]</para>
              <para role="text">This message contains the requested AudioDecoder Configuration with the matching token. 
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The requested configuration indicated with ConfigurationToken does not exist. </para>
              <para role="param">env:Receiver - ter:ActionNotSupported - ter:AudioDecodingNotSupported</para>
              <para role="text">Audio or Audio decoding is not supported by the device</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>GetCompatibleAudioDecoderConfigurations</title>
        <para>This operation lists all the audio decoder configurations of the device that are compatible with a certain media profile. Each of the returned configurations shall be a valid input parameter for the AddAudioDecoderConfiguration command on the media profile. An device that signals support for Audio outputs via its Device IO AudioOutputs capability shall support the listing of compatible (with a specific profile) audio decoder configurations through the GetCompatibleAudioDecoderConfigurations command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ProfileToken [tt:ReferenceToken]</para>
              <para role="text">Contains the token of an existing media profile. 
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Configurations - optional, unbounded [tt:AudioDecoderConfiguration]</para>
              <para role="text">Contains a list of audiodecoder configurations that are compatible with the given media profile. 
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile token ProfileToken does not exist. </para>
              <para role="param">env:Receiver - ter:ActionNotSupported - ter:AudioDecodingNotSupported</para>
              <para role="text">Audio or Audio decoding is not supported by the device</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>GetAudioDecoderConfigurationOptions </title>
        <para>This operation returns the available parameters and their valid ranges to the client. Any combination of the parameters obtained using a given media profile and audio decoder configuration shall be a valid input for the SetAudioDecoderConfiguration command. A device that supports audio streaming from client to device shall support the GetAudioDecoderConfigurationOptions command.</para>
        <para>If an audio decoder configuration token is provided, the device shall return the options compatible with that configuration. If a media profile token is specified, the device shall return the options compatible with that media profile. If both a media profile token and an audio decoder configuration token are specified, the device shall return the options compatible with both that media profile and that configuration. If no tokens are specified, the options shall be considered generic for the device.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ConfigurationToken optional [tt:ReferenceToken]</para>
              <para role="text">This message may contain a media profile or audio decoder configuration token, or both.
</para>
              <para role="param">ProfileToken optional [tt:ReferenceToken]</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Options [tt:AudioDecoderConfigurationOptions]</para>
              <para role="text">This message contains the audio decoder configuration options. If a audio decoder configuration is specified, the options shall concern that particular configuration. If a media profile is specified, the options shall be compatible with that media profile. If no tokens are specified, the options shall be considered generic for the device.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The requested profile tokenProfileTokendoes not exist.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The requested configuration does not exist.</para>
              <para role="param">env:Receiver - ter:ActionNotSupported - ter:AudioDecodingNotSupported</para>
              <para role="text">Audio or Audio decoding is not supported by the device</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>SetAudioDecoderConfiguration</title>
        <para>This operation modifies an audio decoder configuration. The ForcePersistence flag indicates if the changes shall remain after reboot of the device. An device that signals support for Audio outputs via its Device IO AudioOutputs capability shall support the modification of audio decoder parameters through the SetAudioDecoderConfiguration command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">Configuration [tt:AudioDecoderConfiguration]</para>
              <para role="text">The Configuration element contains the modified AudioDecoder configuration. The configuration must exist in the device.
The ForcePersistence element is obsolete and should always assumed to be true.
</para>
              <para role="param">ForcePersistence [xs:boolean]</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The configuration does not exist.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:ConfigModify</para>
              <para role="text">The configuration parameters are not possible to set.</para>
              <para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
              <para role="text">The new settings conflicts with other uses of the configuration.</para>
              <para role="param">env: Receiver - ter:ActionNotSupported - ter:AudioDecodingNotSupported</para>
              <para role="text">Audio or Audio decoding is not supported by the device</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
    </section>
    <section xml:id="_Ref482351812">
      <title>Audio channel modes</title>
      <para>An audio channel MAY support different types of audio transmission. While for full duplex operation no special handling is required, in half duplex operation the transmission direction needs to be switched.</para>
      <para>An optional Send-Primacy Parameter inside the AudioOutputConfiguration indicates which direction is currently active.  A client can switch between different modes by setting the AudioOutputConfiguration. </para>
      <para>The following modes for the Send-Primacy are defined:</para>
      <itemizedlist>
        <listitem>
          <para>www.onvif.org/ver20/HalfDuplex/Server The server is allowed to send audio data to the client. The client shall not send audio data via the backchannel to the device in this mode. </para>
        </listitem>
        <listitem>
          <para>www.onvif.org/ver20/HalfDuplex/Client The client is allowed to send audio data via the backchannel to the server. The device shall not send audio data to the client in this mode. </para>
        </listitem>
        <listitem>
          <para>www.onvif.org/ver20/HalfDuplex/Auto It is up to the device how to deal with sending and receiving audio data. </para>
        </listitem>
      </itemizedlist>
      <para>Acoustic echo cancellation is out of ONVIF scope.</para>
    </section>
    <section>
      <title>Stream URI</title>
      <section>
        <title>GetStreamUri</title>
        <para>This operation requests a URI that can be used to initiate a live media stream using RTSP as the control protocol. The returned URI should remain valid indefinitely even if the profile is changed. The InvalidAfterConnect, InvalidAfterReboot and Timeout Parameter should be set accordingly (InvalidAfterConnect=false, InvalidAfterReboot=false, timeout=PT0S). A device shall support the retrieval of a media stream URI for a specific media profile through the GetStreamUri command unless the NoRTSPStreaming capability is set.</para>
        <para>The correct syntax for the StreamSetup element for the media stream setups as defined in 5.1.1 of the ONVIF Streaming Specification are defined in <xref linkend="SetupParameterCombinations" />.</para>
        <table xml:id="SetupParameterCombinations">
          <title>Valid setup parameter conbinations</title>
          <tgroup cols="3">
            <colspec colname="c1" colwidth="52*" />
            <colspec colname="c2" colwidth="21*" />
            <colspec colname="c3" colwidth="26*" />
            <thead>
              <row>
                <entry valign="middle">
                  <para> Mode </para>
                </entry>
                <entry valign="middle">
                  <para> StreamType </para>
                </entry>
                <entry valign="middle">
                  <para> Transport Protocol </para>
                </entry>
              </row>
            </thead>
            <tbody valign="top">
              <row>
                <entry align="left">
                  <para>RTP unicast over UDP</para>
                </entry>
                <entry>
                  <para>RTP_unicast</para>
                </entry>
                <entry>
                  <para>UDP</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>RTP over RTSP over HTTP over TCP</para>
                </entry>
                <entry>
                  <para>RTP_unicast</para>
                </entry>
                <entry>
                  <para>HTTP</para>
                </entry>
              </row>
              <row>
                <entry align="left">
                  <para>RTP over RTSP over TCP</para>
                </entry>
                <entry>
                  <para>RTP_unicast</para>
                </entry>
                <entry>
                  <para>RTSP</para>
                </entry>
              </row>
            </tbody>
          </tgroup>
        </table>
        <para>If a multicast stream is requested at least one of VideoEncoderConfiguration, AudioEncoderConfiguration and MetadataConfiguration shall have a valid multicast setting.</para>
        <para>For full compatibility with other ONVIF services a device should not generate Uris longer than 128 octets.</para>
        <para>On a request for transport protocol http a device shall return a url that uses the same port as the web service. This enables seamless NAT traversal.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">StreamSetup [tt:StreamSetup]</para>
              <para role="text">The StreamSetup element contains two parts. StreamType defines if a unicast or multicast media stream is requested. 
                Transport specifies a chain of transport protocols defining the tunnelling of the media stream over different network protocols.</para>
              <para role="param">ProfileToken [tt:ReferenceToken]</para>
              <para role="text">The ProfileToken element indicates the media profile to use and will define the configuration of the content of the stream.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Uri [xs:anyURI]</para>
              <para role="text">Contains the stable Uri to be used for requesting the media stream as well as parameters defining the lifetime of the Uri. The InvalidAfterConnect and InvalidAfterReboot parameter  shall be set to false, the  timeout parameter shall be set to PT0S to indicate that this stream URI is indefinitelyvalid even if the profile changes. </para>
              <para role="param">InvalidAfterConnect [xs:boolean]</para>
              <para role="text">The parameter shall be set to false.</para> 
              <para role="param">InvalidAfterReboot [xs:boolean]</para>
              <para role="param">Timeout [xs:duration]</para>
              <para role="text">The parameter shall be set to false.</para> 
              <para role="text">The  timeout parameter shall be set to PT0S to indicate that this stream URI is indefinitelyvalid even if the profile changes. </para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The media profile does not exist.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:InvalidStreamSetup</para>
              <para role="text">Specification of StreamType or Transport part in StreamSetup is not supported.</para>
              <para role="param">env:Sender - ter:OperationProhibited - ter:StreamConflict</para>
              <para role="text">Specification of StreamType or Transport part in StreamSetup causes conflict with other streams.</para>
              <para role="param">env:Receiver - ter:Action - ter:IncompleteConfiguration</para>
              <para role="text">The specified media profile does not have the minimum amount of configurations to have streams. Please add at least one source configuration and one matching encoder configuration.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:InvalidMulticastSettings</para>
              <para role="text">No configuration is configured for multicast.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
    </section>
    <section>
      <title>Snapshot</title>
      <section>
        <title>GetSnapshotUri</title>
        <para>A Network client uses the GetSnapshotUri command to obtain a JPEG snhapshot from the device. The returned URI shall remain valid indefinitely even if the profile is changed. The ValidUntilConnect, ValidUntilReboot and Timeout Parameter shall be set accordingly (ValidUntilConnect=false, ValidUntilReboot=false, timeout=PT0S). The URI can be used for acquiring a JPEG image through a HTTP GET operation. </para>
        <para>The image encoding will always be JPEG regardless of the encoding setting in the media profile. The JPEG settings (like resolution or quality) should be taken from the profile if suitable. The provided image shall be updated automatically and independent from calls to GetSnapshotUri.</para>
        <para>A device supporting the media service should support this command. A device shall support this command when the SnapshotUri capability is set to true.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ProfileToken [tt:ReferenceToken]</para>
              <para role="text">The ProfileToken element indicates the media profile to use and will define the source and dimensions of the snapshot.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Uri [xs:anyURI]</para>
              <para role="text">Contains a stable Uri to be used for acquiring a snapshot in JPEG format as well as parameters defining the lifetime of the Uri.</para>
              <para role="param">InvalidAfterConnect [xs:boolean]</para>
              <para role="text">The parameter shall be set to false.</para> 
              <para role="param">InvalidAfterReboot [xs:boolean]</para>
              <para role="text">The parameter shall be set to false.</para> 
              <para role="param">Timeout [xs:duration]</para>
              <para role="text">The  timeout parameter shall be set to PT0S to indicate that this stream URI is indefinitelyvalid even if the profile changes. </para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The media profile does not exist.</para>
              <para role="param">env:Receiver - ter:Action - ter:IncompleteConfiguration</para>
              <para role="text">The specified media profile does not contain either a reference to a video encoder configuration or a reference to a video source configuration.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
    </section>
    <section>
      <title>Multicast</title>
      <para>See the ONVIF Streaming Specification for a detailed discussion of device and client multicast streaming. </para>
      <para>A device supporting multicast streaming (indicated by the RTPMulticast capability) shall support:</para>
      <itemizedlist>
        <listitem>
          <para>multicast RTSP setup, see GetStreamUri section 5.15</para>
        </listitem>
        <listitem>
          <para>web service multicast setup, see StartMulticastStreaming and StopMulticastStreaming</para>
        </listitem>
      </itemizedlist>
      <section>
        <title>StartMulticastStreaming</title>
        <para>This command starts multicast streaming using a specified media profile of a device.  Streaming continues until StopMulticastStreaming is called for the same Profile. The streaming shall continue after a reboot of the device until a StopMulticastStreaming request is received. The multicast address, port and TTL are configured in the VideoEncoderConfiguration, AudioEncoderConfiguration and MetadataConfiguration respectively. </para>
        <para>Multicast streaming may stop when the corresponding profile is deleted or one of its Configurations is altered via one of the set configuration methods.</para>
        <para>The implementation shall ensure that the RTP stream can be decoded without setting up an RTSP control connection. <phrase>Especially in case of H.264 video, the SPS/PPS header shall be sent inband.</phrase></para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ProfileToken [tt:ReferenceToken]</para>
              <para role="text">Contains the token of the Profile that is used to define the multicast stream.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The profile does not exist.</para>
              <para role="param">env:Receiver - ter:Action - ter:IncompleteConfiguration</para>
              <para role="text">The specified media profile does not contain either a reference to a video encoder a video source configuration, to a audio source or  to audio encoder configuration or a reference to a metadata configuration</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>StopMulticastStreaming</title>
        <para>This command stop multicast streaming using a specified media profile of a device. In case that a device receives the StopMulticastStreaming request whose corresponding multicast streaming is not started, the device should reply with successful StopMulticastStreamingResponse.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ProfileToken [tt:ReferenceToken]</para>
              <para role="text">Contains the token of the Profile that is used to define the multicast stream.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The profile does not exist.</para>
              <para role="param">env:Receiver - ter:Action - ter:IncompleteConfiguration</para>
              <para role="text">The specified media profile does not contain either a reference to a video encoder a video source configuration, to a audio source or  to audio encoder configuration or a reference to a metadata configuration</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
    </section>
    <section>
      <title>Synchronization Points</title>
      <section>
        <title>SetSynchronizationPoint</title>
        <para>Synchronization points allow clients to decode and correctly use all data after the synchronization point.</para>
        <para>For example, if a video stream is configured with a large I-frame distance and a client loses a single packet, the client does not display video until the next I-frame is transmitted. In such cases, the client can request a Synchronization Point which enforces the device to add an I-frame as soon as possible. Clients can request Synchronization Points for profiles. The device shall add synchronization points for all streams associated with this profile.</para>
        <para>Similarly, a synchronization point is used to get an update on full PTZ or event status through the metadata stream.</para>
        <para>If a video stream is associated with the profile, an I-frame shall be added to this video stream. If an event stream is associated to the profile, the synchronization point request shall be handled as described in the section “Synchronization Point” of the ONVIF Core Specification). If a PTZ metadata stream is associated to the profile, the PTZ position shall be repeated within the metadata stream. </para>
        <para>A device that supports MPEG-4 or H.264 shall support the request for an I-frame through the SetSynchronizationPoint command unless the NoRTSPStreaming capability is set.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">ProfileToken [tt:ReferenceToken]</para>
              <para role="text">Contains a Profile reference for which a Synchronization Point is requested.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoProfile</para>
              <para role="text">The profile does not exist.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
    </section>
    <section>
      <title>Video source mode</title>
      <para>A device can have the capability for changing video source mode which means a unit which can indicate media profile structure of video sensor in same time. In case that device indicate the capability for video source mode, the configured video source mode is relating to only current media profile structure for video source, video source configuration and video encoder configuration. After setting video source mode a client can see the detail information of settable configuration for the video source configuration and the video encoder configuration from GetVideoSourceConfigurationOptions and GetVideoEncoderConfigurationOptions commands. In other words the possible configuration of un-setting mode is not seen from any commands, so GetVideoSourceModes command provides summary information of possible configuration including video encoder.</para>
      <section>
        <title>GetVideoSourceModes</title>
        <para>A device returns the information for current video source mode and settable video source modes of specified video source. A device that indicates a capability of  VideoSourceMode shall support this command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">VideoSourceToken [tt:ReferenceToken]</para>
              <para role="text">The request message specifies video source.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">VideoSouceMode - unbounded [trt:VideoSourceMode]</para>
              <para role="text">The response contains list of mode information for seeing capabilities of video source.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoVideoSource</para>
              <para role="text">The requested video source does not exist.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_SYSTEM</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>SetVideoSourceMode</title>
        <para>SetVideoSourceMode changes the media profile structure relating to video source for the specified video source mode. A device that indicates a capability of VideoSourceMode shall support this command. The behavior after changing the mode is not defined in this specification.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">VideoSourceToken [tt:ReferenceToken]</para>
              <para role="text">The request message specifies video source.
</para>
              <para role="param">VideoSourceModeToken [tt:ReferenceToken]</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Reboot [xs:boolean]</para>
              <para role="text">The response contains information about rebooting after returning response. When Reboot is set “true”, a device will reboot automatically after setting mode. 
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoVideoSource</para>
              <para role="text">The requested video source does not exist. </para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoVideoSourceMode</para>
              <para role="text">The requested video source mode does not exist.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">WRITE_SYSTEM</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
    </section>
    <section>
      <title>OSD (On-Screen Display)</title>
      <para>The OSD service provides functions to enable a client to control and configure On-Screen Display of a device. The service introduces the OSD configuration with multiple types (e.g., image, text, date, and time). Also functions to retrieve and configure the configurations are provided. All OSD configurations are related to a VideoSourceConfiguration which will display the content of OSD.</para>
      <figure>
        <title>Example of screen which have four OSD configurations and coordinate system</title>
        <mediaobject>
          <imageobject>
            <imagedata fileref="media/Media2/image3.svg" contentwidth="119.25mm" />
          </imageobject>
        </mediaobject>
      </figure>
      <para>Device supporting temporary OSDTextConfiguration, shall notify TemporaryOSDText capability as defined in Section <xref linkend="_Ref484170171" />. Device shall by default make all OSDTextConfigurations as persistent across reboot, but when IsPersistentText attribute in OSDTextConfiguration is set as false, OSD text content shall be cleared after reboot. OSDConfiguration shall still be valid after reboot.</para>
      <section>
        <title>CreateOSD</title>
        <para>This operation creates a new OSD configuration with specified values and also make the association between  the new OSD and an existing VideoSourceConfiguration identified by the VideoSourceConfigurationToken. Any value required by a device for a new OSD configuration that is optional and not present in the CreateOSD message may be adapted to the appropriate value by the device. The OSD shall be created in the device and shall be persistent (remain after reboot). A device that indicates OSD capability shall support the creation of OSD as long as the number of existing OSDs does not exceed the  value of MaximumNumberOfOSDs in GetOSDOptions. </para>
        <para>When creating a OSDTextConfiguration, if the IsPersistentText attribute is missing, device shall assume IsPersistentText  attribute as true.</para>
        <para>A created OSD shall be deletable.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">OSD [tt:OSDConfiguration]</para>
              <para role="text">Contains a new OSD configuration with the specified value. The device is responsible for assigning OSD token. OSD token in CreateOSDRequest can be ignored.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Token [xs:string]</para>
              <para role="text">Return the newly created OSD token.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Receiver - ter:Action - ter:MaxOSDs</para>
              <para role="text">The maximum number of supported OSDs by the specific VideoSourceConfiguration has been reached. </para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>DeleteOSD</title>
        <para>This operation deletes an OSD. This change shall always be persistent. The device shall support the deletion of an OSD through the DeleteOSD command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">OSDToken [tt:ReferenceToken]</para>
              <para role="text">The request message contains an OSD token that indicate which OSD shall be deleted 
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The requested OSD token OSDToken does not exist. </para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>GetOSDs</title>
        <para>This operation lists all existing OSD configurations for the device. The device shall support the listing of existing OSD configurations through the GetOSDs command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">VideoSourceConfigurationToken optional [tt:ReferenceToken]</para>
              <para role="text">The request message specifies the VideoSourceConfiguration token for which the OSD should be associated with.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">OSD - optional, unbounded [tt:OSDConfiguration]</para>
              <para role="text">The response contains a list of requested OSD for the video source configuration; If no VideoSourceConfiguration token specified, just return all OSDs. If a device has no OSD for specified VideoSourceConfiguration an empty list is returned.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The requested configuration indicated with VideoSourceConfigurationToken does not exist.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>GetOSD</title>
        <para>If the OSD configuration token is already known, the OSD configuration can be fetched through the GetOSD command. The device shall support retrieval of specific OSD configurations through the GetOSD command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">OSDToken [tt:ReferenceToken]</para>
              <para role="text">This message contains the token of the requested OSD.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">OSD [tt:OSDConfiguration]</para>
              <para role="text">The message contains the requested OSD with the matching token.
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The requested configuration indicated with OSDToken does not exist. </para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>SetOSD</title>
        <para>This operation modifies an OSD configuration. Running streams using this configuration may be immediately updated according to the new settings. The device shall support the modification of OSD parameters through the SetOSD command.</para>
        <para>A device shall accept any combination of parameters returned by GetOSDOptions. If necessary the device may adapt parameter values for  FontColor, FontSize, and BackgroundColor elements without returning an error.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">OSD [tt:OSDConfiguration]</para>
              <para role="text">The OSD element contains the modified OSD configuration. The Configuration contains an element that specifies the OSD whose configuration is to be modified. The OSD shall exist in the device
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The requested OSD does not exist</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:ConfigModify</para>
              <para role="text">The configuration parameters are not possible to set.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>GetOSDOptions</title>
        <para>This operation returns the available options when the OSD parameters are reconfigured. The device shall support the listing of available OSD parameter options (for a given video source  configuration) through the GetOSDOptions command. Any combination of the parameters obtained using a given video source configuration shall be a valid input for the corresponding SetOSD command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">VideoSourceConfigurationToken [tt:ReferenceToken]</para>
              <para role="text">The VideoSourceConfigurationToken element specifies the video source configuration of which the sutiable OSD options are requested. The VideoSourceConfigurationToken shall exist in the device
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Options [tt:OSDConfigurationOptions]</para>
              <para role="text">This message contains the OSD options which is suitable for the video source configuration specified in the request
</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
              <para role="text">The requested video source configuration does not exist</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_MEDIA</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
    </section>
    <section xml:id="_Ref484170171">
      <title>GetServiceCapabilities</title>
      <para>The capabilities reflect optional functions and functionality of a service. The information is static and does not change during device operation.</para>
      <variablelist role="op">
        <varlistentry>
          <term>request</term>
          <listitem>
            <para role="text">This is an empty message.</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>response</term>
          <listitem>
            <para role="param">trt: Capabilities Capabilities [1][1]</para>
            <para role="text">The capability response message contains the requested service capabilities using a hierarchical XML capability structure. 
</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>faults</term>
          <listitem>
            <para role="text">No command specific faults defined.</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>access class</term>
          <listitem>
            <para role="access">PRE_AUTH</para>
          </listitem>
        </varlistentry>
      </variablelist>
      <para>The following capabilites are available:</para>
      <variablelist>
        <varlistentry>
          <term>RTPMulticast</term>
          <listitem><para>Indication of support of UDP multicasting as described in Section 5.17. </para></listitem>
        </varlistentry>
        <varlistentry>
          <term>RTP_TCP</term>
          <listitem><para>Indication if the device supports RTP over TCP, see Section 5.1.1.2 of the
            ONVIF Streaming Specificiation.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>RTP_RTSP_TCP</term>
          <listitem><para>Indication if the device supports RTP/RTSP/TCP transport, see Section
            5.1.1.3 of the ONVIF Streaming Specificiation.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>NonAggregateControl</term>
          <listitem><para>Indicates support for non aggregate RTSP control as described in
            section 5.2.1.1 of the ONVIF Streaming Specification.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>NoRTSPStreaming</term>
          <listitem><para>Indicates the device does not support live media streaming via RTSP.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>MaximumNumberOfProfiles</term>
          <listitem><para>The maximum Number of MediaProfiles the device supports.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>SnapshotUri</term>
          <listitem><para>Indicates the support for GetSnapshotUri.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>Rotation</term>
          <listitem><para>Indicates the support for the Rotation feature.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>VideoSourceMode</term>
          <listitem><para>Indicates the support for changing video source mode<phrase>.</phrase></para></listitem>
        </varlistentry>
        <varlistentry>
          <term>OSD</term>
          <listitem><para>Indication of support of OSD feature<phrase>.</phrase></para></listitem>
        </varlistentry>
        <varlistentry>
          <term>TemporaryOSDText</term>
          <listitem><para>Indiates the support for temporary osd text configuration.</para></listitem>
        </varlistentry>
      </variablelist>
    </section>
    <section>
      <title>Events</title>
      <section>
        <title>Configuration Change</title>
        <para>A device should provide an event to inform subscribed clients when important configurations in the devices change. An ONVIF compliant device shall use the topics defined in the following sections associated with the respective message description. </para>
        <section>
          <title>Profile</title>
          <para>Whenever a change in the profiles of a device supporting the media service occurs the device should provide the following event. The Profile change could be caused by Creation or Deletion of a Profile or by Adding or Removing a Configuration to or from a Profile.</para>
          <para>Topic: tns1:Configuration/Profile</para>
          <programlisting><![CDATA[<tt:MessageDescription>
  <tt:Source>
    <tt:SimpleItemDescription Name="Token" Type="tt:ReferenceToken"/>
  </tt:Source>
  <tt:Data>
    <tt:ElementItemDescription Name="Configuration" Type="tt:Profile"/>
  </tt:Data>
</tt:MessageDescription>
]]></programlisting>
        </section>
        <section>
          <title>VideoEncoderConfiguration</title>
          <para>Whenever a VideoEncoderConfiguration of a device changes the device should provide the following event:</para>
          <para>Topic: tns1:Configuration/VideoEncoderConfiguration</para>
          <programlisting><![CDATA[<tt:MessageDescription>
  <tt:Source>
    <tt:SimpleItemDescription Name="Token" Type="tt:ReferenceToken"/>
  </tt:Source>
  <tt:Data>
    <tt:ElementItemDescription Name="Configuration"  	Type="tt:VideoEncoderConfiguration"/>
  </tt:Data>
</tt:MessageDescription>
]]></programlisting>
        </section>
        <section>
          <title>VideoSourceConfiguration</title>
          <para>Whenever a VideoSourceConfiguration of a device changes the device should provide the following event:</para>
          <para>Topic: ns1:Configuration/VideoSourceConfiguration/MediaService</para>
          <programlisting><![CDATA[<tt:MessageDescription>
  <tt:Source>
    <tt:SimpleItemDescription Name="Token" Type="tt:ReferenceToken"/>
  </tt:Source>
  <tt:Data>
    <tt:ElementItemDescription Name="Configuration"  	Type="tt:VideoSourceConfiguration"/>
  </tt:Data>
</tt:MessageDescription>
]]></programlisting>
        </section>
        <section>
          <title>VideoOutputConfiguration</title>
          <para>Whenever a VideoOutputConfiguration of a device changes the device should provide the following event:</para>
          <para>Topic: tns1:Configuration/VideoOutputConfiguration/MediaService</para>
          <programlisting><![CDATA[<tt:MessageDescription>
  <tt:Source>
    <tt:SimpleItemDescription Name="Token" Type="tt:ReferenceToken"/>
  </tt:Source>
  <tt:Data>
    <tt:ElementItemDescription Name="Configuration"  	Type="tt:VideoOutputConfiguration"/>
  </tt:Data>
</tt:MessageDescription>
]]></programlisting>
        </section>
        <section>
          <title>AudioEncoderConfiguration</title>
          <para>Whenever an AudioEncoderConfiguration of a device changes the device should provide the following event:</para>
          <para>Topic tns1:Configuration/AudioEncoderConfiguration</para>
          <programlisting><![CDATA[<tt:MessageDescription>
  <tt:Source>
    <tt:SimpleItemDescription Name="Token" Type="tt:ReferenceToken"/>
  </tt:Source>
  <tt:Data>
    <tt:ElementItemDescription Name="Configuration"  	Type="tt:AudioEncoderConfiguration"/>
  </tt:Data>
</tt:MessageDescription>
]]></programlisting>
        </section>
        <section>
          <title>AudioSourceConfiguration</title>
          <para>Whenever an AudioSourceConfiguration of a device changes the device should provide the following event:</para>
          <para>Topic tns1:Configuration/AudioSourceConfiguration/MediaService</para>
          <programlisting><![CDATA[<tt:MessageDescription>
  <tt:Source>
    <tt:SimpleItemDescription Name="Token" Type="tt:ReferenceToken"/>
  </tt:Source>
  <tt:Data>
    <tt:ElementItemDescription Name="Configuration"  	Type="tt:AudioSourceConfiguration"/>
  </tt:Data>
</tt:MessageDescription>
]]></programlisting>
        </section>
        <section>
          <title>AudioOutputConfiguration</title>
          <para>Whenever an AudioOutputConfiguration of a device changes the device should provide the following event:</para>
          <para>Topic: tns1:Configuration/AudioOutputConfiguration/MediaService</para>
          <programlisting><![CDATA[<tt:MessageDescription>
  <tt:Source>
    <tt:SimpleItemDescription Name="Token" Type="tt:ReferenceToken"/>
  </tt:Source>
  <tt:Data>
    <tt:ElementItemDescription Name="Configuration"  	Type="tt:AudioOutputConfiguration"/>
  </tt:Data>
</tt:MessageDescription>
]]></programlisting>
        </section>
        <section>
          <title>MetadataConfiguration</title>
          <para>Whenever a MetadataConfiguration of a device changes the device should provide the following event:</para>
          <para>Topic: tns1:Configuration/MetadataConfiguration</para>
          <programlisting><![CDATA[<tt:MessageDescription>
  <tt:Source>
    <tt:SimpleItemDescription Name="Token" Type="tt:ReferenceToken"/>
  </tt:Source>
  <tt:Data>
    <tt:ElementItemDescription Name="Configuration"  	Type="tt:MetadataConfiguration"/>
  </tt:Data>
</tt:MessageDescription>
]]></programlisting>
        </section>
        <section>
          <title>PTZ Configuration</title>
          <para>Whenever a PTZConfiguration of a PTZ capable device changes the device should provide the following event:</para>
          <para>Topic: tns1:Configuration/PTZConfiguration</para>
          <programlisting><![CDATA[<tt:MessageDescription>
  <tt:Source>
    <tt:SimpleItemDescription Name="Token" Type="tt:ReferenceToken"/>
  </tt:Source>
  <tt:Data>
    <tt:ElementItemDescription Name="Configuration" Type="tt:PTZConfiguration"/>
  </tt:Data>
</tt:MessageDescription>
]]></programlisting>
        </section>
        <section>
          <title>VideoAnalyticsConfiguration</title>
          <para>Whenever a VideoAnalyticsConfiguration of device changes the device should provide the following event:</para>
          <para>Topic: tns1:Configuration/VideoAnalyticsConfiguration</para>
          <programlisting><![CDATA[<tt:MessageDescription>
  <tt:Source>
    <tt:SimpleItemDescription Name="Token" Type="tt:ReferenceToken"/>
  </tt:Source>
  <tt:Data>
    <tt:ElementItemDescription Name="Configuration"  	Type="tt:VideoAnalyticsConfiguration"/>
  </tt:Data>
</tt:MessageDescription>
]]></programlisting>
        </section>
      </section>
      <section>
        <title>Active Connections</title>
        <para>A device that supports the media service should provide the “Active Connections” monitoring event to inform a client about the current usage of its Media Profiles. An ONVIF compliant device shall use the following topic and message format:</para>
        <para>Topic: tns1:Monitoring/Profile/ActiveConnections</para>
        <programlisting><![CDATA[<xs:complexType name="ProfileStatus">
  <xs:sequence>
    <xs:element name="ActiveConnections" type="tt:ActiveConnection" minOccurs="0"  	maxOccurs="unbounded"/>
    <xs:element name="Extension" type="tt:ProfileStatusExtension" minOccurs="0" />
  </xs:sequence>
</xs:complexType>
<xs:complexType name="ActiveConnection">
  <xs:sequence>
    <xs:element name="CurrentBitrate" type="xs:float"/>
    <xs:element name="CurrentFps" type="xs:float"/>
    <xs:any namespace="##any" processContents="lax" minOccurs="0"  	maxOccurs="unbounded"/>
  </xs:sequence>
</xs:complexType>
<tt:MessageDescription IsProperty="true">
  <tt:Source>
    <tt:SimpleItemDescription Name="Profile" Type="tt:ReferenceToken"/>
  </tt:Source>
  <tt:Data>
    <tt:ElementItemDescription Name="Status" Type="tt:ProfileStatus"/>
  </tt:Data>
</tt:MessageDescription>
]]></programlisting>
        <para>NOTE: Active Connections Event is deprecated and its replaced by Active Sessions Event.</para>
      </section>
      <section>
        <title>Active Sessions</title>
        <para>A device that supports the media service should provide the "Active Sessions" monitoring events to inform a client about the current usage of its Media Streams. The monitoring events are sent every time a client connects to or disconnects from a unicast stream. An ONVIF compliant device shall use the following topics and message format:</para>
        <programlisting><![CDATA[Topics: tns1:Monitoring/ActiveSessions/VideoEncoder
tns1:Monitoring/ActiveSessions/AudioEncoder
tns1:Monitoring/ActiveSessions/AudioDecoder
tns1:Monitoring/ActiveSessions/Metadata
<tt:MessageDescription IsProperty="true">
  <tt:Source>
    <tt:SimpleItemDescription Name="Token" Type="tt:ReferenceToken"/>
  </tt:Source>
  <tt:Data>
    <tt:SimpleItemDescription Name="Sessions" Type="tt:StringAttrList"/>
  </tt:Data>
</tt:MessageDescription>
]]></programlisting>
        <para>Token refers to the appropriate Video Encoder Configuration, Audio Encoder Configuration, Audio Decoder Configuration, or Metadata Configuration token.</para>
        <para>Sessions is a space-delimited list of IPv4 and/or IPv6 addresses of active streaming clients. Multiple clients at an IP address, regardless of streaming protocol, shall be repeated once for every client. Sort order of the list is not defined.</para>
        <para>When the first session associated with an encoding resource connects, the event type is Initialized. When all sessions associated with an encoding resource have disconnected, the event type is Deleted.</para>
        <para>Example of event for a Video Encoder Configuration with a stream to IPv4 10.220.232.202 and a stream to IPv6 fc80::2934:4e3e:e559:83e9, and then connecting a second stream to 10.220.232.202 (order of Sessions list is undefined; these addresses can appear in any order, but 10.220.232.202 shall appear twice to represent the two streams):</para>
        <programlisting><![CDATA[<wsnt:Topic Dialect="...">
  tns1:Monitoring/ActiveSessions/VideoEncoder
</wsnt:Topic>
<wsnt:Message>
  <tt:Message UtcTime="..." PropertyOperation="Changed">
    <tt:Source>
      <tt:SimpleItem Name="Token" Value="vec0" />
    </tt:Source>
    <tt:Data>
      <tt:SimpleItem Name="Sessions"
        Value="10.220.232.202 fc80::2934:4e3e:e559:83e9 10.220.232.202" />
    </tt:Data>
  </tt:Message>
</wsnt:Message>
]]></programlisting>
        <para>Example of event for a Metadata Configuration when connecting its first active stream to IPv4 10.220.232.202:</para>
        <programlisting><![CDATA[<wsnt:Topic Dialect="...">
  tns1:Monitoring/ActiveSessions/Metadata
</wsnt:Topic>
<wsnt:Message>
  <tt:Message UtcTime="..." PropertyOperation="Initialized">
    <tt:Source>
      <tt:SimpleItem Name="Token" Value="af16a847-cd62-4923-9ccd-3108a16afaee" />
    </tt:Source>
    <tt:Data>
      <tt:SimpleItem Name="Sessions" Value="10.220.232.202" />
    </tt:Data>
  </tt:Message>
</wsnt:Message>
]]></programlisting>
        <para>Example of event for an Audio Encoder Configuration when all active connections are closed:</para>
        <programlisting><![CDATA[<wsnt:Topic Dialect="...">
  tns1:Monitoring/ActiveSessions/AudioEncoder
</wsnt:Topic>
<wsnt:Message>
  <tt:Message UtcTime="..." PropertyOperation="Deleted">
    <tt:Source>
      <tt:SimpleItem Name="Token" Value="audio" />
    </tt:Source>
    <tt:Data>
      <tt:SimpleItem Name="Sessions" Value="" />
    </tt:Data>
  </tt:Message>
</wsnt:Message>
]]></programlisting>
      </section>
    </section>
  </chapter>
  <appendix>
    <title>Bibliography</title>
    <para>[ONVIF Display WSDL] ONVIF Media WSDL, ver 2.0, 2010.</para>
    <programlisting><![CDATA[URL:http://www.onvif.org/onvif/ver10/network/wsdl/media.wsdl
]]></programlisting>
    <para>[ONVIF Schema] ONVIF Schema, ver 2.0, 2010.</para>
    <programlisting><![CDATA[URL:http://www.onvif.org/onvif/ver10/schema/onvif.xsd
]]></programlisting>
    <para>[ONVIF Topic Namespace] ONVIF Topic Namespace XML, ver 2.0, 2010.</para>
    <programlisting><![CDATA[URL:http://www.onvif.org/onvif/ver10/topics/topicns.xml
]]></programlisting>
  </appendix>
  <appendix role="revhistory">
    <title>Revision History</title>
    <para />
  </appendix>
</book>
