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

Side by Side Diff: media/filters/ffmpeg_demuxer.h

Issue 8661002: Fire CanPlayThrough immediately for local and streaming media files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix media/event-attributes.html Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Implements the Demuxer interface using FFmpeg's libavformat. At this time 5 // Implements the Demuxer interface using FFmpeg's libavformat. At this time
6 // will support demuxing any audio/video format thrown at it. The streams 6 // will support demuxing any audio/video format thrown at it. The streams
7 // output mime types audio/x-ffmpeg and video/x-ffmpeg and include an integer 7 // output mime types audio/x-ffmpeg and video/x-ffmpeg and include an integer
8 // key FFmpegCodecID which contains the CodecID enumeration value. The CodecIDs 8 // key FFmpegCodecID which contains the CodecID enumeration value. The CodecIDs
9 // can be used to create and initialize the corresponding FFmpeg decoder. 9 // can be used to create and initialize the corresponding FFmpeg decoder.
10 // 10 //
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 virtual void Stop(const base::Closure& callback) OVERRIDE; 141 virtual void Stop(const base::Closure& callback) OVERRIDE;
142 virtual void Seek(base::TimeDelta time, const FilterStatusCB& cb) OVERRIDE; 142 virtual void Seek(base::TimeDelta time, const FilterStatusCB& cb) OVERRIDE;
143 virtual void OnAudioRendererDisabled() OVERRIDE; 143 virtual void OnAudioRendererDisabled() OVERRIDE;
144 virtual void set_host(FilterHost* filter_host) OVERRIDE; 144 virtual void set_host(FilterHost* filter_host) OVERRIDE;
145 virtual void SetPlaybackRate(float playback_rate) OVERRIDE; 145 virtual void SetPlaybackRate(float playback_rate) OVERRIDE;
146 virtual scoped_refptr<DemuxerStream> GetStream( 146 virtual scoped_refptr<DemuxerStream> GetStream(
147 DemuxerStream::Type type) OVERRIDE; 147 DemuxerStream::Type type) OVERRIDE;
148 virtual void SetPreload(Preload preload) OVERRIDE; 148 virtual void SetPreload(Preload preload) OVERRIDE;
149 virtual base::TimeDelta GetStartTime() const OVERRIDE; 149 virtual base::TimeDelta GetStartTime() const OVERRIDE;
150 virtual int GetBitrate() OVERRIDE; 150 virtual int GetBitrate() OVERRIDE;
151 virtual bool IsLocalSource() OVERRIDE;
151 152
152 // FFmpegURLProtocol implementation. 153 // FFmpegURLProtocol implementation.
153 virtual size_t Read(size_t size, uint8* data) OVERRIDE; 154 virtual size_t Read(size_t size, uint8* data) OVERRIDE;
154 virtual bool GetPosition(int64* position_out) OVERRIDE; 155 virtual bool GetPosition(int64* position_out) OVERRIDE;
155 virtual bool SetPosition(int64 position) OVERRIDE; 156 virtual bool SetPosition(int64 position) OVERRIDE;
156 virtual bool GetSize(int64* size_out) OVERRIDE; 157 virtual bool GetSize(int64* size_out) OVERRIDE;
157 virtual bool IsStreaming() OVERRIDE; 158 virtual bool IsStreaming() OVERRIDE;
158 159
159 // Provide access to FFmpegDemuxerStream. 160 // Provide access to FFmpegDemuxerStream.
160 MessageLoop* message_loop(); 161 MessageLoop* message_loop();
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 250
250 // Used to skip the implicit "first seek" to avoid resetting FFmpeg's internal 251 // Used to skip the implicit "first seek" to avoid resetting FFmpeg's internal
251 // state. 252 // state.
252 bool first_seek_hack_; 253 bool first_seek_hack_;
253 254
254 // The first timestamp of the opened media file. This is used to set the 255 // The first timestamp of the opened media file. This is used to set the
255 // starting clock value to match the timestamps in the media file. Default 256 // starting clock value to match the timestamps in the media file. Default
256 // is 0. 257 // is 0.
257 base::TimeDelta start_time_; 258 base::TimeDelta start_time_;
258 259
260 bool local_source_;
261
259 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); 262 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer);
260 }; 263 };
261 264
262 } // namespace media 265 } // namespace media
263 266
264 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ 267 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698