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

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

Issue 683573002: ffmpeg reset bitstream converters on Seek (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
« no previous file with comments | « no previous file | media/filters/ffmpeg_demuxer.cc » ('j') | media/filters/ffmpeg_demuxer.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 // Returns the total buffer size FFMpegDemuxerStream is holding onto. 107 // Returns the total buffer size FFMpegDemuxerStream is holding onto.
108 size_t MemoryUsage() const; 108 size_t MemoryUsage() const;
109 109
110 TextKind GetTextKind() const; 110 TextKind GetTextKind() const;
111 111
112 // Returns the value associated with |key| in the metadata for the avstream. 112 // Returns the value associated with |key| in the metadata for the avstream.
113 // Returns an empty string if the key is not present. 113 // Returns an empty string if the key is not present.
114 std::string GetMetadata(const char* key) const; 114 std::string GetMetadata(const char* key) const;
115 115
116 // Resets any currently active bitstream converters.
117 void ResetBitstreamConverter();
118
116 private: 119 private:
117 friend class FFmpegDemuxerTest; 120 friend class FFmpegDemuxerTest;
118 121
119 // Runs |read_cb_| if present with the front of |buffer_queue_|, calling 122 // Runs |read_cb_| if present with the front of |buffer_queue_|, calling
120 // NotifyCapacityAvailable() if capacity is still available. 123 // NotifyCapacityAvailable() if capacity is still available.
121 void SatisfyPendingRead(); 124 void SatisfyPendingRead();
122 125
123 // Converts an FFmpeg stream timestamp into a base::TimeDelta. 126 // Converts an FFmpeg stream timestamp into a base::TimeDelta.
124 static base::TimeDelta ConvertStreamTimestamp(const AVRational& time_base, 127 static base::TimeDelta ConvertStreamTimestamp(const AVRational& time_base,
125 int64 timestamp); 128 int64 timestamp);
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 300
298 // NOTE: Weak pointers must be invalidated before all other member variables. 301 // NOTE: Weak pointers must be invalidated before all other member variables.
299 base::WeakPtrFactory<FFmpegDemuxer> weak_factory_; 302 base::WeakPtrFactory<FFmpegDemuxer> weak_factory_;
300 303
301 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); 304 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer);
302 }; 305 };
303 306
304 } // namespace media 307 } // namespace media
305 308
306 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ 309 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_
OLDNEW
« no previous file with comments | « no previous file | media/filters/ffmpeg_demuxer.cc » ('j') | media/filters/ffmpeg_demuxer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698