Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 WEBKIT_MEDIA_WEBMEDIASOURCECLIENT_IMPL_H_ | 5 #ifndef WEBKIT_MEDIA_WEBMEDIASOURCECLIENT_IMPL_H_ |
| 6 #define WEBKIT_MEDIA_WEBMEDIASOURCECLIENT_IMPL_H_ | 6 #define WEBKIT_MEDIA_WEBMEDIASOURCECLIENT_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/memory/ref_counted.h" | |
| 12 #include "media/base/media_log.h" | 11 #include "media/base/media_log.h" |
| 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaSourceClient. h" | 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaSourceClient. h" |
| 14 | 13 |
| 15 namespace media { | 14 namespace media { |
| 16 class ChunkDemuxer; | 15 class ChunkDemuxer; |
| 17 } | 16 } |
| 18 | 17 |
| 19 namespace webkit_media { | 18 namespace webkit_media { |
| 20 | 19 |
| 21 class WebMediaSourceClientImpl : public WebKit::WebMediaSourceClient { | 20 class WebMediaSourceClientImpl : public WebKit::WebMediaSourceClient { |
| 22 public: | 21 public: |
| 23 explicit WebMediaSourceClientImpl( | 22 WebMediaSourceClientImpl(media::ChunkDemuxer* demuxer, media::LogCB log_cb); |
| 24 const scoped_refptr<media::ChunkDemuxer>& demuxer, | |
| 25 media::LogCB log_cb); | |
| 26 virtual ~WebMediaSourceClientImpl(); | 23 virtual ~WebMediaSourceClientImpl(); |
| 27 | 24 |
| 28 // WebKit::WebMediaSourceClient implementation. | 25 // WebKit::WebMediaSourceClient implementation. |
| 29 virtual AddStatus addSourceBuffer( | 26 virtual AddStatus addSourceBuffer( |
| 30 const WebKit::WebString& type, | 27 const WebKit::WebString& type, |
| 31 const WebKit::WebVector<WebKit::WebString>& codecs, | 28 const WebKit::WebVector<WebKit::WebString>& codecs, |
| 32 WebKit::WebSourceBuffer** source_buffer) OVERRIDE; | 29 WebKit::WebSourceBuffer** source_buffer) OVERRIDE; |
| 33 virtual double duration() OVERRIDE; | 30 virtual double duration() OVERRIDE; |
| 34 virtual void setDuration(double duration) OVERRIDE; | 31 virtual void setDuration(double duration) OVERRIDE; |
| 35 virtual void endOfStream(EndOfStreamStatus status) OVERRIDE; | 32 virtual void endOfStream(EndOfStreamStatus status) OVERRIDE; |
| 36 | 33 |
| 37 private: | 34 private: |
| 38 scoped_refptr<media::ChunkDemuxer> demuxer_; | 35 media::ChunkDemuxer* demuxer_; // Owned by WebMediaPlayerImpl::pipeline_. |
|
scherkus (not reviewing)
2013/04/17 17:21:59
is there a UAF bug here if pipeline hits an error?
acolwell GONE FROM CHROMIUM
2013/04/17 20:24:53
Yes.
| |
| 39 media::LogCB log_cb_; | 36 media::LogCB log_cb_; |
| 40 | 37 |
| 41 DISALLOW_COPY_AND_ASSIGN(WebMediaSourceClientImpl); | 38 DISALLOW_COPY_AND_ASSIGN(WebMediaSourceClientImpl); |
| 42 }; | 39 }; |
| 43 | 40 |
| 44 } // namespace webkit_media | 41 } // namespace webkit_media |
| 45 | 42 |
| 46 #endif // WEBKIT_MEDIA_WEBMEDIASOURCECLIENT_IMPL_H_ | 43 #endif // WEBKIT_MEDIA_WEBMEDIASOURCECLIENT_IMPL_H_ |
| OLD | NEW |