since it isn't actually supported by anything in the field.
Change-Id: I9cd038d7631105de26303312ca87c472d67034d4
return GetConfiguration(mNativeType, mNativeIndex, NULL, NULL, NULL, NULL);
}
-AString VideoFormats::getFormatSpec() const {
+AString VideoFormats::getFormatSpec(bool forM4Message) const {
CHECK_EQ(kNumResolutionTypes, 3);
// wfd_video_formats:
return StringPrintf(
"%02x 00 02 02 %08x %08x %08x 00 0000 0000 00 none none",
- (mNativeIndex << 3) | mNativeType,
+ forM4Message ? 0x00 : ((mNativeIndex << 3) | mNativeType),
mResolutionEnabled[0],
mResolutionEnabled[1],
mResolutionEnabled[2]);
const VideoFormats &sourceSupported,
ResolutionType *chosenType,
size_t *chosenIndex) {
+#if 0
+ // Support for the native format is a great idea, the spec includes
+ // these features, but nobody supports it and the tests don't validate it.
+
ResolutionType nativeType;
size_t nativeIndex;
sinkSupported.getNativeResolution(&nativeType, &nativeIndex);
ALOGW("Source advertised native resolution that it doesn't "
"actually support... ignoring");
}
+#endif
bool first = true;
uint32_t bestScore = 0;
bool *interlaced);
bool parseFormatSpec(const char *spec);
- AString getFormatSpec() const;
+ AString getFormatSpec(bool forM4Message = false) const;
static bool PickBestFormat(
const VideoFormats &sinkSupported,
mHDCPPort(0),
mHDCPInitializationComplete(false),
mSetupTriggerDeferred(false) {
- mSupportedSourceVideoFormats.enableAll();
+ mSupportedSourceVideoFormats.disableAll();
mSupportedSourceVideoFormats.setNativeResolution(
VideoFormats::RESOLUTION_CEA, 5); // 1280x720 p30
-
- // Disable resolutions above 1080p since the encoder won't be able to
- // handle them.
- mSupportedSourceVideoFormats.setResolutionEnabled(
- VideoFormats::RESOLUTION_VESA, 28, false); // 1920x1200 p30
-
- mSupportedSourceVideoFormats.setResolutionEnabled(
- VideoFormats::RESOLUTION_VESA, 29, false); // 1920x1200 p60
}
WifiDisplaySource::~WifiDisplaySource() {
chosenVideoFormat.setNativeResolution(
mChosenVideoResolutionType, mChosenVideoResolutionIndex);
- body.append(chosenVideoFormat.getFormatSpec());
+ body.append(chosenVideoFormat.getFormatSpec(true /* forM4Message */));
body.append("\r\n");
}