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

Unified Diff: content/renderer/media/android/media_source_delegate.cc

Issue 17408005: Refactored DecoderBuffer to use unix_hacker_style naming. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@localrefactor
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/audio/win/audio_low_latency_output_win_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/android/media_source_delegate.cc
diff --git a/content/renderer/media/android/media_source_delegate.cc b/content/renderer/media/android/media_source_delegate.cc
index 781383d44763801b95044f3a1f128d07c32cd2e0..be129083ed997e0746ce931a54056cc37abad172 100644
--- a/content/renderer/media/android/media_source_delegate.cc
+++ b/content/renderer/media/android/media_source_delegate.cc
@@ -306,7 +306,7 @@ void MediaSourceDelegate::OnBufferReady(
case DemuxerStream::kOk:
params->access_units[index].status = status;
- if (buffer->IsEndOfStream()) {
+ if (buffer->end_of_stream()) {
params->access_units[index].end_of_stream = true;
params->access_units.resize(index + 1);
break;
@@ -315,15 +315,15 @@ void MediaSourceDelegate::OnBufferReady(
// right away.
// Need to implement this properly using MediaPlayer.OnInfoListener.
if (is_audio) {
- statistics_.audio_bytes_decoded += buffer->GetDataSize();
+ statistics_.audio_bytes_decoded += buffer->data_size();
} else {
- statistics_.video_bytes_decoded += buffer->GetDataSize();
+ statistics_.video_bytes_decoded += buffer->data_size();
statistics_.video_frames_decoded++;
}
- params->access_units[index].timestamp = buffer->GetTimestamp();
+ params->access_units[index].timestamp = buffer->timestamp();
params->access_units[index].data = std::vector<uint8>(
- buffer->GetData(),
- buffer->GetData() + buffer->GetDataSize());
+ buffer->data(),
+ buffer->data() + buffer->data_size());
#if !defined(GOOGLE_TV)
// Vorbis needs 4 extra bytes padding on Android. Check
// NuMediaExtractor.cpp in Android source code.
@@ -334,15 +334,15 @@ void MediaSourceDelegate::OnBufferReady(
kVorbisPadding + 4);
}
#endif
- if (buffer->GetDecryptConfig()) {
+ if (buffer->decrypt_config()) {
params->access_units[index].key_id = std::vector<char>(
- buffer->GetDecryptConfig()->key_id().begin(),
- buffer->GetDecryptConfig()->key_id().end());
+ buffer->decrypt_config()->key_id().begin(),
+ buffer->decrypt_config()->key_id().end());
params->access_units[index].iv = std::vector<char>(
- buffer->GetDecryptConfig()->iv().begin(),
- buffer->GetDecryptConfig()->iv().end());
+ buffer->decrypt_config()->iv().begin(),
+ buffer->decrypt_config()->iv().end());
params->access_units[index].subsamples =
- buffer->GetDecryptConfig()->subsamples();
+ buffer->decrypt_config()->subsamples();
}
if (++index < params->access_units.size()) {
ReadFromDemuxerStream(type, params, index);
« no previous file with comments | « no previous file | media/audio/win/audio_low_latency_output_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698