Skip to content

Commit

Permalink
Better states (#262)
Browse files Browse the repository at this point in the history
* Better State management, better mediablockbuffer indexing and neighbor addressing, removal of reportable position, fewer but more efficient position updates. still WIP!

* Minor block rendering check.

* Removing SpeedRatio as a command. Homogeneus Controller property management. Adding PAcketQueue callbacks (Clear, Dequeued) at the componentset level. Improved Buffering property management. Improving Decoder worker sync-buffering logic.  PropertyMapper now only requires IMEdiaEngineState interface as opposed to the full MediaEngineState. AudioRenderer now uses Vurrent MediaEngineState properties. ClosedCpations are now strictly ordered. Minor safeguard checks in VideoRenderer.

Still TODO:
PendingSeeks not synced up because the awaiter might already be active
ChangeMedia not resuming playback
Remove Console.WriteLines STATE CHANGED: message logging
Review PositionChanged event firing

* More work towards issue #250

* smoother seeking and position state management

* centralizing clock and position updates/reset (issue #250)

* more #250 Still need to guess byterate correctly.

* configureawait(false)

* Bitrate property implementation. Better bitrate guessing. Lifetime bytes decoded and lifetime duration decoded. Still buffer guessing needs work on WMV files

* simplifying controller properties

* minor volume management change

* updatemediastate management

* bumping up version date

* dispose logic for packetqueue and synclockers. See issue #250

* readonly ISyncLocker and sipose imporvements #250

* ResetAll simplification

* improving efficiency for MediaComponentSet. Adding CurrentBitrate (still WIP) See issue #250

* More work towards finishing #250 Removing GuessedByteRate, improving bitrate management and cache calculation

* Stop command derives from seek command. SendOnSeekingStarted and SendOnSeekingEnded, IsNetworkStream typo. Network stream minimum buffering. Improved WaitForPackets logic. Fixing Drawing.Bitmap variable DPI. Bumping up version. Removing Debug.WriteLine messages. See issue #250

* DPI and ContinuousNext -- Also improving packetreading worker when read returns no packets.

* Removal of ugly WaitForPackets, and SignalBufferingXXX; Simplifying reader, and decoding workers. now much more efficient. Improving SyncBuffering. Removing Ugly extension methods. Adding IsWorkerInterruptRequeted Methods.

* Added MediaStreamSize. Better buffering calculations, Moved renderer invalidation to MediaRenderer

* better sync-buffering variable naming, and minor CPU saving break cycle.

* Adding mediapacket wrapper class.  Starting removal of downloadcache and buffercache. Starting the removal of CanReadPackets. Simplifying Attached picture disposition. Further lowered CPU usage. See issue #250 UpdateBuffiringProgress

* continued work on #250

* more #250

* starting to remove SA1401 pregma warnings issue #250

* HW accelerator refactoring

* minor buffering changes.

* More #250 - Better delegates and more efficient updatebufferingproperties

* more work on sync-buffering see #250

* faster buffer state management

* optimizing reading worker, implementing adaptive buffering

* All about Sync-Buffering #250

* updgrading performance of MediaBlockBuffer

* minor performance improvement for packet buffer.

* renaming parent to mediacore in arguments and everywhere else. Intoriduced videoaspectratio property, renamed FrameStepDuration to PositionStep. SeekAdjustment using IsMonotonic property, Renaming of misleading property CurrentFrameRate to AverageFrameRate; Adding DisplayAspectWidth and Height to VideoComponent; better video frame duration estimation; removing property VideoFrameLength from IMEdiaEngineState; Fixing Duration and Start time from MediaInfo;  Other various minor improvements and efficiencies. See issue #250

* removing netstandard2.0 from common project for easier development.

* Handling No Audio Device in system See issue #260

* minor fixes for issue #250

* continued work on #250 Improving accessor depth

* Updating Docfx.json
  • Loading branch information
mariodivece authored Aug 9, 2018
1 parent 474d48a commit b3157e0
Show file tree
Hide file tree
Showing 77 changed files with 2,489 additions and 2,174 deletions.
16 changes: 15 additions & 1 deletion Unosquare.FFME.Common/Commands/CommandBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ internal abstract class CommandBase : PromiseBase
/// </summary>
/// <param name="mediaCore">The media core.</param>
protected CommandBase(MediaEngine mediaCore)
: base(continueOnCapturedContext: true)
: base(continueOnCapturedContext: false)
{
MediaCore = mediaCore;
}
Expand All @@ -32,5 +32,19 @@ protected CommandBase(MediaEngine mediaCore)
/// Gets the command category.
/// </summary>
public abstract CommandCategory Category { get; }

/// <summary>
/// Gets a value indicating whether this command processes seeking operations
/// </summary>
public bool AffectsSeekingState => TypeAffectsSeekingState(CommandType);

/// <summary>
/// Determines if the command type affects seeking states.
/// </summary>
/// <param name="commandType">Type of the command.</param>
/// <returns>The value</returns>
public static bool TypeAffectsSeekingState(CommandType commandType) =>
commandType == CommandType.Seek ||
commandType == CommandType.Stop;
}
}
Loading

0 comments on commit b3157e0

Please sign in to comment.