Merge lp:~phablet-team/aethercast/fix-for-microsoft-dongle into lp:aethercast

Proposed by Alfonso Sanchez-Beato
Status: Merged
Approved by: Simon Fels
Approved revision: 141
Merged at revision: 141
Proposed branch: lp:~phablet-team/aethercast/fix-for-microsoft-dongle
Merge into: lp:aethercast
Diff against target: 55 lines (+13/-10)
2 files modified
src/mcs/basesourcemediamanager.cpp (+12/-10)
src/mcs/basesourcemediamanager.h (+1/-0)
To merge this branch: bzr merge lp:~phablet-team/aethercast/fix-for-microsoft-dongle
Reviewer Review Type Date Requested Status
Simon Fels Approve
Review via email: mp+293926@code.launchpad.net

Commit message

Fix for Microsoft dongle

Description of the change

Fix for Microsoft dongle

To post a comment you must log in.
Revision history for this message
Jim Hodapp (jhodapp) wrote :

I'd be curious what the negotiation phase looks like with the Microsoft dongle. Maybe it states that it always requires an audio codec be specified even though it's supposed to support video-only streams?

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

The source (us) tells the sink the parameters for the transmission in a SET_PARAMETERS command. The sink does not say in any way that it needs an audio codec: it only says the supported codecs, and we decide which to use if any.

Revision history for this message
Simon Fels (morphis) wrote :

There is no "I-require-video-and-audio-together" flag in the spec. My suspect ion is more that this is simply a test case nobody tests that much as anybody out there doing WiDi supports audio/video always together and not just video as we do at the moment.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/mcs/basesourcemediamanager.cpp'
--- src/mcs/basesourcemediamanager.cpp 2016-04-22 08:17:23 +0000
+++ src/mcs/basesourcemediamanager.cpp 2016-05-05 17:34:16 +0000
@@ -39,7 +39,12 @@
39}39}
4040
41wds::SessionType BaseSourceMediaManager::GetSessionType() const {41wds::SessionType BaseSourceMediaManager::GetSessionType() const {
42 return wds::VideoSession;42 /* Even though we will send only video for the moment in the MPEG stream,
43 * we identify ourselves as an audio/video session, because some buggy
44 * dongles need the audio codec to be set in the negotiation for screencast
45 * to happen.
46 */
47 return wds::AudioVideoSession;
43}48}
4449
45void BaseSourceMediaManager::SetSinkRtpPorts(int port1, int port2) {50void BaseSourceMediaManager::SetSinkRtpPorts(int port1, int port2) {
@@ -121,19 +126,16 @@
121}126}
122127
123bool BaseSourceMediaManager::InitOptimalAudioFormat(const std::vector<wds::AudioCodec>& sink_codecs) {128bool BaseSourceMediaManager::InitOptimalAudioFormat(const std::vector<wds::AudioCodec>& sink_codecs) {
124 for (const auto& codec : sink_codecs) {129 if (sink_codecs.empty())
125 if (codec.format == wds::AAC && codec.modes.test(wds::AAC_48K_16B_2CH))130 return false;
126 return true;
127 }
128131
129 return false;132 /* Just take first codec until we implement audio */
133 audio_codec_ = sink_codecs[0];
134 return true;
130}135}
131136
132wds::AudioCodec BaseSourceMediaManager::GetOptimalAudioFormat() const {137wds::AudioCodec BaseSourceMediaManager::GetOptimalAudioFormat() const {
133 wds::AudioModes audio_modes;138 return audio_codec_;
134 audio_modes.set(wds::AAC_48K_16B_2CH);
135
136 return wds::AudioCodec(wds::AAC, audio_modes, 0);
137}139}
138140
139void BaseSourceMediaManager::SendIDRPicture() {141void BaseSourceMediaManager::SendIDRPicture() {
140142
=== modified file 'src/mcs/basesourcemediamanager.h'
--- src/mcs/basesourcemediamanager.h 2016-04-22 08:17:23 +0000
+++ src/mcs/basesourcemediamanager.h 2016-05-05 17:34:16 +0000
@@ -61,6 +61,7 @@
61 int sink_port1_;61 int sink_port1_;
62 int sink_port2_;62 int sink_port2_;
63 wds::H264VideoFormat format_;63 wds::H264VideoFormat format_;
64 wds::AudioCodec audio_codec_;
64 unsigned int session_id_;65 unsigned int session_id_;
65};66};
66} // namespace mcs67} // namespace mcs

Subscribers

People subscribed via source and target branches