| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 #ifndef WEBRTC_MEDIA_ENGINE_WEBRTCVIDEODECODERFACTORY_H_ | 11 #ifndef WEBRTC_MEDIA_ENGINE_WEBRTCVIDEODECODERFACTORY_H_ |
| 12 #define WEBRTC_MEDIA_ENGINE_WEBRTCVIDEODECODERFACTORY_H_ | 12 #define WEBRTC_MEDIA_ENGINE_WEBRTCVIDEODECODERFACTORY_H_ |
| 13 | 13 |
| 14 #include "webrtc/common_types.h" | 14 #include "webrtc/common_types.h" |
| 15 #include "webrtc/media/base/codec.h" | 15 #include "webrtc/media/base/codec.h" |
| 16 #include "webrtc/rtc_base/refcount.h" | 16 #include "webrtc/rtc_base/refcount.h" |
| 17 | 17 |
| 18 namespace webrtc { | 18 namespace webrtc { |
| 19 class VideoDecoder; | 19 class VideoDecoder; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace cricket { | 22 namespace cricket { |
| 23 | 23 |
| 24 struct VideoDecoderParams { | 24 struct VideoDecoderParams { |
| 25 std::string receive_stream_id; | 25 std::string receive_stream_id; |
| 26 }; | 26 }; |
| 27 | 27 |
| 28 // Deprecated. Use webrtc::VideoDecoderFactory instead. |
| 29 // https://bugs.chromium.org/p/webrtc/issues/detail?id=7925 |
| 28 class WebRtcVideoDecoderFactory { | 30 class WebRtcVideoDecoderFactory { |
| 29 public: | 31 public: |
| 30 // Caller takes the ownership of the returned object and it should be released | 32 // Caller takes the ownership of the returned object and it should be released |
| 31 // by calling DestroyVideoDecoder(). | 33 // by calling DestroyVideoDecoder(). |
| 32 virtual webrtc::VideoDecoder* CreateVideoDecoderWithParams( | 34 virtual webrtc::VideoDecoder* CreateVideoDecoderWithParams( |
| 33 const VideoCodec& codec, | 35 const VideoCodec& codec, |
| 34 VideoDecoderParams params) { | 36 VideoDecoderParams params) { |
| 35 // Default implementation that delegates to old version in order to preserve | 37 // Default implementation that delegates to old version in order to preserve |
| 36 // backwards-compatability. | 38 // backwards-compatability. |
| 37 webrtc::VideoCodecType type = webrtc::PayloadStringToCodecType(codec.name); | 39 webrtc::VideoCodecType type = webrtc::PayloadStringToCodecType(codec.name); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 52 return CreateVideoDecoder(type); | 54 return CreateVideoDecoder(type); |
| 53 } | 55 } |
| 54 virtual ~WebRtcVideoDecoderFactory() {} | 56 virtual ~WebRtcVideoDecoderFactory() {} |
| 55 | 57 |
| 56 virtual void DestroyVideoDecoder(webrtc::VideoDecoder* decoder) = 0; | 58 virtual void DestroyVideoDecoder(webrtc::VideoDecoder* decoder) = 0; |
| 57 }; | 59 }; |
| 58 | 60 |
| 59 } // namespace cricket | 61 } // namespace cricket |
| 60 | 62 |
| 61 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEODECODERFACTORY_H_ | 63 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEODECODERFACTORY_H_ |
| OLD | NEW |