History log of /frameworks/av/media/mtp/MtpDatabase.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
64000788211f4c7e78c80a4a155390d1316e1176 25-Apr-2011 Mike Lockwood <lockwood@android.com> MTP: Implement GetThumb command

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>
/frameworks/av/media/mtp/MtpDatabase.h
7d77dcfadd7fb637ed2c3aef5bb3990dd0a67dc0 22-Apr-2011 Mike Lockwood <lockwood@android.com> MTP: Add extended operations to support in-place editing of files

MTP does not support partial writes of files (the entire file must be transferred at once).
This makes it impossible to implement a FUSE file system for MTP
with acceptable performance.
To fix this problem, this change adds extended MTP operations to allow
partial writes to files:

SendPartialObject - allows writing a subset of a file, or appending to the end of a file

TruncateObject - allows changing the size of a file

BeginEditObject - must be called before using SendPartialObject and TruncateObject

EndEditObject - commits changes to a file after it has been edited with SendPartialObject or TruncateObject

We also add GetPartialObject64, which is the same as GetPartialObject
but has a 64 bit offset rather than 32.

Change-Id: I4b110748b97ae05cdc8aab02ecdbbbeb263f7840
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpDatabase.h
aa95240d9096f97aa2e2022fae8764a4386c8951 18-Jan-2011 Mike Lockwood <lockwood@android.com> MTP: Fix problems with modification dates for folders and non-media files

Also removed an unnecessary parameter to MtpDatabase.endSendobject()

BUG: 3352142

Change-Id: I6fd812dcba4814956bc8bc1cbd6bd5c868197790
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpDatabase.h
fd34626771a63d3a835863e1b4bf71dcb26e28d8 09-Dec-2010 Mike Lockwood <lockwood@android.com> MTP: Improve argument checking in SendObjectInfo

In particular, make sure the parent is a folder and make sure file
does not already exist.

Change-Id: Ifa870faba3285f03a92025d9e82f93fed78a761c
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpDatabase.h
40ce1f262cc4edbc8b7c470830325466263acaec 02-Dec-2010 Mike Lockwood <lockwood@android.com> MTP: Add support for multiple properties in GetObjectPropList command

Change-Id: Ib469a6c8141937aaa3e811345056195117abb4b2
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpDatabase.h
e1b8cf1cafb75ce1339b67eb1764e224a257c579 16-Nov-2010 Mike Lockwood <lockwood@android.com> MTP: Fixes to allow file transfers > 4 gigabytes

BUG: 3198248

Change-Id: I6f11c79a19d7bdd63718a7370939124b1262d221
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpDatabase.h
b6da06e9dfb916da4b88e09e8a83e22ddae445b5 15-Oct-2010 Mike Lockwood <lockwood@google.com> MTP: Partial implementation of the GetObjectPropList command

In this initial implementation we only support fetching one property at a time.
Support depth = 0 (single object) or depth = 1 (all objects in a directory)
Reimplemented GetObjectPropValue on top of GetObjectPropList, since the former
is a special case of the latter.

Change-Id: Ia76ee61741d6ee3902b5c5d9fc094cf86dfaf650
Signed-off-by: Mike Lockwood <lockwood@google.com>
/frameworks/av/media/mtp/MtpDatabase.h
6b3a9d15c8a2282c03f1df7d72a55b6800d4ecec 31-Aug-2010 Mike Lockwood <lockwood@android.com> MTP: Send an Intent after an MTP session that resulted in media database modifications

Change-Id: Ib2796e9155350c67769502935a73cf98d6ae9c08
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpDatabase.h
8277cec96ffa55082962591bca1c55abbeec8c26 10-Aug-2010 Mike Lockwood <lockwood@android.com> MTP: work in progress on expanded property support

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>
/frameworks/av/media/mtp/MtpDatabase.h
782aef17c9921a3bf401a0432878df5031f2328b 10-Aug-2010 Mike Lockwood <lockwood@android.com> MTP: Push queries for supported formats and properties up to Java.

Change-Id: I4f117090340e3916afda3d194521a6092a672ddc
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpDatabase.h
438344fba74ddd6b931ac733fa48643f27b63de3 03-Aug-2010 Mike Lockwood <lockwood@android.com> MTP: Add support for syncing MTP playlists

MTP playlists now correspond to playlists in the media provider
(like those created by the Music app).

Change-Id: I085cb3cff003037ad62f0e297fb0cfd3047cb3a2
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpDatabase.h
343af4ef512869695456a91519e73ed3c3d82101 02-Aug-2010 Mike Lockwood <lockwood@android.com> MTP: Implement GetNumObjects

Change-Id: Iccc3a445f9a1eab7bb76eddd567c6a3a8f155b2b
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpDatabase.h
9c04c4cc038f924d9cb98798e1c07fe6017e85d0 02-Aug-2010 Mike Lockwood <lockwood@android.com> Clean up MtpDatabase API.

Return MTP response codes instead of booleans for success or failure.
Remove some unused code.

Change-Id: I82ce80a4d7779233264e3caf139ebd0cece12f5c
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpDatabase.h
4714b0766ecf48f09f39b4781a5c4deafc092d49 12-Jul-2010 Mike Lockwood <lockwood@android.com> Integrate host to device file transfer with the media provider.

MTP file transfers happen in two stages. The SendObjectInfo command sends
some information about the file and reserves an ObjectHandle for the new file.
The file transfer is then performed using the SendObject command.

To support this in the media provider, MtpDatabase.beginSendObject receives
the information from SendObjectInfo and creates an row for it in the MTP objects
table for the new file. After the file transfer has completed, then
MtpDatabase.endSendObject is called. In endSendObject, we run the media scanner
on the new file, which will add a row to the images, audio, video
or audio playlist table.

To avoid the media scanner creating a second row for the file in the MTP objects
table, we pass the ObjectHandle created in beginSendObject to the media scanner,
which then passes it to the media provider via the content values when it
performs its insert.

Change-Id: I1ebcc63d6bd4404b0d3a93c703a9d3c097381d3a
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpDatabase.h
7f53a190463274096155704276f3002c1620a364 09-Jul-2010 Mike Lockwood <lockwood@android.com> Remove some scafolding and test code that is no longer worth maintaining.

Change-Id: I9ee62d2463d8df1246a84774e8ac7e674778279a
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpDatabase.h
dda7e2b7378755637f188cca7c5ae854427a28f7 03-Jul-2010 Mike Lockwood <lockwood@android.com> MTP: remove separate audio table from prototype MTP database

Change-Id: I5e4b49b741a0a3c6ddf5afcbb20a0d7c9515c8ce
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpDatabase.h
0250361b110267a139cc0865ff7d2f13b4d63bdf 02-Jul-2010 Mike Lockwood <lockwood@android.com> MTP: Make MtpDatabase class abstract so we can have multiple implementations

Rename existing test database to MtpSqliteDatabase
This is the first step in transitioning to using the media provider database

Change-Id: I5f36c854c6e76a79137c267b000a52ced803776c
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpDatabase.h
335dd2be955607f2632eabc25045857f2cc8b674 19-May-2010 Mike Lockwood <mike@spruce.(none)> More work on PTP host support.

Change-Id: Ifbd5bd5efa3cdb750ae1a2aae38181457554d34d
Signed-off-by: Mike Lockwood <mike@spruce.(none)>
/frameworks/av/media/mtp/MtpDatabase.h
fceef46513db3507b413f604cea89e3c7f352663 14-May-2010 Mike Lockwood <lockwood@android.com> MTP: More prototyping work:

New media scanner test program
Media scanner now cleans up after files that no longer exist
Separate database table for audio files
Extract metadata from audio files with libstagefright

Change-Id: I2bd0fe877836c741658e72fcfeb89c11be0d9b41
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpDatabase.h
7850ef999740f214a1990a9c090d3f3865d435aa 14-May-2010 Mike Lockwood <lockwood@android.com> Move MTP code to the android namespace

Change-Id: I5da48038fd5e4cdeefaeba42cdc74eb588b3448d
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpDatabase.h
16864bae0f51c32c456da2c43adf7a057c0c4882 11-May-2010 Mike Lockwood <lockwood@android.com> Checkpoint work on MTP and PTP investigation.

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>
/frameworks/av/media/mtp/MtpDatabase.h