diff --git a/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/ViewerPanel.xaml.cs b/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/ViewerPanel.xaml.cs index 98066c7..f4645db 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/ViewerPanel.xaml.cs +++ b/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/ViewerPanel.xaml.cs @@ -111,26 +111,7 @@ namespace QuickLook.Plugin.VideoViewer try { CoverArt = null; - if (mediaElement.IsOpening) - { - void DelayedDisposeEvent(object sender, PropertyChangedEventArgs propertyChangedEventArgs) - { - var me = (Unosquare.FFME.MediaElement) sender; - - if (propertyChangedEventArgs.PropertyName != nameof(me.IsPlaying)) - return; - if (me.IsPlaying != true) - return; - - me.PropertyChanged -= DelayedDisposeEvent; - me.IsMuted = true; - Task.Delay(200).ContinueWith(t => me.Dispose()); - } - - mediaElement.PropertyChanged += DelayedDisposeEvent; - } - else - mediaElement.Dispose(); + mediaElement.Dispose(); mediaElement = null; } @@ -252,11 +233,11 @@ namespace QuickLook.Plugin.VideoViewer public void LoadAndPlay(string path) { UpdateMeta(path); - - mediaElement.Source = new Uri(path); + mediaElement.Volume = 0.5; + mediaElement.Source = new Uri(path); - mediaElement.Play(); + mediaElement.MediaOpened += (sender, e) => mediaElement?.Play(); } [NotifyPropertyChangedInvocator] diff --git a/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/ffme/FFmpeg.AutoGen.dll b/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/ffme/FFmpeg.AutoGen.dll index f3b402a..c6dfa33 100644 Binary files a/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/ffme/FFmpeg.AutoGen.dll and b/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/ffme/FFmpeg.AutoGen.dll differ diff --git a/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/ffme/ffme.common.dll b/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/ffme/ffme.common.dll index 18a6b95..7209c67 100644 Binary files a/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/ffme/ffme.common.dll and b/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/ffme/ffme.common.dll differ diff --git a/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/ffme/ffme.common.xml b/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/ffme/ffme.common.xml index dd5774d..1177a41 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/ffme/ffme.common.xml +++ b/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/ffme/ffme.common.xml @@ -510,6 +510,17 @@ in a stream of CC packets. + + + Initializes a new instance of the class. + + The closed captions. + + + + Gets all the CC packets as originally provided in the constructor. + + The CC1 Track Packets @@ -530,13 +541,6 @@ The CC4 Track Packets - - - Adds the specified packet and automatically places it on the right track. - If the track requires sorting it does so by reordering packets based on their timestamp. - - The item. - Represents a 3-byte packet of closed-captioning data in EIA-608 format. @@ -863,14 +867,14 @@ The awaitable command - + Seeks to the specified position within the media. This command is a queued command The position. - + Sets the playback speed ratio. This command is a queued command @@ -1346,18 +1350,11 @@ The code. The decoded error message - - - Converts a byte pointer to a string - - The byte PTR. - The string - Converts a byte pointer to a UTF8 encoded string. - The byte PTR. + The pointer to the starting character The string @@ -1737,6 +1734,12 @@ Gets or sets the speed ratio at which the clock runs. + + + Sets a new position value atomically + + The new value that the position porperty will hold. + Starts or resumes the clock. @@ -2336,13 +2339,6 @@ When the media type is invalid MediaComponent - - - Removes the component of specified media type (if registered). - It calls the dispose method of the media component too. - - Type of the media. - Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. @@ -2361,7 +2357,7 @@ Sends an empty packet to all media components. When an EOF/EOS situation is encountered, this forces - the decoders to enter drainig mode untill all frames are decoded. + the decoders to enter drainig mode until all frames are decoded. @@ -2372,6 +2368,13 @@ index is changed. + + + Removes the component of specified media type (if registered). + It calls the dispose method of the media component too. + + Type of the media. + Releases unmanaged and - optionally - managed resources. @@ -2382,22 +2385,18 @@ A container capable of opening an input url, reading packets from it, decoding frames, seeking, and pausing and resuming network streams - Code heavily based on https://raw.githubusercontent.com/FFmpeg/FFmpeg/release/3.2/ffplay.c + Code based on https://raw.githubusercontent.com/FFmpeg/FFmpeg/release/3.2/ffplay.c The method pipeline should be: 1. Set Options (or don't, for automatic options) and Initialize, - 2. Perform continuous Reads, - 3. Perform continuous Decodes and Converts/Materialize + 2. Perform continuous packet reads, + 3. Perform continuous frame decodes + 4. Perform continuous block materialization - + - The logger - - - - - Holds a reference to an input context. + The exception message no input context @@ -2415,27 +2414,12 @@ The convert synchronize root - - - Holds the set of components. - - - - - The internal flag that determines if a seek operation is in progress. - - - - - To detect redundat Dispose calls - - Determines if the stream seeks by bytes always - + Hold the value for the internal property with the same name. Picture attachments are required when video streams support them @@ -2465,25 +2449,23 @@ If set to true, it will reset the abort requested flag to false. - - - If set to true, an ongoing seek operation will immediately try to return and cancel all reads. - - - + Initializes a new instance of the class. The media URL. + The stream options. The logger. - - The protocol prefix. See https://ffmpeg.org/ffmpeg-protocols.html - Leave null if setting it is not intended. mediaUrl - + - Finalizes an instance of the class. + To detect redundat Dispose calls + + + + + Logging Messages will be sent to this parent object. @@ -2492,22 +2474,23 @@ by this container. - + - Gets the protocol prefix. - Typically async for local files and empty for other types. + The stream initialization options. + Options are applied when creating the container. + After initialization, changing the options has no effect. - The media initialization options. - Options are applied when calling the Initialize method. - After initialization, changing the options has no effect. + Represetnts options that applied before initializing media components and their corresponding + codecs. Once the container has created the media components, changing these options will have no effect. Provides stream, chapter and program info held by this container. + This property is null if the the stream has not been opened. @@ -2561,10 +2544,16 @@ Gets a value indicating whether the underlying media is seekable. - + - Gets a value indicating whether this container represents realtime media. - If the format name is rtp, rtsp, or sdp or if the url starts with udp: or rtp: + Gets a value indicating whether this container represents live media. + If the stream is classified as a network stream and it is not seekable, then this property will return true. + + + + + Gets a value indicating whether the input stream is a network stream. + If the format name is rtp, rtsp, or sdp or if the url starts with udp:, http:, https:, tcp:, or rtp: then this property will be set to true. @@ -2578,39 +2567,28 @@ Gets a value indicating whether reads are in the aborted state. - - - Gets a value indicating whether a seek operation is in progress. - - Gets the media start time by which all component streams are offset. Typically 0 but it could be something other than 0. - + + + Holds a reference to the input context. + + + Gets the seek start timestamp. - + Gets the time the last packet was read from the input - - - For RTSP and other realtime streams reads can be suspended. - - - - - For RTSP and other realtime streams reads can be suspended. - This property will return true if reads have been suspended. - - - + Gets a value indicating whether a packet read delay witll be enforced. RSTP formats or MMSH Urls will have this property set to true. @@ -2618,7 +2596,7 @@ This is a hack according to the source code in ffplay.c - + Picture attachments are required when video streams support them and these attached packets must be read before reading the first frame @@ -2632,7 +2610,7 @@ Any Media Options must be set before this method is called. - + Seeks to the specified position in the stream. This method attempts to do so as precisely as possible, returning decoded frames of all available media type components @@ -2641,7 +2619,6 @@ Pass TimeSpan.Zero to seek to the beginning of the stream. The position. - if set to true [aborted]. The list of media frames @@ -2698,14 +2675,6 @@ or input - - - Signals the abortion of the current seek operation. - - - Returns true if there was a seek operation in progress when this method was called. - - Signals the packet reading operations to abort immediately. @@ -2725,13 +2694,7 @@ - Releases unmanaged and - optionally - managed resources. - - - - - Initializes the InputContext and applies format options. - https://www.ffmpeg.org/ffmpeg-formats.html#Format-Options + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. @@ -2743,25 +2706,24 @@ The input context has already been initialized. When an error initializing the stream occurs. + + + Initializes the InputContext and applies format options. + https://www.ffmpeg.org/ffmpeg-formats.html#Format-Options + + Opens the individual stream components to start reading packets. - + Creates the stream components by first finding the best available streams. Then it initializes the components of the correct type each. The exception ifnromation - - - The interrupt callback to handle stream reading timeouts - - A pointer to the format input context - 0 for OK, 1 for error (timeout) - Reads the next packet in the underlying stream and enqueues in the corresponding media component. @@ -2771,42 +2733,28 @@ Initialize Raised when an error reading from the stream occurs. - + - Suspends / pauses network streams - This should only be called upon Dispose + The interrupt callback to handle stream reading timeouts + A pointer to the format input context + 0 for OK, 1 for error (timeout) - - - Resumes the reads of network streams - - - - - Drops the seek frames that are no longer needed. - Target time should be provided in absolute, 0-based time - - The frames. - The target time. - The number of dropped frames - - - - Seeks to the position at the start of the stream. - - - + Seeks to the exact or prior frame of the main stream. Supports byte seeking. The target time. - if set to true [aborted]. The list of media frames + + + Seeks to the position at the start of the stream. + + Reads and decodes packets untill the required media components have frames on or right before the target time. @@ -2816,12 +2764,20 @@ The requirement. The number of decoded frames + + + Drops the seek frames that are no longer needed. + Target time should be provided in absolute, 0-based time + + The frames. + The target time. + The number of dropped frames + Releases unmanaged and - optionally - managed resources. - - true to release both managed and unmanaged resources; false to release only unmanaged resources. + true to release both managed and unmanaged resources; false to release only unmanaged resources. @@ -3164,7 +3120,7 @@ Releases unmanaged and - optionally - managed resources. - true to release both managed and unmanaged resources; false to release only unmanaged resources. + true to release both managed and unmanaged resources; false to release only unmanaged resources. @@ -3334,7 +3290,7 @@ Releases unmanaged and - optionally - managed resources. - true to release both managed and unmanaged resources; false to release only unmanaged resources. + true to release both managed and unmanaged resources; false to release only unmanaged resources. @@ -3344,16 +3300,6 @@ - - - Starts the block rendering worker. - - - - - Stops the block rendering worker. - - Raises the MessageLogged event @@ -3376,6 +3322,13 @@ Raises the media opened event. + + + Raises the media initializing event. + + The options. + The URL. + Raises the media opening event. @@ -3406,19 +3359,25 @@ Raises the media ended event. - + - Raises the Position Changed event + Sends the on position changed. - The position. + The old value. + The new value. - + - Notifies the platform connector that a property value has changed. + Sends the on media state changed. + + The old value. + The new value. + + + + The open or close command done signalling object. + Open and close are synchronous commands. - Name of the property used to notify listeners. This - value is optional and can be provided automatically when invoked from compilers - that support . @@ -3437,6 +3396,20 @@ individual media component streams + + + Opens the specified URI. + + The URI. + The awaitable task + Source + + + + Closes the currently loaded media. + + The awaitable task + Begins or resumes playback of the currently loaded media. @@ -3455,98 +3428,27 @@ The awaitable command - - - Opens the specified URI. - - The URI. - The awaitable task - Source - - - - Closes the currently loaded media. - - The awaitable task - - + Seeks to the specified position. New position for the player. - + Sets the specified playback speed ratio. New playback speed ratio. - + - Gets or Sets the Source on this MediaElement. - The Source property is the Uri of the media to be played. + Begins a synchronous command by locking the internal wait handle. + True if successful, false if unsuccessful - + - Specifies the behavior that the media element should have when it - is loaded. The default behavior is that it is under manual control - (i.e. the caller should call methods such as Play in order to play - the media). If a source is set, then the default behavior changes to - to be playing the media. If a source is set and a loaded behavior is - also set, then the loaded behavior takes control. - - - - - Gets or Sets the SpeedRatio property of the media. - - - - - Gets the internal real time clock speed ratio. - This is different from the regular property as this is the immediate value - (i.e. might not yet be applied) - - - - - Specifies how the underlying media should behave when - it has ended. The default behavior is to Close the media. - - - - - Gets/Sets the Volume property on the MediaElement. - Note: Valid values are from 0 to 1 - - - - - Gets/Sets the Balance property on the MediaElement. - - - - - Gets/Sets the IsMuted property on the MediaElement. - - - - - Gets or sets a value that indicates whether the MediaElement will update frames - for seek operations while paused. This is a dependency property. - - - - - Gets or Sets the Position property on the MediaElement. - - - - - Gets the internal real time clock position. - This is different from the regular property as this is the immediate value - (i.e. might not yet be applied) + Ends a synchronous command by releasing the internal wait handle. @@ -3554,18 +3456,6 @@ To detect redundant calls - - - When position is being set from within this control, this field will - be set to true. This is useful to detect if the user is setting the position - or if the Position property is being driven from within - - - - - Flag when disposing process start but not finished yet - - Initializes a new instance of the class. @@ -3574,6 +3464,29 @@ The parent implementing connector methods. Thrown when the static Initialize method has not been called. + + + Contains the Media Status + + + + + Gets the internal real time clock position. + This is different from the position property and it is useful + in computing things like real-time latency in a render cycle. + + + + + Provides stream, chapter and program info of the underlying media. + Returns null when no media is loaded. + + + + + Gets a value indicating whether this instance is disposed. + + Gets the associated parent object. @@ -3584,14 +3497,6 @@ Gets the event connector (platform specific). - - - Gets a value indicating whether this instance is disposed. - - - true if this instance is disposed; otherwise, false. - - Logs the specified message into the logger queue. @@ -3599,56 +3504,11 @@ Type of the message. The message. - - - Retrieves the registered renderer for the given media type. - - Type of the media. - The media renderer - Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - - - Updates the position property signaling the update is - coming internally. This is to distinguish between user/binding - written value to the Position Porperty and value set by this control's - internal clock. - - The current position. - - - - Resets all the buffering properties to their defaults. - - - - - Updates the buffering properties: IsBuffering, BufferingProgress, DownloadProgress. - - - - - Guesses the bitrate of the input stream. - - - - - Checks if a property already matches a desired value. Sets the property and - notifies listeners only when necessary. - - Type of the property. - Reference to a property with both getter and setter. - Desired value for the property. - Name of the property used to notify listeners. This - value is optional and can be provided automatically when invoked from compilers that - support CallerMemberName. - True if the value was changed, false if the existing value matched the - desired value. - Releases unmanaged and - optionally - managed resources. @@ -3656,233 +3516,6 @@ true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - Provides key-value pairs of the metadata contained in the media. - Returns null when media has not been loaded. - - - - - Gets the media format. Returns null when media has not been loaded. - - - - - Provides stream, chapter and program info of the underlying media. - Returns null when no media is loaded. - - - - - Gets the duration of a single frame step. - If there is a video component with a framerate, this propery returns the length of a frame. - If there is no video component it simply returns a tenth of a second. - - - - - Returns whether the given media has audio. - Only valid after the MediaOpened event has fired. - - - - - Returns whether the given media has video. Only valid after the - MediaOpened event has fired. - - - - - Gets the video codec. - Only valid after the MediaOpened event has fired. - - - - - Gets the video bitrate. - Only valid after the MediaOpened event has fired. - - - - - Returns the natural width of the media in the video. - Only valid after the MediaOpened event has fired. - - - - - Returns the natural height of the media in the video. - Only valid after the MediaOpened event has fired. - - - - - Gets the video frame rate. - Only valid after the MediaOpened event has fired. - - - - - Gets the duration in seconds of the video frame. - Only valid after the MediaOpened event has fired. - - - - - Gets the name of the video hardware decoder in use. - Enabling hardware acceleration does not guarantee decoding will be performed in hardware. - When hardware decoding of frames is in use this will return the name of the HW accelerator. - Otherwise it will return an empty string. - - - - - Gets the audio codec. - Only valid after the MediaOpened event has fired. - - - - - Gets the audio bitrate. - Only valid after the MediaOpened event has fired. - - - - - Gets the audio channels count. - Only valid after the MediaOpened event has fired. - - - - - Gets the audio sample rate. - Only valid after the MediaOpened event has fired. - - - - - Gets the audio bits per sample. - Only valid after the MediaOpened event has fired. - - - - - Gets the Media's natural duration - Only valid after the MediaOpened event has fired. - - - - - Returns whether the currently loaded media can be paused. - This is only valid after the MediaOpened event has fired. - Note that this property is computed based on wether the stream is detected to be a live stream. - - - - - Returns whether the currently loaded media is live or realtime and does not have a set duration - This is only valid after the MediaOpened event has fired. - - - - - When position is being set from within this control, this field will - be set to true. This is useful to detect if the user is setting the position - or if the Position property is being driven from within - - - - - Gets a value indicating whether the currently loaded media can be seeked. - - - - - Gets a value indicating whether the media is playing. - - - - - Gets a value indicating whether the media has reached its end. - - - - - Get a value indicating whether the media is buffering. - - - - - Gets a value indicating whether the media seeking is in progress. - - - - - Returns the current video SMTPE timecode if available. - If not available, this property returns an empty string. - - - - - Gets the guessed buffered bytes in the packet queue per second. - If bitrate information is available, then it returns the bitrate converted to byte rate. - Returns null if it has not been guessed. - - - - - Gets a value that indicates the percentage of buffering progress made. - Range is from 0 to 1 - - - - - The packet buffer length. - It is adjusted to 1 second if bitrate information is available. - Otherwise, it's simply 512KB and it is guessed later on. - - - - - Gets a value that indicates the percentage of download progress made. - Range is from 0 to 1 - - - - - Gets the maximum packet buffer length, according to the bitrate (if available). - If it's a realtime stream it will return 30 times the buffer cache length. - Otherwise, it will return 4 times of the buffer cache length. - - - - - Gets a value indicating whether the media is in the process of opening. - - - - - Gets a value indicating whether this media element - currently has an open media url. - - - - - Gets the current playback state. - - - - - Updates the media properties notifying that there are new values to be read from all of them. - Call this method only when necessary because it creates a lot of events. - - - - - Resets the controller properies. - - The initialize lock @@ -3927,7 +3560,7 @@ The platform-specific implementation. - + This partial class implements: 1. Packet reading from the Container @@ -3937,7 +3570,7 @@ - Holds the blocks + Holds the materialized block cache for each media type. @@ -3999,20 +3632,6 @@ That is, if we have packets in the packet buffer or if we are not at the end of the stream. - - - Runs the read task which keeps a packet buffer as full as possible. - It reports on DownloadProgress by enqueueing an update to the property - in order to avoid any kind of disruption to this thread caused by the UI thread. - - - - - Continually decodes the available packet buffer to have as - many frames as possible in each frame queue and - up to the MaxFrames on each component - - Initializes the media block buffers and @@ -4024,11 +3643,12 @@ Stops the packet reader, frame decoder, and block renderers - + - Sets the clock to a discrete video position if possible + Returns the value of a discrete video position if possible The position. + The snapped position @@ -4054,6 +3674,30 @@ The t. The number of blocks that were added + + + Continually decodes the available packet buffer to have as + many frames as possible in each frame queue and + up to the MaxFrames on each component + + + + + Runs the read task which keeps a packet buffer as full as possible. + It reports on DownloadProgress by enqueueing an update to the property + in order to avoid any kind of disruption to this thread caused by the UI thread. + + + + + Starts the block rendering worker. + + + + + Stops the block rendering worker. + + Fast, atomioc boolean combining interlocked to write value and volatile to read values @@ -4118,6 +3762,54 @@ Gets or sets the latest value written by any of the processors in the machine + + + A simple benchmarking class. + + + + + Starts measuring with the given identifier. + + The identifier. + A disposable object that when disposed, adds a benchmark result. + + + + Outputs the benchmark statistics. + + A string containing human-readable statistics + + + + Adds the specified result to the given identifier. + + The identifier. + The elapsed. + + + + Represents a disposable benchmark unit. + + + + + + Initializes a new instance of the class. + + The identifier. + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Releases unmanaged and - optionally - managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + A fixed-size buffer that acts as an infinite length one. @@ -4615,6 +4307,11 @@ The audio bits per sample (1 channel only) + + + The audio bytes per sample + + The audio sample format @@ -4680,6 +4377,38 @@ Provides various helpers and extension methods. + + + Puts a short value in the target buffer as bytes + + The target. + The offset. + The value. + + + + Gets the a signed 16 bit integer at the guven offset. + + The buffer. + The offset. + The signed integer. + + + + Gets the audio sample amplitude (absolute value of the sample). + + The buffer. + The offset. + The sample amplitude + + + + Gets the audio sample level for 0 to 1. + + The buffer. + The offset. + The amplitude level + Returns a formatted timestamp string in Seconds @@ -4765,6 +4494,23 @@ The rational. The value + + + Normalizes precision of the TimeSpan to the nearest whole millisecond. + + The source. + The normalized, whole-milliscond timespan + + + + Clamps the specified value between the minimum and the maximum + + The type of value to clamp + The value. + The minimum. + The maximum. + A value that indicates the relative order of the objects being compared + Determines whether the event is in its set state. @@ -4830,6 +4576,41 @@ All. The sum of all values. + + + Gets the block count. + + The blocks. + The block count for all components. + + + + Gets the minimum start time. + + The blocks. + The minimum Range Start Time + + + + Computes the picture number. + + The start time. + The duration. + The start number. + + The serial picture number + + + + + Computes the smtpe time code. + + The start time offset. + The duration. + The time base. + The display picture number. + The FFmpeg computed SMTPE Timecode + The load mode of FFmpeg Libraries @@ -4857,10 +4638,18 @@ - Connects handlers between the Media Engine and a platfrom-secific implementation + Connects handlers between the Media Engine event signals and a platfrom-secific implementation - + + + Called when [media initializing]. + + The sender. + The stream options. + The media URL. + + Called when [media opening]. @@ -4868,76 +4657,77 @@ The media options. The media information. - + Called when [media opened]. The sender. - + Called when [media closed]. The sender. - + Called when [media failed]. The sender. The e. - + Called when [media ended]. The sender. - + Called when [buffering started]. The sender. - + Called when [buffering ended]. The sender. - + Called when [seeking started]. The sender. - + Called when [seeking ended]. The sender. - + Called when [message logged]. The sender. The instance containing the event data. - + Called when [position changed]. The sender. - The position. + The old value. + The new value. - + - Called when an underlying media engine property is changed. - This is used to handle property change notifications + Called when [media state changed]. The sender. - Name of the property. + The old value. + The new value. @@ -5029,7 +4819,7 @@ - Fills the memory with the specified value repeated. + Fills the memory with the specified value. The start address. The length. @@ -5241,139 +5031,297 @@ - Media States compatible with MediaState enumeration + Contains all the status properties of the stream being handled by the media engine. - + - The manual state + Gets the guessed buffered bytes in the packet queue per second. + If bitrate information is available, then it returns the bitrate converted to byte rate. + Returns null if it has not been guessed. - + - The play state + Initializes static members of the class. - + - The close state + Initializes a new instance of the class. + + The parent. + + + + Gets or Sets the SpeedRatio property of the media. - + - The pause state + Gets or Sets the Position property on the MediaElement. - + - The stop state + Gets or Sets the Source on this MediaElement. + The Source property is the Uri of the media to be played. - + - Contains options for the format context as documented: - https://ffmpeg.org/ffmpeg-formats.html#Format-Options - TODO: There are still quite a bit of options that have not been implemented. + Gets/Sets the Volume property on the MediaElement. + Note: Valid values are from 0 to 1 - + - Port of avioflags direct + Gets/Sets the Balance property on the MediaElement. - + - Set probing size in bytes, i.e. the size of the data to analyze to get stream information. - A higher value will enable detecting more information in case it is dispersed into the stream, - but will increase latency. Must be an integer not lesser than 32. It is 5000000 by default. + Gets/Sets the IsMuted property on the MediaElement. - + - Set packet size. + Provides key-value pairs of the metadata contained in the media. + Returns null when media has not been loaded. - + - Ignore index. - Port of ffflags + Gets the media format. Returns null when media has not been loaded. - + - Enable fast, but inaccurate seeks for some formats. - Port of ffflags + Gets the duration of a single frame step. + If there is a video component with a framerate, this propery returns the length of a frame. + If there is no video component it simply returns a tenth of a second. - + - Generate PTS. - Port of genpts + Returns whether the given media has audio. + Only valid after the MediaOpened event has fired. - + - Do not fill in missing values that can be exactly calculated. - Port of ffflags + Returns whether the given media has video. Only valid after the + MediaOpened event has fired. - + - Ignore DTS. - Port of ffflags + Gets the video codec. + Only valid after the MediaOpened event has fired. - + - Discard corrupted frames. - Port of ffflags + Gets the video bitrate. + Only valid after the MediaOpened event has fired. - + - Try to interleave output packets by DTS. - Port of ffflags + Returns the natural width of the media in the video. + Only valid after the MediaOpened event has fired. - + - Do not merge side data. - Port of ffflags + Returns the natural height of the media in the video. + Only valid after the MediaOpened event has fired. - + - Enable RTP MP4A-LATM payload. - Port of ffflags + Gets the video frame rate. + Only valid after the MediaOpened event has fired. - + - Reduce the latency introduced by optional buffering - Port of ffflags + Gets the duration in seconds of the video frame. + Only valid after the MediaOpened event has fired. - + - Stop muxing at the end of the shortest stream. - It may be needed to increase max_interleave_delta to avoid flushing the longer streams before EOF. - Port of ffflags + Gets the audio codec. + Only valid after the MediaOpened event has fired. - + - Allow seeking to non-keyframes on demuxer level when supported if set to 1. Default is 0. + Gets the audio bitrate. + Only valid after the MediaOpened event has fired. - + - Gets or sets the maximum duration to be analyzed before ifentifying stream information. - In realtime streams this can be reduced to reduce latency (i.e. TimeSpan.Zero) + Gets the audio channels count. + Only valid after the MediaOpened event has fired. - + - Set decryption key. + Gets the audio sample rate. + Only valid after the MediaOpened event has fired. + + + + + Gets the audio bits per sample. + Only valid after the MediaOpened event has fired. + + + + + Gets the Media's natural duration + Only valid after the MediaOpened event has fired. + + + + + Returns whether the currently loaded media can be paused. + This is only valid after the MediaOpened event has fired. + Note that this property is computed based on wether the stream is detected to be a live stream. + + + + + Returns whether the currently loaded media is live or real-time and does not have a set duration + This is only valid after the MediaOpened event has fired. + + + + + Returns whether the currently loaded media is a network stream. + This is only valid after the MediaOpened event has fired. + + + + + Gets a value indicating whether the currently loaded media can be seeked. + + + + + Gets a value indicating whether the media is playing. + + + + + Gets a value indicating whether the media is paused. + + + + + Gets a value indicating whether this media element + currently has an open media url. + + + + + Gets the current playback state. + + + + + Gets a value indicating whether the media has reached its end. + + + + + Get a value indicating whether the media is buffering. + + + + + Gets a value indicating whether the media seeking is in progress. + + + + + Returns the current video SMTPE timecode if available. + If not available, this property returns an empty string. + + + + + Gets the name of the video hardware decoder in use. + Enabling hardware acceleration does not guarantee decoding will be performed in hardware. + When hardware decoding of frames is in use this will return the name of the HW accelerator. + Otherwise it will return an empty string. + + + + + Gets a value that indicates the percentage of buffering progress made. + Range is from 0 to 1 + + + + + The packet buffer length. + It is adjusted to 1 second if bitrate information is available. + Otherwise, it's simply 512KB and it is guessed later on. + + + + + Gets a value that indicates the percentage of download progress made. + Range is from 0 to 1 + + + + + Gets the maximum packet buffer length, according to the bitrate (if available). + If it's a realtime stream it will return 30 times the buffer cache length. + Otherwise, it will return 4 times of the buffer cache length. + + + + + Gets a value indicating whether the media is in the process of opening. + + + + + Updates the position. + + The position. + + + + Updates the MediaState property. + + State of the media. + The new position value for this state. + + + + Resets the controller properies. + + + + + Resets all the buffering properties to their defaults. + + + + + Updates the buffering properties: IsBuffering, BufferingProgress, DownloadProgress. + + + + + Guesses the bitrate of the input stream. @@ -5707,29 +5655,6 @@ Gets the name of the program. Empty if unavailable. - - - A dictionary containing generic input options for both: - Global Codec Options: https://www.ffmpeg.org/ffmpeg-all.html#Codec-Options - Demuxer-Private options: https://ffmpeg.org/ffmpeg-all.html#Demuxers - - - - - Initializes a new instance of the class. - - - - - A collection of well-known demuxer-specific, non-global format options - TODO: Implement some of the more common names maybe? - - - - - mpegts - - Represents the contents of a logging message that was sent to the log manager. @@ -5801,39 +5726,8 @@ - Represents a set of options that are used to initialize a media container. - - - - - Initializes a new instance of the class. - - - - - Gets or sets the forced input format. If let null or empty, - the input format will be selected automatically. - - - - - Gets or sets a value indicating whether [enable low resource]. - In theroy this should be 0,1,2,3 for 1, 1/2, 1,4 and 1/8 resolutions. - TODO: We are for now just supporting 1/2 rest (true value) - Port of lowres. - - - - - Gets or sets a value indicating whether [enable fast decoding]. - Port of fast - - - - - A dictionary containing generic input options for both: - Global Codec Options: https://www.ffmpeg.org/ffmpeg-all.html#Codec-Options - Demuxer-Private Options: https://ffmpeg.org/ffmpeg-all.html#Demuxers + Represetnts options that applied before initializing media components and their corresponding + codecs. Once the container has created the media components, changing these options will have no effect. @@ -5843,10 +5737,18 @@ Port of codec_opts - + - Contains options for the format context as documented: - https://ffmpeg.org/ffmpeg-formats.html#Format-Options + Gets or sets a value indicating whether [enable low resource]. + In theroy this should be 0,1,2,3 for 1, 1/2, 1,4 and 1/8 resolutions. + TODO: We are for now just supporting 1/2 resolution (true value) + Port of lowres. + + + + + Gets or sets a value indicating whether [enable fast decoding]. + Port of fast @@ -5855,11 +5757,6 @@ Defaults to false. This feature is experimental. - - - Gets or sets the amount of time to wait for a an open or read operation to complete. - - Prevent reading from audio stream components. @@ -5936,6 +5833,211 @@ The subtitle media type (3) + + + Media States compatible with MediaState enumeration + + + + + The manual status + + + + + The play status + + + + + The close status + + + + + The pause status + + + + + The stop status + + + + + Contains options for the format context as documented: + https://ffmpeg.org/ffmpeg-formats.html#Format-Options + TODO: There are still quite a bit of options that have not been implemented. + + + + + Initializes a new instance of the class. + + + + + Port of avioflags direct + + + + + Set probing size in bytes, i.e. the size of the data to analyze to get stream information. + A higher value will enable detecting more information in case it is dispersed into the stream, + but will increase latency. Must be an integer not lesser than 32. It is 5000000 by default. + + + + + Set packet size. + + + + + Ignore index. + Port of ffflags + + + + + Enable fast, but inaccurate seeks for some formats. + Port of ffflags + + + + + Generate PTS. + Port of genpts + + + + + Do not fill in missing values that can be exactly calculated. + Port of ffflags + + + + + Ignore DTS. + Port of ffflags + + + + + Discard corrupted frames. + Port of ffflags + + + + + Try to interleave output packets by DTS. + Port of ffflags + + + + + Do not merge side data. + Port of ffflags + + + + + Enable RTP MP4A-LATM payload. + Port of ffflags + + + + + Reduce the latency introduced by optional buffering + Port of ffflags + + + + + Stop muxing at the end of the shortest stream. + It may be needed to increase max_interleave_delta to avoid flushing the longer streams before EOF. + Port of ffflags + + + + + Allow seeking to non-keyframes on demuxer level when supported if set to 1. Default is 0. + + + + + Gets or sets the maximum duration to be analyzed before ifentifying stream information. + In realtime streams this can be reduced to reduce latency (i.e. TimeSpan.Zero) + + + + + Set decryption key. + + + + + A dictionary containing generic input options for both: + Global Codec Options: https://www.ffmpeg.org/ffmpeg-all.html#Codec-Options + Demuxer-Private options: https://ffmpeg.org/ffmpeg-all.html#Demuxers + + + + + Initializes a new instance of the class. + + + + + Gets or sets the forced input format. If let null or empty, + the input format will be selected automatically. + + + + + Gets or sets the amount of time to wait for a an open or read operation to complete. + + + + + A collection of well-known demuxer-specific, non-global format options + TODO: Implement some of the more common names maybe? + + + + + mpegts + + + + + Represents a set of options that are used to initialize a media container before opening the stream. + + + + + Initializes a new instance of the class. + + + + + Contains options for the format context as documented: + https://ffmpeg.org/ffmpeg-formats.html#Format-Options + + + + + A dictionary containing generic input options for both: + Global Codec Options: https://www.ffmpeg.org/ffmpeg-all.html#Codec-Options + Demuxer-Private Options: https://ffmpeg.org/ffmpeg-all.html#Demuxers + + + + + Gets the protocol prefix. + Typically async for local files and empty for other types. + + A subtitle frame container. Simply contains text lines. diff --git a/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/ffme/ffme.win.dll b/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/ffme/ffme.win.dll index ded9ef7..da9ea45 100644 Binary files a/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/ffme/ffme.win.dll and b/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/ffme/ffme.win.dll differ diff --git a/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/ffme/ffme.win.xml b/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/ffme/ffme.win.xml index f06bb3d..95951c8 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/ffme/ffme.win.xml +++ b/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/ffme/ffme.win.xml @@ -9,9 +9,9 @@ Contains metadata about a raw bitmap back-buffer - + - Initializes a new instance of the class. + Initializes a new instance of the class. The scan0. The stride. @@ -20,6 +20,13 @@ Height of the pixel. The dpi x. The dpi y. + The palette. + The pixel format. + + + + Gets the length of the buffer (Stride x Pixel Height). + @@ -66,6 +73,16 @@ Gets the update rect. + + + Gets the palette. + + + + + Gets the pixel format. + + Creates a buffer reference from the bitmap. Please Lock the bitmap before calling this method. @@ -73,6 +90,56 @@ The w. The corresponding buffer + + + Represents the event arguments of the MediaInitializing routed event. + + + + + + Initializes a new instance of the class. + + The routed event. + The source. + The options. + The URL. + + + + Set or change the options before the media is opened. + + + + + Gets the URL. + + + + + Contains the media state changed routed event args + + + + + + Initializes a new instance of the class. + + The routed event. + The source. + State of the previous. + The new state. + + + + Gets the current media state. + + + + + Gets the position. + + Provides the audio samples rendering payload as event arguments. @@ -213,7 +280,7 @@ - + Initializes a new instance of the class. @@ -288,17 +355,23 @@ - + - Initializes a new instance of the class. + Initializes a new instance of the class. The routed event. The source. - The position. + The old position. + The new position. - Gets the position. + Gets the current position. + + + + + Gets the old position. @@ -327,35 +400,978 @@ Typically, options are set based on what this information contains. - + - Defines a generic graphical context (compatibility between WPF and WinForms apps) + Represents a control that contains audio and/or video. + In contrast with System.Windows.Controls.MediaElement, this version uses + the FFmpeg library to perform reading and decoding of media streams. + + + + + + + + + Holds the state of the notification properties - + - Gets a value indicating whetherthe context is in design time + The reportable position synchronization lock - + - Returns true if the graphical context is valid. + The property updates worker timer - + - Enqueues a UI call + The backing member of the Reportable position - The priority. + + + + The media engine position to report. + + + + + Starts the property updates worker. + + MediaElement does not have minimum set of MediaProperties + + + + Handles the asynchronous dispose of the underlying Media Engine. + + + + + Updates the notification properties. + + + + + Updates the dependency properties. + + + + + Occurs right before the video is presented on the screen. + You can update the pizels on the bitmap before it is rendered on the screen. + Or you could take a screenshot. + Ensure you handle this very quickly as it runs on the UI thread. + + + + + Occurs right before the audio is added to the audio buffer. + You can update the bytes before they are enqueued. + Ensure you handle this quickly before you get choppy audio. + + + + + Occurs right before the subtitles are rendered. + You can update the text. + Ensure you handle this quickly before you get choppy subtitles. + + + + + Raises the rendering video event. + + The block. + The bitmap. + The clock. + + + + Raises the rendering audio event. + + The audio block. + The clock. + + + + Raises the rendering subtitles event. + + The block. + The clock. + True if the rendering should be prevented + + + + The affects measure and render metadata options + + + + + The allow content change flag + + + + + IUriContext BaseUri backing + + + + + Holds the Media Engine + + + + + TO detect redundant calls + + + + + Initializes static members of the class. + + + + + Initializes a new instance of the class. + + + + + Occurs when a logging message from the FFmpeg library has been received. + This is shared across all instances of Media Elements + + + + + Occurs when a logging message has been logged. + This does not include FFmpeg messages. + + + + + Multicast event for property change notifications. + + + + + Gets or sets the FFmpeg path from which to load the FFmpeg binaries. + You must set this path before setting the Source property for the first time on any instance of this control. + Settng this property when FFmpeg binaries have been registered will throw an exception. + + + + + Specifies the bitwise flags that correspond to FFmpeg library identifiers. + Please use the class for valid combinations. + If FFmpeg is already loaded, the value cannot be changed. + + + + + Gets or sets the base URI of the current application context. + + + + + Provides access to the underlying media engine driving this control. + This property is intender for advance usages only. + + + + + This is the image that holds video bitmaps + + + + + A viewbox holding the subtitle text blocks + + + + + Gets the grid control holding the rest of the controls. + + + + + Begins or resumes playback of the currently loaded media. + + The awaitable command + + + + Pauses playback of the currently loaded media. + + The awaitable command + + + + Pauses and rewinds the currently loaded media. + + The awaitable command + + + + Closes the currently loaded media. + + The awaitable command + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Binds the property. + + The target. + The target property. + The source. + The source path. + The mode. + + + + Called when [coerce content value]. + + The d. + The base value. + The content property value + When content has been locked. + + + + Initializes the component. + + + + + Gets/Sets the Volume property on the MediaElement. + Note: Valid values are from 0 to 1 + + + + + The DependencyProperty for the MediaElement.Volume property. + + + + + Gets/Sets the Balance property on the MediaElement. + + + + + The DependencyProperty for the MediaElement.Balance property. + + + + + Gets/Sets the IsMuted property on the MediaElement. + + + + + The DependencyProperty for the MediaElement.IsMuted property. + + + + + Gets/Sets the SpeedRatio property on the MediaElement. + + + + + The DependencyProperty for the MediaElement.SpeedRatio property. + + + + + Gets/Sets the Position property on the MediaElement. + + + + + The DependencyProperty for the MediaElement.Position property. + + + + + Gets/Sets the Source on this MediaElement. + The Source property is the Uri of the media to be played. + + + + + DependencyProperty for FFmpegMediaElement Source property. + + + + + Gets/Sets the Stretch on this MediaElement. + The Stretch property determines how large the MediaElement will be drawn. + + + + + DependencyProperty for Stretch property. + + + + + Gets/Sets the stretch direction of the Viewbox, which determines the restrictions on + scaling that are applied to the content inside the Viewbox.  For instance, this property + can be used to prevent the content from being smaller than its native size or larger than + its native size. + + + + + DependencyProperty for StretchDirection property. + + + + + Gets or sets a value that indicates whether the MediaElement will update frames + for seek operations while paused. This is a dependency property. + + + + + The DependencyProperty for the MediaElement.ScrubbingEnabled property. + + + + + Specifies the action that the media element should execute when it + is loaded. The default behavior is that it is under manual control + (i.e. the caller should call methods such as Play in order to play + the media). If a source is set, then the default behavior changes to + to be playing the media. If a source is set and a loaded behavior is + also set, then the loaded behavior takes control. + + + + + The DependencyProperty for the MediaElement.LoadedBehavior property. + + + + + Specifies how the underlying media should behave when + it has ended. The default behavior is to Pause the media. + + + + + The DependencyProperty for the MediaElement.UnloadedBehavior property. + + + + + Gets the Media's natural duration + Only valid after the MediaOpened event has fired. + + + + + Provides key-value pairs of the metadata contained in the media. + Returns null when media has not been loaded. + + + + + Gets the media format. Returns null when media has not been loaded. + + + + + Gets the duration of a single frame step. + If there is a video component with a framerate, this propery returns the length of a frame. + If there is no video component it simply returns a tenth of a second. + + + + + Returns whether the given media has audio. + Only valid after the MediaOpened event has fired. + + + + + Returns whether the given media has video. Only valid after the + MediaOpened event has fired. + + + + + Gets the video codec. + Only valid after the MediaOpened event has fired. + + + + + Gets the video bitrate. + Only valid after the MediaOpened event has fired. + + + + + Returns the natural width of the media in the video. + Only valid after the MediaOpened event has fired. + + + + + Returns the natural height of the media in the video. + Only valid after the MediaOpened event has fired. + + + + + Gets the video frame rate. + Only valid after the MediaOpened event has fired. + + + + + Gets the duration in seconds of the video frame. + Only valid after the MediaOpened event has fired. + + + + + Gets the name of the video hardware decoder in use. + Enabling hardware acceleration does not guarantee decoding will be performed in hardware. + When hardware decoding of frames is in use this will return the name of the HW accelerator. + Otherwise it will return an empty string. + + + + + Gets the audio codec. + Only valid after the MediaOpened event has fired. + + + + + Gets the audio bitrate. + Only valid after the MediaOpened event has fired. + + + + + Gets the audio channels count. + Only valid after the MediaOpened event has fired. + + + + + Gets the audio sample rate. + Only valid after the MediaOpened event has fired. + + + + + Gets the audio bits per sample. + Only valid after the MediaOpened event has fired. + + + + + Returns whether the currently loaded media can be paused. + This is only valid after the MediaOpened event has fired. + Note that this property is computed based on wether the stream is detected to be a live stream. + + + + + Returns whether the currently loaded media is live or realtime + This is only valid after the MediaOpened event has fired. + + + + + Returns whether the currently loaded media is a network stream. + This is only valid after the MediaOpened event has fired. + + + + + Gets a value indicating whether the currently loaded media can be seeked. + + + + + Gets a value indicating whether the media is playing. + + + + + Gets a value indicating whether the media is playing. + + + + + Gets a value indicating whether the media has reached its end. + + + + + Get a value indicating whether the media is buffering. + + + + + Gets a value indicating whether the media seeking is in progress. + + + + + Returns the current video SMTPE timecode if available. + If not available, this property returns an empty string. + + + + + Gets a value that indicates the percentage of buffering progress made. + Range is from 0 to 1 + + + + + The wait packet buffer length. + It is adjusted to 1 second if bitrate information is available. + Otherwise, it's simply 512KB + + + + + Gets a value that indicates the percentage of download progress made. + Range is from 0 to 1 + + + + + Gets the maximum packet buffer length, according to the bitrate (if available). + If it's a realtime stream it will return 30 times the buffer cache length. + Otherwise, it will return 4 times of the buffer cache length. + + + + + Gets a value indicating whether the media is in the process of opening. + + + + + Gets a value indicating whether this media element + currently has an open media url. + + + + + Gets the current playback state. + + + + + BufferingStarted is a routed event + + + + + BufferingEnded is a routed event + + + + + SeekingStarted is a routed event + + + + + SeekingEnded is a routed event + + + + + MediaFailedEvent is a routed event. + + + + + MediaOpened is a routed event. + + + + + MediaClosed is a routed event. + + + + + MediaOpeningEvent is a routed event. + + + + + MediaOpeningEvent is a routed event. + + + + + PositionChanged is a routed event + + + + + MediaStateChanged is a routed event + + + + + MediaEnded is a routed event + + + + + Occurs when buffering of packets was started + + + + + Occurs when buffering of packets was Ended + + + + + Occurs when Seeking of packets was started + + + + + Occurs when Seeking of packets was Ended + + + + + Raised when the media fails to load or a fatal error has occurred which prevents playback. + + + + + Raised when the media is opened + + + + + Raised when the media is closed + + + + + Raised before the input stream of the media is opened. + Use this method to modify the media options. + + + + + Raised before the input stream of the media is initialized. + Use this method to modify the input options. + + + + + Raised when the corresponding media ends. + + + + + Occurs when media position is changed + + + + + Occurs when media state is changed + + + + + Creates a new instance of exception routed event arguments. + This method exists because the constructor has not been made public for that class. + + The routed event. + The sender. + The error exception. + The event arguments + + + + Raises the FFmpeg message logged. + + The sender. + The instance containing the event data. + + + + Raises the message logged event. + + The instance containing the event data. + + + + Raises the media failed event. + + The ex. + + + + Raises the media opened event. + + + + + Raises the media closed event. + + + + + Raises the media opening event. + + The options. + The media information. + + + + Raises the media opening event. + + The options. + The URL. + + + + Raises the position changed event. + + The old value. + The new value. + + + + Raises the media state changed event. + + The old value. + The new value. + + + + Raises the buffering started event. + + + + + Raises the buffering ended event. + + + + + Raises the Seeking started event. + + + + + Raises the Seeking ended event. + + + + + Raises the media ended event. + + + + + Notifies listeners that a property value has changed. + This must be called from a UI thread. + + Name of the property used to notify listeners. This + value is optional and can be provided automatically when invoked from compilers + that support . + + + + Logs the start of an event + + The event. + + + + Logs the end of an event. + + The event. + + + + Encapsulates different types of timers for different GUI context types + into a single API. It provides one-at-a-time synchronized execution of the supplied + Action. Call Dispose on an instance to stop the timer. + + + + + + Initializes a new instance of the class. + + Type of the context. + The interval. The callback. - The arguments. + The dispose callback. - + - Synchronously invokes the call on the UI thread + Initializes a new instance of the class. + + The callback. + + + + Gets the type of the context. + + + + + Gets the interval. + + + + + Gets a value indicating whether this instance is executing a cycle. + + + + + Waits for one cycle to be completed. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Runs the timer cycle. + + The state. + + + + Creates the threading timer. + + The timer + + + + Creates the dispatcher timer. + + The timer + + + + Creates the forms timer. + + The timer + + + + A helper class to map and process synchronization + between media engine state properties and the MediaElement control. + + + + + Initializes static members of the class. + + When a property exposed by the underlying MediaCore is not mapped. + + + + Contains the property names found in the Media Engine State type, but not found in the Media Element + + + + + Gets the media element dependency properties. + + + + + Gets the media element notification properties. + + + + + Gets the media engine state properties. + + + + + Detects the properties that have changed since the last snapshot. + + The m. + The last snapshot. + A list of property names that have changed. + + + + Detects which dependendy properties are out of sync with the Media Engine State properties + + The m. + A dictionary of dependency properties to synchonize along with the engine values. + + + + Compiles the state into the target dictionary of property names and property values + + The m. + The target. + + + + Retrieves the dependency properties. + + The t. + A list of dependency properties + + + + Retrieves the properties. + + The t. + if set to true [declared only]. + A list of properties + + + + Enumerates GUI Context Types + + + + + The none + + + + + The WPF + + + + + The win forms - The priority. - The action. @@ -367,87 +1383,96 @@ Initializes a new instance of the class. - The control. + The control. - + Called when [buffering ended]. The sender. - + Called when [buffering started]. The sender. - + Called when [media closed]. The sender. - + Called when [media ended]. The sender. - + Called when [media failed]. The sender. The e. - + Called when [media opened]. The sender. - + Called when [media opening]. The sender. - The media options. + The media options. The media information. - + + + Called when [media initializing]. + + The sender. + The options. + The URL. + + Called when [message logged]. The sender. The instance containing the event data. - - - Called when [position changed]. - - The sender. - The position. - - - - Called when an underlying media engine property is changed. - This is used to handle property change notifications - - The sender. - Name of the property. - - + Called when [seeking ended]. The sender. - + Called when [seeking started]. The sender. + + + Called when [position changed]. + + The sender. + The old value. + The new value. + + + + Called when [media state changed]. + + The sender. + The old value. + The new value. + Windows-specific native methods @@ -463,6 +1488,26 @@ Prevents a default instance of the class from being created. + + + Enumerates memory copy methods + + + + + The native + + + + + The parallel native + + + + + The buffer + + Gets the instance. @@ -471,13 +1516,10 @@ The instance. - + - Fast pointer memory block copy function + Gets or sets a value indicating whether Parallel Copy is enabled. - The target address. - The source address. - Length of the copy. @@ -496,6 +1538,23 @@ True for success. False for failure + + + Fast pointer memory block copy function + + The target address. + The source address. + Length of the copy. + + + + An experimetal method of copying large chunks of memory in parallel. + Does not seem to have any advantages of the native CopyMemory direct call. + + The target address. + The source address. + Length of the copy. + Contains Interop native methods @@ -554,11 +1613,6 @@ Retrieves the platform-specific Native methods - - - Gets the GUI contaxt implementation. - - Gets a value indicating whether this instance is in debug mode. @@ -586,107 +1640,107 @@ The message. - + - The Windows forms graphical context - - - - - - The application synchronization context + The WPF or WinForms graphical context - + - Initializes static members of the class. + Initializes static members of the class. - + - Prevents a default instance of the class from being created. + Prevents a default instance of the class from being created. - - - Gets the current. - - - - - Gets a value indicating whetherthe context is in design time - - - - - Returns true if this context is valid. - - - - - Enqueues a UI call - - The priority. - The callback. - The arguments. - - - - Synchronously invokes the call on the UI thread - - The priority. - The action. - - - - The WPF graphical context - - - - - - The WPF dispatcher - - - - - Initializes static members of the class. - - - - - Prevents a default instance of the class from being created. - - - + Gets the current instance. - + + + Gets the synchronization context. + + + + + Gets the thread on which this context was created + + + + + Gets the GUI dispatcher. Only valid for WPF contexts + + + Gets a value indicating whetherthe context is in design time - + Returns true if this context is valid. - + - Enqueues a UI call + Gets the type of the context. + + + + + Invokes a task on the GUI thread The priority. The callback. The arguments. + The awaitable task. - + - Synchronously invokes the call on the UI thread + Invokes a task on the GUI thread The priority. - The action. + The callback. + The awaitable task + + + + Invokes a task on the GUI thread + + The callback. + The awaitable task + + + + Invokes a task on the GUI thread + + The callback. + + + + Invokes a task on the GUI thread + + The priority. + The callback. + + + + Invokes a task on the GUI thread + + The callback. + The awaitable task + + + + Invokes a task on the GUI thread + + The priority. + The callback. + The awaitable task @@ -990,784 +2044,253 @@ Provides direct access to mapped DLL methods - + - Represents a control that contains audio and/or video. - In contrast with System.Windows.Controls.MediaElement, this version uses - the FFmpeg library to perform reading and decoding of media streams. + Defines attached properties for subtitle rendering - - - - - + - Occurs right before the video is presented on the screen. - You can update the pizels on the bitmap before it is rendered on the screen. - Or you could take a screenshot. - Ensure you handle this very quickly as it runs on the UI thread. + The foreground text property - + - Occurs right before the audio is added to the audio buffer. - You can update the bytes before they are enqueued. - Ensure you handle this quickly before you get choppy audio. + The text foreground effect dependency property - + - Occurs right before the subtitles are rendered. - You can update the text. - Ensure you handle this quickly before you get choppy subtitles. + The text outline width dependency property - + - Raises the rendering video event. + The text outline brush dependency property - The block. - The bitmap. - The clock. - + - Raises the rendering audio event. + The font size property - The audio block. - The clock. - + - Raises the rendering subtitles event. + The font weight property - The block. - The clock. - True if the rendering should be prevented - + - IUriContext BaseUri backing + The font family property - + - Holds the Media Engine + Gets the size of the font. + The object. + The value - + - Initializes static members of the class. + Gets the font weight. + The object. + The value - + - Initializes a new instance of the class. + Gets the font family. + The object. + The value - + - Occurs when a logging message from the FFmpeg library has been received. - This is shared across all instances of Media Elements + Gets the text foreground. + The object. + The value - + - Occurs when a logging message has been logged. - This does not include FFmpeg messages. + Gets the effect. + The object. + The value - + - Multicast event for property change notifications. + Gets the width of the outline. + The object. + The value. - + - Gets or sets the FFmpeg path from which to load the FFmpeg binaries. - You must set this path before setting the Source property for the first time on any instance of this control. - Settng this property when FFmpeg binaries have been registered will throw an exception. + Gets the outline brush. + The object. + The value. - + - Specifies the bitwise flags that correspond to FFmpeg library identifiers. - Please use the class for valid combinations. - If FFmpeg is already loaded, the value cannot be changed. + Sets the size of the font. + The object. + The value. - + - Provides access to the underlying media engine driving this control. - This property is intender for advance usages only. + Sets the font weight. + The object. + The value. - + - Gets or sets the base URI of the current application context. + Sets the font family. + The object. + The value. - + - This is the image that holds video bitmaps + Sets the text foreground. + The object. + The value. - + - A viewbox holding the subtitle text blocks + Sets the effect. + The object. + The value. - + - Gets the grid control holding the rest of the controls. + Sets the width of the outline. + The object. + The value. - + - When position is being set from within this control, this field will - be set to true. This is useful to detect if the user is setting the position - or if the Position property is being driven from within + Sets the outline brush. + The object. + The value. - - - Begins or resumes playback of the currently loaded media. - - The awaitable command - - - - Pauses playback of the currently loaded media. - - The awaitable command - - - - Pauses and rewinds the currently loaded media. - - The awaitable command - - - - Closes the currently loaded media. - - The awaitable command - - - - Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - - - - - Invoked whenever the effective value of any dependency property on this has been updated. The specific dependency property that changed is reported in the arguments parameter. Overrides . - - The event data that describes the property that changed, as well as old and new values. - - - - DependencyProperty for FFmpegMediaElement Source property. - - - - - DependencyProperty for Stretch property. - - - - - DependencyProperty for StretchDirection property. - - - - - The DependencyProperty for the MediaElement.Balance property. - - - - - The DependencyProperty for the MediaElement.IsMuted property. - - - - - The DependencyProperty for the MediaElement.SpeedRatio property. - - - - - The DependencyProperty for the MediaElement.Volume property. - - - - - The DependencyProperty for the MediaElement.ScrubbingEnabled property. - - - - - The DependencyProperty for the MediaElement.UnloadedBehavior property. - TODO: Currently this property has no effect. Needs implementation. - - - - - The DependencyProperty for the MediaElement.LoadedBehavior property. - - - - - The DependencyProperty for the MediaElement.Position property. - - - - - Gets/Sets the Source on this MediaElement. - The Source property is the Uri of the media to be played. - - - - - Gets/Sets the Stretch on this MediaElement. - The Stretch property determines how large the MediaElement will be drawn. - - - - - Gets/Sets the stretch direction of the Viewbox, which determines the restrictions on - scaling that are applied to the content inside the Viewbox.  For instance, this property - can be used to prevent the content from being smaller than its native size or larger than - its native size. - - - - - Specifies the behavior that the media element should have when it - is loaded. The default behavior is that it is under manual control - (i.e. the caller should call methods such as Play in order to play - the media). If a source is set, then the default behavior changes to - to be playing the media. If a source is set and a loaded behavior is - also set, then the loaded behavior takes control. - - - - - Gets/Sets the SpeedRatio property on the MediaElement. - - - - - Specifies how the underlying media should behave when - it has ended. The default behavior is to Close the media. - - - - - Gets/Sets the Volume property on the MediaElement. - Note: Valid values are from 0 to 1 - - - - - Gets/Sets the Balance property on the MediaElement. - - - - - Gets/Sets the IsMuted property on the MediaElement. - - - - - Gets or sets a value that indicates whether the MediaElement will update frames - for seek operations while paused. This is a dependency property. - - - - - Gets/Sets the Position property on the MediaElement. - - - - - Provides key-value pairs of the metadata contained in the media. - Returns null when media has not been loaded. - - - - - Gets the media format. Returns null when media has not been loaded. - - - - - Gets the duration of a single frame step. - If there is a video component with a framerate, this propery returns the length of a frame. - If there is no video component it simply returns a tenth of a second. - - - - - Returns whether the given media has audio. - Only valid after the MediaOpened event has fired. - - - - - Returns whether the given media has video. Only valid after the - MediaOpened event has fired. - - - - - Gets the video codec. - Only valid after the MediaOpened event has fired. - - - - - Gets the video bitrate. - Only valid after the MediaOpened event has fired. - - - - - Returns the natural width of the media in the video. - Only valid after the MediaOpened event has fired. - - - - - Returns the natural height of the media in the video. - Only valid after the MediaOpened event has fired. - - - - - Gets the video frame rate. - Only valid after the MediaOpened event has fired. - - - - - Gets the duration in seconds of the video frame. - Only valid after the MediaOpened event has fired. - - - - - Gets the name of the video hardware decoder in use. - Enabling hardware acceleration does not guarantee decoding will be performed in hardware. - When hardware decoding of frames is in use this will return the name of the HW accelerator. - Otherwise it will return an empty string. - - - - - Gets the audio codec. - Only valid after the MediaOpened event has fired. - - - - - Gets the audio bitrate. - Only valid after the MediaOpened event has fired. - - - - - Gets the audio channels count. - Only valid after the MediaOpened event has fired. - - - - - Gets the audio sample rate. - Only valid after the MediaOpened event has fired. - - - - - Gets the audio bits per sample. - Only valid after the MediaOpened event has fired. - - - - - Gets the Media's natural duration - Only valid after the MediaOpened event has fired. - - - - - Returns whether the currently loaded media can be paused. - This is only valid after the MediaOpened event has fired. - Note that this property is computed based on wether the stream is detected to be a live stream. - - - - - Returns whether the currently loaded media is live or realtime - This is only valid after the MediaOpened event has fired. - - - - - Gets a value indicating whether the currently loaded media can be seeked. - - - - - Gets a value indicating whether the media is playing. - - - - - Gets a value indicating whether the media has reached its end. - - - - - Get a value indicating whether the media is buffering. - - - - - Gets a value indicating whether the media seeking is in progress. - - - - - Returns the current video SMTPE timecode if available. - If not available, this property returns an empty string. - - - - - Gets a value that indicates the percentage of buffering progress made. - Range is from 0 to 1 - - - - - The wait packet buffer length. - It is adjusted to 1 second if bitrate information is available. - Otherwise, it's simply 512KB - - - - - Gets a value that indicates the percentage of download progress made. - Range is from 0 to 1 - - - - - Gets the maximum packet buffer length, according to the bitrate (if available). - If it's a realtime stream it will return 30 times the buffer cache length. - Otherwise, it will return 4 times of the buffer cache length. - - - - - Gets a value indicating whether the media is in the process of opening. - - - - - Gets a value indicating whether this media element - currently has an open media url. - - - - - Gets the current playback state. - - - - - BufferingStarted is a routed event - - - - - BufferingEnded is a routed event - - - - - SeekingStarted is a routed event - - - - - SeekingEnded is a routed event - - - - - MediaFailedEvent is a routed event. - - - - - MediaOpened is a routed event. - - - - - MediaClosed is a routed event. - - - - - MediaOpeningEvent is a routed event. - - - - - PositionChanged is a routed event - - - - - MediaEnded is a routed event - - - - - Occurs when buffering of packets was started - - - - - Occurs when buffering of packets was Ended - - - - - Occurs when Seeking of packets was started - - - - - Occurs when Seeking of packets was Ended - - - - - Raised when the media fails to load or a fatal error has occurred which prevents playback. - - - - - Raised when the media is opened - - - - - Raised when the media is closed - - - - - Raised before the input stream of the media is opened. - Use this method to modify the input options. - - - - - Raised when the corresponding media ends. - - - - - Occurs when media position is changed - - - - - Creates a new instance of exception routed event arguments. - This method exists because the constructor has not been made public for that class. - - The routed event. - The sender. - The error exception. - The event arguments - - - - Raises the FFmpeg message logged. - - The sender. - The instance containing the event data. - - - - Raises the message logged event. - - The instance containing the event data. - - - - Raises the media failed event. - - The ex. - - - - Raises the media opened event. - - - - - Raises the media closed event. - - - - - Raises the media opening event. - - The media options. - The media information. - - - - Raises the position changed event. - - The position. - - - - Raises the buffering started event. - - - - - Raises the buffering ended event. - - - - - Raises the Seeking started event. - - - - - Raises the Seeking ended event. - - - - - Raises the media ended event. - - - - - Notifies listeners that a property value has changed. - This must be called from a UI thread. - - Name of the property used to notify listeners. This - value is optional and can be provided automatically when invoked from compilers - that support . - - - - Logs the start of an event - - The event. - - - - Logs the end of an event. - - The event. - - + A control suitable for displaying subtitles. Layout is: UserControl:Viewbox:Grid:TextBlocks - + The text dependency property - + The text foreground dependency property - + The text foreground effect dependency property - + The text outline width dependency property - + The text outline dependency property - + + + The default font size + + + + + The default text foregound + + + + + The default text outline + + + + + The default text outline width + + + + + The default text foreground effect + + + Holds the text blocks that together create an outlined subtitle text display. - + The container for the outlined text blocks - + A Layout transform to condense text. - + - Initializes a new instance of the class. + Initializes a new instance of the class. - + Gets or sets the text contents of this text block. - + Gets or sets the text foreground. - + Gets or sets the text outline. - + Gets or sets the text outline width. - + Gets or sets the text foreground effect. - + Invoked whenever the effective value of any dependency property on this has been updated. The specific dependency property that changed is reported in the arguments parameter. Overrides . The event data that describes the property that changed, as well as old and new values. - + Computes the margin according to the block type. @@ -2635,11 +3158,6 @@ The core media engine. - - - Gets the output format of the audio - - Gets the parent media element (platform specific). @@ -2650,22 +3168,9 @@ Gets the core platform independent player component. - + - Gets or sets the volume. - - - The volume. - - - - - Gets or sets the balance (-1.0 to 1.0). - - - - - Gets or sets a value indicating whether the wave output is muted. + Gets the output format of the audio @@ -2680,17 +3185,6 @@ Gets current audio the position. - - - Gets the desired latency odf the audio device. - Value is always positive and typically 200ms. This means audio gets rendered up to this late behind the wall clock. - - - - - Gets the speed ratio. - - Renders the specified media block. @@ -2769,7 +3263,7 @@ Makes it useless. - + Synchronizes audio rendering to the wall clock. Returns true if additional samples need to be read. @@ -2778,9 +3272,12 @@ The target buffer. The target buffer offset. The requested bytes. - True to continue processing. False to write silence. + The speed ratio. + + True to continue processing. False to write silence. + - + Reads from the Audio Buffer and stretches the samples to the required requested bytes. This will make audio samples sound stretched (low pitch). @@ -2788,8 +3285,9 @@ requested The requested bytes. + The speed ratio. - + Reads from the Audio Buffer and shrinks (averages) the samples to the required requested bytes. This will make audio samples sound shrunken (high pitch). @@ -2797,14 +3295,16 @@ The requested number of bytes. if set to true average samples per block. Otherwise, take the first sample per block only + The speed ratio. - + Reads from the Audio Buffer and uses the SoundTouch audio processor to adjust tempo The result is put to the first requestedBytes count of the ReadBuffer. This feature is experimental The requested bytes. + The speed ratio. @@ -2921,11 +3421,6 @@ Contains an equivalence lookup of FFmpeg pixel fromat and WPF pixel formats. - - - The action to perform when a render is enqueued on the UI thread. - - The bitmap that is presented to the user. @@ -2936,16 +3431,6 @@ Set when a bitmap is being written to the target bitmap - - - The load block buffer on locking - - - - - The raise video event on GUI - - Initializes a new instance of the class. @@ -3017,17 +3502,25 @@ Executed when the Close method is called on the parent MediaElement - + - Initializes the target bitmap if not available and locks it for loading the back-buffer. + Renders the target bitmap. + + The block. + The bitmap data. + The clock position. + + + + Initializes the target bitmap if not available and locks it for loading the back-buffer. + This method needs to be called from the GUI thread. The block. - The priority. The locking result. Returns a null pointer on back buffer for invalid. - + Loads that target data buffer with block data