120111aa043c5f404472bc63b90bc5aad906b1101Andreas Huber/*
220111aa043c5f404472bc63b90bc5aad906b1101Andreas Huber * Copyright (C) 2009 The Android Open Source Project
320111aa043c5f404472bc63b90bc5aad906b1101Andreas Huber *
420111aa043c5f404472bc63b90bc5aad906b1101Andreas Huber * Licensed under the Apache License, Version 2.0 (the "License");
520111aa043c5f404472bc63b90bc5aad906b1101Andreas Huber * you may not use this file except in compliance with the License.
620111aa043c5f404472bc63b90bc5aad906b1101Andreas Huber * You may obtain a copy of the License at
720111aa043c5f404472bc63b90bc5aad906b1101Andreas Huber *
820111aa043c5f404472bc63b90bc5aad906b1101Andreas Huber *      http://www.apache.org/licenses/LICENSE-2.0
920111aa043c5f404472bc63b90bc5aad906b1101Andreas Huber *
1020111aa043c5f404472bc63b90bc5aad906b1101Andreas Huber * Unless required by applicable law or agreed to in writing, software
1120111aa043c5f404472bc63b90bc5aad906b1101Andreas Huber * distributed under the License is distributed on an "AS IS" BASIS,
1220111aa043c5f404472bc63b90bc5aad906b1101Andreas Huber * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1320111aa043c5f404472bc63b90bc5aad906b1101Andreas Huber * See the License for the specific language governing permissions and
1420111aa043c5f404472bc63b90bc5aad906b1101Andreas Huber * limitations under the License.
1520111aa043c5f404472bc63b90bc5aad906b1101Andreas Huber */
1620111aa043c5f404472bc63b90bc5aad906b1101Andreas Huber
174f82a25c07c3ffc8d44d61797043f9864058afdfMarco Nelissen//#define LOG_NDEBUG 0
184f82a25c07c3ffc8d44d61797043f9864058afdfMarco Nelissen#define LOG_TAG "FileSource"
194f82a25c07c3ffc8d44d61797043f9864058afdfMarco Nelissen#include <utils/Log.h>
204f82a25c07c3ffc8d44d61797043f9864058afdfMarco Nelissen
21f1d5aa162c02a16b7195a43a9bcea4d592600ac4James Dong#include <media/stagefright/foundation/ADebug.h>
2220111aa043c5f404472bc63b90bc5aad906b1101Andreas Huber#include <media/stagefright/FileSource.h>
2383b0fd9997b558f6c2ebf5e6e4db20570cb233b8Marco Nelissen#include <media/stagefright/Utils.h>
24d49dbd6b625cddb82f3f7bbeac62d48ef338ef0fAndy Hung#include <private/android_filesystem_config.h>
25c7fc37a3dab9bd1f96713649f351b5990e6316ffJames Dong#include <sys/types.h>
26c7fc37a3dab9bd1f96713649f351b5990e6316ffJames Dong#include <unistd.h>
27674ebd0b4e1143e38392a4e3bb38b4679a4577bcJames Dong#include <sys/types.h>
28674ebd0b4e1143e38392a4e3bb38b4679a4577bcJames Dong#include <sys/stat.h>
29674ebd0b4e1143e38392a4e3bb38b4679a4577bcJames Dong#include <fcntl.h>
30