protected void Initialize() { if (_initialized) { throw new InvalidOperationException("It has already been initialized."); } if (Features.IsSupported(PlayerFeatures.AudioEffect)) { _audioEffect = new AudioEffect(this); } RegisterEvents(); _displaySettings = PlayerDisplaySettings.Create(this); _initialized = true; }
/// <summary> /// Initializes a new instance of the <see cref="Player"/> class. /// </summary> /// <since_tizen> 3 </since_tizen> public Player() { NativePlayer.Create(out _handle).ThrowIfFailed(null, "Failed to create player"); Debug.Assert(_handle != null); if (Features.IsSupported(PlayerFeatures.AudioEffect)) { _audioEffect = new AudioEffect(this); } if (Features.IsSupported(PlayerFeatures.RawVideo)) { RegisterVideoFrameDecodedCallback(); } DisplaySettings = PlayerDisplaySettings.Create(this); }