• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
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 
17 //#define LOG_NDEBUG 0
18 #define LOG_TAG "MetaData"
19 #include <inttypes.h>
20 #include <utils/KeyedVector.h>
21 #include <utils/Log.h>
22 
23 #include <stdlib.h>
24 #include <string.h>
25 
26 #include <media/stagefright/foundation/ADebug.h>
27 #include <media/stagefright/foundation/AString.h>
28 #include <media/stagefright/foundation/hexdump.h>
29 #include <media/stagefright/MetaData.h>
30 
31 #if defined(__ANDROID__) && !defined(__ANDROID_VNDK__) && !defined(__ANDROID_APEX__)
32 #include <binder/Parcel.h>
33 #endif
34 
35 namespace android {
36 
37 
MetaData()38 MetaData::MetaData() {
39 }
40 
MetaData(const MetaData & from)41 MetaData::MetaData(const MetaData &from)
42     : MetaDataBase(from) {
43 }
MetaData(const MetaDataBase & from)44 MetaData::MetaData(const MetaDataBase &from)
45     : MetaDataBase(from) {
46 }
47 
~MetaData()48 MetaData::~MetaData() {
49 }
50 
51 #if defined(__ANDROID__) && !defined(__ANDROID_VNDK__) && !defined(__ANDROID_APEX__)
52 /* static */
createFromParcel(const Parcel & parcel)53 sp<MetaData> MetaData::createFromParcel(const Parcel &parcel) {
54 
55     sp<MetaData> meta = new MetaData();
56     meta->updateFromParcel(parcel);
57     return meta;
58 }
59 #endif
60 
61 }  // namespace android
62 
63