IMediaMetadataRetriever.h revision af8791e112c8072452bd14ef3c43a47511d19542
189fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project/*
289fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project**
389fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project** Copyright (C) 2008 The Android Open Source Project
489fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project**
589fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project** Licensed under the Apache License, Version 2.0 (the "License");
689fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project** you may not use this file except in compliance with the License.
789fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project** You may obtain a copy of the License at
889fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project**
989fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project**     http://www.apache.org/licenses/LICENSE-2.0
1089fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project**
1189fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project** Unless required by applicable law or agreed to in writing, software
1289fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project** distributed under the License is distributed on an "AS IS" BASIS,
1389fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1489fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project** See the License for the specific language governing permissions and
1589fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project** limitations under the License.
1689fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project*/
1789fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project
1889fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project#ifndef ANDROID_IMEDIAMETADATARETRIEVER_H
1989fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project#define ANDROID_IMEDIAMETADATARETRIEVER_H
2089fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project
217562408b2261d38415453378b6188f74fda99d88Mathias Agopian#include <binder/IInterface.h>
227562408b2261d38415453378b6188f74fda99d88Mathias Agopian#include <binder/Parcel.h>
237562408b2261d38415453378b6188f74fda99d88Mathias Agopian#include <binder/IMemory.h>
24af8791e112c8072452bd14ef3c43a47511d19542Andreas Huber#include <utils/KeyedVector.h>
25af8791e112c8072452bd14ef3c43a47511d19542Andreas Huber#include <utils/RefBase.h>
2689fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project
2789fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Projectnamespace android {
2889fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project
2989fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Projectclass IMediaMetadataRetriever: public IInterface
3089fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project{
3189fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Projectpublic:
3289fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project    DECLARE_META_INTERFACE(MediaMetadataRetriever);
3389fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project    virtual void            disconnect() = 0;
34af8791e112c8072452bd14ef3c43a47511d19542Andreas Huber
35af8791e112c8072452bd14ef3c43a47511d19542Andreas Huber    virtual status_t        setDataSource(
36af8791e112c8072452bd14ef3c43a47511d19542Andreas Huber            const char *srcUrl,
37af8791e112c8072452bd14ef3c43a47511d19542Andreas Huber            const KeyedVector<String8, String8> *headers = NULL) = 0;
38af8791e112c8072452bd14ef3c43a47511d19542Andreas Huber
3989fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project    virtual status_t        setDataSource(int fd, int64_t offset, int64_t length) = 0;
4016afe2fb439cab6125bb46a07a8078d4ce1c1ea5James Dong    virtual sp<IMemory>     getFrameAtTime(int64_t timeUs, int option) = 0;
4189fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project    virtual sp<IMemory>     extractAlbumArt() = 0;
4289fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project    virtual const char*     extractMetadata(int keyCode) = 0;
4389fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project};
4489fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project
4589fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project// ----------------------------------------------------------------------------
4689fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project
4789fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Projectclass BnMediaMetadataRetriever: public BnInterface<IMediaMetadataRetriever>
4889fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project{
4989fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Projectpublic:
5089fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project    virtual status_t    onTransact(uint32_t code,
5189fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project                                   const Parcel& data,
5289fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project                                   Parcel* reply,
5389fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project                                   uint32_t flags = 0);
5489fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project};
5589fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project
5689fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project}; // namespace android
5789fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project
5889fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project#endif // ANDROID_IMEDIAMETADATARETRIEVER_H
5989fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5The Android Open Source Project
60