aboutsummaryrefslogtreecommitdiff
path: root/cast/standalone_sender/main.cc
diff options
context:
space:
mode:
authorJordan Bayles <jophba@chromium.org>2021-06-10 11:23:55 -0700
committerOpenscreen LUCI CQ <openscreen-scoped@luci-project-accounts.iam.gserviceaccount.com>2021-06-10 19:10:22 +0000
commitf6e2b5ea1dfca4fceb6e1d4004494a88006e1f9f (patch)
tree1bcb7cfe38c6c8ea18f4bb42b6b01ef7fc68b022 /cast/standalone_sender/main.cc
parent1a4e533d57c2b879704759cdffb2a00f71266346 (diff)
downloadopenscreen-f6e2b5ea1dfca4fceb6e1d4004494a88006e1f9f.tar.gz
[Cast Streaming] Improve remoting in ReceiverSession API
This patch continues the process of wrapping up remoting support, by adding some support to the standalone implementations and cleaning up the ReceiverSession API. From here, the actual media stream will have to be mocked out/a standalone implementation created so that we can properly test the entire remoting flow and set the stage for integration into chrome. Bug: b/184186390 Change-Id: Ib2a5526ce5db71cb093f228acbc64cf3060e677d Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2939634 Commit-Queue: Jordan Bayles <jophba@chromium.org> Reviewed-by: Ryan Keane <rwkeane@google.com>
Diffstat (limited to 'cast/standalone_sender/main.cc')
-rw-r--r--cast/standalone_sender/main.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/cast/standalone_sender/main.cc b/cast/standalone_sender/main.cc
index c6680cd5..27ff3287 100644
--- a/cast/standalone_sender/main.cc
+++ b/cast/standalone_sender/main.cc
@@ -70,6 +70,8 @@ usage: %s <options> addr[:port] media_file
Use the wrong RTP payload types, for compatibility with older Android
TV receivers. See https://crbug.com/631828.
+ -r, --remoting: Enable remoting content instead of mirroring.
+
-t, --tracing: Enable performance tracing logging.
-v, --verbose: Enable verbose logging.
@@ -111,6 +113,7 @@ int StandaloneSenderMain(int argc, char* argv[]) {
{"developer-certificate", required_argument, nullptr, 'd'},
#endif
{"android-hack", no_argument, nullptr, 'a'},
+ {"remoting", no_argument, nullptr, 'r'},
{"tracing", no_argument, nullptr, 't'},
{"verbose", no_argument, nullptr, 'v'},
{"help", no_argument, nullptr, 'h'},
@@ -120,10 +123,11 @@ int StandaloneSenderMain(int argc, char* argv[]) {
bool is_verbose = false;
std::string developer_certificate_path;
bool use_android_rtp_hack = false;
+ bool use_remoting = false;
int max_bitrate = kDefaultMaxBitrate;
std::unique_ptr<TextTraceLoggingPlatform> trace_logger;
int ch = -1;
- while ((ch = getopt_long(argc, argv, "m:d:atvh", kArgumentOptions,
+ while ((ch = getopt_long(argc, argv, "m:d:artvh", kArgumentOptions,
nullptr)) != -1) {
switch (ch) {
case 'm':
@@ -143,6 +147,9 @@ int StandaloneSenderMain(int argc, char* argv[]) {
case 'a':
use_android_rtp_hack = true;
break;
+ case 'r':
+ use_remoting = true;
+ break;
case 't':
trace_logger = std::make_unique<TextTraceLoggingPlatform>();
break;
@@ -206,8 +213,9 @@ int StandaloneSenderMain(int argc, char* argv[]) {
cast_agent = new LoopingFileCastAgent(
task_runner, [&] { task_runner->RequestStopSoon(); });
cast_agent->Connect({remote_endpoint, path, max_bitrate,
- true /* should_include_video */,
- use_android_rtp_hack});
+ .should_include_video = true,
+ .use_android_rtp_hack = use_android_rtp_hack,
+ .use_remoting = use_remoting});
});
// Run the event loop until SIGINT (e.g., CTRL-C at the console) or