// ------------------------------------------------------------------
// DirectX.Capture
//
// History:
// 2003-Jan-24 BL - created
//
// Copyright (c) 2003 Brian Low
// ------------------------------------------------------------------
using System;
using System.Runtime.InteropServices;
using DShowNET;
namespace DirectX.Capture
{
///
/// Represents a physical connector or source on an audio/video device.
///
public class Source : IDisposable
{
// --------------------- Private/Internal properties -------------------------
protected string name; // Name of the source
// ----------------------- Public properties -------------------------
/// The name of the source. Read-only.
public string Name { get { return( name ); } }
/// Obtains the String representation of this instance.
public override string ToString() { return( Name ); }
/// Is this source enabled.
public virtual bool Enabled
{
get { throw new NotSupportedException( "This method should be overriden in derrived classes." ); }
set { throw new NotSupportedException( "This method should be overriden in derrived classes." ); }
}
// -------------------- Constructors/Destructors ----------------------
/// Release unmanaged resources.
~Source()
{
Dispose();
}
// -------------------- IDisposable -----------------------
/// Release unmanaged resources.
public virtual void Dispose()
{
name = null;
}
}
}