<?xml version="1.0" encoding="utf-8"?>
<audio-profiles>
  <profiles>
    <profile id="wavpack">
      <_name>Wavpack</_name>
      <_description>A fast and efficient open source audio format offering lossless and high-quality lossy encoding with great dynamic range.</_description>
      <output-file-extension>wv</output-file-extension>
      <mimetype>audio/x-wavpack</mimetype>
      <mimetype>application/x-apetag</mimetype>
      <mimetype>taglib/ape</mimetype>
      <mimetype>audio/x-ape</mimetype>
      <pipeline>
        <process id="gstreamer">
        <![CDATA[
            (gst-construct-pipeline
                "audioconvert" 
                (gst-construct-element "wavpackenc"
                    "mode" mode
                    (if (cast-bool lossy_mode)
                        ("bitrate" (* bitrate 1000)))
                    "md5" (cast-bool md5_sum)
                    "extra-processing" extra_processing)
                (if (gst-element-is-available "apev2mux")
                    "apev2mux"
                    (if (gst-element-is-available "id3v2mux")
                        "id3v2mux"
                        "id3mux")))
        ]]>
        </process>
        <variable id="mode">
          <_name>Mode</_name>
          <control-type>combo</control-type>
          <default-value>2</default-value>
          <possible-values>
            <_value value="1">Fast Compression</_value>
            <_value value="2">Default Compression</_value>
            <_value value="3">High Compression</_value>
            <_value value="4">Very High Compression</_value>
          </possible-values>
        </variable>
        <variable id="lossy_mode" enables="bitrate">
          <_name>Lossy mode</_name>
          <control-type>check</control-type>
          <default-value>0</default-value>
        </variable>
        <variable id="md5_sum">
          <_name>Store MD5 sum in the file</_name>
          <control-type>check</control-type>
          <default-value>0</default-value>
        </variable>
        <variable id="extra_processing">
          <_name>Extra processing</_name>
          <control-type>slider</control-type>
          <default-value>0</default-value>
          <min-value>0</min-value>
          <_min-label>Default</_min-label>
          <max-value>6</max-value>
          <_max-label>Highest</_max-label>
          <step-value>1</step-value>
        </variable>
        <variable id="bitrate">
          <_name>Bitrate</_name>
          <control-type>slider</control-type>
          <default-value>260</default-value>
          <min-value>24</min-value>
          <_min-label>Worst</_min-label>
          <max-value>9600</max-value>
          <_max-label>Best</_max-label>
          <step-value>32</step-value>
        </variable>
      </pipeline>
    </profile>
  </profiles>
</audio-profiles>
