blob: a6b3dc96d53b014365ccddf1dfa93dea71025edf [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
17//#define LOG_NDEBUG 0
18#define LOG_TAG "MediaExtractor"
19#include <utils/Log.h>
Marco Nelissenb2487f02015-09-01 13:23:23 -070020#include <pwd.h>
Andreas Huber20111aa2009-07-14 16:56:47 -070021
Dongwon Kangd91dc5a2017-10-10 00:07:09 -070022#include <media/MediaExtractor.h>
Marco Nelissenb2487f02015-09-01 13:23:23 -070023#include <media/stagefright/foundation/ADebug.h>
Andreas Huberfc9ba092010-01-11 15:35:19 -080024#include <media/stagefright/MetaData.h>
Andreas Huber20111aa2009-07-14 16:56:47 -070025
26namespace android {
27
Marco Nelissen4453f452017-01-13 12:51:08 -080028MediaExtractor::MediaExtractor() {
Marco Nelissenb2487f02015-09-01 13:23:23 -070029 if (!LOG_NDEBUG) {
30 uid_t uid = getuid();
31 struct passwd *pw = getpwuid(uid);
Marco Nelissen75226172016-11-16 14:10:52 -080032 ALOGV("extractor created in uid: %d (%s)", getuid(), pw->pw_name);
Marco Nelissenb2487f02015-09-01 13:23:23 -070033 }
Marco Nelissenb2487f02015-09-01 13:23:23 -070034}
35
Dongwon Kang661e6992018-01-05 13:44:10 -080036MediaExtractor::~MediaExtractor() {}
Marco Nelissenb2487f02015-09-01 13:23:23 -070037
Andreas Huberacdd9d02010-05-06 10:18:05 -070038uint32_t MediaExtractor::flags() const {
Andreas Huber70f521d2010-10-08 10:16:24 -070039 return CAN_SEEK_BACKWARD | CAN_SEEK_FORWARD | CAN_PAUSE | CAN_SEEK;
Andreas Huberacdd9d02010-05-06 10:18:05 -070040}
41
Andreas Huber20111aa2009-07-14 16:56:47 -070042} // namespace android