summaryrefslogtreecommitdiffstats
path: root/media/mtp/MtpDataPacket.h
Commit message (Collapse)AuthorAgeFilesLines
* MTP: add strict bounds checking for all incoming packetsMike Lockwood2014-11-121-12/+13
| | | | | | | | | | | Previously we did not sanity check incoming MTP packets, which could result in crashes due to reading off the edge of a packet. Now all MTP packet getter functions return a boolean result (true for OK, false for reading off the edge of the packet) and we now return errors for malformed packets. Bug: 18113092 Change-Id: Ic7623ee96f00652bdfb4f66acb16a93db5a1c105
* MTP: Use a single packet for the data phaseMike Lockwood2011-07-171-2/+1
| | | | | | | | instead of sending 12 byte header in a separate packet. PTP on the Mac is much happier with this approach. Change-Id: I7d1ca498f6346afd88876d24332187b466fc469c Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Implement GetThumb commandMike Lockwood2011-04-251-0/+1
| | | | | | | | | This allows the PC to access thumbnails in JPEG files over MTP/PTP Bug: 3219495 Change-Id: I4964f8b4826dffb7f0f77464ec91bd2e97a2f007 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: changes to use new usb_request support in libusbhostMike Lockwood2011-01-061-9/+12
| | | | | Change-Id: Ic091eab166a66efcde0395dcebbbc513f2322fca Signed-off-by: Mike Lockwood <lockwood@android.com>
* PTP: Improve performance and reliability of file importingMike Lockwood2010-11-191-0/+3
| | | | | | | | | | | | | | | | Now the file copy is done completely within the media process rather than pushing data to the client via ContProvider.openFile(). File system writes are now interleaved with USB reads, which allows us to copy the data faster and prevents the camera from timing out during transfer. File is automatically inserted in the media provider after a successful import and a Uri is returned to the client. BUG: 2994234 Change-Id: Ie75c63da76f623343d3d966c6a707aa1ae871972 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: work in progress on expanded property supportMike Lockwood2010-08-251-0/+2
| | | | | | | | GetObjectPropValue and SetObjectPropValue are disabled until I figure out why Windows doesn't like what I have done. Change-Id: I74e945ef3ea031f6d46f4ebaa8df815da0a5c3ed Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Compatibility fixes for transferring stringsMike Lockwood2010-08-181-1/+1
| | | | | Change-Id: Ic06d754ee68b0389439cdc34f73adff0f2b33afa Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Push queries for supported formats and properties up to Java.Mike Lockwood2010-08-101-0/+1
| | | | | Change-Id: I4f117090340e3916afda3d194521a6092a672ddc Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP host: Add support for reading files from an MTP device via ↵Mike Lockwood2010-07-261-0/+5
| | | | | | | | | | ParcelFileDescriptor Also added some support for sending files to the device that hasn't been debugged yet. Add locking to MtpDevice to prevent it from attempting multiple transactions simultaneously. Change-Id: I2b995ba0af086cc6920bd6b8c869f540ad78560a Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Fix problems reading and writing arrays in property values.Mike Lockwood2010-07-201-0/+2
| | | | | Change-Id: Idd53b63fd32698a3ffc90f174d16ae597b4feb36 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Use media provider database to implement MTP device support.Mike Lockwood2010-07-081-0/+1
| | | | | | | | | | | | | Uses a new "MTP objects" table in the media provider to support basic enumeration of the external storage file system. Support for accessing audio, video and image metadata in the existing media provider tables will be added in a later commit. The C++ MtpDatabase class is now abstract, to support a proxy subclass that calls through JNI to the Java MtpDatabase class in the media provider. Change-Id: I90f0db5f3acc5d35ae78c27a8507edff16d14305 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Add support for retrieving thumbnails to MTP content provider.Mike Lockwood2010-06-101-0/+1
| | | | Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: host support for retrieving device property descriptorsMike Lockwood2010-06-071-0/+4
| | | | Signed-off-by: Mike Lockwood <lockwood@android.com>
* More work on PTP host support.Mike Lockwood2010-05-191-0/+9
| | | | | Change-Id: Ifbd5bd5efa3cdb750ae1a2aae38181457554d34d Signed-off-by: Mike Lockwood <mike@spruce.(none)>
* Move MTP code to the android namespaceMike Lockwood2010-05-141-0/+4
| | | | | Change-Id: I5da48038fd5e4cdeefaeba42cdc74eb588b3448d Signed-off-by: Mike Lockwood <lockwood@android.com>
* Checkpoint work on MTP and PTP investigation.Mike Lockwood2010-05-131-0/+89
This change includes work in progress on a C++ library for both host and device MTP and PTP support. Currently the makefile builds two test programs: mtptest - a command line test program that implements a small subset of device side MTP. Requires a kernel driver that has not been checked in yet. ptptest - a host tool to test USB host support for detecting and communicating with digital cameras over PTP. Runs on Linux host. Later this will be reformulated as a native library that will be used in the media process. Change-Id: I81aab279975b600b59d99013ab97f9adf0b58da7 Signed-off-by: Mike Lockwood <lockwood@android.com>