Loading media/libmediaplayerservice/MediaPlayerFactory.cpp +19 −0 Original line number Original line Diff line number Diff line Loading @@ -182,6 +182,25 @@ class StagefrightPlayerFactory : int64_t offset, int64_t offset, int64_t /*length*/, int64_t /*length*/, float /*curScore*/) { float /*curScore*/) { // Flac playback forced to Awesomeplayer if (fd) { char symName[40] = {0}; char fileName[256] = {0}; snprintf(symName, sizeof(symName), "/proc/%d/fd/%d", getpid(), fd); if (readlink(symName, fileName, (sizeof(fileName) - 1)) != -1 ) { static const char* extn = ".flac"; uint32_t lenExtn = strlen(extn); uint32_t lenFileName = strlen(fileName); uint32_t start = lenFileName - lenExtn; if (start > 0) { if (!strncasecmp(fileName + start, extn, lenExtn)) { return 1.0; } } } } if (getDefaultPlayerType() if (getDefaultPlayerType() == STAGEFRIGHT_PLAYER) { == STAGEFRIGHT_PLAYER) { char buf[20]; char buf[20]; Loading Loading
media/libmediaplayerservice/MediaPlayerFactory.cpp +19 −0 Original line number Original line Diff line number Diff line Loading @@ -182,6 +182,25 @@ class StagefrightPlayerFactory : int64_t offset, int64_t offset, int64_t /*length*/, int64_t /*length*/, float /*curScore*/) { float /*curScore*/) { // Flac playback forced to Awesomeplayer if (fd) { char symName[40] = {0}; char fileName[256] = {0}; snprintf(symName, sizeof(symName), "/proc/%d/fd/%d", getpid(), fd); if (readlink(symName, fileName, (sizeof(fileName) - 1)) != -1 ) { static const char* extn = ".flac"; uint32_t lenExtn = strlen(extn); uint32_t lenFileName = strlen(fileName); uint32_t start = lenFileName - lenExtn; if (start > 0) { if (!strncasecmp(fileName + start, extn, lenExtn)) { return 1.0; } } } } if (getDefaultPlayerType() if (getDefaultPlayerType() == STAGEFRIGHT_PLAYER) { == STAGEFRIGHT_PLAYER) { char buf[20]; char buf[20]; Loading