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

Unified Diff: examples/media_test/media_test.cc

Issue 2069873003: Motown: Define MediaRenderer and make it the way we identify renderers. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix build break...audio_track_controller.* gone for good. Created 4 years, 6 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/media_test/media_test.cc
diff --git a/examples/media_test/media_test.cc b/examples/media_test/media_test.cc
index d8f0858dbb83915588d9b90e02adeba1a12d6b1b..6294fe2cc8881277736d1cab5d5934a5f4004b8a 100644
--- a/examples/media_test/media_test.cc
+++ b/examples/media_test/media_test.cc
@@ -4,6 +4,8 @@
#include "examples/media_test/media_test.h"
#include "mojo/public/cpp/application/connect.h"
+#include "mojo/services/media/audio/interfaces/audio_server.mojom.h"
+#include "mojo/services/media/audio/interfaces/audio_track.mojom.h"
#include "mojo/services/media/common/cpp/timeline.h"
#include "mojo/services/media/common/cpp/timeline_function.h"
#include "mojo/services/media/control/interfaces/media_factory.mojom.h"
@@ -23,9 +25,17 @@ MediaTest::MediaTest(mojo::Shell* shell, const std::string& input_file_name) {
MediaFactoryPtr factory;
ConnectToService(shell, "mojo:media_factory", GetProxy(&factory));
+ AudioServerPtr audio_service;
+ ConnectToService(shell, "mojo:audio_server", GetProxy(&audio_service));
+ AudioTrackPtr audio_track;
+ MediaRendererPtr audio_renderer;
+ audio_service->CreateTrack(GetProxy(&audio_track), GetProxy(&audio_renderer));
+
SeekingReaderPtr reader;
factory->CreateNetworkReader(input_file_name, GetProxy(&reader));
- factory->CreatePlayer(reader.Pass(), GetProxy(&media_player_));
+
+ factory->CreatePlayer(reader.Pass(), audio_renderer.Pass(), nullptr,
+ GetProxy(&media_player_));
HandleStatusUpdates();
}
« no previous file with comments | « examples/media_test/BUILD.gn ('k') | mojo/dart/packages/mojo_services/lib/mojo/media/audio_server.mojom.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698