Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  s0105.patch   Sprache: unbekannt

 
Spracherkennung für: .patch vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

From: Andreas Pehrson <apehrson@mozilla.com>
Date: Tue, 28 Jan 2025 21:45:00 +0000
Subject: Bug 1938047 - Hook up VideoStreamFactory with EncoderInfo like the
 libwebrtc factory. r=webrtc-reviewers,dbaker

This is necessary for the factory to factor in the encoder's resolution
alignment requirements when calculating stream resolutions.

Differential Revision: https://phabricator.services.mozilla.com/D235702
Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/8b5653392e88ccd0c2b0675c761bb22733364225
---
 video/config/video_encoder_config.h | 4 ++++
 video/video_stream_encoder.cc       | 1 +
 2 files changed, 5 insertions(+)

diff --git a/video/config/video_encoder_config.h b/video/config/video_encoder_config.h
index cbb3bf1ce9..06dcbf8a6d 100644
--- a/video/config/video_encoder_config.h
+++ b/video/config/video_encoder_config.h
@@ -26,6 +26,7 @@
 #include "api/video_codecs/sdp_video_format.h"
 #include "api/video_codecs/spatial_layer.h"
 #include "api/video_codecs/video_codec.h"
+#include "api/video_codecs/video_encoder.h"
 
 namespace webrtc {
 
@@ -158,6 +159,9 @@ class VideoEncoderConfig {
         int frame_height,
         const VideoEncoderConfig& encoder_config) = 0;
 
+    // Mozilla: Patching in necessary info our custom VideoStreamFactory will need to know.
+    virtual void SetEncoderInfo(const VideoEncoder::EncoderInfo& info) {}
+
    protected:
     ~VideoStreamFactoryInterface() override {}
   };
diff --git a/video/video_stream_encoder.cc b/video/video_stream_encoder.cc
index f9be7fd8b6..14b8e04c89 100644
--- a/video/video_stream_encoder.cc
+++ b/video/video_stream_encoder.cc
@@ -1098,6 +1098,7 @@ void VideoStreamEncoder::ReconfigureEncoder() {
   std::vector<VideoStream> streams;
   if (encoder_config_.video_stream_factory) {
     // Note: only tests set their own EncoderStreamFactory...
+    encoder_config_.video_stream_factory->SetEncoderInfo(encoder_->GetEncoderInfo());
     streams = encoder_config_.video_stream_factory->CreateEncoderStreams(
         env_.field_trials(), last_frame_info_->width, last_frame_info_->height,
         encoder_config_);

[Dauer der Verarbeitung: 0.45 Sekunden]

                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=141584
#Domains=752002