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

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

Issue 363813002: Update to Pipeline Metadata and Decoder Stream for Orientation Data (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed unneeded variable Created 6 years, 5 months 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) 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 fixup_negative_ogg_timestamps_ = true; 85 fixup_negative_ogg_timestamps_ = true;
86 } 86 }
87 87
88 // DemuxerStream implementation. 88 // DemuxerStream implementation.
89 virtual Type type() OVERRIDE; 89 virtual Type type() OVERRIDE;
90 virtual void Read(const ReadCB& read_cb) OVERRIDE; 90 virtual void Read(const ReadCB& read_cb) OVERRIDE;
91 virtual void EnableBitstreamConverter() OVERRIDE; 91 virtual void EnableBitstreamConverter() OVERRIDE;
92 virtual bool SupportsConfigChanges() OVERRIDE; 92 virtual bool SupportsConfigChanges() OVERRIDE;
93 virtual AudioDecoderConfig audio_decoder_config() OVERRIDE; 93 virtual AudioDecoderConfig audio_decoder_config() OVERRIDE;
94 virtual VideoDecoderConfig video_decoder_config() OVERRIDE; 94 virtual VideoDecoderConfig video_decoder_config() OVERRIDE;
95 virtual VideoRotation video_rotation() OVERRIDE;
95 96
96 // Returns the range of buffered data in this stream. 97 // Returns the range of buffered data in this stream.
97 Ranges<base::TimeDelta> GetBufferedRanges() const; 98 Ranges<base::TimeDelta> GetBufferedRanges() const;
98 99
99 // Returns elapsed time based on the already queued packets. 100 // Returns elapsed time based on the already queued packets.
100 // Used to determine stream duration when it's not known ahead of time. 101 // Used to determine stream duration when it's not known ahead of time.
101 base::TimeDelta GetElapsedTime() const; 102 base::TimeDelta GetElapsedTime() const;
102 103
103 // Returns true if this stream has capacity for additional data. 104 // Returns true if this stream has capacity for additional data.
104 bool HasAvailableCapacity(); 105 bool HasAvailableCapacity();
(...skipping 21 matching lines...) Expand all
126 FFmpegDemuxer* demuxer_; 127 FFmpegDemuxer* demuxer_;
127 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 128 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
128 AVStream* stream_; 129 AVStream* stream_;
129 AudioDecoderConfig audio_config_; 130 AudioDecoderConfig audio_config_;
130 VideoDecoderConfig video_config_; 131 VideoDecoderConfig video_config_;
131 Type type_; 132 Type type_;
132 base::TimeDelta duration_; 133 base::TimeDelta duration_;
133 bool end_of_stream_; 134 bool end_of_stream_;
134 base::TimeDelta last_packet_timestamp_; 135 base::TimeDelta last_packet_timestamp_;
135 Ranges<base::TimeDelta> buffered_ranges_; 136 Ranges<base::TimeDelta> buffered_ranges_;
137 VideoRotation video_rotation_;
136 138
137 DecoderBufferQueue buffer_queue_; 139 DecoderBufferQueue buffer_queue_;
138 ReadCB read_cb_; 140 ReadCB read_cb_;
139 141
140 #if defined(USE_PROPRIETARY_CODECS) 142 #if defined(USE_PROPRIETARY_CODECS)
141 scoped_ptr<FFmpegH264ToAnnexBBitstreamConverter> bitstream_converter_; 143 scoped_ptr<FFmpegH264ToAnnexBBitstreamConverter> bitstream_converter_;
142 #endif 144 #endif
143 145
144 bool bitstream_converter_enabled_; 146 bool bitstream_converter_enabled_;
145 147
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 // point occurs after its associated start time. Otherwise it will use 272 // point occurs after its associated start time. Otherwise it will use
271 // |fallback_stream_for_seeking_|. 273 // |fallback_stream_for_seeking_|.
272 typedef std::pair<int, base::TimeDelta> StreamSeekInfo; 274 typedef std::pair<int, base::TimeDelta> StreamSeekInfo;
273 StreamSeekInfo preferred_stream_for_seeking_; 275 StreamSeekInfo preferred_stream_for_seeking_;
274 StreamSeekInfo fallback_stream_for_seeking_; 276 StreamSeekInfo fallback_stream_for_seeking_;
275 277
276 // The Time associated with timestamp 0. Set to a null 278 // The Time associated with timestamp 0. Set to a null
277 // time if the file doesn't have an association to Time. 279 // time if the file doesn't have an association to Time.
278 base::Time timeline_offset_; 280 base::Time timeline_offset_;
279 281
282 VideoRotation video_rotation_;
wolenetz 2014/07/16 01:16:50 post-commit drive-by: Is this member unused?
scherkus (not reviewing) 2014/07/16 17:53:46 looks like it isn't! suderman: can you send out a
283
280 // Liveness of the stream. 284 // Liveness of the stream.
281 Liveness liveness_; 285 Liveness liveness_;
282 286
283 // Whether text streams have been enabled for this demuxer. 287 // Whether text streams have been enabled for this demuxer.
284 bool text_enabled_; 288 bool text_enabled_;
285 289
286 // Set if we know duration of the audio stream. Used when processing end of 290 // Set if we know duration of the audio stream. Used when processing end of
287 // stream -- at this moment we definitely know duration. 291 // stream -- at this moment we definitely know duration.
288 bool duration_known_; 292 bool duration_known_;
289 293
290 // FFmpegURLProtocol implementation and corresponding glue bits. 294 // FFmpegURLProtocol implementation and corresponding glue bits.
291 scoped_ptr<BlockingUrlProtocol> url_protocol_; 295 scoped_ptr<BlockingUrlProtocol> url_protocol_;
292 scoped_ptr<FFmpegGlue> glue_; 296 scoped_ptr<FFmpegGlue> glue_;
293 297
294 const NeedKeyCB need_key_cb_; 298 const NeedKeyCB need_key_cb_;
295 299
296 // NOTE: Weak pointers must be invalidated before all other member variables. 300 // NOTE: Weak pointers must be invalidated before all other member variables.
297 base::WeakPtrFactory<FFmpegDemuxer> weak_factory_; 301 base::WeakPtrFactory<FFmpegDemuxer> weak_factory_;
298 302
299 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); 303 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer);
300 }; 304 };
301 305
302 } // namespace media 306 } // namespace media
303 307
304 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ 308 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698