Delete backwards compatibility cruft from cricket::VideoFrame and VideoSourceInterface.
Follow up to cls https://codereview.webrtc.org/1594973006/ and https://codereview.webrtc.org/1586613002/, possible now that the chrome cls https://codereview.chromium.org/1660483002/ and https://codereview.chromium.org/1603463007/ are landed. BUG=webrtc:5426 Review URL: https://codereview.webrtc.org/1668473003 Cr-Commit-Position: refs/heads/master@{#11484}
This commit is contained in:
parent
c2148a50d2
commit
8cb910d2fd
@ -49,27 +49,11 @@ class VideoSourceInterface : public MediaSourceInterface {
|
||||
virtual void Stop() = 0;
|
||||
virtual void Restart() = 0;
|
||||
|
||||
// TODO(nisse): Delete these backwards compatibility wrappers after
|
||||
// chrome is updated. Needed now because chrome's MockVideoSource
|
||||
// defines a method with this signature (and marked with override).
|
||||
// In addition, we need a dummy default implementation for the new
|
||||
// AddSink/RemoveSink methods below, because they're unimplemented
|
||||
// in the same class. This is ugly, but for MockVideoSource it
|
||||
// doesn't really matter what these methods do, because they're not
|
||||
// used.
|
||||
virtual void AddSink(cricket::VideoRenderer* output) {
|
||||
AddSink(static_cast<rtc::VideoSinkInterface<cricket::VideoFrame>*>(output));
|
||||
}
|
||||
virtual void RemoveSink(cricket::VideoRenderer* output) {
|
||||
RemoveSink(
|
||||
static_cast<rtc::VideoSinkInterface<cricket::VideoFrame>*>(output));
|
||||
}
|
||||
|
||||
// Adds |output| to the source to receive frames.
|
||||
// TODO(nisse): Delete dummy default implementation.
|
||||
virtual void AddSink(rtc::VideoSinkInterface<cricket::VideoFrame>* output){};
|
||||
virtual void AddSink(
|
||||
rtc::VideoSinkInterface<cricket::VideoFrame>* output) = 0;
|
||||
virtual void RemoveSink(
|
||||
rtc::VideoSinkInterface<cricket::VideoFrame>* output){};
|
||||
rtc::VideoSinkInterface<cricket::VideoFrame>* output) = 0;
|
||||
virtual const cricket::VideoOptions* options() const = 0;
|
||||
virtual cricket::VideoRenderer* FrameInput() = 0;
|
||||
|
||||
|
||||
@ -120,7 +120,7 @@ TEST_F(VideoTrackTest, DisableTrackBlackout) {
|
||||
ASSERT_FALSE(renderer_input == NULL);
|
||||
|
||||
cricket::WebRtcVideoFrame frame;
|
||||
frame.InitToBlack(100, 200, 1, 1, 0);
|
||||
frame.InitToBlack(100, 200, 0);
|
||||
// Make it not all-black
|
||||
frame.GetUPlane()[0] = 0;
|
||||
|
||||
|
||||
@ -43,11 +43,6 @@ class VideoFrame {
|
||||
|
||||
virtual bool InitToBlack(int w, int h, int64_t time_stamp) = 0;
|
||||
|
||||
// TODO(nisse): Old signature. Delete after chrome is updated.
|
||||
virtual bool InitToBlack(int w, int h, size_t pixel_width,
|
||||
size_t pixel_height, int64_t time_stamp) {
|
||||
return InitToBlack(w, h, time_stamp);
|
||||
}
|
||||
// Creates a frame from a raw sample with FourCC |format| and size |w| x |h|.
|
||||
// |h| can be negative indicating a vertically flipped image.
|
||||
// |dw| is destination width; can be less than |w| if cropping is desired.
|
||||
|
||||
@ -66,16 +66,7 @@ class WebRtcVideoFrame : public VideoFrame {
|
||||
|
||||
void InitToEmptyBuffer(int w, int h, int64_t time_stamp_ns);
|
||||
|
||||
// TODO(nisse): Old signature. Delete after chrome is updated.
|
||||
void InitToEmptyBuffer(int w, int h, size_t pixel_width, size_t pixel_height,
|
||||
int64_t time_stamp_ns) {
|
||||
InitToEmptyBuffer(w, h, time_stamp_ns);
|
||||
}
|
||||
|
||||
bool InitToBlack(int w, int h, int64_t time_stamp_ns) override;
|
||||
// Needed to inherit the InitToBlack wrapper method with 5
|
||||
// arguments.
|
||||
using VideoFrame::InitToBlack;
|
||||
|
||||
// From base class VideoFrame.
|
||||
bool Reset(uint32_t format,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user