简体   繁体   中英

How to access Android Phone DRAM and other memory instead of sd

My Android Video application takes a media file, extract a frame, decodes it, and then plays at some specified rate. I have two choices for media file storage:

1- MicroSD Card. But I guess this would be slow. The processor will fetch frames from a far place, and the Micro SD is also slower (as compared to phones on-chip and other memories, such as DRAM). Thus many clock cycles will be wasted in getting frames resulting in poor play back of the video.

2- Keep the file in some other fast memory close to processor (as compared to SD). This should be faster and I am expecting better play back.

Questions:

a) Is my understanding correct?

b) If yes, how can I put my media file to other memory instead of SD, and how to get the path of this new location coz I need to pass this path to my application which decodes the frame and plays it back on the screen.

Thanks

I think the SD card will be larger than the internal memory, so you should keep the media on the SD card to avoid running out of space. If the SD card bandwidth is enough for playing your media files then you can hide latencies by buffering (reading as much of the file as you can in memory). Have you tested it? Have you tried playing a media file to see how the SD card performs?

About access to the internal memory: if you have installed your application in the internal memory, there is going to be a special directory for it, eg /data/data/com.my.app. Your application will have access to it and can create files there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM