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

Side by Side Diff: webrtc/modules/video_coding/codecs/h264/include/h264.h

Issue 2474993002: Pass selected cricket::VideoCodec down to internal H264 encoder (Closed)
Patch Set: Rebase 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 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 * 9 *
10 */ 10 */
11 11
12 #ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_INCLUDE_H264_H_ 12 #ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_INCLUDE_H264_H_
13 #define WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_INCLUDE_H264_H_ 13 #define WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_INCLUDE_H264_H_
14 14
15 #if defined(WEBRTC_IOS) || defined(WEBRTC_MAC) 15 #include "webrtc/media/base/codec.h"
16 16 #include "webrtc/video_encoder.h"
17 #include <Availability.h> 17 #include "webrtc/video_decoder.h"
18 #if defined(WEBRTC_IOS) || \
19 defined(__MAC_10_8) && __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_8
20 #define WEBRTC_VIDEO_TOOLBOX_SUPPORTED 1
21 #endif
22
23 #endif // defined(WEBRTC_IOS) || defined(WEBRTC_MAC)
24
25 #include "webrtc/modules/video_coding/include/video_codec_interface.h"
26 18
27 namespace webrtc { 19 namespace webrtc {
28 20
29 // Set to disable the H.264 encoder/decoder implementations that are provided if 21 // Set to disable the H.264 encoder/decoder implementations that are provided if
30 // |rtc_use_h264| build flag is true (if false, this function does nothing). 22 // |rtc_use_h264| build flag is true (if false, this function does nothing).
31 // This function should only be called before or during WebRTC initialization 23 // This function should only be called before or during WebRTC initialization
32 // and is not thread-safe. 24 // and is not thread-safe.
33 void DisableRtcUseH264(); 25 void DisableRtcUseH264();
34 26
35 class H264Encoder : public VideoEncoder { 27 class H264Encoder : public VideoEncoder {
36 public: 28 public:
37 static H264Encoder* Create(); 29 static H264Encoder* Create(const cricket::VideoCodec& codec);
38 // If H.264 is supported (any implementation). 30 // If H.264 is supported (any implementation).
39 static bool IsSupported(); 31 static bool IsSupported();
40 32
41 ~H264Encoder() override {} 33 ~H264Encoder() override {}
42 }; 34 };
43 35
44 class H264Decoder : public VideoDecoder { 36 class H264Decoder : public VideoDecoder {
45 public: 37 public:
46 static H264Decoder* Create(); 38 static H264Decoder* Create();
47 static bool IsSupported(); 39 static bool IsSupported();
48 40
49 ~H264Decoder() override {} 41 ~H264Decoder() override {}
50 }; 42 };
51 43
52 } // namespace webrtc 44 } // namespace webrtc
53 45
54 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_INCLUDE_H264_H_ 46 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_INCLUDE_H264_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698