Closed
Bug 1406935
Opened 7 years ago
Closed 7 years ago
Write unittest for configuring VideoConduit
Categories
(Core :: WebRTC: Audio/Video, enhancement, P3)
Tracking
()
RESOLVED
FIXED
mozilla59
People
(Reporter: pehrsons, Assigned: dminor)
References
(Blocks 1 open bug)
Details
Attachments
(6 files)
59 bytes,
text/x-review-board-request
|
pehrsons
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
pehrsons
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
pehrsons
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
pehrsons
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
mjf
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
mjf
:
review+
|
Details |
Configure VideoConduit similar to how our signaling layer does it, and see that we call into a mocked encoder stack with the right values.
Repeat for different signaling properties, like b=TIAS, max-fs, max-fr. See VideoCodecConfig.
Reporter | ||
Updated•7 years ago
|
Rank: 28
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → dminor
Status: NEW → ASSIGNED
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 4•7 years ago
|
||
Comment 5•7 years ago
|
||
mozreview-review |
Comment on attachment 8930618 [details]
Bug 1406935 - Add unittests for ConfigureSendMediaCodec;
https://reviewboard.mozilla.org/r/201738/#review207032
C/C++ static analysis found 2 defects in this patch.
You can run this analysis locally with: `./mach static-analysis check path/to/file.cpp`
::: media/webrtc/signaling/gtest/videoconduit_unittests.cpp:69
(Diff revision 1)
> + UniquePtr<cricket::VideoAdapter>(mAdapter));
> + std::vector<unsigned int> ssrcs = {42};
> + mVideoConduit->SetLocalSSRCs(ssrcs);
> + }
> +
> + ~VideoConduitTest()
Warning: Annotate this function with 'override' or (rarely) 'final' [clang-tidy: modernize-use-override]
~VideoConduitTest()
^
override
::: media/webrtc/signaling/gtest/videoconduit_unittests.cpp:69
(Diff revision 1)
> + UniquePtr<cricket::VideoAdapter>(mAdapter));
> + std::vector<unsigned int> ssrcs = {42};
> + mVideoConduit->SetLocalSSRCs(ssrcs);
> + }
> +
> + ~VideoConduitTest()
Warning: Use '= default' to define a trivial destructor [clang-tidy: modernize-use-equals-default]
Reporter | ||
Comment 6•7 years ago
|
||
mozreview-review |
Comment on attachment 8930617 [details]
Bug 1406935 - Add mocks for AudioStreams, VideoStreams and Call;
https://reviewboard.mozilla.org/r/201736/#review207312
::: media/webrtc/signaling/src/media-conduit/MediaConduitInterface.h:81
(Diff revision 1)
> mCall.reset(webrtc::Call::Create(config));
> }
> +
> + explicit WebRtcCallWrapper(webrtc::Call* aCall)
> + {
> + mCall.reset(aCall);
Assert that aCall is non-null here. And let this and `Create(Call)` take a `UniquePtr<Call>&&` instead, since it transfers ownership?
Attachment #8930617 -
Flags: review?(apehrson) → review+
Reporter | ||
Comment 7•7 years ago
|
||
mozreview-review |
Comment on attachment 8930618 [details]
Bug 1406935 - Add unittests for ConfigureSendMediaCodec;
https://reviewboard.mozilla.org/r/201738/#review207314
Great!
::: media/webrtc/signaling/gtest/videoconduit_unittests.cpp:83
(Diff revision 1)
> + unsigned int cbcrplane_length = (width*height + 1)/2;
> + unsigned int video_length = yplane_length + cbcrplane_length;
> + uint8_t* buffer = new uint8_t[video_length];
> + memset(buffer, 0x10, yplane_length);
> + memset(buffer + yplane_length, 0x80, cbcrplane_length);
> + return conduit->SendVideoFrame(buffer, video_length, width, height,
Should this call into mVideoConduit instead? Or make it a static function.
::: media/webrtc/signaling/src/media-conduit/VideoConduit.cpp:833
(Diff revision 1)
> + } else {
> + // Reset to defaults
> + mSendStreamConfig.rtp.ulpfec.ulpfec_payload_type = -1;
> + mSendStreamConfig.rtp.ulpfec.red_payload_type = -1;
> + mSendStreamConfig.rtp.ulpfec.red_rtx_payload_type = -1;
Are these fixes you found thanks to the tests? If so (great!) could you put them in their own patch? :-)
Attachment #8930618 -
Flags: review?(apehrson) → review+
Reporter | ||
Comment 8•7 years ago
|
||
mozreview-review |
Comment on attachment 8930619 [details]
Bug 1406935 - Add unittests for ConfigureRecvMediaCodecs;
https://reviewboard.mozilla.org/r/201740/#review207324
::: media/webrtc/signaling/gtest/videoconduit_unittests.cpp:199
(Diff revision 1)
> + codecs.push_back(&codecConfig);
> + codecs.push_back(&codecConfig);
Why two?
Attachment #8930619 -
Flags: review?(apehrson) → review+
Assignee | ||
Comment 9•7 years ago
|
||
mozreview-review-reply |
Comment on attachment 8930619 [details]
Bug 1406935 - Add unittests for ConfigureRecvMediaCodecs;
https://reviewboard.mozilla.org/r/201740/#review207324
> Why two?
It tests this [1]. I've added a comment to explain why.
[1] https://searchfox.org/mozilla-central/rev/797c93d81fe446f78babf20894f0729f15f71ee6/media/webrtc/signaling/src/media-conduit/VideoConduit.cpp#1321
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 16•7 years ago
|
||
mozreview-review |
Comment on attachment 8931018 [details]
Bug 1406935 - Reset FEC payload types in ConfigureSendMediaCodec;
https://reviewboard.mozilla.org/r/202112/#review207570
Looks good to me.
Attachment #8931018 -
Flags: review?(mfroman) → review+
Comment 17•7 years ago
|
||
mozreview-review |
Comment on attachment 8931019 [details]
Bug 1406935 - Initialize mRembFbSet in VideoCodecConfig ctor;
https://reviewboard.mozilla.org/r/202114/#review207572
Looks good to me.
Attachment #8931019 -
Flags: review?(mfroman) → review+
Reporter | ||
Comment 18•7 years ago
|
||
mozreview-review |
Comment on attachment 8931017 [details]
Bug 1406935 - Ensure maximum bitrate is at least minimum bitrate in VideoConduit;
https://reviewboard.mozilla.org/r/202110/#review207784
Attachment #8931017 -
Flags: review?(apehrson) → review+
Comment 19•7 years ago
|
||
Pushed by dminor@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/74ecfa0dab0b
Add mocks for AudioStreams, VideoStreams and Call; r=pehrsons
https://hg.mozilla.org/integration/autoland/rev/b1e08eeccbc8
Ensure maximum bitrate is at least minimum bitrate in VideoConduit; r=pehrsons
https://hg.mozilla.org/integration/autoland/rev/34cf807c35e4
Reset FEC payload types in ConfigureSendMediaCodec; r=mjf
https://hg.mozilla.org/integration/autoland/rev/854d24a58633
Add unittests for ConfigureSendMediaCodec; r=pehrsons
https://hg.mozilla.org/integration/autoland/rev/6838edf96b1c
Initialize mRembFbSet in VideoCodecConfig ctor; r=mjf
https://hg.mozilla.org/integration/autoland/rev/a6631a517973
Add unittests for ConfigureRecvMediaCodecs; r=pehrsons
Comment 20•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/74ecfa0dab0b
https://hg.mozilla.org/mozilla-central/rev/b1e08eeccbc8
https://hg.mozilla.org/mozilla-central/rev/34cf807c35e4
https://hg.mozilla.org/mozilla-central/rev/854d24a58633
https://hg.mozilla.org/mozilla-central/rev/6838edf96b1c
https://hg.mozilla.org/mozilla-central/rev/a6631a517973
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox59:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Updated•7 years ago
|
Updated•6 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•