6 #include <dvr/performance_client_api.h>
7 #include <pdx/service_dispatcher.h>
9 #include "buffer_hub.h"
11 int main(int, char**) {
13 std::shared_ptr<android::pdx::Service> service;
14 std::unique_ptr<android::pdx::ServiceDispatcher> dispatcher;
16 // We need to be able to create endpoints with full perms.
19 dispatcher = android::pdx::ServiceDispatcher::Create();
20 CHECK_ERROR(!dispatcher, error, "Failed to create service dispatcher\n");
22 service = android::dvr::BufferHubService::Create();
23 CHECK_ERROR(!service, error, "Failed to create buffer hub service\n");
24 dispatcher->AddService(service);
26 ret = dvrSetSchedulerClass(0, "graphics");
27 CHECK_ERROR(ret < 0, error, "Failed to set thread priority");
29 ALOGI("Entering message loop.");
31 ret = dispatcher->EnterDispatchLoop();
32 CHECK_ERROR(ret < 0, error, "Dispatch loop exited because: %s\n",