webrtc_m130/webrtc/media/engine/internaldecoderfactory.h
magjed dd40702357 Move VideoDecoder::Create() logic to separate internal video decoder factory
The goal with this CL is to move implementation details out from the
webrtc root (webrtc/video_decoder.h) to simplify the dependency graph.
Another goal is to streamline the creation of VideoDecoders in
webrtcvideoengine2.cc; it will now have two factories of the same
WebRtcVideoDecoderFactory type, one internal and one external.

Specifically, this CL:
 * Removes webrtc::VideoDecoder::DecoderType and use webrtc::VideoCodecType
   instead.
 * Removes 'static VideoDecoder* Create(DecoderType codec_type)' and
   moves the create function to the internal decoder factory instead.
 * Removes video_decoder.cc. webrtc::VideoDecoder is now just an
   interface without any static functions.

BUG=webrtc:6743

Review-Url: https://codereview.webrtc.org/2521203002
Cr-Commit-Position: refs/heads/master@{#15350}
2016-12-01 08:27:35 +00:00

35 lines
1.0 KiB
C++

/*
* Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
*
* 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.
*/
#ifndef WEBRTC_MEDIA_ENGINE_INTERNALDECODERFACTORY_H_
#define WEBRTC_MEDIA_ENGINE_INTERNALDECODERFACTORY_H_
#include <vector>
#include "webrtc/media/engine/webrtcvideodecoderfactory.h"
namespace cricket {
class InternalDecoderFactory : public WebRtcVideoDecoderFactory {
public:
InternalDecoderFactory();
virtual ~InternalDecoderFactory();
// WebRtcVideoDecoderFactory implementation.
webrtc::VideoDecoder* CreateVideoDecoder(
webrtc::VideoCodecType type) override;
void DestroyVideoDecoder(webrtc::VideoDecoder* decoder) override;
};
} // namespace cricket
#endif // WEBRTC_MEDIA_ENGINE_INTERNALDECODERFACTORY_H_