Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: content/renderer/media/gpu/rtc_video_encoder_factory.h

Issue 2499973002: RTCVideoEncoder: Report H264 profile information to WebRTC (Closed)
Patch Set: Add CHECK_EQ size checks for profiles and codecs. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_MEDIA_GPU_RTC_VIDEO_ENCODER_FACTORY_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_GPU_RTC_VIDEO_ENCODER_FACTORY_H_
6 #define CONTENT_RENDERER_MEDIA_GPU_RTC_VIDEO_ENCODER_FACTORY_H_ 6 #define CONTENT_RENDERER_MEDIA_GPU_RTC_VIDEO_ENCODER_FACTORY_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
14 #include "media/base/video_codecs.h"
14 #include "third_party/webrtc/media/engine/webrtcvideoencoderfactory.h" 15 #include "third_party/webrtc/media/engine/webrtcvideoencoderfactory.h"
15 16
16 namespace media { 17 namespace media {
17 class GpuVideoAcceleratorFactories; 18 class GpuVideoAcceleratorFactories;
18 } // namespace media 19 } // namespace media
19 20
20 namespace content { 21 namespace content {
21 22
22 // This class creates RTCVideoEncoder instances (each wrapping a 23 // This class creates RTCVideoEncoder instances (each wrapping a
23 // media::VideoEncodeAccelerator) on behalf of the WebRTC stack. 24 // media::VideoEncodeAccelerator) on behalf of the WebRTC stack.
24 class CONTENT_EXPORT RTCVideoEncoderFactory 25 class CONTENT_EXPORT RTCVideoEncoderFactory
25 : NON_EXPORTED_BASE(public cricket::WebRtcVideoEncoderFactory) { 26 : NON_EXPORTED_BASE(public cricket::WebRtcVideoEncoderFactory) {
26 public: 27 public:
27 explicit RTCVideoEncoderFactory( 28 explicit RTCVideoEncoderFactory(
28 media::GpuVideoAcceleratorFactories* gpu_factories); 29 media::GpuVideoAcceleratorFactories* gpu_factories);
29 ~RTCVideoEncoderFactory() override; 30 ~RTCVideoEncoderFactory() override;
30 31
31 // cricket::WebRtcVideoEncoderFactory implementation. 32 // cricket::WebRtcVideoEncoderFactory implementation.
32 webrtc::VideoEncoder* CreateVideoEncoder( 33 webrtc::VideoEncoder* CreateVideoEncoder(
33 webrtc::VideoCodecType type) override; 34 const cricket::VideoCodec& codec) override;
34 const std::vector<VideoCodec>& codecs() const override; 35 const std::vector<cricket::VideoCodec>& supported_codecs() const override;
35 void DestroyVideoEncoder(webrtc::VideoEncoder* encoder) override; 36 void DestroyVideoEncoder(webrtc::VideoEncoder* encoder) override;
36 37
37 private: 38 private:
38 media::GpuVideoAcceleratorFactories* gpu_factories_; 39 media::GpuVideoAcceleratorFactories* gpu_factories_;
39 40
40 // List of supported cricket::WebRtcVideoEncoderFactory::VideoCodec. 41 // List of supported cricket::WebRtcVideoEncoderFactory::VideoCodec.
41 std::vector<VideoCodec> codecs_; 42 // |profiles_| and |supported_codecs_| have the same length and the profile
43 // for |supported_codecs_[i]| is |profiles_[i]|.
44 std::vector<media::VideoCodecProfile> profiles_;
45 std::vector<cricket::VideoCodec> supported_codecs_;
42 46
43 DISALLOW_COPY_AND_ASSIGN(RTCVideoEncoderFactory); 47 DISALLOW_COPY_AND_ASSIGN(RTCVideoEncoderFactory);
44 }; 48 };
45 49
46 } // namespace content 50 } // namespace content
47 51
48 #endif // CONTENT_RENDERER_MEDIA_GPU_RTC_VIDEO_ENCODER_FACTORY_H_ 52 #endif // CONTENT_RENDERER_MEDIA_GPU_RTC_VIDEO_ENCODER_FACTORY_H_
OLDNEW
« no previous file with comments | « content/renderer/media/gpu/rtc_video_encoder.cc ('k') | content/renderer/media/gpu/rtc_video_encoder_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698