This source file includes following definitions.
- state_
- OnVideoFrame
- OnReadyStateChanged
- OnEnabledChanged
#include "content/renderer/media/mock_media_stream_video_sink.h"
namespace content {
MockMediaStreamVideoSink::MockMediaStreamVideoSink()
: number_of_frames_(0),
enabled_(true),
format_(media::VideoFrame::UNKNOWN),
state_(blink::WebMediaStreamSource::ReadyStateLive) {
}
void MockMediaStreamVideoSink::OnVideoFrame(
const scoped_refptr<media::VideoFrame>& frame) {
++number_of_frames_;
format_ = frame->format();
}
void MockMediaStreamVideoSink::OnReadyStateChanged(
blink::WebMediaStreamSource::ReadyState state) {
state_ = state;
}
void MockMediaStreamVideoSink::OnEnabledChanged(bool enabled) {
enabled_ = enabled;
}
}