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

Unified Diff: chrome/renderer/media/cast_session.h

Issue 2307653002: Adding CastRemotingSender for media remoting. (Closed)
Patch Set: Rebased. Created 4 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
Index: chrome/renderer/media/cast_session.h
diff --git a/chrome/renderer/media/cast_session.h b/chrome/renderer/media/cast_session.h
index 2ccbc747a67f32f15ad88ac52e902ecf830b82d5..9da013b4c297aed6197cde1d9a84d96c7c635764 100644
--- a/chrome/renderer/media/cast_session.h
+++ b/chrome/renderer/media/cast_session.h
@@ -39,16 +39,16 @@ class CastSessionDelegate;
// CastSessionDelegate on the IO thread.
class CastSession : public base::RefCounted<CastSession> {
public:
- typedef base::Callback<void(const scoped_refptr<
- media::cast::AudioFrameInput>&)> AudioFrameInputAvailableCallback;
- typedef base::Callback<void(const scoped_refptr<
- media::cast::VideoFrameInput>&)> VideoFrameInputAvailableCallback;
- typedef base::Callback<void(const std::vector<char>&)> SendPacketCallback;
- typedef base::Callback<void(std::unique_ptr<base::BinaryValue>)>
- EventLogsCallback;
- typedef base::Callback<void(std::unique_ptr<base::DictionaryValue>)>
- StatsCallback;
- typedef base::Callback<void(const std::string&)> ErrorCallback;
+ using AudioFrameInputAvailableCallback =
+ base::Callback<void(const scoped_refptr<media::cast::AudioFrameInput>&)>;
+ using VideoFrameInputAvailableCallback =
+ base::Callback<void(const scoped_refptr<media::cast::VideoFrameInput>&)>;
+ using SendPacketCallback = base::Callback<void(const std::vector<char>&)>;
+ using EventLogsCallback =
+ base::Callback<void(std::unique_ptr<base::BinaryValue>)>;
+ using StatsCallback =
+ base::Callback<void(std::unique_ptr<base::DictionaryValue>)>;
+ using ErrorCallback = base::Callback<void(const std::string&)>;
CastSession();
@@ -67,6 +67,12 @@ class CastSession : public base::RefCounted<CastSession> {
const VideoFrameInputAvailableCallback& callback,
const ErrorCallback& error_callback);
+ // Start remoting a stream. |error_callback| will be invoked when any error
+ // occurs. |StartUDP()| must be called before calling this method.
+ void StartRemotingStream(int32_t stream_id,
+ const media::cast::FrameSenderConfig& config,
+ const ErrorCallback& error_callback);
+
// This will create the Cast transport and connect to |remote_endpoint|.
// |options| is a dictionary which contain optional configuration for the
// udp transport.

Powered by Google App Engine
This is Rietveld 408576698