IEDirectShow class allows control of some Direct Show features, such as video capture, audio capture, multimedia files capture as well video rendering, and multimedia file writing.

Namespace: HiComponents.IEvolution
Assembly: IEvolution2 (in IEvolution2.dll) Version: 10.1.0.0

Syntax

         
 C#  Visual Basic  Visual C++ 
public class IEDirectShow
Public Class IEDirectShow
public ref class IEDirectShow

Members

         
 All Members  Properties   Methods  
 Public

 Protected
 Instance

 Static 
 Declared

 Inherited
 XNA Framework Only 

 .NET Compact Framework Only 

 MemberDescription
ClockErrorTolerance
Sets the maximum tolerance, in milliseconds, of the audio renderer. The value must be from 1 to 1000, inclusive.
Connect()()()()

Connects to the specified video input or multimedia file. This makes a DirectShow graph which needs to be activated with Run in order to make it active.

Several methods and properties work only after Connect has been successfully called.

Connected
Returns true when connected to the video input or multimedia file.
ConvertTimeFormat(Int64, IEDirectShow..::..IETimeFormat, IEDirectShow..::..IETimeFormat)
Converts from a time format to another one.
Disconnect()()()()
Disconnects from the specified video input or multimedia file.
Duration
Returns the duration of the stream (multimedia file) in a format specified by TimeFormat property.
DVDActivateButton()()()()
Press a button in DVD menu. To select a position call DVDSelectAt.
DVDGetProperty(String)

Read a property from current DVD. This method can return current DVD position and some other properties like number of titles and chapters.

"NumOfVolumes" : Returns number of volumes

"Volume" : Returns current used volume

"Side" : Returns current side (1 or 2)

"NumOfTitles" : Returns number of titles

"DiscID" : Returns system-generated 64-bit "unique" identification number for the specified DVD

"NumOfChapters" : Returns number of chapters of the specified title (specify title in SubProp parameter)

"Title" : Returns current title

"Chapter" : Returns current chapter

"Time" : Returns current time using format like "HH:MM:SS:FF", where FF is frame in current second.

"TotalTitleTime" : Retrieves the total playback time for the current title.

DVDGetProperty(String, String)

Read a property from current DVD. This method can return current DVD position and some other properties like number of titles and chapters.

"NumOfVolumes" : Returns number of volumes

"Volume" : Returns current used volume

"Side" : Returns current side (1 or 2)

"NumOfTitles" : Returns number of titles

"DiscID" : Returns system-generated 64-bit "unique" identification number for the specified DVD

"NumOfChapters" : Returns number of chapters of the specified title (specify title in SubProp parameter)

"Title" : Returns current title

"Chapter" : Returns current chapter

"Time" : Returns current time using format like "HH:MM:SS:FF", where FF is frame in current second.

"TotalTitleTime" : Retrieves the total playback time for the current title.

DVDInputPath
Specifies the driver letter of DVD reader. You can set 'Default' to select default DVD reader.
DVDPlayAdvanced(Boolean, Double)
Change the speed and direction of playing.
DVDPlayAt(Int32, Int32)

Starts playback from the beginning of the specified chapter of the specified title.

You can know the number of Chapters and Titles (and the current position) calling DVDGetProperty method.

DVDPlayAt(Int32, Int32, Int32, Int32, Int32)
Starts playback from specified title and time.
DVDSelectAt(Int32, Int32)
Select a button in DVD menu, at specified position. To actually press the button call DVDActivateButton.
DVDShowMenu(IEDirectShow..::..IEDVDMenu)
Displays the specified menu, if available.
EnableSampleGrabber

If EnableSampleGrabber is True, then an event occurs whenever a new frame is available.

The event is IEViewer.DShowNewFrame.

EndOfStream
EndOfStream tests whether the file position is at the end of a file.
Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
FileInput
If you don't want get video from a capture card, but just from a file, you have to set FileInput property with a full path name and a multimedia file.
FileOutput
Specifies the full path of the output multimedia file.
Finalize()()()()
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
GetAudioCodecs(Int32)
Contains a list of audio codecs available.
GetAudioCodecsCount
Returns number of audio codecs available.
GetAudioInputs(Int32)
Contains a list of audio inputs available.
GetAudioInputsCount
Returns number of audio inputs available.
GetAverageTimePerFrame()()()()
Returns, when available, the number of milliseconds for each frame.
GetCurrentVideoFormat()()()()
Allows to set the video format pixel type. You can know supported formats reading GetVideoFormats method.
GetCurrentVideoFormatHeight()()()()
Allows to set the video format height. You can know supported formats reading GetVideoFormats method.
GetCurrentVideoFormatWidth()()()()
Allows to set the video format width. You can know supported formats reading GetVideoFormats method.
GetEventCode()()()()

Read current event obtained from DirectShow.

A DShowEvent occurs whenever there is an event available.

GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetSample()()()()

Copies current sample in current image.

You can call this method inside a DShowNewFrame event or anywhere you want (for example, on response to a timer event).

GetSample(IEImage)

Copies current sample the specified image.

You can call this method inside a DShowNewFrame event or anywhere you want (for example, on response to a timer event).

GetSupportedTVStandards(Int32)

Returns a set of supported tv standards (NTSC, Pal,...).

This function is useful to know supported standard before call SetTVStandard.

GetSupportedTVStandardsCount()()()()
Allows to know number of supported TV standards.
GetType()()()()
Gets the Type of the current instance.
(Inherited from Object.)
GetVideoCodecs(Int32)
Contains a list of video codecs available.
GetVideoCodecsCount
Returns number of video codecs available.
GetVideoFormats(Int32)

VideoFormats contains a list of available video formats.

A video format specifies the frame width, height and other info.

GetVideoFormatsCount()()()()
GetVideoFormatsCount specifies the GetVideoFormats list size.
GetVideoInputs(Int32)
Contains a list of video inputs available.
GetVideoInputsCount
Returns number of video inputs available.
GetVideoInputSources(Int32)

Contains a list of video input sources available for selected video input.

A video input source is a line input, like Video-Composite, Tuner, etc.

GetVideoInputSourcesCount

Returns number of video input sources available for selected video input.

A video input source is a line input, like Video-Composite, Tuner, etc.

GetVideoRenderNativeHeight()()()()

Returns the video frame height when RenderVideo is true.

You should set the background bitmap to the same size.

GetVideoRenderNativeWidth()()()()

Returns the video frame width when RenderVideo is true.

You should set the background bitmap to the same size.

MemberwiseClone()()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
Pause()()()()
This is used to pause the graph.
Position
Returns the stream (multimedia file) position in a format specified by TimeFormat property.
Rate

Specifies the frame rate where Rate is:

1 = normal speed

2 = double speed

0.5 = half speed

Not all devices support this property. Important. The Rate does NOT set or get the number of frames per second (FPS).

To save a movie originally shot at 30 fps to.15 fps set the rate to 0.5.

The Rate can only be set if the if the file is running or is paused.

ReferenceClock

Specifies the source of reference clock.

You should change it when audio and video aren't synchronized.

When RenderAudio and RenderVideo are true, it is suggested to set ReferenceClock=AudioOutput.

RenderAudio

If True renders the audio stream to the default audio renderer.

Sometimes audio is not synchronized with video. To get audio/video synchronized we should interact directly with hardware devices, but this will loss compatibility.

Anyway you could try to play with ReferenceClock and ClockErrorTolerance properties to get better synchronization.

RenderVideo

When true the video input (from capture card, file or dvd) is displayed inside the component area.

This functionality is available only starting from Windows XP.

Run()()()()
After calling Connect you have to run the graph. This starts video capture or file capture.
SaveGraph(String)

This method is useful to debug the filter graph built using Connect.

The file must have 'grf' extension and can be read using GraphEdit utility (you can get this from the Microsoft DirectShow SDK).

SetAudioCodec(Int32)
Allows selection of an audio codec. You can get an index from GetAudioCodec method.
SetAudioInput(Int32)
Allows selection of an audio input. You can get an index from GetAudioInputs method.
SetAudioInput(Int32, Int32)
Allows selection of an audio input. You can get an index from GetAudioInputs method.
SetCurrentVideoFormat(Int32, Int32, String)
Allows to set the video format. You can know supported formats calling GetVideoFormats method.
SetTVStandard(IEDirectShow..::..IETVStandard)
Sets the input tv standard. To know supported tv standards use GetSupportedTVStandards.
SetVCRHorizontalLocking(Boolean)
Specifies behavior capturing frames.
SetVideoCodec(Int32)
Allows selection of a video codec. You can get an index from GetVideoCodec method.
SetVideoInput(Int32, Int32, Int32, Int32, String, Int32)
Allows selection of a video input. You can get an index from VideoInputs property
ShowPropertyPages(IEDirectShow..::..IEPropertyPages, IEDirectShow..::..IEPropertyPagesType)
Shows a dialog for the specified filter of the filter graph.
ShowPropertyPages(IEDirectShow..::..IEPropertyPages, IEDirectShow..::..IEPropertyPagesType, Boolean)
Shows a dialog for the specified filter of the filter graph.
State

State property returns the current state of the graph.

This property allows to know if DirectShow has running, is stopped, etc.

Step(Int32)
Go forward for specified number of frames.
Stop()()()()
This is used to stop the graph's execution.
TimeFormat
Specifies the time format for Position and Duration properties.
ToString()()()()
Returns a string that represents the current object.
(Inherited from Object.)
TunerChannel
Sets the channel when the video input source is a TV Tuner.
TunerFindSignal()()()()
Looks for a tuner signal.
VideoCodecQuality
Specifies the video compression codec quality. Not all codecs support this property.
VideoInputSource

Specifies the video input source. A video input source is a line input, like Video-Composite, Tuner, etc.

You can get an index from GetVideoInputSources method.

Inheritance Hierarchy

System..::..Object
  HiComponents.IEvolution..::..IEDirectShow

See Also