Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  RemoteDecoderChild.h

  Sprache: C
 

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* 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 include_dom_media_ipc_RemoteDecoderChild_h
#define include_dom_media_ipc_RemoteDecoderChild_h

#include <functional>

#include "mozilla/PRemoteDecoderChild.h"
#include "mozilla/RemoteDecoderManagerChild.h"
#include "mozilla/ShmemRecycleAllocator.h"

namespace mozilla {

class RemoteDecoderManagerChild;
using mozilla::MediaDataDecoder;
using mozilla::ipc::IPCResult;

class RemoteDecoderChild : public ShmemRecycleAllocator<RemoteDecoderChild>,
                           public PRemoteDecoderChild {
  friend class PRemoteDecoderChild;

 public:
  NS_INLINE_DECL_THREADSAFE_REFCOUNTING(RemoteDecoderChild);

  explicit RemoteDecoderChild(RemoteDecodeIn aLocation);

  void ActorDestroy(ActorDestroyReason aWhy) override;

  // This interface closely mirrors the MediaDataDecoder plus a bit
  // (DestroyIPDL) to allow proxying to a remote decoder in RemoteDecoderModule.
  RefPtr<MediaDataDecoder::InitPromise> Init();
  RefPtr<MediaDataDecoder::DecodePromise> Decode(
      const nsTArray<RefPtr<MediaRawData>>& aSamples);
  RefPtr<MediaDataDecoder::DecodePromise> Drain();
  RefPtr<MediaDataDecoder::FlushPromise> Flush();
  RefPtr<mozilla::ShutdownPromise> Shutdown();
  bool IsHardwareAccelerated(nsACString& aFailureReason) const;
  nsCString GetDescriptionName() const;
  nsCString GetProcessName() const;
  nsCString GetCodecName() const;
  void SetSeekThreshold(const media::TimeUnit& aTime);
  MediaDataDecoder::ConversionRequired NeedsConversion() const;
  bool ShouldDecoderAlwaysBeRecycled() const;
  void DestroyIPDL();

  // Called from IPDL when our actor has been destroyed
  void IPDLActorDestroyed();

  RemoteDecoderManagerChild* GetManager();

 protected:
  virtual ~RemoteDecoderChild();
  void AssertOnManagerThread() const;

  virtual MediaResult ProcessOutput(DecodedOutputIPDL&& aDecodedData) = 0;
  virtual void RecordShutdownTelemetry(bool aForAbnormalShutdown) {}

  RefPtr<RemoteDecoderChild> mIPDLSelfRef;
  MediaDataDecoder::DecodedData mDecodedData;
  const RemoteDecodeIn mLocation;

 private:
  const nsCOMPtr<nsISerialEventTarget> mThread;

  MozPromiseHolder<MediaDataDecoder::InitPromise> mInitPromise;
  MozPromiseRequestHolder<PRemoteDecoderChild::InitPromise> mInitPromiseRequest;
  MozPromiseHolder<MediaDataDecoder::DecodePromise> mDecodePromise;
  MozPromiseHolder<MediaDataDecoder::DecodePromise> mDrainPromise;
  MozPromiseHolder<MediaDataDecoder::FlushPromise> mFlushPromise;
  MozPromiseHolder<mozilla::ShutdownPromise> mShutdownPromise;

  void HandleRejectionError(
      const ipc::ResponseRejectReason& aReason,
      std::function<void(const MediaResult&)>&& aCallback);

  nsCString mHardwareAcceleratedReason;
  nsCString mDescription;
  nsCString mProcessName;
  nsCString mCodecName;
  bool mIsHardwareAccelerated = false;
  bool mRemoteDecoderCrashed = false;
  MediaDataDecoder::ConversionRequired mConversion =
      MediaDataDecoder::ConversionRequired::kNeedNone;
  bool mShouldDecoderAlwaysBeRecycled = false;
};

}  // namespace mozilla

#endif  // include_dom_media_ipc_RemoteDecoderChild_h

Messung V0.5 in Prozent
C=92 H=100 G=95

¤ Dauer der Verarbeitung: 0.12 Sekunden  (vorverarbeitet am  2026-06-04) ¤

*© 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

Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik