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

Unified Diff: media/base/audio_decoder_config.h

Issue 23014009: media: Opus support for WebM in Media Source (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixing errors causing try bot failure Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/base/audio_decoder_config.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/audio_decoder_config.h
diff --git a/media/base/audio_decoder_config.h b/media/base/audio_decoder_config.h
index 1c61e70c3adba554c50a83d8f63e6f4208fc0296..a17d2215b97a3502b414a3de04dc2b549ff7b730 100644
--- a/media/base/audio_decoder_config.h
+++ b/media/base/audio_decoder_config.h
@@ -8,6 +8,7 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/time/time.h"
#include "media/base/channel_layout.h"
#include "media/base/media_export.h"
#include "media/base/sample_format.h"
@@ -63,7 +64,9 @@ class MEDIA_EXPORT AudioDecoderConfig {
void Initialize(AudioCodec codec, SampleFormat sample_format,
ChannelLayout channel_layout, int samples_per_second,
const uint8* extra_data, size_t extra_data_size,
- bool is_encrypted, bool record_stats);
+ bool is_encrypted, bool record_stats,
+ base::TimeDelta seek_preroll,
+ base::TimeDelta codec_delay);
// Returns true if this object has appropriate configuration values, false
// otherwise.
@@ -80,6 +83,8 @@ class MEDIA_EXPORT AudioDecoderConfig {
int samples_per_second() const { return samples_per_second_; }
SampleFormat sample_format() const { return sample_format_; }
int bytes_per_frame() const { return bytes_per_frame_; }
+ base::TimeDelta seek_preroll() const { return seek_preroll_; }
+ base::TimeDelta codec_delay() const { return codec_delay_; }
// Optional byte data required to initialize audio decoders such as Vorbis
// codebooks.
@@ -103,6 +108,15 @@ class MEDIA_EXPORT AudioDecoderConfig {
std::vector<uint8> extra_data_;
bool is_encrypted_;
+ // |seek_preroll_| is the duration of the data that the decoder must decode
+ // before the decoded data is valid.
+ base::TimeDelta seek_preroll_;
+
+ // |codec_delay_| is the overall delay overhead added by the codec while
+ // encoding. This value should be subtracted from each block's timestamp to
+ // get the actual timestamp.
+ base::TimeDelta codec_delay_;
+
// Not using DISALLOW_COPY_AND_ASSIGN here intentionally to allow the compiler
// generated copy constructor and assignment operator. Since the extra data is
// typically small, the performance impact is minimal.
« no previous file with comments | « no previous file | media/base/audio_decoder_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698