Intel® Collaboration Suite for WebRTC  version 4.3.1
Open WebRTC Toolkit (OWT) Client SDK for Windows*
localcamerastreamparameters.h
1 // Copyright (C) <2018> Intel Corporation
2 //
3 // SPDX-License-Identifier: Apache-2.0
4 
5 #ifndef OWT_BASE_LOCALCAMERASTREAMPARAMETERS_H_
6 #define OWT_BASE_LOCALCAMERASTREAMPARAMETERS_H_
7 #include <string>
8 #include "owt/base/commontypes.h"
9 namespace owt {
10 namespace base{
18  public:
24  LocalCameraStreamParameters(bool audio_enabled, bool video_enabled);
33  void CameraId(const std::string& camera_id);
38  void StreamName(const std::string& stream_name);
46  void Resolution(int width, int height);
53  void Fps(int fps);
55  std::string CameraId() const { return camera_id_; }
56  std::string StreamName() const { return stream_name_; }
57  int ResolutionWidth() const { return resolution_width_; }
58  int ResolutionHeight() const { return resolution_height_; }
59  int Fps() const { return fps_; }
60  bool VideoEnabled() const { return video_enabled_; }
61  bool AudioEnabled() const { return audio_enabled_; }
63  private:
64  std::string camera_id_;
65  std::string stream_name_;
66  int resolution_width_;
67  int resolution_height_;
68  int fps_;
69  bool video_enabled_;
70  bool audio_enabled_;
71 };
79  public:
85  LocalCustomizedStreamParameters(bool audio_enabled, bool video_enabled) {
86  video_enabled_ = video_enabled;
87  audio_enabled_ = audio_enabled;
88  fps_ = 0;
89  bitrate_kbps_ = 0;
90  resolution_width_ = resolution_height_ = 0;
91  }
100  void Resolution(int width, int height) {
101  resolution_width_ = width;
102  resolution_height_ = height;
103  }
110  void Fps(int fps) {
111  fps_ = fps;
112  }
117  void Bitrate(int bitrate_kbps) {
118  bitrate_kbps_ = bitrate_kbps;
119  }
121  int ResolutionWidth() const { return resolution_width_; }
122  int ResolutionHeight() const { return resolution_height_; }
123  int Fps() const { return fps_; }
124  uint32_t Bitrate() const { return bitrate_kbps_; }
129  bool VideoEnabled() const { return video_enabled_; }
134  bool AudioEnabled() const { return audio_enabled_; }
136  private:
137  bool video_enabled_;
138  bool audio_enabled_;
139  int resolution_width_;
140  int resolution_height_;
141  uint32_t fps_;
142  uint32_t bitrate_kbps_;
143 };
151  public:
152  enum class DesktopCapturePolicy : int {
154  kDefault = 0,
157  kEnableDirectX = 1,
160  kEnableEffects = 2,
166  };
167  enum class DesktopSourceType : int {
169  kFullScreen = 1,
172  };
181  bool audio_enabled,
182  bool video_enabled);
188  bool VideoEnabled() const { return video_enabled_; }
193  bool AudioEnabled() const { return audio_enabled_; }
199  void SourceType(DesktopSourceType source_type) {
200  source_type_ = source_type;
201  }
206  void CapturePolicy(DesktopCapturePolicy capture_policy) {
207  capture_policy_ = capture_policy;
208  }
214  void Fps(int fps);
216  int Fps() const { return fps_; }
217  DesktopSourceType SourceType() const { return source_type_; }
218  DesktopCapturePolicy CapturePolicy() const { return capture_policy_; }
220  private:
221  bool video_enabled_;
222  bool audio_enabled_;
223  int fps_;
224  DesktopSourceType source_type_;
225  DesktopCapturePolicy capture_policy_;
226 };
227 }
228 }
229 #endif // OWT_BASE_LOCALCAMERASTREAMPARAMETERS_H_
DesktopSourceType
Definition: localcamerastreamparameters.h:167
bool AudioEnabled() const
Get audio is enabled or not for this stream.
Definition: localcamerastreamparameters.h:193
void Fps(int fps)
Set the frame rate. The actual frame rate of window/screen capturing may be lower than this...
LocalCameraStreamParameters(bool audio_enabled, bool video_enabled)
Initialize a LocalCameraStreamParameters.
void CapturePolicy(DesktopCapturePolicy capture_policy)
Set the capturer features capture_policy Indicate the feature used by the capturer.
Definition: localcamerastreamparameters.h:206
void Fps(int fps)
Set the frame rate. If the frame rate specified is not supported on current device, creation will failed.
void Fps(int fps)
Set the frame rate. If the frame rate specified is not supported on current device, creation will failed.
Definition: localcamerastreamparameters.h:110
LocalCustomizedStreamParameters(bool audio_enabled, bool video_enabled)
Initialize a LocalCustomizedStreamParameters for YUV input.
Definition: localcamerastreamparameters.h:85
LocalDesktopStreamParameters(bool audio_enabled, bool video_enabled)
Initialize a LocalDesktopStreamParameters.
bool VideoEnabled() const
Get video is enabled or not for this stream.
Definition: localcamerastreamparameters.h:188
Definition: audioplayerinterface.h:8
This class contains parameters and methods that&#39;s needed for creating a local stream with certain scr...
Definition: localcamerastreamparameters.h:150
This class contains parameters and methods that needed for creating a local customized stream...
Definition: localcamerastreamparameters.h:78
DesktopCapturePolicy
Definition: localcamerastreamparameters.h:152
void SourceType(DesktopSourceType source_type)
Set the source type of screen/app sharing.
Definition: localcamerastreamparameters.h:199
void StreamName(const std::string &stream_name)
Set the ID of media stream.
void CameraId(const std::string &camera_id)
Set the ID of the camera to be used.
This class contains parameters and methods that needed for creating a local camera stream...
Definition: localcamerastreamparameters.h:17
void Resolution(int width, int height)
Set the video resolution. If the resolution specified is not supported on current device...
Definition: localcamerastreamparameters.h:100
With this policy set, capturer can send out scaled captured frame.
void Bitrate(int bitrate_kbps)
Set the bitrate of encoded frame.
Definition: localcamerastreamparameters.h:117
void Resolution(int width, int height)
Set the video resolution. If the resolution specified is not supported on current device...