Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  MFContentProtectionManager.h

  Sprache: C
 

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */


#ifndef DOM_MEDIA_PLATFORM_WMF_MFCONTENTPROTECTIONMANAGER_H
#define DOM_MEDIA_PLATFORM_WMF_MFCONTENTPROTECTIONMANAGER_H

#include <mfapi.h>
#include <mfidl.h>
#include <windows.media.protection.h>
#include <wrl.h>

#include <functional>

#include "MFCDMProxy.h"
#include "nsISerialEventTarget.h"
#include "nsITimer.h"

namespace mozilla {

/**
 * MFContentProtectionManager is used to enable the encrypted playback for the
 * media engine.
 * https://docs.microsoft.com/en-us/windows/win32/api/mfidl/nn-mfidl-imfcontentprotectionmanager
 * https://docs.microsoft.com/en-us/uwp/api/windows.media.protection.mediaprotectionmanager
 */

class MFContentProtectionManager
    : public Microsoft::WRL::RuntimeClass<
          Microsoft::WRL::RuntimeClassFlags<
              Microsoft::WRL::RuntimeClassType::WinRtClassicComMix |
              Microsoft::WRL::RuntimeClassType::InhibitRoOriginateError>,
          IMFContentProtectionManager,
          ABI::Windows::Media::Protection::IMediaProtectionManager> {
 public:
  MFContentProtectionManager();
  ~MFContentProtectionManager();

  HRESULT RuntimeClassInitialize();

  void Shutdown();

  // IMFContentProtectionManager.
  IFACEMETHODIMP BeginEnableContent(IMFActivate* aEnablerActivate,
                                    IMFTopology* aTopology,
                                    IMFAsyncCallback* aCallback,
                                    IUnknown* aState) override;
  IFACEMETHODIMP EndEnableContent(IMFAsyncResult* aAsyncResult) override;

  // IMediaProtectionManager.
  // MFMediaEngine can query this interface to invoke get_Properties().
  IFACEMETHODIMP add_ServiceRequested(
      ABI::Windows::Media::Protection::IServiceRequestedEventHandler* aHandler,
      EventRegistrationToken* aCookie) override;
  IFACEMETHODIMP remove_ServiceRequested(
      EventRegistrationToken aCookie) override;
  IFACEMETHODIMP add_RebootNeeded(
      ABI::Windows::Media::Protection::IRebootNeededEventHandler* aHandler,
      EventRegistrationToken* aCookie) override;
  IFACEMETHODIMP remove_RebootNeeded(EventRegistrationToken aCookie) override;
  IFACEMETHODIMP add_ComponentLoadFailed(
      ABI::Windows::Media::Protection::IComponentLoadFailedEventHandler*
          aHandler,
      EventRegistrationToken* aCookie) override;
  IFACEMETHODIMP remove_ComponentLoadFailed(
      EventRegistrationToken aCookie) override;
  IFACEMETHODIMP get_Properties(
      ABI::Windows::Foundation::Collections::IPropertySet** aValue) override;

  HRESULT SetCDMProxy(MFCDMProxy* aCDMProxy);

  // Set a callback that fires on aManagerThread after a delay if
  // BeginEnableContent has not been answered by EndEnableContent, signalling a
  // key wait.
  void SetNotifyWaitingForKeyCallback(std::function<void()>&& aCallback,
                                      nsISerialEventTarget* aManagerThread);

  MFCDMProxy* GetCDMProxy() const { return mCDMProxy; }

 private:
  HRESULT SetPMPServer(
      ABI::Windows::Media::Protection::IMediaProtectionPMPServer* aPMPServer);

  void NotifyWaitingForKey();
  static void WaitingForKeyTimerCallback(nsITimer* aTimer, void* aClosure);

  RefPtr<MFCDMProxy> mCDMProxy;
  std::function<void()> mNotifyWaitingForKeyCb;
  nsCOMPtr<nsISerialEventTarget> mManagerThread;
  nsCOMPtr<nsITimer> mWaitingForKeyTimer;

  Microsoft::WRL::ComPtr<ABI::Windows::Foundation::Collections::IPropertySet>
      mPMPServerSet;
};

}  // namespace mozilla

#endif  // DOM_MEDIA_PLATFORM_WMF_MFCONTENTPROTECTIONMANAGER_H

Messung V0.5 in Prozent
C=94 H=98 G=95

¤ Dauer der Verarbeitung: 0.0 Sekunden  (vorverarbeitet am  2026-08-26) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=277311
#Domains=752002