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

Side by Side Diff: content/renderer/media/rtc_video_decoder.h

Issue 1458683002: RTCVideoDecoder: add Destroy() static method for RTCVideoDecoderFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | content/renderer/media/rtc_video_decoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_RTC_VIDEO_DECODER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_
6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_ 6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // which VDA::Client methods run on. webrtc::VideoDecoder methods run on WebRTC 44 // which VDA::Client methods run on. webrtc::VideoDecoder methods run on WebRTC
45 // DecodingThread or Chrome_libJingle_WorkerThread, which are trampolined to 45 // DecodingThread or Chrome_libJingle_WorkerThread, which are trampolined to
46 // |vda_message_loop_|. Decode() is non-blocking and queues the buffers. Decoded 46 // |vda_message_loop_|. Decode() is non-blocking and queues the buffers. Decoded
47 // frames are delivered to WebRTC on |vda_message_loop_|. 47 // frames are delivered to WebRTC on |vda_message_loop_|.
48 class CONTENT_EXPORT RTCVideoDecoder 48 class CONTENT_EXPORT RTCVideoDecoder
49 : NON_EXPORTED_BASE(public webrtc::VideoDecoder), 49 : NON_EXPORTED_BASE(public webrtc::VideoDecoder),
50 public media::VideoDecodeAccelerator::Client { 50 public media::VideoDecodeAccelerator::Client {
51 public: 51 public:
52 ~RTCVideoDecoder() override; 52 ~RTCVideoDecoder() override;
53 53
54 // Creates a RTCVideoDecoder. Returns NULL if failed. The video decoder will 54 // Creates a RTCVideoDecoder on the message loop of |factories|. Returns NULL
55 // run on the message loop of |factories|. 55 // if failed. The video decoder will run on the message loop of |factories|.
56 static scoped_ptr<RTCVideoDecoder> Create( 56 static scoped_ptr<RTCVideoDecoder> Create(
57 webrtc::VideoCodecType type, 57 webrtc::VideoCodecType type,
58 media::GpuVideoAcceleratorFactories* factories); 58 media::GpuVideoAcceleratorFactories* factories);
59 // Destroys |decoder| on the loop of |factories|
60 static void Destroy(webrtc::VideoDecoder* decoder,
61 media::GpuVideoAcceleratorFactories* factories);
59 62
60 // webrtc::VideoDecoder implementation. 63 // webrtc::VideoDecoder implementation.
61 // Called on WebRTC DecodingThread. 64 // Called on WebRTC DecodingThread.
62 int32_t InitDecode(const webrtc::VideoCodec* codecSettings, 65 int32_t InitDecode(const webrtc::VideoCodec* codecSettings,
63 int32_t numberOfCores) override; 66 int32_t numberOfCores) override;
64 // Called on WebRTC DecodingThread. 67 // Called on WebRTC DecodingThread.
65 int32_t Decode(const webrtc::EncodedImage& inputImage, 68 int32_t Decode(const webrtc::EncodedImage& inputImage,
66 bool missingFrames, 69 bool missingFrames,
67 const webrtc::RTPFragmentationHeader* fragmentation, 70 const webrtc::RTPFragmentationHeader* fragmentation,
68 const webrtc::CodecSpecificInfo* codecSpecificInfo = NULL, 71 const webrtc::CodecSpecificInfo* codecSpecificInfo = NULL,
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 // Must be destroyed, or invalidated, on |vda_loop_proxy_| 281 // Must be destroyed, or invalidated, on |vda_loop_proxy_|
279 // NOTE: Weak pointers must be invalidated before all other member variables. 282 // NOTE: Weak pointers must be invalidated before all other member variables.
280 base::WeakPtrFactory<RTCVideoDecoder> weak_factory_; 283 base::WeakPtrFactory<RTCVideoDecoder> weak_factory_;
281 284
282 DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoder); 285 DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoder);
283 }; 286 };
284 287
285 } // namespace content 288 } // namespace content
286 289
287 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_ 290 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/rtc_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698