Products | Support | Email a link to this topic. | Send comments on this topic. | Back to Introduction | Help Version 19.0.2.9
|
Leadtools.Multimedia Namespace : MediaEventCode Enumeration |
public enum MediaEventCode : System.Enum, System.IComparable, System.IConvertible, System.IFormattable
'Declaration
Public Enum MediaEventCode Inherits System.Enum Implements System.IComparable, System.IConvertible, System.IFormattable
'Usage
Dim instance As MediaEventCode
public enum class MediaEventCode : public System.Enum, System.IComparable, System.IConvertible, System.IFormattable
Value | Member | Description |
---|---|---|
0x00000001 | EC_COMPLETE | Indicates the completed playback of a stream within the graph. |
0x00000002 | EC_USERABORT | Indicates that the user has requested that playback be terminated. |
0x00000003 | EC_ERRORABORT | Operation aborted because of error. |
0x00000004 | EC_TIME | Indicates that the requested reference time occurred. (currently unused) |
0x00000005 | EC_REPAINT | Indicates that a repaint is required. |
0x00000006 | EC_STREAM_ERROR_STOPPED | Indicates that a stream error occurs that stopped playback. |
0x00000007 | EC_STREAM_ERROR_STILLPLAYING | Indicates that a stream error occurred, but playback has continued. |
0x00000008 | EC_ERROR_STILLPLAYING | Indicates that an asynchronous run command was sent to the graph when the graph was already running. |
0x00000009 | EC_PALETTE_CHANGED | Indicates that the video palette has changed. |
0x0000000A | EC_VIDEO_SIZE_CHANGED | Indicates that the video size has changed. |
0x0000000B | EC_QUALITY_CHANGE | Indicates that playback quality degradation has occurred. |
0x0000000C | EC_SHUTTING_DOWN | Notifies IMediaEventSink filters that the filter graph is preparing to shutdown. |
0x0000000D | EC_CLOCK_CHANGED | Indicates that the clock has changed. |
0x0000000E | EC_PAUSED | Indicates that the previous pause request has completed. |
0x00000010 | EC_OPENING_FILE | Indicates that a file is being opened. |
0x00000011 | EC_BUFFERING_DATA | Indicates that the filter graph is buffering data. |
0x00000012 | EC_FULLSCREEN_LOST | Indicates that full screen mode was toggled off. |
0x00000013 | EC_ACTIVATE | Indicates that a video renderer has lost or gained activation. |
0x00000014 | EC_NEED_RESTART | Indicates that a renderer has regained a resource and the graph will be restarted. |
0x00000015 | EC_WINDOW_DESTROYED | Indicates that a video window for a video renderer has been destroyed. |
0x00000016 | EC_DISPLAY_CHANGED | Indicates that a video renderer has detected a display change. |
0x00000017 | EC_STARVATION | Indicates that a filter in the graph has detected starvation (not enough data to properly render). |
0x00000018 | EC_OLE_EVENT | Indicates that the filter is sending a text string to the application. This is useful for detecting Windows Media Script events that were added with the WMScript object. For Windows Media Script events, param1 is a BSTR containing the command name while param2 is a BSTR containing the command string. |
0x00000019 | EC_NOTIFY_WINDOW | Indicates that the window handle is being passed to a filter. |
0x0000001A | EC_STREAM_CONTROL_STOPPED | Indicates that an earlier call to IAMStreamControl.StopAt has now taken effect. |
0x0000001B | EC_STREAM_CONTROL_STARTED | Indicates that an earlier call to IAMStreamControl.StartAt has now taken effect. |
0x0000001C | EC_END_OF_SEGMENT | Indicates that a segment end has been reached. |
0x0000001D | EC_SEGMENT_STARTED | Indicates that a segment start has been reached. |
0x0000001E | EC_LENGTH_CHANGED | Indicates that the length of the "file" has changed. |
0x0000001F | EC_DEVICE_LOST | Indicates that a device has been lost, see IAMDeviceRemoval interface for more information. |
0x00000020 | EC_SAMPLE_NEEDED | Indicates that a sample is needed on the specified input pin. |
0x00000021 | EC_PROCESSING_LATENCY | Indicates the current latency (processing time) for the related filter. |
0x00000022 | EC_SAMPLE_LATENCY | Indicates that the filter is the specified amount of time behind or ahead in processing incoming samples. |
0x00000023 | EC_SCRUB_TIME | Indicates the timestamp for the sample frame displayed after an EC_STEP_COMPLETE notification. |
0x00000024 | EC_STEP_COMPLETE | Indicates that a step request has completed or was cancelled. |
0x00000025 | EC_SKIP_FRAMES | Indicates to the filter graph to skip some frames and notify. |
0x00000030 | EC_TIMECODE_AVAILABLE | Indicates that a filter has timecodes available. |
0x00000031 | EC_EXTDEVICE_MODE_CHANGE | Indicates that a filter supporting the IAMExtDevice interface has detected a device mode change. |
0x00000032 | EC_STATE_CHANGE | Indicates state changes in the filter graph. |
0x00000040 | EC_PLEASE_REOPEN | Indicates that changes have been made that require a graph to be re-rendered. |
0x00000041 | EC_STATUS | Indicates that a filter is sending status message strings. |
0x00000042 | EC_MARKER_HIT | Indicates that the specified "marker #" has just been passed. |
0x00000043 | EC_LOADSTATUS | This event is sent by certain filters to indicate the progress of a load operation. param1 has more information on the type of notification. LEAD filters will set param1 to one of the values in the LoadStatusEventCode enumeration. See LoadStatusEventCode for more information on the events sent by the LEAD MPEG-2 Transport Demultiplexer and LEAD MPEG-2 Transport UDP Source filters. |
0x00000044 | EC_FILE_CLOSED | Indicates that a file was involuntarily closed, i.e. by a network server shutdown. |
0x00000045 | EC_ERRORABORTEX | Indicates that an operation aborted because of error. |
0x00000046 | EC_EOS_SOON | Indicates that the source filter is about to deliver an EOS downstream. |
0x00000047 | EC_CONTENTPROPERTY_CHANGED | Indicates that a streaming media filter received a change in stream description information. |
0x00000048 | EC_BANDWIDTHCHANGE | Indicates that the bandwidth of the streaming data has changed. |
0x00000049 | EC_VIDEOFRAMEREADY | Indicates that the first video frame is about to be drawn. |
0x00000050 | EC_GRAPH_CHANGED | Indicates that the filter graph has changed. |
0x00000051 | EC_CLOCK_UNSET | Indicates to the filter graph to unset the current graph clock. |
0x00000053 | EC_VMR_RENDERDEVICE_SET | Indicates the type of rendering mechanism the VMR is using to display video. |
0x00000054 | EC_VMR_SURFACE_FLIPPED | Indicates that the VMR's allocator-presenter has called the DDraw flip API on the surface being presented. |
0x00000055 | EC_VMR_RECONNECTION_FAILED | Indicates that an upstream decoder tried to perform a dynamic format change and the VMR was unable to accept the new format. |
0x00000056 | EC_PREPROCESS_COMPLETE | Indicates that a WM ASF writer filter (WMSDK V9 version) has signaled the completion of a pre-process run when running in multipass encoding mode. |
0x00000057 | EC_CODECAPI_EVENT | Indicates that the Codec API event was encountered. |
0x00000101 | EC_DVD_DOMAIN_CHANGE | The DVD domain is changed. |
0x00000102 | EC_DVD_TITLE_CHANGE | The DVD current title has changed. |
0x00000103 | EC_DVD_CHAPTER_START | The player has started playing a new chapter The name for each individual video file on a DVD. |
0x00000104 | EC_DVD_AUDIO_STREAM_CHANGE | The audio stream The portion of the file holding the audio data. |
0x00000105 | EC_DVD_SUBPICTURE_STREAM_CHANGE | The DVD sub-picture stream number has changed. |
0x00000106 | EC_DVD_ANGLE_CHANGE | The number of available angles is changed or the current angle number is changed. |
0x00000107 | EC_DVD_BUTTON_CHANGE | The number of available buttons is changed or the currently selected button number is changed. |
0x00000108 | EC_DVD_VALID_UOPS_CHANGE | The available set of DVDControl interface methods has changed. |
0x00000109 | EC_DVD_STILL_ON | Beginning of a still (PGC, Cell, or VOBU). |
0x0000010A | EC_DVD_STILL_OFF | End of a still (PGC, Cell, or VOBU). |
0x0000010B | EC_DVD_CURRENT_TIME | The beginning of every video object unit, a video segment that is 0. |
0x0000010C | EC_DVD_ERROR | A DVD error condition. |
0x0000010D | EC_DVD_WARNING | A DVD warning condition. |
0x0000010E | EC_DVD_CHAPTER_AUTOSTOP | Playback is stopped as a result of a call to the DVDControl. |
0x0000010F | EC_DVD_NO_FP_PGC | The DVD disc does not have an FP_PGC (First Play Program Chain) and the DVD Navigator will not automatically load any PGC and start playback. |
0x00000110 | EC_DVD_PLAYBACK_RATE_CHANGE | A rate change in the playback has been initiated; the parameter Param1 indicates the new playback rate being used. |
0x00000111 | EC_DVD_PARENTAL_LEVEL_CHANGE | The parental level of the authored content is about to change. |
0x00000112 | EC_DVD_PLAYBACK_STOPPED | Playback has been stopped. See DVDPlaybackStopped enumeration for possible stop reason codes passed in param1 of the MediaEventArgs object. |
0x00000113 | EC_DVD_ANGLES_AVAILABLE | Indicates whether an angle block is being played and angle changes can be performed. |
0x00000114 | EC_DVD_PLAYPERIOD_AUTOSTOP | The Navigator has finished playing the segment specified in a call to DVDControl. |
0x00000115 | EC_DVD_BUTTON_AUTO_ACTIVATED | A menu button has been automatically activated per instructions on the disc. |
0x00000116 | EC_DVD_CMD_START | A command has begun. |
0x00000117 | EC_DVD_CMD_END | A command has completed. |
0x00000118 | EC_DVD_DISC_EJECTED | A disc was ejected. |
0x00000119 | EC_DVD_DISC_INSERTED | A disc was inserted. |
0x0000011A | EC_DVD_CURRENT_HMSF_TIME | The beginning of every video object unit, a video segment that is 0. |
0x0000011B | EC_DVD_KARAOKE_MODE | The Navigator has either begun playing or finished playing karaoke data. |
0x00000251 | EC_WMT_INDEX_EVENT | Indicates that Windows Media indexing event has occurred. |
0x00000252 | EC_WMT_EVENT | Indicates that a Windows Media event has occurred. |
0x00000300 | EC_BUILT | This event is sent when a graph has been built. |
0x00000301 | EC_UNBUILT | This event is sent when a graph has been torn down. |
For more information, refer to the Microsoft documentation for the Event Notification and DVD Event Notification Codes.
See LoadStatusEventCode enumeration for more information on the EC_LOADSTATUS event code.
Imports Leadtools Imports Leadtools.Multimedia Imports LeadtoolsMultimediaExamples.Fixtures Public _result As Boolean = False Public _form As PlayCtrlForm = New PlayCtrlForm() Public Sub SourceStreamExample() ' reference the play control Dim playctrl As PlayCtrl = _form.PlayCtrl ' input and output file names Dim inFile As String = Path.Combine(LEAD_VARS.MediaDir, "PlayCtrl_Source.avi") Try ' turn off auto start playctrl.AutoStart = False ' subscribe to the complete event to check our result AddHandler playctrl.MediaEvent, AddressOf PlayCtrl_MediaEvent ' set the source stream playctrl.SourceStream = New StreamReader(inFile).BaseStream ' set the allowed streams playctrl.AllowedStreams = StreamFormatType.AudioVideoCC ' play it! playctrl.Run() Catch e1 As Exception _result = False End Try ' we'll loop on the state and pump messages for this example. ' but you should not need to if running from a Windows Forms application. Do While playctrl.State = PlayState.Running Application.DoEvents() Loop End Sub Private Sub PlayCtrl_MediaEvent(ByVal sender As Object, ByVal e As MediaEventArgs) ' set the result If e.eventCode = MediaEventCode.EC_COMPLETE Then _result = True End If End Sub Public NotInheritable Class LEAD_VARS Public Const MediaDir As String = "C:\Program Files (x86)\LEAD Technologies\LEADTOOLS 19\Media" End Class
using Leadtools; using Leadtools.Multimedia; using LeadtoolsMultimediaExamples.Fixtures; public bool _result = false; public PlayCtrlForm _form = new PlayCtrlForm(); public void SourceStreamExample() { // reference the play control PlayCtrl playctrl = _form.PlayCtrl; // input and output file names string inFile = Path.Combine(LEAD_VARS.MediaDir,"PlayCtrl_Source.avi"); try { // turn off auto start playctrl.AutoStart = false; // subscribe to the complete event to check our result playctrl.MediaEvent += new MediaEventHandler(PlayCtrl_MediaEvent); // set the source stream playctrl.SourceStream = new StreamReader(inFile).BaseStream; // set the allowed streams playctrl.AllowedStreams = StreamFormatType.AudioVideoCC; // play it! playctrl.Run(); } catch (Exception) { _result = false; } // we'll loop on the state and pump messages for this example. // but you should not need to if running from a Windows Forms application. while (playctrl.State == PlayState.Running) Application.DoEvents(); } void PlayCtrl_MediaEvent(object sender, MediaEventArgs e) { // set the result if (e.eventCode == MediaEventCode.EC_COMPLETE) _result = true; } static class LEAD_VARS { public const string MediaDir = @"C:\Program Files (x86)\LEAD Technologies\LEADTOOLS 19\Media"; }
Imports Leadtools Imports Leadtools.Multimedia Imports LeadtoolsMultimediaExamples.Fixtures Public _result As Boolean = False Public _form As New PlayCtrlForm() Public Sub HandleScriptExample() Dim playctrl As PlayCtrl = _form.PlayCtrl Dim inFile As String = Path.Combine(LEAD_VARS.MediaDir, "WriteScriptStream_Dest.wmv") Try AddHandler playctrl.MediaEvent, AddressOf PlayCtrl_MediaEvent playctrl.SourceFile = inFile Catch generatedExceptionName As Exception Exit Sub End Try ' we'll loop on the state and pump messages for this example. ' but you should not need to if running from a Windows Forms application. While playctrl.State = PlayState.Running Application.DoEvents() End While End Sub Public Sub PlayCtrl_MediaEvent(ByVal sender As Object, ByVal e As MediaEventArgs) If (e.eventCode = MediaEventCode.EC_OLE_EVENT) Then Dim nameString As String = System.Runtime.InteropServices.Marshal.PtrToStringBSTR(New IntPtr(e.param1)) Dim commandString As String = System.Runtime.InteropServices.Marshal.PtrToStringBSTR(New IntPtr(e.param2)) Console.WriteLine("EC_OLE_EVENT: name={0}, command={1}", nameString, commandString) _result = True End If End Sub Public NotInheritable Class LEAD_VARS Public Const MediaDir As String = "C:\Program Files (x86)\LEAD Technologies\LEADTOOLS 19\Media" End Class
using Leadtools; using Leadtools.Multimedia; using LeadtoolsMultimediaExamples.Fixtures; public bool _result = false; public PlayCtrlForm _form = new PlayCtrlForm(); public void HandleScriptExample() { PlayCtrl playctrl = _form.PlayCtrl; string inFile = Path.Combine(LEAD_VARS.MediaDir,"WriteScriptStream_Dest.wmv"); try { playctrl.MediaEvent += new MediaEventHandler(PlayCtrl_MediaEvent); playctrl.SourceFile = inFile; } catch (Exception) { return; } // we'll loop on the state and pump messages for this example. // but you should not need to if running from a Windows Forms application. while (playctrl.State == PlayState.Running) Application.DoEvents(); } public void PlayCtrl_MediaEvent(object sender, MediaEventArgs e) { if (e.eventCode == MediaEventCode.EC_OLE_EVENT) { string nameString = System.Runtime.InteropServices.Marshal.PtrToStringBSTR(new IntPtr(e.param1)); string commandString = System.Runtime.InteropServices.Marshal.PtrToStringBSTR(new IntPtr(e.param2)); Console.WriteLine("EC_OLE_EVENT: name={0}, command={1}", nameString, commandString); _result = true; } } static class LEAD_VARS { public const string MediaDir = @"C:\Program Files (x86)\LEAD Technologies\LEADTOOLS 19\Media"; }
System.Object
System.ValueType
System.Enum
Leadtools.Multimedia.MediaEventCode