1 /* 2 * Copyright (c) 2023 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 #ifndef OHOS_AVQUEUE_INFO_H 16 #define OHOS_AVQUEUE_INFO_H 17 18 #include <bitset> 19 #include <memory> 20 #include <string> 21 #include <map> 22 23 #include "parcel.h" 24 #include "avsession_pixel_map.h" 25 26 #ifndef WINDOWS_PLATFORM 27 #ifndef MAC_PLATFORM 28 #ifndef IOS_PLATFORM 29 #include <malloc.h> 30 #endif 31 #endif 32 #endif 33 34 namespace OHOS::AVSession { 35 class AVQueueInfo : public Parcelable { 36 public: 37 38 AVQueueInfo() = default; 39 ~AVQueueInfo() = default; 40 41 bool Unmarshalling(Parcel& data); 42 bool Marshalling(Parcel& parcel) const; 43 44 void SetBundleName(const std::string& bundleName); 45 std::string GetBundleName() const; 46 47 void SetAVQueueName(const std::string& avQueueName); 48 std::string GetAVQueueName() const; 49 50 void SetAVQueueId(const std::string& avQueueId); 51 std::string GetAVQueueId() const; 52 53 void SetAVQueueImage(const std::shared_ptr<AVSessionPixelMap>& avQueueImage); 54 std::shared_ptr<AVSessionPixelMap> GetAVQueueImage() const; 55 56 void SetAVQueueLength(const int32_t avQueueLength); 57 int32_t GetAVQueueLength() const; 58 59 void SetAVQueueImageUri(const std::string& avQueueImageUri); 60 std::string GetAVQueueImageUri() const; 61 62 private: 63 std::string bundleName_ = ""; 64 std::string avQueueName_ = ""; 65 std::string avQueueId_ = ""; 66 std::shared_ptr<AVSessionPixelMap> avQueueImage_ = nullptr; 67 int32_t avQueueLength_ = 0; 68 std::string avQueueImageUri_ = ""; 69 }; 70 } // namespace OHOS::AVSession 71 #endif // OHOS_AVQUEUE_INFO_H