forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
media: scaffolding and plumbing for MojoRenderer{Impl, Service}
* Add skeleton client-side and service-side MediaRenderer pieces with basic plumbing and connections but no real logic. * model a media::DemuxerStream in a mojom to clean up MediaRenderer interface and line-up with RendererImpl expectations. * add DecoderConfig plumbing support * add a basic unittest verifying things do actually hook up * consolidate around 'media_mojo_' naming in media.gyp and add media_mojo target to build all this stuff. BUG=410451 Review URL: https://codereview.chromium.org/551963004 Cr-Commit-Position: refs/heads/master@{#295579}
- Loading branch information
tim
authored and
Commit bot
committed
Sep 18, 2014
1 parent
48f08c4
commit 09f86c0
Showing
21 changed files
with
1,426 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Copyright 2014 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
group("mojo") { | ||
public_deps = [ | ||
"//media/mojo/interfaces", | ||
"//media/mojo/services", | ||
] | ||
} | ||
|
||
group("tests") { | ||
testonly = true | ||
deps = [ | ||
"//media/mojo/services:tests" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
include_rules = [ | ||
"+mojo/application", | ||
"+mojo/public", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// Copyright 2014 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
import "media/mojo/interfaces/media_types.mojom" | ||
|
||
module mojo { | ||
|
||
// DemuxerStream is modeled after media::DemuxerStream using mojo in order to | ||
// enable proxying between a media::Pipeline and media::Renderer living in two | ||
// different applications. | ||
[Client=DemuxerStreamClient] | ||
interface DemuxerStream { | ||
// See media::DemuxerStream for descriptions. | ||
enum Type { | ||
UNKNOWN, | ||
AUDIO, | ||
LAST_TYPE = AUDIO | ||
}; | ||
|
||
// See media::DemuxerStream for descriptions. | ||
enum Status { | ||
OK = 0, | ||
ABORTED, | ||
CONFIG_CHANGED, | ||
}; | ||
|
||
// Request a MediaDecoderBuffer from this stream for decoding and rendering. | ||
// When available, the callback will be invoked with a Status and |response| | ||
// buffer. See media::DemuxerStream::ReadCB for explanation of fields. | ||
// | ||
// TODO(tim): Remove this method in favor of initializing the | ||
// DemuxerStreamClient with a DataPipeConsumerHandle once we have a framed | ||
// DataPipe that we can serialize [|status| | response|]* over directly. | ||
Read() => (Status status, MediaDecoderBuffer response); | ||
}; | ||
|
||
interface DemuxerStreamClient { | ||
// Informs the client that the stream is ready for reading. If |pipe| is | ||
// present, it means the client should read | ||
// | ||
// [ |DemuxerStream::Status| |MediaDecoderBuffer| ] | ||
// | ||
// payloads from the DataPipe directly. If |pipe| is NULL, it means the | ||
// client needs to use DemuxerStream::Read() directly to obtain buffers. | ||
OnStreamReady(handle<data_pipe_consumer>? pipe); | ||
|
||
// A new AudioDecoderConfig is available. Will be sent by the DemuxerStream | ||
// whenever a DemuxerStream::STATUS_CONFIG_CHANGED is observed (either | ||
// in a Read() callback or over the DataPipe). | ||
OnAudioDecoderConfigChanged(AudioDecoderConfig config); | ||
}; | ||
|
||
} // module mojo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.