Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(552)

Unified Diff: src/libmtp.c

Issue 900383002: Add LIBMTP_Get_Thumbnail_Format to get thumbnail format of a file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libmtp/
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/libmtp.h ('k') | src/libmtp.sym » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/libmtp.c
===================================================================
--- src/libmtp.c (revision 293973)
+++ src/libmtp.c (working copy)
@@ -8962,6 +8962,27 @@
}
/**
+ * Get thumbnail format of a file.
+ * @param device a pointer to the device to get thumbnail format of.
+ * @param id the object ID of the file to get thumbnail format of.
+ * @return 0 on success, any other value means failure.
+ */
+int LIBMTP_Get_Thumbnail_Format(LIBMTP_mtpdevice_t *device, uint32_t const id,
+ uint16_t *format)
+{
+ PTPParams *params = (PTPParams *) device->params;
+ uint16_t ret;
+
+ PTPObjectInfo object_info;
+ ret = ptp_getobjectinfo(params, id, &object_info);
+ if (ret != PTP_RC_OK)
+ return -1;
+
+ *format = object_info.ThumbFormat;
+ return 0;
+}
+
+/**
* This routine updates an album based on the metadata
* supplied. If the <code>tracks</code> field of the metadata
* contains a track listing, these tracks will be added to the
« no previous file with comments | « src/libmtp.h ('k') | src/libmtp.sym » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698