1 // Copyright (C) 2020 The Android Open Source Project 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 #ifndef COMPUTEPIPE_RUNNER_GRAPH_INCLUDE_PREBUILTENGINEINTERFACE_H_ 15 #define COMPUTEPIPE_RUNNER_GRAPH_INCLUDE_PREBUILTENGINEINTERFACE_H_ 16 17 #include <functional> 18 19 #include "InputFrame.h" 20 #include "types/Status.h" 21 22 namespace android { 23 namespace automotive { 24 namespace computepipe { 25 namespace graph { 26 27 class PrebuiltEngineInterface { 28 public: 29 virtual ~PrebuiltEngineInterface() = default; 30 31 virtual void DispatchPixelData(int streamId, int64_t timestamp, 32 const runner::InputFrame& frame) = 0; 33 34 virtual void DispatchSerializedData(int streamId, int64_t timestamp, std::string&&) = 0; 35 36 virtual void DispatchGraphTerminationMessage(Status, std::string&&) = 0; 37 }; 38 39 } // namespace graph 40 } // namespace computepipe 41 } // namespace automotive 42 } // namespace android 43 44 #endif // COMPUTEPIPE_RUNNER_GRAPH_INCLUDE_PREBUILTENGINEINTERFACE_H_ 45