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
1=== modified file 'src/mcs/basesourcemediamanager.cpp'
2--- src/mcs/basesourcemediamanager.cpp 2016-04-22 08:17:23 +0000
3+++ src/mcs/basesourcemediamanager.cpp 2016-05-05 17:34:16 +0000
4@@ -39,7 +39,12 @@
5 }
6
7 wds::SessionType BaseSourceMediaManager::GetSessionType() const {
8- return wds::VideoSession;
9+ /* Even though we will send only video for the moment in the MPEG stream,
10+ * we identify ourselves as an audio/video session, because some buggy
11+ * dongles need the audio codec to be set in the negotiation for screencast
12+ * to happen.
13+ */
14+ return wds::AudioVideoSession;
15 }
16
17 void BaseSourceMediaManager::SetSinkRtpPorts(int port1, int port2) {
18@@ -121,19 +126,16 @@
19 }
20
21 bool BaseSourceMediaManager::InitOptimalAudioFormat(const std::vector<wds::AudioCodec>& sink_codecs) {
22- for (const auto& codec : sink_codecs) {
23- if (codec.format == wds::AAC && codec.modes.test(wds::AAC_48K_16B_2CH))
24- return true;
25- }
26+ if (sink_codecs.empty())
27+ return false;
28
29- return false;
30+ /* Just take first codec until we implement audio */
31+ audio_codec_ = sink_codecs[0];
32+ return true;
33 }
34
35 wds::AudioCodec BaseSourceMediaManager::GetOptimalAudioFormat() const {
36- wds::AudioModes audio_modes;
37- audio_modes.set(wds::AAC_48K_16B_2CH);
38-
39- return wds::AudioCodec(wds::AAC, audio_modes, 0);
40+ return audio_codec_;
41 }
42
43 void BaseSourceMediaManager::SendIDRPicture() {
44
45=== modified file 'src/mcs/basesourcemediamanager.h'
46--- src/mcs/basesourcemediamanager.h 2016-04-22 08:17:23 +0000
47+++ src/mcs/basesourcemediamanager.h 2016-05-05 17:34:16 +0000
48@@ -61,6 +61,7 @@
49 int sink_port1_;
50 int sink_port2_;
51 wds::H264VideoFormat format_;
52+ wds::AudioCodec audio_codec_;
53 unsigned int session_id_;
54 };
55 } // namespace mcs

Subscribers

People subscribed via source and target branches