Commit a1a1d99b authored by xhwang's avatar xhwang Committed by Commit bot

Add default impl for DemuxerStream::EnableBitstreamConverter().

Most DemuxerStream implementation doesn't need this method. Provide an empty default implementation in the base class so that subclass doesn't need to override it.

TBR=gunsch@chromium.org

Review URL: https://codereview.chromium.org/560563002

Cr-Commit-Position: refs/heads/master@{#294102}
parent 74e7c1c9
...@@ -48,7 +48,6 @@ class DummyDemuxerStream : public ::media::DemuxerStream { ...@@ -48,7 +48,6 @@ class DummyDemuxerStream : public ::media::DemuxerStream {
virtual ::media::AudioDecoderConfig audio_decoder_config() OVERRIDE; virtual ::media::AudioDecoderConfig audio_decoder_config() OVERRIDE;
virtual ::media::VideoDecoderConfig video_decoder_config() OVERRIDE; virtual ::media::VideoDecoderConfig video_decoder_config() OVERRIDE;
virtual Type type() OVERRIDE; virtual Type type() OVERRIDE;
virtual void EnableBitstreamConverter() OVERRIDE;
virtual bool SupportsConfigChanges() OVERRIDE; virtual bool SupportsConfigChanges() OVERRIDE;
virtual ::media::VideoRotation video_rotation() OVERRIDE; virtual ::media::VideoRotation video_rotation() OVERRIDE;
...@@ -123,9 +122,6 @@ void DummyDemuxerStream::Read(const ReadCB& read_cb) { ...@@ -123,9 +122,6 @@ void DummyDemuxerStream::Read(const ReadCB& read_cb) {
return VIDEO; return VIDEO;
} }
void DummyDemuxerStream::EnableBitstreamConverter() {
}
bool DummyDemuxerStream::SupportsConfigChanges() { bool DummyDemuxerStream::SupportsConfigChanges() {
return true; return true;
} }
......
...@@ -8,4 +8,8 @@ namespace media { ...@@ -8,4 +8,8 @@ namespace media {
DemuxerStream::~DemuxerStream() {} DemuxerStream::~DemuxerStream() {}
// Most DemuxerStream implementations don't need to convert bit stream.
// Do nothing by default.
void DemuxerStream::EnableBitstreamConverter() {}
} // namespace media } // namespace media
...@@ -69,7 +69,7 @@ class MEDIA_EXPORT DemuxerStream { ...@@ -69,7 +69,7 @@ class MEDIA_EXPORT DemuxerStream {
// Returns the type of stream. // Returns the type of stream.
virtual Type type() = 0; virtual Type type() = 0;
virtual void EnableBitstreamConverter() = 0; virtual void EnableBitstreamConverter();
// Whether or not this DemuxerStream allows midstream configuration changes. // Whether or not this DemuxerStream allows midstream configuration changes.
// //
......
...@@ -933,8 +933,6 @@ void ChunkDemuxerStream::Read(const ReadCB& read_cb) { ...@@ -933,8 +933,6 @@ void ChunkDemuxerStream::Read(const ReadCB& read_cb) {
DemuxerStream::Type ChunkDemuxerStream::type() { return type_; } DemuxerStream::Type ChunkDemuxerStream::type() { return type_; }
void ChunkDemuxerStream::EnableBitstreamConverter() {}
AudioDecoderConfig ChunkDemuxerStream::audio_decoder_config() { AudioDecoderConfig ChunkDemuxerStream::audio_decoder_config() {
CHECK_EQ(type_, AUDIO); CHECK_EQ(type_, AUDIO);
base::AutoLock auto_lock(lock_); base::AutoLock auto_lock(lock_);
......
...@@ -82,7 +82,6 @@ class MEDIA_EXPORT ChunkDemuxerStream : public DemuxerStream { ...@@ -82,7 +82,6 @@ class MEDIA_EXPORT ChunkDemuxerStream : public DemuxerStream {
// DemuxerStream methods. // DemuxerStream methods.
virtual void Read(const ReadCB& read_cb) OVERRIDE; virtual void Read(const ReadCB& read_cb) OVERRIDE;
virtual Type type() OVERRIDE; virtual Type type() OVERRIDE;
virtual void EnableBitstreamConverter() OVERRIDE;
virtual AudioDecoderConfig audio_decoder_config() OVERRIDE; virtual AudioDecoderConfig audio_decoder_config() OVERRIDE;
virtual VideoDecoderConfig video_decoder_config() OVERRIDE; virtual VideoDecoderConfig video_decoder_config() OVERRIDE;
virtual bool SupportsConfigChanges() OVERRIDE; virtual bool SupportsConfigChanges() OVERRIDE;
......
...@@ -89,10 +89,6 @@ DemuxerStream::Type FakeDemuxerStream::type() { ...@@ -89,10 +89,6 @@ DemuxerStream::Type FakeDemuxerStream::type() {
return VIDEO; return VIDEO;
} }
void FakeDemuxerStream::EnableBitstreamConverter() {
DCHECK(task_runner_->BelongsToCurrentThread());
}
bool FakeDemuxerStream::SupportsConfigChanges() { bool FakeDemuxerStream::SupportsConfigChanges() {
return config_changes_; return config_changes_;
} }
......
...@@ -32,7 +32,6 @@ class FakeDemuxerStream : public DemuxerStream { ...@@ -32,7 +32,6 @@ class FakeDemuxerStream : public DemuxerStream {
virtual AudioDecoderConfig audio_decoder_config() OVERRIDE; virtual AudioDecoderConfig audio_decoder_config() OVERRIDE;
virtual VideoDecoderConfig video_decoder_config() OVERRIDE; virtual VideoDecoderConfig video_decoder_config() OVERRIDE;
virtual Type type() OVERRIDE; virtual Type type() OVERRIDE;
virtual void EnableBitstreamConverter() OVERRIDE;
virtual bool SupportsConfigChanges() OVERRIDE; virtual bool SupportsConfigChanges() OVERRIDE;
virtual VideoRotation video_rotation() OVERRIDE; virtual VideoRotation video_rotation() OVERRIDE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment