Andreas Huber | 20111aa | 2009-07-14 16:56:47 -0700 | [diff] [blame] | 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 "MediaExtractor" |
| 19 | #include <utils/Log.h> |
Marco Nelissen | b2487f0 | 2015-09-01 13:23:23 -0700 | [diff] [blame] | 20 | #include <pwd.h> |
Andreas Huber | 20111aa | 2009-07-14 16:56:47 -0700 | [diff] [blame] | 21 | |
Dongwon Kang | d91dc5a | 2017-10-10 00:07:09 -0700 | [diff] [blame] | 22 | #include <media/MediaExtractor.h> |
Marco Nelissen | b2487f0 | 2015-09-01 13:23:23 -0700 | [diff] [blame] | 23 | #include <media/stagefright/foundation/ADebug.h> |
Andreas Huber | fc9ba09 | 2010-01-11 15:35:19 -0800 | [diff] [blame] | 24 | #include <media/stagefright/MetaData.h> |
Andreas Huber | 20111aa | 2009-07-14 16:56:47 -0700 | [diff] [blame] | 25 | |
| 26 | namespace android { |
| 27 | |
Marco Nelissen | 4453f45 | 2017-01-13 12:51:08 -0800 | [diff] [blame] | 28 | MediaExtractor::MediaExtractor() { |
Marco Nelissen | b2487f0 | 2015-09-01 13:23:23 -0700 | [diff] [blame] | 29 | if (!LOG_NDEBUG) { |
| 30 | uid_t uid = getuid(); |
| 31 | struct passwd *pw = getpwuid(uid); |
Marco Nelissen | 7522617 | 2016-11-16 14:10:52 -0800 | [diff] [blame] | 32 | ALOGV("extractor created in uid: %d (%s)", getuid(), pw->pw_name); |
Marco Nelissen | b2487f0 | 2015-09-01 13:23:23 -0700 | [diff] [blame] | 33 | } |
Marco Nelissen | b2487f0 | 2015-09-01 13:23:23 -0700 | [diff] [blame] | 34 | } |
| 35 | |
Dongwon Kang | 661e699 | 2018-01-05 13:44:10 -0800 | [diff] [blame] | 36 | MediaExtractor::~MediaExtractor() {} |
Marco Nelissen | b2487f0 | 2015-09-01 13:23:23 -0700 | [diff] [blame] | 37 | |
Andreas Huber | acdd9d0 | 2010-05-06 10:18:05 -0700 | [diff] [blame] | 38 | uint32_t MediaExtractor::flags() const { |
Andreas Huber | 70f521d | 2010-10-08 10:16:24 -0700 | [diff] [blame] | 39 | return CAN_SEEK_BACKWARD | CAN_SEEK_FORWARD | CAN_PAUSE | CAN_SEEK; |
Andreas Huber | acdd9d0 | 2010-05-06 10:18:05 -0700 | [diff] [blame] | 40 | } |
| 41 | |
Andreas Huber | 20111aa | 2009-07-14 16:56:47 -0700 | [diff] [blame] | 42 | } // namespace android |