summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/wifi-display/VideoFormats.cpp
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2013-03-07 10:57:07 -0800
committerAndreas Huber <andih@google.com>2013-03-07 10:57:07 -0800
commit5abf87f9af48149972eeb851ecaea679911da040 (patch)
treea6289a39e6816d933125cfd4f444a7eacc713162 /media/libstagefright/wifi-display/VideoFormats.cpp
parent0ab4d86643dfb668a583c13b8bd61b589dbe8602 (diff)
downloadframeworks_av-5abf87f9af48149972eeb851ecaea679911da040.zip
frameworks_av-5abf87f9af48149972eeb851ecaea679911da040.tar.gz
frameworks_av-5abf87f9af48149972eeb851ecaea679911da040.tar.bz2
Disable our fancy logic to respect both sink and source's native formats
since it isn't actually supported by anything in the field. Change-Id: I9cd038d7631105de26303312ca87c472d67034d4
Diffstat (limited to 'media/libstagefright/wifi-display/VideoFormats.cpp')
-rw-r--r--media/libstagefright/wifi-display/VideoFormats.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/media/libstagefright/wifi-display/VideoFormats.cpp b/media/libstagefright/wifi-display/VideoFormats.cpp
index 9ad8c3c..d171c6f 100644
--- a/media/libstagefright/wifi-display/VideoFormats.cpp
+++ b/media/libstagefright/wifi-display/VideoFormats.cpp
@@ -256,7 +256,7 @@ bool VideoFormats::parseFormatSpec(const char *spec) {
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:
@@ -277,7 +277,7 @@ AString VideoFormats::getFormatSpec() const {
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]);
@@ -289,6 +289,10 @@ bool VideoFormats::PickBestFormat(
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);
@@ -316,6 +320,7 @@ bool VideoFormats::PickBestFormat(
ALOGW("Source advertised native resolution that it doesn't "
"actually support... ignoring");
}
+#endif
bool first = true;
uint32_t bestScore = 0;