WMEncStreamEdit.Validate
![]() |
The Validate method indicates whether the current settings in the stream edit session are valid.
Syntax
WMEncStreamEdit.Validate
Parameters
This method takes no parameters.
Return Values
If this method fails, it returns an error number.
Returncode | Number | Description |
NS_E_MISSING_AUDIENCE | 0xC00D1B98L | An audience is missing from the output stream configuration. |
NS_E_AUDIENCE_CONTENTTYPE_MISMATCH | 0xC00D1B99L | All the audiences in the output tree must have the same content type. |
NS_E_NUM_LANGUAGE_MISMATCH | 0xC00D1B9BL | The same source index in different audiences should have the same number of languages. |
NS_E_LANGUAGE_MISMATCH | 0xC00D1B9CL | The same source index in different audiences should have the same languages. |
NS_E_VBRMODE_MISMATCH | 0xC00D1B9DL | The same source index in different audiences should use the same VBR encoding mode. |
NS_E_INTERLACEMODE_MISMATCH | 0xC00D1BABL | The same source index in different audiences should have the same interlace mode. |
NS_E_NONSQUAREPIXELMODE_MISMATCH | 0xC00D1BACL | The same source index in different audiences should have the same nonsquare pixel mode. |
NS_E_SMPTEMODE_MISMATCH | 0xC00D1BADL | The same source index in different audiences should have the same time code mode. |
NS_E_INVALID_INPUT_AUDIENCE_INDEX | 0xC00D1B9EL | The audience index specified is not valid. |
NS_E_ARCHIVE_SAME_AS_INPUT | 0xC00D1B84L | The name of the output file is the same as an input file. |
NS_E_INVALID_INPUT_LANGUAGE | 0xC00D1B9FL | The input language specified is not valid. |
Remarks
Call this method before you start the stream edit session to verify that your configuration is correct.
Example Code
' Create a WMEncStreamEdit object.
Dim Stream As WMEncStreamEdit
Set Stream = New WMEncStreamEdit
' This example assumes that you have a source file with two audiences.
' Create a new file using the audio from the first audience and the
' video from the second audience, as follows:
' Add the audio stream from the first audience.
Stream.AddStream "C:\Source.wmv", WMENC_AUDIO, 0, 0, 1033, 0, 0
' Add the video stream from the second audience.
Stream.AddStream "C:\Source.wmv", WMENC_VIDEO, 1, 0, 1033, 0, 0
' Specify the output file.
Stream.OutputFile = "C:\Output.wmv"
' Validate the current settings.
Stream.Validate
' Start the stream edit process.
Stream.Start
' Retrieve the run state.
Dim SERunState as WMENC_BASICEDIT_STATE
SERunState = Stream.RunState
' You can use a timer to retrieve the percentage complete.
Dim lPercentComplete As Long
lPercentComplete = Stream.ProgressPercent
Requirements
Reference: Windows Media Encoder
Library: wmenc.exe
See Also