OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BASE_DEMUXER_H_ | 5 #ifndef MEDIA_BASE_DEMUXER_H_ |
6 #define MEDIA_BASE_DEMUXER_H_ | 6 #define MEDIA_BASE_DEMUXER_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/time.h" | 9 #include "base/time.h" |
10 #include "media/base/data_source.h" | 10 #include "media/base/data_source.h" |
11 #include "media/base/demuxer_stream.h" | 11 #include "media/base/demuxer_stream.h" |
12 #include "media/base/media_export.h" | 12 #include "media/base/media_export.h" |
13 #include "media/base/pipeline_status.h" | 13 #include "media/base/pipeline_status.h" |
14 | 14 |
15 namespace media { | 15 namespace media { |
16 | 16 |
17 class MEDIA_EXPORT DemuxerHost : public DataSourceHost { | 17 class MEDIA_EXPORT DemuxerHost : public DataSourceHost { |
18 public: | 18 public: |
19 virtual ~DemuxerHost(); | 19 virtual ~DemuxerHost(); |
20 | 20 |
21 // Sets the duration of the media in microseconds. | 21 // Sets the duration of the media in microseconds. |
22 // Duration may be kInfiniteDuration() if the duration is not known. | 22 // Duration may be kInfiniteDuration() if the duration is not known. |
23 virtual void SetDuration(base::TimeDelta duration) = 0; | 23 virtual void SetDuration(base::TimeDelta duration) = 0; |
24 | 24 |
25 // Sets the byte offset at which the client is requesting the video. | |
26 virtual void SetCurrentReadPosition(int64 offset) = 0; | |
27 | |
28 // Stops execution of the pipeline due to a fatal error. Do not call this | 25 // Stops execution of the pipeline due to a fatal error. Do not call this |
29 // method with PIPELINE_OK. | 26 // method with PIPELINE_OK. |
30 virtual void OnDemuxerError(PipelineStatus error) = 0; | 27 virtual void OnDemuxerError(PipelineStatus error) = 0; |
31 }; | 28 }; |
32 | 29 |
33 class MEDIA_EXPORT Demuxer : public base::RefCountedThreadSafe<Demuxer> { | 30 class MEDIA_EXPORT Demuxer : public base::RefCountedThreadSafe<Demuxer> { |
34 public: | 31 public: |
35 Demuxer(); | 32 Demuxer(); |
36 | 33 |
37 // Completes initialization of the demuxer. | 34 // Completes initialization of the demuxer. |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 friend class base::RefCountedThreadSafe<Demuxer>; | 71 friend class base::RefCountedThreadSafe<Demuxer>; |
75 virtual ~Demuxer(); | 72 virtual ~Demuxer(); |
76 | 73 |
77 private: | 74 private: |
78 DISALLOW_COPY_AND_ASSIGN(Demuxer); | 75 DISALLOW_COPY_AND_ASSIGN(Demuxer); |
79 }; | 76 }; |
80 | 77 |
81 } // namespace media | 78 } // namespace media |
82 | 79 |
83 #endif // MEDIA_BASE_DEMUXER_H_ | 80 #endif // MEDIA_BASE_DEMUXER_H_ |
OLD | NEW |