Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  VulkanDeviceHolder.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_PLATFORMS_FFMPEG_VULKANDEVICEHOLDER_H_
#define DOM_MEDIA_PLATFORMS_FFMPEG_VULKANDEVICEHOLDER_H_

#include "mozilla/ThreadSafeWeakPtr.h"
#include "nsISupportsImpl.h"

struct AVBufferRef;

namespace mozilla {

struct FFmpegLibWrapper;

// Holds a single shared AVHWDeviceContext (VkDevice) for all Vulkan video
// decoders in the RDD process. Mirrors VADisplayHolder for VA-API.
//
// The first decoder to call GetOrCreate() pays vkCreateDevice; subsequent
// decoders receive av_buffer_ref() on the same context. The device is
// destroyed (vkDestroyDevice) when the last decoder drops its reference.
class VulkanDeviceHolder final
    : public SupportsThreadSafeWeakPtr<VulkanDeviceHolder> {
 public:
  MOZ_DECLARE_REFCOUNTED_TYPENAME(VulkanDeviceHolder)

  static RefPtr<VulkanDeviceHolder> GetOrCreate(const FFmpegLibWrapper* aLib,
                                                const char* aDeviceName,
                                                const char* aDeviceExtensions);

  // Returns a new av_buffer_ref(); caller must av_buffer_unref() it.
  AVBufferRef* Ref() const;

  ~VulkanDeviceHolder();

 private:
  VulkanDeviceHolder(const FFmpegLibWrapper* aLib, AVBufferRef* aDeviceContext,
                     const char* aDeviceName);

  const FFmpegLibWrapper* mLib;
  AVBufferRef* mDeviceContext;
  // VK_MAX_PHYSICAL_DEVICE_NAME_SIZE is defined as 256 in the Vulkan spec.
  char mDeviceName[256] = {'\0'};
};

}  // namespace mozilla

#endif  // DOM_MEDIA_PLATFORMS_FFMPEG_VULKANDEVICEHOLDER_H_

Messung V0.5 in Prozent
C=83 H=100 G=91

¤ Dauer der Verarbeitung: 0.16 Sekunden  (vorverarbeitet am  2026-08-25) ¤

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