Skip to content
Browse files

Start on the cocoa webkit-plugin

  • Loading branch information...
1 parent d944f3d commit a22423f4bfb7df401403a5d3f1acd088f3db7d93 @azinman azinman committed Feb 18, 2011
Showing with 32,368 additions and 0 deletions.
  1. BIN webkit-plugin-mac/English.lproj/InfoPlist.strings
  2. +44 −0 webkit-plugin-mac/Info.plist
  3. +252 −0 webkit-plugin-mac/bg_fg_blobs.cpp
  4. +18 −0 webkit-plugin-mac/bg_fg_blobs.h
  5. +42 −0 webkit-plugin-mac/build/Debug/webkit-plugin-mac.webplugin/Contents/Info.plist
  6. BIN ...in-mac/build/Debug/webkit-plugin-mac.webplugin/Contents/Resources/English.lproj/InfoPlist.strings
  7. +60 −0 webkit-plugin-mac/build/Debug/webkit-plugin-mac.webplugin/Contents/Resources/Info.plist
  8. +3 −0 ...plugin-mac.build/Debug/webkit-plugin-mac.build/Objects-normal/i386/webkit-plugin-mac.LinkFileList
  9. +1,088 −0 webkit-plugin-mac/build/webkit-plugin-mac.build/Debug/webkit-plugin-mac.build/build-state.dat
  10. +1,090 −0 webkit-plugin-mac/build/webkit-plugin-mac.build/Debug/webkit-plugin-mac.build/build-state~.dat
  11. BIN ...d/webkit-plugin-mac.build/Debug/webkit-plugin-mac.build/webkit-plugin-mac-all-target-headers.hmap
  12. BIN ...uild/webkit-plugin-mac.build/Debug/webkit-plugin-mac.build/webkit-plugin-mac-generated-files.hmap
  13. BIN ...d/webkit-plugin-mac.build/Debug/webkit-plugin-mac.build/webkit-plugin-mac-own-target-headers.hmap
  14. BIN ...uild/webkit-plugin-mac.build/Debug/webkit-plugin-mac.build/webkit-plugin-mac-project-headers.hmap
  15. +13 −0 webkit-plugin-mac/build/webkit-plugin-mac.build/Debug/webkit-plugin-mac.build/webkit-plugin-mac.dep
  16. BIN webkit-plugin-mac/build/webkit-plugin-mac.build/Debug/webkit-plugin-mac.build/webkit-plugin-mac.hmap
  17. +13 −0 webkit-plugin-mac/build/webkit-plugin-mac.build/Debug/webkit-plugin-mac.build/webkit-plugin-mac~.dep
  18. +145 −0 webkit-plugin-mac/build/webkit-plugin-mac.build/Release/webkit-plugin-mac.build/build-state.dat
  19. +11 −0 ...it-plugin-mac/build/webkit-plugin-mac.build/Release/webkit-plugin-mac.build/webkit-plugin-mac.dep
  20. BIN webkit-plugin-mac/build/webkit-plugin-mac.build/webkit-plugin-mac.pbxindex/categories.pbxbtree
  21. BIN webkit-plugin-mac/build/webkit-plugin-mac.build/webkit-plugin-mac.pbxindex/cdecls.pbxbtree
  22. BIN webkit-plugin-mac/build/webkit-plugin-mac.build/webkit-plugin-mac.pbxindex/decls.pbxbtree
  23. BIN webkit-plugin-mac/build/webkit-plugin-mac.build/webkit-plugin-mac.pbxindex/files.pbxbtree
  24. BIN webkit-plugin-mac/build/webkit-plugin-mac.build/webkit-plugin-mac.pbxindex/imports.pbxbtree
  25. BIN webkit-plugin-mac/build/webkit-plugin-mac.build/webkit-plugin-mac.pbxindex/pbxindex.header
  26. BIN webkit-plugin-mac/build/webkit-plugin-mac.build/webkit-plugin-mac.pbxindex/protocols.pbxbtree
  27. BIN webkit-plugin-mac/build/webkit-plugin-mac.build/webkit-plugin-mac.pbxindex/refs.pbxbtree
  28. BIN ...it-plugin-mac/build/webkit-plugin-mac.build/webkit-plugin-mac.pbxindex/strings.pbxstrings/control
  29. BIN ...it-plugin-mac/build/webkit-plugin-mac.build/webkit-plugin-mac.pbxindex/strings.pbxstrings/strings
  30. BIN webkit-plugin-mac/build/webkit-plugin-mac.build/webkit-plugin-mac.pbxindex/subclasses.pbxbtree
  31. BIN webkit-plugin-mac/build/webkit-plugin-mac.build/webkit-plugin-mac.pbxindex/symbols0.pbxsymbols
  32. +433 −0 webkit-plugin-mac/include/libfreenect/libfreenect.h
  33. +108 −0 webkit-plugin-mac/include/libfreenect/libfreenect_sync.h
  34. +1,322 −0 webkit-plugin-mac/include/libusb-1.0/libusb.h
  35. +83 −0 webkit-plugin-mac/include/opencv/cv.h
  36. +52 −0 webkit-plugin-mac/include/opencv/cv.hpp
  37. +65 −0 webkit-plugin-mac/include/opencv/cvaux.h
  38. +51 −0 webkit-plugin-mac/include/opencv/cvaux.hpp
  39. +46 −0 webkit-plugin-mac/include/opencv/cvwimage.h
  40. +53 −0 webkit-plugin-mac/include/opencv/cxcore.h
  41. +52 −0 webkit-plugin-mac/include/opencv/cxcore.hpp
  42. +49 −0 webkit-plugin-mac/include/opencv/cxeigen.hpp
  43. +6 −0 webkit-plugin-mac/include/opencv/cxmisc.h
  44. +50 −0 webkit-plugin-mac/include/opencv/highgui.h
  45. +48 −0 webkit-plugin-mac/include/opencv/ml.h
  46. +761 −0 webkit-plugin-mac/include/opencv2/calib3d/calib3d.hpp
  47. +566 −0 webkit-plugin-mac/include/opencv2/contrib/contrib.hpp
  48. +4,050 −0 webkit-plugin-mac/include/opencv2/core/core.hpp
  49. +1,885 −0 webkit-plugin-mac/include/opencv2/core/core_c.h
  50. +186 −0 webkit-plugin-mac/include/opencv2/core/eigen.hpp
  51. +684 −0 webkit-plugin-mac/include/opencv2/core/internal.hpp
  52. +2,470 −0 webkit-plugin-mac/include/opencv2/core/mat.hpp
  53. +3,553 −0 webkit-plugin-mac/include/opencv2/core/operations.hpp
  54. +1,866 −0 webkit-plugin-mac/include/opencv2/core/types_c.h
  55. +58 −0 webkit-plugin-mac/include/opencv2/core/version.hpp
  56. +621 −0 webkit-plugin-mac/include/opencv2/core/wimage.hpp
  57. +2,747 −0 webkit-plugin-mac/include/opencv2/features2d/features2d.hpp
  58. +76 −0 webkit-plugin-mac/include/opencv2/flann/all_indices.h
  59. +187 −0 webkit-plugin-mac/include/opencv2/flann/allocator.h
  60. +614 −0 webkit-plugin-mac/include/opencv2/flann/autotuned_index.h
  61. +163 −0 webkit-plugin-mac/include/opencv2/flann/composite_index.h
  62. +361 −0 webkit-plugin-mac/include/opencv2/flann/dist.h
  63. +196 −0 webkit-plugin-mac/include/opencv2/flann/flann.hpp
  64. +261 −0 webkit-plugin-mac/include/opencv2/flann/flann_base.hpp
  65. +150 −0 webkit-plugin-mac/include/opencv2/flann/general.h
  66. +95 −0 webkit-plugin-mac/include/opencv2/flann/ground_truth.h
  67. +163 −0 webkit-plugin-mac/include/opencv2/flann/hdf5.h
  68. +209 −0 webkit-plugin-mac/include/opencv2/flann/heap.h
  69. +292 −0 webkit-plugin-mac/include/opencv2/flann/index_testing.h
  70. +622 −0 webkit-plugin-mac/include/opencv2/flann/kdtree_index.h
  71. +1,117 −0 webkit-plugin-mac/include/opencv2/flann/kmeans_index.h
  72. +120 −0 webkit-plugin-mac/include/opencv2/flann/linear_index.h
  73. +92 −0 webkit-plugin-mac/include/opencv2/flann/logger.h
  74. +118 −0 webkit-plugin-mac/include/opencv2/flann/matrix.h
  75. +108 −0 webkit-plugin-mac/include/opencv2/flann/nn_index.h
  76. +94 −0 webkit-plugin-mac/include/opencv2/flann/object_factory.h
  77. +134 −0 webkit-plugin-mac/include/opencv2/flann/random.h
  78. +320 −0 webkit-plugin-mac/include/opencv2/flann/result_set.h
  79. +94 −0 webkit-plugin-mac/include/opencv2/flann/sampling.h
  80. +115 −0 webkit-plugin-mac/include/opencv2/flann/saving.h
  81. +186 −0 webkit-plugin-mac/include/opencv2/flann/simplex_downhill.h
  82. +90 −0 webkit-plugin-mac/include/opencv2/flann/timer.h
  83. +130 −0 webkit-plugin-mac/include/opencv2/gpu/devmem2d.hpp
  84. +1,113 −0 webkit-plugin-mac/include/opencv2/gpu/gpu.hpp
  85. +440 −0 webkit-plugin-mac/include/opencv2/gpu/matrix_operations.hpp
  86. +64 −0 webkit-plugin-mac/include/opencv2/gpu/stream_accessor.hpp
Sorry, we could not display the entire diff because it was too big.
View
BIN webkit-plugin-mac/English.lproj/InfoPlist.strings
Binary file not shown.
View
44 webkit-plugin-mac/Info.plist
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>edu.mit.media.depthjs</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>WBPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>NSPrincipalClass</key>
+ <string>webkit_plugin_macView</string>
+ <key>WebPluginName</key>
+ <string>DepthJS Extension Plugin</string>
+ <key>WebPluginDescription</key>
+ <string>DepthJS Extension Plugin</string>
+ <key>WebPluginMIMETypes</key>
+ <dict>
+ <key>application/x-depthjs</key>
+ <dict>
+ <key>WebPluginExtensions</key>
+ <array>
+ <string>depthjs</string>
+ </array>
+ <key>WebPluginTypeDescription</key>
+ <string>DepthJS Extension Plugin</string>
+ </dict>
+ </dict>
+</dict>
+</plist>
View
252 webkit-plugin-mac/bg_fg_blobs.cpp
@@ -0,0 +1,252 @@
+/*
+ * bg_fg_blobs.cpp
+ * OpenCVTries1
+ *
+ * Created by Roy Shilkrot on 11/21/10.
+ * Copyright 2010 MIT. All rights reserved.
+ *
+ */
+
+#include "bg_fg_blobs.h"
+
+ Scalar refineSegments(const Mat& img,
+ Mat& mask,
+ Mat& dst,
+ vector<Point>& contour,
+ vector<Point>& second_contour,
+ Point2i& previous)
+{
+// int niters = 3;
+
+ vector<vector<Point> > contours;
+ vector<Vec4i> hierarchy;
+
+ Mat temp;
+
+// dilate(mask, temp, Mat(), Point(-1,-1), niters);
+// erode(temp, temp, Mat(), Point(-1,-1), niters*2);
+// dilate(temp, temp, Mat(), Point(-1,-1), niters);
+ blur(mask, temp, Size(11,11));
+// imshow("temp",temp);
+ temp = temp > 85.0;
+
+ findContours( temp, contours, /*hierarchy,*/ CV_RETR_EXTERNAL, CV_CHAIN_APPROX_SIMPLE );
+
+ if(dst.data==NULL)
+ dst = Mat::zeros(img.size(), CV_8UC1);
+ else
+ dst.setTo(Scalar(0));
+
+ if( contours.size() == 0 )
+ return Scalar(-1,-1);
+
+ // iterate through all the top-level contours,
+ // draw each connected component with its own random color
+ int idx = 0, largestComp = -1, secondlargest = -1;
+ double maxWArea = 0, maxJArea = 0;
+ vector<double> justarea(contours.size());
+ vector<double> weightedarea(contours.size());
+
+// for( ; idx >= 0; idx = hierarchy[idx][0] )
+ for (; idx<contours.size(); idx++)
+ {
+ const vector<Point>& c = contours[idx];
+ Scalar _mean = mean(Mat(contours[idx]));
+ justarea[idx] = fabs(contourArea(Mat(c)));
+ weightedarea[idx] = fabs(contourArea(Mat(c))) /
+ ((previous.x >- 1) ? (1.0 + norm(Point(_mean[0],_mean[1])-previous)) : 1.0); //consider distance from last blob
+ }
+ for (idx = 0; idx<contours.size(); idx++) {
+ if( weightedarea[idx] > maxWArea )
+ {
+ maxWArea = weightedarea[idx];
+ largestComp = idx;
+ }
+ }
+ for (idx = 0; idx < contours.size(); idx++) {
+ if ( justarea[idx] > maxJArea && idx != largestComp ) {
+ maxJArea = justarea[idx];
+ secondlargest = idx;
+ }
+ }
+
+ Scalar color( 255 );
+// cout << "largest cc " << largestComp << endl;
+ // drawContours( dst, contours, largestComp, color, CV_FILLED); //, 8, hierarchy );
+// for (idx=0; idx<contours[largestComp].size()-1; idx++) {
+// line(dst, contours[largestComp][idx], contours[largestComp][idx+1], color, 2);
+//
+ if(largestComp >= 0) {
+ int num = contours[largestComp].size();
+ Point* pts = &(contours[largestComp][0]);
+ fillPoly(dst, (const Point**)(&pts), &num, 1, color);
+
+ Scalar b = mean(Mat(contours[largestComp]));
+ b[2] = justarea[largestComp];
+
+ contour.clear();
+ contour = contours[largestComp];
+
+ second_contour.clear();
+ if(secondlargest >= 0) {
+ second_contour = contours[secondlargest];
+ b[3] = maxJArea;
+ }
+
+ previous.x = b[0]; previous.y = b[1];
+ return b;
+ } else
+ return Scalar(-1,-1);
+
+}
+/*
+ void makePointsFromMask(Mat& maskm,vector<Point2f>& points, bool _add = false) {//, Mat& out) {
+ if(!_add)
+ points.clear();
+ for (int y=0; y<maskm.rows; y+=10) {
+ uchar* ptr = maskm.ptr<uchar>(y);
+ for (int x=0; x<maskm.cols; x+=10) {
+ if(ptr[x]>10) {
+ points.push_back(Point2f(x,y));
+// if(out.data!=NULL)
+// circle(out, Point(x,y), 2, Scalar(0,0,255), 2);
+ }
+ }
+ }
+}
+
+void drawPoint(Mat& out,vector<Point2f>& points,Scalar color, Mat* maskm = NULL){
+ for (int i=0; i<points.size(); i++) {
+ if(maskm!=NULL)
+ if(((uchar*)maskm->data)[i] > 0)
+ circle(out,points[i],1,color,1);
+ else
+ circle(out,points[i],1,color,1);
+ }
+}
+
+
+//this is a sample for foreground detection functions
+int bgfg_main(int argc, char** argv)
+{
+ IplImage* tmp_frame = NULL;
+ CvCapture* cap = NULL;
+ bool update_bg_model = true;
+
+ if( argc < 2 )
+ cap = cvCaptureFromCAM(0);
+ else
+ cap = cvCaptureFromFile(argv[1]);
+
+ if( !cap )
+ {
+ printf("can not open camera or video file\n");
+ return -1;
+ }
+
+ tmp_frame = cvQueryFrame(cap);
+ if(!tmp_frame)
+ {
+ printf("can not read data from the video source\n");
+ return -1;
+ }
+
+ cvNamedWindow("BG", 1);
+ cvNamedWindow("FG", 1);
+
+ CvBGStatModel* bg_model = 0;
+ Mat frameMat(tmp_frame);
+ Mat out(frameMat.size(),CV_8UC1),
+ outC(frameMat.size(),CV_8UC3);
+ Mat prevImg(frameMat.size(),CV_8UC1),
+ nextImg(frameMat.size(),CV_8UC1);
+ vector<Point2f> prevPts,nextPts;
+ vector<uchar> statusv;
+ vector<float> errv;
+ Rect cursor(frameMat.cols/2,frameMat.rows/2,10,10);
+ int nmfr = 0; //non-motion frames counter
+
+ for( int fr = 1;tmp_frame; tmp_frame = cvQueryFrame(cap), fr++ )
+ {
+ if(!bg_model)
+ {
+ //create BG model
+ bg_model = cvCreateGaussianBGModel( tmp_frame );
+ //bg_model = cvCreateFGDStatModel( tmp_frame );
+ continue;
+ }
+
+ double t = (double)cvGetTickCount();
+ cvUpdateBGStatModel( tmp_frame, bg_model, update_bg_model ? -1 : 0 );
+ t = (double)cvGetTickCount() - t;
+// printf( "%d. %.1f\n", fr, t/(cvGetTickFrequency()*1000.) );
+// cvShowImage("BG", bg_model->background);
+// cvShowImage("FG", bg_model->foreground);
+
+ Mat tmp_bg_fg(bg_model->foreground);
+
+ vector<Point> c();
+ refineSegments(frameMat,tmp_bg_fg,out,c);
+
+ if (fr%5 == 0) {
+ makePointsFromMask(out, prevPts,(fr%25 != 0));
+ }
+
+ cvtColor(frameMat, nextImg, CV_BGR2GRAY);
+// imshow("prev", prevImg);
+// imshow("next", nextImg);
+
+ calcOpticalFlowPyrLK(prevImg, nextImg, prevPts, nextPts, statusv, errv);
+ nextImg.copyTo(prevImg);
+
+
+ Mat ptsM(prevPts),nptsM(nextPts);
+ Mat statusM(statusv);
+ Scalar means = mean(ptsM-nptsM,statusM);
+
+
+ cout << "average motion of largest blob: " << means[0] << "," << means[1] << endl;
+
+ {
+ Mat _tmp; frameMat.copyTo(_tmp); //,out);
+ Point mid = Point(_tmp.cols/2, _tmp.rows/2);
+ line(_tmp, mid, mid+Point(means[0],0), Scalar(255,0,0), 5);
+ line(_tmp, mid, mid+Point(0,means[1]), Scalar(0,255,0), 5);
+// drawPoint(_tmp,prevPts,Scalar(0,0,255)); //,Mat::ones(1, statusv.size(), CV_8UC1));
+// drawPoint(_tmp,nextPts,Scalar(255,0,0),&statusM);
+ if(fabs(means[0])>2 && fabs(means[0]) < 60) {
+ cursor.x -= means[0];
+// stringstream ss; ss << "Move right-left";
+// putText(_tmp, ss.str(), Point(30,30), CV_FONT_HERSHEY_PLAIN, 2.0, Scalar(255,0,255), 2);
+ } else if(fabs(means[1])>2 && fabs(means[1]) < 60) {
+ cursor.y -= means[1];
+// stringstream ss; ss << "Move up-down";
+// putText(_tmp, ss.str(), Point(50,50), CV_FONT_HERSHEY_PLAIN, 2.0, Scalar(255,255,0), 2);
+ } else {
+ nmfr++;
+ }
+
+ rectangle(_tmp, cursor, Scalar(0,0,255), 2);
+ imshow("out", _tmp);
+ }
+ prevPts = nextPts;
+
+ if (nmfr%15 == 0) {
+ cursor.x = frameMat.cols/2;
+ cursor.y = frameMat.rows/2;
+ nmfr = 0;
+ }
+
+ char k = cvWaitKey(5);
+ if( k == 27 ) break;
+ if( k == ' ' )
+ update_bg_model = !update_bg_model;
+ }
+
+
+ cvReleaseBGStatModel( &bg_model );
+ cvReleaseCapture(&cap);
+
+ return 0;
+}
+*/
View
18 webkit-plugin-mac/bg_fg_blobs.h
@@ -0,0 +1,18 @@
+/*
+ * bg_fg_blobs.h
+ * OpenCVTries1
+ *
+ * Created by Roy Shilkrot on 11/21/10.
+ * Copyright 2010 MIT. All rights reserved.
+ *
+ */
+
+#include <vector>
+
+using namespace std;
+
+#include "cv.h"
+#include "highgui.h"
+#include "cvaux.h"
+
+using namespace cv;
View
42 webkit-plugin-mac/build/Debug/webkit-plugin-mac.webplugin/Contents/Info.plist
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>webkit-plugin-mac</string>
+ <key>CFBundleIdentifier</key>
+ <string>edu.mit.media.depthjs</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>webkit-plugin-mac</string>
+ <key>CFBundlePackageType</key>
+ <string>WBPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>NSPrincipalClass</key>
+ <string>webkit_plugin_macView</string>
+ <key>WebPluginDescription</key>
+ <string>DepthJS Extension Plugin</string>
+ <key>WebPluginMIMETypes</key>
+ <dict>
+ <key>application/x-depthjs</key>
+ <dict>
+ <key>WebPluginExtensions</key>
+ <array>
+ <string>depthjs</string>
+ </array>
+ <key>WebPluginTypeDescription</key>
+ <string>DepthJS Extension Plugin</string>
+ </dict>
+ </dict>
+ <key>WebPluginName</key>
+ <string>DepthJS Extension Plugin</string>
+</dict>
+</plist>
View
BIN ...uild/Debug/webkit-plugin-mac.webplugin/Contents/Resources/English.lproj/InfoPlist.strings
Binary file not shown.
View
60 webkit-plugin-mac/build/Debug/webkit-plugin-mac.webplugin/Contents/Resources/Info.plist
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>depthjs</string>
+ <key>CFBundleGetInfoString</key>
+ <string>Copyright 2010-2011 Massachusetts Institute of Technology.</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>edu.mit.media.depthjs</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>BRPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>CFPlugInDynamicRegisterFunction</key>
+ <string></string>
+ <key>CFPlugInDynamicRegistration</key>
+ <string>NO</string>
+ <key>CFPlugInFactories</key>
+ <dict>
+ <key>6E8FFACB-A39C-4D2B-A19C-DFE2B9A616CA</key>
+ <string>MyFactoryFunction</string>
+ </dict>
+ <key>CFPlugInTypes</key>
+ <dict>
+ <key>28EE48D2-20CC-43E3-BAE8-17DFAEECE960</key>
+ <array>
+ <string>6E8FFACB-A39C-4D2B-A19C-DFE2B9A616CA</string>
+ </array>
+ </dict>
+ <key>CFPlugInUnloadFunction</key>
+ <string></string>
+ <key>WebPluginDescription</key>
+ <string>DepthJS Extension Plugin</string>
+ <key>WebPluginMIMETypes</key>
+ <dict>
+ <key>application/x-depthjs</key>
+ <dict>
+ <key>WebPluginExtensions</key>
+ <array>
+ <string>depthjs</string>
+ </array>
+ <key>WebPluginTypeDescription</key>
+ <string>DepthJS Extension Plugin</string>
+ </dict>
+ </dict>
+ <key>WebPluginName</key>
+ <string>DepthJS Extension Plugin</string>
+</dict>
+</plist>
View
3 ...ac.build/Debug/webkit-plugin-mac.build/Objects-normal/i386/webkit-plugin-mac.LinkFileList
@@ -0,0 +1,3 @@
+/Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/webkit-plugin-mac.build/Debug/webkit-plugin-mac.build/Objects-normal/i386/webkit_plugin_macView.o
+/Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/webkit-plugin-mac.build/Debug/webkit-plugin-mac.build/Objects-normal/i386/ocv_freenect.o
+/Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/webkit-plugin-mac.build/Debug/webkit-plugin-mac.build/Objects-normal/i386/bg_fg_blobs.o
View
1,088 ...it-plugin-mac/build/webkit-plugin-mac.build/Debug/webkit-plugin-mac.build/build-state.dat
1,088 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
1,090 ...t-plugin-mac/build/webkit-plugin-mac.build/Debug/webkit-plugin-mac.build/build-state~.dat
1,090 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
BIN ...-plugin-mac.build/Debug/webkit-plugin-mac.build/webkit-plugin-mac-all-target-headers.hmap
Binary file not shown.
View
BIN ...kit-plugin-mac.build/Debug/webkit-plugin-mac.build/webkit-plugin-mac-generated-files.hmap
Binary file not shown.
View
BIN ...-plugin-mac.build/Debug/webkit-plugin-mac.build/webkit-plugin-mac-own-target-headers.hmap
Binary file not shown.
View
BIN ...kit-plugin-mac.build/Debug/webkit-plugin-mac.build/webkit-plugin-mac-project-headers.hmap
Binary file not shown.
View
13 ...gin-mac/build/webkit-plugin-mac.build/Debug/webkit-plugin-mac.build/webkit-plugin-mac.dep
@@ -0,0 +1,13 @@
+9318d5cd352f7034a2c27637dbf51ce3 431ba9dd7e866925a2b25bdb244f15f7 ffffffffffffffffffffffffffffffff 0 /Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/webkit-plugin-mac.build/Debug/webkit-plugin-mac.build/Objects-normal/i386/webkit_plugin_macView.o
+48141d9764edcc6b285d2291eb451e8e 21dc6fffd4d1027cd8c9fe50523dc22c ffffffffffffffffffffffffffffffff 0 /Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/webkit-plugin-mac.build/Debug/webkit-plugin-mac.build/Objects-normal/i386/ocv_freenect.o
+48141d9764c50d01285d2291eb4595f2 e156e19845efb77c61b9be144f3d7c3d ffffffffffffffffffffffffffffffff 0 /Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/webkit-plugin-mac.build/Debug/webkit-plugin-mac.build/Objects-normal/i386/bg_fg_blobs.o
+ffffffffffffffffffffffffffffffff c429a96ddaf2854eb386631cd50fe687 ffffffffffffffffffffffffffffffff 102 /Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/Debug/webkit-plugin-mac.webplugin
+ffffffffffffffffffffffffffffffff 3f5b40853c05f9314f1d944ba439bcfa ffffffffffffffffffffffffffffffff 0 /Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/Debug/webkit-plugin-mac.webplugin/Contents/MacOS/webkit-plugin-mac
+0000000041b94e020000000000000876 48141d976820e5bd285d2291eb458c12 ffffffffffffffffffffffffffffffff 2515312 /var/folders/ys/ys3DNrD4E3y5KymHJJVSWk+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/webkit-plugin-mac_Prefix-gifmffyebtzabjacpasyffqgpozi/webkit-plugin-mac_Prefix.pch.gch
+0000000041b94e020000000000000876 9318d5cd7e275da2a2c27637dbf5e320 ffffffffffffffffffffffffffffffff 63994448 /var/folders/ys/ys3DNrD4E3y5KymHJJVSWk+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/webkit-plugin-mac_Prefix-aaavqxkxpvxtumfvjqntlcbcpxrs/webkit-plugin-mac_Prefix.pch.gch
+000000004d391fe50000000000000707 c2407e5b8f4cfa95f2afc663d2995438 ffffffffffffffffffffffffffffffff 1799 /Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/Debug/webkit-plugin-mac.webplugin/Contents/Resources/Info.plist
+000000004d5e290400000000000000c2 9ea0c143475cbaff7fa21874b20a7302 ffffffffffffffffffffffffffffffff 194 /Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/Debug/webkit-plugin-mac.webplugin/Contents/Resources/English.lproj/InfoPlist.strings
+00000000000000000000000000000000 1268bcfa250fc1bbd897b0a2d64e6f5b ffffffffffffffffffffffffffffffff 1220 /Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/Debug/webkit-plugin-mac.webplugin/Contents/Info.plist
+0000000041b94e020000000000000876 3211f7e23bfb93be485f30fd3bb1220b ffffffffffffffffffffffffffffffff 58919632 /var/folders/ys/ys3DNrD4E3y5KymHJJVSWk+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/webkit-plugin-mac_Prefix-gmihnvdcenluocekwylfwcyfonzp/webkit-plugin-mac_Prefix.pch.gch
+ffffffffffffffffffffffffffffffff 683191d044435fd98cf787c3b8db933b ffffffffffffffffffffffffffffffff 0 /Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/webkit-plugin-mac.build/Debug/webkit-plugin-mac.build/Objects-normal/i386/depthjs.o
+ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 0 /Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/webkit-plugin-mac.build/Debug/webkit-plugin-mac.build/Objects-normal/i386/plugin.o
View
BIN ...in-mac/build/webkit-plugin-mac.build/Debug/webkit-plugin-mac.build/webkit-plugin-mac.hmap
Binary file not shown.
View
13 ...in-mac/build/webkit-plugin-mac.build/Debug/webkit-plugin-mac.build/webkit-plugin-mac~.dep
@@ -0,0 +1,13 @@
+9318d5cd34f1378ba2c27637dbf51ce4 431ba9dd7e866925a2b25bdb244f15f7 ffffffffffffffffffffffffffffffff 0 /Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/webkit-plugin-mac.build/Debug/webkit-plugin-mac.build/Objects-normal/i386/webkit_plugin_macView.o
+0000000041b94e020000000000000876 9318d5cd7e275da2a2c27637dbf5e320 ffffffffffffffffffffffffffffffff 63994448 /var/folders/ys/ys3DNrD4E3y5KymHJJVSWk+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/webkit-plugin-mac_Prefix-aaavqxkxpvxtumfvjqntlcbcpxrs/webkit-plugin-mac_Prefix.pch.gch
+48141d97653386ac285d2291eb451e8e 21dc6fffd4d1027cd8c9fe50523dc22c ffffffffffffffffffffffffffffffff 0 /Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/webkit-plugin-mac.build/Debug/webkit-plugin-mac.build/Objects-normal/i386/ocv_freenect.o
+48141d9765603d07285d2291eb4595f2 e156e19845efb77c61b9be144f3d7c3d ffffffffffffffffffffffffffffffff 0 /Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/webkit-plugin-mac.build/Debug/webkit-plugin-mac.build/Objects-normal/i386/bg_fg_blobs.o
+0000000041b94e020000000000000876 48141d976820e5bd285d2291eb458c12 ffffffffffffffffffffffffffffffff 2515312 /var/folders/ys/ys3DNrD4E3y5KymHJJVSWk+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/webkit-plugin-mac_Prefix-gifmffyebtzabjacpasyffqgpozi/webkit-plugin-mac_Prefix.pch.gch
+000000004d5e290400000000000000c2 9ea0c143475cbaff7fa21874b20a7302 ffffffffffffffffffffffffffffffff 194 /Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/Debug/webkit-plugin-mac.webplugin/Contents/Resources/English.lproj/InfoPlist.strings
+000000004d391fe50000000000000707 c2407e5b8f4cfa95f2afc663d2995438 ffffffffffffffffffffffffffffffff 1799 /Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/Debug/webkit-plugin-mac.webplugin/Contents/Resources/Info.plist
+00000000000000000000000000000000 1268bcfa250fc1bbd897b0a2d64e6f5b ffffffffffffffffffffffffffffffff 1220 /Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/Debug/webkit-plugin-mac.webplugin/Contents/Info.plist
+ffffffffffffffffffffffffffffffff c429a96ddaf2854eb386631cd50fe687 ffffffffffffffffffffffffffffffff 0 /Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/Debug/webkit-plugin-mac.webplugin
+ffffffffffffffffffffffffffffffff 3f5b40853c05f9314f1d944ba439bcfa ffffffffffffffffffffffffffffffff 0 /Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/Debug/webkit-plugin-mac.webplugin/Contents/MacOS/webkit-plugin-mac
+0000000041b94e020000000000000876 3211f7e23bfb93be485f30fd3bb1220b ffffffffffffffffffffffffffffffff 58919632 /var/folders/ys/ys3DNrD4E3y5KymHJJVSWk+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/webkit-plugin-mac_Prefix-gmihnvdcenluocekwylfwcyfonzp/webkit-plugin-mac_Prefix.pch.gch
+ffffffffffffffffffffffffffffffff 683191d044435fd98cf787c3b8db933b ffffffffffffffffffffffffffffffff 0 /Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/webkit-plugin-mac.build/Debug/webkit-plugin-mac.build/Objects-normal/i386/depthjs.o
+ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 0 /Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/webkit-plugin-mac.build/Debug/webkit-plugin-mac.build/Objects-normal/i386/plugin.o
View
145 ...-plugin-mac/build/webkit-plugin-mac.build/Release/webkit-plugin-mac.build/build-state.dat
@@ -0,0 +1,145 @@
+Twebkit-plugin-mac
+v7
+r1
+
+N/Developer/SDKs/MacOSX10.6.sdk
+c000000004CAA740B00000000000000EE
+t1286239243
+s238
+
+N/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h
+c0000000040C4AA6800000000000001E5
+t1086630504
+s485
+
+N/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/WebKit.framework/Headers/WebKit.h
+c000000004C23CD6E0000000000000957
+t1277414766
+s2391
+
+N/System/Library/Frameworks/Cocoa.framework/Cocoa
+c000000004A1F2D63000000000000A5E0
+t1243557219
+s42464
+
+N/System/Library/Frameworks/WebKit.framework/WebKit
+c000000004CB79D6A00000000005BFC60
+t1287101802
+s6028384
+
+N/Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/English.lproj/InfoPlist.strings
+c000000004D5E290400000000000000C2
+t1298016516
+s194
+
+N/Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/Release/webkit-plugin-mac.webplugin
+t2
+s0
+
+N/Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/Release/webkit-plugin-mac.webplugin.dSYM
+t2
+s0
+
+N/Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/Release/webkit-plugin-mac.webplugin/Contents/Info.plist
+t2
+s0
+
+N/Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/Release/webkit-plugin-mac.webplugin/Contents/MacOS/webkit-plugin-mac
+t2
+s0
+
+N/Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/Release/webkit-plugin-mac.webplugin/Contents/Resources/English.lproj/InfoPlist.strings
+t2
+s0
+
+N/Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/webkit-plugin-mac.build/Release/webkit-plugin-mac.build/Objects-normal/i386/webkit-plugin-mac
+t2
+s0
+
+N/Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/webkit-plugin-mac.build/Release/webkit-plugin-mac.build/Objects-normal/i386/webkit-plugin-mac.LinkFileList
+c00000000000000000000000000000000
+t2
+s0
+
+N/Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/webkit-plugin-mac.build/Release/webkit-plugin-mac.build/Objects-normal/i386/webkit_plugin_macView.o
+t2
+s0
+
+N/Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/webkit-plugin-mac.build/Release/webkit-plugin-mac.build/Objects-normal/ppc/webkit-plugin-mac
+t2
+s0
+
+N/Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/webkit-plugin-mac.build/Release/webkit-plugin-mac.build/Objects-normal/ppc/webkit-plugin-mac.LinkFileList
+c00000000000000000000000000000000
+t2
+s0
+
+N/Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/webkit-plugin-mac.build/Release/webkit-plugin-mac.build/Objects-normal/ppc/webkit_plugin_macView.o
+t2
+s0
+
+N/Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/webkit-plugin-mac_Prefix.pch
+c000000004D5E290400000000000000C4
+t1298016516
+s196
+i<Cocoa/Cocoa.h>
+i<WebKit/WebKit.h>
+
+N/Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/webkit_plugin_macView.h
+c000000004D5E29040000000000000100
+t1298016516
+s256
+i<Cocoa/Cocoa.h>
+
+N/Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/webkit_plugin_macView.m
+c000000004D5E2904000000000000086A
+t1298016516
+s2154
+i"webkit_plugin_macView.h"
+
+N/var/folders/ys/ys3DNrD4E3y5KymHJJVSWk+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/webkit-plugin-mac_Prefix-gjghayizxxbrngejfdcmzdwawvmm/webkit-plugin-mac_Prefix.pch.gch
+t2
+s0
+
+N/var/folders/ys/ys3DNrD4E3y5KymHJJVSWk+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/webkit-plugin-mac_Prefix-goyltownpgvvabguvekxzyhrnoem/webkit-plugin-mac_Prefix.pch.gch
+t2
+s0
+
+NInfo.plist
+c000000004D5E298400000000000004F3
+t1298016644
+s1267
+
+CCompileC build/webkit-plugin-mac.build/Release/webkit-plugin-mac.build/Objects-normal/i386/webkit_plugin_macView.o "/Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/webkit_plugin_macView.m" normal i386 objective-c com.apple.compilers.gcc.4_2
+r0
+
+CCompileC build/webkit-plugin-mac.build/Release/webkit-plugin-mac.build/Objects-normal/ppc/webkit_plugin_macView.o "/Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/webkit_plugin_macView.m" normal ppc objective-c com.apple.compilers.gcc.4_2
+r0
+
+CCopyStringsFile "/Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/Release/webkit-plugin-mac.webplugin/Contents/Resources/English.lproj/InfoPlist.strings" English.lproj/InfoPlist.strings
+r0
+
+CCreateUniversalBinary "/Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/Release/webkit-plugin-mac.webplugin/Contents/MacOS/webkit-plugin-mac" normal "i386 ppc"
+r0
+
+CGenerateDSYMFile "/Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/Release/webkit-plugin-mac.webplugin.dSYM" "/Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/Release/webkit-plugin-mac.webplugin/Contents/MacOS/webkit-plugin-mac"
+r0
+
+CLd "/Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/webkit-plugin-mac.build/Release/webkit-plugin-mac.build/Objects-normal/i386/webkit-plugin-mac" normal i386
+r0
+
+CLd "/Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/webkit-plugin-mac.build/Release/webkit-plugin-mac.build/Objects-normal/ppc/webkit-plugin-mac" normal ppc
+r0
+
+CProcessInfoPlistFile "/Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/Release/webkit-plugin-mac.webplugin/Contents/Info.plist" Info.plist
+r0
+
+CProcessPCH /var/folders/ys/ys3DNrD4E3y5KymHJJVSWk+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/webkit-plugin-mac_Prefix-gjghayizxxbrngejfdcmzdwawvmm/webkit-plugin-mac_Prefix.pch.gch webkit-plugin-mac_Prefix.pch normal ppc objective-c com.apple.compilers.gcc.4_2
+r0
+
+CProcessPCH /var/folders/ys/ys3DNrD4E3y5KymHJJVSWk+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/webkit-plugin-mac_Prefix-goyltownpgvvabguvekxzyhrnoem/webkit-plugin-mac_Prefix.pch.gch webkit-plugin-mac_Prefix.pch normal i386 objective-c com.apple.compilers.gcc.4_2
+r0
+
+CTouch "/Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/Release/webkit-plugin-mac.webplugin"
+r0
+
View
11 ...n-mac/build/webkit-plugin-mac.build/Release/webkit-plugin-mac.build/webkit-plugin-mac.dep
@@ -0,0 +1,11 @@
+ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 0 /Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/webkit-plugin-mac.build/Release/webkit-plugin-mac.build/Objects-normal/ppc/webkit_plugin_macView.o
+ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 0 /Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/webkit-plugin-mac.build/Release/webkit-plugin-mac.build/Objects-normal/i386/webkit_plugin_macView.o
+ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 0 /Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/Release/webkit-plugin-mac.webplugin.dSYM
+ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 0 /Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/Release/webkit-plugin-mac.webplugin
+ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 0 /Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/Release/webkit-plugin-mac.webplugin/Contents/MacOS/webkit-plugin-mac
+ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 0 /Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/webkit-plugin-mac.build/Release/webkit-plugin-mac.build/Objects-normal/ppc/webkit-plugin-mac
+ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 0 /var/folders/ys/ys3DNrD4E3y5KymHJJVSWk+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/webkit-plugin-mac_Prefix-gjghayizxxbrngejfdcmzdwawvmm/webkit-plugin-mac_Prefix.pch.gch
+ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 0 /Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/webkit-plugin-mac.build/Release/webkit-plugin-mac.build/Objects-normal/i386/webkit-plugin-mac
+ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 0 /var/folders/ys/ys3DNrD4E3y5KymHJJVSWk+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/webkit-plugin-mac_Prefix-goyltownpgvvabguvekxzyhrnoem/webkit-plugin-mac_Prefix.pch.gch
+ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 0 /Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/Release/webkit-plugin-mac.webplugin/Contents/Resources/English.lproj/InfoPlist.strings
+ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 0 /Volumes/New HD/Users/aaron/eclipseWorkspace/depthjs/webkit-plugin-mac/build/Release/webkit-plugin-mac.webplugin/Contents/Info.plist
View
BIN ...t-plugin-mac/build/webkit-plugin-mac.build/webkit-plugin-mac.pbxindex/categories.pbxbtree
Binary file not shown.
View
BIN webkit-plugin-mac/build/webkit-plugin-mac.build/webkit-plugin-mac.pbxindex/cdecls.pbxbtree
Binary file not shown.
View
BIN webkit-plugin-mac/build/webkit-plugin-mac.build/webkit-plugin-mac.pbxindex/decls.pbxbtree
Binary file not shown.
View
BIN webkit-plugin-mac/build/webkit-plugin-mac.build/webkit-plugin-mac.pbxindex/files.pbxbtree
Binary file not shown.
View
BIN webkit-plugin-mac/build/webkit-plugin-mac.build/webkit-plugin-mac.pbxindex/imports.pbxbtree
Binary file not shown.
View
BIN webkit-plugin-mac/build/webkit-plugin-mac.build/webkit-plugin-mac.pbxindex/pbxindex.header
Binary file not shown.
View
BIN ...it-plugin-mac/build/webkit-plugin-mac.build/webkit-plugin-mac.pbxindex/protocols.pbxbtree
Binary file not shown.
View
BIN webkit-plugin-mac/build/webkit-plugin-mac.build/webkit-plugin-mac.pbxindex/refs.pbxbtree
Binary file not shown.
View
BIN ...n-mac/build/webkit-plugin-mac.build/webkit-plugin-mac.pbxindex/strings.pbxstrings/control
Binary file not shown.
View
BIN ...n-mac/build/webkit-plugin-mac.build/webkit-plugin-mac.pbxindex/strings.pbxstrings/strings
Binary file not shown.
View
BIN ...t-plugin-mac/build/webkit-plugin-mac.build/webkit-plugin-mac.pbxindex/subclasses.pbxbtree
Binary file not shown.
View
BIN ...t-plugin-mac/build/webkit-plugin-mac.build/webkit-plugin-mac.pbxindex/symbols0.pbxsymbols
Binary file not shown.
View
433 webkit-plugin-mac/include/libfreenect/libfreenect.h
@@ -0,0 +1,433 @@
+/*
+ * This file is part of the OpenKinect Project. http://www.openkinect.org
+ *
+ * Copyright (c) 2010 individual OpenKinect contributors. See the CONTRIB file
+ * for details.
+ *
+ * This code is licensed to you under the terms of the Apache License, version
+ * 2.0, or, at your option, the terms of the GNU General Public License,
+ * version 2.0. See the APACHE20 and GPL2 files for the text of the licenses,
+ * or the following URLs:
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.gnu.org/licenses/gpl-2.0.txt
+ *
+ * If you redistribute this file in source form, modified or unmodified, you
+ * may:
+ * 1) Leave this header intact and distribute it under the same terms,
+ * accompanying it with the APACHE20 and GPL20 files, or
+ * 2) Delete the Apache 2.0 clause and accompany it with the GPL2 file, or
+ * 3) Delete the GPL v2 clause and accompany it with the APACHE20 file
+ * In all cases you must keep the copyright notice intact and include a copy
+ * of the CONTRIB file.
+ *
+ * Binary distributions must follow the binary distribution requirements of
+ * either License.
+ */
+
+#ifndef LIBFREENECT_H
+#define LIBFREENECT_H
+
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define FREENECT_FRAME_W 640 /**< Default video frame width */
+#define FREENECT_FRAME_H 480 /**< Default video frame height */
+#define FREENECT_FRAME_PIX (FREENECT_FRAME_H*FREENECT_FRAME_W) /**< Pixel count for default video frame */
+
+#define FREENECT_IR_FRAME_W 640 /**< Default depth frame width */
+#define FREENECT_IR_FRAME_H 488 /**< Default depth frame height */
+#define FREENECT_IR_FRAME_PIX (FREENECT_IR_FRAME_H*FREENECT_IR_FRAME_W) /**< Pixel count for default depth frame */
+
+#define FREENECT_VIDEO_RGB_SIZE (FREENECT_FRAME_PIX*3) /**< Size of the decompressed rgb frame */
+#define FREENECT_VIDEO_BAYER_SIZE (FREENECT_FRAME_PIX) /**< Size of the bayer frame */
+#define FREENECT_VIDEO_YUV_RGB_SIZE (FREENECT_VIDEO_RGB_SIZE) /**< Size of the rgb YUV frame */
+#define FREENECT_VIDEO_YUV_RAW_SIZE (FREENECT_FRAME_PIX*2) /**< Size of the raw YUV frame */
+#define FREENECT_VIDEO_IR_8BIT_SIZE (FREENECT_IR_FRAME_PIX) /**< Size of the 8 bit IR video frame */
+#define FREENECT_VIDEO_IR_10BIT_SIZE (FREENECT_IR_FRAME_PIX*sizeof(uint16_t)) /**< Size of the 10 bit IR video frame */
+#define FREENECT_VIDEO_IR_10BIT_PACKED_SIZE 390400 /**< Size of the packed 10 bit IR video frame */
+
+#define FREENECT_DEPTH_11BIT_SIZE (FREENECT_FRAME_PIX*sizeof(uint16_t)) /**< Size of the 11 bit depth frame */
+#define FREENECT_DEPTH_10BIT_SIZE FREENECT_DEPTH_11BIT_SIZE /**< Size of the 10 bit depth frame */
+#define FREENECT_DEPTH_11BIT_PACKED_SIZE 422400 /**< Size of the packed 11 bit depth frame */
+#define FREENECT_DEPTH_10BIT_PACKED_SIZE 384000 /**< Size of the packed 10 bit depth frame */
+
+#define FREENECT_COUNTS_PER_G 819 /**< Ticks per G for accelerometer as set per http://www.kionix.com/Product%20Sheets/KXSD9%20Product%20Brief.pdf */
+
+/// Enumeration of video frame information states.
+/// See http://openkinect.org/wiki/Protocol_Documentation#RGB_Camera for more information.
+typedef enum {
+ FREENECT_VIDEO_RGB = 0, /**< Decompressed RGB mode (demosaicing done by libfreenect) */
+ FREENECT_VIDEO_BAYER = 1, /**< Bayer compressed mode (raw information from camera) */
+ FREENECT_VIDEO_IR_8BIT = 2, /**< 8-bit IR mode */
+ FREENECT_VIDEO_IR_10BIT = 3, /**< 10-bit IR mode */
+ FREENECT_VIDEO_IR_10BIT_PACKED = 4, /**< 10-bit packed IR mode */
+ FREENECT_VIDEO_YUV_RGB = 5, /**< YUV RGB mode */
+ FREENECT_VIDEO_YUV_RAW = 6, /**< YUV Raw mode */
+} freenect_video_format;
+
+/// Enumeration of LED states
+/// See http://openkinect.org/wiki/Protocol_Documentation#Setting_LED for more information.
+typedef enum {
+ LED_OFF = 0, /**< Turn LED off */
+ LED_GREEN = 1, /**< Turn LED to Green */
+ LED_RED = 2, /**< Turn LED to Red */
+ LED_YELLOW = 3, /**< Turn LED to Yellow */
+ LED_BLINK_GREEN = 4, /**< Make LED blink Green */
+ // 5 is same as 4, LED blink Green
+ LED_BLINK_RED_YELLOW = 6, /**< Make LED blink Red/Yellow */
+} freenect_led_options;
+
+/// Enumeration of depth frame states
+/// See http://openkinect.org/wiki/Protocol_Documentation#RGB_Camera for more information.
+typedef enum {
+ FREENECT_DEPTH_11BIT = 0, /**< 11 bit depth information in one uint16_t/pixel */
+ FREENECT_DEPTH_10BIT = 1, /**< 10 bit depth information in one uint16_t/pixel */
+ FREENECT_DEPTH_11BIT_PACKED = 2, /**< 11 bit packed depth information */
+ FREENECT_DEPTH_10BIT_PACKED = 3, /**< 10 bit packed depth information */
+} freenect_depth_format;
+
+
+/// Enumeration of tilt motor status
+typedef enum {
+ TILT_STATUS_STOPPED = 0x00, /**< Tilt motor is stopped */
+ TILT_STATUS_LIMIT = 0x01, /**< Tilt motor has reached movement limit */
+ TILT_STATUS_MOVING = 0x04, /**< Tilt motor is currently moving to new position */
+} freenect_tilt_status_code;
+
+/// Data from the tilt motor and accelerometer
+typedef struct {
+ int16_t accelerometer_x; /**< Raw accelerometer data for X-axis, see FREENECT_COUNTS_PER_G for conversion */
+ int16_t accelerometer_y; /**< Raw accelerometer data for Y-axis, see FREENECT_COUNTS_PER_G for conversion */
+ int16_t accelerometer_z; /**< Raw accelerometer data for Z-axis, see FREENECT_COUNTS_PER_G for conversion */
+ int8_t tilt_angle; /**< Raw tilt motor angle encoder information */
+ freenect_tilt_status_code tilt_status; /**< State of the tilt motor (stopped, moving, etc...) */
+} freenect_raw_tilt_state;
+
+struct _freenect_context;
+typedef struct _freenect_context freenect_context; /**< Holds information about the usb context. */
+
+struct _freenect_device;
+typedef struct _freenect_device freenect_device; /**< Holds device information. */
+
+// usb backend specific section
+#ifdef _WIN32
+ /* frees Windows users of the burden of specifying the path to <libusb-1.0/libusb.h> */
+ typedef void freenect_usb_context;
+#else
+ #include "libusb-1.0/libusb.h"
+ typedef libusb_context freenect_usb_context; /**< Holds libusb-1.0 specific information */
+#endif
+//
+
+/// If Win32, export all functions for DLL usage
+#ifndef _WIN32
+ #define FREENECTAPI /**< DLLExport information for windows, set to nothing on other platforms */
+#else
+ /**< DLLExport information for windows, set to nothing on other platforms */
+ #ifdef __cplusplus
+ #define FREENECTAPI extern "C" __declspec(dllexport)
+ #else
+ // this is required when building from a Win32 port of gcc without being
+ // forced to compile all of the library files (.c) with g++...
+ #define FREENECTAPI __declspec(dllexport)
+ #endif
+#endif
+
+/// Enumeration of message logging levels
+typedef enum {
+ FREENECT_LOG_FATAL = 0, /**< Log for crashing/non-recoverable errors */
+ FREENECT_LOG_ERROR, /**< Log for major errors */
+ FREENECT_LOG_WARNING, /**< Log for warning messages */
+ FREENECT_LOG_NOTICE, /**< Log for important messages */
+ FREENECT_LOG_INFO, /**< Log for normal messages */
+ FREENECT_LOG_DEBUG, /**< Log for useful development messages */
+ FREENECT_LOG_SPEW, /**< Log for slightly less useful messages */
+ FREENECT_LOG_FLOOD, /**< Log EVERYTHING. May slow performance. */
+} freenect_loglevel;
+
+/**
+ * Initialize a freenect context and do any setup required for
+ * platform specific USB libraries.
+ *
+ * @param ctx Address of pointer to freenect context struct to allocate and initialize
+ * @param usb_ctx USB context to initialize. Can be NULL if not using multiple contexts.
+ *
+ * @return 0 on success, < 0 on error
+ */
+FREENECTAPI int freenect_init(freenect_context **ctx, freenect_usb_context *usb_ctx);
+
+/**
+ * Closes the device if it is open, and frees the context
+ *
+ * @param ctx freenect context to close/free
+ *
+ * @return 0 on success
+ */
+FREENECTAPI int freenect_shutdown(freenect_context *ctx);
+
+/// Typedef for logging callback functions
+typedef void (*freenect_log_cb)(freenect_context *dev, freenect_loglevel level, const char *msg);
+
+/**
+ * Set the log level for the specified freenect context
+ *
+ * @param ctx context to set log level for
+ * @param level log level to use (see freenect_loglevel enum)
+ */
+FREENECTAPI void freenect_set_log_level(freenect_context *ctx, freenect_loglevel level);
+
+/**
+ * Callback for log messages (i.e. for rerouting to a file instead of
+ * stdout)
+ *
+ * @param ctx context to set log callback for
+ * @param cb callback function pointer
+ */
+FREENECTAPI void freenect_set_log_callback(freenect_context *ctx, freenect_log_cb cb);
+
+/**
+ * Calls the platform specific usb event processor
+ *
+ * @param ctx context to process events for
+ *
+ * @return 0 on success, other values on error, platform/library dependant
+ */
+FREENECTAPI int freenect_process_events(freenect_context *ctx);
+
+/**
+ * Return the number of kinect devices currently connected to the
+ * system
+ *
+ * @param ctx Context to access device count through
+ *
+ * @return Number of devices connected, < 0 on error
+ */
+FREENECTAPI int freenect_num_devices(freenect_context *ctx);
+
+/**
+ * Opens a kinect device via a context. Index specifies the index of
+ * the device on the current state of the bus. Bus resets may cause
+ * indexes to shift.
+ *
+ * @param ctx Context to open device through
+ * @param dev Device structure to assign opened device to
+ * @param index Index of the device on the bus
+ *
+ * @return 0 on success, < 0 on error
+ */
+FREENECTAPI int freenect_open_device(freenect_context *ctx, freenect_device **dev, int index);
+
+/**
+ * Closes a device that is currently open
+ *
+ * @param dev Device to close
+ *
+ * @return 0 on success
+ */
+FREENECTAPI int freenect_close_device(freenect_device *dev);
+
+/**
+ * Set the device user data, for passing generic information into
+ * callbacks
+ *
+ * @param dev Device to attach user data to
+ * @param user User data to attach
+ */
+FREENECTAPI void freenect_set_user(freenect_device *dev, void *user);
+
+/**
+ * Retrieve the pointer to user data from the device struct
+ *
+ * @param dev Device from which to get user data
+ *
+ * @return Pointer to user data
+ */
+FREENECTAPI void *freenect_get_user(freenect_device *dev);
+
+/// Typedef for depth image received event callbacks
+typedef void (*freenect_depth_cb)(freenect_device *dev, void *depth, uint32_t timestamp);
+/// Typedef for video image received event callbacks
+typedef void (*freenect_video_cb)(freenect_device *dev, void *video, uint32_t timestamp);
+
+/**
+ * Set callback for depth information received event
+ *
+ * @param dev Device to set callback for
+ * @param cb Function pointer for processing depth information
+ */
+FREENECTAPI void freenect_set_depth_callback(freenect_device *dev, freenect_depth_cb cb);
+
+/**
+ * Set callback for video information received event
+ *
+ * @param dev Device to set callback for
+ * @param cb Function pointer for processing video information
+ */
+FREENECTAPI void freenect_set_video_callback(freenect_device *dev, freenect_video_cb cb);
+
+/**
+ * Set the format for depth information
+ *
+ * @param dev Device to set depth information format for
+ * @param fmt Format of depth information. See freenect_depth_format enum.
+ *
+ * @return 0 on success, < 0 on error
+ */
+FREENECTAPI int freenect_set_depth_format(freenect_device *dev, freenect_depth_format fmt);
+
+/**
+ * Set the format for video information
+ *
+ * @param dev Device to set video information format for
+ * @param fmt Format of video information. See freenect_video_format enum.
+ *
+ * @return 0 on success, < 0 on error
+ */
+FREENECTAPI int freenect_set_video_format(freenect_device *dev, freenect_video_format fmt);
+
+/**
+ * Set the buffer to store depth information to. Size of buffer is
+ * dependant on depth format. See FREENECT_DEPTH_*_SIZE defines for
+ * more information.
+ *
+ * @param dev Device to set depth buffer for.
+ * @param buf Buffer to store depth information to.
+ *
+ * @return 0 on success, < 0 on error
+ */
+FREENECTAPI int freenect_set_depth_buffer(freenect_device *dev, void *buf);
+
+/**
+ * Set the buffer to store depth information to. Size of buffer is
+ * dependant on video format. See FREENECT_VIDEO_*_SIZE defines for
+ * more information.
+ *
+ * @param dev Device to set video buffer for.
+ * @param buf Buffer to store video information to.
+ *
+ * @return 0 on success, < 0 on error
+ */
+FREENECTAPI int freenect_set_video_buffer(freenect_device *dev, void *buf);
+
+/**
+ * Start the depth information stream for a device.
+ *
+ * @param dev Device to start depth information stream for.
+ *
+ * @return 0 on success, < 0 on error
+ */
+FREENECTAPI int freenect_start_depth(freenect_device *dev);
+
+/**
+ * Start the video information stream for a device.
+ *
+ * @param dev Device to start video information stream for.
+ *
+ * @return 0 on success, < 0 on error
+ */
+FREENECTAPI int freenect_start_video(freenect_device *dev);
+
+/**
+ * Stop the depth information stream for a device
+ *
+ * @param dev Device to stop depth information stream on.
+ *
+ * @return 0 on success, < 0 on error
+ */
+FREENECTAPI int freenect_stop_depth(freenect_device *dev);
+
+/**
+ * Stop the video information stream for a device
+ *
+ * @param dev Device to stop video information stream on.
+ *
+ * @return 0 on success, < 0 on error
+ */
+FREENECTAPI int freenect_stop_video(freenect_device *dev);
+
+/**
+ * Updates the accelerometer state using a blocking control message
+ * call.
+ *
+ * @param dev Device to get accelerometer data from
+ *
+ * @return 0 on success, < 0 on error. Accelerometer data stored to
+ * device struct.
+ */
+FREENECTAPI int freenect_update_tilt_state(freenect_device *dev);
+
+/**
+ * Retrieve the tilt state from a device
+ *
+ * @param dev Device to retrieve tilt state from
+ *
+ * @return The tilt state struct of the device
+ */
+FREENECTAPI freenect_raw_tilt_state* freenect_get_tilt_state(freenect_device *dev);
+
+/**
+ * Return the tilt state, in degrees with respect to the horizon
+ *
+ * @param state The tilt state struct from a device
+ *
+ * @return Current degree of tilt of the device
+ */
+FREENECTAPI double freenect_get_tilt_degs(freenect_raw_tilt_state *state);
+
+/**
+ * Set the tilt state of the device, in degrees with respect to the
+ * horizon. Uses blocking control message call to update
+ * device. Function return does not reflect state of device, device
+ * may still be moving to new position after the function returns. Use
+ * freenect_get_tilt_status() to find current movement state.
+ *
+ * @param dev Device to set tilt state
+ * @param angle Angle the device should tilt to
+ *
+ * @return 0 on success, < 0 on error.
+ */
+FREENECTAPI int freenect_set_tilt_degs(freenect_device *dev, double angle);
+
+/**
+ * Return the movement state of the tilt motor (moving, stopped, etc...)
+ *
+ * @param state Raw state struct to get the tilt status code from
+ *
+ * @return Status code of the tilt device. See
+ * freenect_tilt_status_code enum for more info.
+ */
+FREENECTAPI freenect_tilt_status_code freenect_get_tilt_status(freenect_raw_tilt_state *state);
+
+/**
+ * Set the state of the LED. Uses blocking control message call to
+ * update device.
+ *
+ * @param dev Device to set the LED state
+ * @param option LED state to set on device. See freenect_led_options enum.
+ *
+ * @return 0 on success, < 0 on error
+ */
+FREENECTAPI int freenect_set_led(freenect_device *dev, freenect_led_options option);
+
+/**
+ * Get the axis-based gravity adjusted accelerometer state, as laid
+ * out via the accelerometer data sheet, which is available at
+ *
+ * http://www.kionix.com/Product%20Sheets/KXSD9%20Product%20Brief.pdf
+ *
+ * @param state State to extract accelerometer data from
+ * @param x Stores X-axis accelerometer state
+ * @param y Stores Y-axis accelerometer state
+ * @param z Stores Z-axis accelerometer state
+ */
+FREENECTAPI void freenect_get_mks_accel(freenect_raw_tilt_state *state, double* x, double* y, double* z);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //
+
View
108 webkit-plugin-mac/include/libfreenect/libfreenect_sync.h
@@ -0,0 +1,108 @@
+/*
+ * This file is part of the OpenKinect Project. http://www.openkinect.org
+ *
+ * Copyright (c) 2010 Brandyn White (bwhite@dappervision.com)
+ * Andrew Miller (amiller@dappervision.com)
+ *
+ * This code is licensed to you under the terms of the Apache License, version
+ * 2.0, or, at your option, the terms of the GNU General Public License,
+ * version 2.0. See the APACHE20 and GPL2 files for the text of the licenses,
+ * or the following URLs:
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.gnu.org/licenses/gpl-2.0.txt
+ *
+ * If you redistribute this file in source form, modified or unmodified, you
+ * may:
+ * 1) Leave this header intact and distribute it under the same terms,
+ * accompanying it with the APACHE20 and GPL20 files, or
+ * 2) Delete the Apache 2.0 clause and accompany it with the GPL2 file, or
+ * 3) Delete the GPL v2 clause and accompany it with the APACHE20 file
+ * In all cases you must keep the copyright notice intact and include a copy
+ * of the CONTRIB file.
+ *
+ * Binary distributions must follow the binary distribution requirements of
+ * either License.
+ */
+
+#ifndef FREENECT_SYNC_H
+#define FREENECT_SYNC_H
+#include <libfreenect.h>
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int freenect_sync_get_video(void **video, uint32_t *timestamp, int index, freenect_video_format fmt);
+/* Synchronous video function, starts the runloop if it isn't running
+
+ The returned buffer is valid until this function is called again, after which the buffer must not
+ be used again. Make a copy if the data is required.
+
+ Args:
+ video: Populated with a pointer to a video buffer with a size of the requested type
+ timestamp: Populated with the associated timestamp
+ index: Device index (0 is the first)
+ fmt: Valid format
+
+ Returns:
+ Nonzero on error.
+*/
+
+
+int freenect_sync_get_depth(void **depth, uint32_t *timestamp, int index, freenect_depth_format fmt);
+/* Synchronous depth function, starts the runloop if it isn't running
+
+ The returned buffer is valid until this function is called again, after which the buffer must not
+ be used again. Make a copy if the data is required.
+
+ Args:
+ depth: Populated with a pointer to a depth buffer with a size of the requested type
+ timestamp: Populated with the associated timestamp
+ index: Device index (0 is the first)
+ fmt: Valid format
+
+ Returns:
+ Nonzero on error.
+*/
+
+int freenect_sync_set_tilt_degs(int angle, int index);
+/* Tilt function, starts the runloop if it isn't running
+
+ Args:
+ angle: Set the angle to tilt the device
+ index: Device index (0 is the first)
+
+ Returns:
+ Nonzero on error.
+*/
+
+int freenect_sync_get_tilt_state(freenect_raw_tilt_state **state, int index);
+/* Tilt state function, starts the runloop if it isn't running
+
+ Args:
+ state: Populated with an updated tilt state pointer
+ index: Device index (0 is the first)
+
+ Returns:
+ Nonzero on error.
+*/
+
+int freenect_sync_set_led(freenect_led_options led, int index);
+/* Led function, starts the runloop if it isn't running
+
+ Args:
+ led: The LED state to set the device to
+ index: Device index (0 is the first)
+
+ Returns:
+ Nonzero on error.
+*/
+
+
+void freenect_sync_stop(void);
+#ifdef __cplusplus
+}
+#endif
+
+#endif
View
1,322 webkit-plugin-mac/include/libusb-1.0/libusb.h
@@ -0,0 +1,1322 @@
+/*
+ * Public libusb header file
+ * Copyright (C) 2007-2008 Daniel Drake <dsd@gentoo.org>
+ * Copyright (c) 2001 Johannes Erdfelt <johannes@erdfelt.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __LIBUSB_H__
+#define __LIBUSB_H__
+
+/* MSVC doesn't like inline, but does accept __inline ?? */
+#ifdef _MSC_VER
+#define inline __inline
+#endif
+
+#include <stdint.h>
+#include <sys/types.h>
+#include <time.h>
+#include <limits.h>
+
+#if defined(__linux) || defined(__APPLE__) || defined(__CYGWIN__)
+#include <sys/time.h>
+#endif
+
+/* 'interface' might be defined as a macro on Windows, so we need to
+ * undefine it so as not to break the current libusb API, because
+ * libusb_config_descriptor has an 'interface' member
+ * As this can be problematic if you include windows.h after libusb.h
+ * in your sources, we force windows.h to be included first. */
+#if defined(_WIN32) || defined(__CYGWIN__)
+#include <windows.h>
+#if defined(interface)
+#undef interface
+#endif
+#endif
+
+/** \def LIBUSB_CALL
+ * \ingroup misc
+ * libusb's Windows calling convention.
+ *
+ * Under Windows, the selection of available compilers and configurations
+ * means that, unlike other platforms, there is not <em>one true calling
+ * convention</em> (calling convention: the manner in which parameters are
+ * passed to funcions in the generated assembly code).
+ *
+ * Matching the Windows API itself, libusb uses the WINAPI convention (which
+ * translates to the <tt>stdcall</tt> convention) and guarantees that the
+ * library is compiled in this way. The public header file also includes
+ * appropriate annotations so that your own software will use the right
+ * convention, even if another convention is being used by default within
+ * your codebase.
+ *
+ * The one consideration that you must apply in your software is to mark
+ * all functions which you use as libusb callbacks with this LIBUSB_CALL
+ * annotation, so that they too get compiled for the correct calling
+ * convention.
+ *
+ * On non-Windows operating systems, this macro is defined as nothing. This
+ * means that you can apply it to your code without worrying about
+ * cross-platform compatibility.
+ */
+/* LIBUSB_CALL must be defined on both definition and declaration of libusb
+ * functions. You'd think that declaration would be enough, but cygwin will
+ * complain about conflicting types unless both are marked this way.
+ * The placement of this macro is important too; it must appear after the
+ * return type, before the function name. See internal documentation for
+ * API_EXPORTED.
+ */
+#if defined(_WIN32) || defined(__CYGWIN__)
+#define LIBUSB_CALL WINAPI
+#else
+#define LIBUSB_CALL
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** \def libusb_cpu_to_le16
+ * \ingroup misc
+ * Convert a 16-bit value from host-endian to little-endian format. On
+ * little endian systems, this function does nothing. On big endian systems,
+ * the bytes are swapped.
+ * \param x the host-endian value to convert
+ * \returns the value in little-endian byte order
+ */
+static inline uint16_t libusb_cpu_to_le16(const uint16_t x)
+{
+ union {
+ uint8_t b8[2];
+ uint16_t b16;
+ } _tmp;
+ _tmp.b8[1] = x >> 8;
+ _tmp.b8[0] = x & 0xff;
+ return _tmp.b16;
+}
+
+/** \def libusb_le16_to_cpu
+ * \ingroup misc
+ * Convert a 16-bit value from little-endian to host-endian format. On
+ * little endian systems, this function does nothing. On big endian systems,
+ * the bytes are swapped.
+ * \param x the little-endian value to convert
+ * \returns the value in host-endian byte order
+ */
+#define libusb_le16_to_cpu libusb_cpu_to_le16
+
+/* standard USB stuff */
+
+/** \ingroup desc
+ * Device and/or Interface Class codes */
+enum libusb_class_code {
+ /** In the context of a \ref libusb_device_descriptor "device descriptor",
+ * this bDeviceClass value indicates that each interface specifies its
+ * own class information and all interfaces operate independently.
+ */
+ LIBUSB_CLASS_PER_INTERFACE = 0,
+
+ /** Audio class */
+ LIBUSB_CLASS_AUDIO = 1,
+
+ /** Communications class */
+ LIBUSB_CLASS_COMM = 2,
+
+ /** Human Interface Device class */
+ LIBUSB_CLASS_HID = 3,
+
+ /** Printer dclass */
+ LIBUSB_CLASS_PRINTER = 7,
+
+ /** Picture transfer protocol class */
+ LIBUSB_CLASS_PTP = 6,
+
+ /** Mass storage class */
+ LIBUSB_CLASS_MASS_STORAGE = 8,
+
+ /** Hub class */
+ LIBUSB_CLASS_HUB = 9,
+
+ /** Data class */
+ LIBUSB_CLASS_DATA = 10,
+
+ /** Wireless class */
+ LIBUSB_CLASS_WIRELESS = 0xe0,
+
+ /** Application class */
+ LIBUSB_CLASS_APPLICATION = 0xfe,
+
+ /** Class is vendor-specific */
+ LIBUSB_CLASS_VENDOR_SPEC = 0xff
+};
+
+/** \ingroup desc
+ * Descriptor types as defined by the USB specification. */
+enum libusb_descriptor_type {
+ /** Device descriptor. See libusb_device_descriptor. */
+ LIBUSB_DT_DEVICE = 0x01,
+
+ /** Configuration descriptor. See libusb_config_descriptor. */
+ LIBUSB_DT_CONFIG = 0x02,
+
+ /** String descriptor */
+ LIBUSB_DT_STRING = 0x03,
+
+ /** Interface descriptor. See libusb_interface_descriptor. */
+ LIBUSB_DT_INTERFACE = 0x04,
+
+ /** Endpoint descriptor. See libusb_endpoint_descriptor. */
+ LIBUSB_DT_ENDPOINT = 0x05,
+
+ /** HID descriptor */
+ LIBUSB_DT_HID = 0x21,
+
+ /** HID report descriptor */
+ LIBUSB_DT_REPORT = 0x22,
+
+ /** Physical descriptor */
+ LIBUSB_DT_PHYSICAL = 0x23,
+
+ /** Hub descriptor */
+ LIBUSB_DT_HUB = 0x29
+};
+
+/* Descriptor sizes per descriptor type */
+#define LIBUSB_DT_DEVICE_SIZE 18
+#define LIBUSB_DT_CONFIG_SIZE 9
+#define LIBUSB_DT_INTERFACE_SIZE 9
+#define LIBUSB_DT_ENDPOINT_SIZE 7
+#define LIBUSB_DT_ENDPOINT_AUDIO_SIZE 9 /* Audio extension */
+#define LIBUSB_DT_HUB_NONVAR_SIZE 7
+
+#define LIBUSB_ENDPOINT_ADDRESS_MASK 0x0f /* in bEndpointAddress */
+#define LIBUSB_ENDPOINT_DIR_MASK 0x80
+
+/** \ingroup desc
+ * Endpoint direction. Values for bit 7 of the
+ * \ref libusb_endpoint_descriptor::bEndpointAddress "endpoint address" scheme.
+ */
+enum libusb_endpoint_direction {
+ /** In: device-to-host */
+ LIBUSB_ENDPOINT_IN = 0x80,
+
+ /** Out: host-to-device */
+ LIBUSB_ENDPOINT_OUT = 0x00
+};
+
+#define LIBUSB_TRANSFER_TYPE_MASK 0x03 /* in bmAttributes */
+
+/** \ingroup desc
+ * Endpoint transfer type. Values for bits 0:1 of the
+ * \ref libusb_endpoint_descriptor::bmAttributes "endpoint attributes" field.
+ */
+enum libusb_transfer_type {
+ /** Control endpoint */
+ LIBUSB_TRANSFER_TYPE_CONTROL = 0,
+
+ /** Isochronous endpoint */
+ LIBUSB_TRANSFER_TYPE_ISOCHRONOUS = 1,
+
+ /** Bulk endpoint */
+ LIBUSB_TRANSFER_TYPE_BULK = 2,
+
+ /** Interrupt endpoint */
+ LIBUSB_TRANSFER_TYPE_INTERRUPT = 3
+};
+
+/** \ingroup misc
+ * Standard requests, as defined in table 9-3 of the USB2 specifications */
+enum libusb_standard_request {
+ /** Request status of the specific recipient */
+ LIBUSB_REQUEST_GET_STATUS = 0x00,
+
+ /** Clear or disable a specific feature */
+ LIBUSB_REQUEST_CLEAR_FEATURE = 0x01,
+
+ /* 0x02 is reserved */
+
+ /** Set or enable a specific feature */
+ LIBUSB_REQUEST_SET_FEATURE = 0x03,
+
+ /* 0x04 is reserved */
+
+ /** Set device address for all future accesses */
+ LIBUSB_REQUEST_SET_ADDRESS = 0x05,
+
+ /** Get the specified descriptor */
+ LIBUSB_REQUEST_GET_DESCRIPTOR = 0x06,
+
+ /** Used to update existing descriptors or add new descriptors */
+ LIBUSB_REQUEST_SET_DESCRIPTOR = 0x07,
+
+ /** Get the current device configuration value */
+ LIBUSB_REQUEST_GET_CONFIGURATION = 0x08,
+
+ /** Set device configuration */
+ LIBUSB_REQUEST_SET_CONFIGURATION = 0x09,
+
+ /** Return the selected alternate setting for the specified interface */
+ LIBUSB_REQUEST_GET_INTERFACE = 0x0A,
+
+ /** Select an alternate interface for the specified interface */
+ LIBUSB_REQUEST_SET_INTERFACE = 0x0B,
+
+ /** Set then report an endpoint's synchronization frame */
+ LIBUSB_REQUEST_SYNCH_FRAME = 0x0C
+};
+
+/** \ingroup misc
+ * Request type bits of the
+ * \ref libusb_control_setup::bmRequestType "bmRequestType" field in control
+ * transfers. */
+enum libusb_request_type {
+ /** Standard */
+ LIBUSB_REQUEST_TYPE_STANDARD = (0x00 << 5),
+
+ /** Class */
+ LIBUSB_REQUEST_TYPE_CLASS = (0x01 << 5),
+
+ /** Vendor */
+ LIBUSB_REQUEST_TYPE_VENDOR = (0x02 << 5),
+
+ /** Reserved */
+ LIBUSB_REQUEST_TYPE_RESERVED = (0x03 << 5)
+};
+
+/** \ingroup misc
+ * Recipient bits of the
+ * \ref libusb_control_setup::bmRequestType "bmRequestType" field in control
+ * transfers. Values 4 through 31 are reserved. */
+enum libusb_request_recipient {
+ /** Device */
+ LIBUSB_RECIPIENT_DEVICE = 0x00,
+
+ /** Interface */
+ LIBUSB_RECIPIENT_INTERFACE = 0x01,
+
+ /** Endpoint */
+ LIBUSB_RECIPIENT_ENDPOINT = 0x02,
+
+ /** Other */
+ LIBUSB_RECIPIENT_OTHER = 0x03
+};
+
+#define LIBUSB_ISO_SYNC_TYPE_MASK 0x0C
+
+/** \ingroup desc
+ * Synchronization type for isochronous endpoints. Values for bits 2:3 of the
+ * \ref libusb_endpoint_descriptor::bmAttributes "bmAttributes" field in
+ * libusb_endpoint_descriptor.
+ */
+enum libusb_iso_sync_type {
+ /** No synchronization */
+ LIBUSB_ISO_SYNC_TYPE_NONE = 0,
+
+ /** Asynchronous */
+ LIBUSB_ISO_SYNC_TYPE_ASYNC = 1,
+
+ /** Adaptive */
+ LIBUSB_ISO_SYNC_TYPE_ADAPTIVE = 2,
+
+ /** Synchronous */
+ LIBUSB_ISO_SYNC_TYPE_SYNC = 3
+};
+
+#define LIBUSB_ISO_USAGE_TYPE_MASK 0x30
+
+/** \ingroup desc
+ * Usage type for isochronous endpoints. Values for bits 4:5 of the
+ * \ref libusb_endpoint_descriptor::bmAttributes "bmAttributes" field in
+ * libusb_endpoint_descriptor.
+ */
+enum libusb_iso_usage_type {
+ /** Data endpoint */
+ LIBUSB_ISO_USAGE_TYPE_DATA = 0,
+
+ /** Feedback endpoint */
+ LIBUSB_ISO_USAGE_TYPE_FEEDBACK = 1,
+
+ /** Implicit feedback Data endpoint */
+ LIBUSB_ISO_USAGE_TYPE_IMPLICIT = 2
+};
+
+/** \ingroup desc
+ * A structure representing the standard USB device descriptor. This
+ * descriptor is documented in section 9.6.1 of the USB 2.0 specification.
+ * All multiple-byte fields are represented in host-endian format.
+ */
+struct libusb_device_descriptor {
+ /** Size of this descriptor (in bytes) */
+ uint8_t bLength;
+
+ /** Descriptor type. Will have value
+ * \ref libusb_descriptor_type::LIBUSB_DT_DEVICE LIBUSB_DT_DEVICE in this
+ * context. */
+ uint8_t bDescriptorType;
+
+ /** USB specification release number in binary-coded decimal. A value of
+ * 0x0200 indicates USB 2.0, 0x0110 indicates USB 1.1, etc. */
+ uint16_t bcdUSB;
+
+ /** USB-IF class code for the device. See \ref libusb_class_code. */
+ uint8_t bDeviceClass;
+
+ /** USB-IF subclass code for the device, qualified by the bDeviceClass
+ * value */
+ uint8_t bDeviceSubClass;
+
+ /** USB-IF protocol code for the device, qualified by the bDeviceClass and
+ * bDeviceSubClass values */
+ uint8_t bDeviceProtocol;
+
+ /** Maximum packet size for endpoint 0 */
+ uint8_t bMaxPacketSize0;
+
+ /** USB-IF vendor ID */
+ uint16_t idVendor;
+
+ /** USB-IF product ID */
+ uint16_t idProduct;
+
+ /** Device release number in binary-coded decimal */
+ uint16_t bcdDevice;
+
+ /** Index of string descriptor describing manufacturer */
+ uint8_t iManufacturer;
+
+ /** Index of string descriptor describing product */
+ uint8_t iProduct;
+
+ /** Index of string descriptor containing device serial number */
+ uint8_t iSerialNumber;
+
+ /** Number of possible configurations */
+ uint8_t bNumConfigurations;
+};
+
+/** \ingroup desc
+ * A structure representing the standard USB endpoint descriptor. This
+ * descriptor is documented in section 9.6.3 of the USB 2.0 specification.
+ * All multiple-byte fields are represented in host-endian format.
+ */
+struct libusb_endpoint_descriptor {
+ /** Size of this descriptor (in bytes) */
+ uint8_t bLength;
+
+ /** Descriptor type. Will have value
+ * \ref libusb_descriptor_type::LIBUSB_DT_ENDPOINT LIBUSB_DT_ENDPOINT in
+ * this context. */
+ uint8_t bDescriptorType;
+
+ /** The address of the endpoint described by this descriptor. Bits 0:3 are
+ * the endpoint number. Bits 4:6 are reserved. Bit 7 indicates direction,
+ * see \ref libusb_endpoint_direction.
+ */
+ uint8_t bEndpointAddress;
+
+ /** Attributes which apply to the endpoint when it is configured using
+ * the bConfigurationValue. Bits 0:1 determine the transfer type and
+ * correspond to \ref libusb_transfer_type. Bits 2:3 are only used for
+ * isochronous endpoints and correspond to \ref libusb_iso_sync_type.
+ * Bits 4:5 are also only used for isochronous endpoints and correspond to
+ * \ref libusb_iso_usage_type. Bits 6:7 are reserved.
+ */
+ uint8_t bmAttributes;
+
+ /** Maximum packet size this endpoint is capable of sending/receiving. */
+ uint16_t wMaxPacketSize;
+
+ /** Interval for polling endpoint for data transfers. */
+ uint8_t bInterval;
+
+ /** For audio devices only: the rate at which synchronization feedback
+ * is provided. */
+ uint8_t bRefresh;
+
+ /** For audio devices only: the address if the synch endpoint */
+ uint8_t bSynchAddress;
+
+ /** Extra descriptors. If libusb encounters unknown endpoint descriptors,
+ * it will store them here, should you wish to parse them. */
+ const unsigned char *extra;
+
+ /** Length of the extra descriptors, in bytes. */
+ int extra_length;
+};
+
+/** \ingroup desc
+ * A structure representing the standard USB interface descriptor. This
+ * descriptor is documented in section 9.6.5 of the USB 2.0 specification.
+ * All multiple-byte fields are represented in host-endian format.
+ */
+struct libusb_interface_descriptor {
+ /** Size of this descriptor (in bytes) */
+ uint8_t bLength;
+
+ /** Descriptor type. Will have value
+ * \ref libusb_descriptor_type::LIBUSB_DT_INTERFACE LIBUSB_DT_INTERFACE
+ * in this context. */
+ uint8_t bDescriptorType;
+
+ /** Number of this interface */
+ uint8_t bInterfaceNumber;
+
+ /** Value used to select this alternate setting for this interface */
+ uint8_t bAlternateSetting;
+
+ /** Number of endpoints used by this interface (excluding the control
+ * endpoint). */
+ uint8_t bNumEndpoints;
+
+ /** USB-IF class code for this interface. See \ref libusb_class_code. */
+ uint8_t bInterfaceClass;
+
+ /** USB-IF subclass code for this interface, qualified by the
+ * bInterfaceClass value */
+ uint8_t bInterfaceSubClass;
+
+ /** USB-IF protocol code for this interface, qualified by the
+ * bInterfaceClass and bInterfaceSubClass values */
+ uint8_t bInterfaceProtocol;
+
+ /** Index of string descriptor describing this interface */
+ uint8_t iInterface;
+
+ /** Array of endpoint descriptors. This length of this array is determined
+ * by the bNumEndpoints field. */
+ const struct libusb_endpoint_descriptor *endpoint;
+
+ /** Extra descriptors. If libusb encounters unknown interface descriptors,
+ * it will store them here, should you wish to parse them. */
+ const unsigned char *extra;
+
+ /** Length of the extra descriptors, in bytes. */
+ int extra_length;
+};
+
+/** \ingroup desc
+ * A collection of alternate settings for a particular USB interface.
+ */
+struct libusb_interface {
+ /** Array of interface descriptors. The length of this array is determined
+ * by the num_altsetting field. */
+ const struct libusb_interface_descriptor *altsetting;
+
+ /** The number of alternate settings that belong to this interface */
+ int num_altsetting;
+};
+
+/** \ingroup desc
+ * A structure representing the standard USB configuration descriptor. This
+ * descriptor is documented in section 9.6.3 of the USB 2.0 specification.
+ * All multiple-byte fields are represented in host-endian format.
+ */
+struct libusb_config_descriptor {
+ /** Size of this descriptor (in bytes) */
+ uint8_t bLength;
+
+ /** Descriptor type. Will have value
+ * \ref libusb_descriptor_type::LIBUSB_DT_CONFIG LIBUSB_DT_CONFIG
+ * in this context. */
+ uint8_t bDescriptorType;
+
+ /** Total length of data returned for this configuration */
+ uint16_t wTotalLength;
+
+ /** Number of interfaces supported by this configuration */
+ uint8_t bNumInterfaces;
+
+ /** Identifier value for this configuration */
+ uint8_t bConfigurationValue;
+
+ /** Index of string descriptor describing this configuration */
+ uint8_t iConfiguration;
+
+ /** Configuration characteristics */
+ uint8_t bmAttributes;
+
+ /** Maximum power consumption of the USB device from this bus in this
+ * configuration when the device is fully opreation. Expressed in units
+ * of 2 mA. */
+ uint8_t MaxPower;
+
+ /** Array of interfaces supported by this configuration. The length of
+ * this array is determined by the bNumInterfaces field. */
+ const struct libusb_interface *interface;
+
+ /** Extra descriptors. If libusb encounters unknown configuration
+ * descriptors, it will store them here, should you wish to parse them. */
+ const unsigned char *extra;
+
+ /** Length of the extra descriptors, in bytes. */
+ int extra_length;
+};
+
+/** \ingroup asyncio
+ * Setup packet for control transfers. */
+struct libusb_control_setup {
+ /** Request type. Bits 0:4 determine recipient, see
+ * \ref libusb_request_recipient. Bits 5:6 determine type, see
+ * \ref libusb_request_type. Bit 7 determines data transfer direction, see
+ * \ref libusb_endpoint_direction.
+ */
+ uint8_t bmRequestType;
+
+ /** Request. If the type bits of bmRequestType are equal to
+ * \ref libusb_request_type::LIBUSB_REQUEST_TYPE_STANDARD
+ * "LIBUSB_REQUEST_TYPE_STANDARD" then this field refers to
+ * \ref libusb_standard_request. For other cases, use of this field is
+ * application-specific. */
+ uint8_t bRequest;
+
+ /** Value. Varies according to request */
+ uint16_t wValue;
+
+ /** Index. Varies according to request, typically used to pass an index
+ * or offset */
+ uint16_t wIndex;
+
+ /** Number of bytes to transfer */
+ uint16_t wLength;
+};
+
+#define LIBUSB_CONTROL_SETUP_SIZE (sizeof(struct libusb_control_setup))
+
+/* libusb */
+
+struct libusb_context;
+struct libusb_device;
+struct libusb_device_handle;
+
+/** \ingroup lib
+ * Structure representing a libusb session. The concept of individual libusb
+ * sessions allows for your program to use two libraries (or dynamically
+ * load two modules) which both independently use libusb. This will prevent
+ * interference between the individual libusb users - for example
+ * libusb_set_debug() will not affect the other user of the library, and
+ * libusb_exit() will not destroy resources that the other user is still
+ * using.
+ *
+ * Sessions are created by libusb_init() and destroyed through libusb_exit().
+ * If your application is guaranteed to only ever include a single libusb
+ * user (i.e. you), you do not have to worry about contexts: pass NULL in
+ * every function call where a context is required. The default context
+ * will be used.
+ *
+ * For more information, see \ref contexts.
+ */
+typedef struct libusb_context libusb_context;
+
+/** \ingroup dev
+ * Structure representing a USB device detected on the system. This is an
+ * opaque type for which you are only ever provided with a pointer, usually
+ * originating from libusb_get_device_list().
+ *
+ * Certain operations can be performed on a device, but in order to do any
+ * I/O you will have to first obtain a device handle using libusb_open().
+ *
+ * Devices are reference counted with libusb_device_ref() and
+ * libusb_device_unref(), and are freed when the reference count reaches 0.
+ * New devices presented by libusb_get_device_list() have a reference count of
+ * 1, and libusb_free_device_list() can optionally decrease the reference count
+ * on all devices in the list. libusb_open() adds another reference which is
+ * later destroyed by libusb_close().
+ */
+typedef struct libusb_device libusb_device;
+
+
+/** \ingroup dev
+ * Structure representing a handle on a USB device. This is an opaque type for
+ * which you are only ever provided with a pointer, usually originating from
+ * libusb_open().
+ *
+ * A device handle is used to perform I/O and other operations. When finished
+ * with a device handle, you should call libusb_close().
+ */
+typedef struct libusb_device_handle libusb_device_handle;
+
+/** \ingroup misc
+ * Error codes. Most libusb functions return 0 on success or one of these
+ * codes on failure.
+ * You can use libusb_strerror() to retrieve a short string description of
+ * a libusb_error enumeration value.
+ */
+enum libusb_error {
+ /** Success (no error) */
+ LIBUSB_SUCCESS = 0,
+
+ /** Input/output error */
+ LIBUSB_ERROR_IO = -1,
+
+ /** Invalid parameter */
+ LIBUSB_ERROR_INVALID_PARAM = -2,
+
+ /** Access denied (insufficient permissions) */
+ LIBUSB_ERROR_ACCESS = -3,
+
+ /** No such device (it may have been disconnected) */
+ LIBUSB_ERROR_NO_DEVICE = -4,
+
+ /** Entity not found */
+ LIBUSB_ERROR_NOT_FOUND = -5,
+
+ /** Resource busy */
+ LIBUSB_ERROR_BUSY = -6,
+
+ /** Operation timed out */
+ LIBUSB_ERROR_TIMEOUT = -7,
+
+ /** Overflow */
+ LIBUSB_ERROR_OVERFLOW = -8,
+
+ /** Pipe error */
+ LIBUSB_ERROR_PIPE = -9,
+
+ /** System call interrupted (perhaps due to signal) */
+ LIBUSB_ERROR_INTERRUPTED = -10,
+
+ /** Insufficient memory */
+ LIBUSB_ERROR_NO_MEM = -11,
+
+ /** Operation not supported or unimplemented on this platform */
+ LIBUSB_ERROR_NOT_SUPPORTED = -12,
+
+ /** Other error */
+ LIBUSB_ERROR_OTHER = -99
+
+ /* IMPORTANT: when adding new values to this enum, remember to
+ update the libusb_strerror() function implementation! */
+};
+
+/** \ingroup asyncio
+ * Transfer status codes */
+enum libusb_transfer_status {
+ /** Transfer completed without error. Note that this does not indicate
+ * that the entire amount of requested data was transferred. */
+ LIBUSB_TRANSFER_COMPLETED,
+
+ /** Transfer failed */
+ LIBUSB_TRANSFER_ERROR,
+
+ /** Transfer timed out */
+ LIBUSB_TRANSFER_TIMED_OUT,
+
+ /** Transfer was cancelled */
+ LIBUSB_TRANSFER_CANCELLED,
+
+ /** For bulk/interrupt endpoints: halt condition detected (endpoint
+ * stalled). For control endpoints: control request not supported. */
+ LIBUSB_TRANSFER_STALL,
+
+ /** Device was disconnected */
+ LIBUSB_TRANSFER_NO_DEVICE,
+
+ /** Device sent more data than requested */
+ LIBUSB_TRANSFER_OVERFLOW
+};
+
+/** \ingroup asyncio
+ * libusb_transfer.flags values */
+enum libusb_transfer_flags {
+ /** Report short frames as errors */
+ LIBUSB_TRANSFER_SHORT_NOT_OK = 1<<0,
+
+ /** Automatically free() transfer buffer during libusb_free_transfer() */
+ LIBUSB_TRANSFER_FREE_BUFFER = 1<<1,
+
+ /** Automatically call libusb_free_transfer() after callback returns.
+ * If this flag is set, it is illegal to call libusb_free_transfer()
+ * from your transfer callback, as this will result in a double-free
+ * when this flag is acted upon. */
+ LIBUSB_TRANSFER_FREE_TRANSFER = 1<<2
+};
+
+/** \ingroup asyncio
+ * Isochronous packet descriptor. */
+struct libusb_iso_packet_descriptor {
+ /** Length of data to request in this packet */
+ unsigned int length;
+
+ /** Amount of data that was actually transferred */
+ unsigned int actual_length;
+
+ /** Status code for this packet */
+ enum libusb_transfer_status status;
+};
+
+struct libusb_transfer;
+
+/** \ingroup asyncio
+ * Asynchronous transfer callback function type. When submitting asynchronous
+ * transfers, you pass a pointer to a callback function of this type via the
+ * \ref libusb_transfer::callback "callback" member of the libusb_transfer
+ * structure. libusb will call this function later, when the transfer has
+ * completed or failed. See \ref asyncio for more information.
+ * \param transfer The libusb_transfer struct the callback function is being
+ * notified about.
+ */
+typedef void (LIBUSB_CALL *libusb_transfer_cb_fn)(struct libusb_transfer *transfer);
+
+/** \ingroup asyncio
+ * The generic USB transfer structure. The user populates this structure and
+ * then submits it in order to request a transfer. After the transfer has
+ * completed, the library populates the transfer with the results and passes
+ * it back to the user.
+ */
+struct libusb_transfer {
+ /** Handle of the device that this transfer will be submitted to */
+ libusb_device_handle *dev_handle;
+
+ /** A bitwise OR combination of \ref libusb_transfer_flags. */
+ uint8_t flags;
+
+ /** Address of the endpoint where this transfer will be sent. */
+ unsigned char endpoint;
+
+ /** Type of the endpoint from \ref libusb_transfer_type */
+ unsigned char type;
+
+ /** Timeout for this transfer in millseconds. A value of 0 indicates no
+ * timeout. */
+ unsigned int timeout;
+
+ /** The status of the transfer. Read-only, and only for use within
+ * transfer callback function.
+ *
+ * If this is an isochronous transfer, this field may read COMPLETED even
+ * if there were errors in the frames. Use the
+ * \ref libusb_iso_packet_descriptor::status "status" field in each packet
+ * to determine if errors occurred. */
+ enum libusb_transfer_status status;
+
+ /** Length of the data buffer */
+ int length;
+
+ /** Actual length of data that was transferred. Read-only, and only for
+ * use within transfer callback function. Not valid for isochronous
+ * endpoint transfers. */
+ int actual_length;
+
+ /** Callback function. This will be invoked when the transfer completes,
+ * fails, or is cancelled. */
+ libusb_transfer_cb_fn callback;
+
+ /** User context data to pass to the callback function. */
+ void *user_data;
+
+ /** Data buffer */
+ unsigned char *buffer;
+
+ /** Number of isochronous packets. Only used for I/O with isochronous
+ * endpoints. */
+ int num_iso_packets;
+
+ /** Isochronous packet descriptors, for isochronous transfers only. */
+ struct libusb_iso_packet_descriptor iso_packet_desc
+#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
+ [] /* valid C99 code */
+#else
+ [0] /* non-standard, but usually working code */
+#endif
+ ;
+};
+
+int LIBUSB_CALL libusb_init(libusb_context **ctx);
+void LIBUSB_CALL libusb_exit(libusb_context *ctx);
+void LIBUSB_CALL libusb_set_debug(libusb_context *ctx, int level);
+const char * LIBUSB_CALL libusb_strerror(enum libusb_error errcode);
+
+ssize_t LIBUSB_CALL libusb_get_device_list(libusb_context *ctx,
+ libusb_device ***list);
+void LIBUSB_CALL libusb_free_device_list(libusb_device **list,
+ int unref_devices);
+libusb_device * LIBUSB_CALL libusb_ref_device(libusb_device *dev);
+void LIBUSB_CALL libusb_unref_device(libusb_device *dev);
+
+int LIBUSB_CALL libusb_get_configuration(libusb_device_handle *dev,
+ int *config);
+int LIBUSB_CALL libusb_get_device_descriptor(libusb_device *dev,
+ struct libusb_device_descriptor *desc);
+int LIBUSB_CALL libusb_get_active_config_descriptor(libusb_device *dev,
+ struct libusb_config_descriptor **config);
+int LIBUSB_CALL libusb_get_config_descriptor(libusb_device *dev,
+ uint8_t config_index, struct libusb_config_descriptor **config);
+int LIBUSB_CALL libusb_get_config_descriptor_by_value(libusb_device *dev,
+ uint8_t bConfigurationValue, struct libusb_config_descriptor **config);
+void LIBUSB_CALL libusb_free_config_descriptor(
+ struct libusb_config_descriptor *config);
+uint8_t LIBUSB_CALL libusb_get_bus_number(libusb_device *dev);
+uint8_t LIBUSB_CALL libusb_get_device_address(libusb_device *dev);
+int LIBUSB_CALL libusb_get_max_packet_size(libusb_device *dev,
+ unsigned char endpoint);
+int LIBUSB_CALL libusb_get_max_iso_packet_size(libusb_device *dev,
+ unsigned char endpoint);
+
+int LIBUSB_CALL libusb_open(libusb_device *dev, libusb_device_handle **handle);
+void LIBUSB_CALL libusb_close(libusb_device_handle *dev_handle);
+libusb_device * LIBUSB_CALL libusb_get_device(libusb_device_handle *dev_handle);
+
+int LIBUSB_CALL libusb_set_configuration(libusb_device_handle *dev,
+ int configuration);
+int LIBUSB_CALL libusb_claim_interface(libusb_device_handle *dev,
+ int interface_number);
+int LIBUSB_CALL libusb_release_interface(libusb_device_handle *dev,
+ int interface_number);
+
+libusb_device_handle * LIBUSB_CALL libusb_open_device_with_vid_pid(
+ libusb_context *ctx, uint16_t vendor_id, uint16_t product_id);
+
+int LIBUSB_CALL libusb_set_interface_alt_setting(libusb_device_handle *dev,
+ int interface_number, int alternate_setting);
+int LIBUSB_CALL libusb_clear_halt(libusb_device_handle *dev,
+ unsigned char endpoint);
+int LIBUSB_CALL libusb_reset_device(libusb_device_handle *dev);
+
+int LIBUSB_CALL libusb_kernel_driver_active(libusb_device_handle *dev,
+ int interface_number);
+int LIBUSB_CALL libusb_detach_kernel_driver(libusb_device_handle *dev,
+ int interface_number);
+int LIBUSB_CALL libusb_attach_kernel_driver(libusb_device_handle *dev,
+ int interface_number);
+
+/* async I/O */
+
+/** \ingroup asyncio
+ * Get the data section of a control transfer. This convenience function is here
+ * to remind you that the data does not start until 8 bytes into the actual
+ * buffer, as the setup packet comes first.
+ *
+ * Calling this function only makes sense from a transfer callback function,
+ * or situations where you have already allocated a suitably sized buffer at
+ * transfer->buffer.
+ *
+ * \param transfer a transfer
+ * \returns pointer to the first byte of the data section
+ */
+static inline unsigned char *libusb_control_transfer_get_data(
+ struct libusb_transfer *transfer)
+{
+ return transfer->buffer + LIBUSB_CONTROL_SETUP_SIZE;
+}
+
+/** \ingroup asyncio
+ * Get the control setup packet of a control transfer. This convenience
+ * function is here to remind you that the control setup occupies the first
+ * 8 bytes of the transfer data buffer.
+ *
+ * Calling this function only makes sense from a transfer callback function,
+ * or situations where you have already allocated a suitably sized buffer at
+ * transfer->buffer.
+ *
+ * \param transfer a transfer
+ * \returns a casted pointer to the start of the transfer data buffer
+ */
+static inline struct libusb_control_setup *libusb_control_transfer_get_setup(
+ struct libusb_transfer *transfer)
+{
+ return (struct libusb_control_setup *) transfer->buffer;
+}
+
+/** \ingroup asyncio
+ * Helper function to populate the setup packet (first 8 bytes of the data
+ * buffer) for a control transfer. The wIndex, wValue and wLength values should
+ * be given in host-endian byte order.
+ *
+ * \param buffer buffer to output the setup packet into
+ * \param bmRequestType see the
+ * \ref libusb_control_setup::bmRequestType "bmRequestType" field of
+ * \ref libusb_control_setup
+ * \param bRequest see the
+ * \ref libusb_control_setup::bRequest "bRequest" field of
+ * \ref libusb_control_setup
+ * \param wValue see the
+ * \ref libusb_control_setup::wValue "wValue" field of
+ * \ref libusb_control_setup
+ * \param wIndex see the
+ * \ref libusb_control_setup::wIndex "wIndex" field of
+ * \ref libusb_control_setup
+ * \param wLength see the
+ * \ref libusb_control_setup::wLength "wLength" field of
+ * \ref libusb_control_setup
+ */
+static inline void libusb_fill_control_setup(unsigned char *buffer,
+ uint8_t bmRequestType, uint8_t bRequest, uint16_t wValue, uint16_t wIndex,
+ uint16_t wLength)
+{
+ struct libusb_control_setup *setup = (struct libusb_control_setup *) buffer;
+ setup->bmRequestType = bmRequestType;
+ setup->bRequest = bRequest;
+ setup->wValue = libusb_cpu_to_le16(wValue);
+ setup->wIndex = libusb_cpu_to_le16(wIndex);
+ setup->wLength = libusb_cpu_to_le16(wLength);
+}
+
+struct libusb_transfer * LIBUSB_CALL libusb_alloc_transfer(int iso_packets);
+int LIBUSB_CALL libusb_submit_transfer(struct libusb_transfer *transfer);
+int LIBUSB_CALL libusb_cancel_transfer(struct libusb_transfer *transfer);
+void LIBUSB_CALL libusb_free_transfer(struct libusb_transfer *transfer);
+
+/** \ingroup asyncio
+ * Helper function to populate the required \ref libusb_transfer fields
+ * for a control transfer.
+ *
+ * If you pass a transfer buffer to this function, the first 8 bytes will
+ * be interpreted as a control setup packet, and the wLength field will be
+ * used to automatically populate the \ref libusb_transfer::length "length"
+ * field of the transfer. Therefore the recommended approach is:
+ * -# Allocate a suitably sized data buffer (including space for control setup)
+ * -# Call libusb_fill_control_setup()
+ * -# If this is a host-to-device transfer with a data stage, put the data
+ * in place after the setup packet
+ * -# Call this function
+ * -# Call libusb_submit_transfer()
+ *
+ * It is also legal to pass a NULL buffer to this function, in which case this
+ * function will not attempt to populate the length field. Remember that you
+ * must then populate the buffer and length fields later.
+ *
+ * \param transfer the transfer to populate
+ * \param dev_handle handle of the device that will handle the transfer
+ * \param buffer data buffer. If provided, this function will interpret the
+ * first 8 bytes as a setup packet and infer the transfer length from that.
+ * \param callback callback function to be invoked on transfer completion
+ * \param user_data user data to pass to callback function
+ * \param timeout timeout for the transfer in milliseconds
+ */
+static inline void libusb_fill_control_transfer(
+ struct libusb_transfer *transfer, libusb_device_handle *dev_handle,
+ unsigned char *buffer, libusb_transfer_cb_fn callback, void *user_data,
+ unsigned int timeout)
+{
+ struct libusb_control_setup *setup = (struct libusb_control_setup *) buffer;
+ transfer->dev_handle = dev_handle;
+ transfer->endpoint = 0;
+ transfer->type = LIBUSB_TRANSFER_TYPE_CONTROL;
+ transfer->timeout = timeout;
+ transfer->buffer = buffer;
+ if (setup)
+ transfer->length = LIBUSB_CONTROL_SETUP_SIZE
+ + libusb_le16_to_cpu(setup->wLength);
+ transfer->user_data = user_data;
+ transfer->callback = callback;
+}
+
+/** \ingroup asyncio
+ * Helper function to populate the required \ref libusb_transfer fields
+ * for a bulk transfer.
+ *
+ * \param transfer the transfer to populate
+ * \param dev_handle handle of the device that will handle the transfer
+ * \param endpoint address of the endpoint where this transfer will be sent
+ * \param buffer data buffer
+ * \param length length of data buffer
+ * \param callback callback function to be invoked on transfer completion
+ * \param user_data user data to pass to callback function
+ * \param timeout timeout for the transfer in milliseconds
+ */
+static inline void libusb_fill_bulk_transfer(struct libusb_transfer *transfer,
+ libusb_device_handle *dev_handle, unsigned char endpoint,
+ unsigned char *buffer, int length, libusb_transfer_cb_fn callback,
+ void *user_data, unsigned int timeout)
+{
+ transfer->dev_handle = dev_handle;
+ transfer->endpoint = endpoint;
+ transfer->type = LIBUSB_TRANSFER_TYPE_BULK;
+ transfer->timeout = timeout;
+ transfer->buffer = buffer;
+ transfer->length = length;
+ transfer->user_data = user_data;
+ transfer->callback = callback;
+}
+
+/** \ingroup asyncio
+ * Helper function to populate the required \ref libusb_transfer fields
+ * for an interrupt transfer.
+ *
+ * \param transfer the transfer to populate
+ * \param dev_handle handle of the device that will handle the transfer
+ * \param endpoint address of the endpoint where this transfer will be sent
+ * \param buffer data buffer
+ * \param length length of data buffer
+ * \param callback callback function to be invoked on transfer completion
+ * \param user_data user data to pass to callback function
+ * \param timeout timeout for the transfer in milliseconds
+ */
+static inline void libusb_fill_interrupt_transfer(
+ struct libusb_transfer *transfer, libusb_device_handle *dev_handle,
+ unsigned char endpoint, unsigned char *buffer, int length,
+ libusb_transfer_cb_fn callback, void *user_data, unsigned int timeout)
+{
+ transfer->dev_handle = dev_handle;
+ transfer->endpoint = endpoint;
+ transfer->type = LIBUSB_TRANSFER_TYPE_INTERRUPT;
+ transfer->timeout = timeout;
+ transfer->buffer = buffer;
+ transfer->length = length;
+ transfer->user_data = user_data;
+ transfer->callback = callback;
+}
+
+/** \ingroup asyncio
+ * Helper function to populate the required \ref libusb_transfer fields
+ * for an isochronous transfer.
+ *
+ * \param transfer the transfer to populate
+ * \param dev_handle handle of the device that will handle the transfer
+ * \param endpoint address of the endpoint where this transfer will be sent
+ * \param buffer data buffer
+ * \param length length of data buffer
+ * \param num_iso_packets the number of isochronous packets
+ * \param callback callback function to be invoked on transfer completion
+ * \param user_data user data to pass to callback function
+ * \param timeout timeout for the transfer in milliseconds
+ */
+static inline void libusb_fill_iso_transfer(struct libusb_transfer *transfer,
+ libusb_device_handle *dev_handle, unsigned char endpoint,
+ unsigned char *buffer, int length, int num_iso_packets,
+ libusb_transfer_cb_fn callback, void *user_data, unsigned int timeout)
+{
+ transfer->dev_handle = dev_handle;
+ transfer->endpoint = endpoint;
+ transfer->type = LIBUSB_TRANSFER_TYPE_ISOCHRONOUS;
+ transfer->timeout = timeout;
+ transfer->buffer = buffer;
+ transfer->length = length;
+ transfer->num_iso_p