blob: 77913d5cbf1aadf8243d925586d89d854f34e8ec [file] [log] [blame]
Andreas Huber20111aa2009-07-14 16:56:47 -07001/*
2 * Copyright (C) 2009 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Marco Nelissenfeba11f2012-03-21 12:27:00 -070017//#define LOG_NDEBUG 0
18#define LOG_TAG "MetaData"
Kévin PETIT377b2ec2014-02-03 12:35:36 +000019#include <inttypes.h>
Marco Nelissen389f0fe2018-01-23 11:22:14 -080020#include <utils/KeyedVector.h>
Marco Nelissenfeba11f2012-03-21 12:27:00 -070021#include <utils/Log.h>
22
Andreas Huber20111aa2009-07-14 16:56:47 -070023#include <stdlib.h>
24#include <string.h>
25
James Dongf1d5aa12012-02-06 23:46:37 -080026#include <media/stagefright/foundation/ADebug.h>
Marco Nelissen56997122012-08-28 15:09:49 -070027#include <media/stagefright/foundation/AString.h>
28#include <media/stagefright/foundation/hexdump.h>
Andreas Huber20111aa2009-07-14 16:56:47 -070029#include <media/stagefright/MetaData.h>
30
Colin Crossf8b5fe22021-12-15 14:59:00 -080031#if defined(__ANDROID__) && !defined(__ANDROID_VNDK__) && !defined(__ANDROID_APEX__)
Dongwon Kang97a21552019-08-28 11:22:33 -070032#include <binder/Parcel.h>
33#endif
34
Andreas Huber20111aa2009-07-14 16:56:47 -070035namespace android {
36
Marco Nelissen389f0fe2018-01-23 11:22:14 -080037
Marco Nelissen3d21ae32018-02-16 08:24:08 -080038MetaData::MetaData() {
Andreas Huber20111aa2009-07-14 16:56:47 -070039}
40
41MetaData::MetaData(const MetaData &from)
Marco Nelissen3d21ae32018-02-16 08:24:08 -080042 : MetaDataBase(from) {
43}
44MetaData::MetaData(const MetaDataBase &from)
45 : MetaDataBase(from) {
Andreas Huber20111aa2009-07-14 16:56:47 -070046}
47
48MetaData::~MetaData() {
Andreas Huber20111aa2009-07-14 16:56:47 -070049}
50
Colin Crossf8b5fe22021-12-15 14:59:00 -080051#if defined(__ANDROID__) && !defined(__ANDROID_VNDK__) && !defined(__ANDROID_APEX__)
Marco Nelissenb2487f02015-09-01 13:23:23 -070052/* static */
53sp<MetaData> MetaData::createFromParcel(const Parcel &parcel) {
54
55 sp<MetaData> meta = new MetaData();
56 meta->updateFromParcel(parcel);
57 return meta;
58}
Dongwon Kang97a21552019-08-28 11:22:33 -070059#endif
Marco Nelissenb2487f02015-09-01 13:23:23 -070060
Andreas Huber20111aa2009-07-14 16:56:47 -070061} // namespace android
62