Loading media/libstagefright/VideoFrameScheduler.cpp +9 −8 Original line number Diff line number Diff line Loading @@ -22,8 +22,8 @@ #include <utils/String16.h> #include <binder/IServiceManager.h> #include <gui/ISurfaceComposer.h> #include <ui/DisplayStatInfo.h> #include <android/gui/ISurfaceComposer.h> #include <android/gui/DisplayStatInfo.h> #include <media/stagefright/foundation/ADebug.h> #include <media/stagefright/foundation/AUtils.h> Loading @@ -39,21 +39,22 @@ void VideoFrameScheduler::updateVsync() { mVsyncTime = 0; mVsyncPeriod = 0; // TODO(b/220021255): wrap this into SurfaceComposerClient if (mComposer == NULL) { String16 name("SurfaceFlinger"); String16 name("SurfaceFlingerAIDL"); sp<IServiceManager> sm = defaultServiceManager(); mComposer = interface_cast<ISurfaceComposer>(sm->checkService(name)); mComposer = interface_cast<gui::ISurfaceComposer>(sm->checkService(name)); } if (mComposer != NULL) { DisplayStatInfo stats; status_t res = mComposer->getDisplayStats(NULL /* display */, &stats); if (res == OK) { gui::DisplayStatInfo stats; binder::Status status = mComposer->getDisplayStats(nullptr/* display */, &stats); if (status.isOk()) { ALOGV("vsync time:%lld period:%lld", (long long)stats.vsyncTime, (long long)stats.vsyncPeriod); mVsyncTime = stats.vsyncTime; mVsyncPeriod = stats.vsyncPeriod; } else { ALOGW("getDisplayStats returned %d", res); ALOGW("getDisplayStats returned %d", status.transactionError()); } } else { ALOGW("could not get surface mComposer service"); Loading media/libstagefright/include/media/stagefright/VideoFrameScheduler.h +4 −2 Original line number Diff line number Diff line Loading @@ -21,7 +21,9 @@ namespace android { namespace gui { class ISurfaceComposer; } struct VideoFrameScheduler : public VideoFrameSchedulerBase { VideoFrameScheduler(); Loading @@ -32,7 +34,7 @@ protected: private: void updateVsync() override; sp<ISurfaceComposer> mComposer; sp<gui::ISurfaceComposer> mComposer; }; } // namespace android Loading Loading
media/libstagefright/VideoFrameScheduler.cpp +9 −8 Original line number Diff line number Diff line Loading @@ -22,8 +22,8 @@ #include <utils/String16.h> #include <binder/IServiceManager.h> #include <gui/ISurfaceComposer.h> #include <ui/DisplayStatInfo.h> #include <android/gui/ISurfaceComposer.h> #include <android/gui/DisplayStatInfo.h> #include <media/stagefright/foundation/ADebug.h> #include <media/stagefright/foundation/AUtils.h> Loading @@ -39,21 +39,22 @@ void VideoFrameScheduler::updateVsync() { mVsyncTime = 0; mVsyncPeriod = 0; // TODO(b/220021255): wrap this into SurfaceComposerClient if (mComposer == NULL) { String16 name("SurfaceFlinger"); String16 name("SurfaceFlingerAIDL"); sp<IServiceManager> sm = defaultServiceManager(); mComposer = interface_cast<ISurfaceComposer>(sm->checkService(name)); mComposer = interface_cast<gui::ISurfaceComposer>(sm->checkService(name)); } if (mComposer != NULL) { DisplayStatInfo stats; status_t res = mComposer->getDisplayStats(NULL /* display */, &stats); if (res == OK) { gui::DisplayStatInfo stats; binder::Status status = mComposer->getDisplayStats(nullptr/* display */, &stats); if (status.isOk()) { ALOGV("vsync time:%lld period:%lld", (long long)stats.vsyncTime, (long long)stats.vsyncPeriod); mVsyncTime = stats.vsyncTime; mVsyncPeriod = stats.vsyncPeriod; } else { ALOGW("getDisplayStats returned %d", res); ALOGW("getDisplayStats returned %d", status.transactionError()); } } else { ALOGW("could not get surface mComposer service"); Loading
media/libstagefright/include/media/stagefright/VideoFrameScheduler.h +4 −2 Original line number Diff line number Diff line Loading @@ -21,7 +21,9 @@ namespace android { namespace gui { class ISurfaceComposer; } struct VideoFrameScheduler : public VideoFrameSchedulerBase { VideoFrameScheduler(); Loading @@ -32,7 +34,7 @@ protected: private: void updateVsync() override; sp<ISurfaceComposer> mComposer; sp<gui::ISurfaceComposer> mComposer; }; } // namespace android Loading