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

Side by Side Diff: media/base/video_renderer.h

Issue 692323002: Move Liveness from DemuxerStreamProvider to DemuxerStream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
OLDNEW
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_VIDEO_RENDERER_H_ 5 #ifndef MEDIA_BASE_VIDEO_RENDERER_H_
6 #define MEDIA_BASE_VIDEO_RENDERER_H_ 6 #define MEDIA_BASE_VIDEO_RENDERER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 24 matching lines...) Expand all
35 // 35 //
36 // |buffering_state_cb| is executed when video rendering has either run out of 36 // |buffering_state_cb| is executed when video rendering has either run out of
37 // data or has enough data to continue playback. 37 // data or has enough data to continue playback.
38 // 38 //
39 // |ended_cb| is executed when video rendering has reached the end of stream. 39 // |ended_cb| is executed when video rendering has reached the end of stream.
40 // 40 //
41 // |error_cb| is executed if an error was encountered. 41 // |error_cb| is executed if an error was encountered.
42 // 42 //
43 // |get_time_cb| is used to query the current media playback time. 43 // |get_time_cb| is used to query the current media playback time.
44 virtual void Initialize(DemuxerStream* stream, 44 virtual void Initialize(DemuxerStream* stream,
45 bool low_delay,
46 const PipelineStatusCB& init_cb, 45 const PipelineStatusCB& init_cb,
47 const StatisticsCB& statistics_cb, 46 const StatisticsCB& statistics_cb,
48 const BufferingStateCB& buffering_state_cb, 47 const BufferingStateCB& buffering_state_cb,
49 const base::Closure& ended_cb, 48 const base::Closure& ended_cb,
50 const PipelineStatusCB& error_cb, 49 const PipelineStatusCB& error_cb,
51 const TimeDeltaCB& get_time_cb) = 0; 50 const TimeDeltaCB& get_time_cb) = 0;
52 51
53 // Discards any video data and stops reading from |stream|, executing 52 // Discards any video data and stops reading from |stream|, executing
54 // |callback| when completed. 53 // |callback| when completed.
55 // 54 //
56 // Clients should expect |buffering_state_cb| to be called with 55 // Clients should expect |buffering_state_cb| to be called with
57 // BUFFERING_HAVE_NOTHING while flushing is in progress. 56 // BUFFERING_HAVE_NOTHING while flushing is in progress.
58 virtual void Flush(const base::Closure& callback) = 0; 57 virtual void Flush(const base::Closure& callback) = 0;
59 58
60 // Starts playback at |timestamp| by reading from |stream| and decoding and 59 // Starts playback at |timestamp| by reading from |stream| and decoding and
61 // rendering video. 60 // rendering video.
62 // 61 //
63 // Only valid to call after a successful Initialize() or Flush(). 62 // Only valid to call after a successful Initialize() or Flush().
64 virtual void StartPlayingFrom(base::TimeDelta timestamp) = 0; 63 virtual void StartPlayingFrom(base::TimeDelta timestamp) = 0;
65 64
66 private: 65 private:
67 DISALLOW_COPY_AND_ASSIGN(VideoRenderer); 66 DISALLOW_COPY_AND_ASSIGN(VideoRenderer);
68 }; 67 };
69 68
70 } // namespace media 69 } // namespace media
71 70
72 #endif // MEDIA_BASE_VIDEO_RENDERER_H_ 71 #endif // MEDIA_BASE_VIDEO_RENDERER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698