blob: c65803622036e6b8c502ddde7403e7c39a07f560 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/public/renderer/media_stream_video_sink.h"
#include "base/logging.h"
#include "content/renderer/media/media_stream_video_track.h"
#include "third_party/WebKit/public/platform/WebMediaStreamTrack.h"
namespace content {
void MediaStreamVideoSink::AddToVideoTrack(
MediaStreamVideoSink* sink,
const blink::WebMediaStreamTrack& track) {
DCHECK_EQ(blink::WebMediaStreamSource::TypeVideo, track.source().type());
MediaStreamVideoTrack* video_track =
static_cast<MediaStreamVideoTrack*>(track.extraData());
video_track->AddSink(sink);
}
void MediaStreamVideoSink::RemoveFromVideoTrack(
MediaStreamVideoSink* sink,
const blink::WebMediaStreamTrack& track) {
DCHECK_EQ(blink::WebMediaStreamSource::TypeVideo, track.source().type());
MediaStreamVideoTrack* video_track =
static_cast<MediaStreamVideoTrack*>(track.extraData());
video_track->RemoveSink(sink);
}
} // namespace content
|