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

Unified Diff: examples/audio_play_test/play_wav.cc

Issue 1902183002: Motown: Change media type (stream type) representation (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Changes per review feedback. Created 4 years, 8 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
Index: examples/audio_play_test/play_wav.cc
diff --git a/examples/audio_play_test/play_wav.cc b/examples/audio_play_test/play_wav.cc
index f8ed93ee3940d29acf040d47bc609a6bcd732249..b11f31f725d05070d45fb339c7ca19057db51b5d 100644
--- a/examples/audio_play_test/play_wav.cc
+++ b/examples/audio_play_test/play_wav.cc
@@ -271,17 +271,18 @@ void PlayWAVApp::ProcessHTTPResponse(URLResponsePtr resp) {
cfg->audio_frame_ratio = tmp.numerator;
cfg->media_time_ratio = tmp.denominator;
- LpcmMediaTypeDetailsPtr pcm_cfg = LpcmMediaTypeDetails::New();
+ AudioMediaTypeDetailsPtr pcm_cfg = AudioMediaTypeDetails::New();
pcm_cfg->sample_format = (wav_info_.bits_per_sample == 8)
- ? LpcmSampleFormat::UNSIGNED_8
- : LpcmSampleFormat::SIGNED_16;
+ ? AudioSampleFormat::UNSIGNED_8
+ : AudioSampleFormat::SIGNED_16;
pcm_cfg->channels = wav_info_.channel_count;
pcm_cfg->frames_per_second = wav_info_.frame_rate;
cfg->media_type = MediaType::New();
- cfg->media_type->scheme = MediaTypeScheme::LPCM;
+ cfg->media_type->medium = MediaTypeMedium::AUDIO;
cfg->media_type->details = MediaTypeDetails::New();
- cfg->media_type->details->set_lpcm(pcm_cfg.Pass());
+ cfg->media_type->details->set_audio(pcm_cfg.Pass());
+ cfg->media_type->encoding = MediaType::kAudioEncodingLpcm;
// Configure the track based on the WAV header information.
MediaConsumerPtr media_pipe;
« no previous file with comments | « examples/audio_play_test/play_tone.cc ('k') | mojo/dart/packages/mojo_services/lib/mojo/media/media_types.mojom.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698