2013-07-10 00:45:36 +00:00
|
|
|
/*
|
2016-02-07 20:46:45 -08:00
|
|
|
* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
|
2013-07-10 00:45:36 +00:00
|
|
|
*
|
2016-02-07 20:46:45 -08:00
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
2013-07-10 00:45:36 +00:00
|
|
|
*/
|
|
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#ifndef MEDIA_ENGINE_WEBRTCVIDEOENCODERFACTORY_H_
|
|
|
|
|
#define MEDIA_ENGINE_WEBRTCVIDEOENCODERFACTORY_H_
|
2013-07-10 00:45:36 +00:00
|
|
|
|
2017-10-31 09:53:08 -07:00
|
|
|
#include <string>
|
2016-10-28 07:43:45 -07:00
|
|
|
#include <vector>
|
|
|
|
|
|
2017-09-15 13:58:09 +02:00
|
|
|
#include "common_types.h" // NOLINT(build/include)
|
2017-09-15 06:47:31 +02:00
|
|
|
#include "media/base/codec.h"
|
2013-07-10 00:45:36 +00:00
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
class VideoEncoder;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
namespace cricket {
|
|
|
|
|
|
2017-09-14 10:24:54 +02:00
|
|
|
// Deprecated. Use webrtc::VideoEncoderFactory instead.
|
|
|
|
|
// https://bugs.chromium.org/p/webrtc/issues/detail?id=7925
|
2013-07-10 00:45:36 +00:00
|
|
|
class WebRtcVideoEncoderFactory {
|
|
|
|
|
public:
|
2014-10-13 06:35:10 +00:00
|
|
|
virtual ~WebRtcVideoEncoderFactory() {}
|
2013-07-10 00:45:36 +00:00
|
|
|
|
|
|
|
|
// Caller takes the ownership of the returned object and it should be released
|
|
|
|
|
// by calling DestroyVideoEncoder().
|
|
|
|
|
virtual webrtc::VideoEncoder* CreateVideoEncoder(
|
2017-05-12 00:24:40 -07:00
|
|
|
const cricket::VideoCodec& codec) = 0;
|
2016-10-28 07:43:45 -07:00
|
|
|
|
|
|
|
|
// Returns a list of supported codecs in order of preference.
|
2017-05-12 00:24:40 -07:00
|
|
|
virtual const std::vector<cricket::VideoCodec>& supported_codecs() const = 0;
|
2013-07-10 00:45:36 +00:00
|
|
|
|
2015-03-18 02:24:43 +00:00
|
|
|
// Returns true if encoders created by this factory of the given codec type
|
|
|
|
|
// will use internal camera sources, meaning that they don't require/expect
|
2017-09-14 10:24:54 +02:00
|
|
|
// frames to be delivered via webrtc::VideoEncoder::Encode.
|
2017-09-28 21:19:18 +02:00
|
|
|
virtual bool EncoderTypeHasInternalSource(webrtc::VideoCodecType type) const;
|
2015-03-18 02:24:43 +00:00
|
|
|
|
2013-07-10 00:45:36 +00:00
|
|
|
virtual void DestroyVideoEncoder(webrtc::VideoEncoder* encoder) = 0;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace cricket
|
|
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#endif // MEDIA_ENGINE_WEBRTCVIDEOENCODERFACTORY_H_
|