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

Side by Side Diff: media/blink/websourcebuffer_impl.h

Issue 1904253002: Convert //media/blink from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months 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 | « media/blink/webmediaplayer_util.cc ('k') | media/blink/websourcebuffer_impl.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 MEDIA_BLINK_WEBSOURCEBUFFER_IMPL_H_ 5 #ifndef MEDIA_BLINK_WEBSOURCEBUFFER_IMPL_H_
6 #define MEDIA_BLINK_WEBSOURCEBUFFER_IMPL_H_ 6 #define MEDIA_BLINK_WEBSOURCEBUFFER_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory>
10 #include <string> 11 #include <string>
11 12
12 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
13 #include "base/macros.h" 14 #include "base/macros.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "third_party/WebKit/public/platform/WebSourceBuffer.h" 16 #include "third_party/WebKit/public/platform/WebSourceBuffer.h"
17 17
18 namespace media { 18 namespace media {
19 class ChunkDemuxer; 19 class ChunkDemuxer;
20 class MediaTracks; 20 class MediaTracks;
21 21
22 class WebSourceBufferImpl : public blink::WebSourceBuffer { 22 class WebSourceBufferImpl : public blink::WebSourceBuffer {
23 public: 23 public:
24 WebSourceBufferImpl(const std::string& id, ChunkDemuxer* demuxer); 24 WebSourceBufferImpl(const std::string& id, ChunkDemuxer* demuxer);
(...skipping 12 matching lines...) Expand all
37 void resetParserState() override; 37 void resetParserState() override;
38 void remove(double start, double end) override; 38 void remove(double start, double end) override;
39 bool setTimestampOffset(double offset) override; 39 bool setTimestampOffset(double offset) override;
40 void setAppendWindowStart(double start) override; 40 void setAppendWindowStart(double start) override;
41 void setAppendWindowEnd(double end) override; 41 void setAppendWindowEnd(double end) override;
42 void removedFromMediaSource() override; 42 void removedFromMediaSource() override;
43 43
44 private: 44 private:
45 // Demuxer callback handler to process an initialization segment received 45 // Demuxer callback handler to process an initialization segment received
46 // during an append() call. 46 // during an append() call.
47 void InitSegmentReceived(scoped_ptr<MediaTracks> tracks); 47 void InitSegmentReceived(std::unique_ptr<MediaTracks> tracks);
48 48
49 std::string id_; 49 std::string id_;
50 ChunkDemuxer* demuxer_; // Owned by WebMediaPlayerImpl. 50 ChunkDemuxer* demuxer_; // Owned by WebMediaPlayerImpl.
51 51
52 blink::WebSourceBufferClient* client_; 52 blink::WebSourceBufferClient* client_;
53 53
54 // Controls the offset applied to timestamps when processing appended media 54 // Controls the offset applied to timestamps when processing appended media
55 // segments. It is initially 0, which indicates that no offset is being 55 // segments. It is initially 0, which indicates that no offset is being
56 // applied. Both setTimestampOffset() and append() may update this value. 56 // applied. Both setTimestampOffset() and append() may update this value.
57 base::TimeDelta timestamp_offset_; 57 base::TimeDelta timestamp_offset_;
58 58
59 base::TimeDelta append_window_start_; 59 base::TimeDelta append_window_start_;
60 base::TimeDelta append_window_end_; 60 base::TimeDelta append_window_end_;
61 61
62 DISALLOW_COPY_AND_ASSIGN(WebSourceBufferImpl); 62 DISALLOW_COPY_AND_ASSIGN(WebSourceBufferImpl);
63 }; 63 };
64 64
65 } // namespace media 65 } // namespace media
66 66
67 #endif // MEDIA_BLINK_WEBSOURCEBUFFER_IMPL_H_ 67 #endif // MEDIA_BLINK_WEBSOURCEBUFFER_IMPL_H_
OLDNEW
« no previous file with comments | « media/blink/webmediaplayer_util.cc ('k') | media/blink/websourcebuffer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698