Source

gnome-record-screen / GNOME-Record-Screen / src / AudioEncoder.cs

Full commit
/**
 * AudioEncoders.cs
 *
 * :copyright: 2008 mitsuhiko.
 * :license: BSD
 */

using System;
using Gnome.RecordScreen.Implementations;

namespace Gnome.RecordScreen {
	
	public enum AudioQuality {
		Low,
		Medium,
		High
	}
	
	public class AudioEncoder : IEncoder {
		private string gstKey;
		
		public AudioEncoder (string gstKey)
		{
			this.gstKey = gstKey;
		}
		
		public virtual string GetEncoderArguments (AudioQuality quality) {
			return null;
		}
		
		public string GstKey {
			get { return gstKey; }
		}
		
		public virtual bool IsAvailable {
			get { return GStreamerInterface.SupportsObject (this); }
		}
		
		private static AudioEncoder vorbis = new VorbisAudioEncoder ();
		public static AudioEncoder Vorbis {
			get { return vorbis; }
		}
		
		private static AudioEncoder mp3 = new Mp3AudioEncoder ();
		public static AudioEncoder Mp3 {
			get { return mp3; }
		}
		
		public static AudioEncoder nullenc = new NullAudioEncoder ();
		public static AudioEncoder Null {
			get { return nullenc; }
		}
	}
}