16177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi/* 26177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi * Copyright (C) 2010 The Android Open Source Project 36177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi * 46177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi * Licensed under the Apache License, Version 2.0 (the "License"); 56177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi * you may not use this file except in compliance with the License. 66177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi * You may obtain a copy of the License at 76177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi * 86177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi * http://www.apache.org/licenses/LICENSE-2.0 96177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi * 106177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi * Unless required by applicable law or agreed to in writing, software 116177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi * distributed under the License is distributed on an "AS IS" BASIS, 126177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 136177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi * See the License for the specific language governing permissions and 146177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi * limitations under the License. 156177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi */ 166177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi 176177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi 186177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi/** 198ad101d5bcaca289da3d820e2b87b5da55e560f9Jean-Michel Trivi * Used to define the mapping from an OpenSL ES or OpenMAX AL object to an Android 206177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi * media framework object 216177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi */ 226521243b609e9a57e109f5715128d8a1cf0657b0Jean-Michel Trivienum AndroidObjectType { 236521243b609e9a57e109f5715128d8a1cf0657b0Jean-Michel Trivi INVALID_TYPE =-1, 248ad101d5bcaca289da3d820e2b87b5da55e560f9Jean-Michel Trivi // audio player, playing from a URI or FD data source 256521243b609e9a57e109f5715128d8a1cf0657b0Jean-Michel Trivi AUDIOPLAYER_FROM_URIFD = 0, 268ad101d5bcaca289da3d820e2b87b5da55e560f9Jean-Michel Trivi // audio player, playing PCM buffers in a buffer queue data source 276521243b609e9a57e109f5715128d8a1cf0657b0Jean-Michel Trivi AUDIOPLAYER_FROM_PCM_BUFFERQUEUE = 1, 288ad101d5bcaca289da3d820e2b87b5da55e560f9Jean-Michel Trivi // audio player, playing transport stream packets in an Android buffer queue data source 296521243b609e9a57e109f5715128d8a1cf0657b0Jean-Michel Trivi AUDIOPLAYER_FROM_TS_ANDROIDBUFFERQUEUE = 2, 308ad101d5bcaca289da3d820e2b87b5da55e560f9Jean-Michel Trivi // audio player, decoding from a URI or FD data source to a buffer queue data sink in PCM format 316521243b609e9a57e109f5715128d8a1cf0657b0Jean-Michel Trivi AUDIOPLAYER_FROM_URIFD_TO_PCM_BUFFERQUEUE = 3, 326521243b609e9a57e109f5715128d8a1cf0657b0Jean-Michel Trivi // audio video player, playing transport stream packets in an Android buffer queue data source 336521243b609e9a57e109f5715128d8a1cf0657b0Jean-Michel Trivi AUDIOVIDEOPLAYER_FROM_TS_ANDROIDBUFFERQUEUE = 4, 346521243b609e9a57e109f5715128d8a1cf0657b0Jean-Michel Trivi // audio video player, playing from a URI or FD data source 356521243b609e9a57e109f5715128d8a1cf0657b0Jean-Michel Trivi AUDIOVIDEOPLAYER_FROM_URIFD = 5, 366521243b609e9a57e109f5715128d8a1cf0657b0Jean-Michel Trivi // audio recorder, recording from an input device data source, streamed into a 376521243b609e9a57e109f5715128d8a1cf0657b0Jean-Michel Trivi // PCM buffer queue data sink 386521243b609e9a57e109f5715128d8a1cf0657b0Jean-Michel Trivi AUDIORECORDER_FROM_MIC_TO_PCM_BUFFERQUEUE = 6, 39333c2341445e9f161ff022a4b7d5f69e9e149b60Jean-Michel Trivi // audio player, decoding from an Android buffer queue with ADTS data, 40333c2341445e9f161ff022a4b7d5f69e9e149b60Jean-Michel Trivi // to a buffer queue data sink in PCM format 41333c2341445e9f161ff022a4b7d5f69e9e149b60Jean-Michel Trivi AUDIOPLAYER_FROM_ADTS_ABQ_TO_PCM_BUFFERQUEUE = 7, 426177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi NUM_AUDIOPLAYER_MAP_TYPES 436177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi}; 446177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi 456177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi 466177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi/** 476177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi * Used to define the states of the OpenSL ES / OpenMAX AL object initialization and preparation 48f775524bc529add4ba9509d1a392c9a7dcea8e4eGlenn Kasten * with regards to the Android-side of the data, in particular as affected by the play state. 496177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi */ 506521243b609e9a57e109f5715128d8a1cf0657b0Jean-Michel Trivienum AndroidObjectState { 51f775524bc529add4ba9509d1a392c9a7dcea8e4eGlenn Kasten ANDROID_UNINITIALIZED = -1, // never called SetPlayState(PAUSED or PLAYING) 52f775524bc529add4ba9509d1a392c9a7dcea8e4eGlenn Kasten ANDROID_PREPARING, // currently preparing due to first SetPlayState(PAUSED or PLAYING) 53f775524bc529add4ba9509d1a392c9a7dcea8e4eGlenn Kasten ANDROID_READY, // preparation has completed, and will not be attempted again 54f775524bc529add4ba9509d1a392c9a7dcea8e4eGlenn Kasten // NUM_ANDROID_STATES // unused 556177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi}; 566177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi 576177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi 5890e90c753de8c410ea7ccaf36510a612b4235713Dima Zavin#define ANDROID_DEFAULT_OUTPUT_STREAM_TYPE AUDIO_STREAM_MUSIC 596177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi 6049cfc9858d3a610b52e3e6b2fc1733888f7743f5Glenn Kasten#define PLAYER_FAILURE ((int32_t) android::UNKNOWN_ERROR) 6149cfc9858d3a610b52e3e6b2fc1733888f7743f5Glenn Kasten#define PLAYER_SUCCESS ((int32_t) android::NO_ERROR) 6227a8821eb36f002b81f368a0049f511cfa465d16Jean-Michel Trivi 63331e70b5c675222bbd122f7ae515dbda631040feJean-Michel Trivi#define PLAYER_FD_FIND_FILE_SIZE ((int64_t)0xFFFFFFFFFFFFFFFFll) 64331e70b5c675222bbd122f7ae515dbda631040feJean-Michel Trivi 655b21a0626e173d407aa3835e5cffcaa9b582016dJean-Michel Trivi#define MPEG2_TS_BLOCK_SIZE 188 665b21a0626e173d407aa3835e5cffcaa9b582016dJean-Michel Trivi 678ad101d5bcaca289da3d820e2b87b5da55e560f9Jean-Michel Trivitypedef struct AudioPlayback_Parameters_struct { 688ad101d5bcaca289da3d820e2b87b5da55e560f9Jean-Michel Trivi int streamType; 698ad101d5bcaca289da3d820e2b87b5da55e560f9Jean-Michel Trivi int sessionId; 708ad101d5bcaca289da3d820e2b87b5da55e560f9Jean-Michel Trivi} AudioPlayback_Parameters; 716177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi 72dff1b1fc1f687c544e19df56bef225c45f7256a9Jean-Michel Trivi/** 736177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi * Structure to maintain the set of audio levels about a player 746177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi */ 756521243b609e9a57e109f5715128d8a1cf0657b0Jean-Michel Trivitypedef struct AndroidAudioLevels_t { 766177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi /** 77fcc996296bdbf6c3949ad4312991fdde4ae2e157Jean-Michel Trivi * Send level to aux effect, there's a single aux bus, so there's a single level 786177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi */ 79fcc996296bdbf6c3949ad4312991fdde4ae2e157Jean-Michel Trivi // FIXME not used yet, will be used when supporting effects in OpenMAX AL 80fcc996296bdbf6c3949ad4312991fdde4ae2e157Jean-Michel Trivi //SLmillibel mAuxSendLevel; 816177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi /** 826177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi * Attenuation factor derived from direct level 836177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi */ 84fcc996296bdbf6c3949ad4312991fdde4ae2e157Jean-Michel Trivi // FIXME not used yet, will be used when supporting effects in OpenMAX AL 85fcc996296bdbf6c3949ad4312991fdde4ae2e157Jean-Michel Trivi //float mAmplFromDirectLevel; 86fcc996296bdbf6c3949ad4312991fdde4ae2e157Jean-Michel Trivi /** 87fcc996296bdbf6c3949ad4312991fdde4ae2e157Jean-Michel Trivi * Android Left/Right volume 88fcc996296bdbf6c3949ad4312991fdde4ae2e157Jean-Michel Trivi * The final volume of an Android AudioTrack or MediaPlayer is a stereo amplification 89fcc996296bdbf6c3949ad4312991fdde4ae2e157Jean-Michel Trivi * (or attenuation) represented as a float from 0.0f to 1.0f 90fcc996296bdbf6c3949ad4312991fdde4ae2e157Jean-Michel Trivi */ 91fcc996296bdbf6c3949ad4312991fdde4ae2e157Jean-Michel Trivi float mFinalVolume[STEREO_CHANNELS]; 926177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi} AndroidAudioLevels; 936177be78352ea4cb8a5ea676304750b56ee2ddfcJean-Michel Trivi 9427a8821eb36f002b81f368a0049f511cfa465d16Jean-Michel Trivi 95dff1b1fc1f687c544e19df56bef225c45f7256a9Jean-Michel Trivi/** 96dff1b1fc1f687c544e19df56bef225c45f7256a9Jean-Michel Trivi * Event notification callback from Android to SL ES framework 97dff1b1fc1f687c544e19df56bef225c45f7256a9Jean-Michel Trivi */ 98fcc996296bdbf6c3949ad4312991fdde4ae2e157Jean-Michel Trivitypedef void (*notif_cbf_t)(int event, int data1, int data2, void* notifUser); 99dff1b1fc1f687c544e19df56bef225c45f7256a9Jean-Michel Trivi 100dff1b1fc1f687c544e19df56bef225c45f7256a9Jean-Michel Trivi/** 101dff1b1fc1f687c544e19df56bef225c45f7256a9Jean-Michel Trivi * Audio data push callback from Android objects to SL ES framework 102dff1b1fc1f687c544e19df56bef225c45f7256a9Jean-Michel Trivi */ 103819ab3a683b0a94471fcb32b4cf9977d8a5086e8Glenn Kastentypedef size_t (*data_push_cbf_t)(const uint8_t *data, size_t size, CAudioPlayer* ap); 10427a8821eb36f002b81f368a0049f511cfa465d16Jean-Michel Trivi 10527a8821eb36f002b81f368a0049f511cfa465d16Jean-Michel Trivi 10627a8821eb36f002b81f368a0049f511cfa465d16Jean-Michel Trivi/** 107dff1b1fc1f687c544e19df56bef225c45f7256a9Jean-Michel Trivi * Events sent to mNotifyClient during prepare, prefetch, and playback 108dff1b1fc1f687c544e19df56bef225c45f7256a9Jean-Michel Trivi * used in APlayer::notify() and AMessage::findxxx() 10927a8821eb36f002b81f368a0049f511cfa465d16Jean-Michel Trivi */ 11027a8821eb36f002b81f368a0049f511cfa465d16Jean-Michel Trivi#define PLAYEREVENT_PREPARED "prep" 11127a8821eb36f002b81f368a0049f511cfa465d16Jean-Michel Trivi#define PLAYEREVENT_PREFETCHSTATUSCHANGE "prsc" 11227a8821eb36f002b81f368a0049f511cfa465d16Jean-Michel Trivi#define PLAYEREVENT_PREFETCHFILLLEVELUPDATE "pflu" 11327a8821eb36f002b81f368a0049f511cfa465d16Jean-Michel Trivi#define PLAYEREVENT_ENDOFSTREAM "eos" 114fcc996296bdbf6c3949ad4312991fdde4ae2e157Jean-Michel Trivi#define PLAYEREVENT_VIDEO_SIZE_UPDATE "vsiz" 1157e4729ac84d876de3ae439ae9cfef41701d6a2a2Glenn Kasten#define PLAYEREVENT_CHANNEL_COUNT "ccnt" // channel count is now known 116a81ac67d31590942f5a3a8233cf9759c20a494dcGlenn Kasten#define PLAYEREVENT_PLAY "play" // SL_PLAYEVENT_* 11731cc0d9597a502a2c81ff318556adde92d50590aGlenn Kasten#define PLAYEREVENT_ERRORAFTERPREPARE "easp" // error after successful prepare 118331e70b5c675222bbd122f7ae515dbda631040feJean-Michel Trivi 119331e70b5c675222bbd122f7ae515dbda631040feJean-Michel Trivi 120dff1b1fc1f687c544e19df56bef225c45f7256a9Jean-Michel Trivi/** 1218ad101d5bcaca289da3d820e2b87b5da55e560f9Jean-Michel Trivi * Time value when time is unknown. Used for instance for duration or playback position 122dff1b1fc1f687c544e19df56bef225c45f7256a9Jean-Michel Trivi */ 1238ad101d5bcaca289da3d820e2b87b5da55e560f9Jean-Michel Trivi#define ANDROID_UNKNOWN_TIME -1 124dff1b1fc1f687c544e19df56bef225c45f7256a9Jean-Michel Trivi 1255b21a0626e173d407aa3835e5cffcaa9b582016dJean-Michel Trivi/** 1265b21a0626e173d407aa3835e5cffcaa9b582016dJean-Michel Trivi * Event mask for MPEG-2 TS events associated with TS data 1275b21a0626e173d407aa3835e5cffcaa9b582016dJean-Michel Trivi */ 1285b21a0626e173d407aa3835e5cffcaa9b582016dJean-Michel Trivi#define ANDROID_MP2TSEVENT_NONE ((SLuint32) 0x0) 1295b21a0626e173d407aa3835e5cffcaa9b582016dJean-Michel Trivi// buffer is at End Of Stream 1305b21a0626e173d407aa3835e5cffcaa9b582016dJean-Michel Trivi#define ANDROID_MP2TSEVENT_EOS ((SLuint32) 0x1) 1315b21a0626e173d407aa3835e5cffcaa9b582016dJean-Michel Trivi// buffer marks a discontinuity with previous TS data, resume display as soon as possible 1325b21a0626e173d407aa3835e5cffcaa9b582016dJean-Michel Trivi#define ANDROID_MP2TSEVENT_DISCONTINUITY ((SLuint32) 0x1 << 1) 1335b21a0626e173d407aa3835e5cffcaa9b582016dJean-Michel Trivi// buffer marks a discontinuity with previous TS data, resume display upon reaching the 1345b21a0626e173d407aa3835e5cffcaa9b582016dJean-Michel Trivi// associated presentation time stamp 1355b21a0626e173d407aa3835e5cffcaa9b582016dJean-Michel Trivi#define ANDROID_MP2TSEVENT_DISCON_NEWPTS ((SLuint32) 0x1 << 2) 136bce61624a80db2cef964fc512cfd3bac034afefeJean-Michel Trivi// buffer marks a format change with previous TS data, resume display as soon as possible 1372917f475d6f2058ed177ee2a51fdf7069645ba3eJean-Michel Trivi#define ANDROID_MP2TSEVENT_FORMAT_CHANGE_FULL ((SLuint32) 0x1 << 3) 1382917f475d6f2058ed177ee2a51fdf7069645ba3eJean-Michel Trivi#define ANDROID_MP2TSEVENT_FORMAT_CHANGE_VIDEO ((SLuint32) 0x1 << 4) 1395b21a0626e173d407aa3835e5cffcaa9b582016dJean-Michel Trivi 140333c2341445e9f161ff022a4b7d5f69e9e149b60Jean-Michel Trivi/** 141333c2341445e9f161ff022a4b7d5f69e9e149b60Jean-Michel Trivi * Event mask for AAC ADTS events associated with ADTS data 142333c2341445e9f161ff022a4b7d5f69e9e149b60Jean-Michel Trivi */ 143333c2341445e9f161ff022a4b7d5f69e9e149b60Jean-Michel Trivi#define ANDROID_ADTSEVENT_NONE ANDROID_MP2TSEVENT_NONE 144333c2341445e9f161ff022a4b7d5f69e9e149b60Jean-Michel Trivi// buffer is at End Of Stream 145333c2341445e9f161ff022a4b7d5f69e9e149b60Jean-Michel Trivi#define ANDROID_ADTSEVENT_EOS ANDROID_MP2TSEVENT_EOS 146be91f6328a084475e1cf58b54b8b732e088940b5Jean-Michel Trivi 147be91f6328a084475e1cf58b54b8b732e088940b5Jean-Michel Trivi/** 1485b21a0626e173d407aa3835e5cffcaa9b582016dJean-Michel Trivi * Types of buffers stored in Android Buffer Queues, see IAndroidBufferQueue.mBufferType 1495b21a0626e173d407aa3835e5cffcaa9b582016dJean-Michel Trivi */ 1505b21a0626e173d407aa3835e5cffcaa9b582016dJean-Michel Trivienum AndroidBufferType_type { 1515b21a0626e173d407aa3835e5cffcaa9b582016dJean-Michel Trivi kAndroidBufferTypeInvalid = ((SLuint16) 0x0), 1525b21a0626e173d407aa3835e5cffcaa9b582016dJean-Michel Trivi kAndroidBufferTypeMpeg2Ts = ((SLuint16) 0x1), 153333c2341445e9f161ff022a4b7d5f69e9e149b60Jean-Michel Trivi kAndroidBufferTypeAacadts = ((SLuint16) 0x2), 1545b21a0626e173d407aa3835e5cffcaa9b582016dJean-Michel Trivi}; 1555b21a0626e173d407aa3835e5cffcaa9b582016dJean-Michel Trivi 1568ad101d5bcaca289da3d820e2b87b5da55e560f9Jean-Michel Trivi/** 157333c2341445e9f161ff022a4b7d5f69e9e149b60Jean-Michel Trivi * MIME types required for data in Android Buffer Queues 158333c2341445e9f161ff022a4b7d5f69e9e149b60Jean-Michel Trivi */ 159adf3525f038c77f6a122b4e88762bde9cc0a48bbGlenn Kasten// The preferred MIME types for new applications are in ../../include/*/OpenMAXAL_Android.h 160adf3525f038c77f6a122b4e88762bde9cc0a48bbGlenn Kasten// The legacy MIME type used elsewhere in the Android framework for AAC ADTS is below: 161333c2341445e9f161ff022a4b7d5f69e9e149b60Jean-Michel Trivi#define ANDROID_MIME_AACADTS_ANDROID_FRAMEWORK "audio/aac-adts" 162333c2341445e9f161ff022a4b7d5f69e9e149b60Jean-Michel Trivi 163333c2341445e9f161ff022a4b7d5f69e9e149b60Jean-Michel Trivi/** 1648ad101d5bcaca289da3d820e2b87b5da55e560f9Jean-Michel Trivi * Notification thresholds relative to content duration in the cache 1658ad101d5bcaca289da3d820e2b87b5da55e560f9Jean-Michel Trivi */ 1668ad101d5bcaca289da3d820e2b87b5da55e560f9Jean-Michel Trivi#define DURATION_CACHED_HIGH_MS 30000 // 30s 1678ad101d5bcaca289da3d820e2b87b5da55e560f9Jean-Michel Trivi#define DURATION_CACHED_MED_MS 10000 // 10s 1688ad101d5bcaca289da3d820e2b87b5da55e560f9Jean-Michel Trivi#define DURATION_CACHED_LOW_MS 2000 // 2s 1698ad101d5bcaca289da3d820e2b87b5da55e560f9Jean-Michel Trivi 1708ad101d5bcaca289da3d820e2b87b5da55e560f9Jean-Michel Trivi 171331e70b5c675222bbd122f7ae515dbda631040feJean-Michel Trivinamespace android { 172331e70b5c675222bbd122f7ae515dbda631040feJean-Michel Trivi 1738ad101d5bcaca289da3d820e2b87b5da55e560f9Jean-Michel Trivi/** 1748ad101d5bcaca289da3d820e2b87b5da55e560f9Jean-Michel Trivi * Prefetch cache status 1758ad101d5bcaca289da3d820e2b87b5da55e560f9Jean-Michel Trivi */ 1768ad101d5bcaca289da3d820e2b87b5da55e560f9Jean-Michel Trivienum CacheStatus_t { 1778ad101d5bcaca289da3d820e2b87b5da55e560f9Jean-Michel Trivi kStatusUnknown = -1, 1788ad101d5bcaca289da3d820e2b87b5da55e560f9Jean-Michel Trivi kStatusEmpty = 0, 1798ad101d5bcaca289da3d820e2b87b5da55e560f9Jean-Michel Trivi kStatusLow, 1808ad101d5bcaca289da3d820e2b87b5da55e560f9Jean-Michel Trivi kStatusIntermediate, 1818ad101d5bcaca289da3d820e2b87b5da55e560f9Jean-Michel Trivi kStatusEnough, 1828ad101d5bcaca289da3d820e2b87b5da55e560f9Jean-Michel Trivi kStatusHigh 1838ad101d5bcaca289da3d820e2b87b5da55e560f9Jean-Michel Trivi}; 1848ad101d5bcaca289da3d820e2b87b5da55e560f9Jean-Michel Trivi 185331e70b5c675222bbd122f7ae515dbda631040feJean-Michel Trivienum { 186331e70b5c675222bbd122f7ae515dbda631040feJean-Michel Trivi kDataLocatorNone = 'none', 187331e70b5c675222bbd122f7ae515dbda631040feJean-Michel Trivi kDataLocatorUri = 'uri', 188331e70b5c675222bbd122f7ae515dbda631040feJean-Michel Trivi kDataLocatorFd = 'fd', 1895b21a0626e173d407aa3835e5cffcaa9b582016dJean-Michel Trivi}; 190331e70b5c675222bbd122f7ae515dbda631040feJean-Michel Trivi 191331e70b5c675222bbd122f7ae515dbda631040feJean-Michel Trivistruct FdInfo { 192331e70b5c675222bbd122f7ae515dbda631040feJean-Michel Trivi int fd; 193331e70b5c675222bbd122f7ae515dbda631040feJean-Michel Trivi int64_t offset; 194331e70b5c675222bbd122f7ae515dbda631040feJean-Michel Trivi int64_t length; 195d62f504ebe6a3f9b15c6115f9add1c4fed87d847Glenn Kasten bool mCloseAfterUse; // whether to close fd after last reference to fd 196331e70b5c675222bbd122f7ae515dbda631040feJean-Michel Trivi}; 197331e70b5c675222bbd122f7ae515dbda631040feJean-Michel Trivi 198dff1b1fc1f687c544e19df56bef225c45f7256a9Jean-Michel Trivi// TODO currently used by SfPlayer, to replace by DataLocator2 199331e70b5c675222bbd122f7ae515dbda631040feJean-Michel Triviunion DataLocator { 200331e70b5c675222bbd122f7ae515dbda631040feJean-Michel Trivi char* uri; 201331e70b5c675222bbd122f7ae515dbda631040feJean-Michel Trivi FdInfo fdi; 202331e70b5c675222bbd122f7ae515dbda631040feJean-Michel Trivi}; 203331e70b5c675222bbd122f7ae515dbda631040feJean-Michel Trivi 204dff1b1fc1f687c544e19df56bef225c45f7256a9Jean-Michel Triviunion DataLocator2 { 205dff1b1fc1f687c544e19df56bef225c45f7256a9Jean-Michel Trivi const char* uriRef; 206dff1b1fc1f687c544e19df56bef225c45f7256a9Jean-Michel Trivi FdInfo fdi; 207dff1b1fc1f687c544e19df56bef225c45f7256a9Jean-Michel Trivi}; 208dff1b1fc1f687c544e19df56bef225c45f7256a9Jean-Michel Trivi 209331e70b5c675222bbd122f7ae515dbda631040feJean-Michel Trivi} // namespace android 210