• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2021 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef CAST_STANDALONE_SENDER_CONNECTION_SETTINGS_H_
6 #define CAST_STANDALONE_SENDER_CONNECTION_SETTINGS_H_
7 
8 #include <string>
9 
10 #include "cast/streaming/constants.h"
11 #include "platform/base/interface_info.h"
12 
13 namespace openscreen {
14 namespace cast {
15 
16 // The connection settings for a given standalone sender instance. These fields
17 // are used throughout the standalone sender component to initialize state from
18 // the command line parameters.
19 struct ConnectionSettings {
20   // The endpoint of the receiver we wish to connect to.
21   IPEndpoint receiver_endpoint;
22 
23   // The path to the file that we want to play.
24   std::string path_to_file;
25 
26   // The maximum bitrate. Default value means a reasonable default will be
27   // selected.
28   int max_bitrate = 0;
29 
30   // Whether the stream should include video, or just be audio only.
31   bool should_include_video = true;
32 
33   // Whether we should use the hacky RTP stream IDs for legacy android
34   // receivers, or if we should use the proper values. For more information,
35   // see https://issuetracker.google.com/184438154.
36   bool use_android_rtp_hack = true;
37 
38   // Whether we should use remoting for the video, instead of the default of
39   // mirroring.
40   bool use_remoting = false;
41 
42   // Whether we should loop the video when it is completed.
43   bool should_loop_video = true;
44 
45   // The codec to use for encoding negotiated video streams.
46   VideoCodec codec;
47 };
48 
49 }  // namespace cast
50 }  // namespace openscreen
51 
52 #endif  // CAST_STANDALONE_SENDER_CONNECTION_SETTINGS_H_
53