| OLD | NEW |
| 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_WEBSOURCEBUFFER_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBSOURCEBUFFER_IMPL_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_WEBSOURCEBUFFER_IMPL_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBSOURCEBUFFER_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/time/time.h" |
| 12 #include "third_party/WebKit/public/platform/WebSourceBuffer.h" | 13 #include "third_party/WebKit/public/platform/WebSourceBuffer.h" |
| 13 | 14 |
| 14 namespace media { | 15 namespace media { |
| 15 class ChunkDemuxer; | 16 class ChunkDemuxer; |
| 16 } | 17 } |
| 17 | 18 |
| 18 namespace content { | 19 namespace content { |
| 19 | 20 |
| 20 class WebSourceBufferImpl : public blink::WebSourceBuffer { | 21 class WebSourceBufferImpl : public blink::WebSourceBuffer { |
| 21 public: | 22 public: |
| (...skipping 11 matching lines...) Expand all Loading... |
| 33 virtual void remove(double start, double end); | 34 virtual void remove(double start, double end); |
| 34 virtual bool setTimestampOffset(double offset); | 35 virtual bool setTimestampOffset(double offset); |
| 35 virtual void setAppendWindowStart(double start); | 36 virtual void setAppendWindowStart(double start); |
| 36 virtual void setAppendWindowEnd(double end); | 37 virtual void setAppendWindowEnd(double end); |
| 37 virtual void removedFromMediaSource(); | 38 virtual void removedFromMediaSource(); |
| 38 | 39 |
| 39 private: | 40 private: |
| 40 std::string id_; | 41 std::string id_; |
| 41 media::ChunkDemuxer* demuxer_; // Owned by WebMediaPlayerImpl. | 42 media::ChunkDemuxer* demuxer_; // Owned by WebMediaPlayerImpl. |
| 42 | 43 |
| 44 // Controls the offset applied to timestamps when processing appended media |
| 45 // segments. It is initially 0, which indicates that no offset is being |
| 46 // applied. Both setTimestampOffset() and append() may update this value. |
| 47 base::TimeDelta timestamp_offset_; |
| 48 |
| 49 base::TimeDelta append_window_start_; |
| 50 base::TimeDelta append_window_end_; |
| 51 |
| 43 DISALLOW_COPY_AND_ASSIGN(WebSourceBufferImpl); | 52 DISALLOW_COPY_AND_ASSIGN(WebSourceBufferImpl); |
| 44 }; | 53 }; |
| 45 | 54 |
| 46 } // namespace content | 55 } // namespace content |
| 47 | 56 |
| 48 #endif // CONTENT_RENDERER_MEDIA_WEBSOURCEBUFFER_IMPL_H_ | 57 #endif // CONTENT_RENDERER_MEDIA_WEBSOURCEBUFFER_IMPL_H_ |
| OLD | NEW |