GitHub PullRequestReviewCommentEvent at 2014-02-02 16:07:43
Repository: xbmc
Actor: elupus
Payload: {"comment":{"url":"https://api.github.com/repos/xbmc/xbmc/pulls/comments/9370502","id":9370502,"diff_hunk":"@@ -0,0 +1,56 @@\n+/*\n+ *      Copyright (C) 2010-2013 Team XBMC\n+ *      http://xbmc.org\n+ *\n+ *  This Program is free software; you can redistribute it and/or modify\n+ *  it under the terms of the GNU General Public License as published by\n+ *  the Free Software Foundation; either version 2, or (at your option)\n+ *  any later version.\n+ *\n+ *  This Program is distributed in the hope that it will be useful,\n+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ *  GNU General Public License for more details.\n+ *\n+ *  You should have received a copy of the GNU General Public License\n+ *  along with XBMC; see the file COPYING.  If not, see\n+ *  <http://www.gnu.org/licenses/>.\n+ *\n+ */\n+\n+#include \"DVDVideoCodec.h\"\n+#include \"windowing/WindowingFactory.h\"\n+bool CDVDVideoCodec::IsSettingVisible(const std::string &condition, const std::string &value, const std::string &settingId)\n+{\n+  if (settingId.empty() || value.empty())\n+    return false;\n+\n+  // check if we are running on nvidia hardware\n+  std::string gpuvendor = g_Windowing.GetRenderVendor();\n+  std::transform(gpuvendor.begin(), gpuvendor.end(), gpuvendor.begin(), ::tolower);\n+  bool isNvidia = (gpuvendor.compare(0, 6, \"nvidia\") == 0);\n+  bool isIntel = (gpuvendor.compare(0, 5, \"intel\") == 0);\n+\n+  // nvidia does only need mpeg-4 setting\n+  if (isNvidia) \n+  {\n+    if (settingId == \"videoplayer.usevdpaumpeg4\")\n+      return true;\n+\n+    return false; //will also hide intel settings on nvidia hardware\n+  }\n+  else if (isIntel) // intel needs vc1, mpeg-2 and mpeg4 setting\n+  {\n+    if (settingId == \"videoplayer.usevaapimpeg4\")\n+      return true;\n+    if (settingId == \"videoplayer.usevaapivc1\")\n+      return true;\n+    if (settingId == \"videoplayer.usevaapimpeg2\")\n+      return true;\n+\n+    return false; //this will also hide nvidia settings on intel hardware\n+  }\n+  // if we don't know the hardware we are running on e.g. amd oss vdpau \n+  // or fglrx with xvba-driver we show everything\n+  return true;\n+}","path":"xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.cpp","position":56,"original_position":56,"commit_id":"1cac22bb3ab3cc08e8800e736a0830190c9e412d","original_commit_id":"1cac22bb3ab3cc08e8800e736a0830190c9e412d","user":{"login":"elupus","id":482976,"avatar_url":"https://gravatar.com/avatar/c62fc1def59c75d179d147c1b422185a?d=https%3A%2F%2Fidenticons.github.com%2Fa680a7b046fab0fea4c583cb5edb45a3.png&r=x","gravatar_id":"c62fc1def59c75d179d147c1b422185a","url":"https://api.github.com/users/elupus","html_url":"https://github.com/elupus","followers_url":"https://api.github.com/users/elupus/followers","following_url":"https://api.github.com/users/elupus/following{/other_user}","gists_url":"https://api.github.com/users/elupus/gists{/gist_id}","starred_url":"https://api.github.com/users/elupus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elupus/subscriptions","organizations_url":"https://api.github.com/users/elupus/orgs","repos_url":"https://api.github.com/users/elupus/repos","events_url":"https://api.github.com/users/elupus/events{/privacy}","received_events_url":"https://api.github.com/users/elupus/received_events","type":"User","site_admin":false},"body":"Why do they need to? I would assume it is specific driver revisions that are broken right? If we put this blacklist file in an addon in our addon repo, we could push out these blacklists/whitelists for all known hw combo's that f-up.","created_at":"2014-02-02T16:07:43Z","updated_at":"2014-02-02T16:07:43Z","html_url":"https://github.com/xbmc/xbmc/pull/4011#discussion_r9370502","pull_request_url":"https://api.github.com/repos/xbmc/xbmc/pulls/4011","_links":{"self":{"href":"https://api.github.com/repos/xbmc/xbmc/pulls/comments/9370502"},"html":{"href":"https://github.com/xbmc/xbmc/pull/4011#discussion_r9370502"},"pull_request":{"href":"https://api.github.com/repos/xbmc/xbmc/pulls/4011"}}}}