diff options
author | mikhail.pozdnyakov <mikhail.pozdnyakov@intel.com> | 2016-03-14 07:29:34 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-14 14:31:02 +0000 |
commit | d17b1c983f3eb6feb99dab564b21cecc6e699f80 (patch) | |
tree | 688ce3ca33e79f9205e389cad4ec135135ccb694 /content/renderer/media/media_stream_video_source.cc | |
parent | 3e7a9545bff26c2aa07ccf651f7dd9f353c9bdc9 (diff) | |
download | chromium_src-d17b1c983f3eb6feb99dab564b21cecc6e699f80.zip chromium_src-d17b1c983f3eb6feb99dab564b21cecc6e699f80.tar.gz chromium_src-d17b1c983f3eb6feb99dab564b21cecc6e699f80.tar.bz2 |
MediaStreamVideoSource exports current video format
This patch adds a getter to the MediaStreamVideoSource class which
returns the current video format.
The video format details are necessary during establishing of WiFi
Display session (for the capabilities negotiation with the sink).
BUG=242107
Review URL: https://codereview.chromium.org/1672713002
Cr-Commit-Position: refs/heads/master@{#380969}
Diffstat (limited to 'content/renderer/media/media_stream_video_source.cc')
-rw-r--r-- | content/renderer/media/media_stream_video_source.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/content/renderer/media/media_stream_video_source.cc b/content/renderer/media/media_stream_video_source.cc index f5e2eb1..9e4eeb9 100644 --- a/content/renderer/media/media_stream_video_source.cc +++ b/content/renderer/media/media_stream_video_source.cc @@ -401,6 +401,14 @@ base::SingleThreadTaskRunner* MediaStreamVideoSource::io_task_runner() const { return track_adapter_->io_task_runner(); } +const media::VideoCaptureFormat* + MediaStreamVideoSource::GetCurrentFormat() const { + DCHECK(CalledOnValidThread()); + if (state_ == STARTING || state_ == STARTED) + return ¤t_format_; + return nullptr; +} + void MediaStreamVideoSource::DoStopSource() { DCHECK(CalledOnValidThread()); DVLOG(3) << "DoStopSource()"; |