1 /* 2 * Copyright (c) 2025 Huawei Device Co., Ltd. 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 */ 15 16 #ifndef SURFACE_BUFFER_INFO_H 17 #define SURFACE_BUFFER_INFO_H 18 19 #include <string> 20 21 #include "parcel.h" 22 #include "surface_buffer.h" 23 24 #include "vpe_sa_types.h" 25 26 namespace OHOS { 27 struct SurfaceBufferInfo : public Parcelable { 28 // Data 29 Media::VideoProcessingEngine::VideoInfo videoInfo; 30 sptr<SurfaceBuffer> surfacebuffer; 31 32 // Get rectangle string of the surface buffer 33 std::string rectStr() const; 34 // Get rectangle and id, index string of the surface buffer 35 std::string str() const; 36 // Copy all information except surface buffer 37 void CopyInfo(const SurfaceBufferInfo& input); 38 39 // For IPC transfer 40 bool ReadFromParcel(Parcel &parcel); 41 virtual bool Marshalling(Parcel &parcel) const override; 42 static SurfaceBufferInfo *Unmarshalling(Parcel &parcel); 43 }; 44 } // namespace OHOS 45 46 #endif // SURFACE_BUFFER_INFO_H 47