summaryrefslogtreecommitdiff
path: root/src/imaging
diff options
context:
space:
mode:
authorDimitri John Ledkov <xnox@ubuntu.com>2014-06-24 20:05:13 +0100
committerDimitri John Ledkov <xnox@ubuntu.com>2014-06-24 20:05:13 +0100
commitdd22bd15f6ed3e5eb5c77ab427029be50fe20148 (patch)
treed9491ee40d80688b7f5b1f20504f022686827a57 /src/imaging
libavg (1.8.1-1) unstable; urgency=medium
* New upstream release (Closes: #739664) * Mark libdc1394-22-dev as linux-any build-dependency. * Add libvdpau-dev build-dependency. * Add libavresample-dev build-dependency. # imported from the archive
Diffstat (limited to 'src/imaging')
-rw-r--r--src/imaging/Blob.cpp616
-rw-r--r--src/imaging/Blob.h120
-rw-r--r--src/imaging/CMUCamera.cpp466
-rw-r--r--src/imaging/CMUCamera.h82
-rw-r--r--src/imaging/CMUCameraUtils.cpp369
-rw-r--r--src/imaging/CMUCameraUtils.h46
-rw-r--r--src/imaging/Camera.cpp301
-rw-r--r--src/imaging/Camera.h120
-rw-r--r--src/imaging/CameraInfo.cpp159
-rw-r--r--src/imaging/CameraInfo.h100
-rw-r--r--src/imaging/CoordTransformer.cpp37
-rw-r--r--src/imaging/CoordTransformer.h45
-rw-r--r--src/imaging/DSCamera.cpp733
-rw-r--r--src/imaging/DSCamera.h105
-rw-r--r--src/imaging/DSHelper.cpp311
-rw-r--r--src/imaging/DSHelper.h63
-rw-r--r--src/imaging/DSSampleGrabber.cpp220
-rw-r--r--src/imaging/DSSampleGrabber.h91
-rw-r--r--src/imaging/DeDistort.cpp306
-rw-r--r--src/imaging/DeDistort.h88
-rw-r--r--src/imaging/FWCamera.cpp671
-rw-r--r--src/imaging/FWCamera.h94
-rw-r--r--src/imaging/FWCameraUtils.cpp366
-rw-r--r--src/imaging/FWCameraUtils.h48
-rw-r--r--src/imaging/FakeCamera.cpp149
-rw-r--r--src/imaging/FakeCamera.h69
-rw-r--r--src/imaging/FilterClearBorder.cpp67
-rw-r--r--src/imaging/FilterClearBorder.h51
-rw-r--r--src/imaging/FilterDistortion.cpp83
-rw-r--r--src/imaging/FilterDistortion.h56
-rw-r--r--src/imaging/FilterWipeBorder.cpp70
-rw-r--r--src/imaging/FilterWipeBorder.h50
-rw-r--r--src/imaging/IDSSampleCallback.h37
-rw-r--r--src/imaging/Makefile.am41
-rw-r--r--src/imaging/Run.cpp36
-rw-r--r--src/imaging/Run.h56
-rw-r--r--src/imaging/TrackerConfig.cpp268
-rw-r--r--src/imaging/TrackerConfig.h75
-rw-r--r--src/imaging/TrackerThread.cpp548
-rw-r--r--src/imaging/TrackerThread.h135
-rw-r--r--src/imaging/V4LCamera.cpp713
-rw-r--r--src/imaging/V4LCamera.h100
-rw-r--r--src/imaging/avgtrackerrc.minimal49
-rw-r--r--src/imaging/baseline/FilterClearBorderResult1.pngbin0 -> 220 bytes
-rw-r--r--src/imaging/baseline/FilterClearBorderResult3.pngbin0 -> 171 bytes
-rw-r--r--src/imaging/baseline/FilterWipeBorderResult1.pngbin0 -> 230 bytes
-rw-r--r--src/imaging/baseline/FilterWipeBorderResult3.pngbin0 -> 187 bytes
-rw-r--r--src/imaging/checktracking.cpp0
-rw-r--r--src/imaging/qedit.h9914
-rw-r--r--src/imaging/test_comp.pngbin0 -> 851 bytes
-rw-r--r--src/imaging/testimaging.cpp239
-rw-r--r--src/imaging/trackerconfigdtd.cpp175
-rw-r--r--src/imaging/trackerconfigdtd.h27
53 files changed, 18565 insertions, 0 deletions
diff --git a/src/imaging/Blob.cpp b/src/imaging/Blob.cpp
new file mode 100644
index 0000000..b4d5777
--- /dev/null
+++ b/src/imaging/Blob.cpp
@@ -0,0 +1,616 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+// Original author of this file is igor@c-base.org
+//
+
+#include "Blob.h"
+
+#include "../base/ObjectCounter.h"
+#include "../base/Exception.h"
+
+#include "../graphics/Filterfill.h"
+#include "../graphics/Pixel8.h"
+
+#include <stdlib.h>
+#include <math.h>
+
+#include <climits>
+#include <iostream>
+#include <algorithm>
+
+using namespace std;
+
+namespace avg {
+
+Blob::Blob(const Run& run)
+{
+ ObjectCounter::get()->incRef(&typeid(*this));
+ m_Runs.reserve(50);
+ m_Runs.push_back(run);
+ m_pParent = BlobPtr();
+
+ m_bStatsAvailable = false;
+}
+
+Blob::~Blob()
+{
+ ObjectCounter::get()->decRef(&typeid(*this));
+}
+
+RunArray *Blob::getRuns()
+{
+ return &m_Runs;
+}
+
+void Blob::addRun(const Run& run)
+{
+ AVG_ASSERT((m_Runs.end()-1)->m_Row <= run.m_Row);
+ m_Runs.push_back(run);
+}
+
+
+void Blob::merge(const BlobPtr& pOtherBlob)
+{
+ AVG_ASSERT(pOtherBlob);
+ RunArray * pOtherRuns = pOtherBlob->getRuns();
+ m_Runs.insert(m_Runs.end(), pOtherRuns->begin(), pOtherRuns->end());
+ pOtherRuns->clear();
+}
+
+void Blob::render(BitmapPtr pSrcBmp, BitmapPtr pDestBmp, Pixel32 color,
+ int min, int max, bool bFinger, bool bMarkCenter, Pixel32 centerColor)
+{
+ AVG_ASSERT(pSrcBmp);
+ AVG_ASSERT(pDestBmp);
+ AVG_ASSERT(pSrcBmp->getBytesPerPixel() == 1);
+ AVG_ASSERT(pDestBmp->getBytesPerPixel() == 4);
+ AVG_ASSERT(pSrcBmp->getSize() == pDestBmp->getSize());
+ unsigned char *pSrc;
+ unsigned char *pDest;
+ unsigned char *pColor = (unsigned char *)(&color);
+ int intensityScale = 2*256/(std::max(max-min, 1));
+ for (RunArray::iterator it = m_Runs.begin(); it != m_Runs.end(); ++it) {
+ AVG_ASSERT(it->m_Row < pSrcBmp->getSize().y);
+ AVG_ASSERT(it->m_StartCol >= 0);
+ AVG_ASSERT(it->m_EndCol <= pSrcBmp->getSize().x);
+ pSrc = pSrcBmp->getPixels()+it->m_Row*pSrcBmp->getStride();
+ pDest = pDestBmp->getPixels()+it->m_Row*pDestBmp->getStride();
+ int x = it->m_StartCol;
+ pSrc += x;
+ pDest+= x*4;
+ while (x < it->m_EndCol) {
+ int factor = (*pSrc-min)*intensityScale;
+ if (factor < 0) {
+ factor = 0;
+ }
+ if (factor > 255) {
+ factor = 255;
+ }
+ *(pDest++) = ((*pColor)*factor) >> 8;
+ *(pDest++) = ((*(pColor+1))*factor) >> 8;
+ *(pDest++) = ((*(pColor+2))*factor) >> 8;
+ *(pDest++) = ((*(pColor+3))*factor) >> 8;
+ pSrc++;
+ x++;
+ }
+ }
+ AVG_ASSERT(m_bStatsAvailable);
+ if (bMarkCenter) {
+ IntPoint center = IntPoint(int(m_Center.x+0.5), int(m_Center.y+0.5));
+
+ IntPoint end0 = IntPoint(m_ScaledBasis[0])+center;
+ pDestBmp->drawLine(center, end0, centerColor);
+ IntPoint end1 = IntPoint(m_ScaledBasis[1])+center;
+ pDestBmp->drawLine(center, end1, centerColor);
+
+ if (bFinger && m_RelatedBlobs.size() > 0) {
+ // Draw finger direction
+ BlobPtr pHandBlob = (m_RelatedBlobs)[0].lock();
+ if (pHandBlob) {
+ pDestBmp->drawLine(center, IntPoint(pHandBlob->getCenter()),
+ Pixel32(0xD7, 0xC9, 0x56, 0xFF));
+ }
+ }
+ if (!m_Contour.empty()) {
+ for (vector<IntPoint>::iterator it = m_Contour.begin()+1;
+ it != m_Contour.end(); ++it)
+ {
+ IntPoint pt1 = *(it-1);
+ IntPoint pt2 = *it;
+ pDestBmp->drawLine(pt1, pt2, centerColor);
+ }
+ pDestBmp->drawLine(*(m_Contour.end()-1), *m_Contour.begin(), centerColor);
+ }
+ }
+}
+
+bool Blob::contains(IntPoint pt)
+{
+ for (RunArray::iterator it = m_Runs.begin(); it != m_Runs.end(); ++it) {
+ if (it->m_Row == pt.y && it->m_StartCol <= pt.x && it->m_EndCol > pt.x) {
+ return true;
+ }
+ }
+ return false;
+}
+
+void Blob::calcStats()
+{
+ m_Center = calcCenter();
+ m_EstimatedNextCenter = m_Center;
+ m_Area = float(calcArea());
+ m_BoundingBox = calcBBox();
+ /*
+ more useful numbers that can be calculated from c
+ see e.g.
+ <http://www.cs.cf.ac.uk/Dave/Vision_lecture/node36.html#SECTION00173000000000000000>
+
+ Orientation = tan−1(2(c_xy)/(c_xx − c_yy)) /2
+ Inertia = c_xx + c_yy
+ Eccentricity = ...
+ */
+ float c_xx = 0; // Variance in x direction
+ float c_yy =0; // Variance in y direction
+ float c_xy = 0; // Covariance
+ float ll=0;
+ float l1;
+ float l2;
+ float tmp_x;
+ float tmp_y;
+ float mag;
+ for (RunArray::iterator r = m_Runs.begin(); r != m_Runs.end();++r) {
+ //This is the evaluated expression for the variance when using runs...
+ ll = float(r->length());
+ c_yy += ll* (r->m_Row- m_Center.y)*(r->m_Row- m_Center.y);
+ c_xx += ( (r->m_EndCol-1) * r->m_EndCol * (2*r->m_EndCol-1)
+ - (r->m_StartCol-1) * r->m_StartCol * (2*r->m_StartCol -1))/6.f
+ - m_Center.x * ((r->m_EndCol-1)*r->m_EndCol-(r->m_StartCol-1)*r->m_StartCol)
+ + ll* m_Center.x*m_Center.x;
+ c_xy += (r->m_Row-m_Center.y)*0.5f*( (r->m_EndCol-1)*r->m_EndCol
+ - (r->m_StartCol-1)*r->m_StartCol)
+ + ll *(m_Center.x*m_Center.y - m_Center.x*r->m_Row);
+ }
+
+ c_xx /= m_Area;
+ c_yy /= m_Area;
+ c_xy /= m_Area;
+
+ m_Inertia = c_xx + c_yy;
+
+ float T = sqrt( (c_xx - c_yy) * (c_xx - c_yy) + 4*c_xy*c_xy);
+ m_Eccentricity = ((c_xx + c_yy) + T)/((c_xx+c_yy) - T);
+ m_Orientation = 0.5f*atan2(2*c_xy,c_xx-c_yy);
+ // The l_i are variances (unit L^2) so to arrive at numbers that
+ // correspond to lengths in the picture we use sqrt
+ // Ensure that eigenvectors always have standard orientation, i.e. the determinant
+ // of the matrix with the eigenvectors as columns is >0
+ // E_1.x E_2.y - E_1.y E_2.x > 0
+ if (fabs(c_xy) > 1e-30) {
+ //FIXME. check l1!=0 l2!=0. li=0 happens for line-like components
+ l1 = 0.5f * ((c_xx+c_yy) + sqrt((c_xx+c_yy)*(c_xx+c_yy)-4*(c_xx*c_yy-c_xy*c_xy)));
+ l2 = 0.5f * ((c_xx+c_yy) - sqrt((c_xx+c_yy)*(c_xx+c_yy)-4*(c_xx*c_yy-c_xy*c_xy)));
+ tmp_x = c_xy/l1 - c_xx*c_yy/(c_xy*l1)+ (c_xx/c_xy);
+ tmp_y = 1.;
+ mag = sqrt(tmp_x*tmp_x + tmp_y*tmp_y);
+ m_EigenVector[0].x = tmp_x/mag;
+ m_EigenVector[0].y = tmp_y/mag;
+ m_EigenValues.x = l1;
+ tmp_x = c_xy/l2 - c_xx*c_yy/(c_xy*l2)+ (c_xx/c_xy);
+ tmp_y = 1.;
+ mag = sqrt(tmp_x*tmp_x + tmp_y*tmp_y);
+ m_EigenVector[1].x = tmp_x/mag;
+ m_EigenVector[1].y = tmp_y/mag;
+ m_EigenValues.y = l2;
+ if (m_EigenVector[0].x*m_EigenVector[1].y - m_EigenVector[0].y*m_EigenVector[1].x
+ < 0)
+ {
+ m_EigenVector[0] *= -1;
+ }
+ } else {
+ //matrix already diagonal
+ if (c_xx > c_yy) {
+ m_EigenVector[0].x = 1;
+ m_EigenVector[0].y = 0;
+ m_EigenVector[1].x = 0;
+ m_EigenVector[1].y = 1;
+ m_EigenValues.x = c_xx;
+ m_EigenValues.y = c_yy;
+ } else {
+ m_EigenVector[0].x = 0;
+ m_EigenVector[0].y = -1;
+ m_EigenVector[1].x = 1;
+ m_EigenVector[1].y = 0;
+ m_EigenValues.x = c_yy;
+ m_EigenValues.y = c_xx;
+ }
+ }
+ m_ScaledBasis[0].x = m_EigenVector[0].x*sqrt(m_EigenValues.x);
+ m_ScaledBasis[0].y = m_EigenVector[0].y*sqrt(m_EigenValues.x);
+ m_ScaledBasis[1].x = m_EigenVector[1].x*sqrt(m_EigenValues.y);
+ m_ScaledBasis[1].y = m_EigenVector[1].y*sqrt(m_EigenValues.y);
+
+ m_bStatsAvailable = true;
+}
+
+const glm::vec2& Blob::getCenter() const
+{
+ return m_Center;
+}
+
+const glm::vec2& Blob::getEstimatedNextCenter() const
+{
+ return m_EstimatedNextCenter;
+}
+
+float Blob::getArea() const
+{
+ return m_Area;
+}
+
+const IntRect& Blob::getBoundingBox() const
+{
+ return m_BoundingBox;
+}
+
+float Blob::getEccentricity() const
+{
+ return m_Eccentricity;
+}
+
+float Blob::getInertia() const
+{
+ return m_Inertia;
+}
+
+float Blob::getOrientation() const
+{
+ return m_Orientation;
+}
+
+const glm::vec2 & Blob::getScaledBasis(int i) const
+{
+ return m_ScaledBasis[i];
+}
+
+const glm::vec2 & Blob::getEigenVector(int i) const
+{
+ return m_EigenVector[i];
+}
+
+const glm::vec2 & Blob::getEigenValues() const
+{
+ return m_EigenValues;
+}
+
+void Blob::calcNextCenter(glm::vec2 oldCenter)
+{
+ m_EstimatedNextCenter = m_Center + (m_Center - oldCenter);
+}
+
+void Blob::clearRelated()
+{
+ m_RelatedBlobs.clear();
+}
+
+void Blob::addRelated(BlobPtr pBlob)
+{
+ m_RelatedBlobs.push_back(pBlob);
+}
+
+const BlobPtr Blob::getFirstRelated()
+{
+ if (m_RelatedBlobs.empty()) {
+ return BlobPtr();
+ } else {
+ return m_RelatedBlobs[0].lock();
+ }
+}
+
+glm::vec2 Blob::calcCenter()
+{
+ glm::vec2 center(0,0);
+ float c = 0;
+ for (RunArray::iterator r = m_Runs.begin(); r != m_Runs.end(); ++r) {
+ center += r->m_Center * float(r->length());
+ c += r->length();
+ }
+ center = center/c;
+ return center;
+}
+
+IntRect Blob::calcBBox()
+{
+ int x1 = INT_MAX;
+ int y1 = INT_MAX;
+ int x2 = 0;
+ int y2 = 0;
+ for (RunArray::iterator r = m_Runs.begin(); r!=m_Runs.end(); ++r) {
+ x1 = std::min(x1, r->m_StartCol);
+ y1 = std::min(y1, r->m_Row);
+ x2 = std::max(x2, r->m_EndCol);
+ y2 = std::max(y2, r->m_Row);
+ }
+ return IntRect(x1, y1, x2, y2);
+}
+
+int Blob::calcArea()
+{
+ int res = 0;
+ for (RunArray::iterator r = m_Runs.begin(); r != m_Runs.end(); ++r) {
+ res+= r->length();
+ }
+ return res;
+}
+
+void Blob::initRowPositions()
+{
+ int offset = m_BoundingBox.tl.y;
+ RunArray::iterator it = m_Runs.begin();
+ for (int i = 0; i < m_BoundingBox.height(); i++) {
+ while (it->m_Row-offset < i) {
+ it++;
+ }
+ m_RowPositions.push_back(it);
+ }
+}
+
+IntPoint getNeighbor(const IntPoint& pt, int dir)
+{
+ IntPoint neighborPt(pt);
+ // dir encoding:
+ // 3 2 1
+ // 4 pt 0
+ // 5 6 7
+ switch(dir) {
+ case 0:
+ case 1:
+ case 7:
+ neighborPt.x++;
+ break;
+ case 3:
+ case 4:
+ case 5:
+ neighborPt.x--;
+ break;
+ default:
+ break;
+ };
+ switch(dir) {
+ case 1:
+ case 2:
+ case 3:
+ neighborPt.y--;
+ break;
+ case 5:
+ case 6:
+ case 7:
+ neighborPt.y++;
+ break;
+ default:
+ break;
+ };
+ return neighborPt;
+}
+
+IntPoint Blob::findNeighborInside(const IntPoint& pt, int& dir)
+{
+ if (dir & 1) {
+ dir += 2;
+ } else {
+ dir++;
+ }
+ if (dir > 7) {
+ dir -= 8;
+ }
+
+ for (int i = 0; i < 8; i++) {
+ IntPoint curPt = getNeighbor(pt, dir);
+ if (ptIsInBlob(curPt)) {
+ return curPt;
+ } else {
+ dir--;
+ if (dir < 0) {
+ dir += 8;
+ }
+ }
+ }
+ AVG_ASSERT(false);
+ return pt;
+}
+
+bool runIsLess(const Run& r1, const Run& r2)
+{
+ return r1.m_Row < r2.m_Row;
+}
+
+void Blob::calcContour(int precision)
+{
+ sort(m_Runs.begin(), m_Runs.end(), runIsLess);
+ initRowPositions();
+
+ // Moore Neighbor Tracing.
+ IntPoint boundaryPt(m_Runs[0].m_StartCol, m_Runs[0].m_Row);
+ IntPoint firstPt(boundaryPt);
+ int i = precision;
+ int dir = 1;
+ do {
+ i++;
+ if (i >= precision) {
+ m_Contour.push_back(boundaryPt);
+ i = 0;
+ }
+ boundaryPt = findNeighborInside(boundaryPt, dir);
+ } while (firstPt != boundaryPt);
+}
+
+ContourSeq Blob::getContour()
+{
+ return m_Contour;
+}
+
+bool Blob::ptIsInBlob(const IntPoint& pt)
+{
+ if (m_BoundingBox.contains(pt)) {
+ RunArray::iterator it = m_RowPositions[pt.y-m_BoundingBox.tl.y];
+ while (it->m_Row == pt.y) {
+ if (pt.x >= it->m_StartCol && pt.x < it->m_EndCol) {
+ return true;
+ }
+ it++;
+ }
+ }
+ return false;
+}
+
+bool areConnected(const Run & run1, const Run & run2)
+{
+ if (run1.m_StartCol > run2.m_StartCol) {
+ return run2.m_EndCol > run1.m_StartCol;
+ } else {
+ return run1.m_EndCol > run2.m_StartCol;
+ }
+}
+
+void storeRuns(BlobVectorPtr pBlobs, RunArray* pUpperRuns, RunArray* pLowerRuns)
+{
+ for (RunArray::iterator run1_it = pUpperRuns->begin(); run1_it != pUpperRuns->end();
+ ++run1_it)
+ {
+ for (RunArray::iterator run2_it = pLowerRuns->begin();
+ run2_it != pLowerRuns->end(); ++run2_it)
+ {
+ if (run2_it->m_StartCol > run1_it->m_EndCol) {
+ break;
+ }
+ if (areConnected(*run1_it, *run2_it)) {
+ BlobPtr pBlob = run1_it->m_pBlob.lock();
+ while (pBlob->m_pParent) {
+ pBlob = pBlob->m_pParent;
+ }
+ if (!(run2_it->m_pBlob.expired())) {
+ BlobPtr c_blob = run2_it->m_pBlob.lock();
+ while (c_blob->m_pParent) {
+ c_blob = c_blob->m_pParent;
+ }
+ if (c_blob != pBlob) {
+ // When we merge, make sure the smaller blob is merged
+ // into the bigger one to avoid a speed hit.
+ if (pBlob->getRuns()->size() > c_blob->getRuns()->size()) {
+ pBlob->merge(c_blob); //destroys c_blobs runs_list
+ c_blob->m_pParent = pBlob;
+ } else {
+ c_blob->merge(pBlob);
+ pBlob->m_pParent = c_blob;
+ }
+ }
+ } else {
+ run2_it->m_pBlob = pBlob;
+ pBlob->addRun(*run2_it);
+ }
+ }
+ }
+ }
+ for (RunArray::iterator run2_it = pLowerRuns->begin(); run2_it != pLowerRuns->end();
+ ++run2_it)
+ {
+ if (run2_it->m_pBlob.expired()) {
+ BlobPtr pBlob = BlobPtr(new Blob(*run2_it));
+ pBlobs->push_back(pBlob);
+ run2_it->m_pBlob = pBlob;
+ }
+ }
+}
+
+void findRunsInLine(BitmapPtr pBmp, int y, RunArray* pRuns, unsigned char threshold)
+{
+ int runStart=0;
+ int runStop=0;
+ const unsigned char * pPixel = pBmp->getPixels()+y*pBmp->getStride();
+ bool bIsInRun = *pPixel > threshold;
+
+ int width = pBmp->getSize().x;
+ for (int x = 0; x < width; x++) {
+ bool bPixelInRun = *pPixel > threshold;
+ if (bIsInRun != bPixelInRun) {
+ if (bIsInRun) {
+ // Only if the run is longer than one pixel.
+ if (x-runStart > 1) {
+ runStop = x;
+ pRuns->push_back(Run(y, runStart, runStop));
+ runStart = x;
+ }
+ } else {
+ runStop = x - 1;
+ if (runStop-runStart == 0 && !pRuns->empty()) {
+ // Single dark pixel: ignore the pixel, revive the last run.
+ runStart = pRuns->back().m_StartCol;
+ pRuns->pop_back();
+ } else {
+ runStart = x;
+ }
+ }
+ bIsInRun = bPixelInRun;
+ }
+ pPixel++;
+ }
+ if (bIsInRun) {
+ pRuns->push_back(Run(y, runStart, width));
+ }
+}
+
+BlobVectorPtr findConnectedComponents(BitmapPtr pBmp, unsigned char threshold)
+{
+ AVG_ASSERT(pBmp->getPixelFormat() == I8);
+ BlobVectorPtr pBlobs = BlobVectorPtr(new BlobVector);
+ IntPoint size = pBmp->getSize();
+ RunArray* pUpperRuns = new RunArray();
+ RunArray* pLowerRuns = new RunArray();
+
+ int y = 0;
+ findRunsInLine(pBmp, 0, pUpperRuns, threshold);
+ for (RunArray::iterator it = pUpperRuns->begin(); it!=pUpperRuns->end(); ++it) {
+ BlobPtr pBlob = BlobPtr(new Blob(*it));
+ pBlobs->push_back(pBlob);
+ it->m_pBlob = pBlob;
+ }
+
+ for (y = 1; y < size.y; y++) {
+ findRunsInLine(pBmp, y, pLowerRuns, threshold);
+ storeRuns(pBlobs, pUpperRuns, pLowerRuns);
+ RunArray* pTmpRuns = pUpperRuns;
+ pUpperRuns = pLowerRuns;
+ pLowerRuns = pTmpRuns;
+ pLowerRuns->clear();
+ }
+ BlobVectorPtr pResultBlobs = BlobVectorPtr(new BlobVector);
+ for (BlobVector::iterator it = pBlobs->begin(); it != pBlobs->end(); ++it) {
+ if (!(*it)->m_pParent) {
+ pResultBlobs->push_back(*it);
+ (*it)->calcStats();
+ }
+ }
+ delete pUpperRuns;
+ delete pLowerRuns;
+ return pResultBlobs;
+}
+
+
+}
diff --git a/src/imaging/Blob.h b/src/imaging/Blob.h
new file mode 100644
index 0000000..aff1994
--- /dev/null
+++ b/src/imaging/Blob.h
@@ -0,0 +1,120 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+// Original author of this file is igor@c-base.org
+//
+
+#ifndef _ConnectedComps_H_
+#define _ConnectedComps_H_
+
+#include "../api.h"
+#include "Run.h"
+
+#include "../graphics/Bitmap.h"
+#include "../graphics/Pixel32.h"
+
+#include "../base/GLMHelper.h"
+
+#include <vector>
+
+#include <boost/shared_ptr.hpp>
+#include <boost/weak_ptr.hpp>
+
+namespace avg {
+
+class Blob;
+typedef boost::shared_ptr<class Blob> BlobPtr;
+typedef boost::weak_ptr<class Blob> BlobWeakPtr;
+typedef std::vector<BlobPtr> BlobVector;
+typedef std::vector<BlobWeakPtr> BlobWeakPtrVector;
+typedef boost::shared_ptr<BlobVector> BlobVectorPtr;
+typedef std::vector<IntPoint> ContourSeq;
+
+class AVG_API Blob
+{
+ public:
+ Blob(const Run& run);
+ ~Blob();
+
+ void addRun(const Run& run);
+ void merge(const BlobPtr& other);
+ RunArray* getRuns();
+ void render(BitmapPtr pSrcBmp, BitmapPtr pDestBmp, Pixel32 Color,
+ int Min, int Max, bool bFinger, bool bMarkCenter,
+ Pixel32 CenterColor= Pixel32(0x00, 0x00, 0xFF, 0xFF));
+ bool contains(IntPoint pt);
+
+ void calcStats();
+ void calcContour(int Precision);
+ ContourSeq getContour();
+
+ const glm::vec2& getCenter() const;
+ const glm::vec2& getEstimatedNextCenter() const;
+ float getArea() const;
+ const IntRect & getBoundingBox() const;
+ float getEccentricity() const;
+ float getInertia() const;
+ float getOrientation() const;
+ const glm::vec2& getScaledBasis(int i) const;
+ const glm::vec2& getEigenVector(int i) const;
+ const glm::vec2& getEigenValues() const;
+
+ void calcNextCenter(glm::vec2 oldCenter);
+ void clearRelated();
+ void addRelated(BlobPtr pBlob);
+ const BlobPtr getFirstRelated();
+
+ BlobPtr m_pParent;
+
+ private:
+ Blob(const Blob &);
+ glm::vec2 calcCenter();
+ IntRect calcBBox();
+ int calcArea();
+ void initRowPositions();
+ IntPoint findNeighborInside(const IntPoint& Pt, int& Dir);
+ bool ptIsInBlob(const IntPoint& Pt);
+
+ RunArray m_Runs; // This array is unsorted until contours are calculated.
+ std::vector<RunArray::iterator> m_RowPositions;
+ BlobWeakPtrVector m_RelatedBlobs; // For fingers, this contains the hand.
+ // For hands, this contains the fingers.
+
+ bool m_bStatsAvailable;
+ glm::vec2 m_EstimatedNextCenter;
+ glm::vec2 m_Center;
+ float m_Area;
+ IntRect m_BoundingBox;
+ float m_Eccentricity;
+ float m_Inertia;
+ float m_Orientation;
+ glm::vec2 m_ScaledBasis[2];
+ glm::vec2 m_EigenVector[2];
+ glm::vec2 m_EigenValues;
+
+ ContourSeq m_Contour;
+};
+
+BlobVectorPtr AVG_API findConnectedComponents(BitmapPtr pBmp,
+ unsigned char threshold);
+
+}
+
+#endif
diff --git a/src/imaging/CMUCamera.cpp b/src/imaging/CMUCamera.cpp
new file mode 100644
index 0000000..6c68c5f
--- /dev/null
+++ b/src/imaging/CMUCamera.cpp
@@ -0,0 +1,466 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+// Original author of this file is Nick Hebner (hebnern@gmail.com).
+//
+
+#include "CMUCamera.h"
+#include "CMUCameraUtils.h"
+
+#include "../base/Exception.h"
+#include "../base/Logger.h"
+#include "../base/OSHelper.h"
+#include "../base/StringHelper.h"
+
+#include <windows.h>
+#include <1394Camera.h>
+
+using namespace std;
+
+namespace avg {
+
+CMUCamera::CMUCamera(long long guid, bool bFW800, IntPoint size,
+ PixelFormat camPF, PixelFormat destPF, float frameRate)
+ : Camera(camPF, destPF, size, frameRate),
+ m_WhitebalanceU(-1),
+ m_WhitebalanceV(-1),
+ m_pCamera(0)
+{
+ m_pCamera = new C1394Camera();
+ int err;
+ unsigned long videoFormat, videoMode;
+ getVideoFormatAndMode(getImgSize(), getCamPF(), &videoFormat, &videoMode);
+
+ // Find and open camera
+ if (m_pCamera->RefreshCameraList() <= 0) {
+ throw Exception(AVG_ERR_CAMERA_NONFATAL, "No Firewire cameras found");
+ }
+ int i = getCamIndex(guid);
+ err = m_pCamera->SelectCamera(i);
+ err = m_pCamera->InitCamera(TRUE);
+ AVG_ASSERT(err == CAM_SUCCESS);
+
+ if (bFW800) {
+ m_pCamera->Set1394b(true);
+ }
+
+ // Setup video format and rate
+ err = m_pCamera->SetVideoFormat(videoFormat);
+ checkCMUError(err, AVG_ERR_CAMERA_NONFATAL,
+ string("CMUCamera: Error setting video format ") + toString(videoFormat) +
+ ", mode: " + toString(videoMode));
+ err = m_pCamera->SetVideoMode(videoMode);
+ checkCMUError(err, AVG_ERR_CAMERA_NONFATAL,
+ string("CMUCamera: Error setting video mode ") + toString(videoMode) +
+ ", format: " + toString(videoFormat));
+ err = m_pCamera->SetVideoFrameRate(getFrameRateConst(getFrameRate()));
+ checkCMUError(err, AVG_ERR_CAMERA_NONFATAL, "Error setting frame rate");
+
+ // Start capturing images
+ err = m_pCamera->StartImageAcquisition();
+ if (err != CAM_SUCCESS) {
+ throw Exception(AVG_ERR_CAMERA_NONFATAL,
+ "CMUCamera: Could not start image acquisition. " +
+ CMUErrorToString(err));
+ }
+
+ // Set camera features
+ for (FeatureMap::iterator it=m_Features.begin(); it != m_Features.end(); it++) {
+ setFeature(it->first, it->second, true);
+ }
+ setWhitebalance(m_WhitebalanceU, m_WhitebalanceV, true);
+
+ if (camPF == BAYER8) {
+ char sModel[256], sVendor[256];
+ m_pCamera->GetCameraName(sModel, 256);
+ m_pCamera->GetCameraVendor(sVendor, 256);
+
+ if (strcmp(sModel, "DFx 31BF03") == 0) {
+ AVG_TRACE(Logger::category::CONFIG, Logger::severity::INFO,
+ "Applying bayer pattern fixup for IS DFx31BF03 camera");
+ setCamPF(BAYER8_GRBG);
+ } else if (strcmp(sVendor, "Point Grey Research") == 0) {
+ AVG_TRACE(Logger::category::CONFIG, Logger::severity::INFO,
+ "Applying bayer pattern fixup for PointGrey cameras");
+ enablePtGreyBayer();
+ }
+
+ }
+}
+
+CMUCamera::~CMUCamera()
+{
+ m_pCamera->StopImageAcquisition();
+ delete m_pCamera;
+}
+
+BitmapPtr CMUCamera::getImage(bool bWait)
+{
+ if (bWait) {
+ unsigned rc = WaitForSingleObject(m_pCamera->GetFrameEvent(), INFINITE);
+ AVG_ASSERT(rc == WAIT_OBJECT_0);
+ } else {
+ unsigned rc = WaitForSingleObject(m_pCamera->GetFrameEvent(), 0);
+ if (rc == WAIT_TIMEOUT) {
+ // No frame yet
+ return BitmapPtr();
+ }
+ AVG_ASSERT(rc == WAIT_OBJECT_0);
+ }
+ int rc2 = m_pCamera->AcquireImageEx(FALSE, NULL);
+ if (rc2 != CAM_SUCCESS) {
+ throw Exception(AVG_ERR_CAMERA_NONFATAL,
+ "CMUCamera: Could not acquire image from camera. " +
+ CMUErrorToString(rc2));
+ }
+ unsigned long captureBufferLength;
+ unsigned char* pCaptureBuffer = m_pCamera->GetRawData(&captureBufferLength);
+
+ BitmapPtr pCamBmp(new Bitmap(getImgSize(), getCamPF(), pCaptureBuffer,
+ captureBufferLength / getImgSize().y, false, "TempCameraBmp"));
+ return convertCamFrameToDestPF(pCamBmp);
+}
+
+
+const string& CMUCamera::getDevice() const
+{
+ return m_sDevice;
+}
+
+const std::string& CMUCamera::getDriverName() const
+{
+ static string sDriverName = "CMU 1394 Digital Camera Driver";
+ return sDriverName;
+}
+
+int CMUCamera::getFeature(CameraFeature Feature) const
+{
+ unsigned short val1;
+ unsigned short val2;
+ internalGetFeature(Feature, &val1, &val2);
+ return val1;
+}
+
+void CMUCamera::setFeature(CameraFeature Feature, int Value, bool bIgnoreOldValue)
+{
+ if (bIgnoreOldValue || m_Features[Feature] != Value) {
+ m_Features[Feature] = Value;
+ if (Feature == CAM_FEATURE_STROBE_DURATION) {
+ if (m_pCamera->HasStrobe()) {
+ C1394CameraControlStrobe* pControl = m_pCamera->GetStrobeControl(0);
+ int err = pControl->SetValue(Value);
+ checkCMUWarning(err == CAM_SUCCESS, "Error setting camera strobe.");
+ } else {
+ AVG_LOG_WARNING("Camera does not support strobe.");
+ }
+ } else {
+ CAMERA_FEATURE cmuFeature = getFeatureID(Feature);
+ if (m_pCamera->HasFeature(cmuFeature)) {
+ bool bAuto = (Value == -1);
+
+ C1394CameraControl* pControl = m_pCamera->GetCameraControl(cmuFeature);
+ int err1 = pControl->SetAutoMode(bAuto);
+ int err2 = CAM_SUCCESS;
+ if (!bAuto) {
+ err2 = pControl->SetValue(Value);
+ }
+ checkCMUWarning(err1 == CAM_SUCCESS && err2 == CAM_SUCCESS,
+ string("Error setting camera feature: ") +
+ cameraFeatureToString(Feature));
+ } else {
+ AVG_LOG_WARNING(string("Camera does not support feature: ") +
+ cameraFeatureToString(Feature));
+ }
+ }
+ }
+}
+
+void CMUCamera::setFeatureOneShot(CameraFeature Feature)
+{
+ CAMERA_FEATURE cmuFeature = getFeatureID(Feature);
+ if (cmuFeature != FEATURE_INVALID_FEATURE && m_pCamera->HasFeature(cmuFeature)) {
+ C1394CameraControl* pControl = m_pCamera->GetCameraControl(cmuFeature);
+ int err1 = pControl->SetOnOff(false);
+ int err2 = pControl->SetAutoMode(false);
+ int err3 = pControl->SetOnePush(true);
+ checkCMUWarning(err1 == CAM_SUCCESS && err2 == CAM_SUCCESS
+ && err3 == CAM_SUCCESS,
+ string("Error setting feature: ") + cameraFeatureToString(Feature));
+ } else {
+ AVG_LOG_WARNING(string("Camera does not support feature: ") +
+ cameraFeatureToString(Feature));
+ }
+}
+
+int CMUCamera::getWhitebalanceU() const
+{
+ unsigned short val1;
+ unsigned short val2;
+ internalGetFeature(CAM_FEATURE_WHITE_BALANCE, &val1, &val2);
+ return val1;
+}
+
+int CMUCamera::getWhitebalanceV() const
+{
+ unsigned short val1;
+ unsigned short val2;
+ internalGetFeature(CAM_FEATURE_WHITE_BALANCE, &val1, &val2);
+ return val2;
+}
+
+void CMUCamera::setWhitebalance(int u, int v, bool bIgnoreOldValue)
+{
+ if (bIgnoreOldValue || m_WhitebalanceU != u || m_WhitebalanceV != v) {
+ m_WhitebalanceU = u;
+ m_WhitebalanceV = v;
+ CAMERA_FEATURE cmuFeature = getFeatureID(CAM_FEATURE_WHITE_BALANCE);
+ if (m_pCamera->HasFeature(FEATURE_WHITE_BALANCE)) {
+ bool bAuto = (u == -1);
+
+ C1394CameraControl* pControl = m_pCamera->GetCameraControl(cmuFeature);
+ int err1 = pControl->SetAutoMode(bAuto);
+ int err2 = CAM_SUCCESS;
+ if (!bAuto) {
+ err2 = pControl->SetValue(u, v);
+ }
+ checkCMUWarning(err1 == CAM_SUCCESS && err2 == CAM_SUCCESS,
+ string("Error setting camera feature: ") +
+ cameraFeatureToString(CAM_FEATURE_WHITE_BALANCE));
+ } else {
+ AVG_LOG_WARNING(string("Camera does not support feature: ") +
+ cameraFeatureToString(CAM_FEATURE_WHITE_BALANCE));
+ }
+ }
+}
+
+int CMUCamera::countCameras()
+{
+ C1394Camera* pCamera = new C1394Camera();
+ if (pCamera->RefreshCameraList() <= 0) {
+ return 0;
+ }
+ int numCameras = pCamera->GetNumberCameras();
+ return numCameras;
+}
+
+CameraInfo* CMUCamera::getCameraInfos(int deviceNumber)
+{
+#ifdef AVG_ENABLE_CMU1394
+ C1394Camera* pCamera = new C1394Camera();
+ int err = pCamera->RefreshCameraList();
+ if (err <= 0) {
+ return 0;
+ }
+
+ err = pCamera->SelectCamera(deviceNumber);
+ if (err != CAM_SUCCESS) {
+ AVG_ASSERT(false);
+ }
+ pCamera->InitCamera(true);
+
+ long long uniqueID;
+ pCamera->GetCameraUniqueID((PLARGE_INTEGER)&uniqueID);
+ stringstream deviceID;
+ deviceID << uniqueID;
+
+ CameraInfo* pCamInfo = new CameraInfo("Firewire", deviceID.str());
+ getCameraImageFormats(pCamera, pCamInfo);
+ getCameraControls(pCamera, pCamInfo);
+
+ delete pCamera;
+ return pCamInfo;
+#endif
+ return NULL;
+}
+
+void CMUCamera::getCameraImageFormats(C1394Camera* pCamera, CameraInfo* pCamInfo)
+{
+ //Iterate over formats (up to 3 formats are supported)
+ for (int format = 0; format <= 2; format++) {
+ BOOL hasFormat = false;
+ hasFormat = pCamera->HasVideoFormat(format);
+ if(!hasFormat){
+ continue;
+ }
+ //Iterate over modes (up to 8 modes are supported)
+ for (int mode = 0; mode <= 7; mode++) {
+ BOOL hasMode = false;
+ hasMode = pCamera->HasVideoMode(format, mode);
+ if (!hasMode) {
+ continue;
+ }
+ //Ignore not libavg supported formats
+ if (mode == 0 && format == 0) {
+ continue;
+ }
+
+ IntPoint size;
+ PixelFormat pixelFormat;
+ FrameratesVector framerates;
+
+ getImageSizeAndPF(format, mode, size, pixelFormat);
+ getCameraFramerates(pCamera, format, mode, framerates);
+
+ CameraImageFormat imageFormat = CameraImageFormat(size, pixelFormat, framerates);
+ pCamInfo->addImageFormat(imageFormat);
+ }
+ }
+}
+
+void CMUCamera::getCameraFramerates(C1394Camera* pCamera, unsigned long videoFormat, unsigned long videoMode, FrameratesVector &framerates)
+{
+ for (int itFramerate = 0; itFramerate <= 7; itFramerate++) {
+ BOOL hasFramerate = false;
+ hasFramerate = pCamera->HasVideoFrameRate(videoFormat, videoMode, itFramerate);
+ if (!hasFramerate) {
+ continue;
+ }
+
+ float framerate = getFrameRateFloat(itFramerate);
+ framerates.push_back(framerate);
+ }
+}
+
+void CMUCamera::getCameraControls(C1394Camera* pCamera, CameraInfo* pCamInfo)
+{
+ //Iterate over amount of possible Features (up to 24 in CMU1394 DCD 6.4.5.240)
+ for (int indexFeature = 0; indexFeature <= 23; indexFeature++) {
+ C1394CameraControl* feature = pCamera->GetCameraControl((CAMERA_FEATURE)indexFeature);
+ if (feature == NULL) {
+ continue;
+ }
+ bool hasFeature = pCamera->HasFeature((CAMERA_FEATURE)indexFeature);
+ if (!hasFeature) {
+ continue;
+ }
+ //FrameRate (also known as TransferRate) is not supported
+ if (feature->GetFeatureID() == FEATURE_FRAME_RATE) {
+ continue;
+ }
+
+ std::string featureName = feature->GetName();
+ unsigned short min = -1;
+ unsigned short max = -1;
+ feature->GetRange(&min, &max);
+ unsigned short value_low = -1;
+ unsigned short value_high = -1; //TODO: For Whitebalance or Temperature etc.
+ feature->GetValue(&value_low, &value_high);
+ CameraControl camControl = CameraControl(featureName, (int)min, (int)max, (int)value_low);
+ pCamInfo->addControl(camControl);
+ }
+}
+
+int CMUCamera::getCamIndex(long long guid)
+{
+ if (guid == 0) {
+ return 0;
+ } else {
+ for (int i=0; i<m_pCamera->GetNumberCameras(); ++i) {
+ m_pCamera->SelectCamera(i);
+ long long camGuid;
+ m_pCamera->GetCameraUniqueID((PLARGE_INTEGER)&camGuid);
+ if (camGuid == guid) {
+ return i;
+ }
+ }
+ AVG_LOG_WARNING(string("Camera with guid ") + toString(guid)
+ + " not present. Using first camera.");
+ return 0;
+ }
+}
+
+void CMUCamera::internalGetFeature(CameraFeature Feature, unsigned short* val1,
+ unsigned short* val2) const
+{
+ *val1 = -1;
+ *val2 = -1;
+ CAMERA_FEATURE cmuFeature = getFeatureID(Feature);
+ if (m_pCamera->HasFeature(cmuFeature)) {
+ C1394CameraControl* pControl = m_pCamera->GetCameraControl(cmuFeature);
+ pControl->Status();
+ pControl->GetValue(val1, val2);
+ } else {
+ AVG_LOG_WARNING(string("Error reading camera feature: ") +
+ cameraFeatureToString(Feature));
+ }
+}
+
+void CMUCamera::enablePtGreyBayer()
+{
+ int err;
+ unsigned long advOffset = m_pCamera->GetAdvancedFeatureOffset();
+
+ unsigned long imageDataFormat;
+ err = m_pCamera->ReadQuadlet(advOffset+0x48, &imageDataFormat);
+ AVG_ASSERT(err == CAM_SUCCESS);
+ if (imageDataFormat & 0x80000000) {
+ err = m_pCamera->WriteQuadlet(advOffset+0x48, 0x80000081);
+ AVG_ASSERT(err == CAM_SUCCESS);
+ unsigned long bayerFormat;
+ err = m_pCamera->ReadQuadlet(advOffset+0x40, &bayerFormat);
+ AVG_ASSERT(err == CAM_SUCCESS);
+ PixelFormat exactPF = fwBayerStringToPF(bayerFormat);
+ setCamPF(exactPF);
+ } else {
+ AVG_LOG_ERROR("imageDataFormat not supported.");
+ }
+}
+
+void CMUCamera::checkCMUError(int code, int type, const string & sMsg) const
+{
+ if (code != CAM_SUCCESS) {
+ throw Exception(type, sMsg);
+ }
+}
+
+void CMUCamera::checkCMUWarning(bool bOk, const string& sMsg) const
+{
+ if (!bOk) {
+ AVG_LOG_WARNING(sMsg);
+ }
+}
+
+string CMUCamera::CMUErrorToString(int code)
+{
+ if (code == CAM_ERROR) {
+ return "WinI/O returned: " + getWinErrMsg(GetLastError());
+ }
+ string msg = "1394Camera returned: ";
+ switch (code) {
+ case CAM_ERROR_UNSUPPORTED:
+ return msg + "CAM_ERROR_UNSUPPORTED.";
+ case CAM_ERROR_NOT_INITIALIZED:
+ return msg + "CAM_ERROR_NOT_INITIALIZED.";
+ case CAM_ERROR_INVALID_VIDEO_SETTINGS:
+ return msg + "CAM_ERROR_INVALID_VIDEO_SETTINGS.";
+ case CAM_ERROR_BUSY:
+ return msg + "CAM_ERROR_BUSY.";
+ case CAM_ERROR_INSUFFICIENT_RESOURCES:
+ return msg + "CAM_ERROR_INSUFFICIENT_RESOURCES.";
+ case CAM_ERROR_PARAM_OUT_OF_RANGE:
+ return msg + "CAM_ERROR_PARAM_OUT_OF_RANGE.";
+ case CAM_ERROR_FRAME_TIMEOUT:
+ return msg + "CAM_ERROR_FRAME_TIMEOUT.";
+ default:
+ return msg + "unknown error.";
+ }
+}
+
+}
diff --git a/src/imaging/CMUCamera.h b/src/imaging/CMUCamera.h
new file mode 100644
index 0000000..a2f31e0
--- /dev/null
+++ b/src/imaging/CMUCamera.h
@@ -0,0 +1,82 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+// Original author of this file is Nick Hebner (hebnern@gmail.com).
+//
+
+#ifndef _CMUCamera_H_
+#define _CMUCamera_H_
+
+#include "../api.h"
+#include "Camera.h"
+
+#include <string>
+
+class C1394Camera;
+
+namespace avg {
+
+class AVG_API CMUCamera : public Camera {
+public:
+ CMUCamera(long long guid, bool bFW800, IntPoint Size, PixelFormat camPF,
+ PixelFormat destPF, float FrameRate);
+ virtual ~CMUCamera();
+
+ virtual BitmapPtr getImage(bool bWait);
+
+ virtual const std::string& getDevice() const;
+ virtual const std::string& getDriverName() const;
+
+ virtual int getFeature(CameraFeature Feature) const;
+ virtual void setFeature(CameraFeature Feature, int Value, bool bIgnoreOldValue=false);
+ virtual void setFeatureOneShot(CameraFeature Feature);
+ virtual int getWhitebalanceU() const;
+ virtual int getWhitebalanceV() const;
+ virtual void setWhitebalance(int u, int v, bool bIgnoreOldValue=false);
+
+ static void dumpCameras();
+ static int countCameras();
+ static CameraInfo* getCameraInfos(int deviceNumber);
+
+private:
+ int getCamIndex(long long guid);
+ void internalGetFeature(CameraFeature Feature, unsigned short* val1,
+ unsigned short* val2) const;
+ void enablePtGreyBayer();
+ void checkCMUError(int code, int type, const std::string& sMsg) const;
+ void checkCMUWarning(bool bOk, const std::string& sMsg) const;
+ std::string CMUErrorToString(int code);
+
+ static void getCameraControls(C1394Camera* pCamera, CameraInfo* camInfo);
+ static void getCameraImageFormats(C1394Camera* pCamera, CameraInfo* pCamInfo);
+ static void getCameraFramerates(C1394Camera* pCamera, unsigned long videoFormat,
+ unsigned long videoMode, FrameratesVector &framerates);
+
+ std::string m_sDevice;
+
+ mutable C1394Camera * m_pCamera; // The CMU1394 lib is not const-correct.
+ FeatureMap m_Features;
+ int m_WhitebalanceU;
+ int m_WhitebalanceV;
+};
+
+}
+
+#endif
diff --git a/src/imaging/CMUCameraUtils.cpp b/src/imaging/CMUCameraUtils.cpp
new file mode 100644
index 0000000..3e10570
--- /dev/null
+++ b/src/imaging/CMUCameraUtils.cpp
@@ -0,0 +1,369 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+// Original author of this file is Nick Hebner (hebnern@gmail.com).
+//
+
+#include "CMUCameraUtils.h"
+
+#include "../base/Logger.h"
+#include "../base/Exception.h"
+#include "../base/StringHelper.h"
+
+namespace avg {
+
+using namespace std;
+
+#define FORMAT_0 0
+// Format 0 Modes
+#define MODE_160_120_YUV444 0
+#define MODE_320x240_YUV422 1
+#define MODE_640x480_YUV411 2
+#define MODE_640x480_YUV422 3
+#define MODE_640x480_RGB 4
+#define MODE_640x480_MONO 5
+#define MODE_640x480_MONO16 6
+
+#define FORMAT_1 1
+// Format 1 Modes
+#define MODE_800x600_YUV422 0
+#define MODE_800x600_RGB 1
+#define MODE_800x600_MONO 2
+#define MODE_1024x768_YUV422 3
+#define MODE_1024x768_RGB 4
+#define MODE_1024x768_MONO 5
+#define MODE_800x600_MONO16 6
+#define MODE_1024x768_MONO16 7
+
+#define FORMAT_2 2
+#define MODE_1280x960_YUV422 0
+#define MODE_1280x960_RGB 1
+#define MODE_1280x960_MONO 2
+#define MODE_1600x1200_YUV422 3
+#define MODE_1600x1200_RGB 4
+#define MODE_1600x1200_MONO 5
+#define MODE_1280x960_MONO16 6
+#define MODE_1600x1200_MONO16 7
+
+// Framerates
+#define FRAMERATE_1_875 0
+#define FRAMERATE_3_75 1
+#define FRAMERATE_7_5 2
+#define FRAMERATE_15 3
+#define FRAMERATE_30 4
+#define FRAMERATE_60 5
+#define FRAMERATE_120 6
+#define FRAMERATE_240 7
+
+void getVideoFormatAndMode(IntPoint& Size, PixelFormat pf,
+ unsigned long* pVideoFormat, unsigned long* pVideoMode)
+{
+ *pVideoMode = -1;
+ *pVideoFormat = -1;
+ if (Size.x == 320 && Size.y == 240) {
+ *pVideoFormat = FORMAT_0;
+ if (pf == YCbCr422) {
+ *pVideoMode = MODE_320x240_YUV422;
+ }
+ } else if (Size.x == 640 && Size.y == 480) {
+ *pVideoFormat = FORMAT_0;
+ if (pf == I8 || pf == BAYER8) {
+ *pVideoMode = MODE_640x480_MONO;
+ } else if (pf == I16) {
+ *pVideoMode = MODE_640x480_MONO16;
+ } else if (pf == YCbCr411) {
+ *pVideoMode = MODE_640x480_YUV411;
+ } else if (pf == YCbCr422) {
+ *pVideoMode = MODE_640x480_YUV422;
+ } else if (pf == R8G8B8 || pf == B8G8R8) {
+ *pVideoMode = MODE_640x480_RGB;
+ }
+ } else if (Size.x == 800 && Size.y == 600) {
+ *pVideoFormat = FORMAT_1;
+ if (pf == I8 || pf == BAYER8) {
+ *pVideoMode = MODE_800x600_MONO;
+ } else if (pf == I16) {
+ *pVideoMode = MODE_800x600_MONO16;
+ } else if (pf == YCbCr422) {
+ *pVideoMode = MODE_800x600_YUV422;
+ } else if (pf == R8G8B8 || pf == B8G8R8) {
+ *pVideoMode = MODE_800x600_RGB;
+ }
+ } else if (Size.x == 1024 && Size.y == 768) {
+ *pVideoFormat = FORMAT_1;
+ if (pf == I8 || pf == BAYER8) {
+ *pVideoMode = MODE_1024x768_MONO;
+ } else if (pf == I16) {
+ *pVideoMode = MODE_1024x768_MONO16;
+ } else if (pf == YCbCr422) {
+ *pVideoMode = MODE_1024x768_YUV422;
+ } else if (pf == R8G8B8 || pf == B8G8R8) {
+ *pVideoMode = MODE_1024x768_RGB;
+ }
+ } else if (Size.x == 1280 && Size.y == 960) {
+ *pVideoFormat = FORMAT_2;
+ if (pf == I8 || pf == BAYER8) {
+ *pVideoMode = MODE_1280x960_MONO;
+ } else if (pf == I16) {
+ *pVideoMode = MODE_1280x960_MONO16;
+ } else if (pf == YCbCr422) {
+ *pVideoMode = MODE_1280x960_YUV422;
+ } else if (pf == R8G8B8 || pf == B8G8R8) {
+ *pVideoMode = MODE_1280x960_RGB;
+ }
+ } else if (Size.x == 1600 && Size.y == 1200) {
+ *pVideoFormat = FORMAT_2;
+ if (pf == I8 || pf == BAYER8) {
+ *pVideoMode = MODE_1600x1200_MONO;
+ } else if (pf == I16) {
+ *pVideoMode = MODE_1600x1200_MONO16;
+ } else if (pf == YCbCr422) {
+ *pVideoMode = MODE_1600x1200_YUV422;
+ } else if (pf == R8G8B8 || pf == B8G8R8) {
+ *pVideoMode = MODE_1600x1200_RGB;
+ }
+ }
+ if (*pVideoMode == -1 || *pVideoFormat == -1) {
+ throw Exception(AVG_ERR_INVALID_ARGS,
+ "Unsupported or illegal camera mode ("+toString(Size.x)+", "+toString(Size.y)+
+ "), "+getPixelFormatString(pf)+".");
+ }
+}
+
+unsigned long getFrameRateConst(float frameRate)
+{
+ if (frameRate == 1.875f) {
+ return FRAMERATE_1_875;
+ } else if (frameRate == 3.75f) {
+ return FRAMERATE_3_75;
+ } else if (frameRate == 7.5f) {
+ return FRAMERATE_7_5;
+ } else if (frameRate == 15) {
+ return FRAMERATE_15;
+ } else if (frameRate == 30) {
+ return FRAMERATE_30;
+ } else if (frameRate == 60) {
+ return FRAMERATE_60;
+ } else if (frameRate == 120) {
+ return FRAMERATE_120;
+ } else if (frameRate == 240) {
+ return FRAMERATE_240;
+ } else {
+ throw Exception(AVG_ERR_INVALID_ARGS,
+ "Unsupported or illegal value ("+toString(frameRate)+
+ ") for camera framerate.");
+ }
+}
+
+float getFrameRateFloat(unsigned long frameRate)
+{
+ if(frameRate == FRAMERATE_1_875){
+ return 1.875;
+ } else if (frameRate == FRAMERATE_3_75){
+ return 3.75;
+ } else if (frameRate == FRAMERATE_7_5){
+ return 7.5;
+ } else if (frameRate == FRAMERATE_15){
+ return 15;
+ } else if (frameRate == FRAMERATE_30){
+ return 30;
+ } else if (frameRate == FRAMERATE_60){
+ return 60;
+ } else if (frameRate == FRAMERATE_120){
+ return 120;
+ } else if (frameRate == FRAMERATE_240){
+ return 240;
+ } else {
+ throw Exception(AVG_ERR_INVALID_ARGS,
+ "Unsupported or illegal value ("+toString(frameRate)+
+ ") as camera framerate.");
+ }
+}
+
+CAMERA_FEATURE getFeatureID(CameraFeature Feature)
+{
+ switch(Feature) {
+ case CAM_FEATURE_BRIGHTNESS:
+ return FEATURE_BRIGHTNESS;
+ case CAM_FEATURE_EXPOSURE:
+ return FEATURE_AUTO_EXPOSURE;
+ case CAM_FEATURE_SHARPNESS:
+ return FEATURE_SHARPNESS;
+ case CAM_FEATURE_WHITE_BALANCE:
+ return FEATURE_WHITE_BALANCE;
+ case CAM_FEATURE_HUE:
+ return FEATURE_HUE;
+ case CAM_FEATURE_SATURATION:
+ return FEATURE_SATURATION;
+ case CAM_FEATURE_GAMMA:
+ return FEATURE_GAMMA;
+ case CAM_FEATURE_SHUTTER:
+ return FEATURE_SHUTTER;
+ case CAM_FEATURE_GAIN:
+ return FEATURE_GAIN;
+ case CAM_FEATURE_IRIS:
+ return FEATURE_IRIS;
+ case CAM_FEATURE_FOCUS:
+ return FEATURE_FOCUS;
+ case CAM_FEATURE_TEMPERATURE:
+ return FEATURE_TEMPERATURE;
+ case CAM_FEATURE_TRIGGER:
+ return FEATURE_TRIGGER_MODE;
+ case CAM_FEATURE_ZOOM:
+ return FEATURE_ZOOM;
+ case CAM_FEATURE_PAN:
+ return FEATURE_PAN;
+ case CAM_FEATURE_TILT:
+ return FEATURE_TILT;
+ case CAM_FEATURE_OPTICAL_FILTER:
+ return FEATURE_OPTICAL_FILTER;
+ case CAM_FEATURE_CAPTURE_SIZE:
+ return FEATURE_CAPTURE_SIZE;
+ case CAM_FEATURE_CAPTURE_QUALITY:
+ return FEATURE_CAPTURE_QUALITY;
+ default:
+ return FEATURE_INVALID_FEATURE;
+ }
+}
+
+void getImageSizeAndPF(unsigned long videoFormat, unsigned long videoMode,
+ IntPoint &pSize, PixelFormat &pPixelFormat)
+{
+ int format = (int) videoFormat;
+ int mode = (int) videoMode;
+ switch(format) {
+ case FORMAT_0: {
+ if (mode == MODE_160_120_YUV444) {
+ pSize = IntPoint(160,120);
+ pPixelFormat = PixelFormat(NO_PIXELFORMAT); //Not supported by libavg
+ return;
+ } else if (mode == MODE_320x240_YUV422) {
+ pSize = IntPoint(320,240);
+ pPixelFormat = PixelFormat(YCbCr422);
+ return;
+ } else if (mode == MODE_640x480_YUV411) {
+ pSize = IntPoint(640,480);
+ pPixelFormat = PixelFormat(YCbCr411);
+ return;
+ } else if (mode == MODE_640x480_YUV422) {
+ pSize = IntPoint(640,480);
+ pPixelFormat = PixelFormat(YCbCr422);
+ return;
+ } else if (mode == MODE_640x480_RGB) {
+ pSize = IntPoint(640,480);
+ pPixelFormat = PixelFormat(R8G8B8);
+ return;
+ } else if (mode == MODE_640x480_MONO) {
+ pSize = IntPoint(640,480);
+ pPixelFormat = PixelFormat(I8);
+ return;
+ } else if (mode == MODE_640x480_MONO16) {
+ pSize = IntPoint(640,480);
+ pPixelFormat = PixelFormat(I16);
+ return;
+ } else {
+ AVG_ASSERT(false);
+ return;
+ }
+ break;
+ } case FORMAT_1: {
+ if (mode == MODE_800x600_YUV422) {
+ pSize = IntPoint(800,600);
+ pPixelFormat = PixelFormat(YCbCr422);
+ return;
+ } else if (mode == MODE_800x600_RGB) {
+ pSize = IntPoint(800,600);
+ pPixelFormat = PixelFormat(R8G8B8);
+ return;
+ } else if (mode == MODE_800x600_MONO) {
+ pSize = IntPoint(800,600);
+ pPixelFormat = PixelFormat(I8);
+ return;
+ } else if (mode == MODE_1024x768_YUV422) {
+ pSize = IntPoint(1024,768);
+ pPixelFormat = PixelFormat(YCbCr422);
+ return;
+ } else if (mode == MODE_1024x768_RGB) {
+ pSize = IntPoint(1024,768);
+ pPixelFormat = PixelFormat(R8G8B8);
+ return;
+ } else if (mode == MODE_1024x768_MONO) {
+ pSize = IntPoint(1024,768);
+ pPixelFormat = PixelFormat(I8);
+ return;
+ } else if (mode == MODE_800x600_MONO16) {
+ pSize = IntPoint(800,600);
+ pPixelFormat = PixelFormat(I16);
+ return;
+ } else if (mode == MODE_1024x768_MONO16) {
+ pSize = IntPoint(1024,768);
+ pPixelFormat = PixelFormat(I16);
+ return;
+ } else {
+ AVG_ASSERT(false);
+ return;
+ }
+ break;
+ } case FORMAT_2: {
+ if (mode == MODE_1280x960_YUV422) {
+ pSize = IntPoint(1280,960);
+ pPixelFormat = PixelFormat(YCbCr422);
+ return;
+ } else if (mode == MODE_1280x960_RGB) {
+ pSize = IntPoint(1280,960);
+ pPixelFormat = PixelFormat(R8G8B8);
+ return;
+ } else if (mode == MODE_1280x960_MONO) {
+ pSize = IntPoint(1280,960);
+ pPixelFormat = PixelFormat(I8);
+ return;
+ } else if (mode == MODE_1600x1200_YUV422) {
+ pSize = IntPoint(1600,1200);
+ pPixelFormat = PixelFormat(YCbCr422);
+ return;
+ } else if (mode == MODE_1600x1200_RGB) {
+ pSize = IntPoint(1600,1200);
+ pPixelFormat = PixelFormat(R8G8B8);
+ return;
+ } else if (mode == MODE_1600x1200_MONO) {
+ pSize = IntPoint(1600,1200);
+ pPixelFormat = PixelFormat(I8);
+ return;
+ } else if (mode == MODE_1280x960_MONO16) {
+ pSize = IntPoint(1280,960);
+ pPixelFormat = PixelFormat(I16);
+ return;
+ } else if (mode == MODE_1600x1200_MONO16) {
+ pSize = IntPoint(1600,1200);
+ pPixelFormat = PixelFormat(I16);
+ return;
+ } else {
+ AVG_ASSERT(false);
+ return;
+ }
+ break;
+ } default: {
+ AVG_ASSERT(false);
+ return;
+ }
+ }
+}
+
+}
diff --git a/src/imaging/CMUCameraUtils.h b/src/imaging/CMUCameraUtils.h
new file mode 100644
index 0000000..0d00c9f
--- /dev/null
+++ b/src/imaging/CMUCameraUtils.h
@@ -0,0 +1,46 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+// Original author of this file is Nick Hebner (hebnern@gmail.com).
+//
+
+#ifndef _CMUCameraUtils_H_
+#define _CMUCameraUtils_H_
+
+#include "../api.h"
+#include "Camera.h"
+
+#include <windows.h>
+#include <1394Camera.h>
+
+#include <string>
+
+namespace avg {
+
+void getVideoFormatAndMode(IntPoint& Size, PixelFormat pf,
+ unsigned long* pVideoFormat, unsigned long* pVideoMode);
+unsigned long getFrameRateConst(float FrameRate);
+float getFrameRateFloat(unsigned long FrameRate);
+CAMERA_FEATURE getFeatureID(CameraFeature Feature);
+void getImageSizeAndPF(unsigned long videoFormat, unsigned long videoMode,
+ IntPoint &pSize, PixelFormat &pPixelFormat);
+}
+
+#endif
diff --git a/src/imaging/Camera.cpp b/src/imaging/Camera.cpp
new file mode 100644
index 0000000..51d778e
--- /dev/null
+++ b/src/imaging/Camera.cpp
@@ -0,0 +1,301 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+
+#include "Camera.h"
+
+#include "../base/Logger.h"
+#include "../base/Exception.h"
+#include "../base/ScopeTimer.h"
+#include "../graphics/Filterfliprgb.h"
+
+#if defined(AVG_ENABLE_1394_2)
+#include "../imaging/FWCamera.h"
+#endif
+#ifdef AVG_ENABLE_V4L2
+#include "../imaging/V4LCamera.h"
+#endif
+#ifdef AVG_ENABLE_CMU1394
+#include "../imaging/CMUCamera.h"
+#endif
+#ifdef AVG_ENABLE_DSHOW
+#include "../imaging/DSCamera.h"
+#endif
+#include "../imaging/FakeCamera.h"
+
+#include <cstdlib>
+#include <string.h>
+
+#ifdef WIN32
+#define strtoll(p, e, b) _strtoi64(p, e, b)
+#endif
+
+namespace avg {
+
+using namespace std;
+
+Camera::Camera(PixelFormat camPF, PixelFormat destPF, IntPoint size, float frameRate)
+ : m_CamPF(camPF),
+ m_DestPF(destPF),
+ m_Size(size),
+ m_FrameRate(frameRate)
+{
+// cerr << "Camera: " << getPixelFormatString(camPF) << "-->"
+// << getPixelFormatString(destPF) << endl;
+}
+
+PixelFormat Camera::getCamPF() const
+{
+ return m_CamPF;
+}
+
+void Camera::setCamPF(PixelFormat pf)
+{
+ m_CamPF = pf;
+}
+
+PixelFormat Camera::getDestPF() const
+{
+ return m_DestPF;
+}
+
+static ProfilingZoneID CameraConvertProfilingZone("Camera format conversion", true);
+
+BitmapPtr Camera::convertCamFrameToDestPF(BitmapPtr pCamBmp)
+{
+ ScopeTimer Timer(CameraConvertProfilingZone);
+ BitmapPtr pDestBmp = BitmapPtr(new Bitmap(pCamBmp->getSize(), m_DestPF));
+ pDestBmp->copyPixels(*pCamBmp);
+ if (m_CamPF == R8G8B8 && m_DestPF == B8G8R8X8) {
+ pDestBmp->setPixelFormat(R8G8B8X8);
+ FilterFlipRGB().applyInPlace(pDestBmp);
+ }
+ if (m_CamPF != R8G8B8 && m_DestPF == R8G8B8X8) {
+ pDestBmp->setPixelFormat(B8G8R8X8);
+ FilterFlipRGB().applyInPlace(pDestBmp);
+ }
+
+ return pDestBmp;
+}
+
+IntPoint Camera::getImgSize()
+{
+ return m_Size;
+}
+
+float Camera::getFrameRate() const
+{
+ return m_FrameRate;
+}
+
+PixelFormat Camera::fwBayerStringToPF(unsigned long reg)
+{
+ string sBayerFormat((char*)&reg, 4);
+ if (sBayerFormat == "RGGB") {
+ return BAYER8_RGGB;
+ } else if (sBayerFormat == "GBRG") {
+ return BAYER8_GBRG;
+ } else if (sBayerFormat == "GRBG") {
+ return BAYER8_GRBG;
+ } else if (sBayerFormat == "BGGR") {
+ return BAYER8_BGGR;
+ } else if (sBayerFormat == "YYYY") {
+ return I8;
+ } else {
+ AVG_ASSERT(false);
+ return I8;
+ }
+}
+
+void Camera::setImgSize(const IntPoint& size)
+{
+ m_Size = size;
+}
+
+string cameraFeatureToString(CameraFeature feature)
+{
+ switch (feature) {
+ case CAM_FEATURE_BRIGHTNESS:
+ return "brightness";
+ case CAM_FEATURE_EXPOSURE:
+ return "exposure";
+ case CAM_FEATURE_SHARPNESS:
+ return "sharpness";
+ case CAM_FEATURE_WHITE_BALANCE:
+ return "white balance";
+ case CAM_FEATURE_HUE:
+ return "hue";
+ case CAM_FEATURE_SATURATION:
+ return "saturation";
+ case CAM_FEATURE_GAMMA:
+ return "gamma";
+ case CAM_FEATURE_SHUTTER:
+ return "shutter";
+ case CAM_FEATURE_GAIN:
+ return "gain";
+ case CAM_FEATURE_IRIS:
+ return "iris";
+ case CAM_FEATURE_FOCUS:
+ return "focus";
+ case CAM_FEATURE_TEMPERATURE:
+ return "temperature";
+ case CAM_FEATURE_TRIGGER:
+ return "trigger";
+ case CAM_FEATURE_TRIGGER_DELAY:
+ return "trigger delay";
+ case CAM_FEATURE_WHITE_SHADING:
+ return "white shading";
+ case CAM_FEATURE_ZOOM:
+ return "zoom";
+ case CAM_FEATURE_PAN:
+ return "pan";
+ case CAM_FEATURE_TILT:
+ return "tilt";
+ case CAM_FEATURE_OPTICAL_FILTER:
+ return "optical filter";
+ case CAM_FEATURE_CAPTURE_SIZE:
+ return "capture size";
+ case CAM_FEATURE_CAPTURE_QUALITY:
+ return "capture quality";
+ case CAM_FEATURE_CONTRAST:
+ return "contrast";
+ case CAM_FEATURE_STROBE_DURATION:
+ return "strobe duration";
+ default:
+ return "unknown";
+ }
+}
+
+CameraPtr createCamera(const string& sDriver, const string& sDevice, int unit,
+ bool bFW800, const IntPoint& captureSize, PixelFormat camPF, PixelFormat destPF,
+ float frameRate)
+{
+ CameraPtr pCamera;
+ try {
+ if (sDriver == "firewire") {
+ char * pszErr;
+ long long guid = strtoll(sDevice.c_str(), &pszErr, 16);
+ if (strlen(pszErr)) {
+ throw Exception(AVG_ERR_INVALID_ARGS, "'"+sDevice
+ +"' is not a valid GUID.");
+ }
+#if defined(AVG_ENABLE_1394_2)
+ pCamera = CameraPtr(new FWCamera(guid, unit, bFW800, captureSize, camPF,
+ destPF, frameRate));
+#elif defined(AVG_ENABLE_CMU1394)
+ if (unit != -1) {
+ throw Exception(AVG_ERR_INVALID_ARGS,
+ "camera 'unit' attribute is not supported when using the cmu firewire driver.");
+ }
+ pCamera = CameraPtr(new CMUCamera(guid, bFW800, captureSize, camPF, destPF,
+ frameRate));
+#else
+ (void)guid; // Silence compiler warning
+ AVG_LOG_WARNING("Firewire camera specified, but firewire "
+ "support not compiled in.");
+#endif
+ } else if (sDriver == "video4linux") {
+#if defined(AVG_ENABLE_V4L2)
+ pCamera = CameraPtr(new V4LCamera(sDevice, unit, captureSize, camPF,
+ destPF, frameRate));
+#else
+ AVG_LOG_WARNING("Video4Linux camera specified, but "
+ "Video4Linux support not compiled in.");
+#endif
+ } else if (sDriver == "directshow") {
+#if defined(AVG_ENABLE_DSHOW)
+ if (unit != -1) {
+ throw Exception(AVG_ERR_INVALID_ARGS,
+ "camera 'unit' attribute is not supported when using the directshow driver.");
+ }
+ pCamera = CameraPtr(new DSCamera(sDevice, captureSize, camPF, destPF,
+ frameRate));
+#else
+ AVG_LOG_WARNING("DirectShow camera specified, but "
+ "DirectShow is only available under windows.");
+#endif
+ } else {
+ throw Exception(AVG_ERR_INVALID_ARGS,
+ "Unable to set up camera. Camera source '"+sDriver+"' unknown.");
+ }
+ } catch (const Exception& e) {
+ if (e.getCode() == AVG_ERR_CAMERA_NONFATAL) {
+ AVG_LOG_WARNING(e.getStr());
+ } else {
+ throw;
+ }
+
+ }
+ if (!pCamera) {
+ pCamera = CameraPtr(new FakeCamera(camPF, destPF));
+ }
+ return pCamera;
+
+}
+
+std::vector<CameraInfo> getCamerasInfos()
+{
+ std::vector<CameraInfo> camerasInfo;
+
+#ifdef AVG_ENABLE_1394_2
+ int amountFWCameras = FWCamera::countCameras();
+ for (int i = 0; i < amountFWCameras; i++) {
+ CameraInfo* camInfo = FWCamera::getCameraInfos(i);
+ if (camInfo != NULL) {
+ camInfo->checkAddBayer8();
+ camerasInfo.push_back(*camInfo);
+ }
+ }
+#endif
+#ifdef AVG_ENABLE_CMU1394
+ int amountCMUCameras = CMUCamera::countCameras();
+ for (int i = 0; i < amountCMUCameras; i++) {
+ CameraInfo* camInfo = CMUCamera::getCameraInfos(i);
+ if (camInfo != NULL) {
+ camInfo->checkAddBayer8();
+ camerasInfo.push_back(*camInfo);
+ }
+ }
+#endif
+#ifdef AVG_ENABLE_DSHOW
+ int amountDSCameras = DSCamera::countCameras();
+ for (int i = 0; i < amountDSCameras; i++) {
+ CameraInfo* camInfo = DSCamera::getCameraInfos(i);
+ if (camInfo != NULL) {
+ camInfo->checkAddBayer8();
+ camerasInfo.push_back(*camInfo);
+ }
+ }
+#endif
+#ifdef AVG_ENABLE_V4L2
+ int amountV4LCameras = V4LCamera::countCameras();
+ for (int i = 0; i < amountV4LCameras; i++) {
+ CameraInfo* camInfo = V4LCamera::getCameraInfos(i);
+ if (camInfo != NULL) {
+ camInfo->checkAddBayer8();
+ camerasInfo.push_back(*camInfo);
+ }
+ }
+#endif
+ return camerasInfo;
+}
+
+
+}
diff --git a/src/imaging/Camera.h b/src/imaging/Camera.h
new file mode 100644
index 0000000..9d41574
--- /dev/null
+++ b/src/imaging/Camera.h
@@ -0,0 +1,120 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+
+#ifndef _Camera_H_
+#define _Camera_H_
+
+#include "../avgconfigwrapper.h"
+#include "../graphics/Bitmap.h"
+
+#include <boost/shared_ptr.hpp>
+#include "CameraInfo.h"
+
+#include <string>
+#include <list>
+#include <map>
+
+namespace avg {
+
+enum CameraFeature {
+ CAM_FEATURE_BRIGHTNESS,
+ CAM_FEATURE_EXPOSURE,
+ CAM_FEATURE_SHARPNESS,
+ CAM_FEATURE_WHITE_BALANCE,
+ CAM_FEATURE_HUE,
+ CAM_FEATURE_SATURATION,
+ CAM_FEATURE_GAMMA,
+ CAM_FEATURE_SHUTTER,
+ CAM_FEATURE_GAIN,
+ CAM_FEATURE_IRIS,
+ CAM_FEATURE_FOCUS,
+ CAM_FEATURE_TEMPERATURE,
+ CAM_FEATURE_TRIGGER,
+ CAM_FEATURE_TRIGGER_DELAY,
+ CAM_FEATURE_WHITE_SHADING,
+ CAM_FEATURE_ZOOM,
+ CAM_FEATURE_PAN,
+ CAM_FEATURE_TILT,
+ CAM_FEATURE_OPTICAL_FILTER,
+ CAM_FEATURE_CAPTURE_SIZE,
+ CAM_FEATURE_CAPTURE_QUALITY,
+ CAM_FEATURE_CONTRAST,
+ CAM_FEATURE_STROBE_DURATION,
+ CAM_FEATURE_UNSUPPORTED
+};
+
+class AVG_API Camera
+{
+public:
+ Camera(PixelFormat camPF, PixelFormat destPF, IntPoint size, float frameRate);
+ virtual ~Camera() {};
+ virtual void startCapture() {};
+
+ PixelFormat getCamPF() const;
+ void setCamPF(PixelFormat pf);
+ PixelFormat getDestPF() const;
+ BitmapPtr convertCamFrameToDestPF(BitmapPtr pCamBmp);
+
+ IntPoint getImgSize();
+ float getFrameRate() const;
+ virtual BitmapPtr getImage(bool bWait) = 0;
+
+ virtual const std::string& getDevice() const = 0;
+ virtual const std::string& getDriverName() const = 0;
+
+ virtual int getFeature(CameraFeature feature) const = 0;
+ virtual void setFeature(CameraFeature feature, int Value,
+ bool bIgnoreOldValue=false) = 0;
+ virtual void setFeatureOneShot(CameraFeature feature) = 0;
+ virtual int getWhitebalanceU() const = 0;
+ virtual int getWhitebalanceV() const = 0;
+ virtual void setWhitebalance(int u, int v, bool bIgnoreOldValue=false) = 0;
+
+protected:
+ PixelFormat fwBayerStringToPF(unsigned long reg);
+ void setImgSize(const IntPoint& size);
+
+private:
+ Camera();
+ PixelFormat m_CamPF;
+ PixelFormat m_DestPF;
+
+ IntPoint m_Size;
+ float m_FrameRate;
+};
+
+
+
+std::string cameraFeatureToString(CameraFeature feature);
+
+typedef boost::shared_ptr<Camera> CameraPtr;
+typedef std::map<CameraFeature, int> FeatureMap;
+
+AVG_API CameraPtr createCamera(const std::string& sDriver, const std::string& sDevice,
+ int unit, bool bFW800, const IntPoint& captureSize, PixelFormat camPF,
+ PixelFormat destPF, float frameRate);
+
+AVG_API std::vector<CameraInfo> getCamerasInfos();
+
+}
+
+#endif
+
diff --git a/src/imaging/CameraInfo.cpp b/src/imaging/CameraInfo.cpp
new file mode 100644
index 0000000..b33789f
--- /dev/null
+++ b/src/imaging/CameraInfo.cpp
@@ -0,0 +1,159 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+// V4L2/libavg compliance by 02L > Outside Standing Level
+
+#include "CameraInfo.h"
+
+namespace avg {
+
+CameraImageFormat::CameraImageFormat(IntPoint size, PixelFormat pixelFormat,
+ FrameratesVector framerates)
+{
+ m_Size = size;
+ m_PixelFormat = pixelFormat;
+ m_Framerates = framerates;
+}
+
+CameraImageFormat::~CameraImageFormat()
+{
+
+}
+
+IntPoint CameraImageFormat::getSize()
+{
+ return m_Size;
+}
+
+PixelFormat CameraImageFormat::getPixelFormat()
+{
+ return m_PixelFormat;
+}
+
+FrameratesVector CameraImageFormat::getFramerates()
+{
+ return m_Framerates;
+}
+
+
+CameraControl::CameraControl(const std::string& sControlName, int min, int max,
+ int defaultValue)
+{
+ m_sControlName = sControlName;
+ m_Min = min;
+ m_Max = max;
+ m_DefaultValue = defaultValue;
+}
+
+CameraControl::~CameraControl()
+{
+
+}
+
+std::string CameraControl::getControlName()
+{
+ return m_sControlName;
+}
+
+int CameraControl::getMin()
+{
+ return m_Min;
+}
+
+int CameraControl::getMax()
+{
+ return m_Max;
+}
+
+int CameraControl::getDefault()
+{
+ return m_DefaultValue;
+}
+
+
+CameraInfo::CameraInfo(const std::string& sDriver, const std::string& sDeviceID)
+{
+ m_sDriver = sDriver;
+ m_sDeviceID = sDeviceID;
+}
+
+CameraInfo::~CameraInfo()
+{
+
+}
+
+void CameraInfo::addControl(CameraControl control)
+{
+ m_Controls.push_back(control);
+}
+
+void CameraInfo::addImageFormat(CameraImageFormat format)
+{
+ m_Formats.push_back(format);
+}
+
+std::string CameraInfo::getDriver()
+{
+ return m_sDriver;
+}
+
+std::string CameraInfo::getDeviceID()
+{
+ return m_sDeviceID;
+}
+
+CameraImageFormatsVector CameraInfo::getImageFormats()
+{
+ return m_Formats;
+}
+
+CameraControlsVector CameraInfo::getControls()
+{
+ return m_Controls;
+}
+
+void CameraInfo::checkAddBayer8()
+{
+ CameraImageFormatsVector::iterator it = m_Formats.begin();
+ CameraImageFormatsVector i8ImageFormats;
+ bool hasColor = false;
+ for (; it!=m_Formats.end(); it++) {
+ PixelFormat pf = (*it).getPixelFormat();
+ if (pf == I8) {
+ i8ImageFormats.push_back(*it);
+ }
+ if (hasColor == false) {
+ hasColor = pixelFormatIsColored(pf);
+ }
+ }
+ if (hasColor) {
+ it = i8ImageFormats.begin();
+ for (; it!=i8ImageFormats.end(); it++) {
+ PixelFormat format = BAYER8;
+ IntPoint size = (*it).getSize();
+ FrameratesVector framerates = (*it).getFramerates();
+ CameraImageFormat bayerImageFormat = CameraImageFormat(size, format,
+ framerates);
+ m_Formats.push_back(bayerImageFormat);
+ }
+ }
+}
+
+}
diff --git a/src/imaging/CameraInfo.h b/src/imaging/CameraInfo.h
new file mode 100644
index 0000000..0c5a75b
--- /dev/null
+++ b/src/imaging/CameraInfo.h
@@ -0,0 +1,100 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+
+#ifndef CameraInfo_H_
+#define CameraInfo_H_
+
+#include "../api.h"
+#include "../graphics/PixelFormat.h"
+#include "../base/GLMHelper.h"
+
+#include <string>
+#include <list>
+#include <map>
+
+namespace avg{
+
+typedef std::vector<float> FrameratesVector;
+
+class AVG_API CameraImageFormat
+{
+ public:
+ CameraImageFormat(IntPoint size, PixelFormat pixelFormat,
+ FrameratesVector framerates);
+ ~CameraImageFormat();
+
+ IntPoint getSize();
+ PixelFormat getPixelFormat();
+ FrameratesVector getFramerates();
+
+ private:
+ IntPoint m_Size;
+ PixelFormat m_PixelFormat;
+ FrameratesVector m_Framerates;
+};
+
+class AVG_API CameraControl
+{
+ public:
+ CameraControl(const std::string& sControlName, int min, int max,
+ int defaultValue);
+ ~CameraControl();
+
+ std::string getControlName();
+ int getMin();
+ int getMax();
+ int getDefault();
+
+ private:
+ std::string m_sControlName;
+ int m_Min;
+ int m_Max;
+ int m_DefaultValue;
+};
+
+typedef std::vector<CameraImageFormat> CameraImageFormatsVector;
+typedef std::vector<CameraControl> CameraControlsVector;
+
+class AVG_API CameraInfo
+{
+ public:
+ CameraInfo(const std::string& sDriver, const std::string& sDeviceID);
+ ~CameraInfo();
+
+ void addControl(CameraControl control);
+ void addImageFormat(CameraImageFormat format);
+
+ std::string getDriver();
+ std::string getDeviceID();
+ CameraImageFormatsVector getImageFormats();
+ CameraControlsVector getControls();
+ void checkAddBayer8();
+
+ private:
+ std::string m_sDriver;
+ std::string m_sDeviceID;
+ CameraImageFormatsVector m_Formats;
+ CameraControlsVector m_Controls;
+};
+
+}
+
+#endif /* CAMERAINFO_H_ */
diff --git a/src/imaging/CoordTransformer.cpp b/src/imaging/CoordTransformer.cpp
new file mode 100644
index 0000000..b4d7489
--- /dev/null
+++ b/src/imaging/CoordTransformer.cpp
@@ -0,0 +1,37 @@
+
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+// Original author of this file is igor@c-base.org
+//
+
+#include "CoordTransformer.h"
+
+namespace avg {
+
+CoordTransformer::CoordTransformer()
+{
+}
+
+CoordTransformer::~CoordTransformer()
+{
+}
+
+}
diff --git a/src/imaging/CoordTransformer.h b/src/imaging/CoordTransformer.h
new file mode 100644
index 0000000..b9ce97d
--- /dev/null
+++ b/src/imaging/CoordTransformer.h
@@ -0,0 +1,45 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+
+#ifndef _CoordTransformer_H_
+#define _CoordTransformer_H_
+
+#include "../api.h"
+#include "../base/GLMHelper.h"
+
+#include <boost/shared_ptr.hpp>
+
+namespace avg {
+
+class AVG_API CoordTransformer
+{
+public:
+ CoordTransformer();
+ virtual ~CoordTransformer();
+
+ virtual glm::dvec2 transform_point(const glm::dvec2 & pt) = 0;
+ virtual glm::dvec2 inverse_transform_point(const glm::dvec2 & pt) = 0;
+};
+
+typedef boost::shared_ptr<CoordTransformer> CoordTransformerPtr;
+
+}
+#endif
diff --git a/src/imaging/DSCamera.cpp b/src/imaging/DSCamera.cpp
new file mode 100644
index 0000000..e9e3b3b
--- /dev/null
+++ b/src/imaging/DSCamera.cpp
@@ -0,0 +1,733 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+
+#include <InitGuid.h>
+
+#include "DSHelper.h"
+#include "DSCamera.h"
+#include "DSSampleGrabber.h"
+
+#include "../base/Logger.h"
+#include "../base/Exception.h"
+#include "../base/ScopeTimer.h"
+#include "../graphics/FilterFlip.h"
+#include "../graphics/Filtergrayscale.h"
+
+#include <oleauto.h>
+
+#include <math.h>
+
+#include <sstream>
+
+namespace avg {
+
+using namespace std;
+
+DSCamera::DSCamera(std::string sDevice, IntPoint size, PixelFormat camPF,
+ PixelFormat destPF, float frameRate)
+ : Camera(camPF, destPF, size, frameRate),
+ m_sDevice(sDevice),
+ m_pGraph(0),
+ m_pCapture(0),
+ m_pCameraPropControl(0)
+{
+ open();
+}
+
+DSCamera::~DSCamera()
+{
+ close();
+}
+
+void DSCamera::open()
+{
+ initGraphBuilder();
+ findCaptureDevice(&m_pSrcFilter);
+ if (m_pSrcFilter) {
+ HRESULT hr;
+ hr = m_pGraph->AddFilter(m_pSrcFilter, L"Video Capture");
+ checkForDShowError(hr, "DSCamera::open()::Add capture filter");
+
+ // Create and configure the sample grabber that delivers the frames to the app.
+ m_pGrabFilter = new CSampleGrabber(NULL, &hr);
+ m_pGrabFilter->AddRef();
+ checkForDShowError(hr, "DSCamera::open()::Create SampleGrabber");
+ hr = m_pGrabFilter->QueryInterface(IID_IlibavgGrabber,
+ (void **)&m_pSampleGrabber);
+ checkForDShowError(hr, "DSCamera::open()::Create SampleGrabber 2");
+
+ hr = m_pSrcFilter->QueryInterface(IID_IAMVideoProcAmp,
+ (void **)&m_pCameraPropControl);
+ checkForDShowError(hr, "DSCamera::open()::get IAMVideoProcAmp");
+ hr = m_pSrcFilter->QueryInterface(IID_IAMCameraControl,
+ (void **)&m_pAMCameraControl);
+ checkForDShowError(hr, "DSCamera::open()::get IAMCameraControl");
+
+ hr = m_pGraph->AddFilter(m_pGrabFilter, L"Sample Grabber");
+ checkForDShowError(hr, "DSCamera::open()::Add Grabber");
+ setCaptureFormat();
+
+ checkForDShowError(hr, "DSCamera::open()::SetMediaType");
+
+ m_pSampleGrabber->SetCallback(this);
+
+ IBaseFilter * pNull;
+ hr = CoCreateInstance(CLSID_NullRenderer, NULL, CLSCTX_INPROC_SERVER,
+ IID_IBaseFilter, (LPVOID*) &pNull);
+ checkForDShowError(hr, "DSCamera::open()::Create null filter");
+ m_pGraph->AddFilter(pNull, L"NullRender");
+ pNull->Release();
+
+ connectFilters(m_pGraph, m_pSrcFilter, m_pGrabFilter);
+ connectFilters(m_pGraph, m_pGrabFilter, pNull);
+
+ // Add our graph to the running object table, which will allow
+ // the GraphEdit application to "spy" on our graph.
+ hr = AddGraphToRot(m_pGraph, &m_GraphRegisterID);
+ checkForDShowError(hr, "DSCamera::open()::AddGraphToRot");
+
+ } else {
+ throw (Exception(AVG_ERR_CAMERA_NONFATAL, "DS Camera unavailable"));
+ }
+}
+
+void DSCamera::startCapture()
+{
+ HRESULT hr = m_pMediaControl->Run();
+ checkForDShowError(hr, "DSCamera::open()::Run");
+}
+
+void DSCamera::close()
+{
+ if (m_pAMCameraControl) {
+ m_pAMCameraControl->Release();
+ }
+ m_pMediaControl->Stop();
+ RemoveGraphFromRot(m_GraphRegisterID);
+ m_pGraph->Release();
+ m_pCapture->Release();
+ m_pMediaControl->Release();
+ if (m_pCameraPropControl) {
+ m_pCameraPropControl->Release();
+ }
+ m_pSrcFilter->Release();
+ m_pGrabFilter->Release();
+ m_pSampleGrabber->Release();
+}
+
+BitmapPtr DSCamera::getImage(bool bWait)
+{
+ BitmapPtr pBmp;
+ try {
+ pBmp = m_BitmapQ.pop(bWait);
+ } catch (Exception&) {
+ return BitmapPtr();
+ }
+
+ return pBmp;
+}
+
+void DSCamera::setCaptureFormat()
+{
+ IAMStreamConfig *pSC;
+ HRESULT hr = m_pCapture->FindInterface(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Video,
+ m_pSrcFilter, IID_IAMStreamConfig, (void **)&pSC);
+ checkForDShowError(hr, "DSCamera::setCaptureFormat::FindInterface");
+
+ int numCaps = 0;
+ int capsSize = 0;
+ hr = pSC->GetNumberOfCapabilities(&numCaps, &capsSize);
+ checkForDShowError(hr, "DSCamera::dumpMediaTypes::GetNumberOfCapabilities");
+
+ AVG_ASSERT(capsSize == sizeof(VIDEO_STREAM_CONFIG_CAPS));
+ bool bFormatFound = false;
+ bool bCloseFormatFound = false;
+ AM_MEDIA_TYPE* pmtConfig;
+ AM_MEDIA_TYPE* pmtCloseConfig;
+ vector<string> sImageFormats;
+ VIDEOINFOHEADER* pvih;
+ BITMAPINFOHEADER bih;
+ PixelFormat capsPF;
+ for (int i = 0; i < numCaps; i++) {
+ VIDEO_STREAM_CONFIG_CAPS scc;
+ hr = pSC->GetStreamCaps(i, &pmtConfig, (BYTE*)&scc);
+ checkForDShowError(hr, "DSCamera::dumpMediaTypes::GetStreamCaps");
+ pvih = (VIDEOINFOHEADER*)(pmtConfig->pbFormat);
+ bih = pvih->bmiHeader;
+ float frameRate = float(10000000L/pvih->AvgTimePerFrame);
+ capsPF = mediaSubtypeToPixelFormat(pmtConfig->subtype);
+
+ if (capsPF != NO_PIXELFORMAT && bih.biWidth != 0) {
+ sImageFormats.push_back(camImageFormatToString(pmtConfig));
+ }
+
+ bool bFormatUsed = false;
+ int height = bih.biHeight;
+ if (height < 0) {
+ height = -height;
+ }
+ if (bih.biWidth == getImgSize().x && height == getImgSize().y &&
+ (getCamPF() == capsPF || (getCamPF() == BAYER8_GBRG && capsPF == I8)))
+ {
+ if (fabs(getFrameRate()-frameRate) < 0.001) {
+ bFormatFound = true;
+ break;
+ } else if (!bCloseFormatFound) {
+ // The current format fits everything but the framerate.
+ // Not all framerates are reported, so we're going to try this one as
+ // well.
+ bCloseFormatFound = true;
+ bFormatUsed = true;
+ pmtCloseConfig = pmtConfig;
+ }
+ }
+ if (!bFormatUsed) {
+ CoTaskMemFree((PVOID)pmtConfig->pbFormat);
+ CoTaskMemFree(pmtConfig);
+ }
+ }
+ if (bFormatFound) {
+ AVG_TRACE(Logger::category::CONFIG, Logger::severity::INFO,
+ "Camera image format: " << camImageFormatToString(pmtConfig));
+ int height = ((VIDEOINFOHEADER*)(pmtConfig->pbFormat))->bmiHeader.biHeight;
+ m_bUpsideDown = (height > 0);
+ hr = pSC->SetFormat(pmtConfig);
+ checkForDShowError(hr, "DSCamera::dumpMediaTypes::SetFormat");
+ CoTaskMemFree((PVOID)pmtConfig->pbFormat);
+ CoTaskMemFree(pmtConfig);
+ } else {
+ if (bCloseFormatFound) {
+ // Set the framerate manually.
+ pvih = (VIDEOINFOHEADER*)(pmtCloseConfig->pbFormat);
+ pvih->AvgTimePerFrame = REFERENCE_TIME(10000000/getFrameRate());
+ int height = pvih->bmiHeader.biHeight;
+ m_bUpsideDown = (height > 0);
+ hr = pSC->SetFormat(pmtCloseConfig);
+ checkForDShowError(hr, "DSCamera::dumpMediaTypes::SetFormat");
+ AVG_TRACE(Logger::category::CONFIG, Logger::severity::INFO,
+ "Camera image format: " << camImageFormatToString(pmtCloseConfig));
+ CoTaskMemFree((PVOID)pmtCloseConfig->pbFormat);
+ CoTaskMemFree(pmtCloseConfig);
+
+ // TODO: Check if framerate is actually attained.
+ } else {
+ AVG_LOG_WARNING("Possibly incomplete list of camera image formats: ");
+ for (unsigned i = 0; i < sImageFormats.size(); i++) {
+ AVG_LOG_WARNING(" " << sImageFormats[i]);
+ }
+ throw Exception(AVG_ERR_CAMERA_NONFATAL,
+ "Could not find requested camera image format.");
+ }
+ }
+ pSC->Release();
+}
+
+
+const string& DSCamera::getDevice() const
+{
+ return m_sDevice;
+}
+
+const std::string& DSCamera::getDriverName() const
+{
+ static string sDriverName = "directshow";
+ return sDriverName;
+}
+
+int DSCamera::getFeature(CameraFeature feature) const
+{
+ long prop = getDSFeatureID(feature);
+ long val;
+ long flags;
+ HRESULT hr;
+ if (isDSFeatureCamControl(feature)) {
+ hr = m_pAMCameraControl->Get(prop, &val, &flags);
+ } else {
+ hr = m_pCameraPropControl->Get(prop, &val, &flags);
+ }
+ if (!SUCCEEDED(hr)) {
+ AVG_LOG_WARNING("DSCamera::getFeature " + cameraFeatureToString(feature)+
+ " failed.");
+ return 0;
+ }
+ return val;
+}
+
+void DSCamera::setFeature(CameraFeature feature, int value, bool bIgnoreOldValue)
+{
+ long prop = getDSFeatureID(feature);
+ if (!m_pCameraPropControl) {
+ return;
+ }
+ long flags;
+ if (value == -1) {
+ flags = VideoProcAmp_Flags_Auto;
+ } else {
+ flags = VideoProcAmp_Flags_Manual;
+ }
+ HRESULT hr;
+ if (isDSFeatureCamControl(feature)) {
+ hr = m_pAMCameraControl->Set(prop, value, flags);
+ } else {
+ hr = m_pCameraPropControl->Set(prop, value, flags);
+ }
+ switch (hr) {
+ case E_INVALIDARG:
+ // TODO: Throw exception
+ AVG_LOG_ERROR("DSCamera::setFeature(" << cameraFeatureToString(feature) <<
+ ", " << value << ") failed.");
+ break;
+ case E_PROP_ID_UNSUPPORTED:
+ case E_PROP_SET_UNSUPPORTED:
+ AVG_LOG_ERROR("DSCamera::setFeature(" << cameraFeatureToString(feature)
+ << ") failed: Feature not supported by camera.");
+ break;
+ default:
+ checkForDShowError(hr, "DSCamera::setFeature()::Set value");
+ }
+}
+
+void DSCamera::setFeatureOneShot(CameraFeature feature)
+{
+ AVG_LOG_WARNING(
+ "OneShot feature setting not implemented for DirectShow camera driver.");
+}
+
+int DSCamera::getWhitebalanceU() const
+{
+ AVG_LOG_WARNING(
+ "Whitebalance not implemented for DirectShow camera driver.");
+ return 0;
+}
+
+int DSCamera::getWhitebalanceV() const
+{
+ AVG_LOG_WARNING(
+ "Whitebalance not implemented for DirectShow camera driver.");
+ return 0;
+}
+
+void DSCamera::setWhitebalance(int u, int v, bool bIgnoreOldValue)
+{
+ AVG_LOG_WARNING(
+ "Whitebalance not implemented for DirectShow camera driver.");
+}
+
+void DSCamera::onSample(IMediaSample * pSample)
+{
+ unsigned char * pData;
+
+ // Get the current image.
+ pSample->GetPointer(&pData);
+
+ int stride = getImgSize().x*getBytesPerPixel(getCamPF());
+ Bitmap camBmp(getImgSize(), getCamPF(), pData, stride, false, "CameraImage");
+ // Copy over to bitmap queue, doing pixel format conversion if necessary.
+ BitmapPtr pDestBmp = BitmapPtr(new Bitmap(getImgSize(), getDestPF(),
+ "ConvertedCameraImage"));
+ pDestBmp->copyPixels(camBmp);
+
+ if (m_bUpsideDown) {
+ FilterFlip().applyInPlace(pDestBmp);
+ }
+
+ m_BitmapQ.push(pDestBmp);
+}
+
+int DSCamera::countCameras()
+{
+ int count = 0;
+ HRESULT hr = S_OK;
+ hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
+ checkForDShowError(hr, "DSCamera::countCameras()::CoInitializeEx");
+
+ ICreateDevEnum *pDevEnum =NULL;
+ hr = CoCreateInstance(CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC,
+ IID_ICreateDevEnum, (void **) &pDevEnum);
+ checkForDShowError(hr, "DSCamera::countCameras()::CreateDevEnum");
+
+ IEnumMoniker *pClassEnum = NULL;
+ hr = pDevEnum->CreateClassEnumerator(CLSID_VideoInputDeviceCategory, &pClassEnum, 0);
+ checkForDShowError(hr, "DSCamera::countCameras()::CreateClassEnumerator");
+
+ if (pClassEnum == NULL) {
+ pDevEnum->Release();
+ return count;
+ }
+ IMoniker* pMoniker = NULL;
+ while (pClassEnum->Next(1, &pMoniker, NULL) == S_OK) {
+ count += 1;
+ }
+ pMoniker->Release();
+ pClassEnum->Release();
+ pDevEnum->Release();
+ return count;
+}
+
+CameraInfo* DSCamera::getCameraInfos(int deviceNumber)
+{
+#ifdef AVG_ENABLE_DSHOW
+ HRESULT hr = S_OK;
+ // Create apartment for Thread
+ hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
+ checkForDShowError(hr, "DSCamera::getCameraInfos()::CoInitializeEx");
+ // Create the system device enumerator
+ ICreateDevEnum *pDevEnum =NULL;
+ hr = CoCreateInstance(CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC,
+ IID_ICreateDevEnum, (void **) &pDevEnum);
+ checkForDShowError(hr, "DSCamera::getCameraInfos()::CreateDevEnum");
+ // Create an enumerator for the video capture devices
+ IEnumMoniker *pClassEnum = NULL;
+ hr = pDevEnum->CreateClassEnumerator(CLSID_VideoInputDeviceCategory, &pClassEnum, 0);
+ checkForDShowError(hr, "DSCamera::getCameraInfos()::CreateClassEnumerator");
+ if (pClassEnum == NULL) {
+ pClassEnum->Release();
+ pDevEnum->Release();
+ return NULL;
+ }
+ IMoniker* pMoniker = NULL;
+ pClassEnum->Skip(deviceNumber);
+ hr = pClassEnum->Next(1, &pMoniker, NULL);
+ if (hr != S_OK) {
+ pClassEnum->Release();
+ pDevEnum->Release();
+ pMoniker->Release();
+ return NULL;
+ }
+ IPropertyBag* pPropBag;
+ hr = pMoniker->BindToStorage(0, 0, IID_IPropertyBag, (void**)(&pPropBag));
+ checkForDShowError(hr, "DSCamera::getCameraInfos()::BindToStorage");
+
+ std::string deviceID = getStringProp(pPropBag, L"DevicePath");
+ if (deviceID.empty()) {
+ deviceID = getStringProp(pPropBag, L"Description");
+ if (deviceID.empty()) {
+ deviceID = getStringProp(pPropBag, L"FriendlyName");
+ }
+ }
+ CameraInfo* pCamInfo = new CameraInfo("DirectShow", deviceID);
+
+ getCameraImageFormats(pMoniker, pCamInfo);
+ getCameraControls(pMoniker, pCamInfo);
+
+ pPropBag->Release();
+ pMoniker->Release();
+ pClassEnum->Release();
+ pDevEnum->Release();
+ return pCamInfo;
+#endif
+ return NULL;
+}
+
+void DSCamera::getCameraImageFormats(IMoniker* pMoniker, CameraInfo* pCamInfo)
+{
+ HRESULT hr = S_OK;
+ IAMStreamConfig* pSC;
+ ICaptureGraphBuilder2* pCapture;
+ IBaseFilter* pSrcFilter;
+ // locates the object identified by pMoniker and
+ // returns a pointer to its filter interface
+ hr = pMoniker->BindToObject(0,0,IID_IBaseFilter, (void**) &pSrcFilter);
+ checkForDShowError(hr, "DSCamera::getImageFormats()::BindToObject");
+ if (pSrcFilter == NULL) {
+ return;
+ }
+ // Creates an uninitialized instance and returns a pointer to
+ // the IID_ICaptureGraphBuilder2 interface
+ hr = CoCreateInstance (CLSID_CaptureGraphBuilder2 , NULL, CLSCTX_INPROC,
+ IID_ICaptureGraphBuilder2, (void **) &pCapture);
+ checkForDShowError(hr, "DSCamera::getImageFormats()::CaptureGraphBuilder2");
+ // searches the graph for a IID_IAMStreamConfig interface, returns a pointer
+ hr = pCapture->FindInterface(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Video,
+ pSrcFilter, IID_IAMStreamConfig, (void **)&pSC);
+ checkForDShowError(hr, "DSCamera::getImageFormats()::FindInterface");
+ int numCaps = 0;
+ int capsSize = 0;
+ hr = pSC->GetNumberOfCapabilities(&numCaps, &capsSize);
+ checkForDShowError(hr, "DSCamera::getImageFormats()::GetNumberOfCapabilities");
+ AM_MEDIA_TYPE* pmtConfig;
+ vector<string> sImageFormats;
+ VIDEOINFOHEADER* pvih;
+ BITMAPINFOHEADER bih;
+ PixelFormat capsPF;
+ for (int i = 0; i < numCaps; i++) {
+ VIDEO_STREAM_CONFIG_CAPS scc;
+ hr = pSC->GetStreamCaps(i, &pmtConfig, (BYTE*)&scc);
+ checkForDShowError(hr, "DSCamera::getImageFormats()::GetStreamCaps");
+ pvih = (VIDEOINFOHEADER*)(pmtConfig->pbFormat);
+ bih = pvih->bmiHeader;
+ capsPF = mediaSubtypeToPixelFormat(pmtConfig->subtype);
+
+ if (capsPF != NO_PIXELFORMAT && bih.biWidth != 0) {
+ IntPoint size;
+ if (bih.biHeight >= 0) {
+ size = IntPoint(bih.biWidth, bih.biHeight);
+ } else {
+ size = IntPoint(bih.biWidth, -bih.biHeight);
+ }
+
+ std::vector<float> framerates;
+ float minFramerate = (float)(10000000 / scc.MinFrameInterval);
+ float maxFramerate = (float)(10000000 / scc.MaxFrameInterval);
+ float averageFramerate = (float)(10000000 / pvih->AvgTimePerFrame);
+ if (maxFramerate != 0.) {
+ framerates.push_back(maxFramerate);
+ }
+ if (averageFramerate != maxFramerate && averageFramerate != minFramerate) {
+ framerates.push_back(averageFramerate);
+ }
+ if (minFramerate != 0. && minFramerate != maxFramerate) {
+ framerates.push_back(minFramerate);
+ }
+ CameraImageFormat imageFormat = CameraImageFormat(size, capsPF, framerates);
+ pCamInfo->addImageFormat(imageFormat);
+ }
+ }
+ pCapture->Release();
+ pSrcFilter->Release();
+}
+
+void DSCamera::getCameraControls(IMoniker* pMoniker, CameraInfo* pCamInfo)
+{
+ HRESULT hr = S_OK;
+ IBaseFilter * pSrcFilter;
+ // locates the object identified by pMoniker and
+ // returns a pointer to its filter interface
+ hr = pMoniker->BindToObject(0,0,IID_IBaseFilter, (void**) &pSrcFilter);
+ checkForDShowError(hr, "DSCamera::dumpImageFormats()::BindToObject");
+ if (pSrcFilter == NULL) {
+ return;
+ }
+ IAMCameraControl* pAMCameraControl;
+ pSrcFilter->QueryInterface(IID_IAMCameraControl,
+ (void **)&pAMCameraControl);
+ if (pAMCameraControl != NULL) {
+ // DirectShow has 7 supported CameraControlProperties
+ for (int indexControl = 0; indexControl <= 6; indexControl++) {
+ long value = -999;
+ long flags = -999;
+ pAMCameraControl->Get((CameraControlProperty)indexControl, &value, &flags);
+ long min = -999;
+ long max = -999;
+ long delta = -999;
+ long defaultValue = -999;
+ flags = -999;
+ pAMCameraControl->GetRange((CameraControlProperty)indexControl, &min, &max,
+ &delta, &defaultValue, &flags);
+
+ CameraFeature feature = getCameraFeatureID_CCP((CameraControlProperty)indexControl);
+ if (min != -999 && max != -999 && defaultValue != -999
+ && feature != CAM_FEATURE_UNSUPPORTED) {
+ std::string featureName = cameraFeatureToString(feature);
+ CameraControl control = CameraControl(featureName,min,max,defaultValue);
+ pCamInfo->addControl(control);
+ }
+ }
+ }
+ IAMVideoProcAmp* pCameraPropControl;
+ pSrcFilter->QueryInterface(IID_IAMVideoProcAmp,
+ (void **)&pCameraPropControl);
+ if (pCameraPropControl != NULL) {
+ // DirectShow has 10 supported VideoProcAmpProperties
+ for (int indexPropControl = 0; indexPropControl <= 9; indexPropControl++) {
+ long value = -999;
+ long flags = -999;
+ pCameraPropControl->Get((VideoProcAmpProperty)indexPropControl, &value,
+ &flags);
+ long min = -999;
+ long max = -999;
+ long delta = -999;
+ long defaultValue = -999;
+ flags = -999;
+ pCameraPropControl->GetRange((VideoProcAmpProperty)indexPropControl, &min,
+ &max, &delta, &defaultValue, &flags);
+
+ CameraFeature feature = getCameraFeatureID_VPAP((VideoProcAmpProperty)indexPropControl);
+ if (min != -999 && max != -999 && defaultValue != -999
+ && feature != CAM_FEATURE_UNSUPPORTED) {
+ std::string featureName = cameraFeatureToString(feature);
+ CameraControl control = CameraControl(featureName,min,max,defaultValue);
+ pCamInfo->addControl(control);
+ }
+ }
+ }
+}
+
+
+void DSCamera::initGraphBuilder()
+{
+ HRESULT hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
+ checkForDShowError(hr, "DSCamera::initGraphBuilder()::CoInitializeEx");
+
+ // Create the filter graph
+ hr = CoCreateInstance (CLSID_FilterGraph, NULL, CLSCTX_INPROC, IID_IGraphBuilder,
+ (void **) &m_pGraph);
+ checkForDShowError(hr, "DSCamera::initGraphBuilder()::GraphBuilder");
+ // Create the capture graph builder
+ hr = CoCreateInstance (CLSID_CaptureGraphBuilder2 , NULL, CLSCTX_INPROC,
+ IID_ICaptureGraphBuilder2, (void **) &m_pCapture);
+ checkForDShowError(hr, "DSCamera::initGraphBuilder()::CaptureGraphBuilder2");
+
+ hr = m_pCapture->SetFiltergraph(m_pGraph);
+ checkForDShowError(hr, "DSCamera::initGraphBuilder()::SetFilterGraph");
+
+ m_pGraph->QueryInterface(IID_IMediaControl,(void**)&m_pMediaControl);
+}
+
+void DSCamera::findCaptureDevice(IBaseFilter ** ppSrcFilter)
+{
+ HRESULT hr = S_OK;
+ IBaseFilter * pSrc = NULL;
+ IMoniker* pMoniker = NULL;
+ ICreateDevEnum *pDevEnum = NULL;
+ IEnumMoniker *pClassEnum = NULL;
+
+ // Create the system device enumerator
+ hr = CoCreateInstance(CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC,
+ IID_ICreateDevEnum, (void **) &pDevEnum);
+ checkForDShowError(hr, "DSCamera::findCaptureDevice()::CreateDevEnum");
+
+ // Create an enumerator for the video capture devices
+ hr = pDevEnum->CreateClassEnumerator(CLSID_VideoInputDeviceCategory, &pClassEnum,
+ 0);
+ checkForDShowError(hr, "DSCamera::findCaptureDevice()::CreateClassEnumerator");
+
+ // If there are no enumerators for the requested type, then
+ // CreateClassEnumerator will succeed, but pClassEnum will be NULL.
+ if (pClassEnum == NULL) {
+ *ppSrcFilter = 0;
+ throw(Exception(AVG_ERR_CAMERA_NONFATAL, "No DirectShow Capture Device found"));
+ }
+
+ bool bFound = false;
+ while (!bFound && pClassEnum->Next(1, &pMoniker, NULL) == S_OK) {
+ IPropertyBag *pPropBag;
+ hr = pMoniker->BindToStorage(0, 0, IID_IPropertyBag, (void**)(&pPropBag));
+ checkForDShowError(hr, "DSCamera::findCaptureDevice()::BindToStorage");
+
+ string sDescription = getStringProp(pPropBag, L"Description");
+ string sFriendlyName = getStringProp(pPropBag, L"FriendlyName");
+ string sDevicePath = getStringProp(pPropBag, L"DevicePath");
+
+ if (m_sDevice == sDescription || m_sDevice == sFriendlyName ||
+ sDevicePath.find(m_sDevice) != -1 || m_sDevice == "")
+ {
+ bFound = true;
+ } else {
+ pMoniker->Release();
+ }
+ pPropBag->Release();
+ }
+ if (!bFound) {
+ pClassEnum->Reset();
+ if (pClassEnum->Next(1, &pMoniker, NULL) == S_OK) {
+ AVG_LOG_WARNING(string("Camera ") + m_sDevice
+ + " not found. Using first camera.");
+ bFound = true;
+ IPropertyBag *pPropBag;
+ hr = pMoniker->BindToStorage(0, 0, IID_IPropertyBag, (void**)(&pPropBag));
+ m_sDevice = getStringProp(pPropBag, L"FriendlyName");
+ checkForDShowError(hr, "DSCamera::findCaptureDevice()::BindToStorage");
+ pPropBag->Release();
+ } else {
+ throw(Exception(AVG_ERR_CAMERA_NONFATAL,
+ "No DirectShow Capture Device found"));
+ }
+ }
+
+ // Bind Moniker to a filter object
+ hr = pMoniker->BindToObject(0,0,IID_IBaseFilter, (void**)&pSrc);
+ checkForDShowError(hr, "DSCamera::findCaptureDevice()::BindToObject");
+
+ // Copy the found filter pointer to the output parameter.
+ *ppSrcFilter = pSrc;
+ (*ppSrcFilter)->AddRef();
+
+ pSrc->Release();
+ pMoniker->Release();
+ pDevEnum->Release();
+ pClassEnum->Release();
+}
+
+
+void DSCamera::connectFilters(IGraphBuilder *pGraph, IBaseFilter *pSrc,
+ IBaseFilter *pDest)
+{
+ IPin *pOut = 0;
+ getUnconnectedPin(pSrc, PINDIR_OUTPUT, &pOut);
+
+ IPin *pIn = 0;
+ getUnconnectedPin(pDest, PINDIR_INPUT, &pIn);
+
+ HRESULT hr = pGraph->ConnectDirect(pOut, pIn, 0);
+ checkForDShowError(hr, "DSCamera::ConnectFilters::Connect");
+ pOut->Release();
+ pIn->Release();
+}
+
+void DSCamera::getUnconnectedPin(IBaseFilter *pFilter, PIN_DIRECTION pinDir, IPin **ppPin)
+{
+ *ppPin = 0;
+ IEnumPins *pEnum = 0;
+ IPin *pPin = 0;
+ HRESULT hr = pFilter->EnumPins(&pEnum);
+ checkForDShowError(hr, "DSCamera::ConnectFilters::Connect");
+ while (pEnum->Next(1, &pPin, NULL) == S_OK)
+ {
+ PIN_DIRECTION thisPinDir;
+ pPin->QueryDirection(&thisPinDir);
+ if (thisPinDir == pinDir) {
+ IPin* pTmp = 0;
+ hr = pPin->ConnectedTo(&pTmp);
+ if (SUCCEEDED(hr)) { // Already connected, not the pin we want.
+ pTmp->Release();
+ } else { // Unconnected, this is the pin we want.
+ pEnum->Release();
+ *ppPin = pPin;
+ return;
+ }
+ }
+ pPin->Release();
+ }
+ pEnum->Release();
+ // Did not find a matching pin.
+ AVG_ASSERT(false);
+}
+
+#pragma warning(disable : 4995)
+void DSCamera::checkForDShowError(HRESULT hr, const string& sLocation)
+{
+ if (SUCCEEDED(hr)) {
+ return;
+ }
+ if (HRESULT_FACILITY(hr) == FACILITY_WINDOWS) {
+ hr = HRESULT_CODE(hr);
+ }
+ char szErr[MAX_ERROR_TEXT_LEN];
+ DWORD res = AMGetErrorText(hr, szErr, MAX_ERROR_TEXT_LEN);
+ if (res == 0) {
+ wsprintf(szErr, "Unknown Error: 0x%2x", hr);
+ }
+ cerr << sLocation << ": " << szErr << endl;
+}
+
+
+}
diff --git a/src/imaging/DSCamera.h b/src/imaging/DSCamera.h
new file mode 100644
index 0000000..3602a62
--- /dev/null
+++ b/src/imaging/DSCamera.h
@@ -0,0 +1,105 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+
+#ifndef _DSCamera_H_
+#define _DSCamera_H_
+
+#include "IDSSampleCallback.h"
+
+#include "../avgconfigwrapper.h"
+
+#include "Camera.h"
+
+#include "../graphics/Bitmap.h"
+#include "../graphics/Pixel24.h"
+
+#include "../base/GLMHelper.h"
+#include "../base/Queue.h"
+
+#include <string>
+#define _WIN32_DCOM
+#include <windows.h>
+#include <dshow.h>
+#include "Qedit.h"
+
+namespace avg {
+
+struct IlibavgGrabber;
+
+class DSCamera: public Camera, IDSSampleCallback
+{
+public:
+ DSCamera(std::string sDevice, IntPoint size, PixelFormat camPF, PixelFormat destPF,
+ float frameRate);
+ virtual ~DSCamera();
+ virtual void startCapture();
+
+ virtual BitmapPtr getImage(bool bWait);
+
+ virtual const std::string& getDevice() const;
+ virtual const std::string& getDriverName() const;
+
+ virtual int getFeature(CameraFeature feature) const;
+ virtual void setFeature(CameraFeature feature, int value,
+ bool bIgnoreOldValue=false);
+ virtual void setFeatureOneShot(CameraFeature feature);
+ virtual int getWhitebalanceU() const;
+ virtual int getWhitebalanceV() const;
+ virtual void setWhitebalance(int u, int v, bool bIgnoreOldValue=false);
+
+ virtual void onSample(IMediaSample * pSample);
+
+ static int countCameras();
+ static CameraInfo* getCameraInfos(int deviceNumber);
+
+private:
+ virtual void open();
+ virtual void close();
+ void initGraphBuilder();
+ void findCaptureDevice(IBaseFilter ** ppSrcFilter);
+
+ void setCaptureFormat();
+ void connectFilters(IGraphBuilder *pGraph, IBaseFilter *pSrc, IBaseFilter *pDest);
+ void getUnconnectedPin(IBaseFilter *pFilter, PIN_DIRECTION pinDir, IPin **ppPin);
+ static void checkForDShowError(HRESULT hr, const std::string & sAppMsg);
+ static void getCameraImageFormats(IMoniker* pMoniker, CameraInfo* pCamInfo);
+ static void getCameraControls(IMoniker* pMoniker, CameraInfo* pCamInfo);
+
+ std::string m_sDevice;
+
+ IGraphBuilder * m_pGraph;
+ ICaptureGraphBuilder2 * m_pCapture;
+ IMediaControl * m_pMediaControl;
+ IBaseFilter * m_pSrcFilter;
+ IBaseFilter * m_pGrabFilter;
+ IlibavgGrabber * m_pSampleGrabber;
+ IAMVideoProcAmp * m_pCameraPropControl;
+ IAMCameraControl * m_pAMCameraControl;
+
+ Queue<Bitmap> m_BitmapQ;
+
+ DWORD m_GraphRegisterID;
+ bool m_bUpsideDown;
+};
+
+}
+
+#endif
diff --git a/src/imaging/DSHelper.cpp b/src/imaging/DSHelper.cpp
new file mode 100644
index 0000000..d8880fb
--- /dev/null
+++ b/src/imaging/DSHelper.cpp
@@ -0,0 +1,311 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+
+#include "DSHelper.h"
+
+#include "../base/Exception.h"
+#include "../base/Logger.h"
+
+#include <stdio.h>
+#include <oleauto.h>
+
+#include <string>
+
+using namespace std;
+
+namespace avg {
+
+#pragma warning(disable : 4995)
+HRESULT AddGraphToRot(IUnknown *pUnkGraph, DWORD *pdwRegister)
+{
+ IMoniker * pMoniker;
+ IRunningObjectTable *pROT;
+ WCHAR wsz[128];
+ HRESULT hr;
+
+ if (!pUnkGraph || !pdwRegister) {
+ return E_POINTER;
+ }
+
+ if (FAILED(GetRunningObjectTable(0, &pROT))) {
+ return E_FAIL;
+ }
+
+ hr = swprintf(wsz, NUMELMS(wsz), L"FilterGraph %08x pid %08x\0",
+ (DWORD_PTR)pUnkGraph, GetCurrentProcessId());
+
+ hr = CreateItemMoniker(L"!", wsz, &pMoniker);
+ if (SUCCEEDED(hr)) {
+ hr = pROT->Register(ROTFLAGS_REGISTRATIONKEEPSALIVE, pUnkGraph, pMoniker,
+ pdwRegister);
+ pMoniker->Release();
+ }
+
+ pROT->Release();
+ return hr;
+}
+
+void RemoveGraphFromRot(DWORD pdwRegister)
+{
+ IRunningObjectTable *pROT;
+
+ if (SUCCEEDED(GetRunningObjectTable(0, &pROT))) {
+ pROT->Revoke(pdwRegister);
+ pROT->Release();
+ }
+}
+
+string getStringProp(IPropertyBag *pPropBag, LPCOLESTR pszPropName)
+{
+ VARIANT varName;
+ VariantInit(&varName);
+ HRESULT hr = pPropBag->Read(pszPropName, &varName, 0);
+ if (FAILED(hr)) {
+ return "";
+ }
+// checkForDShowError(hr, string("DSHelper::getStringProp(")+pszPropName+")::Read PropBag");
+
+ string s;
+ int lenWStr = SysStringLen(varName.bstrVal);
+ int lenAStr = WideCharToMultiByte(CP_ACP, 0, varName.bstrVal, lenWStr, 0, 0, NULL, NULL);
+ if (lenAStr > 0) {
+ char* pAStr = new char[lenAStr + 1];
+ WideCharToMultiByte(CP_ACP, 0, varName.bstrVal, lenWStr, pAStr, lenAStr, NULL, NULL);
+ pAStr[lenAStr] = 0;
+ s = pAStr;
+ delete[] pAStr;
+ }
+
+ VariantClear(&varName);
+ return s;
+}
+
+PixelFormat mediaSubtypeToPixelFormat(const GUID& subtype)
+{
+ if (subtype == MEDIASUBTYPE_RGB24) {
+ return B8G8R8;
+ } else if (subtype == MEDIASUBTYPE_RGB32) {
+ return B8G8R8X8;
+ } else if (subtype == MEDIASUBTYPE_RGB8) {
+ return I8;
+ } else if (subtype == MEDIASUBTYPE_UYVY) {
+ return YCbCr422;
+ } else if (subtype == MEDIASUBTYPE_YUY2) {
+ return YUYV422;
+ } else if (subtype == MEDIASUBTYPE_RGB565) {
+ return B5G6R5;
+// } else if (Subtype == MEDIASUBTYPE_Y800 && DesiredPF == "BY8_GBRG") {
+// return BAYER8_GBRG;
+ } else if (subtype == MEDIASUBTYPE_Y800) {
+ return I8;
+ } else {
+ return NO_PIXELFORMAT;
+ }
+}
+
+std::string mediaTypeToString(const GUID& type)
+{
+ if (type == MEDIATYPE_Video) {
+ return "MEDIATYPE_Video";
+ } else if (type == GUID_NULL) {
+ return "GUID_NULL";
+ } else {
+ return "Unknown";
+ }
+}
+
+string mediaSubtypeToString(const GUID & subtype)
+{
+ if (subtype == MEDIASUBTYPE_RGB24) {
+ return "MEDIASUBTYPE_RGB24";
+ } else if (subtype == MEDIASUBTYPE_RGB32) {
+ return "MEDIASUBTYPE_RGB32";
+ } else if (subtype == MEDIASUBTYPE_RGB8) {
+ return "MEDIASUBTYPE_RGB8";
+ } else if (subtype == MEDIASUBTYPE_UYVY) {
+ return "MEDIASUBTYPE_UYVY";
+ } else if (subtype == MEDIASUBTYPE_YUY2) {
+ return "MEDIASUBTYPE_YUY2";
+ } else if (subtype == MEDIASUBTYPE_MJPG) {
+ return "MEDIASUBTYPE_MJPG";
+ } else if (subtype == MEDIASUBTYPE_RGB555) {
+ return "MEDIASUBTYPE_RGB555";
+ } else if (subtype == MEDIASUBTYPE_RGB565) {
+ return "MEDIASUBTYPE_RGB565";
+ } else if (subtype == MEDIASUBTYPE_Y800) {
+ return "MEDIASUBTYPE_Y800";
+ } else if (subtype == GUID_NULL) {
+ return "GUID_NULL";
+ } else {
+ return "Unknown";
+ }
+}
+
+string mediaFormattypeToString(const GUID& formattype)
+{
+ if (formattype == FORMAT_None) {
+ return "FORMAT_None";
+ } else if (formattype == FORMAT_VideoInfo) {
+ return "FORMAT_VideoInfo";
+ } else if (formattype == FORMAT_VideoInfo2) {
+ return "FORMAT_VideoInfo2";
+ } else if (formattype == GUID_NULL) {
+ return "GUID_NULL";
+ } else {
+ return "Unknown";
+ }
+}
+
+string camImageFormatToString(const AM_MEDIA_TYPE* pMediaType)
+{
+ stringstream ss;
+ VIDEOINFOHEADER* pVideoInfo = (VIDEOINFOHEADER*)(pMediaType->pbFormat);
+ BITMAPINFOHEADER* pBitmapInfo = &pVideoInfo->bmiHeader;
+ PixelFormat pf = mediaSubtypeToPixelFormat(pMediaType->subtype);
+ int height = abs(pBitmapInfo->biHeight);
+ ss << pf << " " << "(" << pBitmapInfo->biWidth << ", " << height << ")"
+ << " " << 10000000./pVideoInfo->AvgTimePerFrame << " fps.";
+ return ss.str();
+}
+
+bool isDSFeatureCamControl(CameraFeature feature)
+{
+ switch(feature) {
+ case CAM_FEATURE_BRIGHTNESS:
+ case CAM_FEATURE_SHARPNESS:
+ case CAM_FEATURE_WHITE_BALANCE:
+ case CAM_FEATURE_HUE:
+ case CAM_FEATURE_SATURATION:
+ case CAM_FEATURE_GAMMA:
+ case CAM_FEATURE_GAIN:
+ return false;
+ case CAM_FEATURE_EXPOSURE:
+ case CAM_FEATURE_IRIS:
+ case CAM_FEATURE_FOCUS:
+ case CAM_FEATURE_ZOOM:
+ case CAM_FEATURE_PAN:
+ case CAM_FEATURE_TILT:
+ return true;
+ case CAM_FEATURE_SHUTTER:
+ case CAM_FEATURE_TEMPERATURE:
+ case CAM_FEATURE_TRIGGER:
+ case CAM_FEATURE_OPTICAL_FILTER:
+ case CAM_FEATURE_CAPTURE_SIZE:
+ case CAM_FEATURE_CAPTURE_QUALITY:
+ case CAM_FEATURE_CONTRAST:
+ AVG_LOG_WARNING("isDSFeatureCamControl: " + cameraFeatureToString(feature) +
+ " not supported by DirectShow.");
+ return false;
+ default:
+ AVG_LOG_WARNING("isDSFeatureCamControl: " + cameraFeatureToString(feature) +
+ " unknown.");
+ return false;
+ }
+}
+
+long getDSFeatureID(CameraFeature feature)
+{
+ switch(feature) {
+ case CAM_FEATURE_BRIGHTNESS:
+ return VideoProcAmp_Brightness;
+ case CAM_FEATURE_SHARPNESS:
+ return VideoProcAmp_Sharpness;
+ case CAM_FEATURE_WHITE_BALANCE:
+ return VideoProcAmp_WhiteBalance;
+ case CAM_FEATURE_HUE:
+ return VideoProcAmp_Hue;
+ case CAM_FEATURE_SATURATION:
+ return VideoProcAmp_Saturation;
+ case CAM_FEATURE_GAMMA:
+ return VideoProcAmp_Gamma;
+ case CAM_FEATURE_GAIN:
+ return VideoProcAmp_Gain;
+ case CAM_FEATURE_EXPOSURE:
+ return CameraControl_Exposure;
+ case CAM_FEATURE_IRIS:
+ return CameraControl_Iris;
+ case CAM_FEATURE_FOCUS:
+ return CameraControl_Focus;
+ case CAM_FEATURE_ZOOM:
+ return CameraControl_Zoom;
+ case CAM_FEATURE_PAN:
+ return CameraControl_Pan;
+ case CAM_FEATURE_TILT:
+ return CameraControl_Tilt;
+ case CAM_FEATURE_SHUTTER:
+ case CAM_FEATURE_TEMPERATURE:
+ case CAM_FEATURE_TRIGGER:
+ case CAM_FEATURE_OPTICAL_FILTER:
+ case CAM_FEATURE_CAPTURE_SIZE:
+ case CAM_FEATURE_CAPTURE_QUALITY:
+ case CAM_FEATURE_CONTRAST:
+
+ AVG_LOG_WARNING("getDSFeatureID: "+cameraFeatureToString(feature)
+ +" not supported by DirectShow.");
+ return 0;
+ default:
+ AVG_LOG_WARNING("getDSFeatureID: "+cameraFeatureToString(feature)+" unknown.");
+ return -1;
+ }
+}
+
+CameraFeature getCameraFeatureID_VPAP(long videoProcAmpProperty)
+{
+ switch(videoProcAmpProperty) {
+ case VideoProcAmp_Brightness:
+ return CAM_FEATURE_BRIGHTNESS;
+ case VideoProcAmp_Sharpness:
+ return CAM_FEATURE_SHARPNESS;
+ case VideoProcAmp_WhiteBalance:
+ return CAM_FEATURE_WHITE_BALANCE;
+ case VideoProcAmp_Hue:
+ return CAM_FEATURE_HUE;
+ case VideoProcAmp_Saturation:
+ return CAM_FEATURE_SATURATION;
+ case VideoProcAmp_Gamma:
+ return CAM_FEATURE_GAMMA;
+ case VideoProcAmp_Gain:
+ return CAM_FEATURE_GAIN;
+ default:
+ return CAM_FEATURE_UNSUPPORTED;
+ }
+}
+CameraFeature getCameraFeatureID_CCP(long cameraControlProperty)
+{
+ switch(cameraControlProperty) {
+ case CameraControl_Exposure:
+ return CAM_FEATURE_EXPOSURE;
+ case CameraControl_Iris:
+ return CAM_FEATURE_IRIS;
+ case CameraControl_Focus:
+ return CAM_FEATURE_FOCUS;
+ case CameraControl_Zoom:
+ return CAM_FEATURE_ZOOM;
+ case CameraControl_Pan:
+ return CAM_FEATURE_PAN;
+ case CameraControl_Tilt:
+ return CAM_FEATURE_TILT;
+ default:
+ return CAM_FEATURE_UNSUPPORTED;
+ }
+}
+
+}
diff --git a/src/imaging/DSHelper.h b/src/imaging/DSHelper.h
new file mode 100644
index 0000000..a8c6edb
--- /dev/null
+++ b/src/imaging/DSHelper.h
@@ -0,0 +1,63 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+
+#ifndef _DSHelper_H_
+#define _DSHelper_H_
+
+#include "Camera.h"
+
+#include "../graphics/Bitmap.h"
+
+#include <string>
+
+#define _WIN32_DCOM
+#include <windows.h>
+#include <dshow.h>
+#include "Qedit.h"
+
+
+static const GUID MEDIASUBTYPE_Y800 =
+ {0x30303859, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
+
+static const GUID MEDIASUBTYPE_Y160 =
+ {0x30363159, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
+
+namespace avg {
+
+HRESULT AddGraphToRot(IUnknown* pUnkGraph, DWORD* pdwRegister);
+void RemoveGraphFromRot(DWORD pdwRegister);
+
+std::string getStringProp(IPropertyBag* pPropBag, LPCOLESTR pszPropName);
+
+PixelFormat mediaSubtypeToPixelFormat(const GUID& subtype);
+
+std::string mediaTypeToString(const GUID& type);
+std::string mediaSubtypeToString(const GUID& subtype);
+std::string mediaFormattypeToString(const GUID& formattype);
+std::string camImageFormatToString(const AM_MEDIA_TYPE* pMediaType);
+
+bool isDSFeatureCamControl(CameraFeature feature);
+long getDSFeatureID(CameraFeature feature);
+CameraFeature getCameraFeatureID_VPAP(long videoProcAmpProperty);
+CameraFeature getCameraFeatureID_CCP(long cameraControlProperty);
+}
+
+#endif
diff --git a/src/imaging/DSSampleGrabber.cpp b/src/imaging/DSSampleGrabber.cpp
new file mode 100644
index 0000000..1a62c2d
--- /dev/null
+++ b/src/imaging/DSSampleGrabber.cpp
@@ -0,0 +1,220 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+
+#include "DSSampleGrabber.h"
+
+#include <initguid.h>
+
+#pragma warning(disable: 4800)
+
+// {455A53B7-FC34-4960-94CE-A17A0B23F807}
+DEFINE_GUID(CLSID_libavgGrabber,
+0x455a53b7, 0xfc34, 0x4960, 0x94, 0xce, 0xa1, 0x7a, 0xb, 0x23, 0xf8, 0x7);
+
+namespace avg {
+
+class CSampleGrabberAllocator : public CMemAllocator
+{
+public:
+ CSampleGrabberAllocator(CSampleGrabberInPin* pParent, HRESULT* phr);
+ ~CSampleGrabberAllocator();
+
+ HRESULT Alloc();
+ void ReallyFree();
+ STDMETHODIMP SetProperties(ALLOCATOR_PROPERTIES* pRequest,
+ ALLOCATOR_PROPERTIES* pActual);
+
+protected:
+ CSampleGrabberInPin * m_pPin;
+
+private:
+ friend class CSampleGrabberInPin;
+ friend class CSampleGrabber;
+};
+
+class CSampleGrabberInPin : public CTransInPlaceInputPin
+{
+public:
+ CSampleGrabberInPin(CTransInPlaceFilter* pFilter, HRESULT* pHr);
+ ~CSampleGrabberInPin();
+
+ HRESULT GetMediaType(int iPosition, CMediaType* pMediaType);
+
+ // override this or GetMediaType is never called
+ STDMETHODIMP EnumMediaTypes(IEnumMediaTypes** ppEnum);
+
+ // we override this to tell whoever's upstream of us what kind of
+ // properties we're going to demand to have
+ STDMETHODIMP GetAllocatorRequirements(ALLOCATOR_PROPERTIES *pProps);
+
+private:
+ friend class CSampleGrabberAllocator;
+ friend class CSampleGrabber;
+
+ CSampleGrabberAllocator* m_pPrivateAllocator;
+ ALLOCATOR_PROPERTIES m_allocprops;
+ BYTE* m_pBuffer;
+ BOOL m_bMediaTypeChanged;
+};
+
+CSampleGrabber::CSampleGrabber(IUnknown * pOuter, HRESULT * phr)
+ : CTransInPlaceFilter(TEXT("libavg sample grabber"), (IUnknown*) pOuter,
+ CLSID_libavgGrabber, phr, false),
+ m_pCallback(NULL)
+{
+ m_pInput = (CTransInPlaceInputPin*) new CSampleGrabberInPin(this, phr);
+
+ IPin *pOutput = GetPin(1);
+}
+
+STDMETHODIMP CSampleGrabber::NonDelegatingQueryInterface(REFIID riid, void** ppv)
+{
+ AVG_ASSERT(ppv);
+
+ if (riid == IID_IlibavgGrabber) {
+ return GetInterface((IlibavgGrabber *)this, ppv);
+ } else {
+ return CTransInPlaceFilter::NonDelegatingQueryInterface(riid, ppv);
+ }
+}
+
+HRESULT CSampleGrabber::CheckInputType(const CMediaType* pmt)
+{
+ AVG_ASSERT(pmt);
+ CAutoLock lock(&m_Lock);
+
+ if (MEDIATYPE_Video == *pmt->Type( )) {
+ return NOERROR;
+ } else {
+ return VFW_E_INVALID_MEDIA_TYPE;
+ }
+}
+
+HRESULT CSampleGrabber::Receive(IMediaSample * pms)
+{
+ AVG_ASSERT(pms);
+
+ HRESULT hr;
+ AM_SAMPLE2_PROPERTIES * const pProps = m_pInput->SampleProps();
+
+ if (pProps->dwStreamId != AM_STREAM_MEDIA) {
+ if (m_pOutput->IsConnected()) {
+ return m_pOutput->Deliver(pms);
+ } else {
+ return NOERROR;
+ }
+ }
+ if (UsingDifferentAllocators()) {
+ pms = Copy(pms);
+ AVG_ASSERT(pms);
+ }
+
+ hr = Transform(pms);
+ AVG_ASSERT(!FAILED(hr));
+ hr = m_pOutput->Deliver(pms);
+ if (UsingDifferentAllocators()) {
+ pms->Release();
+ }
+ return hr;
+}
+
+HRESULT CSampleGrabber::Transform(IMediaSample* pms)
+{
+ AVG_ASSERT(pms);
+ CAutoLock lock(&m_Lock);
+
+ if (m_pCallback) {
+ REFERENCE_TIME StartTime;
+ REFERENCE_TIME StopTime;
+ pms->GetTime( &StartTime, &StopTime);
+
+ StartTime += m_pInput->CurrentStartTime();
+ StopTime += m_pInput->CurrentStartTime();
+
+ m_pCallback->onSample(pms);
+ }
+ return NOERROR;
+}
+
+void STDMETHODCALLTYPE CSampleGrabber::SetCallback(IDSSampleCallback* pCallback)
+{
+ CAutoLock lock( &m_Lock );
+ m_pCallback = pCallback;
+}
+
+CSampleGrabberInPin::CSampleGrabberInPin(CTransInPlaceFilter* pFilter, HRESULT* pHr)
+ : CTransInPlaceInputPin(TEXT("SampleGrabberInputPin\0"), pFilter, pHr, L"Input\0"),
+ m_pPrivateAllocator(NULL),
+ m_pBuffer(NULL),
+ m_bMediaTypeChanged(FALSE)
+{
+ memset(&m_allocprops, 0, sizeof(m_allocprops));
+}
+
+CSampleGrabberInPin::~CSampleGrabberInPin()
+{
+ if (m_pPrivateAllocator) {
+ delete m_pPrivateAllocator;
+ }
+}
+
+HRESULT CSampleGrabberInPin::GetMediaType(int iPosition, CMediaType* pMediaType)
+{
+ AVG_ASSERT(pMediaType);
+ AVG_ASSERT(iPosition >= 0);
+ if (iPosition > 0) {
+ return VFW_S_NO_MORE_ITEMS;
+ }
+
+ *pMediaType = CMediaType();
+ pMediaType->SetType(&MEDIATYPE_Video);
+
+ return S_OK;
+}
+
+STDMETHODIMP CSampleGrabberInPin::EnumMediaTypes(IEnumMediaTypes** ppEnum)
+{
+ AVG_ASSERT(ppEnum);
+ ValidateReadWritePtr(ppEnum, sizeof(IEnumMediaTypes *));
+
+ if(!((CSampleGrabber*)m_pTIPFilter)->OutputPin()->IsConnected())
+ {
+ *ppEnum = new CEnumMediaTypes(this, NULL);
+ return NOERROR;
+ }
+
+ return ((CSampleGrabber*)m_pTIPFilter)->OutputPin()->GetConnected()
+ ->EnumMediaTypes(ppEnum);
+}
+
+HRESULT CSampleGrabberInPin::GetAllocatorRequirements(ALLOCATOR_PROPERTIES *pProps)
+{
+ AVG_ASSERT(pProps);
+
+ if (m_pPrivateAllocator) {
+ *pProps = m_allocprops;
+ return S_OK;
+ } else {
+ return CTransInPlaceInputPin::GetAllocatorRequirements(pProps);
+ }
+}
+
+} \ No newline at end of file
diff --git a/src/imaging/DSSampleGrabber.h b/src/imaging/DSSampleGrabber.h
new file mode 100644
index 0000000..8c3ba5e
--- /dev/null
+++ b/src/imaging/DSSampleGrabber.h
@@ -0,0 +1,91 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+
+#ifndef _DSSampleGrabber_H_
+#define _DSSampleGrabber_H_
+
+#include "IDSSampleCallback.h"
+
+#include "../base/Exception.h"
+
+#include <Guiddef.h>
+#define _WIN32_DCOM
+#include <windows.h>
+#include <dshow.h>
+#include <dshowbase/mtype.h>
+#include <dshowbase/wxdebug.h>
+#include <dshowbase/combase.h>
+#include <dshowbase/reftime.h>
+#include <dshowbase/wxutil.h>
+#include <dshowbase/wxlist.h>
+#include <dshowbase/amfilter.h>
+#include <dshowbase/transfrm.h>
+#include <dshowbase/transip.h>
+
+// {87F09DC5-12BC-479d-A20F-21133C613037}
+DEFINE_GUID(IID_IlibavgGrabber,
+0x87f09dc5, 0x12bc, 0x479d, 0xa2, 0xf, 0x21, 0x13, 0x3c, 0x61, 0x30, 0x37);
+
+namespace avg {
+
+MIDL_INTERFACE("6B652FFF-11FE-4FCE-92AD-0266B5D7C78F")
+IlibavgGrabber : public IUnknown
+{
+public:
+ virtual void STDMETHODCALLTYPE SetCallback(IDSSampleCallback* pCallback) = 0;
+};
+
+class CSampleGrabberInPin;
+
+class CSampleGrabber : public CTransInPlaceFilter, IlibavgGrabber
+{
+public:
+ CSampleGrabber(IUnknown* pOuter, HRESULT* pHr);
+
+ STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void** ppv);
+ DECLARE_IUNKNOWN;
+
+ // IlibavgGrabber
+ void STDMETHODCALLTYPE SetCallback(IDSSampleCallback* pCallback);
+
+protected:
+ IDSSampleCallback* m_pCallback;
+ CCritSec m_Lock; // serialize access to our data
+
+ HRESULT CheckInputType(const CMediaType* pmt);
+ HRESULT Transform(IMediaSample* pms);
+
+ // override this so we can return S_FALSE directly.
+ // The base class CTransInPlace
+ // Transform( ) method is called by it's
+ // Receive( ) method. There is no way
+ // to get Transform( ) to return an S_FALSE value
+ // (which means "stop giving me data"),
+ // to Receive( ) and get Receive( ) to return S_FALSE as well.
+ HRESULT Receive(IMediaSample* pms);
+
+private:
+ friend class CSampleGrabberInPin;
+};
+
+};
+
+#endif \ No newline at end of file
diff --git a/src/imaging/DeDistort.cpp b/src/imaging/DeDistort.cpp
new file mode 100644
index 0000000..5fec652
--- /dev/null
+++ b/src/imaging/DeDistort.cpp
@@ -0,0 +1,306 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+// Original author of this file is igor@c-base.org
+//
+
+#include "DeDistort.h"
+#include "TrackerConfig.h"
+
+#include "../base/StringHelper.h"
+#include "../base/MathHelper.h"
+#include "../glm/gtx/rotate_vector.hpp"
+#include <cstring>
+#include <iostream>
+#include <math.h>
+
+const double sqrt3 = sqrt(3.f);
+
+using namespace std;
+
+namespace avg {
+
+// This transformation is based on the undistort code found at
+// http://www.math.rutgers.edu/~ojanen/undistort/index.html.
+// a lot of parameters enter here, some of which can be calculated/set manually,
+// some of which need to be determined via an optimization procedure
+//
+// * m_CamExtents is the size of the camera image. This is used to transform the
+// coordinates of the image so they fall in the range (-1,-1)-(1,1)
+// * m_pDistortionParams OPT see paper
+// * m_Angle corrects rotation of camera OPT
+// * m_DisplayScale convert back from standard coords to display
+// * m_DisplayOffset correct the offset of the display from the center of the table
+//
+
+DeDistort::DeDistort()
+ : m_CamExtents(1,1),
+ m_Angle(0.0),
+ m_TrapezoidFactor(0),
+ m_DisplayOffset(0,0),
+ m_DisplayScale(1,1)
+{
+ m_DistortionParams.push_back(0);
+ m_DistortionParams.push_back(0);
+ m_RescaleFactor = calc_rescale();
+}
+
+DeDistort::DeDistort(const glm::vec2& camExtents, const glm::vec2& displayExtents)
+ : m_Angle(0.0),
+ m_TrapezoidFactor(0),
+ m_DisplayOffset(0,0)
+{
+ m_CamExtents = glm::vec2(camExtents);
+ m_DistortionParams.push_back(0);
+ m_DistortionParams.push_back(0);
+ m_DisplayScale.x = displayExtents.x/camExtents.x;
+ m_DisplayScale.y = displayExtents.y/camExtents.y;
+ m_RescaleFactor = calc_rescale();
+}
+
+DeDistort::DeDistort(const glm::vec2& camExtents, const vector<double>& distortionParams,
+ double angle, double trapezoidFactor, const glm::dvec2& displayOffset,
+ const glm::dvec2& displayScale)
+ : m_CamExtents(camExtents),
+ m_DistortionParams(distortionParams),
+ m_Angle(angle),
+ m_TrapezoidFactor(trapezoidFactor),
+ m_DisplayOffset(displayOffset),
+ m_DisplayScale(displayScale)
+{
+ m_RescaleFactor = calc_rescale();
+}
+
+DeDistort::~DeDistort()
+{
+}
+
+FRect DeDistort::getDisplayArea(const glm::vec2& displayExtents)
+{
+ return getActiveBlobArea(FRect(glm::vec2(0,0), displayExtents));
+}
+
+FRect DeDistort::getActiveBlobArea(const FRect& displayROI)
+{
+ FRect activeRect;
+ activeRect.tl = transformScreenToBlob(glm::dvec2(displayROI.tl));
+ activeRect.br = transformScreenToBlob(glm::dvec2(displayROI.br));
+ if (activeRect.height() < 1) {
+ float temp = activeRect.tl.y;
+ activeRect.tl.y = activeRect.br.y;
+ activeRect.br.y = temp;
+ }
+ if (activeRect.width() < 1) {
+ float temp = activeRect.tl.x;
+ activeRect.tl.x = activeRect.br.x;
+ activeRect.br.x = temp;
+ }
+ return activeRect;
+}
+
+void DeDistort::load(const glm::vec2& camExtents, const TrackerConfig& config)
+{
+ m_CamExtents = glm::dvec2(camExtents);
+ m_DistortionParams.clear();
+ m_DistortionParams.push_back(double(config.getFloatParam
+ ("/transform/distortionparams/@p2")));
+ m_DistortionParams.push_back(double(config.getFloatParam
+ ("/transform/distortionparams/@p3")));
+ m_TrapezoidFactor = config.getFloatParam("/transform/trapezoid/@value");
+ m_Angle = config.getFloatParam("/transform/angle/@value");
+ m_DisplayOffset = config.getPointParam("/transform/displaydisplacement/");
+ m_DisplayScale = config.getPointParam("/transform/displayscale/");
+
+ m_RescaleFactor = calc_rescale();
+}
+
+void DeDistort::save(TrackerConfig& config)
+{
+ config.setParam("/transform/distortionparams/@p2",
+ toString(m_DistortionParams[0]));
+ config.setParam("/transform/distortionparams/@p3",
+ toString(m_DistortionParams[1]));
+ config.setParam("/transform/trapezoid/@value",
+ toString(m_TrapezoidFactor));
+ config.setParam("/transform/angle/@value",
+ toString(m_Angle));
+ config.setParam("/transform/displaydisplacement/@x",
+ toString(m_DisplayOffset.x));
+ config.setParam("/transform/displaydisplacement/@y",
+ toString(m_DisplayOffset.y));
+ config.setParam("/transform/displayscale/@x",
+ toString(m_DisplayScale.x));
+ config.setParam("/transform/displayscale/@y",
+ toString(m_DisplayScale.y));
+}
+
+bool DeDistort::operator ==(const DeDistort& other) const
+{
+ return (m_CamExtents == other.m_CamExtents &&
+ m_DistortionParams == other.m_DistortionParams &&
+ m_Angle == other.m_Angle &&
+ m_TrapezoidFactor == other.m_TrapezoidFactor &&
+ m_DisplayOffset == other.m_DisplayOffset &&
+ m_DisplayScale == other.m_DisplayScale &&
+ m_RescaleFactor == other.m_RescaleFactor);
+}
+
+void DeDistort::dump() const
+{
+ cerr << " Transform:" << endl;
+ cerr << " CamExtents: " << m_CamExtents << endl;
+ cerr << " DistortionParams: " << m_DistortionParams[0] << ", "
+ << m_DistortionParams[1] << m_DistortionParams[2] << endl;
+ cerr << " Trapezoid: " << m_TrapezoidFactor << endl;
+ cerr << " Angle: " << m_Angle << endl;
+ cerr << " DisplayOffset: " << m_DisplayOffset << endl;
+ cerr << " DisplayScale: " << m_DisplayScale << endl;
+}
+
+glm::dvec2 DeDistort::transformScreenToBlob(const glm::dvec2& pt)
+{
+ // scale to blob image resolution and translate 0,0 to upper left corner.
+ glm::dvec2 DestPt = pt-m_DisplayOffset;
+ DestPt = glm::dvec2(DestPt.x/m_DisplayScale.x, DestPt.y/m_DisplayScale.y);
+ return DestPt;
+}
+
+glm::dvec2 DeDistort::inverse_transform_point(const glm::dvec2& pt)
+{
+ glm::dvec2 destPt = pt - m_CamExtents/2.;
+ destPt = glm::dvec2(2*destPt.x/m_CamExtents.x, 2*destPt.y/m_CamExtents.y);
+ destPt = inv_trapezoid(m_TrapezoidFactor, destPt);
+ destPt = glm::rotate(destPt, -m_Angle*180/M_PI);
+ destPt *= m_RescaleFactor;
+ destPt = inverse_undistort(m_DistortionParams, destPt);
+ destPt = glm::dvec2(destPt.x*m_CamExtents.x/2, destPt.y*m_CamExtents.y/2);
+ destPt += m_CamExtents/2.;
+ return destPt;
+}
+
+glm::dvec2 DeDistort::transformBlobToScreen(const glm::dvec2& pt)
+{
+ glm::dvec2 destPt(m_DisplayScale.x*pt.x, m_DisplayScale.y*pt.y);
+ destPt += m_DisplayOffset;
+ return destPt;
+}
+
+glm::dvec2 DeDistort::transform_point(const glm::dvec2& pt)
+{
+ glm::dvec2 destPt = pt-m_CamExtents/2.;
+ destPt = glm::dvec2(2*destPt.x/m_CamExtents.x, 2*destPt.y/m_CamExtents.y);
+ destPt = undistort(m_DistortionParams, destPt);
+ destPt /= m_RescaleFactor;
+ destPt = glm::rotate(destPt, m_Angle*180/M_PI);
+ destPt = trapezoid(m_TrapezoidFactor, destPt);
+ destPt = glm::dvec2(destPt.x*m_CamExtents.x/2, destPt.y*m_CamExtents.y/2);
+ destPt += m_CamExtents/2.;
+ return destPt;
+}
+
+glm::dvec2 DeDistort::inv_trapezoid(const double trapezoid_factor, const glm::dvec2& pt)
+{
+ // stretch x coord
+ double yn = pt.y;
+ return glm::dvec2(pt.x/(1+yn*trapezoid_factor), pt.y);
+}
+
+glm::dvec2 DeDistort::trapezoid(const double trapezoid_factor, const glm::dvec2& pt)
+{
+ // stretch x coord
+ double yn = pt.y;
+ return glm::dvec2(pt.x*(1+yn*trapezoid_factor), pt.y);
+}
+
+double distort_map(const vector<double>& params, double r)
+{
+ double S = 0;
+ int counter = 2;
+ std::vector<double>::const_iterator v;
+ for(v=params.begin(); v!=params.end(); ++v){
+ S += (*v) * pow(r, counter);
+ ++counter;
+ }
+ return r+S;
+}
+
+double DeDistort::calc_rescale()
+{
+ //make sure that the undistort transformation stays within the normalized box
+ double scale = distort_map(m_DistortionParams, sqrt(2.0));
+ return scale/sqrt(2.0);
+}
+
+double inv_distort_map(const vector<double>& params, double r)
+{
+ double r1,r2,r3,f1,f2;
+ r1 = r;
+ r2 = r+.001;
+ f1 = distort_map(params, r1)-r;
+ f2 = distort_map(params, r2)-r;
+ while (fabs(f2) > 0.0001) {
+ r3 = (r1*f2-r2*f1)/(f2-f1);
+ r1 = r2;
+ r2 = r3;
+ f1 = f2;
+ f2 = distort_map(params, r2)-r;
+ }
+ return r2;
+}
+
+#define EPSILON 0.00001
+glm::dvec2 DeDistort::inverse_undistort(const vector<double> &params,
+ const glm::dvec2 &pt)
+{
+ if (params.empty()) {
+ return pt;
+ }
+ glm::dvec2 pt_norm = pt;
+ double r_d = sqrt(pt_norm.x*pt_norm.x + pt_norm.y*pt_norm.y);
+ double S;
+ if (r_d < EPSILON) {
+ S=0;
+ } else {
+ S = inv_distort_map(params, r_d)/r_d;
+ }
+ glm::dvec2 result = pt_norm*(S);
+ return result;
+}
+
+glm::dvec2 DeDistort::undistort(const vector<double>& params, const glm::dvec2 &pt)
+{
+ std::vector<double>::const_iterator v = params.begin();
+ if (v == params.end()) {
+ return pt;
+ }
+ glm::dvec2 pt_norm = pt;
+ double r_d = sqrt(pt_norm.x*pt_norm.x + pt_norm.y*pt_norm.y);
+ double S;
+ if (r_d < EPSILON) {
+ S=0;
+ } else {
+ S = distort_map(params, r_d)/r_d;
+ }
+
+ glm::dvec2 result = pt_norm*(S);
+ return result;
+}
+
+}
diff --git a/src/imaging/DeDistort.h b/src/imaging/DeDistort.h
new file mode 100644
index 0000000..1c2edc5
--- /dev/null
+++ b/src/imaging/DeDistort.h
@@ -0,0 +1,88 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+
+#ifndef _DeDistort_H_
+#define _DeDistort_H_
+
+#include "../api.h"
+#include "CoordTransformer.h"
+
+#include "../base/GLMHelper.h"
+#include "../base/Rect.h"
+
+#include <boost/shared_ptr.hpp>
+
+#include <libxml/parser.h>
+#include <libxml/xmlwriter.h>
+
+#include <vector>
+#include <string>
+
+namespace avg {
+
+class TrackerConfig;
+
+class AVG_API DeDistort: public CoordTransformer {
+ public:
+ DeDistort();
+ DeDistort(const glm::vec2& camExtents, const glm::vec2& displayExtents);
+ DeDistort(const glm::vec2& camExtents,
+ const std::vector<double>& distortionParams, double angle,
+ double trapezoidFactor, const glm::dvec2& displayOffset,
+ const glm::dvec2& displayScale);
+ virtual ~DeDistort();
+
+ glm::dvec2 transformBlobToScreen(const glm::dvec2& pt);
+ glm::dvec2 transformScreenToBlob(const glm::dvec2& pt);
+ virtual glm::dvec2 transform_point(const glm::dvec2& pt);
+ virtual glm::dvec2 inverse_transform_point(const glm::dvec2& pt);
+ FRect getDisplayArea(const glm::vec2& displayExtents);
+ FRect getActiveBlobArea(const FRect& displayROI);
+
+ void load(const glm::vec2 &CameraExtents, const TrackerConfig& config);
+ void save(TrackerConfig& config);
+
+ bool operator ==(const DeDistort& other) const;
+
+ void dump() const;
+
+ private:
+ double calc_rescale();
+ glm::dvec2 inverse_undistort(const std::vector<double>& params,
+ const glm::dvec2& pt);
+ glm::dvec2 undistort(const std::vector<double>& params, const glm::dvec2& pt);
+ glm::dvec2 trapezoid(const double trapezoid_factor, const glm::dvec2& pt);
+ glm::dvec2 inv_trapezoid(const double trapezoid_factor, const glm::dvec2& pt);
+
+ glm::dvec2 m_CamExtents;
+ std::vector<double> m_DistortionParams;
+ double m_Angle;
+ double m_TrapezoidFactor;
+ glm::dvec2 m_DisplayOffset;
+ glm::dvec2 m_DisplayScale;
+
+ double m_RescaleFactor;
+};
+
+typedef boost::shared_ptr<DeDistort> DeDistortPtr;
+
+}
+#endif
diff --git a/src/imaging/FWCamera.cpp b/src/imaging/FWCamera.cpp
new file mode 100644
index 0000000..1fc62ff
--- /dev/null
+++ b/src/imaging/FWCamera.cpp
@@ -0,0 +1,671 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+
+#include "FWCamera.h"
+#ifdef AVG_ENABLE_1394_2
+#include "FWCameraUtils.h"
+#endif
+
+#include "../base/Logger.h"
+#include "../base/Exception.h"
+#include "../base/ScopeTimer.h"
+#include "../base/StringHelper.h"
+
+#include <string.h>
+#include <sstream>
+#include <iomanip>
+
+namespace avg {
+
+using namespace std;
+
+FWCamera::FWCamera(unsigned long long guid, int unit, bool bFW800, IntPoint size,
+ PixelFormat camPF, PixelFormat destPF, float frameRate)
+ : Camera(camPF, destPF, size, frameRate),
+ m_WhitebalanceU(-1),
+ m_WhitebalanceV(-1)
+{
+#ifdef AVG_ENABLE_1394_2
+ m_FrameRateConstant = getFrameRateConst(getFrameRate());
+ if (camPF == I16) {
+ throw Exception(AVG_ERR_CAMERA_NONFATAL,
+ "I16 pixel format is not supported for firewire cameras.");
+ }
+ m_Mode = getCamMode(size, camPF);
+ dc1394camera_list_t * pCameraList;
+
+ m_pDC1394 = dc1394_new();
+ if (m_pDC1394 == 0) {
+ throw Exception(AVG_ERR_CAMERA_NONFATAL,
+ "Failed to initialize firewire subsystem");
+ }
+ int err = dc1394_camera_enumerate(m_pDC1394, &pCameraList);
+
+ if (err != DC1394_SUCCESS) {
+ AVG_LOG_ERROR("Unable to look for cameras");
+#ifdef linux
+ AVG_LOG_ERROR("Please check");
+ AVG_LOG_ERROR(" - if the kernel modules `ieee1394',`raw1394' and \
+ `ohci1394' are loaded");
+ AVG_LOG_ERROR(" - if you have read/write access to /dev/raw1394.");
+#endif
+ dc1394_free(m_pDC1394);
+ throw Exception(AVG_ERR_CAMERA_NONFATAL,"Firewire failure");
+ }
+
+ if (pCameraList->num == 0) {
+ dc1394_camera_free_list(pCameraList);
+ dc1394_free(m_pDC1394);
+ throw Exception(AVG_ERR_CAMERA_NONFATAL,"No firewire cameras found.");
+ }
+ int id_to_use = -1;
+ if (guid != 0) {
+ for (unsigned i = 0; i < pCameraList->num; ++i) {
+ if (pCameraList->ids[i].guid == guid) {
+ id_to_use = i;
+ }
+ }
+ if (id_to_use == -1) {
+ AVG_LOG_WARNING("Firewire GUID=" << hex << guid << dec
+ << " requested but not found on bus. Using first camera");
+ id_to_use = 0;
+ }
+ } else {
+ id_to_use = 0;
+ }
+ if (unit != -1) {
+ m_pCamera = dc1394_camera_new_unit(m_pDC1394, pCameraList->ids[id_to_use].guid,
+ unit);
+ } else {
+ m_pCamera = dc1394_camera_new(m_pDC1394, pCameraList->ids[id_to_use].guid);
+ }
+ if (!m_pCamera) {
+ dc1394_camera_free_list(pCameraList);
+ dc1394_free(m_pDC1394);
+ throw Exception(AVG_ERR_CAMERA_FATAL,"Failed to initialize camera");
+ }
+
+ dc1394_camera_free_list(pCameraList);
+
+ if (bFW800) {
+ dc1394_video_set_operation_mode(m_pCamera, DC1394_OPERATION_MODE_1394B);
+ err = dc1394_video_set_iso_speed(m_pCamera, DC1394_ISO_SPEED_800);
+ } else {
+ err = dc1394_video_set_iso_speed(m_pCamera, DC1394_ISO_SPEED_400);
+ }
+ AVG_ASSERT(err == DC1394_SUCCESS);
+ err = dc1394_video_set_mode(m_pCamera, m_Mode);
+ AVG_ASSERT(err == DC1394_SUCCESS);
+
+ dc1394framerates_t frameRates;
+ err = dc1394_video_get_supported_framerates(m_pCamera, m_Mode, &frameRates);
+ AVG_ASSERT(err == DC1394_SUCCESS);
+ bool bFrameRateSupported = false;
+ for (unsigned int i = 0; i < frameRates.num; i++) {
+ if (frameRates.framerates[i] == m_FrameRateConstant) {
+ bFrameRateSupported = true;
+ break;
+ }
+ }
+ if (!bFrameRateSupported) {
+ AVG_LOG_ERROR("Camera does not support framerate " << getFrameRate()
+ << " in the current video mode.");
+ dc1394_capture_stop(m_pCamera);
+ dc1394_video_set_transmission(m_pCamera, DC1394_OFF);
+ dc1394_camera_free(m_pCamera);
+ dc1394_free(m_pDC1394);
+ throw Exception(AVG_ERR_CAMERA_NONFATAL,
+ string("Camera does not support framerate ")+toString(getFrameRate())+
+ " in the current video mode.");
+ }
+
+ err = dc1394_video_set_framerate(m_pCamera, m_FrameRateConstant);
+ AVG_ASSERT(err == DC1394_SUCCESS);
+
+ err = dc1394_capture_setup(m_pCamera,8, DC1394_CAPTURE_FLAGS_DEFAULT);
+ if (err != DC1394_SUCCESS) {
+ AVG_LOG_ERROR("Unable to setup camera. Make sure that");
+ AVG_LOG_ERROR("video mode and framerate (" << getFrameRate() << ") are");
+ AVG_LOG_ERROR("supported by your camera.");
+ dc1394_capture_stop(m_pCamera);
+ dc1394_video_set_transmission(m_pCamera, DC1394_OFF);
+ dc1394_camera_free(m_pCamera);
+ dc1394_free(m_pDC1394);
+ throw Exception(AVG_ERR_CAMERA_NONFATAL, "Failed to initialize camera");
+ }
+#else
+ AVG_ASSERT(false);
+#endif
+}
+
+FWCamera::~FWCamera()
+{
+#ifdef AVG_ENABLE_1394_2
+ dc1394_video_set_transmission(m_pCamera, DC1394_OFF);
+ dc1394_capture_stop(m_pCamera);
+ dc1394_camera_free(m_pCamera);
+ dc1394_free(m_pDC1394);
+#endif
+ AVG_TRACE(Logger::category::CONFIG, Logger::severity::INFO, "Firewire camera closed.");
+}
+
+void FWCamera::startCapture()
+{
+#ifdef AVG_ENABLE_1394_2
+ int err = dc1394_video_set_transmission(m_pCamera, DC1394_ON);
+ AVG_ASSERT(err == DC1394_SUCCESS);
+
+ dc1394switch_t status = DC1394_OFF;
+
+ int i = 0;
+ while (status == DC1394_OFF && i++ < 5) {
+ usleep(50000);
+ err = dc1394_video_get_transmission(m_pCamera, &status);
+ AVG_ASSERT(err == DC1394_SUCCESS);
+ }
+
+ if (i == 5) {
+ AVG_ASSERT(false);
+ }
+ // Default to turning off any camera sharpness manipulation.
+ setFeature(CAM_FEATURE_SHARPNESS, 0);
+
+ // Turn off possible auto exposure.
+ dc1394_feature_set_mode(m_pCamera, DC1394_FEATURE_EXPOSURE,
+ DC1394_FEATURE_MODE_MANUAL);
+ dc1394_feature_set_power(m_pCamera, DC1394_FEATURE_EXPOSURE, DC1394_OFF);
+
+ AVG_TRACE(Logger::category::CONFIG, Logger::severity::INFO, "Firewire camera opened.");
+ for (FeatureMap::iterator it=m_Features.begin(); it != m_Features.end(); it++) {
+ setFeature(it->first, it->second, true);
+ }
+ setWhitebalance(m_WhitebalanceU, m_WhitebalanceV, true);
+
+ if (getCamPF() == BAYER8) {
+ if (strcmp(m_pCamera->model, "DFx 31BF03") == 0) {
+ AVG_TRACE(Logger::category::CONFIG, Logger::severity::INFO,
+ "Applying bayer pattern fixup for IS DFx31BF03 camera");
+ setCamPF(BAYER8_GRBG);
+ } else if (strcmp(m_pCamera->vendor, "Point Grey Research") == 0) {
+ AVG_TRACE(Logger::category::CONFIG, Logger::severity::INFO,
+ "Applying bayer pattern fixup for PointGrey cameras");
+ enablePtGreyBayer();
+ }
+ }
+#endif
+}
+
+BitmapPtr FWCamera::getImage(bool bWait)
+{
+#ifdef AVG_ENABLE_1394_2
+ bool bGotFrame = false;
+ unsigned char * pCaptureBuffer = 0;
+ dc1394video_frame_t * pFrame;
+ dc1394error_t err;
+ if (bWait) {
+ err = dc1394_capture_dequeue(m_pCamera, DC1394_CAPTURE_POLICY_WAIT, &pFrame);
+ } else {
+ err = dc1394_capture_dequeue(m_pCamera, DC1394_CAPTURE_POLICY_POLL, &pFrame);
+ }
+ if (err == DC1394_SUCCESS && pFrame) {
+ bGotFrame = true;
+ pCaptureBuffer = pFrame->image;
+ }
+ if (bGotFrame) {
+ int lineLen;
+ if (getCamPF() == YCbCr411) {
+ lineLen = getImgSize().x*1.5;
+ } else {
+ lineLen = getImgSize().x*getBytesPerPixel(getCamPF());
+ }
+ BitmapPtr pCamBmp(new Bitmap(getImgSize(), getCamPF(), pCaptureBuffer, lineLen,
+ false, "TempCameraBmp"));
+ BitmapPtr pDestBmp = convertCamFrameToDestPF(pCamBmp);
+// cerr << "CamBmp: " << pCamBmp->getPixelFormat() << ", DestBmp: "
+// << pDestBmp->getPixelFormat() << endl;
+ dc1394_capture_enqueue(m_pCamera, pFrame);
+ return pDestBmp;
+ } else {
+ return BitmapPtr();
+ }
+#else
+ return BitmapPtr();
+#endif
+}
+
+
+const string& FWCamera::getDevice() const
+{
+ static string deviceInfo;
+ stringstream ss;
+#ifdef AVG_ENABLE_1394_2
+ ss << m_pCamera->vendor << " " << m_pCamera->model << " (guid=" << m_pCamera->guid
+ << ", unit=" << m_pCamera->unit << ")";
+#endif
+ deviceInfo = ss.str();
+ return deviceInfo;
+}
+
+const std::string& FWCamera::getDriverName() const
+{
+#ifdef AVG_ENABLE_1394_2
+ static string sDriverName = "libdc1394 v2";
+#else
+ static string sDriverName = "";
+#endif
+ return sDriverName;
+}
+
+int FWCamera::getFeature(CameraFeature feature) const
+{
+#ifdef AVG_ENABLE_1394_2
+ FeatureMap::const_iterator it = m_Features.find(feature);
+ if (it == m_Features.end()) {
+ return 0;
+ } else {
+ return it->second;
+ }
+#else
+ return 0;
+#endif
+}
+
+bool FWCamera::hasFeature(CameraFeature feature)
+{
+#ifdef AVG_ENABLE_1394_2
+ if (feature == CAM_FEATURE_STROBE_DURATION) {
+ // FIXME
+ return true;
+ } else {
+ dc1394feature_t featureID = getFeatureID(feature);
+ dc1394bool_t bAvailable;
+ dc1394_feature_is_present(m_pCamera, featureID, &bAvailable);
+ return bAvailable;
+ }
+#else
+ return false;
+#endif
+}
+
+void FWCamera::setFeature(CameraFeature feature, int value, bool bIgnoreOldValue)
+{
+#ifdef AVG_ENABLE_1394_2
+ if (hasFeature(feature)) {
+ if (bIgnoreOldValue || m_Features[feature] != value) {
+ m_Features[feature] = value;
+ if (feature == CAM_FEATURE_STROBE_DURATION) {
+ try {
+ setStrobeDuration(value);
+ } catch (Exception& e) {
+ AVG_LOG_WARNING(string("Camera: Setting strobe duration failed. ") +
+ e.getStr());
+ }
+ } else {
+ dc1394feature_t featureID = getFeatureID(feature);
+ setFeature(featureID, value);
+ // dumpCameraInfo();
+ }
+ }
+ }
+#endif
+}
+
+void FWCamera::setFeatureOneShot(CameraFeature feature)
+{
+#ifdef AVG_ENABLE_1394_2
+ dc1394feature_t featureID = getFeatureID(feature);
+ dc1394error_t err = dc1394_feature_set_mode(m_pCamera, featureID,
+ DC1394_FEATURE_MODE_ONE_PUSH_AUTO);
+ if (err != DC1394_SUCCESS) {
+ AVG_LOG_WARNING("Camera: Unable to set one-shot for "
+ << cameraFeatureToString(feature) << ". Error was " << err);
+ }
+#endif
+}
+
+int FWCamera::getWhitebalanceU() const
+{
+ int u;
+ int v;
+ getWhitebalance(&u, &v);
+ return u;
+}
+
+int FWCamera::getWhitebalanceV() const
+{
+ int u;
+ int v;
+ getWhitebalance(&u, &v);
+ return v;
+}
+
+void FWCamera::setWhitebalance(int u, int v, bool bIgnoreOldValue)
+{
+#ifdef AVG_ENABLE_1394_2
+ if (hasFeature(CAM_FEATURE_WHITE_BALANCE)) {
+ if (bIgnoreOldValue || u != m_WhitebalanceU || v != m_WhitebalanceV) {
+ m_WhitebalanceU = u;
+ m_WhitebalanceV = v;
+ dc1394error_t err;
+ if (u == -1) {
+ err = dc1394_feature_set_mode(m_pCamera, DC1394_FEATURE_WHITE_BALANCE,
+ DC1394_FEATURE_MODE_AUTO);
+ } else {
+ err = dc1394_feature_set_mode(m_pCamera, DC1394_FEATURE_WHITE_BALANCE,
+ DC1394_FEATURE_MODE_MANUAL);
+ err = dc1394_feature_whitebalance_set_value(m_pCamera, u, v);
+ }
+ if (err != DC1394_SUCCESS) {
+ AVG_LOG_WARNING("Camera: Unable to set whitebalance. Error was " << err);
+ }
+ }
+ }
+#endif
+}
+
+void FWCamera::setFeature(dc1394feature_t feature, int value)
+{
+#ifdef AVG_ENABLE_1394_2
+ dc1394error_t err;
+ if (value == -1) {
+ err = dc1394_feature_set_mode(m_pCamera, feature, DC1394_FEATURE_MODE_AUTO);
+ err = dc1394_feature_set_power(m_pCamera, feature, DC1394_OFF);
+ } else {
+ dc1394_feature_set_mode(m_pCamera, feature, DC1394_FEATURE_MODE_MANUAL);
+ err = dc1394_feature_set_power(m_pCamera, feature, DC1394_ON);
+ err = dc1394_feature_set_value(m_pCamera, feature, value);
+ }
+ if (err != DC1394_SUCCESS) {
+ AVG_LOG_WARNING("Camera: Unable to set " << feature << ". Error was " << err);
+ }
+/*
+ dc1394feature_info_t featureInfo;
+ featureInfo.id = feature;
+ err = dc1394_feature_get(m_pCamera, &featureInfo);
+ dc1394_feature_print(&featureInfo, stdout);
+*/
+#endif
+}
+
+void FWCamera::setStrobeDuration(int microsecs)
+{
+#ifdef AVG_ENABLE_1394_2
+ dc1394error_t err;
+ uint32_t durationRegValue;
+ if (microsecs >= 63930 || microsecs < -1) {
+ throw Exception(AVG_ERR_CAMERA_FATAL, string("Illegal value ")
+ +toString(microsecs)+" for strobe duration.");
+ }
+ if (microsecs == -1) {
+ // Turn off strobe. No error checking done here (if the camera doesn't support
+ // strobe, setting the register will fail. But there is really no error, because
+ // we're turning the feature off anyway.)
+ uint32_t strobeRegValue = 0x81000000;
+ err = dc1394_set_strobe_register(m_pCamera, 0x200, strobeRegValue);
+ } else {
+ if (microsecs < 0x400) {
+ durationRegValue = microsecs;
+ } else {
+ // Wierd calculations: IIDC register values for time are non-linear. Translate
+ // the method parameter in microseconds to appropriate register values.
+ float targetMillisecs = microsecs/1000.f;
+ const float realTimes[] = {1,2,4,6,8,12,16,24,32,48,63.93};
+ const uint32_t regValues[] =
+ {0x400, 0x600, 0x800, 0x900, 0xA00, 0xB00, 0xC00, 0xD00,
+ 0xE00, 0xF00, 0xFFF};
+ int len = sizeof(regValues)/sizeof(*regValues);
+ AVG_ASSERT(len == sizeof(realTimes)/sizeof(*realTimes));
+ int i;
+ for (i = 1; realTimes[i] < targetMillisecs; ++i) {
+ }
+ float ratio = (targetMillisecs-realTimes[i])/(realTimes[i-1]-realTimes[i]);
+ durationRegValue = ratio*regValues[i-1]+(1-ratio)*regValues[i];
+ }
+
+ err = dc1394_set_PIO_register(m_pCamera, 0x08, 0xC0000000);
+ AVG_ASSERT(err == DC1394_SUCCESS);
+
+ uint32_t strobeRegValue = 0x83001000+durationRegValue;
+ err = dc1394_set_strobe_register(m_pCamera, 0x200, strobeRegValue);
+ AVG_ASSERT(err == DC1394_SUCCESS);
+ }
+#endif
+}
+
+void FWCamera::getWhitebalance(int* pU, int* pV) const
+{
+#ifdef AVG_ENABLE_1394_2
+ dc1394error_t err = dc1394_feature_whitebalance_get_value(m_pCamera,
+ (uint32_t*)pU, (uint32_t*)pV);
+ if (err != DC1394_SUCCESS) {
+ AVG_LOG_WARNING("Camera: Unable to get whitebalance setting. Error was " << err);
+ }
+#endif
+}
+
+void FWCamera::enablePtGreyBayer()
+{
+#ifdef AVG_ENABLE_1394_2
+ dc1394error_t err;
+ uint32_t imageDataFormat;
+ err = dc1394_get_adv_control_register(m_pCamera, 0x48, &imageDataFormat);
+ AVG_ASSERT(err == DC1394_SUCCESS);
+ if (imageDataFormat & 0x80000000) {
+ err = dc1394_set_adv_control_register(m_pCamera, 0x48, 0x80000081);
+ AVG_ASSERT(err == DC1394_SUCCESS);
+ uint32_t bayerFormat;
+ err = dc1394_get_adv_control_register(m_pCamera, 0x40, &bayerFormat);
+ AVG_ASSERT(err == DC1394_SUCCESS);
+ PixelFormat exactPF = fwBayerStringToPF(bayerFormat);
+ if (exactPF == I8) {
+ throw(Exception(AVG_ERR_CAMERA_NONFATAL,
+ "Greyscale camera doesn't support bayer pattern."));
+ }
+ setCamPF(exactPF);
+ }
+#endif
+}
+
+int FWCamera::countCameras()
+{
+#ifdef AVG_ENABLE_1394_2
+ dc1394_t* pDC1394 = dc1394_new();
+ if (pDC1394 == 0) {
+ return 0;
+ }
+ dc1394camera_list_t * pCameraList;
+ int err=dc1394_camera_enumerate(pDC1394, &pCameraList);
+ if (err == DC1394_SUCCESS) {
+ int numCameras = pCameraList->num;
+ return numCameras;
+ }
+#endif
+ return 0;
+}
+
+CameraInfo* FWCamera::getCameraInfos(int deviceNumber)
+{
+#ifdef AVG_ENABLE_1394_2
+ dc1394_t* pDC1394 = dc1394_new();
+ if (pDC1394 == 0) {
+ AVG_ASSERT(false);
+ return NULL;
+ }
+ dc1394camera_list_t * pCameraList;
+ int err=dc1394_camera_enumerate(pDC1394, &pCameraList);
+ if (err != DC1394_SUCCESS) {
+ AVG_ASSERT(false);
+ return NULL;
+ }
+ if (pCameraList->num != 0) {
+ dc1394camera_id_t id = pCameraList->ids[deviceNumber];
+ dc1394camera_t * pCamera = dc1394_camera_new_unit(pDC1394, id.guid,
+ id.unit);
+ if (pCamera) {
+ stringstream deviceID;
+ deviceID << hex << id.guid;//pCamera->guid;
+ CameraInfo* camInfo = new CameraInfo("Firewire", deviceID.str());
+
+ getCameraControls(pCamera, camInfo);
+ getCameraImageFormats(pCamera, camInfo);
+
+ dc1394_camera_free(pCamera);
+ dc1394_camera_free_list(pCameraList);
+ dc1394_free(pDC1394);
+ return camInfo;
+ }
+ }
+#endif
+ return NULL;
+}
+
+#ifdef AVG_ENABLE_1394_2
+void FWCamera::getCameraImageFormats(dc1394camera_t* pCamera, CameraInfo* camInfo)
+{
+ dc1394video_modes_t videoModes;
+ dc1394framerates_t framerates;
+ dc1394error_t err = dc1394_video_get_supported_modes(pCamera, &videoModes);
+ if (err != DC1394_SUCCESS) {
+ AVG_ASSERT(false);
+ return;
+ }
+ for (unsigned i = 0; i < videoModes.num; i++) {
+ //Covers only libavg supported formats, other capabilities are ignored
+ if (videoModes.modes[i] >= DC1394_VIDEO_MODE_320x240_YUV422
+ && videoModes.modes[i] <= DC1394_VIDEO_MODE_1600x1200_MONO16){
+ PixelFormat pixFormat = getPFFromVideoMode(videoModes.modes[i]);
+ IntPoint size = getFrameSizeFromVideoMode(videoModes.modes[i]);
+ FrameratesVector framerateList;
+ err = dc1394_video_get_supported_framerates(pCamera, videoModes.modes[i],
+ &framerates);
+ if (err != DC1394_SUCCESS) {
+ AVG_LOG_WARNING("Camera: No framerates. Error was: " << err);
+ } else {
+ for (unsigned j = 0; j < framerates.num; j++)
+ {
+ float rate = framerateToFloat(framerates.framerates[j]);
+ framerateList.push_back(rate);
+ }
+ }
+ CameraImageFormat format = CameraImageFormat(size,pixFormat,framerateList);
+ camInfo->addImageFormat(format);
+ }
+ }
+}
+
+void FWCamera::getCameraControls(dc1394camera_t* pCamera, CameraInfo* camInfo)
+{
+ dc1394featureset_t featureSet;
+ int err = dc1394_feature_get_all(pCamera, &featureSet);
+ if (err != DC1394_SUCCESS) {
+ AVG_ASSERT(false);
+ return;
+ }
+
+ for (int i = DC1394_FEATURE_MIN; i <= DC1394_FEATURE_MAX; i++) {
+ dc1394feature_info_t featureInfo = featureSet.feature[i - DC1394_FEATURE_MIN];
+
+ dc1394bool_t bool_t;
+ dc1394_feature_is_present(pCamera,featureInfo.id, &bool_t);
+ if (bool_t != DC1394_TRUE) {
+ continue;
+ }
+
+ uint32_t min = -1;
+ uint32_t max = -1;
+ uint32_t actValue = -1;
+
+ //TODO: 428 (TRIGGER) doesnt have min max
+ err = dc1394_feature_get_boundaries(pCamera, featureInfo.id, &min, &max);
+ if (err != DC1394_SUCCESS) {
+ continue;
+ }
+
+ switch(featureInfo.id) {
+ case DC1394_FEATURE_TEMPERATURE: {
+ uint32_t targetTemp = -1;
+ uint32_t currentTemp = -1;
+ err = dc1394_feature_temperature_get_value(pCamera,&targetTemp,&currentTemp);
+ if (err != DC1394_SUCCESS) {
+ continue;
+ }
+ actValue = currentTemp;
+ break;
+ }
+ //TODO: Think about a way to get this information into CameraInfo
+ case DC1394_FEATURE_WHITE_BALANCE: {
+ uint32_t ubValue = -1;
+ uint32_t vrValue = -1;
+ err = dc1394_feature_whitebalance_get_value(pCamera,&ubValue,&vrValue);
+ if (err != DC1394_SUCCESS) {
+ continue;
+ }
+ //actValue = ubValue; //vrValue;
+ //cout <<"UBlue Value: " << ubValue << " VRed Value: " << vrValue << endl;
+ break;
+ }
+ default: {
+ err = dc1394_feature_get_value(pCamera,featureInfo.id, &actValue);
+ if (err != DC1394_SUCCESS) {
+ continue;
+ }
+ break;
+ }
+ }
+ CameraFeature enumFeature = featureIDToEnum(featureInfo.id);
+ if (enumFeature == CAM_FEATURE_UNSUPPORTED) {
+ continue;
+ }
+ std::string controlName = cameraFeatureToString(enumFeature);
+
+ CameraControl control = CameraControl(controlName,
+ (int) min,
+ (int) max,
+ (int) actValue ); //TODO: isnt really a default value!?
+ camInfo->addControl(control);
+ }
+}
+#endif
+
+void FWCamera::resetBus()
+{
+#ifdef AVG_ENABLE_1394_2
+ dc1394_t* pDC1394 = dc1394_new();
+ if (pDC1394 == 0) {
+ return;
+ }
+ dc1394camera_list_t * pCameraList;
+ int err=dc1394_camera_enumerate(pDC1394, &pCameraList);
+ if (err == DC1394_SUCCESS) {
+ if (pCameraList->num != 0) {
+ dc1394camera_t * pCam = dc1394_camera_new(pDC1394, pCameraList->ids[0].guid);
+ if (pCam) {
+ dc1394_reset_bus(pCam);
+ dc1394_camera_free(pCam);
+ }
+ }
+ dc1394_camera_free_list(pCameraList);
+ }
+ dc1394_free(pDC1394);
+#endif
+}
+
+}
diff --git a/src/imaging/FWCamera.h b/src/imaging/FWCamera.h
new file mode 100644
index 0000000..c7badc0
--- /dev/null
+++ b/src/imaging/FWCamera.h
@@ -0,0 +1,94 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+
+#ifndef _FWCamera_H_
+#define _FWCamera_H_
+
+#include "../avgconfigwrapper.h"
+
+#include "Camera.h"
+
+#include "../graphics/Bitmap.h"
+#include "../graphics/Pixel24.h"
+
+#include "../base/GLMHelper.h"
+
+#ifdef AVG_ENABLE_1394_2
+#include <dc1394/control.h>
+#include <dc1394/register.h>
+#endif
+#ifndef AVG_ENABLE_1394_2
+typedef unsigned int dc1394feature_t;
+#endif
+
+#include <string>
+#include <map>
+
+namespace avg {
+
+class AVG_API FWCamera: public Camera {
+public:
+ FWCamera(unsigned long long guid, int unit, bool bFW800, IntPoint size,
+ PixelFormat camPF, PixelFormat destPF, float frameRate);
+ virtual ~FWCamera();
+ virtual void startCapture();
+
+ virtual BitmapPtr getImage(bool bWait);
+
+ virtual const std::string& getDevice() const;
+ virtual const std::string& getDriverName() const;
+
+ virtual int getFeature(CameraFeature feature) const;
+ bool hasFeature(CameraFeature feature);
+ virtual void setFeature(CameraFeature feature, int value, bool bIgnoreOldValue=false);
+ virtual void setFeatureOneShot(CameraFeature feature);
+ virtual int getWhitebalanceU() const;
+ virtual int getWhitebalanceV() const;
+ virtual void setWhitebalance(int u, int v, bool bIgnoreOldValue=false);
+
+ static int countCameras();
+ static CameraInfo* getCameraInfos(int deviceNumber);
+ static void resetBus();
+
+private:
+ void setFeature(dc1394feature_t feature, int value);
+ void setStrobeDuration(int microsecs);
+ void getWhitebalance(int* pU, int* pV) const;
+ void enablePtGreyBayer();
+
+#ifdef AVG_ENABLE_1394_2
+ static void getCameraImageFormats(dc1394camera_t* pCamera, CameraInfo* camInfo);
+ static void getCameraControls(dc1394camera_t* pCamera, CameraInfo* camInfo);
+
+ dc1394_t * m_pDC1394;
+ dc1394camera_t * m_pCamera;
+ dc1394framerate_t m_FrameRateConstant;
+ dc1394video_mode_t m_Mode;
+#endif
+
+ FeatureMap m_Features;
+ int m_WhitebalanceU;
+ int m_WhitebalanceV;
+};
+
+}
+
+#endif
diff --git a/src/imaging/FWCameraUtils.cpp b/src/imaging/FWCameraUtils.cpp
new file mode 100644
index 0000000..e8f37b8
--- /dev/null
+++ b/src/imaging/FWCameraUtils.cpp
@@ -0,0 +1,366 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+
+#include "FWCameraUtils.h"
+
+#include "../base/Logger.h"
+#include "../base/Exception.h"
+#include "../base/StringHelper.h"
+
+namespace avg {
+
+using namespace std;
+
+dc1394video_mode_t getCamMode(IntPoint size, PixelFormat pf)
+{
+ if (size.x == 320 && size.y == 240 && pf == YCbCr422) {
+ return DC1394_VIDEO_MODE_320x240_YUV422;
+ } else if (size.x == 640 && size.y == 480) {
+ switch (pf) {
+ case I8:
+ case BAYER8:
+ return DC1394_VIDEO_MODE_640x480_MONO8;
+ case I16:
+ return DC1394_VIDEO_MODE_640x480_MONO16;
+ case YCbCr411:
+ return DC1394_VIDEO_MODE_640x480_YUV411;
+ case YCbCr422:
+ return DC1394_VIDEO_MODE_640x480_YUV422;
+ case R8G8B8:
+ return DC1394_VIDEO_MODE_640x480_RGB8;
+ default:
+ break;
+ }
+ } else if (size.x == 800 && size.y == 600) {
+ switch (pf) {
+ case I8:
+ case BAYER8:
+ return DC1394_VIDEO_MODE_800x600_MONO8;
+ case I16:
+ return DC1394_VIDEO_MODE_800x600_MONO16;
+ case YCbCr422:
+ return DC1394_VIDEO_MODE_800x600_YUV422;
+ case R8G8B8:
+ return DC1394_VIDEO_MODE_800x600_RGB8;
+ default:
+ break;
+ }
+ } else if (size.x == 1024 && size.y == 768) {
+ switch (pf) {
+ case I8:
+ case BAYER8:
+ return DC1394_VIDEO_MODE_1024x768_MONO8;
+ case I16:
+ return DC1394_VIDEO_MODE_1024x768_MONO16;
+ case YCbCr422:
+ return DC1394_VIDEO_MODE_1024x768_YUV422;
+ case R8G8B8:
+ return DC1394_VIDEO_MODE_1024x768_RGB8;
+ default:
+ break;
+ }
+ } else if (size.x == 1280 && size.y == 960) {
+ switch (pf) {
+ case I8:
+ case BAYER8:
+ return DC1394_VIDEO_MODE_1280x960_MONO8;
+ case I16:
+ return DC1394_VIDEO_MODE_1280x960_MONO16;
+ case YCbCr422:
+ return DC1394_VIDEO_MODE_1280x960_YUV422;
+ case R8G8B8:
+ return DC1394_VIDEO_MODE_1280x960_RGB8;
+ default:
+ break;
+ }
+ } else if (size.x == 1600 && size.y == 1200) {
+ switch (pf) {
+ case I8:
+ case BAYER8:
+ return DC1394_VIDEO_MODE_1600x1200_MONO8;
+ case I16:
+ return DC1394_VIDEO_MODE_1600x1200_MONO16;
+ case YCbCr422:
+ return DC1394_VIDEO_MODE_1600x1200_YUV422;
+ case R8G8B8:
+ return DC1394_VIDEO_MODE_1600x1200_RGB8;
+ default:
+ break;
+ }
+ }
+ throw Exception(AVG_ERR_CAMERA_FATAL,
+ "Unsupported or illegal value ("+toString(size.x)+", "+toString(size.y)+
+ "), "+getPixelFormatString(pf)+"\" for camera mode.");
+}
+
+dc1394framerate_t getFrameRateConst(float frameRate)
+{
+ if (frameRate == 1.875f) {
+ return DC1394_FRAMERATE_1_875;
+ } else if (frameRate == 3.75f) {
+ return DC1394_FRAMERATE_3_75;
+ } else if (frameRate == 7.5f) {
+ return DC1394_FRAMERATE_7_5;
+ } else if (frameRate == 15) {
+ return DC1394_FRAMERATE_15;
+ } else if (frameRate == 30) {
+ return DC1394_FRAMERATE_30;
+ } else if (frameRate == 60) {
+ return DC1394_FRAMERATE_60;
+ } else if (frameRate == 120) {
+ return DC1394_FRAMERATE_120;
+ } else if (frameRate == 240) {
+ return DC1394_FRAMERATE_240;
+ } else {
+ throw Exception(AVG_ERR_CAMERA_FATAL, string("Illegal value ")
+ +toString(frameRate)+" for camera framerate.");
+ }
+}
+CameraFeature featureIDToEnum(dc1394feature_t feature)
+{
+ switch (feature) {
+ case DC1394_FEATURE_BRIGHTNESS:
+ return CAM_FEATURE_BRIGHTNESS;
+ case DC1394_FEATURE_EXPOSURE:
+ return CAM_FEATURE_EXPOSURE;
+ case DC1394_FEATURE_SHARPNESS:
+ return CAM_FEATURE_SHARPNESS;
+ case DC1394_FEATURE_WHITE_BALANCE:
+ return CAM_FEATURE_WHITE_BALANCE;
+ case DC1394_FEATURE_HUE:
+ return CAM_FEATURE_HUE;
+ case DC1394_FEATURE_SATURATION:
+ return CAM_FEATURE_SATURATION;
+ case DC1394_FEATURE_GAMMA:
+ return CAM_FEATURE_GAMMA;
+ case DC1394_FEATURE_SHUTTER:
+ return CAM_FEATURE_SHUTTER;
+ case DC1394_FEATURE_GAIN:
+ return CAM_FEATURE_GAIN;
+ case DC1394_FEATURE_IRIS:
+ return CAM_FEATURE_IRIS;
+ case DC1394_FEATURE_FOCUS:
+ return CAM_FEATURE_FOCUS;
+ case DC1394_FEATURE_TEMPERATURE:
+ return CAM_FEATURE_TEMPERATURE;
+ case DC1394_FEATURE_TRIGGER:
+ return CAM_FEATURE_TRIGGER;
+ case DC1394_FEATURE_TRIGGER_DELAY:
+ return CAM_FEATURE_TRIGGER_DELAY;
+ case DC1394_FEATURE_WHITE_SHADING:
+ return CAM_FEATURE_WHITE_SHADING;
+ case DC1394_FEATURE_ZOOM:
+ return CAM_FEATURE_ZOOM;
+ case DC1394_FEATURE_PAN:
+ return CAM_FEATURE_PAN;
+ case DC1394_FEATURE_TILT:
+ return CAM_FEATURE_TILT;
+ case DC1394_FEATURE_OPTICAL_FILTER:
+ return CAM_FEATURE_OPTICAL_FILTER;
+ case DC1394_FEATURE_CAPTURE_SIZE:
+ return CAM_FEATURE_CAPTURE_SIZE;
+ case DC1394_FEATURE_CAPTURE_QUALITY:
+ return CAM_FEATURE_CAPTURE_QUALITY;
+ default:
+ return CAM_FEATURE_UNSUPPORTED;
+ }
+}
+
+dc1394feature_t getFeatureID(CameraFeature feature)
+{
+ switch (feature) {
+ case CAM_FEATURE_BRIGHTNESS:
+ return DC1394_FEATURE_BRIGHTNESS;
+ case CAM_FEATURE_EXPOSURE:
+ return DC1394_FEATURE_EXPOSURE;
+ case CAM_FEATURE_SHARPNESS:
+ return DC1394_FEATURE_SHARPNESS;
+ case CAM_FEATURE_WHITE_BALANCE:
+ return DC1394_FEATURE_WHITE_BALANCE;
+ case CAM_FEATURE_HUE:
+ return DC1394_FEATURE_HUE;
+ case CAM_FEATURE_SATURATION:
+ return DC1394_FEATURE_SATURATION;
+ case CAM_FEATURE_GAMMA:
+ return DC1394_FEATURE_GAMMA;
+ case CAM_FEATURE_SHUTTER:
+ return DC1394_FEATURE_SHUTTER;
+ case CAM_FEATURE_GAIN:
+ return DC1394_FEATURE_GAIN;
+ case CAM_FEATURE_IRIS:
+ return DC1394_FEATURE_IRIS;
+ case CAM_FEATURE_FOCUS:
+ return DC1394_FEATURE_FOCUS;
+ case CAM_FEATURE_TEMPERATURE:
+ return DC1394_FEATURE_TEMPERATURE;
+ case CAM_FEATURE_TRIGGER:
+ return DC1394_FEATURE_TRIGGER;
+ case CAM_FEATURE_TRIGGER_DELAY:
+ return DC1394_FEATURE_TRIGGER_DELAY;
+ case CAM_FEATURE_WHITE_SHADING:
+ return DC1394_FEATURE_WHITE_SHADING;
+ case CAM_FEATURE_ZOOM:
+ return DC1394_FEATURE_ZOOM;
+ case CAM_FEATURE_PAN:
+ return DC1394_FEATURE_PAN;
+ case CAM_FEATURE_TILT:
+ return DC1394_FEATURE_TILT;
+ case CAM_FEATURE_OPTICAL_FILTER:
+ return DC1394_FEATURE_OPTICAL_FILTER;
+ case CAM_FEATURE_CAPTURE_SIZE:
+ return DC1394_FEATURE_CAPTURE_SIZE;
+ case CAM_FEATURE_CAPTURE_QUALITY:
+ return DC1394_FEATURE_CAPTURE_QUALITY;
+ default:
+ AVG_ASSERT(false);
+ return dc1394feature_t(0);
+ }
+}
+
+IntPoint getFrameSizeFromVideoMode(dc1394video_mode_t mode)
+{
+ IntPoint point = IntPoint();
+ point.x = -1;
+ point.y = -1;
+ switch (mode) {
+ case DC1394_VIDEO_MODE_160x120_YUV444: {
+ point.x = 160;
+ point.y = 120;
+ return point;
+ }
+ case DC1394_VIDEO_MODE_320x240_YUV422: {
+ point.x = 320;
+ point.y = 240;
+ return point;
+ }
+ case DC1394_VIDEO_MODE_640x480_YUV411:
+ case DC1394_VIDEO_MODE_640x480_YUV422:
+ case DC1394_VIDEO_MODE_640x480_RGB8:
+ case DC1394_VIDEO_MODE_640x480_MONO8:
+ case DC1394_VIDEO_MODE_640x480_MONO16: {
+ point.x = 640;
+ point.y = 480;
+ return point;
+ }
+ case DC1394_VIDEO_MODE_800x600_YUV422:
+ case DC1394_VIDEO_MODE_800x600_RGB8:
+ case DC1394_VIDEO_MODE_800x600_MONO8:
+ case DC1394_VIDEO_MODE_800x600_MONO16: {
+ point.x = 800;
+ point.y = 600;
+ return point;
+ }
+ case DC1394_VIDEO_MODE_1024x768_YUV422:
+ case DC1394_VIDEO_MODE_1024x768_RGB8:
+ case DC1394_VIDEO_MODE_1024x768_MONO8:
+ case DC1394_VIDEO_MODE_1024x768_MONO16: {
+ point.x = 1024;
+ point.y = 768;
+ return point;
+ }
+
+
+ case DC1394_VIDEO_MODE_1280x960_YUV422:
+ case DC1394_VIDEO_MODE_1280x960_RGB8:
+ case DC1394_VIDEO_MODE_1280x960_MONO8:
+ case DC1394_VIDEO_MODE_1280x960_MONO16: {
+ point.x = 1280;
+ point.y = 960;
+ return point;
+ }
+ case DC1394_VIDEO_MODE_1600x1200_YUV422:
+ case DC1394_VIDEO_MODE_1600x1200_RGB8:
+ case DC1394_VIDEO_MODE_1600x1200_MONO8:
+ case DC1394_VIDEO_MODE_1600x1200_MONO16: {
+ point.x = 1600;
+ point.y = 1200;
+ return point;
+ }
+ default:
+ AVG_ASSERT(false);
+ return point;
+ }
+}
+
+PixelFormat getPFFromVideoMode(dc1394video_mode_t mode)
+{
+ switch (mode) {
+ case DC1394_VIDEO_MODE_640x480_YUV411:
+ return YCbCr411;
+ case DC1394_VIDEO_MODE_320x240_YUV422:
+ case DC1394_VIDEO_MODE_640x480_YUV422:
+ case DC1394_VIDEO_MODE_800x600_YUV422:
+ case DC1394_VIDEO_MODE_1024x768_YUV422:
+ case DC1394_VIDEO_MODE_1280x960_YUV422:
+ case DC1394_VIDEO_MODE_1600x1200_YUV422:
+ return YCbCr422;
+ case DC1394_VIDEO_MODE_640x480_RGB8:
+ case DC1394_VIDEO_MODE_800x600_RGB8:
+ case DC1394_VIDEO_MODE_1024x768_RGB8:
+ case DC1394_VIDEO_MODE_1280x960_RGB8:
+ case DC1394_VIDEO_MODE_1600x1200_RGB8:
+ return R8G8B8;
+ case DC1394_VIDEO_MODE_640x480_MONO8:
+ case DC1394_VIDEO_MODE_800x600_MONO8:
+ case DC1394_VIDEO_MODE_1024x768_MONO8:
+ case DC1394_VIDEO_MODE_1280x960_MONO8:
+ case DC1394_VIDEO_MODE_1600x1200_MONO8:
+ return I8;
+ case DC1394_VIDEO_MODE_640x480_MONO16:
+ case DC1394_VIDEO_MODE_800x600_MONO16:
+ case DC1394_VIDEO_MODE_1024x768_MONO16:
+ case DC1394_VIDEO_MODE_1280x960_MONO16:
+ case DC1394_VIDEO_MODE_1600x1200_MONO16:
+ return I16;
+ default:
+ AVG_ASSERT(false);
+ return PixelFormat(0);
+ }
+}
+
+float framerateToFloat(dc1394framerate_t framerate)
+{
+ switch (framerate) {
+ case DC1394_FRAMERATE_1_875:
+ return 1.875;
+ case DC1394_FRAMERATE_3_75:
+ return 3.75;
+ case DC1394_FRAMERATE_7_5:
+ return 7.5;
+ case DC1394_FRAMERATE_15:
+ return 15;
+ case DC1394_FRAMERATE_30:
+ return 30;
+ case DC1394_FRAMERATE_60:
+ return 60;
+ case DC1394_FRAMERATE_120:
+ return 120;
+ case DC1394_FRAMERATE_240:
+ return 240;
+ default:{
+ AVG_ASSERT(false);
+ return -1;
+ }
+ }
+}
+
+
+}
diff --git a/src/imaging/FWCameraUtils.h b/src/imaging/FWCameraUtils.h
new file mode 100644
index 0000000..668f5bb
--- /dev/null
+++ b/src/imaging/FWCameraUtils.h
@@ -0,0 +1,48 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+
+#ifndef _FWCameraUtils_H_
+#define _FWCameraUtils_H_
+
+#include "../api.h"
+#include "Camera.h"
+
+#include "../avgconfigwrapper.h"
+
+#include "../base/GLMHelper.h"
+
+#include <dc1394/control.h>
+
+#include <string>
+
+namespace avg {
+
+dc1394video_mode_t getCamMode(IntPoint size, PixelFormat pf);
+dc1394framerate_t getFrameRateConst(float frameRate);
+CameraFeature featureIDToEnum(dc1394feature_t feature);
+dc1394feature_t getFeatureID(CameraFeature feature);
+IntPoint getFrameSizeFromVideoMode(dc1394video_mode_t mode);
+PixelFormat getPFFromVideoMode(dc1394video_mode_t mode);
+float framerateToFloat(dc1394framerate_t framerate);
+
+}
+
+#endif
diff --git a/src/imaging/FakeCamera.cpp b/src/imaging/FakeCamera.cpp
new file mode 100644
index 0000000..ffb1cb3
--- /dev/null
+++ b/src/imaging/FakeCamera.cpp
@@ -0,0 +1,149 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+
+#include "FakeCamera.h"
+
+#include "../graphics/Pixel8.h"
+#include "../graphics/Filterfill.h"
+#include "../graphics/Filterfillrect.h"
+#include "../graphics/Filtergrayscale.h"
+#include "../graphics/BitmapLoader.h"
+
+#include "../base/TimeSource.h"
+#include "../base/Exception.h"
+#include "../base/Logger.h"
+
+
+using namespace std;
+
+namespace avg {
+
+FakeCamera::FakeCamera(PixelFormat camPF, PixelFormat destPF)
+ : Camera(camPF, destPF, IntPoint(640, 480), 60),
+ m_pBmpQ(new std::queue<BitmapPtr>()),
+ m_bIsOpen(false)
+{
+}
+
+FakeCamera::FakeCamera(std::vector<std::string>& pictures)
+ : Camera(I8, I8, IntPoint(640,480), 60),
+ m_pBmpQ(new std::queue<BitmapPtr>()),
+ m_bIsOpen(false)
+{
+ for (vector<string>::iterator it = pictures.begin(); it != pictures.end(); ++it) {
+ try {
+ BitmapPtr pBmp = loadBitmap(*it);
+ FilterGrayscale().applyInPlace(pBmp);
+ setImgSize(pBmp->getSize());
+ m_pBmpQ->push(pBmp);
+ } catch (Exception& ex) {
+ AVG_LOG_ERROR(ex.getStr());
+ throw;
+ }
+ }
+}
+
+FakeCamera::~FakeCamera()
+{
+}
+
+void FakeCamera::open()
+{
+ m_bIsOpen = true;
+}
+
+void FakeCamera::close()
+{
+ m_bIsOpen = false;
+}
+
+
+BitmapPtr FakeCamera::getImage(bool bWait)
+{
+ if (bWait) {
+ msleep(100);
+ }
+ if (!m_bIsOpen || !bWait || m_pBmpQ->empty()) {
+ return BitmapPtr();
+ } else {
+ BitmapPtr pBmp = m_pBmpQ->front();
+ m_pBmpQ->pop();
+ return pBmp;
+ }
+}
+
+bool FakeCamera::isCameraAvailable()
+{
+ return true;
+}
+
+
+const string& FakeCamera::getDevice() const
+{
+ static string sDeviceName = "FakeCamera";
+ return sDeviceName;
+}
+
+const std::string& FakeCamera::getDriverName() const
+{
+ static string sDriverName = "FakeCameraDriver";
+ return sDriverName;
+}
+
+const string& FakeCamera::getMode() const
+{
+ static string sMode = "FakeCamera";
+ return sMode;
+}
+
+
+int FakeCamera::getFeature(CameraFeature feature) const
+{
+ return 0;
+}
+
+void FakeCamera::setFeature(CameraFeature feature, int value, bool bIgnoreOldValue)
+{
+}
+
+void FakeCamera::setFeatureOneShot(CameraFeature feature)
+{
+}
+
+int FakeCamera::getWhitebalanceU() const
+{
+ return 0;
+}
+
+int FakeCamera::getWhitebalanceV() const
+{
+ return 0;
+}
+
+void FakeCamera::setWhitebalance(int u, int v, bool bIgnoreOldValue)
+{
+}
+
+}
+
+
+
+
diff --git a/src/imaging/FakeCamera.h b/src/imaging/FakeCamera.h
new file mode 100644
index 0000000..4128043
--- /dev/null
+++ b/src/imaging/FakeCamera.h
@@ -0,0 +1,69 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+
+#ifndef _FakeCamera_H_
+#define _FakeCamera_H_
+
+#include "../api.h"
+#include "Camera.h"
+
+#include <boost/shared_ptr.hpp>
+
+#include <string>
+#include <queue>
+
+namespace avg {
+
+typedef boost::shared_ptr<std::queue<BitmapPtr> > BitmapQueuePtr;
+
+class AVG_API FakeCamera: public Camera
+{
+public:
+ FakeCamera(PixelFormat camPF, PixelFormat destPF);
+ FakeCamera(std::vector<std::string>& pictures);
+ virtual ~FakeCamera();
+ virtual void open();
+ virtual void close();
+
+ virtual BitmapPtr getImage(bool bWait);
+ virtual bool isCameraAvailable();
+
+ virtual const std::string& getDevice() const;
+ virtual const std::string& getDriverName() const;
+ virtual const std::string& getMode() const;
+
+ virtual int getFeature(CameraFeature feature) const;
+ virtual void setFeature(CameraFeature feature, int Value, bool bIgnoreOldValue=false);
+ virtual void setFeatureOneShot(CameraFeature feature);
+ virtual int getWhitebalanceU() const;
+ virtual int getWhitebalanceV() const;
+ virtual void setWhitebalance(int u, int v, bool bIgnoreOldValue=false);
+
+private:
+ BitmapQueuePtr m_pBmpQ;
+ bool m_bIsOpen;
+};
+
+}
+
+#endif
+
+
diff --git a/src/imaging/FilterClearBorder.cpp b/src/imaging/FilterClearBorder.cpp
new file mode 100644
index 0000000..dba7c8b
--- /dev/null
+++ b/src/imaging/FilterClearBorder.cpp
@@ -0,0 +1,67 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+
+#include "FilterClearBorder.h"
+
+#include "../base/Exception.h"
+
+#include <iostream>
+#include <math.h>
+#include <string.h>
+
+using namespace std;
+
+namespace avg {
+
+FilterClearBorder::FilterClearBorder(int numPixels)
+ : m_NumPixels(numPixels)
+{
+}
+
+FilterClearBorder::~FilterClearBorder()
+{
+}
+
+void FilterClearBorder::applyInPlace(BitmapPtr pBmp)
+{
+ AVG_ASSERT(pBmp->getPixelFormat() == I8);
+ AVG_ASSERT(m_NumPixels < pBmp->getSize().x);
+ AVG_ASSERT(m_NumPixels < pBmp->getSize().y);
+ if (m_NumPixels != 0) {
+ int stride = pBmp->getStride();
+ unsigned char * pPixels = pBmp->getPixels();
+ IntPoint size = pBmp->getSize();
+ IntPoint activeSize = pBmp->getSize()-IntPoint(2*m_NumPixels, 2*m_NumPixels);
+ for (int y=m_NumPixels-1; y >= 0; --y) {
+ memset(pPixels+stride*y+m_NumPixels, 0, activeSize.x);
+ }
+ for (int y=size.y-m_NumPixels; y < size.y; ++y) {
+ memset(pPixels+stride*y+m_NumPixels, 0, activeSize.x);
+ }
+
+ for (int y = 0; y < size.y; ++y) {
+ memset(pPixels+stride*y, 0, m_NumPixels);
+ memset(pPixels+stride*y+size.x-m_NumPixels, 0, m_NumPixels);
+ }
+ }
+}
+
+}
diff --git a/src/imaging/FilterClearBorder.h b/src/imaging/FilterClearBorder.h
new file mode 100644
index 0000000..80c700b
--- /dev/null
+++ b/src/imaging/FilterClearBorder.h
@@ -0,0 +1,51 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+
+#ifndef _FilterClearBorder_H_
+#define _FilterClearBorder_H_
+
+#include "../api.h"
+#include "CoordTransformer.h"
+
+#include "../graphics/Filter.h"
+
+#include "../base/GLMHelper.h"
+#include "../base/Rect.h"
+
+#include <boost/shared_ptr.hpp>
+
+namespace avg {
+
+class AVG_API FilterClearBorder: public Filter
+{
+ public:
+ FilterClearBorder(int numPixels);
+ virtual ~FilterClearBorder();
+ virtual void applyInPlace(BitmapPtr pBmp);
+ private:
+ int m_NumPixels;
+};
+
+typedef boost::shared_ptr<FilterClearBorder> FilterClearBorderPtr;
+
+}
+
+#endif
diff --git a/src/imaging/FilterDistortion.cpp b/src/imaging/FilterDistortion.cpp
new file mode 100644
index 0000000..08b55bb
--- /dev/null
+++ b/src/imaging/FilterDistortion.cpp
@@ -0,0 +1,83 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+// Original author of this file is igor@c-base.org.
+//
+
+#include "FilterDistortion.h"
+
+#include <iostream>
+#include <math.h>
+
+using namespace std;
+
+namespace avg {
+
+FilterDistortion::FilterDistortion(const IntPoint& srcSize,
+ CoordTransformerPtr pTransformer)
+ : m_SrcSize(srcSize),
+ m_pTransformer(pTransformer)
+{
+ // We use the same dimensions for both of src and dest and just crop.
+ // for each pixel at (x,y) in the dest, m_pMap[x][y] contains an IntPoint that gives
+ // the coords in the src Bitmap.
+ m_pMap = new IntPoint[m_SrcSize.y*m_SrcSize.x];
+ for (int y = 0; y < m_SrcSize.y; ++y) {
+ for (int x = 0; x < m_SrcSize.x; ++x) {
+ glm::dvec2 tmp = m_pTransformer->inverse_transform_point(glm::dvec2(x,y));
+ IntPoint tmp2(int(tmp.x+0.5),int(tmp.y+0.5));
+ if (tmp2.x < m_SrcSize.x && tmp2.y < m_SrcSize.y &&
+ tmp2.x >= 0 && tmp2.y >= 0)
+ {
+ m_pMap[y*m_SrcSize.x+x] = tmp2;
+ } else {
+ m_pMap[y*m_SrcSize.x+x] = IntPoint(0,0);
+ }
+ }
+ }
+}
+
+FilterDistortion::~FilterDistortion()
+{
+ delete[] m_pMap;
+}
+
+BitmapPtr FilterDistortion::apply(BitmapPtr pBmpSource)
+{
+ BitmapPtr pDestBmp = BitmapPtr(new Bitmap(m_SrcSize, I8));
+ unsigned char* pDestLine = pDestBmp->getPixels();
+ unsigned char* pSrcPixels = pBmpSource->getPixels();
+ unsigned char* pDestPixel = pDestLine;
+ int destStride = pDestBmp->getStride();
+ int srcStride = pBmpSource->getStride();
+ IntPoint * pMapPos = m_pMap;
+ for (int y = 0; y < m_SrcSize.y; ++y) {
+ for(int x = 0; x < m_SrcSize.x; ++x) {
+ *pDestPixel = pSrcPixels[pMapPos->x + srcStride*pMapPos->y];
+ pDestPixel++;
+ pMapPos++;
+ }
+ pDestLine+=destStride;
+ pDestPixel = pDestLine;
+ }
+ return pDestBmp;
+}
+
+}
diff --git a/src/imaging/FilterDistortion.h b/src/imaging/FilterDistortion.h
new file mode 100644
index 0000000..25de14e
--- /dev/null
+++ b/src/imaging/FilterDistortion.h
@@ -0,0 +1,56 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+// Original author of this file is igor@c-base.org
+//
+
+#ifndef _FilterDistortion_H_
+#define _FilterDistortion_H_
+
+#include "../api.h"
+#include "CoordTransformer.h"
+
+#include "../graphics/Filter.h"
+
+#include "../base/GLMHelper.h"
+#include "../base/Rect.h"
+
+#include <boost/shared_ptr.hpp>
+
+namespace avg {
+
+// TODO: This class doesn't have a unit test.
+class AVG_API FilterDistortion: public Filter
+{
+ public:
+ FilterDistortion(const IntPoint& srcSize, CoordTransformerPtr pTransformer);
+ virtual ~FilterDistortion();
+ BitmapPtr apply(BitmapPtr pBmpSource);
+ private:
+ IntPoint m_SrcSize;
+ CoordTransformerPtr m_pTransformer;
+ IntPoint* m_pMap;
+};
+
+typedef boost::shared_ptr<FilterDistortion> FilterDistortionPtr;
+
+}
+
+#endif
diff --git a/src/imaging/FilterWipeBorder.cpp b/src/imaging/FilterWipeBorder.cpp
new file mode 100644
index 0000000..dd09068
--- /dev/null
+++ b/src/imaging/FilterWipeBorder.cpp
@@ -0,0 +1,70 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+
+#include "FilterWipeBorder.h"
+
+#include "../base/Exception.h"
+
+#include <iostream>
+#include <math.h>
+#include <string.h>
+
+using namespace std;
+
+namespace avg {
+
+FilterWipeBorder::FilterWipeBorder(int numPixels)
+ : m_NumPixels(numPixels)
+{
+}
+
+FilterWipeBorder::~FilterWipeBorder()
+{
+}
+
+void FilterWipeBorder::applyInPlace(BitmapPtr pBmp)
+{
+ AVG_ASSERT(pBmp->getPixelFormat() == I8);
+ if (m_NumPixels != 0) {
+ int stride = pBmp->getStride();
+ unsigned char * pPixels = pBmp->getPixels();
+ IntPoint size = pBmp->getSize();
+ IntPoint activeSize = pBmp->getSize()-IntPoint(2*m_NumPixels, 2*m_NumPixels);
+
+ unsigned char * pSrcLine = pPixels+stride*m_NumPixels+m_NumPixels;
+ for (int y = m_NumPixels-1; y >= 0; --y) {
+ memcpy(pPixels+stride*y+m_NumPixels, pSrcLine, activeSize.x);
+ }
+ pSrcLine = pPixels+stride*(size.y-m_NumPixels-1)+m_NumPixels;
+ for (int y = size.y-m_NumPixels; y < size.y; ++y) {
+ memcpy(pPixels+stride*y+m_NumPixels, pSrcLine, activeSize.x);
+ }
+
+ for (int y = 0; y < size.y; ++y) {
+ unsigned char src = *(pPixels+stride*y+m_NumPixels);
+ memset(pPixels+stride*y, src, m_NumPixels);
+ src = *(pPixels+stride*y+size.x-m_NumPixels-1);
+ memset(pPixels+stride*y+size.x-m_NumPixels, src, m_NumPixels);
+ }
+ }
+}
+
+}
diff --git a/src/imaging/FilterWipeBorder.h b/src/imaging/FilterWipeBorder.h
new file mode 100644
index 0000000..7804560
--- /dev/null
+++ b/src/imaging/FilterWipeBorder.h
@@ -0,0 +1,50 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+
+#ifndef _FilterWipeBorder_H_
+#define _FilterWipeBorder_H_
+
+#include "../api.h"
+#include "CoordTransformer.h"
+
+#include "../graphics/Filter.h"
+
+#include "../base/Rect.h"
+
+#include <boost/shared_ptr.hpp>
+
+namespace avg {
+
+class AVG_API FilterWipeBorder: public Filter
+{
+ public:
+ FilterWipeBorder(int numPixels);
+ virtual ~FilterWipeBorder();
+ virtual void applyInPlace(BitmapPtr pBmp);
+ private:
+ int m_NumPixels;
+};
+
+typedef boost::shared_ptr<FilterWipeBorder> FilterWipeBorderPtr;
+
+}
+
+#endif
diff --git a/src/imaging/IDSSampleCallback.h b/src/imaging/IDSSampleCallback.h
new file mode 100644
index 0000000..78e8889
--- /dev/null
+++ b/src/imaging/IDSSampleCallback.h
@@ -0,0 +1,37 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+
+#ifndef _IDSSampleCallback_H_
+#define _IDSSampleCallback_H_
+
+struct IMediaSample;
+
+namespace avg {
+
+class IDSSampleCallback
+{
+public:
+ virtual void onSample(IMediaSample * pSample)=0;
+};
+
+};
+
+#endif \ No newline at end of file
diff --git a/src/imaging/Makefile.am b/src/imaging/Makefile.am
new file mode 100644
index 0000000..93d1562
--- /dev/null
+++ b/src/imaging/Makefile.am
@@ -0,0 +1,41 @@
+AM_CPPFLAGS = -I.. @PTHREAD_CFLAGS@ @XML2_CFLAGS@ @GDK_PIXBUF_CFLAGS@
+
+if ENABLE_V4L2
+ V4L2_SOURCES = V4LCamera.cpp
+ V4L2_INCLUDES = V4LCamera.h
+else
+ V4L2_SOURCES =
+ V4L2_INCLUDES =
+endif
+
+if ENABLE_1394_2
+ DC1394_SOURCES = FWCameraUtils.cpp
+ DC1394_INCLUDES = FWCameraUtils.h
+else
+ DC1394_SOURCES =
+ DC1394_INCLUDES =
+endif
+
+ALL_H = Camera.h TrackerThread.h TrackerConfig.h Blob.h FWCamera.h Run.h \
+ FakeCamera.h CoordTransformer.h FilterDistortion.h $(DC1394_INCLUDES) \
+ DeDistort.h trackerconfigdtd.h FilterWipeBorder.h FilterClearBorder.h \
+ $(V4L2_INCLUDES) CameraInfo.h
+ALL_CPP = Camera.cpp TrackerThread.cpp TrackerConfig.cpp Blob.cpp FWCamera.cpp Run.cpp \
+ FakeCamera.cpp CoordTransformer.cpp FilterDistortion.cpp $(DC1394_SOURCES) \
+ DeDistort.cpp trackerconfigdtd.cpp FilterWipeBorder.cpp FilterClearBorder.cpp \
+ $(V4L2_SOURCES) CameraInfo.cpp
+
+TESTS = testimaging
+
+EXTRA_DIST = avgtrackerrc.minimal $(wildcard baseline/*.png) $(wildcard testfiles/*.png) \
+ CMUCamera.h CMUCamera.cpp DSCamera.cpp DSCamera.h DSHelper.h DSHelper.cpp \
+ DSSampleGrabber.h DSSampleGrabber.cpp CMUCameraUtils.h CMUCameraUtils.cpp
+
+noinst_LTLIBRARIES = libimaging.la
+libimaging_la_SOURCES = $(ALL_CPP) $(ALL_H)
+
+noinst_PROGRAMS = testimaging
+testimaging_SOURCES = testimaging.cpp $(ALL_H)
+testimaging_LDADD = ./libimaging.la ../graphics/libgraphics.la ../base/libbase.la \
+ ../base/triangulate/libtriangulate.la \
+ @XML2_LIBS@ @BOOST_THREAD_LIBS@ @PTHREAD_LIBS@ @GDK_PIXBUF_LIBS@
diff --git a/src/imaging/Run.cpp b/src/imaging/Run.cpp
new file mode 100644
index 0000000..37cc97d
--- /dev/null
+++ b/src/imaging/Run.cpp
@@ -0,0 +1,36 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+// Original author of this file is igor@c-base.org
+//
+
+#include "Run.h"
+
+namespace avg {
+
+Run::Run(int row, int startCol, int endCol)
+{
+ m_Row = row;
+ m_StartCol = startCol;
+ m_EndCol = endCol;
+ m_Center = glm::vec2((m_StartCol + m_EndCol-1)/2., m_Row);
+}
+
+}
diff --git a/src/imaging/Run.h b/src/imaging/Run.h
new file mode 100644
index 0000000..f3375f2
--- /dev/null
+++ b/src/imaging/Run.h
@@ -0,0 +1,56 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+// Original author of this file is igor@c-base.org
+//
+
+#ifndef _Run_H_
+#define _Run_H_
+
+#include "../api.h"
+#include "../base/GLMHelper.h"
+
+#include <boost/weak_ptr.hpp>
+
+#include <vector>
+
+namespace avg {
+
+class Blob;
+typedef boost::weak_ptr<class Blob> BlobWeakPtr;
+
+struct Run
+{
+ Run(int row, int startCol, int end_col);
+ int m_Row;
+ int m_StartCol;
+ int m_EndCol;
+ glm::vec2 m_Center;
+ int length() {
+ return m_EndCol-m_StartCol;
+ };
+ BlobWeakPtr m_pBlob;
+};
+
+typedef std::vector<Run> RunArray;
+
+}
+
+#endif
diff --git a/src/imaging/TrackerConfig.cpp b/src/imaging/TrackerConfig.cpp
new file mode 100644
index 0000000..be4c758
--- /dev/null
+++ b/src/imaging/TrackerConfig.cpp
@@ -0,0 +1,268 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+
+#include "TrackerConfig.h"
+#include "trackerconfigdtd.h"
+#include "DeDistort.h"
+
+#include "../base/XMLHelper.h"
+#include "../base/Logger.h"
+#include "../base/FileHelper.h"
+#include "../base/Exception.h"
+#include "../base/StringHelper.h"
+#include "../base/ConfigMgr.h"
+
+#include <libxml/parser.h>
+#include <libxml/xmlwriter.h>
+#include <libxml/xmlstring.h>
+
+#include <cstring>
+#include <sstream>
+#include <iostream>
+
+using namespace std;
+
+namespace avg {
+
+TrackerConfig::TrackerConfig()
+ : m_Doc(0)
+{
+}
+
+TrackerConfig::TrackerConfig(const TrackerConfig& other)
+{
+ m_Doc = 0;
+ if (other.m_Doc) {
+ m_Doc = xmlCopyDoc(other.m_Doc, true);
+ m_sFilename = other.m_sFilename;
+ m_pRoot = xmlDocGetRootElement(m_Doc);
+ }
+}
+
+TrackerConfig::~TrackerConfig()
+{
+ xmlFreeDoc(m_Doc);
+}
+
+void TrackerConfig::loadConfigFile(const string& sFilename)
+{
+ // TODO: There is duplicated code here and in Player::loadFile which belongs
+ // in a lower-level xml handling class.
+ registerDTDEntityLoader("trackerconfig.dtd", g_pTrackerConfigDTD);
+ xmlDtdPtr dtd;
+ string sDTDFName = "trackerconfig.dtd";
+ dtd = xmlParseDTD(NULL, (const xmlChar*) sDTDFName.c_str());
+ if (!dtd) {
+ AVG_LOG_WARNING("DTD not found at " << sDTDFName
+ << ". Not validating trackerconfig files.");
+ }
+
+ // xmlParseFile crashes for some reason under Lion.
+ string sFileContents;
+ readWholeFile(sFilename, sFileContents);
+ m_Doc = xmlParseMemory(sFileContents.c_str(), sFileContents.length());
+ if (!m_Doc) {
+ AVG_LOG_ERROR("Could not open tracker config file " << sFilename <<
+ ". Using defaults which will probably not work.");
+ return;
+ }
+
+ xmlValidCtxtPtr cvp = xmlNewValidCtxt();
+ cvp->error = xmlParserValidityError;
+ cvp->warning = xmlParserValidityWarning;
+ int isValid = xmlValidateDtd(cvp, m_Doc, dtd);
+ xmlFreeValidCtxt(cvp);
+ if (!isValid) {
+ throw (Exception(AVG_ERR_XML_PARSE, sFilename + " does not validate."));
+ }
+
+ m_pRoot = xmlDocGetRootElement(m_Doc);
+ xmlFreeDtd(dtd);
+ m_sFilename = sFilename;
+
+ AVG_TRACE(Logger::category::CONFIG, Logger::severity::INFO,
+ "Reading Tracker config file from " << sFilename);
+}
+
+void TrackerConfig::load()
+{
+ // Give precedence to local configuration
+ string sFName = "avgtrackerrc";
+ if (fileExists(sFName) || !fileExists(getGlobalConfigDir() + sFName)) {
+ loadConfigFile(sFName);
+ } else {
+ loadConfigFile(getGlobalConfigDir() + sFName);
+ }
+}
+
+xmlXPathObjectPtr TrackerConfig::findConfigNodes(const string& sXPathExpr) const
+{
+ string sFullPath = string("/trackerconfig"+sXPathExpr);
+ xmlXPathContextPtr xpCtx;
+ xmlXPathObjectPtr xpElement;
+
+ xpCtx = xmlXPathNewContext(m_Doc);
+ if(!xpCtx) {
+ AVG_LOG_ERROR("Unable to create new XPath context");
+ return NULL;
+ }
+
+ xpElement = xmlXPathEvalExpression(BAD_CAST sFullPath.c_str(), xpCtx);
+ if(!xpElement) {
+ AVG_LOG_ERROR("Unable to evaluate XPath expression '"
+ << sFullPath << "'");
+ xmlXPathFreeContext(xpCtx);
+ return NULL;
+ }
+
+ xmlXPathFreeContext(xpCtx);
+
+ return xpElement;
+}
+
+void TrackerConfig::setParam(const string& sXPathExpr, const string& sValue)
+{
+ xmlXPathObjectPtr xpElement = findConfigNodes(sXPathExpr);
+ xmlNodeSetPtr nodes = xpElement->nodesetval;
+
+ if (!nodes || nodes->nodeNr == 0)
+ throw (Exception(AVG_ERR_OPTION_UNKNOWN,
+ string("setParam(): cannot find requested element ")+sXPathExpr));
+
+ for (int i = nodes->nodeNr-1; i >= 0; i--) {
+ AVG_ASSERT(nodes->nodeTab[i]);
+
+ xmlNodeSetContent(nodes->nodeTab[i], BAD_CAST sValue.c_str());
+ if (nodes->nodeTab[i]->type != XML_NAMESPACE_DECL)
+ nodes->nodeTab[i] = NULL;
+ }
+
+ xmlXPathFreeObject(xpElement);
+}
+
+string TrackerConfig::getParam(const string& sXPathExpr) const
+{
+ xmlXPathObjectPtr xpElement = findConfigNodes(sXPathExpr);
+ xmlNodeSetPtr nodes = xpElement->nodesetval;
+
+ if (!nodes || nodes->nodeNr == 0) {
+ throw (Exception(AVG_ERR_OPTION_UNKNOWN,
+ string("getParam(): cannot find requested element ")+sXPathExpr));
+ } else if (nodes->nodeNr > 1) {
+ AVG_LOG_WARNING(
+ "getParam(): expression selects more than one node. Returning the first.");
+ }
+
+ xmlChar* xsRc = xmlNodeGetContent(nodes->nodeTab[0]);
+ string sValue((char *)xsRc);
+
+ xmlFree(xsRc);
+ xmlXPathFreeObject(xpElement);
+
+ return sValue;
+}
+
+bool TrackerConfig::getBoolParam(const std::string& sXPathExpr) const
+{
+ return stringToBool(getParam(sXPathExpr));
+}
+
+int TrackerConfig::getIntParam(const std::string& sXPathExpr) const
+{
+ return stringToInt(getParam(sXPathExpr));
+}
+
+float TrackerConfig::getFloatParam(const std::string& sXPathExpr) const
+{
+ return stringToFloat(getParam(sXPathExpr));
+}
+
+glm::vec2 TrackerConfig::getPointParam(const std::string& sXPathExpr) const
+{
+ return glm::vec2(getFloatParam(sXPathExpr+"@x"), getFloatParam(sXPathExpr+"@y"));
+}
+
+FRect TrackerConfig::getRectParam(const std::string& sXPathExpr) const
+{
+ glm::vec2 pos1 = glm::vec2(getFloatParam(sXPathExpr+"@x1"),
+ getFloatParam(sXPathExpr+"@y1"));
+ glm::vec2 pos2 = glm::vec2(getFloatParam(sXPathExpr+"@x2"),
+ getFloatParam(sXPathExpr+"@y2"));
+ return FRect(pos1, pos2);
+}
+
+xmlNodePtr TrackerConfig::getXmlNode(const std::string& sXPathExpr) const
+{
+ xmlXPathObjectPtr xpElement = findConfigNodes(sXPathExpr);
+ xmlNodeSetPtr nodes = xpElement->nodesetval;
+
+ if (!nodes || nodes->nodeNr == 0) {
+ throw (Exception(AVG_ERR_OPTION_UNKNOWN,
+ string("getParam(): cannot find requested element ")+sXPathExpr));
+ } else if (nodes->nodeNr > 1) {
+ AVG_LOG_WARNING(
+ "getXmlNode(): expression selects more than one node. Returning the first.");
+ }
+ return nodes->nodeTab[0];
+}
+
+DeDistortPtr TrackerConfig::getTransform() const
+{
+ glm::vec2 CameraExtents = getPointParam("/camera/size/");
+ DeDistortPtr pDD(new DeDistort);
+ pDD->load(CameraExtents, *this);
+ return pDD;
+}
+
+void TrackerConfig::setTransform(DeDistortPtr pDeDistort)
+{
+ pDeDistort->save(*this);
+}
+
+void TrackerConfig::dump() const
+{
+ string s;
+ xmlBufferPtr pBuffer = xmlBufferCreate();
+ xmlNodeDump(pBuffer, m_Doc, m_pRoot, 0, 0);
+ cerr << xmlBufferContent(pBuffer) << endl;
+}
+
+void TrackerConfig::save()
+{
+ AVG_TRACE(Logger::category::CONFIG, Logger::severity::INFO,
+ "Saving tracker configuration to " << m_sFilename << ".");
+
+ if (m_Doc) {
+ if (fileExists(m_sFilename)) {
+ string sBakFile = m_sFilename + ".bak";
+ unlink(sBakFile.c_str());
+ if (rename(m_sFilename.c_str(), sBakFile.c_str())) {
+ AVG_LOG_WARNING("Cannot create tracker config backup. Backing "
+ "it up on current workdir.");
+ copyFile(m_sFilename, "avgtrackerrc.bak");
+ }
+ }
+ xmlSaveFileEnc(m_sFilename.c_str(), m_Doc, "utf-8");
+ } else
+ throw (Exception(AVG_ERR_FILEIO,
+ "save(): tracker configuration not initialized"));
+}
+
+}
diff --git a/src/imaging/TrackerConfig.h b/src/imaging/TrackerConfig.h
new file mode 100644
index 0000000..557f78a
--- /dev/null
+++ b/src/imaging/TrackerConfig.h
@@ -0,0 +1,75 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+// Original author of this file is igor@c-base.org.
+//
+
+#ifndef _TrackerConfig_H_
+#define _TrackerConfig_H_
+
+#include "../api.h"
+#include "../base/Rect.h"
+
+#include <boost/shared_ptr.hpp>
+#include <string>
+
+#include <libxml/xpath.h>
+
+namespace avg {
+
+class DeDistort;
+typedef boost::shared_ptr<DeDistort> DeDistortPtr;
+
+class AVG_API TrackerConfig
+{
+public:
+ TrackerConfig();
+ TrackerConfig(const TrackerConfig& other);
+ virtual ~TrackerConfig();
+
+ void load();
+ void save();
+ void setParam(const std::string& sXPathExpr, const std::string& sValue);
+ std::string getParam(const std::string& sXPathExpr) const;
+ bool getBoolParam(const std::string& sXPathExpr) const;
+ int getIntParam(const std::string& sXPathExpr) const;
+ float getFloatParam(const std::string& sXPathExpr) const;
+ glm::vec2 getPointParam(const std::string& sXPathExpr) const;
+ FRect getRectParam(const std::string& sXPathExpr) const;
+ xmlNodePtr getXmlNode(const std::string& sXPathExpr) const;
+
+ DeDistortPtr getTransform() const;
+ void setTransform(DeDistortPtr pDeDistort);
+
+ void dump() const;
+
+private:
+ xmlXPathObjectPtr findConfigNodes(const std::string& sXPathExpr) const;
+
+ xmlDocPtr m_Doc;
+ xmlNodePtr m_pRoot;
+
+ std::string m_sFilename;
+ void loadConfigFile(const std::string& sFilename);
+};
+typedef boost::shared_ptr<TrackerConfig> TrackerConfigPtr;
+
+}
+#endif
diff --git a/src/imaging/TrackerThread.cpp b/src/imaging/TrackerThread.cpp
new file mode 100644
index 0000000..079a8d6
--- /dev/null
+++ b/src/imaging/TrackerThread.cpp
@@ -0,0 +1,548 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+
+#include "TrackerThread.h"
+#include "FilterDistortion.h"
+#include "FilterWipeBorder.h"
+
+#include "../base/Logger.h"
+#include "../base/ProfilingZoneID.h"
+#include "../base/TimeSource.h"
+#include "../base/ScopeTimer.h"
+#include "../base/Exception.h"
+
+#include "../graphics/Filter.h"
+#include "../graphics/Filterfill.h"
+#include "../graphics/FilterHighpass.h"
+#include "../graphics/FilterFastBandpass.h"
+#include "../graphics/FilterFastDownscale.h"
+#include "../graphics/FilterNormalize.h"
+#include "../graphics/FilterBlur.h"
+#include "../graphics/FilterGauss.h"
+#include "../graphics/FilterMask.h"
+#include "../graphics/GLContext.h"
+#include "../graphics/GPUBandpassFilter.h"
+#include "../graphics/GPUBlurFilter.h"
+#include "../graphics/BitmapLoader.h"
+
+#include <iostream>
+#include <stdlib.h>
+
+using namespace std;
+
+namespace avg {
+
+static ProfilingZoneID ProfilingZoneCapture("Capture");
+static ProfilingZoneID ProfilingZoneMask("Mask");
+static ProfilingZoneID ProfilingZoneTracker("Tracker");
+static ProfilingZoneID ProfilingZoneHistory("History");
+static ProfilingZoneID ProfilingZoneDistort("Distort");
+static ProfilingZoneID ProfilingZoneHistogram("Histogram");
+static ProfilingZoneID ProfilingZoneDownscale("Downscale");
+static ProfilingZoneID ProfilingZoneBandpass("Bandpass");
+static ProfilingZoneID ProfilingZoneComps("ConnectedComps");
+static ProfilingZoneID ProfilingZoneUpdate("Update");
+static ProfilingZoneID ProfilingZoneDraw("Draw");
+
+TrackerThread::TrackerThread(IntRect roi, CameraPtr pCamera,
+ BitmapPtr ppBitmaps[NUM_TRACKER_IMAGES], MutexPtr pMutex, CQueue& cmdQ,
+ IBlobTarget *pTarget, bool bSubtractHistory, TrackerConfig& config)
+ : WorkerThread<TrackerThread>("Tracker", cmdQ),
+ m_TouchThreshold(0),
+ m_TrackThreshold(0),
+ m_HistoryDelay(-1),
+ m_StartTime(0),
+ m_pMutex(pMutex),
+ m_pCamera(pCamera),
+ m_pTarget(pTarget),
+ m_pTrafo(new DeDistort()),
+ m_bCreateDebugImages(false),
+ m_bCreateFingerImage(false),
+ m_NumFrames(0),
+ m_NumCamFramesDiscarded(0),
+ m_pImagingContext(0)
+{
+ m_bTrackBrighter = config.getBoolParam("/tracker/brighterregions/@value");
+ if (bSubtractHistory) {
+ m_pHistoryPreProcessor = HistoryPreProcessorPtr(
+ new HistoryPreProcessor(ppBitmaps[1]->getSize(), 1,
+ m_bTrackBrighter));
+ }
+ m_Prescale = config.getIntParam("/tracker/prescale/@value");
+ setBitmaps(roi, ppBitmaps);
+
+ DeDistortPtr pDeDistort = config.getTransform();
+ m_pDistorter = FilterDistortionPtr(new FilterDistortion(
+ m_pBitmaps[TRACKER_IMG_CAMERA]->getSize()/m_Prescale, pDeDistort));
+
+ m_pConfig = TrackerConfigPtr(new TrackerConfig(config));
+ m_pCamera->startCapture();
+}
+
+TrackerThread::~TrackerThread()
+{
+}
+
+bool TrackerThread::init()
+{
+ try {
+ m_pImagingContext = GLContext::create(
+ GLConfig(false, false, true, 1, GLConfig::AUTO, false));
+ createBandpassFilter();
+ AVG_TRACE(Logger::category::CONFIG, Logger::severity::INFO,
+ "Using fragment shaders for imaging operations.");
+ } catch (Exception& e) {
+ AVG_LOG_WARNING(e.getStr());
+ AVG_TRACE(Logger::category::CONFIG, Logger::severity::WARNING,
+ "Using CPU for imaging operations (slow and inaccurate).");
+ m_pImagingContext = 0;
+ m_pBandpassFilter = FilterPtr(new FilterFastBandpass());
+ }
+ try {
+ m_StartTime = TimeSource::get()->getCurrentMillisecs();
+ m_HistoryDelay = m_pConfig->getIntParam("/tracker/historydelay/@value");
+ } catch (Exception& e) {
+ AVG_LOG_WARNING(e.getStr());
+ }
+
+ // Done in TrackerInputDevice::ctor to work around Leopard/libdc1394 threading issue.
+ // m_pCamera->open();
+ return true;
+}
+
+bool TrackerThread::work()
+{
+ if ((m_HistoryDelay + m_StartTime) < TimeSource::get()->getCurrentMillisecs()
+ && m_HistoryDelay != -1)
+ {
+ resetHistory();
+ m_HistoryDelay = -1;
+ }
+
+ BitmapPtr pCamBmp;
+ {
+ ScopeTimer timer(ProfilingZoneCapture);
+ pCamBmp = m_pCamera->getImage(true);
+ BitmapPtr pTempBmp1;
+ while ((pTempBmp1 = m_pCamera->getImage(false))) {
+ m_NumCamFramesDiscarded++;
+ m_NumFrames++;
+ pCamBmp = pTempBmp1;
+ }
+ }
+ long long time = TimeSource::get()->getCurrentMillisecs();
+ if (pCamBmp) {
+ m_NumFrames++;
+ ScopeTimer timer(ProfilingZoneTracker);
+ if (m_pCameraMaskBmp) {
+ ScopeTimer timer(ProfilingZoneMask);
+ FilterMask(m_pCameraMaskBmp).applyInPlace(pCamBmp);
+ }
+ if (m_bCreateDebugImages) {
+ lock_guard lock(*m_pMutex);
+ *(m_pBitmaps[TRACKER_IMG_CAMERA]) = *pCamBmp;
+ ScopeTimer timer(ProfilingZoneHistogram);
+ drawHistogram(m_pBitmaps[TRACKER_IMG_HISTOGRAM], pCamBmp);
+ }
+ {
+ if (m_Prescale != 1) {
+ ScopeTimer timer(ProfilingZoneDownscale);
+ FilterFastDownscale(m_Prescale).applyInPlace(pCamBmp);
+ }
+ }
+ BitmapPtr pDistortedBmp;
+ {
+ ScopeTimer timer(ProfilingZoneDistort);
+ pDistortedBmp = m_pDistorter->apply(pCamBmp);
+ }
+ BitmapPtr pCroppedBmp(new Bitmap(*pDistortedBmp, m_ROI));
+ if (m_bCreateDebugImages) {
+ lock_guard lock(*m_pMutex);
+ m_pBitmaps[TRACKER_IMG_DISTORTED]->copyPixels(*pCroppedBmp);
+ }
+ if (m_pHistoryPreProcessor) {
+ ScopeTimer timer(ProfilingZoneHistory);
+ m_pHistoryPreProcessor->applyInPlace(pCroppedBmp);
+ }
+ if (m_bCreateDebugImages) {
+ lock_guard lock(*m_pMutex);
+ m_pBitmaps[TRACKER_IMG_NOHISTORY]->copyPixels(*pCroppedBmp);
+ FilterNormalize(2).applyInPlace(m_pBitmaps[TRACKER_IMG_NOHISTORY]);
+ }
+ {
+ BitmapPtr pBmpBandpass;
+ if (m_TouchThreshold != 0) {
+ {
+ ScopeTimer timer(ProfilingZoneBandpass);
+ pBmpBandpass = m_pBandpassFilter->apply(pCroppedBmp);
+ }
+ if (m_bCreateDebugImages) {
+ lock_guard lock(*m_pMutex);
+ *(m_pBitmaps[TRACKER_IMG_HIGHPASS]) = *pBmpBandpass;
+ }
+ }
+ calcBlobs(pCroppedBmp, pBmpBandpass, time);
+ }
+ ThreadProfiler::get()->reset();
+ }
+ return true;
+}
+
+void TrackerThread::deinit()
+{
+ m_pCamera = CameraPtr();
+ AVG_TRACE(Logger::category::PROFILE, Logger::severity::INFO,
+ "Total camera frames: " << m_NumFrames);
+ AVG_TRACE(Logger::category::PROFILE, Logger::severity::INFO,
+ "Camera frames discarded: " << m_NumCamFramesDiscarded);
+ if (m_pBandpassFilter) {
+ m_pBandpassFilter.reset();
+ }
+ if (m_pImagingContext) {
+ delete m_pImagingContext;
+ }
+}
+
+void TrackerThread::setConfig(TrackerConfig config, IntRect roi,
+ BitmapPtr ppBitmaps[NUM_TRACKER_IMAGES])
+{
+ lock_guard lock(*m_pMutex);
+ try {
+ m_TouchThreshold = config.getIntParam("/tracker/touch/threshold/@value");
+ } catch (Exception&) {
+ m_TouchThreshold = 0;
+ }
+ m_bTrackBrighter = config.getBoolParam("/tracker/brighterregions/@value");
+ try {
+ m_TrackThreshold = config.getIntParam("/tracker/track/threshold/@value");
+ } catch (Exception&) {
+ m_TrackThreshold = 0;
+ }
+ m_Prescale = config.getIntParam("/tracker/prescale/@value");
+ if(m_pHistoryPreProcessor) {
+ m_pHistoryPreProcessor->setInterval(config.getIntParam
+ ("/tracker/historyupdateinterval/@value"));
+ }
+ DeDistortPtr pDeDistort = config.getTransform();
+ if (!(*m_pTrafo == *pDeDistort)) {
+ m_pDistorter = FilterDistortionPtr(new FilterDistortion(
+ m_pBitmaps[TRACKER_IMG_CAMERA]->getSize()/m_Prescale, pDeDistort));
+ *m_pTrafo = *pDeDistort;
+ }
+ int brightness = config.getIntParam("/camera/brightness/@value");
+ int exposure = config.getIntParam("/camera/exposure/@value");
+ int gamma = config.getIntParam("/camera/gamma/@value");
+ int gain = config.getIntParam("/camera/gain/@value");
+ int shutter = config.getIntParam("/camera/shutter/@value");
+ int strobeDuration = config.getIntParam("/camera/strobeduration/@value");
+ string sCameraMaskFName = config.getParam("/tracker/mask/@value");
+ bool bNewCameraMask = ((m_pCameraMaskBmp == BitmapPtr() && sCameraMaskFName != "") ||
+ m_pConfig->getParam("/tracker/mask/@value") != sCameraMaskFName);
+ if (int(m_pCamera->getFeature(CAM_FEATURE_BRIGHTNESS)) != brightness ||
+ int(m_pCamera->getFeature(CAM_FEATURE_GAMMA)) != gamma ||
+ int(m_pCamera->getFeature(CAM_FEATURE_EXPOSURE)) != exposure ||
+ int(m_pCamera->getFeature(CAM_FEATURE_GAIN)) != gain ||
+ int(m_pCamera->getFeature(CAM_FEATURE_SHUTTER)) != shutter ||
+ int(m_pCamera->getFeature(CAM_FEATURE_STROBE_DURATION)) != strobeDuration ||
+ bNewCameraMask)
+ {
+ m_pHistoryPreProcessor->reset();
+ }
+
+ m_pCamera->setFeature(CAM_FEATURE_BRIGHTNESS, brightness);
+ m_pCamera->setFeature(CAM_FEATURE_GAMMA, gamma);
+// m_pCamera->setFeature(CAM_FEATURE_EXPOSURE, exposure);
+ m_pCamera->setFeature(CAM_FEATURE_GAIN, gain);
+ m_pCamera->setFeature(CAM_FEATURE_SHUTTER, shutter);
+ m_pCamera->setFeature(CAM_FEATURE_STROBE_DURATION, strobeDuration, true);
+
+ if (bNewCameraMask) {
+ if (sCameraMaskFName == "") {
+ m_pCameraMaskBmp = BitmapPtr();
+ } else {
+ BitmapPtr pRGBXCameraMaskBmp = loadBitmap(sCameraMaskFName, I8);
+ }
+ }
+ m_pConfig = TrackerConfigPtr(new TrackerConfig(config));
+
+ setBitmaps(roi, ppBitmaps);
+ createBandpassFilter();
+}
+
+void TrackerThread::setDebugImages(bool bImg, bool bFinger)
+{
+ m_bCreateDebugImages = bImg;
+ m_bCreateFingerImage = bFinger;
+}
+
+void TrackerThread::setBitmaps(IntRect roi, BitmapPtr ppBitmaps[NUM_TRACKER_IMAGES])
+{
+ m_ROI = roi;
+ for (int i=0; i<NUM_TRACKER_IMAGES; i++) {
+ m_pBitmaps[i] = ppBitmaps[i];
+ }
+ if (m_pHistoryPreProcessor) {
+ m_pHistoryPreProcessor = HistoryPreProcessorPtr(
+ new HistoryPreProcessor(roi.size(),
+ m_pHistoryPreProcessor->getInterval(), m_bTrackBrighter));
+ }
+ if (m_pBandpassFilter) {
+ createBandpassFilter();
+ }
+}
+
+void TrackerThread::createBandpassFilter()
+{
+ if (m_TouchThreshold != 0) {
+ float bandpassMin = m_pConfig->getFloatParam("/tracker/touch/bandpass/@min");
+ float bandpassMax = m_pConfig->getFloatParam("/tracker/touch/bandpass/@max");
+ float bandpassPostMult =
+ m_pConfig->getFloatParam("/tracker/touch/bandpasspostmult/@value");
+ if (m_pImagingContext) {
+ m_pBandpassFilter = FilterPtr(new GPUBandpassFilter(m_ROI.size(), I8,
+ bandpassMin, bandpassMax, bandpassPostMult, m_bTrackBrighter));
+ }
+ }
+}
+
+void TrackerThread::resetHistory()
+{
+ if (m_pHistoryPreProcessor) {
+ m_pHistoryPreProcessor->reset();
+ }
+}
+
+void TrackerThread::drawHistogram(BitmapPtr pDestBmp, BitmapPtr pSrcBmp)
+{
+ HistogramPtr pHist = pSrcBmp->getHistogram(4);
+ AVG_ASSERT(pDestBmp->getPixelFormat() == I8);
+ // Normalize Histogram to 0..255
+ int max1 = 0;
+ int max2 = 0;
+ for (int i = 0; i < 256; ++i) {
+ if ((*pHist)[i] > max1) {
+ max2 = max1;
+ max1 = (*pHist)[i];
+ } else if ((*pHist)[i] > max2) {
+ max2 = (*pHist)[i];
+ }
+ }
+ if (max2 == 0) {
+ max2= 1;
+ }
+ for (int i = 0; i < 256; ++i) {
+ (*pHist)[i] = int((*pHist)[i]*256.0/max2)+1;
+ }
+
+ FilterFill<Pixel8>(0).applyInPlace(pDestBmp);
+ int stride = pDestBmp->getStride();
+ int endRow = 256;
+ if (pDestBmp->getSize().y < 256) {
+ endRow = pDestBmp->getSize().y;
+ }
+ int width = pDestBmp->getSize().x;
+ for (int i = 0; i < endRow; ++i) {
+ int endCol =(*pHist)[i];
+ if (endCol > width) {
+ endCol = width;
+ }
+ unsigned char * pDest = pDestBmp->getPixels()+stride*i;
+ memset(pDest, 255, endCol);
+ }
+}
+
+inline bool isInbetween(float x, float min, float max)
+{
+ return x >= min && x <= max;
+}
+
+bool TrackerThread::isRelevant(BlobPtr pBlob, int minArea, int maxArea,
+ float minEccentricity, float maxEccentricity)
+{
+ bool res;
+ res = isInbetween(pBlob->getArea(), float(minArea), float(maxArea)) &&
+ isInbetween(pBlob->getEccentricity(), minEccentricity, maxEccentricity);
+ return res;
+}
+
+BlobVectorPtr TrackerThread::findRelevantBlobs(BlobVectorPtr pBlobs, bool bTouch)
+{
+ string sConfigPrefix;
+ if (bTouch) {
+ sConfigPrefix = "/tracker/touch/";
+ } else {
+ sConfigPrefix = "/tracker/track/";
+ }
+ int minArea = m_pConfig->getIntParam(sConfigPrefix+"areabounds/@min");
+ int maxArea = m_pConfig->getIntParam(sConfigPrefix+"areabounds/@max");
+ float minEccentricity = m_pConfig->getFloatParam(sConfigPrefix+
+ "eccentricitybounds/@min");
+ float maxEccentricity = m_pConfig->getFloatParam(sConfigPrefix+
+ "eccentricitybounds/@max");
+
+ BlobVectorPtr pRelevantBlobs(new BlobVector());
+ for(BlobVector::iterator it = pBlobs->begin(); it != pBlobs->end(); ++it) {
+ if (isRelevant(*it, minArea, maxArea, minEccentricity, maxEccentricity)) {
+ pRelevantBlobs->push_back(*it);
+ }
+ if (pRelevantBlobs->size() > 50) {
+ break;
+ }
+ }
+ return pRelevantBlobs;
+}
+
+void TrackerThread::drawBlobs(BlobVectorPtr pBlobs, BitmapPtr pSrcBmp,
+ BitmapPtr pDestBmp, int Offset, bool bTouch)
+{
+ if (!pDestBmp) {
+ return;
+ }
+ ScopeTimer timer(ProfilingZoneDraw);
+ string sConfigPrefix;
+ if (bTouch) {
+ sConfigPrefix = "/tracker/touch/";
+ } else {
+ sConfigPrefix = "/tracker/track/";
+ }
+ int minArea = m_pConfig->getIntParam(sConfigPrefix+"areabounds/@min");
+ int maxArea = m_pConfig->getIntParam(sConfigPrefix+"areabounds/@max");
+ float minEccentricity = m_pConfig->getFloatParam(
+ sConfigPrefix+"eccentricitybounds/@min");
+ float maxEccentricity = m_pConfig->getFloatParam(
+ sConfigPrefix+"eccentricitybounds/@max");
+
+ // Get max. pixel value in Bitmap
+ int max = 0;
+ HistogramPtr pHist = pSrcBmp->getHistogram(4);
+ int i;
+ for (i = 255; i >= 0; i--) {
+ if ((*pHist)[i] != 0) {
+ max = i;
+ i = 0;
+ }
+ }
+
+ for (BlobVector::iterator it2 = pBlobs->begin(); it2 != pBlobs->end(); ++it2) {
+ if (isRelevant(*it2, minArea, maxArea, minEccentricity, maxEccentricity)) {
+ if (bTouch) {
+ (*it2)->render(pSrcBmp, pDestBmp,
+ Pixel32(0xFF, 0xFF, 0xFF, 0xFF), Offset, max, bTouch, true,
+ Pixel32(0x00, 0x00, 0xFF, 0xFF));
+ } else {
+ (*it2)->render(pSrcBmp, pDestBmp,
+ Pixel32(0xFF, 0xFF, 0x00, 0x80), Offset, max, bTouch, true,
+ Pixel32(0x00, 0x00, 0xFF, 0xFF));
+ }
+ } else {
+ if (bTouch) {
+ (*it2)->render(pSrcBmp, pDestBmp,
+ Pixel32(0xFF, 0x00, 0x00, 0xFF), Offset, max, bTouch, false);
+ } else {
+ (*it2)->render(pSrcBmp, pDestBmp,
+ Pixel32(0x80, 0x80, 0x00, 0x80), Offset, max, bTouch, false);
+ }
+ }
+ }
+}
+
+void TrackerThread::calcContours(BlobVectorPtr pBlobs)
+{
+ ScopeTimer timer(ProfilingZoneDraw);
+ string sConfigPrefix;
+ sConfigPrefix = "/tracker/track/";
+ int minArea = m_pConfig->getIntParam(sConfigPrefix+"areabounds/@min");
+ int maxArea = m_pConfig->getIntParam(sConfigPrefix+"areabounds/@max");
+ float minEccentricity = m_pConfig->getFloatParam(
+ sConfigPrefix+"eccentricitybounds/@min");
+ float maxEccentricity = m_pConfig->getFloatParam(
+ sConfigPrefix+"eccentricitybounds/@max");
+
+ int ContourPrecision = m_pConfig->getIntParam("/tracker/contourprecision/@value");
+ if (ContourPrecision != 0) {
+ for (BlobVector::iterator it = pBlobs->begin(); it != pBlobs->end(); ++it) {
+ if (isRelevant(*it, minArea, maxArea, minEccentricity, maxEccentricity)) {
+ (*it)->calcContour(ContourPrecision);
+ }
+ }
+ }
+}
+
+void TrackerThread::correlateHands(BlobVectorPtr pTrackBlobs, BlobVectorPtr pTouchBlobs)
+{
+ if (!pTrackBlobs || !pTouchBlobs) {
+ return;
+ }
+ for (BlobVector::iterator it1 = pTouchBlobs->begin(); it1 != pTouchBlobs->end();
+ ++it1)
+ {
+ BlobPtr pTouchBlob = *it1;
+ IntPoint touchCenter = (IntPoint)(pTouchBlob->getCenter());
+ for (BlobVector::iterator it2 = pTrackBlobs->begin(); it2 != pTrackBlobs->end();
+ ++it2)
+ {
+ BlobPtr pTrackBlob = *it2;
+ if (pTrackBlob->contains(touchCenter)) {
+ pTouchBlob->addRelated(pTrackBlob);
+ pTrackBlob->addRelated(pTouchBlob);
+ break;
+ }
+ }
+ }
+}
+
+void TrackerThread::calcBlobs(BitmapPtr pTrackBmp, BitmapPtr pTouchBmp, long long time)
+{
+ BlobVectorPtr pTrackComps;
+ BlobVectorPtr pTouchComps;
+ {
+ ScopeTimer timer(ProfilingZoneComps);
+ lock_guard lock(*m_pMutex);
+ BitmapPtr pDestBmp;
+ if (m_bCreateFingerImage) {
+ Pixel32 Black(0x00, 0x00, 0x00, 0x00);
+ FilterFill<Pixel32>(Black).applyInPlace(
+ m_pBitmaps[TRACKER_IMG_FINGERS]);
+ pDestBmp = m_pBitmaps[TRACKER_IMG_FINGERS];
+ }
+ {
+ if (m_TrackThreshold != 0) {
+ pTrackComps = findConnectedComponents(pTrackBmp, m_TrackThreshold);
+ calcContours(pTrackComps);
+ drawBlobs(pTrackComps, pTrackBmp, pDestBmp, m_TrackThreshold, false);
+ pTrackComps = findRelevantBlobs(pTrackComps, false);
+ }
+ if (m_TouchThreshold != 0) {
+ pTouchComps = findConnectedComponents(pTouchBmp, m_TouchThreshold);
+ pTouchComps = findRelevantBlobs(pTouchComps, true);
+ correlateHands(pTrackComps, pTouchComps);
+ drawBlobs(pTouchComps, pTouchBmp, pDestBmp, m_TouchThreshold, true);
+ }
+ }
+ // Send the blobs to the BlobTarget.
+ {
+ ScopeTimer timer(ProfilingZoneUpdate);
+ m_pTarget->update(pTrackComps, pTouchComps, time);
+ }
+ }
+
+}
+
+}
diff --git a/src/imaging/TrackerThread.h b/src/imaging/TrackerThread.h
new file mode 100644
index 0000000..27d91ff
--- /dev/null
+++ b/src/imaging/TrackerThread.h
@@ -0,0 +1,135 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+
+#ifndef _TrackerThread_H_
+#define _TrackerThread_H_
+
+#include "../api.h"
+#include "TrackerConfig.h"
+#include "Camera.h"
+#include "Blob.h"
+#include "FilterDistortion.h"
+#include "DeDistort.h"
+
+#include "../base/WorkerThread.h"
+#include "../base/Command.h"
+
+#include "../graphics/HistoryPreProcessor.h"
+#include "../graphics/Bitmap.h"
+#include "../graphics/Pixel8.h"
+#include "../graphics/Filter.h"
+
+#include <boost/thread.hpp>
+
+#include <string>
+#include <list>
+
+namespace avg {
+
+typedef enum {
+ TRACKER_IMG_CAMERA,
+ TRACKER_IMG_DISTORTED,
+ TRACKER_IMG_NOHISTORY,
+ TRACKER_IMG_HISTOGRAM,
+ TRACKER_IMG_HIGHPASS,
+ TRACKER_IMG_FINGERS,
+ NUM_TRACKER_IMAGES
+} TrackerImageID;
+
+typedef boost::shared_ptr<boost::mutex> MutexPtr;
+class GLContext;
+
+class AVG_API IBlobTarget {
+ public:
+ virtual ~IBlobTarget() {};
+ // Note that this function is called by TrackerThread in it's own thread!
+ virtual void update(BlobVectorPtr pTrackBlobs, BlobVectorPtr pTouchBlobs,
+ long long time) = 0;
+};
+
+
+class AVG_API TrackerThread: public WorkerThread<TrackerThread>
+{
+ public:
+ TrackerThread(IntRect roi, CameraPtr pCamera,
+ BitmapPtr ppBitmaps[NUM_TRACKER_IMAGES], MutexPtr pMutex, CQueue& cmdQ,
+ IBlobTarget* pTarget, bool bSubtractHistory, TrackerConfig& config);
+ virtual ~TrackerThread();
+
+ bool init();
+ bool work();
+ void deinit();
+
+ void setConfig(TrackerConfig config, IntRect roi,
+ BitmapPtr ppBitmaps[NUM_TRACKER_IMAGES]);
+ void setDebugImages(bool bImg, bool bFinger);
+ void resetHistory();
+
+ private:
+ void setBitmaps(IntRect roi, BitmapPtr ppBitmaps[NUM_TRACKER_IMAGES]);
+ void createBandpassFilter();
+ void checkMessages();
+ void calcHistory();
+ void drawHistogram(BitmapPtr pDestBmp, BitmapPtr pSrcBmp);
+ void calcBlobs(BitmapPtr pTrackBmp, BitmapPtr pTouchBmp, long long time);
+ bool isRelevant(BlobPtr pBlob, int minArea, int maxArea,
+ float minEccentricity, float maxEccentricity);
+ BlobVectorPtr findRelevantBlobs(BlobVectorPtr pBlobs, bool bTouch);
+ void drawBlobs(BlobVectorPtr pBlobs, BitmapPtr pSrcBmp, BitmapPtr pDestBmp,
+ int Offset, bool bTouch);
+ void calcContours(BlobVectorPtr pBlobs);
+ void correlateHands(BlobVectorPtr pTrackBlobs, BlobVectorPtr pTouchBlobs);
+
+ std::string m_sDevice;
+ std::string m_sMode;
+
+ TrackerConfigPtr m_pConfig;
+ BitmapPtr m_pCameraMaskBmp;
+
+ int m_TouchThreshold; // 0 => no touch events.
+ int m_TrackThreshold; // 0 => no generic tracking events.
+ int m_Prescale;
+ long long m_HistoryDelay;
+ long long m_StartTime;
+ bool m_bTrackBrighter;
+
+ BlobVectorPtr m_pBlobVector;
+ IntRect m_ROI;
+ BitmapPtr m_pBitmaps[NUM_TRACKER_IMAGES];
+ MutexPtr m_pMutex;
+
+ CameraPtr m_pCamera;
+ IBlobTarget *m_pTarget;
+ HistoryPreProcessorPtr m_pHistoryPreProcessor;
+ FilterDistortionPtr m_pDistorter;
+ DeDistortPtr m_pTrafo;
+ bool m_bCreateDebugImages;
+ bool m_bCreateFingerImage;
+ int m_NumFrames;
+ int m_NumCamFramesDiscarded;
+
+ GLContext* m_pImagingContext;
+ FilterPtr m_pBandpassFilter;
+};
+
+}
+
+#endif
+
diff --git a/src/imaging/V4LCamera.cpp b/src/imaging/V4LCamera.cpp
new file mode 100644
index 0000000..85d7d41
--- /dev/null
+++ b/src/imaging/V4LCamera.cpp
@@ -0,0 +1,713 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+// V4L2/libavg compliance by 02L > Outside Standing Level
+
+#include "V4LCamera.h"
+
+#include "../base/ScopeTimer.h"
+#include "../base/TimeSource.h"
+#include "../base/Logger.h"
+#include "../base/Exception.h"
+#include "../base/StringHelper.h"
+#include "../base/GLMHelper.h"
+
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <fcntl.h>
+#include <errno.h>
+
+#include <linux/videodev2.h>
+
+#include <stdio.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <iostream>
+#include <cstring>
+
+#define CLEAR(x) memset (&(x), 0, sizeof (x))
+
+using namespace avg;
+using namespace std;
+
+// anonymous namespace holding private (C-static-like) functions
+namespace {
+ int xioctl(int fd, int request, void * arg)
+ {
+ int rc;
+
+ do {
+ rc = ioctl(fd, request, arg);
+ } while (rc == -1 && EINTR == errno);
+
+ return rc;
+ }
+}
+
+namespace avg {
+
+V4LCamera::V4LCamera(string sDevice, int channel, IntPoint size, PixelFormat camPF,
+ PixelFormat destPF, float frameRate)
+ : Camera(camPF, destPF, size, frameRate),
+ m_Fd(-1),
+ m_Channel(channel),
+ m_sDevice(sDevice)
+{
+ m_v4lPF = getV4LPF(camPF);
+ if (m_sDevice == "") {
+ m_sDevice = "/dev/video0";
+ }
+ if (m_Channel == -1) {
+ m_Channel = 0;
+ }
+
+ m_FeaturesNames[V4L2_CID_BRIGHTNESS] = "brightness";
+ m_FeaturesNames[V4L2_CID_CONTRAST] = "contrast";
+ m_FeaturesNames[V4L2_CID_GAIN] = "gain";
+ m_FeaturesNames[V4L2_CID_EXPOSURE] = "exposure";
+ m_FeaturesNames[V4L2_CID_WHITENESS] = "whiteness";
+ m_FeaturesNames[V4L2_CID_GAMMA] = "gamma";
+ m_FeaturesNames[V4L2_CID_SATURATION] = "saturation";
+
+ struct stat st;
+ if (stat(m_sDevice.c_str(), &st) == -1) {
+ AVG_ASSERT_MSG(false, (string("Unable to access v4l2 device '" +
+ m_sDevice + "'.").c_str()));
+ }
+
+ if (!S_ISCHR (st.st_mode)) {
+ AVG_ASSERT_MSG(false, (string("'" + m_sDevice +
+ " is not a v4l2 device.").c_str()));
+ }
+
+ m_Fd = ::open(m_sDevice.c_str(), O_RDWR /* required */ | O_NONBLOCK, 0);
+
+ if (m_Fd == -1) {
+ AVG_ASSERT_MSG(false, (string("Unable to open v4l2 device '" + m_sDevice
+ + "'.").c_str()));
+ }
+
+ initDevice();
+ AVG_TRACE(Logger::category::CONFIG, Logger::severity::INFO, "V4L2 Camera opened");
+}
+
+V4LCamera::~V4LCamera()
+{
+ close();
+}
+
+void V4LCamera::close()
+{
+ enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ int rc = xioctl(m_Fd, VIDIOC_STREAMOFF, &type);
+ if (rc == -1) {
+ AVG_LOG_ERROR("VIDIOC_STREAMOFF");
+ }
+ vector<Buffer>::iterator it;
+ for (it = m_vBuffers.begin(); it != m_vBuffers.end(); ++it) {
+ int err = munmap(it->start, it->length);
+ AVG_ASSERT (err != -1);
+ }
+ m_vBuffers.clear();
+
+ ::close(m_Fd);
+ AVG_TRACE(Logger::category::CONFIG, Logger::severity::INFO, "V4L2 Camera closed");
+
+ m_Fd = -1;
+}
+
+int V4LCamera::getV4LPF(PixelFormat pf)
+{
+ switch (pf) {
+ case I8:
+ return V4L2_PIX_FMT_GREY;
+ case BAYER8:
+ case BAYER8_BGGR:
+ case BAYER8_GBRG:
+ case BAYER8_GRBG:
+ case BAYER8_RGGB:
+ return V4L2_PIX_FMT_GREY;
+ case YCbCr411:
+ return V4L2_PIX_FMT_Y41P;
+ case YCbCr422:
+ return V4L2_PIX_FMT_UYVY;
+ case YUYV422:
+ return V4L2_PIX_FMT_YUYV;
+ case YCbCr420p:
+ return V4L2_PIX_FMT_YUV420;
+ case R8G8B8:
+ return V4L2_PIX_FMT_BGR24;
+ default:
+ throw Exception(AVG_ERR_INVALID_ARGS,
+ "Unsupported or illegal value for camera pixel format '"
+ + getPixelFormatString(pf) + "'.");
+ }
+}
+
+BitmapPtr V4LCamera::getImage(bool bWait)
+{
+ struct v4l2_buffer buf;
+ CLEAR(buf);
+
+ // wait for incoming data blocking, timeout 2s
+ if (bWait) {
+ fd_set fds;
+ struct timeval tv;
+ int rc;
+
+ FD_ZERO(&fds);
+ FD_SET(m_Fd, &fds);
+
+ /* Timeout. */
+ tv.tv_sec = 2;
+ tv.tv_usec = 0;
+
+ rc = select (m_Fd+1, &fds, NULL, NULL, &tv);
+
+ // caught signal or something else
+ if (rc == -1) {
+ AVG_LOG_WARNING("V4L2: select failed.");
+ return BitmapPtr();
+ }
+ // timeout
+ if (rc == 0) {
+ AVG_LOG_WARNING("V4L2: Timeout while waiting for image data");
+ return BitmapPtr();
+ }
+ }
+
+ buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ buf.memory = V4L2_MEMORY_MMAP;
+
+ // dequeue filled buffer
+ if (xioctl (m_Fd, VIDIOC_DQBUF, &buf) == -1) {
+ if (errno == EAGAIN) {
+ return BitmapPtr();
+ } else {
+ cerr << strerror(errno) << endl;
+ AVG_ASSERT(false);
+ }
+ }
+
+ unsigned char * pCaptureBuffer = (unsigned char*)m_vBuffers[buf.index].start;
+
+ float lineLen;
+ switch (getCamPF()) {
+ case YCbCr411:
+ lineLen = getImgSize().x*1.5f;
+ break;
+ case YCbCr420p:
+ lineLen = getImgSize().x;
+ break;
+ default:
+ lineLen = getImgSize().x*getBytesPerPixel(getCamPF());
+ }
+ BitmapPtr pCamBmp(new Bitmap(getImgSize(), getCamPF(), pCaptureBuffer, lineLen,
+ false, "TempCameraBmp"));
+
+ BitmapPtr pDestBmp = convertCamFrameToDestPF(pCamBmp);
+
+ // enqueues free buffer for mmap
+ if (-1 == xioctl (m_Fd, VIDIOC_QBUF, &buf)) {
+ AVG_ASSERT_MSG(false, "V4L Camera: failed to enqueue image buffer.");
+ }
+
+ return pDestBmp;
+}
+
+bool V4LCamera::isCameraAvailable()
+{
+ return m_bCameraAvailable;
+}
+
+const string& V4LCamera::getDevice() const
+{
+ return m_sDevice;
+}
+
+const string& V4LCamera::getDriverName() const
+{
+ return m_sDriverName;
+}
+
+string V4LCamera::getFeatureName(V4LCID_t v4lFeature)
+{
+ string sName = m_FeaturesNames[v4lFeature];
+ if (sName == "") {
+ sName = "UNKNOWN";
+ }
+
+ return sName;
+}
+
+V4LCID_t V4LCamera::getFeatureID(CameraFeature feature) const
+{
+ V4LCID_t v4lFeature;
+ if (feature == CAM_FEATURE_BRIGHTNESS) {
+ v4lFeature = V4L2_CID_BRIGHTNESS;
+ } else if (feature == CAM_FEATURE_CONTRAST) {
+ v4lFeature = V4L2_CID_CONTRAST;
+ } else if (feature == CAM_FEATURE_GAIN) {
+ v4lFeature = V4L2_CID_GAIN;
+ } else if (feature == CAM_FEATURE_EXPOSURE) {
+ v4lFeature = V4L2_CID_EXPOSURE;
+ } else if (feature == CAM_FEATURE_GAMMA) {
+ v4lFeature = V4L2_CID_GAMMA;
+ } else if (feature == CAM_FEATURE_SATURATION) {
+ v4lFeature = V4L2_CID_SATURATION;
+ } else {
+ AVG_LOG_WARNING("feature " << cameraFeatureToString(feature)
+ << " not supported for V4L2.");
+ return -1;
+ }
+
+ return v4lFeature;
+}
+
+bool V4LCamera::isFeatureSupported(V4LCID_t v4lFeature) const
+{
+ struct v4l2_queryctrl queryCtrl;
+
+ CLEAR(queryCtrl);
+ queryCtrl.id = v4lFeature;
+
+ if (ioctl (m_Fd, VIDIOC_QUERYCTRL, &queryCtrl) == -1) {
+ if (errno != EINVAL) {
+ cerr << "Got " << strerror(errno) << endl;
+ AVG_ASSERT(false);
+ return false;
+ } else {
+ return false;
+ }
+ } else if (queryCtrl.flags & V4L2_CTRL_FLAG_DISABLED) {
+ return false;
+ } else {
+ return true;
+ }
+}
+
+int V4LCamera::getFeature(CameraFeature feature) const
+{
+ V4LCID_t v4lFeature = getFeatureID(feature);
+
+ FeatureMap::const_iterator it = m_Features.find(v4lFeature);
+
+ if (it == m_Features.end()) {
+ return 0;
+ } else {
+ return it->second;
+ }
+}
+
+void V4LCamera::setFeature(V4LCID_t v4lFeature, int value)
+{
+ if (!m_bCameraAvailable) {
+ AVG_LOG_WARNING("setFeature() called before opening device: ignored");
+ return;
+ }
+
+ if (!isFeatureSupported(v4lFeature)) {
+ AVG_LOG_WARNING("Camera feature " << getFeatureName(v4lFeature) <<
+ " is not supported by hardware");
+ return;
+ }
+
+ struct v4l2_control control;
+
+ CLEAR(control);
+ control.id = v4lFeature;
+ control.value = value;
+
+// AVG_TRACE(Logger::category::APP, "Setting feature " << getFeatureName(v4lFeature) <<
+// " to "<< value);
+
+ if (ioctl(m_Fd, VIDIOC_S_CTRL, &control) == -1) {
+ AVG_LOG_ERROR("Cannot set feature " << m_FeaturesNames[v4lFeature]);
+ }
+}
+
+void V4LCamera::setFeatureOneShot(CameraFeature feature)
+{
+ AVG_LOG_WARNING("setFeatureOneShot is not supported by V4L cameras.");
+}
+
+int V4LCamera::getWhitebalanceU() const
+{
+ AVG_LOG_WARNING("getWhitebalance is not supported by V4L cameras.");
+ return 0;
+}
+
+int V4LCamera::getWhitebalanceV() const
+{
+ AVG_LOG_WARNING("getWhitebalance is not supported by V4L cameras.");
+ return 0;
+}
+
+void V4LCamera::setWhitebalance(int u, int v, bool bIgnoreOldValue)
+{
+ setFeature(V4L2_CID_RED_BALANCE, u);
+ setFeature(V4L2_CID_BLUE_BALANCE, v);
+}
+
+int V4LCamera::checkCamera(int j)
+{
+ stringstream minorDeviceNumber;
+ minorDeviceNumber << j;
+ string address = "/dev/video";
+ string result = address + minorDeviceNumber.str();
+ int fd = ::open(result.c_str(), O_RDWR /* required */ | O_NONBLOCK, 0);
+ return fd;
+}
+
+v4l2_capability getCamCapabilities(int fd)
+{
+ v4l2_capability capability;
+ memset(&capability, 0, sizeof(capability));
+ ioctl(fd, VIDIOC_QUERYCAP, &capability);
+ return capability;
+}
+
+PixelFormat V4LCamera::intToPixelFormat(unsigned int pixelformat)
+{
+ switch (pixelformat) {
+ case v4l2_fourcc('Y','U','Y','V'):
+ return YUYV422;
+ case v4l2_fourcc('U','Y','V','Y'):
+ return YCbCr422;
+ case v4l2_fourcc('G','R','E','Y'):
+ return I8;
+ case v4l2_fourcc('Y','1','6',' '):
+ return I16;
+ case v4l2_fourcc('R','G','B','3'):
+ return R8G8B8;
+ case v4l2_fourcc('B','G','R','3'):
+ return B8G8R8;
+ default:
+ return NO_PIXELFORMAT;
+ }
+}
+
+int V4LCamera::countCameras()
+{
+ int numberOfCameras = 0;
+ for (int j = 0; j < 256; j++) {
+ int fd = checkCamera(j);
+ if (fd != -1) {
+ numberOfCameras++;
+ }
+ }
+ return numberOfCameras;
+}
+
+CameraInfo* V4LCamera::getCameraInfos(int deviceNumber)
+{
+ int fd = checkCamera(deviceNumber);
+ if (fd == -1) {
+ AVG_ASSERT(false);
+ return NULL;
+ }
+ stringstream ss;
+ ss << "/dev/video" << deviceNumber;
+ CameraInfo* camInfo = new CameraInfo("video4linux", ss.str());
+ v4l2_capability capability = getCamCapabilities(fd);
+ if (capability.capabilities & V4L2_CAP_VIDEO_CAPTURE) {
+ getCameraImageFormats(fd, camInfo);
+ getCameraControls(fd, camInfo);
+ }
+ return camInfo;
+}
+
+void V4LCamera::getCameraImageFormats(int fd, CameraInfo* camInfo)
+{
+ for (int i = 0;; i++) {
+// cerr << i << endl;
+ v4l2_fmtdesc fmtDesc;
+ memset(&fmtDesc, 0, sizeof(fmtDesc));
+ fmtDesc.index = i;
+ fmtDesc.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ int rc = ioctl(fd, VIDIOC_ENUM_FMT, &fmtDesc);
+ if (rc == -1) {
+ break;
+ }
+ v4l2_frmsizeenum frmSizeEnum;
+ memset(&frmSizeEnum, 0, sizeof (frmSizeEnum));
+ frmSizeEnum.index = 0;
+ frmSizeEnum.pixel_format = fmtDesc.pixelformat;
+ while (ioctl(fd, VIDIOC_ENUM_FRAMESIZES, &frmSizeEnum) == 0) {
+/* fprintf(stdout, " pixelformat :%c%c%c%c\\n",
+ fmtDesc.pixelformat & 0xFF,
+ (fmtDesc.pixelformat >> 8) & 0xFF,
+ (fmtDesc.pixelformat >> 16) & 0xFF,
+ (fmtDesc.pixelformat >> 24) & 0xFF);
+*/
+ PixelFormat pixFormat = intToPixelFormat(fmtDesc.pixelformat);
+ if (pixFormat != NO_PIXELFORMAT) {
+ v4l2_frmivalenum frmIvalEnum;
+ memset (&frmIvalEnum, 0, sizeof (frmIvalEnum));
+ frmIvalEnum.index = 0;
+ frmIvalEnum.pixel_format = frmSizeEnum.pixel_format;
+ frmIvalEnum.width = frmSizeEnum.discrete.width;
+ frmIvalEnum.height = frmSizeEnum.discrete.height;
+ IntPoint size;
+ size.x = frmSizeEnum.discrete.width;
+ size.y = frmSizeEnum.discrete.height;
+ std::vector<float> framerates;
+ while (ioctl(fd, VIDIOC_ENUM_FRAMEINTERVALS, &frmIvalEnum) == 0) {
+ framerates.push_back(frmIvalEnum.discrete.denominator);
+ frmIvalEnum.index++;
+ }
+ CameraImageFormat camImFormat = CameraImageFormat(size, pixFormat,
+ framerates);
+ camInfo->addImageFormat(camImFormat);
+ }
+ frmSizeEnum.index++;
+ }
+ }
+}
+
+void V4LCamera::getCameraControls(int fd, CameraInfo* camInfo)
+{
+ v4l2_queryctrl queryCtrl;
+ for (queryCtrl.id = V4L2_CID_BASE; queryCtrl.id < V4L2_CID_LASTP1; queryCtrl.id++) {
+ int rc = ioctl (fd, VIDIOC_QUERYCTRL, &queryCtrl);
+ if (rc == -1) {
+ continue;
+ }
+ if (queryCtrl.flags & V4L2_CTRL_FLAG_DISABLED) {
+ continue;
+ }
+ stringstream ss;
+ ss << queryCtrl.name;
+ std::string sControlName = ss.str();
+ int min = queryCtrl.minimum;
+ int max = queryCtrl.maximum;
+ int defaultValue = queryCtrl.default_value;
+ CameraControl camControl = CameraControl(sControlName, min, max, defaultValue);
+ camInfo->addControl(camControl);
+ }
+}
+
+void V4LCamera::setFeature(CameraFeature feature, int value, bool bIgnoreOldValue)
+{
+ // ignore -1 coming from default unbiased cameranode parameters
+ if (value < 0) {
+ return;
+ }
+
+ V4LCID_t v4lFeature = getFeatureID(feature);
+ m_Features[v4lFeature] = value;
+
+ if (m_bCameraAvailable) {
+ setFeature(v4lFeature, value);
+ }
+}
+
+void V4LCamera::startCapture()
+{
+// AVG_TRACE(Logger::category::APP, "Entering startCapture()...");
+
+ unsigned int i;
+ enum v4l2_buf_type type;
+
+ for (i = 0; i < m_vBuffers.size(); ++i) {
+ struct v4l2_buffer buf;
+
+ CLEAR(buf);
+
+ buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ buf.memory = V4L2_MEMORY_MMAP;
+ buf.index = i;
+
+ int err = xioctl(m_Fd, VIDIOC_QBUF, &buf);
+ AVG_ASSERT(err != -1);
+ }
+
+ type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ int err= xioctl (m_Fd, VIDIOC_STREAMON, &type);
+ AVG_ASSERT(err != -1);
+}
+
+void V4LCamera::initDevice()
+{
+// AVG_TRACE(Logger::category::APP, "Entering initDevice()...");
+
+ struct v4l2_capability cap;
+ struct v4l2_cropcap CropCap;
+ struct v4l2_crop Crop;
+ struct v4l2_format fmt;
+ struct v4l2_streamparm StreamParam;
+
+ if (xioctl(m_Fd, VIDIOC_QUERYCAP, &cap) == -1) {
+ close();
+ AVG_ASSERT_MSG(false, (m_sDevice + " is not a valid V4L2 device.").c_str());
+ }
+
+ if (!(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE)) {
+ close();
+ AVG_ASSERT_MSG(false, (m_sDevice + " does not support capturing").c_str());
+ }
+
+ if (!(cap.capabilities & V4L2_CAP_STREAMING)) {
+ close();
+ AVG_ASSERT_MSG(false, (m_sDevice + " does not support streaming i/os").c_str());
+ }
+ m_sDriverName = (const char *)cap.driver;
+
+ /* Select video input, video standard and tune here. */
+ CLEAR(CropCap);
+ CropCap.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+
+ if (xioctl(m_Fd, VIDIOC_CROPCAP, &CropCap) == 0) {
+ Crop.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ Crop.c = CropCap.defrect; /* reset to default */
+
+ if (-1 == xioctl(m_Fd, VIDIOC_S_CROP, &Crop)) {
+ switch (errno) {
+ case EINVAL:
+ /* Cropping not supported. */
+ break;
+ default:
+ /* Errors ignored. */
+ break;
+ }
+ }
+ } else {
+ /* Errors ignored. */
+ }
+
+ CLEAR(fmt);
+
+ fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ fmt.fmt.pix.width = getImgSize().x;
+ fmt.fmt.pix.height = getImgSize().y;
+ fmt.fmt.pix.pixelformat = m_v4lPF;
+ fmt.fmt.pix.field = V4L2_FIELD_ANY;
+ int rc = xioctl(m_Fd, VIDIOC_S_FMT, &fmt);
+ if (int(fmt.fmt.pix.width) != getImgSize().x ||
+ int(fmt.fmt.pix.height) != getImgSize().y || rc == -1)
+ {
+ throw(Exception(AVG_ERR_CAMERA_NONFATAL,
+ string("Unable to set V4L camera image format: '")
+ +strerror(errno)
+ +"'. Try using avg_showcamera.py --list to find out what the device supports."));
+ }
+
+ CLEAR(StreamParam);
+ StreamParam.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ rc = xioctl(m_Fd, VIDIOC_G_PARM, &StreamParam);
+
+ if(StreamParam.parm.capture.capability == V4L2_CAP_TIMEPERFRAME) {
+ CLEAR(StreamParam);
+
+ StreamParam.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ StreamParam.parm.capture.timeperframe.numerator = 1;
+ StreamParam.parm.capture.timeperframe.denominator = (int)getFrameRate();
+ rc = xioctl(m_Fd, VIDIOC_S_PARM, &StreamParam);
+ if (getFrameRate() != StreamParam.parm.capture.timeperframe.denominator ||
+ rc == -1)
+ {
+ throw(Exception(AVG_ERR_CAMERA_NONFATAL,
+ string("Unable to set V4L camera framerate: '")
+ +strerror(errno)
+ +"'. Try using avg_showcamera.py --list to find out what the device supports."));
+ }
+ }
+
+ initMMap();
+
+ // TODO: string channel instead of numeric
+ // select channel
+ if (xioctl(m_Fd, VIDIOC_S_INPUT, &m_Channel) == -1) {
+ close();
+ AVG_ASSERT_MSG(false, (string("Cannot set MUX channel " +
+ toString(m_Channel))).c_str());
+ }
+
+ m_bCameraAvailable = true;
+
+ for (FeatureMap::iterator it=m_Features.begin(); it != m_Features.end(); it++) {
+ setFeature(it->first, it->second);
+ }
+
+
+}
+
+void V4LCamera::initMMap()
+{
+ struct v4l2_requestbuffers req;
+ CLEAR(req);
+
+ req.count = 4;
+ req.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ req.memory = V4L2_MEMORY_MMAP;
+
+ if (xioctl(m_Fd, VIDIOC_REQBUFS, &req) == -1) {
+ if (EINVAL == errno) {
+ close();
+ AVG_ASSERT_MSG(false, (m_sDevice +
+ " does not support memory mapping").c_str());
+ } else {
+ cerr << "errno: " << strerror(errno);
+ AVG_ASSERT(false);
+ }
+ }
+
+ if (req.count < 2) {
+ cerr << "Insufficient buffer memory on " << m_sDevice;
+ AVG_ASSERT(false);
+ }
+
+ m_vBuffers.clear();
+
+ for (int i = 0; i < int(req.count); ++i) {
+ Buffer tmp;
+ struct v4l2_buffer buf;
+
+ CLEAR (buf);
+
+ buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ buf.memory = V4L2_MEMORY_MMAP;
+ buf.index = i;
+
+ if (xioctl(m_Fd, VIDIOC_QUERYBUF, &buf) == -1) {
+ AVG_ASSERT(false);
+ }
+
+ tmp.length = buf.length;
+
+ tmp.start = mmap (NULL /* start anywhere */,
+ buf.length,
+ PROT_READ | PROT_WRITE /* required */,
+ MAP_SHARED /* recommended */,
+ m_Fd, buf.m.offset);
+
+ if (MAP_FAILED == tmp.start) {
+ AVG_ASSERT(false);
+ }
+
+ m_vBuffers.push_back(tmp);
+ }
+}
+}
+
+
+
diff --git a/src/imaging/V4LCamera.h b/src/imaging/V4LCamera.h
new file mode 100644
index 0000000..b779e8e
--- /dev/null
+++ b/src/imaging/V4LCamera.h
@@ -0,0 +1,100 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+
+#ifndef _V4LCamera_H_
+#define _V4LCamera_H_
+
+#include "../api.h"
+#include "../avgconfigwrapper.h"
+
+#include "Camera.h"
+#include <string>
+#include <vector>
+
+namespace avg {
+
+typedef unsigned int V4LCID_t;
+
+class AVG_API V4LCamera: public Camera {
+
+ struct Buffer {
+ void * start;
+ size_t length;
+ };
+
+public:
+ V4LCamera(std::string sDevice, int channel, IntPoint size, PixelFormat camPF,
+ PixelFormat destPF, float frameRate);
+ virtual ~V4LCamera();
+
+ virtual BitmapPtr getImage(bool bWait);
+ virtual bool isCameraAvailable();
+
+ virtual const std::string& getDevice() const;
+ virtual const std::string& getDriverName() const;
+
+ virtual int getFeature(CameraFeature feature) const;
+ virtual void setFeature(CameraFeature feature, int value,
+ bool bIgnoreOldValue=false);
+ virtual void setFeatureOneShot(CameraFeature feature);
+ virtual int getWhitebalanceU() const;
+ virtual int getWhitebalanceV() const;
+ virtual void setWhitebalance(int u, int v, bool bIgnoreOldValue=false);
+
+ static CameraInfo* getCameraInfos(int deviceNumber);
+ static int countCameras();
+
+private:
+ void initDevice();
+ void startCapture();
+ void initMMap();
+ virtual void close();
+
+ int getV4LPF(PixelFormat pf);
+ static int checkCamera(int j);
+ static PixelFormat intToPixelFormat(unsigned int pixelformat);
+
+ static void getCameraImageFormats(int fd, CameraInfo* camInfo);
+ static void getCameraControls(int deviceNumber, CameraInfo* camInfo);
+
+ void setFeature(V4LCID_t v4lFeature, int value);
+ V4LCID_t getFeatureID(CameraFeature feature) const;
+ std::string getFeatureName(V4LCID_t v4lFeature);
+ bool isFeatureSupported(V4LCID_t v4lFeature) const;
+ typedef std::map<V4LCID_t, unsigned int> FeatureMap;
+ typedef std::map<int, std::string> FeatureNamesMap;
+ FeatureMap m_Features;
+ // TODO: Feature strings should really be handled by
+ // Camera::cameraFeatureToString
+ FeatureNamesMap m_FeaturesNames;
+
+ int m_Fd;
+ int m_Channel;
+ std::string m_sDevice;
+ std::string m_sDriverName;
+ std::vector<Buffer> m_vBuffers;
+ bool m_bCameraAvailable;
+ int m_v4lPF;
+};
+
+}
+
+#endif
diff --git a/src/imaging/avgtrackerrc.minimal b/src/imaging/avgtrackerrc.minimal
new file mode 100644
index 0000000..f2bef02
--- /dev/null
+++ b/src/imaging/avgtrackerrc.minimal
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<trackerconfig>
+ <camera>
+ <driver value="firewire"/>
+ <device value=""/>
+ <fw800 value="false"/>
+ <format value="I8"/>
+ <size x="640" y="480"/>
+ <framerate value="60"/>
+ <brightness value="1"/>
+ <gamma value="0"/>
+ <exposure value="-1"/>
+ <gain value="16"/>
+ <shutter value="75"/>
+ <strobeduration value="-1"/>
+ </camera>
+ <tracker>
+ <prescale value="1"/>
+ <historyupdateinterval value="25"/>
+ <brighterregions value="true"/>
+ <contourprecision value="0"/>
+ <historydelay value="2200"/>
+ <mask value=""/>
+ <findfingertips value="true"/>
+ <track>
+ <threshold value="16"/>
+ <similarity value="100"/>
+ <areabounds min="700" max="1000000"/>
+ <eccentricitybounds min="1" max="80"/>
+ </track>
+ <touch>
+ <threshold value="148"/>
+ <similarity value="50"/>
+ <areabounds min="16" max="200000"/>
+ <eccentricitybounds min="1" max="800"/>
+ <bandpass min="1.6" max="2.4"/>
+ <bandpasspostmult value="30.0"/>
+ </touch>
+ </tracker>
+ <transform>
+ <distortionparams p2="0.697166" p3="0.0"/>
+ <trapezoid value="0.151537"/>
+ <angle value="0.00224421"/>
+ <displaydisplacement x="-174.966" y="-145.974"/>
+ <displayscale x="2.52439" y="2.55685"/>
+ <activedisplaysize x="1280" y="800"/>
+ <displayroi x1="0" y1="0" x2="1280" y2="800"/>
+ </transform>
+</trackerconfig>
diff --git a/src/imaging/baseline/FilterClearBorderResult1.png b/src/imaging/baseline/FilterClearBorderResult1.png
new file mode 100644
index 0000000..96d610a
--- /dev/null
+++ b/src/imaging/baseline/FilterClearBorderResult1.png
Binary files differ
diff --git a/src/imaging/baseline/FilterClearBorderResult3.png b/src/imaging/baseline/FilterClearBorderResult3.png
new file mode 100644
index 0000000..09943e3
--- /dev/null
+++ b/src/imaging/baseline/FilterClearBorderResult3.png
Binary files differ
diff --git a/src/imaging/baseline/FilterWipeBorderResult1.png b/src/imaging/baseline/FilterWipeBorderResult1.png
new file mode 100644
index 0000000..bf22671
--- /dev/null
+++ b/src/imaging/baseline/FilterWipeBorderResult1.png
Binary files differ
diff --git a/src/imaging/baseline/FilterWipeBorderResult3.png b/src/imaging/baseline/FilterWipeBorderResult3.png
new file mode 100644
index 0000000..4e8eb1d
--- /dev/null
+++ b/src/imaging/baseline/FilterWipeBorderResult3.png
Binary files differ
diff --git a/src/imaging/checktracking.cpp b/src/imaging/checktracking.cpp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/imaging/checktracking.cpp
diff --git a/src/imaging/qedit.h b/src/imaging/qedit.h
new file mode 100644
index 0000000..63d31ea
--- /dev/null
+++ b/src/imaging/qedit.h
@@ -0,0 +1,9914 @@
+
+#pragma warning( disable: 4049 ) /* more than 64k source lines */
+
+/* this ALWAYS GENERATED file contains the definitions for the interfaces */
+
+
+ /* File created by MIDL compiler version 6.00.0338 */
+/* Compiler settings for qedit.idl:
+ Oicf, W1, Zp8, env=Win32 (32b run)
+ protocol : dce , ms_ext, c_ext
+ error checks: allocation ref bounds_check enum stub_data
+ VC __declspec() decoration level:
+ __declspec(uuid()), __declspec(selectany), __declspec(novtable)
+ DECLSPEC_UUID(), MIDL_INTERFACE()
+*/
+//@@MIDL_FILE_HEADING( )
+
+#define __IDxtCompositor_INTERFACE_DEFINED__
+#define __IDxtAlphaSetter_INTERFACE_DEFINED__
+#define __IDxtJpeg_INTERFACE_DEFINED__
+#define __IDxtKey_INTERFACE_DEFINED__
+
+/* verify that the <rpcndr.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCNDR_H_VERSION__
+#define __REQUIRED_RPCNDR_H_VERSION__ 440
+#endif
+
+#include "rpc.h"
+#include "rpcndr.h"
+
+#ifndef __RPCNDR_H_VERSION__
+#error this stub requires an updated version of <rpcndr.h>
+#endif // __RPCNDR_H_VERSION__
+
+#ifndef COM_NO_WINDOWS_H
+#include "windows.h"
+#include "ole2.h"
+#endif /*COM_NO_WINDOWS_H*/
+
+#ifndef __qedit_h__
+#define __qedit_h__
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#pragma once
+#endif
+
+/* Forward Declarations */
+
+#ifndef __IPropertySetter_FWD_DEFINED__
+#define __IPropertySetter_FWD_DEFINED__
+typedef interface IPropertySetter IPropertySetter;
+#endif /* __IPropertySetter_FWD_DEFINED__ */
+
+
+#ifndef __IDxtCompositor_FWD_DEFINED__
+#define __IDxtCompositor_FWD_DEFINED__
+typedef interface IDxtCompositor IDxtCompositor;
+#endif /* __IDxtCompositor_FWD_DEFINED__ */
+
+
+#ifndef __IDxtAlphaSetter_FWD_DEFINED__
+#define __IDxtAlphaSetter_FWD_DEFINED__
+typedef interface IDxtAlphaSetter IDxtAlphaSetter;
+#endif /* __IDxtAlphaSetter_FWD_DEFINED__ */
+
+
+#ifndef __IDxtJpeg_FWD_DEFINED__
+#define __IDxtJpeg_FWD_DEFINED__
+typedef interface IDxtJpeg IDxtJpeg;
+#endif /* __IDxtJpeg_FWD_DEFINED__ */
+
+
+#ifndef __IDxtKey_FWD_DEFINED__
+#define __IDxtKey_FWD_DEFINED__
+typedef interface IDxtKey IDxtKey;
+#endif /* __IDxtKey_FWD_DEFINED__ */
+
+
+#ifndef __IMediaLocator_FWD_DEFINED__
+#define __IMediaLocator_FWD_DEFINED__
+typedef interface IMediaLocator IMediaLocator;
+#endif /* __IMediaLocator_FWD_DEFINED__ */
+
+
+#ifndef __IMediaDet_FWD_DEFINED__
+#define __IMediaDet_FWD_DEFINED__
+typedef interface IMediaDet IMediaDet;
+#endif /* __IMediaDet_FWD_DEFINED__ */
+
+
+#ifndef __IGrfCache_FWD_DEFINED__
+#define __IGrfCache_FWD_DEFINED__
+typedef interface IGrfCache IGrfCache;
+#endif /* __IGrfCache_FWD_DEFINED__ */
+
+
+#ifndef __IRenderEngine_FWD_DEFINED__
+#define __IRenderEngine_FWD_DEFINED__
+typedef interface IRenderEngine IRenderEngine;
+#endif /* __IRenderEngine_FWD_DEFINED__ */
+
+
+#ifndef __IFindCompressorCB_FWD_DEFINED__
+#define __IFindCompressorCB_FWD_DEFINED__
+typedef interface IFindCompressorCB IFindCompressorCB;
+#endif /* __IFindCompressorCB_FWD_DEFINED__ */
+
+
+#ifndef __ISmartRenderEngine_FWD_DEFINED__
+#define __ISmartRenderEngine_FWD_DEFINED__
+typedef interface ISmartRenderEngine ISmartRenderEngine;
+#endif /* __ISmartRenderEngine_FWD_DEFINED__ */
+
+
+#ifndef __IAMTimelineObj_FWD_DEFINED__
+#define __IAMTimelineObj_FWD_DEFINED__
+typedef interface IAMTimelineObj IAMTimelineObj;
+#endif /* __IAMTimelineObj_FWD_DEFINED__ */
+
+
+#ifndef __IAMTimelineEffectable_FWD_DEFINED__
+#define __IAMTimelineEffectable_FWD_DEFINED__
+typedef interface IAMTimelineEffectable IAMTimelineEffectable;
+#endif /* __IAMTimelineEffectable_FWD_DEFINED__ */
+
+
+#ifndef __IAMTimelineEffect_FWD_DEFINED__
+#define __IAMTimelineEffect_FWD_DEFINED__
+typedef interface IAMTimelineEffect IAMTimelineEffect;
+#endif /* __IAMTimelineEffect_FWD_DEFINED__ */
+
+
+#ifndef __IAMTimelineTransable_FWD_DEFINED__
+#define __IAMTimelineTransable_FWD_DEFINED__
+typedef interface IAMTimelineTransable IAMTimelineTransable;
+#endif /* __IAMTimelineTransable_FWD_DEFINED__ */
+
+
+#ifndef __IAMTimelineSplittable_FWD_DEFINED__
+#define __IAMTimelineSplittable_FWD_DEFINED__
+typedef interface IAMTimelineSplittable IAMTimelineSplittable;
+#endif /* __IAMTimelineSplittable_FWD_DEFINED__ */
+
+
+#ifndef __IAMTimelineTrans_FWD_DEFINED__
+#define __IAMTimelineTrans_FWD_DEFINED__
+typedef interface IAMTimelineTrans IAMTimelineTrans;
+#endif /* __IAMTimelineTrans_FWD_DEFINED__ */
+
+
+#ifndef __IAMTimelineSrc_FWD_DEFINED__
+#define __IAMTimelineSrc_FWD_DEFINED__
+typedef interface IAMTimelineSrc IAMTimelineSrc;
+#endif /* __IAMTimelineSrc_FWD_DEFINED__ */
+
+
+#ifndef __IAMTimelineTrack_FWD_DEFINED__
+#define __IAMTimelineTrack_FWD_DEFINED__
+typedef interface IAMTimelineTrack IAMTimelineTrack;
+#endif /* __IAMTimelineTrack_FWD_DEFINED__ */
+
+
+#ifndef __IAMTimelineVirtualTrack_FWD_DEFINED__
+#define __IAMTimelineVirtualTrack_FWD_DEFINED__
+typedef interface IAMTimelineVirtualTrack IAMTimelineVirtualTrack;
+#endif /* __IAMTimelineVirtualTrack_FWD_DEFINED__ */
+
+
+#ifndef __IAMTimelineComp_FWD_DEFINED__
+#define __IAMTimelineComp_FWD_DEFINED__
+typedef interface IAMTimelineComp IAMTimelineComp;
+#endif /* __IAMTimelineComp_FWD_DEFINED__ */
+
+
+#ifndef __IAMTimelineGroup_FWD_DEFINED__
+#define __IAMTimelineGroup_FWD_DEFINED__
+typedef interface IAMTimelineGroup IAMTimelineGroup;
+#endif /* __IAMTimelineGroup_FWD_DEFINED__ */
+
+
+#ifndef __IAMTimeline_FWD_DEFINED__
+#define __IAMTimeline_FWD_DEFINED__
+typedef interface IAMTimeline IAMTimeline;
+#endif /* __IAMTimeline_FWD_DEFINED__ */
+
+
+#ifndef __IXml2Dex_FWD_DEFINED__
+#define __IXml2Dex_FWD_DEFINED__
+typedef interface IXml2Dex IXml2Dex;
+#endif /* __IXml2Dex_FWD_DEFINED__ */
+
+
+#ifndef __IAMErrorLog_FWD_DEFINED__
+#define __IAMErrorLog_FWD_DEFINED__
+typedef interface IAMErrorLog IAMErrorLog;
+#endif /* __IAMErrorLog_FWD_DEFINED__ */
+
+
+#ifndef __IAMSetErrorLog_FWD_DEFINED__
+#define __IAMSetErrorLog_FWD_DEFINED__
+typedef interface IAMSetErrorLog IAMSetErrorLog;
+#endif /* __IAMSetErrorLog_FWD_DEFINED__ */
+
+
+#ifndef __ISampleGrabberCB_FWD_DEFINED__
+#define __ISampleGrabberCB_FWD_DEFINED__
+typedef interface ISampleGrabberCB ISampleGrabberCB;
+#endif /* __ISampleGrabberCB_FWD_DEFINED__ */
+
+
+#ifndef __ISampleGrabber_FWD_DEFINED__
+#define __ISampleGrabber_FWD_DEFINED__
+typedef interface ISampleGrabber ISampleGrabber;
+#endif /* __ISampleGrabber_FWD_DEFINED__ */
+
+
+#ifndef __AMTimeline_FWD_DEFINED__
+#define __AMTimeline_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class AMTimeline AMTimeline;
+#else
+typedef struct AMTimeline AMTimeline;
+#endif /* __cplusplus */
+
+#endif /* __AMTimeline_FWD_DEFINED__ */
+
+
+#ifndef __AMTimelineObj_FWD_DEFINED__
+#define __AMTimelineObj_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class AMTimelineObj AMTimelineObj;
+#else
+typedef struct AMTimelineObj AMTimelineObj;
+#endif /* __cplusplus */
+
+#endif /* __AMTimelineObj_FWD_DEFINED__ */
+
+
+#ifndef __AMTimelineSrc_FWD_DEFINED__
+#define __AMTimelineSrc_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class AMTimelineSrc AMTimelineSrc;
+#else
+typedef struct AMTimelineSrc AMTimelineSrc;
+#endif /* __cplusplus */
+
+#endif /* __AMTimelineSrc_FWD_DEFINED__ */
+
+
+#ifndef __AMTimelineTrack_FWD_DEFINED__
+#define __AMTimelineTrack_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class AMTimelineTrack AMTimelineTrack;
+#else
+typedef struct AMTimelineTrack AMTimelineTrack;
+#endif /* __cplusplus */
+
+#endif /* __AMTimelineTrack_FWD_DEFINED__ */
+
+
+#ifndef __AMTimelineComp_FWD_DEFINED__
+#define __AMTimelineComp_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class AMTimelineComp AMTimelineComp;
+#else
+typedef struct AMTimelineComp AMTimelineComp;
+#endif /* __cplusplus */
+
+#endif /* __AMTimelineComp_FWD_DEFINED__ */
+
+
+#ifndef __AMTimelineGroup_FWD_DEFINED__
+#define __AMTimelineGroup_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class AMTimelineGroup AMTimelineGroup;
+#else
+typedef struct AMTimelineGroup AMTimelineGroup;
+#endif /* __cplusplus */
+
+#endif /* __AMTimelineGroup_FWD_DEFINED__ */
+
+
+#ifndef __AMTimelineTrans_FWD_DEFINED__
+#define __AMTimelineTrans_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class AMTimelineTrans AMTimelineTrans;
+#else
+typedef struct AMTimelineTrans AMTimelineTrans;
+#endif /* __cplusplus */
+
+#endif /* __AMTimelineTrans_FWD_DEFINED__ */
+
+
+#ifndef __AMTimelineEffect_FWD_DEFINED__
+#define __AMTimelineEffect_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class AMTimelineEffect AMTimelineEffect;
+#else
+typedef struct AMTimelineEffect AMTimelineEffect;
+#endif /* __cplusplus */
+
+#endif /* __AMTimelineEffect_FWD_DEFINED__ */
+
+
+#ifndef __RenderEngine_FWD_DEFINED__
+#define __RenderEngine_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class RenderEngine RenderEngine;
+#else
+typedef struct RenderEngine RenderEngine;
+#endif /* __cplusplus */
+
+#endif /* __RenderEngine_FWD_DEFINED__ */
+
+
+#ifndef __SmartRenderEngine_FWD_DEFINED__
+#define __SmartRenderEngine_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class SmartRenderEngine SmartRenderEngine;
+#else
+typedef struct SmartRenderEngine SmartRenderEngine;
+#endif /* __cplusplus */
+
+#endif /* __SmartRenderEngine_FWD_DEFINED__ */
+
+
+#ifndef __AudMixer_FWD_DEFINED__
+#define __AudMixer_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class AudMixer AudMixer;
+#else
+typedef struct AudMixer AudMixer;
+#endif /* __cplusplus */
+
+#endif /* __AudMixer_FWD_DEFINED__ */
+
+
+#ifndef __Xml2Dex_FWD_DEFINED__
+#define __Xml2Dex_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class Xml2Dex Xml2Dex;
+#else
+typedef struct Xml2Dex Xml2Dex;
+#endif /* __cplusplus */
+
+#endif /* __Xml2Dex_FWD_DEFINED__ */
+
+
+#ifndef __MediaLocator_FWD_DEFINED__
+#define __MediaLocator_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class MediaLocator MediaLocator;
+#else
+typedef struct MediaLocator MediaLocator;
+#endif /* __cplusplus */
+
+#endif /* __MediaLocator_FWD_DEFINED__ */
+
+
+#ifndef __PropertySetter_FWD_DEFINED__
+#define __PropertySetter_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class PropertySetter PropertySetter;
+#else
+typedef struct PropertySetter PropertySetter;
+#endif /* __cplusplus */
+
+#endif /* __PropertySetter_FWD_DEFINED__ */
+
+
+#ifndef __MediaDet_FWD_DEFINED__
+#define __MediaDet_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class MediaDet MediaDet;
+#else
+typedef struct MediaDet MediaDet;
+#endif /* __cplusplus */
+
+#endif /* __MediaDet_FWD_DEFINED__ */
+
+
+#ifndef __SampleGrabber_FWD_DEFINED__
+#define __SampleGrabber_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class SampleGrabber SampleGrabber;
+#else
+typedef struct SampleGrabber SampleGrabber;
+#endif /* __cplusplus */
+
+#endif /* __SampleGrabber_FWD_DEFINED__ */
+
+
+#ifndef __NullRenderer_FWD_DEFINED__
+#define __NullRenderer_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class NullRenderer NullRenderer;
+#else
+typedef struct NullRenderer NullRenderer;
+#endif /* __cplusplus */
+
+#endif /* __NullRenderer_FWD_DEFINED__ */
+
+
+#ifndef __DxtCompositor_FWD_DEFINED__
+#define __DxtCompositor_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class DxtCompositor DxtCompositor;
+#else
+typedef struct DxtCompositor DxtCompositor;
+#endif /* __cplusplus */
+
+#endif /* __DxtCompositor_FWD_DEFINED__ */
+
+
+#ifndef __DxtAlphaSetter_FWD_DEFINED__
+#define __DxtAlphaSetter_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class DxtAlphaSetter DxtAlphaSetter;
+#else
+typedef struct DxtAlphaSetter DxtAlphaSetter;
+#endif /* __cplusplus */
+
+#endif /* __DxtAlphaSetter_FWD_DEFINED__ */
+
+
+#ifndef __DxtJpeg_FWD_DEFINED__
+#define __DxtJpeg_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class DxtJpeg DxtJpeg;
+#else
+typedef struct DxtJpeg DxtJpeg;
+#endif /* __cplusplus */
+
+#endif /* __DxtJpeg_FWD_DEFINED__ */
+
+
+#ifndef __ColorSource_FWD_DEFINED__
+#define __ColorSource_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class ColorSource ColorSource;
+#else
+typedef struct ColorSource ColorSource;
+#endif /* __cplusplus */
+
+#endif /* __ColorSource_FWD_DEFINED__ */
+
+
+#ifndef __DxtKey_FWD_DEFINED__
+#define __DxtKey_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class DxtKey DxtKey;
+#else
+typedef struct DxtKey DxtKey;
+#endif /* __cplusplus */
+
+#endif /* __DxtKey_FWD_DEFINED__ */
+
+
+/* header files for imported files */
+#include "oaidl.h"
+#include "ocidl.h"
+// #include "dxtrans.h"
+#include "amstream.h"
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+void * __RPC_USER MIDL_user_allocate(size_t);
+void __RPC_USER MIDL_user_free( void * );
+
+/* interface __MIDL_itf_qedit_0000 */
+/* [local] */
+
+
+
+
+
+
+
+
+
+
+typedef /* [public] */
+enum __MIDL___MIDL_itf_qedit_0000_0001
+ { DEXTERF_JUMP = 0,
+ DEXTERF_INTERPOLATE = DEXTERF_JUMP + 1
+ } DEXTERF;
+
+typedef /* [public][public][public][public] */ struct __MIDL___MIDL_itf_qedit_0000_0002
+ {
+ BSTR Name;
+ DISPID dispID;
+ LONG nValues;
+ } DEXTER_PARAM;
+
+typedef /* [public][public][public][public] */ struct __MIDL___MIDL_itf_qedit_0000_0003
+ {
+ VARIANT v;
+ REFERENCE_TIME rt;
+ DWORD dwInterp;
+ } DEXTER_VALUE;
+
+
+enum __MIDL___MIDL_itf_qedit_0000_0004
+ { DEXTER_AUDIO_JUMP = 0,
+ DEXTER_AUDIO_INTERPOLATE = DEXTER_AUDIO_JUMP + 1
+ } ;
+typedef /* [public] */ struct __MIDL___MIDL_itf_qedit_0000_0005
+ {
+ REFERENCE_TIME rtEnd;
+ double dLevel;
+ BOOL bMethod;
+ } DEXTER_AUDIO_VOLUMEENVELOPE;
+
+
+enum __MIDL___MIDL_itf_qedit_0000_0006
+ { TIMELINE_INSERT_MODE_INSERT = 1,
+ TIMELINE_INSERT_MODE_OVERLAY = 2
+ } ;
+typedef /* [public][public][public][public][public][public][public][public] */
+enum __MIDL___MIDL_itf_qedit_0000_0007
+ { TIMELINE_MAJOR_TYPE_COMPOSITE = 1,
+ TIMELINE_MAJOR_TYPE_TRACK = 2,
+ TIMELINE_MAJOR_TYPE_SOURCE = 4,
+ TIMELINE_MAJOR_TYPE_TRANSITION = 8,
+ TIMELINE_MAJOR_TYPE_EFFECT = 16,
+ TIMELINE_MAJOR_TYPE_GROUP = 128
+ } TIMELINE_MAJOR_TYPE;
+
+typedef /* [public] */
+enum __MIDL___MIDL_itf_qedit_0000_0008
+ { DEXTERF_BOUNDING = -1,
+ DEXTERF_EXACTLY_AT = 0,
+ DEXTERF_FORWARDS = 1
+ } DEXTERF_TRACK_SEARCH_FLAGS;
+
+typedef struct _SCompFmt0
+ {
+ long nFormatId;
+ AM_MEDIA_TYPE MediaType;
+ } SCompFmt0;
+
+
+enum __MIDL___MIDL_itf_qedit_0000_0009
+ { RESIZEF_STRETCH = 0,
+ RESIZEF_CROP = RESIZEF_STRETCH + 1,
+ RESIZEF_PRESERVEASPECTRATIO = RESIZEF_CROP + 1,
+ RESIZEF_PRESERVEASPECTRATIO_NOLETTERBOX = RESIZEF_PRESERVEASPECTRATIO + 1
+ } ;
+
+enum __MIDL___MIDL_itf_qedit_0000_0010
+ { CONNECTF_DYNAMIC_NONE = 0,
+ CONNECTF_DYNAMIC_SOURCES = 0x1,
+ CONNECTF_DYNAMIC_EFFECTS = 0x2
+ } ;
+
+enum __MIDL___MIDL_itf_qedit_0000_0011
+ { SFN_VALIDATEF_CHECK = 0x1,
+ SFN_VALIDATEF_POPUP = 0x2,
+ SFN_VALIDATEF_TELLME = 0x4,
+ SFN_VALIDATEF_REPLACE = 0x8,
+ SFN_VALIDATEF_USELOCAL = 0x10,
+ SFN_VALIDATEF_NOFIND = 0x20,
+ SFN_VALIDATEF_IGNOREMUTED = 0x40,
+ SFN_VALIDATEF_END = SFN_VALIDATEF_IGNOREMUTED + 1
+ } ;
+
+enum __MIDL___MIDL_itf_qedit_0000_0012
+ { DXTKEY_RGB = 0,
+ DXTKEY_NONRED = DXTKEY_RGB + 1,
+ DXTKEY_LUMINANCE = DXTKEY_NONRED + 1,
+ DXTKEY_ALPHA = DXTKEY_LUMINANCE + 1,
+ DXTKEY_HUE = DXTKEY_ALPHA + 1
+ } ;
+
+
+extern RPC_IF_HANDLE __MIDL_itf_qedit_0000_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_qedit_0000_v0_0_s_ifspec;
+
+#ifndef __IPropertySetter_INTERFACE_DEFINED__
+#define __IPropertySetter_INTERFACE_DEFINED__
+
+/* interface IPropertySetter */
+/* [unique][helpstring][uuid][object] */
+
+
+EXTERN_C const IID IID_IPropertySetter;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("AE9472BD-B0C3-11D2-8D24-00A0C9441E20")
+ IPropertySetter : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE LoadXML(
+ /* [in] */ IUnknown *pxml) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE PrintXML(
+ /* [out] */ char *pszXML,
+ /* [in] */ int cbXML,
+ /* [out] */ int *pcbPrinted,
+ /* [in] */ int indent) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE CloneProps(
+ /* [out] */ IPropertySetter **ppSetter,
+ /* [in] */ REFERENCE_TIME rtStart,
+ /* [in] */ REFERENCE_TIME rtStop) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE AddProp(
+ /* [in] */ DEXTER_PARAM Param,
+ /* [in] */ DEXTER_VALUE *paValue) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetProps(
+ /* [out] */ LONG *pcParams,
+ /* [out] */ DEXTER_PARAM **paParam,
+ /* [out] */ DEXTER_VALUE **paValue) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE FreeProps(
+ /* [in] */ LONG cParams,
+ /* [in] */ DEXTER_PARAM *paParam,
+ /* [in] */ DEXTER_VALUE *paValue) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE ClearProps( void) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SaveToBlob(
+ /* [out] */ LONG *pcSize,
+ /* [out] */ BYTE **ppb) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE LoadFromBlob(
+ /* [in] */ LONG cSize,
+ /* [in] */ BYTE *pb) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetProps(
+ /* [in] */ IUnknown *pTarget,
+ /* [in] */ REFERENCE_TIME rtNow) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IPropertySetterVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IPropertySetter * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IPropertySetter * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IPropertySetter * This);
+
+ HRESULT ( STDMETHODCALLTYPE *LoadXML )(
+ IPropertySetter * This,
+ /* [in] */ IUnknown *pxml);
+
+ HRESULT ( STDMETHODCALLTYPE *PrintXML )(
+ IPropertySetter * This,
+ /* [out] */ char *pszXML,
+ /* [in] */ int cbXML,
+ /* [out] */ int *pcbPrinted,
+ /* [in] */ int indent);
+
+ HRESULT ( STDMETHODCALLTYPE *CloneProps )(
+ IPropertySetter * This,
+ /* [out] */ IPropertySetter **ppSetter,
+ /* [in] */ REFERENCE_TIME rtStart,
+ /* [in] */ REFERENCE_TIME rtStop);
+
+ HRESULT ( STDMETHODCALLTYPE *AddProp )(
+ IPropertySetter * This,
+ /* [in] */ DEXTER_PARAM Param,
+ /* [in] */ DEXTER_VALUE *paValue);
+
+ HRESULT ( STDMETHODCALLTYPE *GetProps )(
+ IPropertySetter * This,
+ /* [out] */ LONG *pcParams,
+ /* [out] */ DEXTER_PARAM **paParam,
+ /* [out] */ DEXTER_VALUE **paValue);
+
+ HRESULT ( STDMETHODCALLTYPE *FreeProps )(
+ IPropertySetter * This,
+ /* [in] */ LONG cParams,
+ /* [in] */ DEXTER_PARAM *paParam,
+ /* [in] */ DEXTER_VALUE *paValue);
+
+ HRESULT ( STDMETHODCALLTYPE *ClearProps )(
+ IPropertySetter * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SaveToBlob )(
+ IPropertySetter * This,
+ /* [out] */ LONG *pcSize,
+ /* [out] */ BYTE **ppb);
+
+ HRESULT ( STDMETHODCALLTYPE *LoadFromBlob )(
+ IPropertySetter * This,
+ /* [in] */ LONG cSize,
+ /* [in] */ BYTE *pb);
+
+ HRESULT ( STDMETHODCALLTYPE *SetProps )(
+ IPropertySetter * This,
+ /* [in] */ IUnknown *pTarget,
+ /* [in] */ REFERENCE_TIME rtNow);
+
+ END_INTERFACE
+ } IPropertySetterVtbl;
+
+ interface IPropertySetter
+ {
+ CONST_VTBL struct IPropertySetterVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IPropertySetter_QueryInterface(This,riid,ppvObject) \
+ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
+
+#define IPropertySetter_AddRef(This) \
+ (This)->lpVtbl -> AddRef(This)
+
+#define IPropertySetter_Release(This) \
+ (This)->lpVtbl -> Release(This)
+
+
+#define IPropertySetter_LoadXML(This,pxml) \
+ (This)->lpVtbl -> LoadXML(This,pxml)
+
+#define IPropertySetter_PrintXML(This,pszXML,cbXML,pcbPrinted,indent) \
+ (This)->lpVtbl -> PrintXML(This,pszXML,cbXML,pcbPrinted,indent)
+
+#define IPropertySetter_CloneProps(This,ppSetter,rtStart,rtStop) \
+ (This)->lpVtbl -> CloneProps(This,ppSetter,rtStart,rtStop)
+
+#define IPropertySetter_AddProp(This,Param,paValue) \
+ (This)->lpVtbl -> AddProp(This,Param,paValue)
+
+#define IPropertySetter_GetProps(This,pcParams,paParam,paValue) \
+ (This)->lpVtbl -> GetProps(This,pcParams,paParam,paValue)
+
+#define IPropertySetter_FreeProps(This,cParams,paParam,paValue) \
+ (This)->lpVtbl -> FreeProps(This,cParams,paParam,paValue)
+
+#define IPropertySetter_ClearProps(This) \
+ (This)->lpVtbl -> ClearProps(This)
+
+#define IPropertySetter_SaveToBlob(This,pcSize,ppb) \
+ (This)->lpVtbl -> SaveToBlob(This,pcSize,ppb)
+
+#define IPropertySetter_LoadFromBlob(This,cSize,pb) \
+ (This)->lpVtbl -> LoadFromBlob(This,cSize,pb)
+
+#define IPropertySetter_SetProps(This,pTarget,rtNow) \
+ (This)->lpVtbl -> SetProps(This,pTarget,rtNow)
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+HRESULT STDMETHODCALLTYPE IPropertySetter_LoadXML_Proxy(
+ IPropertySetter * This,
+ /* [in] */ IUnknown *pxml);
+
+
+void __RPC_STUB IPropertySetter_LoadXML_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IPropertySetter_PrintXML_Proxy(
+ IPropertySetter * This,
+ /* [out] */ char *pszXML,
+ /* [in] */ int cbXML,
+ /* [out] */ int *pcbPrinted,
+ /* [in] */ int indent);
+
+
+void __RPC_STUB IPropertySetter_PrintXML_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IPropertySetter_CloneProps_Proxy(
+ IPropertySetter * This,
+ /* [out] */ IPropertySetter **ppSetter,
+ /* [in] */ REFERENCE_TIME rtStart,
+ /* [in] */ REFERENCE_TIME rtStop);
+
+
+void __RPC_STUB IPropertySetter_CloneProps_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IPropertySetter_AddProp_Proxy(
+ IPropertySetter * This,
+ /* [in] */ DEXTER_PARAM Param,
+ /* [in] */ DEXTER_VALUE *paValue);
+
+
+void __RPC_STUB IPropertySetter_AddProp_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IPropertySetter_GetProps_Proxy(
+ IPropertySetter * This,
+ /* [out] */ LONG *pcParams,
+ /* [out] */ DEXTER_PARAM **paParam,
+ /* [out] */ DEXTER_VALUE **paValue);
+
+
+void __RPC_STUB IPropertySetter_GetProps_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IPropertySetter_FreeProps_Proxy(
+ IPropertySetter * This,
+ /* [in] */ LONG cParams,
+ /* [in] */ DEXTER_PARAM *paParam,
+ /* [in] */ DEXTER_VALUE *paValue);
+
+
+void __RPC_STUB IPropertySetter_FreeProps_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IPropertySetter_ClearProps_Proxy(
+ IPropertySetter * This);
+
+
+void __RPC_STUB IPropertySetter_ClearProps_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IPropertySetter_SaveToBlob_Proxy(
+ IPropertySetter * This,
+ /* [out] */ LONG *pcSize,
+ /* [out] */ BYTE **ppb);
+
+
+void __RPC_STUB IPropertySetter_SaveToBlob_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IPropertySetter_LoadFromBlob_Proxy(
+ IPropertySetter * This,
+ /* [in] */ LONG cSize,
+ /* [in] */ BYTE *pb);
+
+
+void __RPC_STUB IPropertySetter_LoadFromBlob_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IPropertySetter_SetProps_Proxy(
+ IPropertySetter * This,
+ /* [in] */ IUnknown *pTarget,
+ /* [in] */ REFERENCE_TIME rtNow);
+
+
+void __RPC_STUB IPropertySetter_SetProps_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+
+#endif /* __IPropertySetter_INTERFACE_DEFINED__ */
+
+
+#ifndef __IDxtCompositor_INTERFACE_DEFINED__
+#define __IDxtCompositor_INTERFACE_DEFINED__
+
+/* interface IDxtCompositor */
+/* [unique][helpstring][dual][uuid][object] */
+
+
+EXTERN_C const IID IID_IDxtCompositor;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("BB44391E-6ABD-422f-9E2E-385C9DFF51FC")
+ IDxtCompositor : public IDXEffect
+ {
+ public:
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_OffsetX(
+ /* [retval][out] */ long *pVal) = 0;
+
+ virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_OffsetX(
+ /* [in] */ long newVal) = 0;
+
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_OffsetY(
+ /* [retval][out] */ long *pVal) = 0;
+
+ virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_OffsetY(
+ /* [in] */ long newVal) = 0;
+
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Width(
+ /* [retval][out] */ long *pVal) = 0;
+
+ virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Width(
+ /* [in] */ long newVal) = 0;
+
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Height(
+ /* [retval][out] */ long *pVal) = 0;
+
+ virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Height(
+ /* [in] */ long newVal) = 0;
+
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SrcOffsetX(
+ /* [retval][out] */ long *pVal) = 0;
+
+ virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SrcOffsetX(
+ /* [in] */ long newVal) = 0;
+
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SrcOffsetY(
+ /* [retval][out] */ long *pVal) = 0;
+
+ virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SrcOffsetY(
+ /* [in] */ long newVal) = 0;
+
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SrcWidth(
+ /* [retval][out] */ long *pVal) = 0;
+
+ virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SrcWidth(
+ /* [in] */ long newVal) = 0;
+
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SrcHeight(
+ /* [retval][out] */ long *pVal) = 0;
+
+ virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SrcHeight(
+ /* [in] */ long newVal) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IDxtCompositorVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDxtCompositor * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDxtCompositor * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDxtCompositor * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )(
+ IDxtCompositor * This,
+ /* [out] */ UINT *pctinfo);
+
+ HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )(
+ IDxtCompositor * This,
+ /* [in] */ UINT iTInfo,
+ /* [in] */ LCID lcid,
+ /* [out] */ ITypeInfo **ppTInfo);
+
+ HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )(
+ IDxtCompositor * This,
+ /* [in] */ REFIID riid,
+ /* [size_is][in] */ LPOLESTR *rgszNames,
+ /* [in] */ UINT cNames,
+ /* [in] */ LCID lcid,
+ /* [size_is][out] */ DISPID *rgDispId);
+
+ /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )(
+ IDxtCompositor * This,
+ /* [in] */ DISPID dispIdMember,
+ /* [in] */ REFIID riid,
+ /* [in] */ LCID lcid,
+ /* [in] */ WORD wFlags,
+ /* [out][in] */ DISPPARAMS *pDispParams,
+ /* [out] */ VARIANT *pVarResult,
+ /* [out] */ EXCEPINFO *pExcepInfo,
+ /* [out] */ UINT *puArgErr);
+
+ /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Capabilities )(
+ IDxtCompositor * This,
+ /* [retval][out] */ long *pVal);
+
+ /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Progress )(
+ IDxtCompositor * This,
+ /* [retval][out] */ float *pVal);
+
+ /* [id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Progress )(
+ IDxtCompositor * This,
+ /* [in] */ float newVal);
+
+ /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StepResolution )(
+ IDxtCompositor * This,
+ /* [retval][out] */ float *pVal);
+
+ /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Duration )(
+ IDxtCompositor * This,
+ /* [retval][out] */ float *pVal);
+
+ /* [id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Duration )(
+ IDxtCompositor * This,
+ /* [in] */ float newVal);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_OffsetX )(
+ IDxtCompositor * This,
+ /* [retval][out] */ long *pVal);
+
+ /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_OffsetX )(
+ IDxtCompositor * This,
+ /* [in] */ long newVal);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_OffsetY )(
+ IDxtCompositor * This,
+ /* [retval][out] */ long *pVal);
+
+ /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_OffsetY )(
+ IDxtCompositor * This,
+ /* [in] */ long newVal);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Width )(
+ IDxtCompositor * This,
+ /* [retval][out] */ long *pVal);
+
+ /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Width )(
+ IDxtCompositor * This,
+ /* [in] */ long newVal);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Height )(
+ IDxtCompositor * This,
+ /* [retval][out] */ long *pVal);
+
+ /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Height )(
+ IDxtCompositor * This,
+ /* [in] */ long newVal);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_SrcOffsetX )(
+ IDxtCompositor * This,
+ /* [retval][out] */ long *pVal);
+
+ /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_SrcOffsetX )(
+ IDxtCompositor * This,
+ /* [in] */ long newVal);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_SrcOffsetY )(
+ IDxtCompositor * This,
+ /* [retval][out] */ long *pVal);
+
+ /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_SrcOffsetY )(
+ IDxtCompositor * This,
+ /* [in] */ long newVal);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_SrcWidth )(
+ IDxtCompositor * This,
+ /* [retval][out] */ long *pVal);
+
+ /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_SrcWidth )(
+ IDxtCompositor * This,
+ /* [in] */ long newVal);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_SrcHeight )(
+ IDxtCompositor * This,
+ /* [retval][out] */ long *pVal);
+
+ /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_SrcHeight )(
+ IDxtCompositor * This,
+ /* [in] */ long newVal);
+
+ END_INTERFACE
+ } IDxtCompositorVtbl;
+
+ interface IDxtCompositor
+ {
+ CONST_VTBL struct IDxtCompositorVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDxtCompositor_QueryInterface(This,riid,ppvObject) \
+ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
+
+#define IDxtCompositor_AddRef(This) \
+ (This)->lpVtbl -> AddRef(This)
+
+#define IDxtCompositor_Release(This) \
+ (This)->lpVtbl -> Release(This)
+
+
+#define IDxtCompositor_GetTypeInfoCount(This,pctinfo) \
+ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo)
+
+#define IDxtCompositor_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \
+ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo)
+
+#define IDxtCompositor_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \
+ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
+
+#define IDxtCompositor_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \
+ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
+
+
+#define IDxtCompositor_get_Capabilities(This,pVal) \
+ (This)->lpVtbl -> get_Capabilities(This,pVal)
+
+#define IDxtCompositor_get_Progress(This,pVal) \
+ (This)->lpVtbl -> get_Progress(This,pVal)
+
+#define IDxtCompositor_put_Progress(This,newVal) \
+ (This)->lpVtbl -> put_Progress(This,newVal)
+
+#define IDxtCompositor_get_StepResolution(This,pVal) \
+ (This)->lpVtbl -> get_StepResolution(This,pVal)
+
+#define IDxtCompositor_get_Duration(This,pVal) \
+ (This)->lpVtbl -> get_Duration(This,pVal)
+
+#define IDxtCompositor_put_Duration(This,newVal) \
+ (This)->lpVtbl -> put_Duration(This,newVal)
+
+
+#define IDxtCompositor_get_OffsetX(This,pVal) \
+ (This)->lpVtbl -> get_OffsetX(This,pVal)
+
+#define IDxtCompositor_put_OffsetX(This,newVal) \
+ (This)->lpVtbl -> put_OffsetX(This,newVal)
+
+#define IDxtCompositor_get_OffsetY(This,pVal) \
+ (This)->lpVtbl -> get_OffsetY(This,pVal)
+
+#define IDxtCompositor_put_OffsetY(This,newVal) \
+ (This)->lpVtbl -> put_OffsetY(This,newVal)
+
+#define IDxtCompositor_get_Width(This,pVal) \
+ (This)->lpVtbl -> get_Width(This,pVal)
+
+#define IDxtCompositor_put_Width(This,newVal) \
+ (This)->lpVtbl -> put_Width(This,newVal)
+
+#define IDxtCompositor_get_Height(This,pVal) \
+ (This)->lpVtbl -> get_Height(This,pVal)
+
+#define IDxtCompositor_put_Height(This,newVal) \
+ (This)->lpVtbl -> put_Height(This,newVal)
+
+#define IDxtCompositor_get_SrcOffsetX(This,pVal) \
+ (This)->lpVtbl -> get_SrcOffsetX(This,pVal)
+
+#define IDxtCompositor_put_SrcOffsetX(This,newVal) \
+ (This)->lpVtbl -> put_SrcOffsetX(This,newVal)
+
+#define IDxtCompositor_get_SrcOffsetY(This,pVal) \
+ (This)->lpVtbl -> get_SrcOffsetY(This,pVal)
+
+#define IDxtCompositor_put_SrcOffsetY(This,newVal) \
+ (This)->lpVtbl -> put_SrcOffsetY(This,newVal)
+
+#define IDxtCompositor_get_SrcWidth(This,pVal) \
+ (This)->lpVtbl -> get_SrcWidth(This,pVal)
+
+#define IDxtCompositor_put_SrcWidth(This,newVal) \
+ (This)->lpVtbl -> put_SrcWidth(This,newVal)
+
+#define IDxtCompositor_get_SrcHeight(This,pVal) \
+ (This)->lpVtbl -> get_SrcHeight(This,pVal)
+
+#define IDxtCompositor_put_SrcHeight(This,newVal) \
+ (This)->lpVtbl -> put_SrcHeight(This,newVal)
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtCompositor_get_OffsetX_Proxy(
+ IDxtCompositor * This,
+ /* [retval][out] */ long *pVal);
+
+
+void __RPC_STUB IDxtCompositor_get_OffsetX_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtCompositor_put_OffsetX_Proxy(
+ IDxtCompositor * This,
+ /* [in] */ long newVal);
+
+
+void __RPC_STUB IDxtCompositor_put_OffsetX_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtCompositor_get_OffsetY_Proxy(
+ IDxtCompositor * This,
+ /* [retval][out] */ long *pVal);
+
+
+void __RPC_STUB IDxtCompositor_get_OffsetY_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtCompositor_put_OffsetY_Proxy(
+ IDxtCompositor * This,
+ /* [in] */ long newVal);
+
+
+void __RPC_STUB IDxtCompositor_put_OffsetY_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtCompositor_get_Width_Proxy(
+ IDxtCompositor * This,
+ /* [retval][out] */ long *pVal);
+
+
+void __RPC_STUB IDxtCompositor_get_Width_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtCompositor_put_Width_Proxy(
+ IDxtCompositor * This,
+ /* [in] */ long newVal);
+
+
+void __RPC_STUB IDxtCompositor_put_Width_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtCompositor_get_Height_Proxy(
+ IDxtCompositor * This,
+ /* [retval][out] */ long *pVal);
+
+
+void __RPC_STUB IDxtCompositor_get_Height_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtCompositor_put_Height_Proxy(
+ IDxtCompositor * This,
+ /* [in] */ long newVal);
+
+
+void __RPC_STUB IDxtCompositor_put_Height_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtCompositor_get_SrcOffsetX_Proxy(
+ IDxtCompositor * This,
+ /* [retval][out] */ long *pVal);
+
+
+void __RPC_STUB IDxtCompositor_get_SrcOffsetX_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtCompositor_put_SrcOffsetX_Proxy(
+ IDxtCompositor * This,
+ /* [in] */ long newVal);
+
+
+void __RPC_STUB IDxtCompositor_put_SrcOffsetX_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtCompositor_get_SrcOffsetY_Proxy(
+ IDxtCompositor * This,
+ /* [retval][out] */ long *pVal);
+
+
+void __RPC_STUB IDxtCompositor_get_SrcOffsetY_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtCompositor_put_SrcOffsetY_Proxy(
+ IDxtCompositor * This,
+ /* [in] */ long newVal);
+
+
+void __RPC_STUB IDxtCompositor_put_SrcOffsetY_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtCompositor_get_SrcWidth_Proxy(
+ IDxtCompositor * This,
+ /* [retval][out] */ long *pVal);
+
+
+void __RPC_STUB IDxtCompositor_get_SrcWidth_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtCompositor_put_SrcWidth_Proxy(
+ IDxtCompositor * This,
+ /* [in] */ long newVal);
+
+
+void __RPC_STUB IDxtCompositor_put_SrcWidth_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtCompositor_get_SrcHeight_Proxy(
+ IDxtCompositor * This,
+ /* [retval][out] */ long *pVal);
+
+
+void __RPC_STUB IDxtCompositor_get_SrcHeight_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtCompositor_put_SrcHeight_Proxy(
+ IDxtCompositor * This,
+ /* [in] */ long newVal);
+
+
+void __RPC_STUB IDxtCompositor_put_SrcHeight_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+
+#endif /* __IDxtCompositor_INTERFACE_DEFINED__ */
+
+
+#ifndef __IDxtAlphaSetter_INTERFACE_DEFINED__
+#define __IDxtAlphaSetter_INTERFACE_DEFINED__
+
+/* interface IDxtAlphaSetter */
+/* [unique][helpstring][dual][uuid][object] */
+
+
+EXTERN_C const IID IID_IDxtAlphaSetter;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("4EE9EAD9-DA4D-43d0-9383-06B90C08B12B")
+ IDxtAlphaSetter : public IDXEffect
+ {
+ public:
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Alpha(
+ /* [retval][out] */ long *pVal) = 0;
+
+ virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Alpha(
+ /* [in] */ long newVal) = 0;
+
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_AlphaRamp(
+ /* [retval][out] */ double *pVal) = 0;
+
+ virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_AlphaRamp(
+ /* [in] */ double newVal) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IDxtAlphaSetterVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDxtAlphaSetter * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDxtAlphaSetter * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDxtAlphaSetter * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )(
+ IDxtAlphaSetter * This,
+ /* [out] */ UINT *pctinfo);
+
+ HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )(
+ IDxtAlphaSetter * This,
+ /* [in] */ UINT iTInfo,
+ /* [in] */ LCID lcid,
+ /* [out] */ ITypeInfo **ppTInfo);
+
+ HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )(
+ IDxtAlphaSetter * This,
+ /* [in] */ REFIID riid,
+ /* [size_is][in] */ LPOLESTR *rgszNames,
+ /* [in] */ UINT cNames,
+ /* [in] */ LCID lcid,
+ /* [size_is][out] */ DISPID *rgDispId);
+
+ /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )(
+ IDxtAlphaSetter * This,
+ /* [in] */ DISPID dispIdMember,
+ /* [in] */ REFIID riid,
+ /* [in] */ LCID lcid,
+ /* [in] */ WORD wFlags,
+ /* [out][in] */ DISPPARAMS *pDispParams,
+ /* [out] */ VARIANT *pVarResult,
+ /* [out] */ EXCEPINFO *pExcepInfo,
+ /* [out] */ UINT *puArgErr);
+
+ /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Capabilities )(
+ IDxtAlphaSetter * This,
+ /* [retval][out] */ long *pVal);
+
+ /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Progress )(
+ IDxtAlphaSetter * This,
+ /* [retval][out] */ float *pVal);
+
+ /* [id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Progress )(
+ IDxtAlphaSetter * This,
+ /* [in] */ float newVal);
+
+ /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StepResolution )(
+ IDxtAlphaSetter * This,
+ /* [retval][out] */ float *pVal);
+
+ /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Duration )(
+ IDxtAlphaSetter * This,
+ /* [retval][out] */ float *pVal);
+
+ /* [id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Duration )(
+ IDxtAlphaSetter * This,
+ /* [in] */ float newVal);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Alpha )(
+ IDxtAlphaSetter * This,
+ /* [retval][out] */ long *pVal);
+
+ /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Alpha )(
+ IDxtAlphaSetter * This,
+ /* [in] */ long newVal);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_AlphaRamp )(
+ IDxtAlphaSetter * This,
+ /* [retval][out] */ double *pVal);
+
+ /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_AlphaRamp )(
+ IDxtAlphaSetter * This,
+ /* [in] */ double newVal);
+
+ END_INTERFACE
+ } IDxtAlphaSetterVtbl;
+
+ interface IDxtAlphaSetter
+ {
+ CONST_VTBL struct IDxtAlphaSetterVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDxtAlphaSetter_QueryInterface(This,riid,ppvObject) \
+ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
+
+#define IDxtAlphaSetter_AddRef(This) \
+ (This)->lpVtbl -> AddRef(This)
+
+#define IDxtAlphaSetter_Release(This) \
+ (This)->lpVtbl -> Release(This)
+
+
+#define IDxtAlphaSetter_GetTypeInfoCount(This,pctinfo) \
+ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo)
+
+#define IDxtAlphaSetter_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \
+ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo)
+
+#define IDxtAlphaSetter_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \
+ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
+
+#define IDxtAlphaSetter_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \
+ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
+
+
+#define IDxtAlphaSetter_get_Capabilities(This,pVal) \
+ (This)->lpVtbl -> get_Capabilities(This,pVal)
+
+#define IDxtAlphaSetter_get_Progress(This,pVal) \
+ (This)->lpVtbl -> get_Progress(This,pVal)
+
+#define IDxtAlphaSetter_put_Progress(This,newVal) \
+ (This)->lpVtbl -> put_Progress(This,newVal)
+
+#define IDxtAlphaSetter_get_StepResolution(This,pVal) \
+ (This)->lpVtbl -> get_StepResolution(This,pVal)
+
+#define IDxtAlphaSetter_get_Duration(This,pVal) \
+ (This)->lpVtbl -> get_Duration(This,pVal)
+
+#define IDxtAlphaSetter_put_Duration(This,newVal) \
+ (This)->lpVtbl -> put_Duration(This,newVal)
+
+
+#define IDxtAlphaSetter_get_Alpha(This,pVal) \
+ (This)->lpVtbl -> get_Alpha(This,pVal)
+
+#define IDxtAlphaSetter_put_Alpha(This,newVal) \
+ (This)->lpVtbl -> put_Alpha(This,newVal)
+
+#define IDxtAlphaSetter_get_AlphaRamp(This,pVal) \
+ (This)->lpVtbl -> get_AlphaRamp(This,pVal)
+
+#define IDxtAlphaSetter_put_AlphaRamp(This,newVal) \
+ (This)->lpVtbl -> put_AlphaRamp(This,newVal)
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtAlphaSetter_get_Alpha_Proxy(
+ IDxtAlphaSetter * This,
+ /* [retval][out] */ long *pVal);
+
+
+void __RPC_STUB IDxtAlphaSetter_get_Alpha_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtAlphaSetter_put_Alpha_Proxy(
+ IDxtAlphaSetter * This,
+ /* [in] */ long newVal);
+
+
+void __RPC_STUB IDxtAlphaSetter_put_Alpha_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtAlphaSetter_get_AlphaRamp_Proxy(
+ IDxtAlphaSetter * This,
+ /* [retval][out] */ double *pVal);
+
+
+void __RPC_STUB IDxtAlphaSetter_get_AlphaRamp_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtAlphaSetter_put_AlphaRamp_Proxy(
+ IDxtAlphaSetter * This,
+ /* [in] */ double newVal);
+
+
+void __RPC_STUB IDxtAlphaSetter_put_AlphaRamp_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+
+#endif /* __IDxtAlphaSetter_INTERFACE_DEFINED__ */
+
+
+#ifndef __IDxtJpeg_INTERFACE_DEFINED__
+#define __IDxtJpeg_INTERFACE_DEFINED__
+
+/* interface IDxtJpeg */
+/* [unique][helpstring][dual][uuid][object] */
+
+
+EXTERN_C const IID IID_IDxtJpeg;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("DE75D011-7A65-11D2-8CEA-00A0C9441E20")
+ IDxtJpeg : public IDXEffect
+ {
+ public:
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_MaskNum(
+ /* [retval][out] */ long *__MIDL_0018) = 0;
+
+ virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_MaskNum(
+ /* [in] */ long __MIDL_0019) = 0;
+
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_MaskName(
+ /* [retval][out] */ BSTR *pVal) = 0;
+
+ virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_MaskName(
+ /* [in] */ BSTR newVal) = 0;
+
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ScaleX(
+ /* [retval][out] */ double *__MIDL_0020) = 0;
+
+ virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_ScaleX(
+ /* [in] */ double __MIDL_0021) = 0;
+
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ScaleY(
+ /* [retval][out] */ double *__MIDL_0022) = 0;
+
+ virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_ScaleY(
+ /* [in] */ double __MIDL_0023) = 0;
+
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_OffsetX(
+ /* [retval][out] */ long *__MIDL_0024) = 0;
+
+ virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_OffsetX(
+ /* [in] */ long __MIDL_0025) = 0;
+
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_OffsetY(
+ /* [retval][out] */ long *__MIDL_0026) = 0;
+
+ virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_OffsetY(
+ /* [in] */ long __MIDL_0027) = 0;
+
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ReplicateX(
+ /* [retval][out] */ long *pVal) = 0;
+
+ virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_ReplicateX(
+ /* [in] */ long newVal) = 0;
+
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ReplicateY(
+ /* [retval][out] */ long *pVal) = 0;
+
+ virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_ReplicateY(
+ /* [in] */ long newVal) = 0;
+
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_BorderColor(
+ /* [retval][out] */ long *pVal) = 0;
+
+ virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_BorderColor(
+ /* [in] */ long newVal) = 0;
+
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_BorderWidth(
+ /* [retval][out] */ long *pVal) = 0;
+
+ virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_BorderWidth(
+ /* [in] */ long newVal) = 0;
+
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_BorderSoftness(
+ /* [retval][out] */ long *pVal) = 0;
+
+ virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_BorderSoftness(
+ /* [in] */ long newVal) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE ApplyChanges( void) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE LoadDefSettings( void) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IDxtJpegVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDxtJpeg * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDxtJpeg * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDxtJpeg * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )(
+ IDxtJpeg * This,
+ /* [out] */ UINT *pctinfo);
+
+ HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )(
+ IDxtJpeg * This,
+ /* [in] */ UINT iTInfo,
+ /* [in] */ LCID lcid,
+ /* [out] */ ITypeInfo **ppTInfo);
+
+ HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )(
+ IDxtJpeg * This,
+ /* [in] */ REFIID riid,
+ /* [size_is][in] */ LPOLESTR *rgszNames,
+ /* [in] */ UINT cNames,
+ /* [in] */ LCID lcid,
+ /* [size_is][out] */ DISPID *rgDispId);
+
+ /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )(
+ IDxtJpeg * This,
+ /* [in] */ DISPID dispIdMember,
+ /* [in] */ REFIID riid,
+ /* [in] */ LCID lcid,
+ /* [in] */ WORD wFlags,
+ /* [out][in] */ DISPPARAMS *pDispParams,
+ /* [out] */ VARIANT *pVarResult,
+ /* [out] */ EXCEPINFO *pExcepInfo,
+ /* [out] */ UINT *puArgErr);
+
+ /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Capabilities )(
+ IDxtJpeg * This,
+ /* [retval][out] */ long *pVal);
+
+ /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Progress )(
+ IDxtJpeg * This,
+ /* [retval][out] */ float *pVal);
+
+ /* [id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Progress )(
+ IDxtJpeg * This,
+ /* [in] */ float newVal);
+
+ /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StepResolution )(
+ IDxtJpeg * This,
+ /* [retval][out] */ float *pVal);
+
+ /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Duration )(
+ IDxtJpeg * This,
+ /* [retval][out] */ float *pVal);
+
+ /* [id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Duration )(
+ IDxtJpeg * This,
+ /* [in] */ float newVal);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MaskNum )(
+ IDxtJpeg * This,
+ /* [retval][out] */ long *__MIDL_0018);
+
+ /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MaskNum )(
+ IDxtJpeg * This,
+ /* [in] */ long __MIDL_0019);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MaskName )(
+ IDxtJpeg * This,
+ /* [retval][out] */ BSTR *pVal);
+
+ /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MaskName )(
+ IDxtJpeg * This,
+ /* [in] */ BSTR newVal);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ScaleX )(
+ IDxtJpeg * This,
+ /* [retval][out] */ double *__MIDL_0020);
+
+ /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_ScaleX )(
+ IDxtJpeg * This,
+ /* [in] */ double __MIDL_0021);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ScaleY )(
+ IDxtJpeg * This,
+ /* [retval][out] */ double *__MIDL_0022);
+
+ /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_ScaleY )(
+ IDxtJpeg * This,
+ /* [in] */ double __MIDL_0023);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_OffsetX )(
+ IDxtJpeg * This,
+ /* [retval][out] */ long *__MIDL_0024);
+
+ /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_OffsetX )(
+ IDxtJpeg * This,
+ /* [in] */ long __MIDL_0025);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_OffsetY )(
+ IDxtJpeg * This,
+ /* [retval][out] */ long *__MIDL_0026);
+
+ /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_OffsetY )(
+ IDxtJpeg * This,
+ /* [in] */ long __MIDL_0027);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ReplicateX )(
+ IDxtJpeg * This,
+ /* [retval][out] */ long *pVal);
+
+ /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_ReplicateX )(
+ IDxtJpeg * This,
+ /* [in] */ long newVal);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ReplicateY )(
+ IDxtJpeg * This,
+ /* [retval][out] */ long *pVal);
+
+ /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_ReplicateY )(
+ IDxtJpeg * This,
+ /* [in] */ long newVal);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_BorderColor )(
+ IDxtJpeg * This,
+ /* [retval][out] */ long *pVal);
+
+ /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_BorderColor )(
+ IDxtJpeg * This,
+ /* [in] */ long newVal);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_BorderWidth )(
+ IDxtJpeg * This,
+ /* [retval][out] */ long *pVal);
+
+ /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_BorderWidth )(
+ IDxtJpeg * This,
+ /* [in] */ long newVal);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_BorderSoftness )(
+ IDxtJpeg * This,
+ /* [retval][out] */ long *pVal);
+
+ /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_BorderSoftness )(
+ IDxtJpeg * This,
+ /* [in] */ long newVal);
+
+ HRESULT ( STDMETHODCALLTYPE *ApplyChanges )(
+ IDxtJpeg * This);
+
+ HRESULT ( STDMETHODCALLTYPE *LoadDefSettings )(
+ IDxtJpeg * This);
+
+ END_INTERFACE
+ } IDxtJpegVtbl;
+
+ interface IDxtJpeg
+ {
+ CONST_VTBL struct IDxtJpegVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDxtJpeg_QueryInterface(This,riid,ppvObject) \
+ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
+
+#define IDxtJpeg_AddRef(This) \
+ (This)->lpVtbl -> AddRef(This)
+
+#define IDxtJpeg_Release(This) \
+ (This)->lpVtbl -> Release(This)
+
+
+#define IDxtJpeg_GetTypeInfoCount(This,pctinfo) \
+ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo)
+
+#define IDxtJpeg_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \
+ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo)
+
+#define IDxtJpeg_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \
+ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
+
+#define IDxtJpeg_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \
+ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
+
+
+#define IDxtJpeg_get_Capabilities(This,pVal) \
+ (This)->lpVtbl -> get_Capabilities(This,pVal)
+
+#define IDxtJpeg_get_Progress(This,pVal) \
+ (This)->lpVtbl -> get_Progress(This,pVal)
+
+#define IDxtJpeg_put_Progress(This,newVal) \
+ (This)->lpVtbl -> put_Progress(This,newVal)
+
+#define IDxtJpeg_get_StepResolution(This,pVal) \
+ (This)->lpVtbl -> get_StepResolution(This,pVal)
+
+#define IDxtJpeg_get_Duration(This,pVal) \
+ (This)->lpVtbl -> get_Duration(This,pVal)
+
+#define IDxtJpeg_put_Duration(This,newVal) \
+ (This)->lpVtbl -> put_Duration(This,newVal)
+
+
+#define IDxtJpeg_get_MaskNum(This,__MIDL_0018) \
+ (This)->lpVtbl -> get_MaskNum(This,__MIDL_0018)
+
+#define IDxtJpeg_put_MaskNum(This,__MIDL_0019) \
+ (This)->lpVtbl -> put_MaskNum(This,__MIDL_0019)
+
+#define IDxtJpeg_get_MaskName(This,pVal) \
+ (This)->lpVtbl -> get_MaskName(This,pVal)
+
+#define IDxtJpeg_put_MaskName(This,newVal) \
+ (This)->lpVtbl -> put_MaskName(This,newVal)
+
+#define IDxtJpeg_get_ScaleX(This,__MIDL_0020) \
+ (This)->lpVtbl -> get_ScaleX(This,__MIDL_0020)
+
+#define IDxtJpeg_put_ScaleX(This,__MIDL_0021) \
+ (This)->lpVtbl -> put_ScaleX(This,__MIDL_0021)
+
+#define IDxtJpeg_get_ScaleY(This,__MIDL_0022) \
+ (This)->lpVtbl -> get_ScaleY(This,__MIDL_0022)
+
+#define IDxtJpeg_put_ScaleY(This,__MIDL_0023) \
+ (This)->lpVtbl -> put_ScaleY(This,__MIDL_0023)
+
+#define IDxtJpeg_get_OffsetX(This,__MIDL_0024) \
+ (This)->lpVtbl -> get_OffsetX(This,__MIDL_0024)
+
+#define IDxtJpeg_put_OffsetX(This,__MIDL_0025) \
+ (This)->lpVtbl -> put_OffsetX(This,__MIDL_0025)
+
+#define IDxtJpeg_get_OffsetY(This,__MIDL_0026) \
+ (This)->lpVtbl -> get_OffsetY(This,__MIDL_0026)
+
+#define IDxtJpeg_put_OffsetY(This,__MIDL_0027) \
+ (This)->lpVtbl -> put_OffsetY(This,__MIDL_0027)
+
+#define IDxtJpeg_get_ReplicateX(This,pVal) \
+ (This)->lpVtbl -> get_ReplicateX(This,pVal)
+
+#define IDxtJpeg_put_ReplicateX(This,newVal) \
+ (This)->lpVtbl -> put_ReplicateX(This,newVal)
+
+#define IDxtJpeg_get_ReplicateY(This,pVal) \
+ (This)->lpVtbl -> get_ReplicateY(This,pVal)
+
+#define IDxtJpeg_put_ReplicateY(This,newVal) \
+ (This)->lpVtbl -> put_ReplicateY(This,newVal)
+
+#define IDxtJpeg_get_BorderColor(This,pVal) \
+ (This)->lpVtbl -> get_BorderColor(This,pVal)
+
+#define IDxtJpeg_put_BorderColor(This,newVal) \
+ (This)->lpVtbl -> put_BorderColor(This,newVal)
+
+#define IDxtJpeg_get_BorderWidth(This,pVal) \
+ (This)->lpVtbl -> get_BorderWidth(This,pVal)
+
+#define IDxtJpeg_put_BorderWidth(This,newVal) \
+ (This)->lpVtbl -> put_BorderWidth(This,newVal)
+
+#define IDxtJpeg_get_BorderSoftness(This,pVal) \
+ (This)->lpVtbl -> get_BorderSoftness(This,pVal)
+
+#define IDxtJpeg_put_BorderSoftness(This,newVal) \
+ (This)->lpVtbl -> put_BorderSoftness(This,newVal)
+
+#define IDxtJpeg_ApplyChanges(This) \
+ (This)->lpVtbl -> ApplyChanges(This)
+
+#define IDxtJpeg_LoadDefSettings(This) \
+ (This)->lpVtbl -> LoadDefSettings(This)
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_get_MaskNum_Proxy(
+ IDxtJpeg * This,
+ /* [retval][out] */ long *__MIDL_0018);
+
+
+void __RPC_STUB IDxtJpeg_get_MaskNum_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_put_MaskNum_Proxy(
+ IDxtJpeg * This,
+ /* [in] */ long __MIDL_0019);
+
+
+void __RPC_STUB IDxtJpeg_put_MaskNum_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_get_MaskName_Proxy(
+ IDxtJpeg * This,
+ /* [retval][out] */ BSTR *pVal);
+
+
+void __RPC_STUB IDxtJpeg_get_MaskName_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_put_MaskName_Proxy(
+ IDxtJpeg * This,
+ /* [in] */ BSTR newVal);
+
+
+void __RPC_STUB IDxtJpeg_put_MaskName_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_get_ScaleX_Proxy(
+ IDxtJpeg * This,
+ /* [retval][out] */ double *__MIDL_0020);
+
+
+void __RPC_STUB IDxtJpeg_get_ScaleX_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_put_ScaleX_Proxy(
+ IDxtJpeg * This,
+ /* [in] */ double __MIDL_0021);
+
+
+void __RPC_STUB IDxtJpeg_put_ScaleX_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_get_ScaleY_Proxy(
+ IDxtJpeg * This,
+ /* [retval][out] */ double *__MIDL_0022);
+
+
+void __RPC_STUB IDxtJpeg_get_ScaleY_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_put_ScaleY_Proxy(
+ IDxtJpeg * This,
+ /* [in] */ double __MIDL_0023);
+
+
+void __RPC_STUB IDxtJpeg_put_ScaleY_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_get_OffsetX_Proxy(
+ IDxtJpeg * This,
+ /* [retval][out] */ long *__MIDL_0024);
+
+
+void __RPC_STUB IDxtJpeg_get_OffsetX_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_put_OffsetX_Proxy(
+ IDxtJpeg * This,
+ /* [in] */ long __MIDL_0025);
+
+
+void __RPC_STUB IDxtJpeg_put_OffsetX_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_get_OffsetY_Proxy(
+ IDxtJpeg * This,
+ /* [retval][out] */ long *__MIDL_0026);
+
+
+void __RPC_STUB IDxtJpeg_get_OffsetY_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_put_OffsetY_Proxy(
+ IDxtJpeg * This,
+ /* [in] */ long __MIDL_0027);
+
+
+void __RPC_STUB IDxtJpeg_put_OffsetY_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_get_ReplicateX_Proxy(
+ IDxtJpeg * This,
+ /* [retval][out] */ long *pVal);
+
+
+void __RPC_STUB IDxtJpeg_get_ReplicateX_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_put_ReplicateX_Proxy(
+ IDxtJpeg * This,
+ /* [in] */ long newVal);
+
+
+void __RPC_STUB IDxtJpeg_put_ReplicateX_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_get_ReplicateY_Proxy(
+ IDxtJpeg * This,
+ /* [retval][out] */ long *pVal);
+
+
+void __RPC_STUB IDxtJpeg_get_ReplicateY_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_put_ReplicateY_Proxy(
+ IDxtJpeg * This,
+ /* [in] */ long newVal);
+
+
+void __RPC_STUB IDxtJpeg_put_ReplicateY_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_get_BorderColor_Proxy(
+ IDxtJpeg * This,
+ /* [retval][out] */ long *pVal);
+
+
+void __RPC_STUB IDxtJpeg_get_BorderColor_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_put_BorderColor_Proxy(
+ IDxtJpeg * This,
+ /* [in] */ long newVal);
+
+
+void __RPC_STUB IDxtJpeg_put_BorderColor_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_get_BorderWidth_Proxy(
+ IDxtJpeg * This,
+ /* [retval][out] */ long *pVal);
+
+
+void __RPC_STUB IDxtJpeg_get_BorderWidth_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_put_BorderWidth_Proxy(
+ IDxtJpeg * This,
+ /* [in] */ long newVal);
+
+
+void __RPC_STUB IDxtJpeg_put_BorderWidth_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_get_BorderSoftness_Proxy(
+ IDxtJpeg * This,
+ /* [retval][out] */ long *pVal);
+
+
+void __RPC_STUB IDxtJpeg_get_BorderSoftness_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_put_BorderSoftness_Proxy(
+ IDxtJpeg * This,
+ /* [in] */ long newVal);
+
+
+void __RPC_STUB IDxtJpeg_put_BorderSoftness_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IDxtJpeg_ApplyChanges_Proxy(
+ IDxtJpeg * This);
+
+
+void __RPC_STUB IDxtJpeg_ApplyChanges_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IDxtJpeg_LoadDefSettings_Proxy(
+ IDxtJpeg * This);
+
+
+void __RPC_STUB IDxtJpeg_LoadDefSettings_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+
+#endif /* __IDxtJpeg_INTERFACE_DEFINED__ */
+
+
+#ifndef __IDxtKey_INTERFACE_DEFINED__
+#define __IDxtKey_INTERFACE_DEFINED__
+
+/* interface IDxtKey */
+/* [unique][helpstring][dual][uuid][object] */
+
+
+EXTERN_C const IID IID_IDxtKey;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("3255de56-38fb-4901-b980-94b438010d7b")
+ IDxtKey : public IDXEffect
+ {
+ public:
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_KeyType(
+ /* [retval][out] */ int *__MIDL_0028) = 0;
+
+ virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_KeyType(
+ /* [in] */ int __MIDL_0029) = 0;
+
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Hue(
+ /* [retval][out] */ int *__MIDL_0030) = 0;
+
+ virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Hue(
+ /* [in] */ int __MIDL_0031) = 0;
+
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Luminance(
+ /* [retval][out] */ int *__MIDL_0032) = 0;
+
+ virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Luminance(
+ /* [in] */ int __MIDL_0033) = 0;
+
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_RGB(
+ /* [retval][out] */ DWORD *__MIDL_0034) = 0;
+
+ virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_RGB(
+ /* [in] */ DWORD __MIDL_0035) = 0;
+
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Similarity(
+ /* [retval][out] */ int *__MIDL_0036) = 0;
+
+ virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Similarity(
+ /* [in] */ int __MIDL_0037) = 0;
+
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Invert(
+ /* [retval][out] */ BOOL *__MIDL_0038) = 0;
+
+ virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Invert(
+ /* [in] */ BOOL __MIDL_0039) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IDxtKeyVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDxtKey * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDxtKey * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDxtKey * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )(
+ IDxtKey * This,
+ /* [out] */ UINT *pctinfo);
+
+ HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )(
+ IDxtKey * This,
+ /* [in] */ UINT iTInfo,
+ /* [in] */ LCID lcid,
+ /* [out] */ ITypeInfo **ppTInfo);
+
+ HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )(
+ IDxtKey * This,
+ /* [in] */ REFIID riid,
+ /* [size_is][in] */ LPOLESTR *rgszNames,
+ /* [in] */ UINT cNames,
+ /* [in] */ LCID lcid,
+ /* [size_is][out] */ DISPID *rgDispId);
+
+ /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )(
+ IDxtKey * This,
+ /* [in] */ DISPID dispIdMember,
+ /* [in] */ REFIID riid,
+ /* [in] */ LCID lcid,
+ /* [in] */ WORD wFlags,
+ /* [out][in] */ DISPPARAMS *pDispParams,
+ /* [out] */ VARIANT *pVarResult,
+ /* [out] */ EXCEPINFO *pExcepInfo,
+ /* [out] */ UINT *puArgErr);
+
+ /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Capabilities )(
+ IDxtKey * This,
+ /* [retval][out] */ long *pVal);
+
+ /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Progress )(
+ IDxtKey * This,
+ /* [retval][out] */ float *pVal);
+
+ /* [id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Progress )(
+ IDxtKey * This,
+ /* [in] */ float newVal);
+
+ /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StepResolution )(
+ IDxtKey * This,
+ /* [retval][out] */ float *pVal);
+
+ /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Duration )(
+ IDxtKey * This,
+ /* [retval][out] */ float *pVal);
+
+ /* [id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Duration )(
+ IDxtKey * This,
+ /* [in] */ float newVal);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_KeyType )(
+ IDxtKey * This,
+ /* [retval][out] */ int *__MIDL_0028);
+
+ /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_KeyType )(
+ IDxtKey * This,
+ /* [in] */ int __MIDL_0029);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Hue )(
+ IDxtKey * This,
+ /* [retval][out] */ int *__MIDL_0030);
+
+ /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Hue )(
+ IDxtKey * This,
+ /* [in] */ int __MIDL_0031);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Luminance )(
+ IDxtKey * This,
+ /* [retval][out] */ int *__MIDL_0032);
+
+ /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Luminance )(
+ IDxtKey * This,
+ /* [in] */ int __MIDL_0033);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_RGB )(
+ IDxtKey * This,
+ /* [retval][out] */ DWORD *__MIDL_0034);
+
+ /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_RGB )(
+ IDxtKey * This,
+ /* [in] */ DWORD __MIDL_0035);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Similarity )(
+ IDxtKey * This,
+ /* [retval][out] */ int *__MIDL_0036);
+
+ /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Similarity )(
+ IDxtKey * This,
+ /* [in] */ int __MIDL_0037);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Invert )(
+ IDxtKey * This,
+ /* [retval][out] */ BOOL *__MIDL_0038);
+
+ /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Invert )(
+ IDxtKey * This,
+ /* [in] */ BOOL __MIDL_0039);
+
+ END_INTERFACE
+ } IDxtKeyVtbl;
+
+ interface IDxtKey
+ {
+ CONST_VTBL struct IDxtKeyVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDxtKey_QueryInterface(This,riid,ppvObject) \
+ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
+
+#define IDxtKey_AddRef(This) \
+ (This)->lpVtbl -> AddRef(This)
+
+#define IDxtKey_Release(This) \
+ (This)->lpVtbl -> Release(This)
+
+
+#define IDxtKey_GetTypeInfoCount(This,pctinfo) \
+ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo)
+
+#define IDxtKey_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \
+ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo)
+
+#define IDxtKey_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \
+ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
+
+#define IDxtKey_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \
+ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
+
+
+#define IDxtKey_get_Capabilities(This,pVal) \
+ (This)->lpVtbl -> get_Capabilities(This,pVal)
+
+#define IDxtKey_get_Progress(This,pVal) \
+ (This)->lpVtbl -> get_Progress(This,pVal)
+
+#define IDxtKey_put_Progress(This,newVal) \
+ (This)->lpVtbl -> put_Progress(This,newVal)
+
+#define IDxtKey_get_StepResolution(This,pVal) \
+ (This)->lpVtbl -> get_StepResolution(This,pVal)
+
+#define IDxtKey_get_Duration(This,pVal) \
+ (This)->lpVtbl -> get_Duration(This,pVal)
+
+#define IDxtKey_put_Duration(This,newVal) \
+ (This)->lpVtbl -> put_Duration(This,newVal)
+
+
+#define IDxtKey_get_KeyType(This,__MIDL_0028) \
+ (This)->lpVtbl -> get_KeyType(This,__MIDL_0028)
+
+#define IDxtKey_put_KeyType(This,__MIDL_0029) \
+ (This)->lpVtbl -> put_KeyType(This,__MIDL_0029)
+
+#define IDxtKey_get_Hue(This,__MIDL_0030) \
+ (This)->lpVtbl -> get_Hue(This,__MIDL_0030)
+
+#define IDxtKey_put_Hue(This,__MIDL_0031) \
+ (This)->lpVtbl -> put_Hue(This,__MIDL_0031)
+
+#define IDxtKey_get_Luminance(This,__MIDL_0032) \
+ (This)->lpVtbl -> get_Luminance(This,__MIDL_0032)
+
+#define IDxtKey_put_Luminance(This,__MIDL_0033) \
+ (This)->lpVtbl -> put_Luminance(This,__MIDL_0033)
+
+#define IDxtKey_get_RGB(This,__MIDL_0034) \
+ (This)->lpVtbl -> get_RGB(This,__MIDL_0034)
+
+#define IDxtKey_put_RGB(This,__MIDL_0035) \
+ (This)->lpVtbl -> put_RGB(This,__MIDL_0035)
+
+#define IDxtKey_get_Similarity(This,__MIDL_0036) \
+ (This)->lpVtbl -> get_Similarity(This,__MIDL_0036)
+
+#define IDxtKey_put_Similarity(This,__MIDL_0037) \
+ (This)->lpVtbl -> put_Similarity(This,__MIDL_0037)
+
+#define IDxtKey_get_Invert(This,__MIDL_0038) \
+ (This)->lpVtbl -> get_Invert(This,__MIDL_0038)
+
+#define IDxtKey_put_Invert(This,__MIDL_0039) \
+ (This)->lpVtbl -> put_Invert(This,__MIDL_0039)
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtKey_get_KeyType_Proxy(
+ IDxtKey * This,
+ /* [retval][out] */ int *__MIDL_0028);
+
+
+void __RPC_STUB IDxtKey_get_KeyType_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtKey_put_KeyType_Proxy(
+ IDxtKey * This,
+ /* [in] */ int __MIDL_0029);
+
+
+void __RPC_STUB IDxtKey_put_KeyType_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtKey_get_Hue_Proxy(
+ IDxtKey * This,
+ /* [retval][out] */ int *__MIDL_0030);
+
+
+void __RPC_STUB IDxtKey_get_Hue_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtKey_put_Hue_Proxy(
+ IDxtKey * This,
+ /* [in] */ int __MIDL_0031);
+
+
+void __RPC_STUB IDxtKey_put_Hue_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtKey_get_Luminance_Proxy(
+ IDxtKey * This,
+ /* [retval][out] */ int *__MIDL_0032);
+
+
+void __RPC_STUB IDxtKey_get_Luminance_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtKey_put_Luminance_Proxy(
+ IDxtKey * This,
+ /* [in] */ int __MIDL_0033);
+
+
+void __RPC_STUB IDxtKey_put_Luminance_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtKey_get_RGB_Proxy(
+ IDxtKey * This,
+ /* [retval][out] */ DWORD *__MIDL_0034);
+
+
+void __RPC_STUB IDxtKey_get_RGB_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtKey_put_RGB_Proxy(
+ IDxtKey * This,
+ /* [in] */ DWORD __MIDL_0035);
+
+
+void __RPC_STUB IDxtKey_put_RGB_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtKey_get_Similarity_Proxy(
+ IDxtKey * This,
+ /* [retval][out] */ int *__MIDL_0036);
+
+
+void __RPC_STUB IDxtKey_get_Similarity_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtKey_put_Similarity_Proxy(
+ IDxtKey * This,
+ /* [in] */ int __MIDL_0037);
+
+
+void __RPC_STUB IDxtKey_put_Similarity_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtKey_get_Invert_Proxy(
+ IDxtKey * This,
+ /* [retval][out] */ BOOL *__MIDL_0038);
+
+
+void __RPC_STUB IDxtKey_get_Invert_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtKey_put_Invert_Proxy(
+ IDxtKey * This,
+ /* [in] */ BOOL __MIDL_0039);
+
+
+void __RPC_STUB IDxtKey_put_Invert_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+
+#endif /* __IDxtKey_INTERFACE_DEFINED__ */
+
+
+#ifndef __IMediaLocator_INTERFACE_DEFINED__
+#define __IMediaLocator_INTERFACE_DEFINED__
+
+/* interface IMediaLocator */
+/* [unique][helpstring][uuid][object] */
+
+
+EXTERN_C const IID IID_IMediaLocator;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("288581E0-66CE-11d2-918F-00C0DF10D434")
+ IMediaLocator : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE FindMediaFile(
+ BSTR Input,
+ BSTR FilterString,
+ BSTR *pOutput,
+ long Flags) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE AddFoundLocation(
+ BSTR DirectoryName) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IMediaLocatorVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IMediaLocator * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IMediaLocator * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IMediaLocator * This);
+
+ HRESULT ( STDMETHODCALLTYPE *FindMediaFile )(
+ IMediaLocator * This,
+ BSTR Input,
+ BSTR FilterString,
+ BSTR *pOutput,
+ long Flags);
+
+ HRESULT ( STDMETHODCALLTYPE *AddFoundLocation )(
+ IMediaLocator * This,
+ BSTR DirectoryName);
+
+ END_INTERFACE
+ } IMediaLocatorVtbl;
+
+ interface IMediaLocator
+ {
+ CONST_VTBL struct IMediaLocatorVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IMediaLocator_QueryInterface(This,riid,ppvObject) \
+ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
+
+#define IMediaLocator_AddRef(This) \
+ (This)->lpVtbl -> AddRef(This)
+
+#define IMediaLocator_Release(This) \
+ (This)->lpVtbl -> Release(This)
+
+
+#define IMediaLocator_FindMediaFile(This,Input,FilterString,pOutput,Flags) \
+ (This)->lpVtbl -> FindMediaFile(This,Input,FilterString,pOutput,Flags)
+
+#define IMediaLocator_AddFoundLocation(This,DirectoryName) \
+ (This)->lpVtbl -> AddFoundLocation(This,DirectoryName)
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+HRESULT STDMETHODCALLTYPE IMediaLocator_FindMediaFile_Proxy(
+ IMediaLocator * This,
+ BSTR Input,
+ BSTR FilterString,
+ BSTR *pOutput,
+ long Flags);
+
+
+void __RPC_STUB IMediaLocator_FindMediaFile_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IMediaLocator_AddFoundLocation_Proxy(
+ IMediaLocator * This,
+ BSTR DirectoryName);
+
+
+void __RPC_STUB IMediaLocator_AddFoundLocation_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+
+#endif /* __IMediaLocator_INTERFACE_DEFINED__ */
+
+
+#ifndef __IMediaDet_INTERFACE_DEFINED__
+#define __IMediaDet_INTERFACE_DEFINED__
+
+/* interface IMediaDet */
+/* [unique][helpstring][uuid][object] */
+
+
+EXTERN_C const IID IID_IMediaDet;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("65BD0710-24D2-4ff7-9324-ED2E5D3ABAFA")
+ IMediaDet : public IUnknown
+ {
+ public:
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Filter(
+ /* [retval][out] */ IUnknown **pVal) = 0;
+
+ virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Filter(
+ /* [in] */ IUnknown *newVal) = 0;
+
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_OutputStreams(
+ /* [retval][out] */ long *pVal) = 0;
+
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_CurrentStream(
+ /* [retval][out] */ long *pVal) = 0;
+
+ virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_CurrentStream(
+ /* [in] */ long newVal) = 0;
+
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_StreamType(
+ /* [retval][out] */ GUID *pVal) = 0;
+
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_StreamTypeB(
+ /* [retval][out] */ BSTR *pVal) = 0;
+
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_StreamLength(
+ /* [retval][out] */ double *pVal) = 0;
+
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Filename(
+ /* [retval][out] */ BSTR *pVal) = 0;
+
+ virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Filename(
+ /* [in] */ BSTR newVal) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetBitmapBits(
+ double StreamTime,
+ long *pBufferSize,
+ char *pBuffer,
+ long Width,
+ long Height) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE WriteBitmapBits(
+ double StreamTime,
+ long Width,
+ long Height,
+ BSTR Filename) = 0;
+
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_StreamMediaType(
+ /* [retval][out] */ AM_MEDIA_TYPE *pVal) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSampleGrabber(
+ /* [out] */ ISampleGrabber **ppVal) = 0;
+
+ virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_FrameRate(
+ /* [retval][out] */ double *pVal) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE EnterBitmapGrabMode(
+ double SeekTime) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IMediaDetVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IMediaDet * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IMediaDet * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IMediaDet * This);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Filter )(
+ IMediaDet * This,
+ /* [retval][out] */ IUnknown **pVal);
+
+ /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Filter )(
+ IMediaDet * This,
+ /* [in] */ IUnknown *newVal);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_OutputStreams )(
+ IMediaDet * This,
+ /* [retval][out] */ long *pVal);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_CurrentStream )(
+ IMediaDet * This,
+ /* [retval][out] */ long *pVal);
+
+ /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_CurrentStream )(
+ IMediaDet * This,
+ /* [in] */ long newVal);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StreamType )(
+ IMediaDet * This,
+ /* [retval][out] */ GUID *pVal);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StreamTypeB )(
+ IMediaDet * This,
+ /* [retval][out] */ BSTR *pVal);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StreamLength )(
+ IMediaDet * This,
+ /* [retval][out] */ double *pVal);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Filename )(
+ IMediaDet * This,
+ /* [retval][out] */ BSTR *pVal);
+
+ /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Filename )(
+ IMediaDet * This,
+ /* [in] */ BSTR newVal);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetBitmapBits )(
+ IMediaDet * This,
+ double StreamTime,
+ long *pBufferSize,
+ char *pBuffer,
+ long Width,
+ long Height);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *WriteBitmapBits )(
+ IMediaDet * This,
+ double StreamTime,
+ long Width,
+ long Height,
+ BSTR Filename);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StreamMediaType )(
+ IMediaDet * This,
+ /* [retval][out] */ AM_MEDIA_TYPE *pVal);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSampleGrabber )(
+ IMediaDet * This,
+ /* [out] */ ISampleGrabber **ppVal);
+
+ /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_FrameRate )(
+ IMediaDet * This,
+ /* [retval][out] */ double *pVal);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *EnterBitmapGrabMode )(
+ IMediaDet * This,
+ double SeekTime);
+
+ END_INTERFACE
+ } IMediaDetVtbl;
+
+ interface IMediaDet
+ {
+ CONST_VTBL struct IMediaDetVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IMediaDet_QueryInterface(This,riid,ppvObject) \
+ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
+
+#define IMediaDet_AddRef(This) \
+ (This)->lpVtbl -> AddRef(This)
+
+#define IMediaDet_Release(This) \
+ (This)->lpVtbl -> Release(This)
+
+
+#define IMediaDet_get_Filter(This,pVal) \
+ (This)->lpVtbl -> get_Filter(This,pVal)
+
+#define IMediaDet_put_Filter(This,newVal) \
+ (This)->lpVtbl -> put_Filter(This,newVal)
+
+#define IMediaDet_get_OutputStreams(This,pVal) \
+ (This)->lpVtbl -> get_OutputStreams(This,pVal)
+
+#define IMediaDet_get_CurrentStream(This,pVal) \
+ (This)->lpVtbl -> get_CurrentStream(This,pVal)
+
+#define IMediaDet_put_CurrentStream(This,newVal) \
+ (This)->lpVtbl -> put_CurrentStream(This,newVal)
+
+#define IMediaDet_get_StreamType(This,pVal) \
+ (This)->lpVtbl -> get_StreamType(This,pVal)
+
+#define IMediaDet_get_StreamTypeB(This,pVal) \
+ (This)->lpVtbl -> get_StreamTypeB(This,pVal)
+
+#define IMediaDet_get_StreamLength(This,pVal) \
+ (This)->lpVtbl -> get_StreamLength(This,pVal)
+
+#define IMediaDet_get_Filename(This,pVal) \
+ (This)->lpVtbl -> get_Filename(This,pVal)
+
+#define IMediaDet_put_Filename(This,newVal) \
+ (This)->lpVtbl -> put_Filename(This,newVal)
+
+#define IMediaDet_GetBitmapBits(This,StreamTime,pBufferSize,pBuffer,Width,Height) \
+ (This)->lpVtbl -> GetBitmapBits(This,StreamTime,pBufferSize,pBuffer,Width,Height)
+
+#define IMediaDet_WriteBitmapBits(This,StreamTime,Width,Height,Filename) \
+ (This)->lpVtbl -> WriteBitmapBits(This,StreamTime,Width,Height,Filename)
+
+#define IMediaDet_get_StreamMediaType(This,pVal) \
+ (This)->lpVtbl -> get_StreamMediaType(This,pVal)
+
+#define IMediaDet_GetSampleGrabber(This,ppVal) \
+ (This)->lpVtbl -> GetSampleGrabber(This,ppVal)
+
+#define IMediaDet_get_FrameRate(This,pVal) \
+ (This)->lpVtbl -> get_FrameRate(This,pVal)
+
+#define IMediaDet_EnterBitmapGrabMode(This,SeekTime) \
+ (This)->lpVtbl -> EnterBitmapGrabMode(This,SeekTime)
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IMediaDet_get_Filter_Proxy(
+ IMediaDet * This,
+ /* [retval][out] */ IUnknown **pVal);
+
+
+void __RPC_STUB IMediaDet_get_Filter_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IMediaDet_put_Filter_Proxy(
+ IMediaDet * This,
+ /* [in] */ IUnknown *newVal);
+
+
+void __RPC_STUB IMediaDet_put_Filter_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IMediaDet_get_OutputStreams_Proxy(
+ IMediaDet * This,
+ /* [retval][out] */ long *pVal);
+
+
+void __RPC_STUB IMediaDet_get_OutputStreams_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IMediaDet_get_CurrentStream_Proxy(
+ IMediaDet * This,
+ /* [retval][out] */ long *pVal);
+
+
+void __RPC_STUB IMediaDet_get_CurrentStream_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IMediaDet_put_CurrentStream_Proxy(
+ IMediaDet * This,
+ /* [in] */ long newVal);
+
+
+void __RPC_STUB IMediaDet_put_CurrentStream_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IMediaDet_get_StreamType_Proxy(
+ IMediaDet * This,
+ /* [retval][out] */ GUID *pVal);
+
+
+void __RPC_STUB IMediaDet_get_StreamType_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IMediaDet_get_StreamTypeB_Proxy(
+ IMediaDet * This,
+ /* [retval][out] */ BSTR *pVal);
+
+
+void __RPC_STUB IMediaDet_get_StreamTypeB_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IMediaDet_get_StreamLength_Proxy(
+ IMediaDet * This,
+ /* [retval][out] */ double *pVal);
+
+
+void __RPC_STUB IMediaDet_get_StreamLength_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IMediaDet_get_Filename_Proxy(
+ IMediaDet * This,
+ /* [retval][out] */ BSTR *pVal);
+
+
+void __RPC_STUB IMediaDet_get_Filename_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IMediaDet_put_Filename_Proxy(
+ IMediaDet * This,
+ /* [in] */ BSTR newVal);
+
+
+void __RPC_STUB IMediaDet_put_Filename_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IMediaDet_GetBitmapBits_Proxy(
+ IMediaDet * This,
+ double StreamTime,
+ long *pBufferSize,
+ char *pBuffer,
+ long Width,
+ long Height);
+
+
+void __RPC_STUB IMediaDet_GetBitmapBits_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IMediaDet_WriteBitmapBits_Proxy(
+ IMediaDet * This,
+ double StreamTime,
+ long Width,
+ long Height,
+ BSTR Filename);
+
+
+void __RPC_STUB IMediaDet_WriteBitmapBits_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IMediaDet_get_StreamMediaType_Proxy(
+ IMediaDet * This,
+ /* [retval][out] */ AM_MEDIA_TYPE *pVal);
+
+
+void __RPC_STUB IMediaDet_get_StreamMediaType_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IMediaDet_GetSampleGrabber_Proxy(
+ IMediaDet * This,
+ /* [out] */ ISampleGrabber **ppVal);
+
+
+void __RPC_STUB IMediaDet_GetSampleGrabber_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IMediaDet_get_FrameRate_Proxy(
+ IMediaDet * This,
+ /* [retval][out] */ double *pVal);
+
+
+void __RPC_STUB IMediaDet_get_FrameRate_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IMediaDet_EnterBitmapGrabMode_Proxy(
+ IMediaDet * This,
+ double SeekTime);
+
+
+void __RPC_STUB IMediaDet_EnterBitmapGrabMode_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+
+#endif /* __IMediaDet_INTERFACE_DEFINED__ */
+
+
+#ifndef __IGrfCache_INTERFACE_DEFINED__
+#define __IGrfCache_INTERFACE_DEFINED__
+
+/* interface IGrfCache */
+/* [unique][helpstring][uuid][object] */
+
+
+EXTERN_C const IID IID_IGrfCache;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("AE9472BE-B0C3-11D2-8D24-00A0C9441E20")
+ IGrfCache : public IDispatch
+ {
+ public:
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE AddFilter(
+ IGrfCache *ChainedCache,
+ LONGLONG ID,
+ const IBaseFilter *pFilter,
+ LPCWSTR pName) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ConnectPins(
+ IGrfCache *ChainedCache,
+ LONGLONG PinID1,
+ const IPin *pPin1,
+ LONGLONG PinID2,
+ const IPin *pPin2) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetGraph(
+ const IGraphBuilder *pGraph) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE DoConnectionsNow( void) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IGrfCacheVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IGrfCache * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IGrfCache * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IGrfCache * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )(
+ IGrfCache * This,
+ /* [out] */ UINT *pctinfo);
+
+ HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )(
+ IGrfCache * This,
+ /* [in] */ UINT iTInfo,
+ /* [in] */ LCID lcid,
+ /* [out] */ ITypeInfo **ppTInfo);
+
+ HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )(
+ IGrfCache * This,
+ /* [in] */ REFIID riid,
+ /* [size_is][in] */ LPOLESTR *rgszNames,
+ /* [in] */ UINT cNames,
+ /* [in] */ LCID lcid,
+ /* [size_is][out] */ DISPID *rgDispId);
+
+ /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )(
+ IGrfCache * This,
+ /* [in] */ DISPID dispIdMember,
+ /* [in] */ REFIID riid,
+ /* [in] */ LCID lcid,
+ /* [in] */ WORD wFlags,
+ /* [out][in] */ DISPPARAMS *pDispParams,
+ /* [out] */ VARIANT *pVarResult,
+ /* [out] */ EXCEPINFO *pExcepInfo,
+ /* [out] */ UINT *puArgErr);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *AddFilter )(
+ IGrfCache * This,
+ IGrfCache *ChainedCache,
+ LONGLONG ID,
+ const IBaseFilter *pFilter,
+ LPCWSTR pName);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *ConnectPins )(
+ IGrfCache * This,
+ IGrfCache *ChainedCache,
+ LONGLONG PinID1,
+ const IPin *pPin1,
+ LONGLONG PinID2,
+ const IPin *pPin2);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetGraph )(
+ IGrfCache * This,
+ const IGraphBuilder *pGraph);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *DoConnectionsNow )(
+ IGrfCache * This);
+
+ END_INTERFACE
+ } IGrfCacheVtbl;
+
+ interface IGrfCache
+ {
+ CONST_VTBL struct IGrfCacheVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IGrfCache_QueryInterface(This,riid,ppvObject) \
+ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
+
+#define IGrfCache_AddRef(This) \
+ (This)->lpVtbl -> AddRef(This)
+
+#define IGrfCache_Release(This) \
+ (This)->lpVtbl -> Release(This)
+
+
+#define IGrfCache_GetTypeInfoCount(This,pctinfo) \
+ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo)
+
+#define IGrfCache_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \
+ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo)
+
+#define IGrfCache_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \
+ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
+
+#define IGrfCache_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \
+ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
+
+
+#define IGrfCache_AddFilter(This,ChainedCache,ID,pFilter,pName) \
+ (This)->lpVtbl -> AddFilter(This,ChainedCache,ID,pFilter,pName)
+
+#define IGrfCache_ConnectPins(This,ChainedCache,PinID1,pPin1,PinID2,pPin2) \
+ (This)->lpVtbl -> ConnectPins(This,ChainedCache,PinID1,pPin1,PinID2,pPin2)
+
+#define IGrfCache_SetGraph(This,pGraph) \
+ (This)->lpVtbl -> SetGraph(This,pGraph)
+
+#define IGrfCache_DoConnectionsNow(This) \
+ (This)->lpVtbl -> DoConnectionsNow(This)
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IGrfCache_AddFilter_Proxy(
+ IGrfCache * This,
+ IGrfCache *ChainedCache,
+ LONGLONG ID,
+ const IBaseFilter *pFilter,
+ LPCWSTR pName);
+
+
+void __RPC_STUB IGrfCache_AddFilter_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IGrfCache_ConnectPins_Proxy(
+ IGrfCache * This,
+ IGrfCache *ChainedCache,
+ LONGLONG PinID1,
+ const IPin *pPin1,
+ LONGLONG PinID2,
+ const IPin *pPin2);
+
+
+void __RPC_STUB IGrfCache_ConnectPins_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IGrfCache_SetGraph_Proxy(
+ IGrfCache * This,
+ const IGraphBuilder *pGraph);
+
+
+void __RPC_STUB IGrfCache_SetGraph_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IGrfCache_DoConnectionsNow_Proxy(
+ IGrfCache * This);
+
+
+void __RPC_STUB IGrfCache_DoConnectionsNow_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+
+#endif /* __IGrfCache_INTERFACE_DEFINED__ */
+
+
+#ifndef __IRenderEngine_INTERFACE_DEFINED__
+#define __IRenderEngine_INTERFACE_DEFINED__
+
+/* interface IRenderEngine */
+/* [unique][helpstring][uuid][object] */
+
+
+EXTERN_C const IID IID_IRenderEngine;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("6BEE3A81-66C9-11d2-918F-00C0DF10D434")
+ IRenderEngine : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE SetTimelineObject(
+ IAMTimeline *pTimeline) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetTimelineObject(
+ /* [out] */ IAMTimeline **ppTimeline) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetFilterGraph(
+ /* [out] */ IGraphBuilder **ppFG) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetFilterGraph(
+ IGraphBuilder *pFG) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetInterestRange(
+ REFERENCE_TIME Start,
+ REFERENCE_TIME Stop) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetInterestRange2(
+ double Start,
+ double Stop) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetRenderRange(
+ REFERENCE_TIME Start,
+ REFERENCE_TIME Stop) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetRenderRange2(
+ double Start,
+ double Stop) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetGroupOutputPin(
+ long Group,
+ /* [out] */ IPin **ppRenderPin) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE ScrapIt( void) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE RenderOutputPins( void) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetVendorString(
+ /* [retval][out] */ BSTR *pVendorID) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE ConnectFrontEnd( void) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetSourceConnectCallback(
+ IGrfCache *pCallback) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetDynamicReconnectLevel(
+ long Level) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE DoSmartRecompression( void) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE UseInSmartRecompressionGraph( void) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetSourceNameValidation(
+ BSTR FilterString,
+ IMediaLocator *pOverride,
+ LONG Flags) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Commit( void) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Decommit( void) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetCaps(
+ long Index,
+ long *pReturn) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IRenderEngineVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IRenderEngine * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IRenderEngine * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IRenderEngine * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetTimelineObject )(
+ IRenderEngine * This,
+ IAMTimeline *pTimeline);
+
+ HRESULT ( STDMETHODCALLTYPE *GetTimelineObject )(
+ IRenderEngine * This,
+ /* [out] */ IAMTimeline **ppTimeline);
+
+ HRESULT ( STDMETHODCALLTYPE *GetFilterGraph )(
+ IRenderEngine * This,
+ /* [out] */ IGraphBuilder **ppFG);
+
+ HRESULT ( STDMETHODCALLTYPE *SetFilterGraph )(
+ IRenderEngine * This,
+ IGraphBuilder *pFG);
+
+ HRESULT ( STDMETHODCALLTYPE *SetInterestRange )(
+ IRenderEngine * This,
+ REFERENCE_TIME Start,
+ REFERENCE_TIME Stop);
+
+ HRESULT ( STDMETHODCALLTYPE *SetInterestRange2 )(
+ IRenderEngine * This,
+ double Start,
+ double Stop);
+
+ HRESULT ( STDMETHODCALLTYPE *SetRenderRange )(
+ IRenderEngine * This,
+ REFERENCE_TIME Start,
+ REFERENCE_TIME Stop);
+
+ HRESULT ( STDMETHODCALLTYPE *SetRenderRange2 )(
+ IRenderEngine * This,
+ double Start,
+ double Stop);
+
+ HRESULT ( STDMETHODCALLTYPE *GetGroupOutputPin )(
+ IRenderEngine * This,
+ long Group,
+ /* [out] */ IPin **ppRenderPin);
+
+ HRESULT ( STDMETHODCALLTYPE *ScrapIt )(
+ IRenderEngine * This);
+
+ HRESULT ( STDMETHODCALLTYPE *RenderOutputPins )(
+ IRenderEngine * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetVendorString )(
+ IRenderEngine * This,
+ /* [retval][out] */ BSTR *pVendorID);
+
+ HRESULT ( STDMETHODCALLTYPE *ConnectFrontEnd )(
+ IRenderEngine * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetSourceConnectCallback )(
+ IRenderEngine * This,
+ IGrfCache *pCallback);
+
+ HRESULT ( STDMETHODCALLTYPE *SetDynamicReconnectLevel )(
+ IRenderEngine * This,
+ long Level);
+
+ HRESULT ( STDMETHODCALLTYPE *DoSmartRecompression )(
+ IRenderEngine * This);
+
+ HRESULT ( STDMETHODCALLTYPE *UseInSmartRecompressionGraph )(
+ IRenderEngine * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetSourceNameValidation )(
+ IRenderEngine * This,
+ BSTR FilterString,
+ IMediaLocator *pOverride,
+ LONG Flags);
+
+ HRESULT ( STDMETHODCALLTYPE *Commit )(
+ IRenderEngine * This);
+
+ HRESULT ( STDMETHODCALLTYPE *Decommit )(
+ IRenderEngine * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetCaps )(
+ IRenderEngine * This,
+ long Index,
+ long *pReturn);
+
+ END_INTERFACE
+ } IRenderEngineVtbl;
+
+ interface IRenderEngine
+ {
+ CONST_VTBL struct IRenderEngineVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IRenderEngine_QueryInterface(This,riid,ppvObject) \
+ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
+
+#define IRenderEngine_AddRef(This) \
+ (This)->lpVtbl -> AddRef(This)
+
+#define IRenderEngine_Release(This) \
+ (This)->lpVtbl -> Release(This)
+
+
+#define IRenderEngine_SetTimelineObject(This,pTimeline) \
+ (This)->lpVtbl -> SetTimelineObject(This,pTimeline)
+
+#define IRenderEngine_GetTimelineObject(This,ppTimeline) \
+ (This)->lpVtbl -> GetTimelineObject(This,ppTimeline)
+
+#define IRenderEngine_GetFilterGraph(This,ppFG) \
+ (This)->lpVtbl -> GetFilterGraph(This,ppFG)
+
+#define IRenderEngine_SetFilterGraph(This,pFG) \
+ (This)->lpVtbl -> SetFilterGraph(This,pFG)
+
+#define IRenderEngine_SetInterestRange(This,Start,Stop) \
+ (This)->lpVtbl -> SetInterestRange(This,Start,Stop)
+
+#define IRenderEngine_SetInterestRange2(This,Start,Stop) \
+ (This)->lpVtbl -> SetInterestRange2(This,Start,Stop)
+
+#define IRenderEngine_SetRenderRange(This,Start,Stop) \
+ (This)->lpVtbl -> SetRenderRange(This,Start,Stop)
+
+#define IRenderEngine_SetRenderRange2(This,Start,Stop) \
+ (This)->lpVtbl -> SetRenderRange2(This,Start,Stop)
+
+#define IRenderEngine_GetGroupOutputPin(This,Group,ppRenderPin) \
+ (This)->lpVtbl -> GetGroupOutputPin(This,Group,ppRenderPin)
+
+#define IRenderEngine_ScrapIt(This) \
+ (This)->lpVtbl -> ScrapIt(This)
+
+#define IRenderEngine_RenderOutputPins(This) \
+ (This)->lpVtbl -> RenderOutputPins(This)
+
+#define IRenderEngine_GetVendorString(This,pVendorID) \
+ (This)->lpVtbl -> GetVendorString(This,pVendorID)
+
+#define IRenderEngine_ConnectFrontEnd(This) \
+ (This)->lpVtbl -> ConnectFrontEnd(This)
+
+#define IRenderEngine_SetSourceConnectCallback(This,pCallback) \
+ (This)->lpVtbl -> SetSourceConnectCallback(This,pCallback)
+
+#define IRenderEngine_SetDynamicReconnectLevel(This,Level) \
+ (This)->lpVtbl -> SetDynamicReconnectLevel(This,Level)
+
+#define IRenderEngine_DoSmartRecompression(This) \
+ (This)->lpVtbl -> DoSmartRecompression(This)
+
+#define IRenderEngine_UseInSmartRecompressionGraph(This) \
+ (This)->lpVtbl -> UseInSmartRecompressionGraph(This)
+
+#define IRenderEngine_SetSourceNameValidation(This,FilterString,pOverride,Flags) \
+ (This)->lpVtbl -> SetSourceNameValidation(This,FilterString,pOverride,Flags)
+
+#define IRenderEngine_Commit(This) \
+ (This)->lpVtbl -> Commit(This)
+
+#define IRenderEngine_Decommit(This) \
+ (This)->lpVtbl -> Decommit(This)
+
+#define IRenderEngine_GetCaps(This,Index,pReturn) \
+ (This)->lpVtbl -> GetCaps(This,Index,pReturn)
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+HRESULT STDMETHODCALLTYPE IRenderEngine_SetTimelineObject_Proxy(
+ IRenderEngine * This,
+ IAMTimeline *pTimeline);
+
+
+void __RPC_STUB IRenderEngine_SetTimelineObject_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IRenderEngine_GetTimelineObject_Proxy(
+ IRenderEngine * This,
+ /* [out] */ IAMTimeline **ppTimeline);
+
+
+void __RPC_STUB IRenderEngine_GetTimelineObject_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IRenderEngine_GetFilterGraph_Proxy(
+ IRenderEngine * This,
+ /* [out] */ IGraphBuilder **ppFG);
+
+
+void __RPC_STUB IRenderEngine_GetFilterGraph_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IRenderEngine_SetFilterGraph_Proxy(
+ IRenderEngine * This,
+ IGraphBuilder *pFG);
+
+
+void __RPC_STUB IRenderEngine_SetFilterGraph_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IRenderEngine_SetInterestRange_Proxy(
+ IRenderEngine * This,
+ REFERENCE_TIME Start,
+ REFERENCE_TIME Stop);
+
+
+void __RPC_STUB IRenderEngine_SetInterestRange_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IRenderEngine_SetInterestRange2_Proxy(
+ IRenderEngine * This,
+ double Start,
+ double Stop);
+
+
+void __RPC_STUB IRenderEngine_SetInterestRange2_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IRenderEngine_SetRenderRange_Proxy(
+ IRenderEngine * This,
+ REFERENCE_TIME Start,
+ REFERENCE_TIME Stop);
+
+
+void __RPC_STUB IRenderEngine_SetRenderRange_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IRenderEngine_SetRenderRange2_Proxy(
+ IRenderEngine * This,
+ double Start,
+ double Stop);
+
+
+void __RPC_STUB IRenderEngine_SetRenderRange2_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IRenderEngine_GetGroupOutputPin_Proxy(
+ IRenderEngine * This,
+ long Group,
+ /* [out] */ IPin **ppRenderPin);
+
+
+void __RPC_STUB IRenderEngine_GetGroupOutputPin_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IRenderEngine_ScrapIt_Proxy(
+ IRenderEngine * This);
+
+
+void __RPC_STUB IRenderEngine_ScrapIt_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IRenderEngine_RenderOutputPins_Proxy(
+ IRenderEngine * This);
+
+
+void __RPC_STUB IRenderEngine_RenderOutputPins_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IRenderEngine_GetVendorString_Proxy(
+ IRenderEngine * This,
+ /* [retval][out] */ BSTR *pVendorID);
+
+
+void __RPC_STUB IRenderEngine_GetVendorString_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IRenderEngine_ConnectFrontEnd_Proxy(
+ IRenderEngine * This);
+
+
+void __RPC_STUB IRenderEngine_ConnectFrontEnd_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IRenderEngine_SetSourceConnectCallback_Proxy(
+ IRenderEngine * This,
+ IGrfCache *pCallback);
+
+
+void __RPC_STUB IRenderEngine_SetSourceConnectCallback_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IRenderEngine_SetDynamicReconnectLevel_Proxy(
+ IRenderEngine * This,
+ long Level);
+
+
+void __RPC_STUB IRenderEngine_SetDynamicReconnectLevel_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IRenderEngine_DoSmartRecompression_Proxy(
+ IRenderEngine * This);
+
+
+void __RPC_STUB IRenderEngine_DoSmartRecompression_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IRenderEngine_UseInSmartRecompressionGraph_Proxy(
+ IRenderEngine * This);
+
+
+void __RPC_STUB IRenderEngine_UseInSmartRecompressionGraph_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IRenderEngine_SetSourceNameValidation_Proxy(
+ IRenderEngine * This,
+ BSTR FilterString,
+ IMediaLocator *pOverride,
+ LONG Flags);
+
+
+void __RPC_STUB IRenderEngine_SetSourceNameValidation_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IRenderEngine_Commit_Proxy(
+ IRenderEngine * This);
+
+
+void __RPC_STUB IRenderEngine_Commit_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IRenderEngine_Decommit_Proxy(
+ IRenderEngine * This);
+
+
+void __RPC_STUB IRenderEngine_Decommit_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IRenderEngine_GetCaps_Proxy(
+ IRenderEngine * This,
+ long Index,
+ long *pReturn);
+
+
+void __RPC_STUB IRenderEngine_GetCaps_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+
+#endif /* __IRenderEngine_INTERFACE_DEFINED__ */
+
+
+#ifndef __IFindCompressorCB_INTERFACE_DEFINED__
+#define __IFindCompressorCB_INTERFACE_DEFINED__
+
+/* interface IFindCompressorCB */
+/* [unique][helpstring][uuid][object] */
+
+
+EXTERN_C const IID IID_IFindCompressorCB;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("F03FA8DE-879A-4d59-9B2C-26BB1CF83461")
+ IFindCompressorCB : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE GetCompressor(
+ AM_MEDIA_TYPE *pType,
+ AM_MEDIA_TYPE *pCompType,
+ /* [out] */ IBaseFilter **ppFilter) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IFindCompressorCBVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IFindCompressorCB * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IFindCompressorCB * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IFindCompressorCB * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetCompressor )(
+ IFindCompressorCB * This,
+ AM_MEDIA_TYPE *pType,
+ AM_MEDIA_TYPE *pCompType,
+ /* [out] */ IBaseFilter **ppFilter);
+
+ END_INTERFACE
+ } IFindCompressorCBVtbl;
+
+ interface IFindCompressorCB
+ {
+ CONST_VTBL struct IFindCompressorCBVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IFindCompressorCB_QueryInterface(This,riid,ppvObject) \
+ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
+
+#define IFindCompressorCB_AddRef(This) \
+ (This)->lpVtbl -> AddRef(This)
+
+#define IFindCompressorCB_Release(This) \
+ (This)->lpVtbl -> Release(This)
+
+
+#define IFindCompressorCB_GetCompressor(This,pType,pCompType,ppFilter) \
+ (This)->lpVtbl -> GetCompressor(This,pType,pCompType,ppFilter)
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+HRESULT STDMETHODCALLTYPE IFindCompressorCB_GetCompressor_Proxy(
+ IFindCompressorCB * This,
+ AM_MEDIA_TYPE *pType,
+ AM_MEDIA_TYPE *pCompType,
+ /* [out] */ IBaseFilter **ppFilter);
+
+
+void __RPC_STUB IFindCompressorCB_GetCompressor_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+
+#endif /* __IFindCompressorCB_INTERFACE_DEFINED__ */
+
+
+#ifndef __ISmartRenderEngine_INTERFACE_DEFINED__
+#define __ISmartRenderEngine_INTERFACE_DEFINED__
+
+/* interface ISmartRenderEngine */
+/* [unique][helpstring][uuid][object] */
+
+
+EXTERN_C const IID IID_ISmartRenderEngine;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("F03FA8CE-879A-4d59-9B2C-26BB1CF83461")
+ ISmartRenderEngine : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE SetGroupCompressor(
+ long Group,
+ IBaseFilter *pCompressor) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetGroupCompressor(
+ long Group,
+ IBaseFilter **pCompressor) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetFindCompressorCB(
+ IFindCompressorCB *pCallback) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct ISmartRenderEngineVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ ISmartRenderEngine * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ ISmartRenderEngine * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ ISmartRenderEngine * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetGroupCompressor )(
+ ISmartRenderEngine * This,
+ long Group,
+ IBaseFilter *pCompressor);
+
+ HRESULT ( STDMETHODCALLTYPE *GetGroupCompressor )(
+ ISmartRenderEngine * This,
+ long Group,
+ IBaseFilter **pCompressor);
+
+ HRESULT ( STDMETHODCALLTYPE *SetFindCompressorCB )(
+ ISmartRenderEngine * This,
+ IFindCompressorCB *pCallback);
+
+ END_INTERFACE
+ } ISmartRenderEngineVtbl;
+
+ interface ISmartRenderEngine
+ {
+ CONST_VTBL struct ISmartRenderEngineVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define ISmartRenderEngine_QueryInterface(This,riid,ppvObject) \
+ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
+
+#define ISmartRenderEngine_AddRef(This) \
+ (This)->lpVtbl -> AddRef(This)
+
+#define ISmartRenderEngine_Release(This) \
+ (This)->lpVtbl -> Release(This)
+
+
+#define ISmartRenderEngine_SetGroupCompressor(This,Group,pCompressor) \
+ (This)->lpVtbl -> SetGroupCompressor(This,Group,pCompressor)
+
+#define ISmartRenderEngine_GetGroupCompressor(This,Group,pCompressor) \
+ (This)->lpVtbl -> GetGroupCompressor(This,Group,pCompressor)
+
+#define ISmartRenderEngine_SetFindCompressorCB(This,pCallback) \
+ (This)->lpVtbl -> SetFindCompressorCB(This,pCallback)
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+HRESULT STDMETHODCALLTYPE ISmartRenderEngine_SetGroupCompressor_Proxy(
+ ISmartRenderEngine * This,
+ long Group,
+ IBaseFilter *pCompressor);
+
+
+void __RPC_STUB ISmartRenderEngine_SetGroupCompressor_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE ISmartRenderEngine_GetGroupCompressor_Proxy(
+ ISmartRenderEngine * This,
+ long Group,
+ IBaseFilter **pCompressor);
+
+
+void __RPC_STUB ISmartRenderEngine_GetGroupCompressor_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE ISmartRenderEngine_SetFindCompressorCB_Proxy(
+ ISmartRenderEngine * This,
+ IFindCompressorCB *pCallback);
+
+
+void __RPC_STUB ISmartRenderEngine_SetFindCompressorCB_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+
+#endif /* __ISmartRenderEngine_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAMTimelineObj_INTERFACE_DEFINED__
+#define __IAMTimelineObj_INTERFACE_DEFINED__
+
+/* interface IAMTimelineObj */
+/* [unique][helpstring][uuid][local][object] */
+
+
+EXTERN_C const IID IID_IAMTimelineObj;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("78530B77-61F9-11D2-8CAD-00A024580902")
+ IAMTimelineObj : public IUnknown
+ {
+ public:
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetStartStop(
+ REFERENCE_TIME *pStart,
+ REFERENCE_TIME *pStop) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetStartStop2(
+ REFTIME *pStart,
+ REFTIME *pStop) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE FixTimes(
+ REFERENCE_TIME *pStart,
+ REFERENCE_TIME *pStop) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE FixTimes2(
+ REFTIME *pStart,
+ REFTIME *pStop) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetStartStop(
+ REFERENCE_TIME Start,
+ REFERENCE_TIME Stop) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetStartStop2(
+ REFTIME Start,
+ REFTIME Stop) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetPropertySetter(
+ /* [retval][out] */ IPropertySetter **pVal) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetPropertySetter(
+ IPropertySetter *newVal) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetSubObject(
+ /* [retval][out] */ IUnknown **pVal) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetSubObject(
+ IUnknown *newVal) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetSubObjectGUID(
+ GUID newVal) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetSubObjectGUIDB(
+ BSTR newVal) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetSubObjectGUID(
+ GUID *pVal) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetSubObjectGUIDB(
+ /* [retval][out] */ BSTR *pVal) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetSubObjectLoaded(
+ BOOL *pVal) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetTimelineType(
+ TIMELINE_MAJOR_TYPE *pVal) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetTimelineType(
+ TIMELINE_MAJOR_TYPE newVal) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetUserID(
+ long *pVal) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetUserID(
+ long newVal) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetGenID(
+ long *pVal) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetUserName(
+ /* [retval][out] */ BSTR *pVal) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetUserName(
+ BSTR newVal) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetUserData(
+ BYTE *pData,
+ long *pSize) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetUserData(
+ BYTE *pData,
+ long Size) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMuted(
+ BOOL *pVal) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMuted(
+ BOOL newVal) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetLocked(
+ BOOL *pVal) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetLocked(
+ BOOL newVal) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetDirtyRange(
+ REFERENCE_TIME *pStart,
+ REFERENCE_TIME *pStop) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetDirtyRange2(
+ REFTIME *pStart,
+ REFTIME *pStop) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetDirtyRange(
+ REFERENCE_TIME Start,
+ REFERENCE_TIME Stop) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetDirtyRange2(
+ REFTIME Start,
+ REFTIME Stop) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE ClearDirty( void) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE Remove( void) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE RemoveAll( void) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetTimelineNoRef(
+ IAMTimeline **ppResult) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetGroupIBelongTo(
+ /* [out] */ IAMTimelineGroup **ppGroup) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetEmbedDepth(
+ long *pVal) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IAMTimelineObjVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IAMTimelineObj * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IAMTimelineObj * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IAMTimelineObj * This);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetStartStop )(
+ IAMTimelineObj * This,
+ REFERENCE_TIME *pStart,
+ REFERENCE_TIME *pStop);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetStartStop2 )(
+ IAMTimelineObj * This,
+ REFTIME *pStart,
+ REFTIME *pStop);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *FixTimes )(
+ IAMTimelineObj * This,
+ REFERENCE_TIME *pStart,
+ REFERENCE_TIME *pStop);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *FixTimes2 )(
+ IAMTimelineObj * This,
+ REFTIME *pStart,
+ REFTIME *pStop);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetStartStop )(
+ IAMTimelineObj * This,
+ REFERENCE_TIME Start,
+ REFERENCE_TIME Stop);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetStartStop2 )(
+ IAMTimelineObj * This,
+ REFTIME Start,
+ REFTIME Stop);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetPropertySetter )(
+ IAMTimelineObj * This,
+ /* [retval][out] */ IPropertySetter **pVal);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetPropertySetter )(
+ IAMTimelineObj * This,
+ IPropertySetter *newVal);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetSubObject )(
+ IAMTimelineObj * This,
+ /* [retval][out] */ IUnknown **pVal);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetSubObject )(
+ IAMTimelineObj * This,
+ IUnknown *newVal);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetSubObjectGUID )(
+ IAMTimelineObj * This,
+ GUID newVal);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetSubObjectGUIDB )(
+ IAMTimelineObj * This,
+ BSTR newVal);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetSubObjectGUID )(
+ IAMTimelineObj * This,
+ GUID *pVal);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetSubObjectGUIDB )(
+ IAMTimelineObj * This,
+ /* [retval][out] */ BSTR *pVal);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetSubObjectLoaded )(
+ IAMTimelineObj * This,
+ BOOL *pVal);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetTimelineType )(
+ IAMTimelineObj * This,
+ TIMELINE_MAJOR_TYPE *pVal);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetTimelineType )(
+ IAMTimelineObj * This,
+ TIMELINE_MAJOR_TYPE newVal);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetUserID )(
+ IAMTimelineObj * This,
+ long *pVal);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetUserID )(
+ IAMTimelineObj * This,
+ long newVal);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetGenID )(
+ IAMTimelineObj * This,
+ long *pVal);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetUserName )(
+ IAMTimelineObj * This,
+ /* [retval][out] */ BSTR *pVal);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetUserName )(
+ IAMTimelineObj * This,
+ BSTR newVal);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetUserData )(
+ IAMTimelineObj * This,
+ BYTE *pData,
+ long *pSize);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetUserData )(
+ IAMTimelineObj * This,
+ BYTE *pData,
+ long Size);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMuted )(
+ IAMTimelineObj * This,
+ BOOL *pVal);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetMuted )(
+ IAMTimelineObj * This,
+ BOOL newVal);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetLocked )(
+ IAMTimelineObj * This,
+ BOOL *pVal);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetLocked )(
+ IAMTimelineObj * This,
+ BOOL newVal);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetDirtyRange )(
+ IAMTimelineObj * This,
+ REFERENCE_TIME *pStart,
+ REFERENCE_TIME *pStop);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetDirtyRange2 )(
+ IAMTimelineObj * This,
+ REFTIME *pStart,
+ REFTIME *pStop);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetDirtyRange )(
+ IAMTimelineObj * This,
+ REFERENCE_TIME Start,
+ REFERENCE_TIME Stop);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetDirtyRange2 )(
+ IAMTimelineObj * This,
+ REFTIME Start,
+ REFTIME Stop);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *ClearDirty )(
+ IAMTimelineObj * This);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *Remove )(
+ IAMTimelineObj * This);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *RemoveAll )(
+ IAMTimelineObj * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetTimelineNoRef )(
+ IAMTimelineObj * This,
+ IAMTimeline **ppResult);
+
+ HRESULT ( STDMETHODCALLTYPE *GetGroupIBelongTo )(
+ IAMTimelineObj * This,
+ /* [out] */ IAMTimelineGroup **ppGroup);
+
+ HRESULT ( STDMETHODCALLTYPE *GetEmbedDepth )(
+ IAMTimelineObj * This,
+ long *pVal);
+
+ END_INTERFACE
+ } IAMTimelineObjVtbl;
+
+ interface IAMTimelineObj
+ {
+ CONST_VTBL struct IAMTimelineObjVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IAMTimelineObj_QueryInterface(This,riid,ppvObject) \
+ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
+
+#define IAMTimelineObj_AddRef(This) \
+ (This)->lpVtbl -> AddRef(This)
+
+#define IAMTimelineObj_Release(This) \
+ (This)->lpVtbl -> Release(This)
+
+
+#define IAMTimelineObj_GetStartStop(This,pStart,pStop) \
+ (This)->lpVtbl -> GetStartStop(This,pStart,pStop)
+
+#define IAMTimelineObj_GetStartStop2(This,pStart,pStop) \
+ (This)->lpVtbl -> GetStartStop2(This,pStart,pStop)
+
+#define IAMTimelineObj_FixTimes(This,pStart,pStop) \
+ (This)->lpVtbl -> FixTimes(This,pStart,pStop)
+
+#define IAMTimelineObj_FixTimes2(This,pStart,pStop) \
+ (This)->lpVtbl -> FixTimes2(This,pStart,pStop)
+
+#define IAMTimelineObj_SetStartStop(This,Start,Stop) \
+ (This)->lpVtbl -> SetStartStop(This,Start,Stop)
+
+#define IAMTimelineObj_SetStartStop2(This,Start,Stop) \
+ (This)->lpVtbl -> SetStartStop2(This,Start,Stop)
+
+#define IAMTimelineObj_GetPropertySetter(This,pVal) \
+ (This)->lpVtbl -> GetPropertySetter(This,pVal)
+
+#define IAMTimelineObj_SetPropertySetter(This,newVal) \
+ (This)->lpVtbl -> SetPropertySetter(This,newVal)
+
+#define IAMTimelineObj_GetSubObject(This,pVal) \
+ (This)->lpVtbl -> GetSubObject(This,pVal)
+
+#define IAMTimelineObj_SetSubObject(This,newVal) \
+ (This)->lpVtbl -> SetSubObject(This,newVal)
+
+#define IAMTimelineObj_SetSubObjectGUID(This,newVal) \
+ (This)->lpVtbl -> SetSubObjectGUID(This,newVal)
+
+#define IAMTimelineObj_SetSubObjectGUIDB(This,newVal) \
+ (This)->lpVtbl -> SetSubObjectGUIDB(This,newVal)
+
+#define IAMTimelineObj_GetSubObjectGUID(This,pVal) \
+ (This)->lpVtbl -> GetSubObjectGUID(This,pVal)
+
+#define IAMTimelineObj_GetSubObjectGUIDB(This,pVal) \
+ (This)->lpVtbl -> GetSubObjectGUIDB(This,pVal)
+
+#define IAMTimelineObj_GetSubObjectLoaded(This,pVal) \
+ (This)->lpVtbl -> GetSubObjectLoaded(This,pVal)
+
+#define IAMTimelineObj_GetTimelineType(This,pVal) \
+ (This)->lpVtbl -> GetTimelineType(This,pVal)
+
+#define IAMTimelineObj_SetTimelineType(This,newVal) \
+ (This)->lpVtbl -> SetTimelineType(This,newVal)
+
+#define IAMTimelineObj_GetUserID(This,pVal) \
+ (This)->lpVtbl -> GetUserID(This,pVal)
+
+#define IAMTimelineObj_SetUserID(This,newVal) \
+ (This)->lpVtbl -> SetUserID(This,newVal)
+
+#define IAMTimelineObj_GetGenID(This,pVal) \
+ (This)->lpVtbl -> GetGenID(This,pVal)
+
+#define IAMTimelineObj_GetUserName(This,pVal) \
+ (This)->lpVtbl -> GetUserName(This,pVal)
+
+#define IAMTimelineObj_SetUserName(This,newVal) \
+ (This)->lpVtbl -> SetUserName(This,newVal)
+
+#define IAMTimelineObj_GetUserData(This,pData,pSize) \
+ (This)->lpVtbl -> GetUserData(This,pData,pSize)
+
+#define IAMTimelineObj_SetUserData(This,pData,Size) \
+ (This)->lpVtbl -> SetUserData(This,pData,Size)
+
+#define IAMTimelineObj_GetMuted(This,pVal) \
+ (This)->lpVtbl -> GetMuted(This,pVal)
+
+#define IAMTimelineObj_SetMuted(This,newVal) \
+ (This)->lpVtbl -> SetMuted(This,newVal)
+
+#define IAMTimelineObj_GetLocked(This,pVal) \
+ (This)->lpVtbl -> GetLocked(This,pVal)
+
+#define IAMTimelineObj_SetLocked(This,newVal) \
+ (This)->lpVtbl -> SetLocked(This,newVal)
+
+#define IAMTimelineObj_GetDirtyRange(This,pStart,pStop) \
+ (This)->lpVtbl -> GetDirtyRange(This,pStart,pStop)
+
+#define IAMTimelineObj_GetDirtyRange2(This,pStart,pStop) \
+ (This)->lpVtbl -> GetDirtyRange2(This,pStart,pStop)
+
+#define IAMTimelineObj_SetDirtyRange(This,Start,Stop) \
+ (This)->lpVtbl -> SetDirtyRange(This,Start,Stop)
+
+#define IAMTimelineObj_SetDirtyRange2(This,Start,Stop) \
+ (This)->lpVtbl -> SetDirtyRange2(This,Start,Stop)
+
+#define IAMTimelineObj_ClearDirty(This) \
+ (This)->lpVtbl -> ClearDirty(This)
+
+#define IAMTimelineObj_Remove(This) \
+ (This)->lpVtbl -> Remove(This)
+
+#define IAMTimelineObj_RemoveAll(This) \
+ (This)->lpVtbl -> RemoveAll(This)
+
+#define IAMTimelineObj_GetTimelineNoRef(This,ppResult) \
+ (This)->lpVtbl -> GetTimelineNoRef(This,ppResult)
+
+#define IAMTimelineObj_GetGroupIBelongTo(This,ppGroup) \
+ (This)->lpVtbl -> GetGroupIBelongTo(This,ppGroup)
+
+#define IAMTimelineObj_GetEmbedDepth(This,pVal) \
+ (This)->lpVtbl -> GetEmbedDepth(This,pVal)
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetStartStop_Proxy(
+ IAMTimelineObj * This,
+ REFERENCE_TIME *pStart,
+ REFERENCE_TIME *pStop);
+
+
+void __RPC_STUB IAMTimelineObj_GetStartStop_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetStartStop2_Proxy(
+ IAMTimelineObj * This,
+ REFTIME *pStart,
+ REFTIME *pStop);
+
+
+void __RPC_STUB IAMTimelineObj_GetStartStop2_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_FixTimes_Proxy(
+ IAMTimelineObj * This,
+ REFERENCE_TIME *pStart,
+ REFERENCE_TIME *pStop);
+
+
+void __RPC_STUB IAMTimelineObj_FixTimes_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_FixTimes2_Proxy(
+ IAMTimelineObj * This,
+ REFTIME *pStart,
+ REFTIME *pStop);
+
+
+void __RPC_STUB IAMTimelineObj_FixTimes2_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_SetStartStop_Proxy(
+ IAMTimelineObj * This,
+ REFERENCE_TIME Start,
+ REFERENCE_TIME Stop);
+
+
+void __RPC_STUB IAMTimelineObj_SetStartStop_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_SetStartStop2_Proxy(
+ IAMTimelineObj * This,
+ REFTIME Start,
+ REFTIME Stop);
+
+
+void __RPC_STUB IAMTimelineObj_SetStartStop2_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetPropertySetter_Proxy(
+ IAMTimelineObj * This,
+ /* [retval][out] */ IPropertySetter **pVal);
+
+
+void __RPC_STUB IAMTimelineObj_GetPropertySetter_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_SetPropertySetter_Proxy(
+ IAMTimelineObj * This,
+ IPropertySetter *newVal);
+
+
+void __RPC_STUB IAMTimelineObj_SetPropertySetter_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetSubObject_Proxy(
+ IAMTimelineObj * This,
+ /* [retval][out] */ IUnknown **pVal);
+
+
+void __RPC_STUB IAMTimelineObj_GetSubObject_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_SetSubObject_Proxy(
+ IAMTimelineObj * This,
+ IUnknown *newVal);
+
+
+void __RPC_STUB IAMTimelineObj_SetSubObject_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_SetSubObjectGUID_Proxy(
+ IAMTimelineObj * This,
+ GUID newVal);
+
+
+void __RPC_STUB IAMTimelineObj_SetSubObjectGUID_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_SetSubObjectGUIDB_Proxy(
+ IAMTimelineObj * This,
+ BSTR newVal);
+
+
+void __RPC_STUB IAMTimelineObj_SetSubObjectGUIDB_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetSubObjectGUID_Proxy(
+ IAMTimelineObj * This,
+ GUID *pVal);
+
+
+void __RPC_STUB IAMTimelineObj_GetSubObjectGUID_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetSubObjectGUIDB_Proxy(
+ IAMTimelineObj * This,
+ /* [retval][out] */ BSTR *pVal);
+
+
+void __RPC_STUB IAMTimelineObj_GetSubObjectGUIDB_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetSubObjectLoaded_Proxy(
+ IAMTimelineObj * This,
+ BOOL *pVal);
+
+
+void __RPC_STUB IAMTimelineObj_GetSubObjectLoaded_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetTimelineType_Proxy(
+ IAMTimelineObj * This,
+ TIMELINE_MAJOR_TYPE *pVal);
+
+
+void __RPC_STUB IAMTimelineObj_GetTimelineType_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_SetTimelineType_Proxy(
+ IAMTimelineObj * This,
+ TIMELINE_MAJOR_TYPE newVal);
+
+
+void __RPC_STUB IAMTimelineObj_SetTimelineType_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetUserID_Proxy(
+ IAMTimelineObj * This,
+ long *pVal);
+
+
+void __RPC_STUB IAMTimelineObj_GetUserID_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_SetUserID_Proxy(
+ IAMTimelineObj * This,
+ long newVal);
+
+
+void __RPC_STUB IAMTimelineObj_SetUserID_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetGenID_Proxy(
+ IAMTimelineObj * This,
+ long *pVal);
+
+
+void __RPC_STUB IAMTimelineObj_GetGenID_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetUserName_Proxy(
+ IAMTimelineObj * This,
+ /* [retval][out] */ BSTR *pVal);
+
+
+void __RPC_STUB IAMTimelineObj_GetUserName_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_SetUserName_Proxy(
+ IAMTimelineObj * This,
+ BSTR newVal);
+
+
+void __RPC_STUB IAMTimelineObj_SetUserName_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetUserData_Proxy(
+ IAMTimelineObj * This,
+ BYTE *pData,
+ long *pSize);
+
+
+void __RPC_STUB IAMTimelineObj_GetUserData_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_SetUserData_Proxy(
+ IAMTimelineObj * This,
+ BYTE *pData,
+ long Size);
+
+
+void __RPC_STUB IAMTimelineObj_SetUserData_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetMuted_Proxy(
+ IAMTimelineObj * This,
+ BOOL *pVal);
+
+
+void __RPC_STUB IAMTimelineObj_GetMuted_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_SetMuted_Proxy(
+ IAMTimelineObj * This,
+ BOOL newVal);
+
+
+void __RPC_STUB IAMTimelineObj_SetMuted_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetLocked_Proxy(
+ IAMTimelineObj * This,
+ BOOL *pVal);
+
+
+void __RPC_STUB IAMTimelineObj_GetLocked_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_SetLocked_Proxy(
+ IAMTimelineObj * This,
+ BOOL newVal);
+
+
+void __RPC_STUB IAMTimelineObj_SetLocked_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetDirtyRange_Proxy(
+ IAMTimelineObj * This,
+ REFERENCE_TIME *pStart,
+ REFERENCE_TIME *pStop);
+
+
+void __RPC_STUB IAMTimelineObj_GetDirtyRange_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetDirtyRange2_Proxy(
+ IAMTimelineObj * This,
+ REFTIME *pStart,
+ REFTIME *pStop);
+
+
+void __RPC_STUB IAMTimelineObj_GetDirtyRange2_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_SetDirtyRange_Proxy(
+ IAMTimelineObj * This,
+ REFERENCE_TIME Start,
+ REFERENCE_TIME Stop);
+
+
+void __RPC_STUB IAMTimelineObj_SetDirtyRange_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_SetDirtyRange2_Proxy(
+ IAMTimelineObj * This,
+ REFTIME Start,
+ REFTIME Stop);
+
+
+void __RPC_STUB IAMTimelineObj_SetDirtyRange2_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_ClearDirty_Proxy(
+ IAMTimelineObj * This);
+
+
+void __RPC_STUB IAMTimelineObj_ClearDirty_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_Remove_Proxy(
+ IAMTimelineObj * This);
+
+
+void __RPC_STUB IAMTimelineObj_Remove_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_RemoveAll_Proxy(
+ IAMTimelineObj * This);
+
+
+void __RPC_STUB IAMTimelineObj_RemoveAll_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetTimelineNoRef_Proxy(
+ IAMTimelineObj * This,
+ IAMTimeline **ppResult);
+
+
+void __RPC_STUB IAMTimelineObj_GetTimelineNoRef_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetGroupIBelongTo_Proxy(
+ IAMTimelineObj * This,
+ /* [out] */ IAMTimelineGroup **ppGroup);
+
+
+void __RPC_STUB IAMTimelineObj_GetGroupIBelongTo_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetEmbedDepth_Proxy(
+ IAMTimelineObj * This,
+ long *pVal);
+
+
+void __RPC_STUB IAMTimelineObj_GetEmbedDepth_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+
+#endif /* __IAMTimelineObj_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAMTimelineEffectable_INTERFACE_DEFINED__
+#define __IAMTimelineEffectable_INTERFACE_DEFINED__
+
+/* interface IAMTimelineEffectable */
+/* [unique][helpstring][uuid][object] */
+
+
+EXTERN_C const IID IID_IAMTimelineEffectable;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("EAE58537-622E-11d2-8CAD-00A024580902")
+ IAMTimelineEffectable : public IUnknown
+ {
+ public:
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE EffectInsBefore(
+ IAMTimelineObj *pFX,
+ long priority) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE EffectSwapPriorities(
+ long PriorityA,
+ long PriorityB) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE EffectGetCount(
+ long *pCount) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetEffect(
+ /* [out] */ IAMTimelineObj **ppFx,
+ long Which) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IAMTimelineEffectableVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IAMTimelineEffectable * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IAMTimelineEffectable * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IAMTimelineEffectable * This);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *EffectInsBefore )(
+ IAMTimelineEffectable * This,
+ IAMTimelineObj *pFX,
+ long priority);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *EffectSwapPriorities )(
+ IAMTimelineEffectable * This,
+ long PriorityA,
+ long PriorityB);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *EffectGetCount )(
+ IAMTimelineEffectable * This,
+ long *pCount);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetEffect )(
+ IAMTimelineEffectable * This,
+ /* [out] */ IAMTimelineObj **ppFx,
+ long Which);
+
+ END_INTERFACE
+ } IAMTimelineEffectableVtbl;
+
+ interface IAMTimelineEffectable
+ {
+ CONST_VTBL struct IAMTimelineEffectableVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IAMTimelineEffectable_QueryInterface(This,riid,ppvObject) \
+ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
+
+#define IAMTimelineEffectable_AddRef(This) \
+ (This)->lpVtbl -> AddRef(This)
+
+#define IAMTimelineEffectable_Release(This) \
+ (This)->lpVtbl -> Release(This)
+
+
+#define IAMTimelineEffectable_EffectInsBefore(This,pFX,priority) \
+ (This)->lpVtbl -> EffectInsBefore(This,pFX,priority)
+
+#define IAMTimelineEffectable_EffectSwapPriorities(This,PriorityA,PriorityB) \
+ (This)->lpVtbl -> EffectSwapPriorities(This,PriorityA,PriorityB)
+
+#define IAMTimelineEffectable_EffectGetCount(This,pCount) \
+ (This)->lpVtbl -> EffectGetCount(This,pCount)
+
+#define IAMTimelineEffectable_GetEffect(This,ppFx,Which) \
+ (This)->lpVtbl -> GetEffect(This,ppFx,Which)
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineEffectable_EffectInsBefore_Proxy(
+ IAMTimelineEffectable * This,
+ IAMTimelineObj *pFX,
+ long priority);
+
+
+void __RPC_STUB IAMTimelineEffectable_EffectInsBefore_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineEffectable_EffectSwapPriorities_Proxy(
+ IAMTimelineEffectable * This,
+ long PriorityA,
+ long PriorityB);
+
+
+void __RPC_STUB IAMTimelineEffectable_EffectSwapPriorities_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineEffectable_EffectGetCount_Proxy(
+ IAMTimelineEffectable * This,
+ long *pCount);
+
+
+void __RPC_STUB IAMTimelineEffectable_EffectGetCount_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineEffectable_GetEffect_Proxy(
+ IAMTimelineEffectable * This,
+ /* [out] */ IAMTimelineObj **ppFx,
+ long Which);
+
+
+void __RPC_STUB IAMTimelineEffectable_GetEffect_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+
+#endif /* __IAMTimelineEffectable_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAMTimelineEffect_INTERFACE_DEFINED__
+#define __IAMTimelineEffect_INTERFACE_DEFINED__
+
+/* interface IAMTimelineEffect */
+/* [unique][helpstring][uuid][object] */
+
+
+EXTERN_C const IID IID_IAMTimelineEffect;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("BCE0C264-622D-11d2-8CAD-00A024580902")
+ IAMTimelineEffect : public IUnknown
+ {
+ public:
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE EffectGetPriority(
+ long *pVal) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IAMTimelineEffectVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IAMTimelineEffect * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IAMTimelineEffect * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IAMTimelineEffect * This);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *EffectGetPriority )(
+ IAMTimelineEffect * This,
+ long *pVal);
+
+ END_INTERFACE
+ } IAMTimelineEffectVtbl;
+
+ interface IAMTimelineEffect
+ {
+ CONST_VTBL struct IAMTimelineEffectVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IAMTimelineEffect_QueryInterface(This,riid,ppvObject) \
+ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
+
+#define IAMTimelineEffect_AddRef(This) \
+ (This)->lpVtbl -> AddRef(This)
+
+#define IAMTimelineEffect_Release(This) \
+ (This)->lpVtbl -> Release(This)
+
+
+#define IAMTimelineEffect_EffectGetPriority(This,pVal) \
+ (This)->lpVtbl -> EffectGetPriority(This,pVal)
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineEffect_EffectGetPriority_Proxy(
+ IAMTimelineEffect * This,
+ long *pVal);
+
+
+void __RPC_STUB IAMTimelineEffect_EffectGetPriority_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+
+#endif /* __IAMTimelineEffect_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAMTimelineTransable_INTERFACE_DEFINED__
+#define __IAMTimelineTransable_INTERFACE_DEFINED__
+
+/* interface IAMTimelineTransable */
+/* [unique][helpstring][uuid][object] */
+
+
+EXTERN_C const IID IID_IAMTimelineTransable;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("378FA386-622E-11d2-8CAD-00A024580902")
+ IAMTimelineTransable : public IUnknown
+ {
+ public:
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE TransAdd(
+ IAMTimelineObj *pTrans) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE TransGetCount(
+ long *pCount) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetNextTrans(
+ /* [out] */ IAMTimelineObj **ppTrans,
+ REFERENCE_TIME *pInOut) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetNextTrans2(
+ /* [out] */ IAMTimelineObj **ppTrans,
+ REFTIME *pInOut) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetTransAtTime(
+ /* [out] */ IAMTimelineObj **ppObj,
+ REFERENCE_TIME Time,
+ long SearchDirection) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetTransAtTime2(
+ /* [out] */ IAMTimelineObj **ppObj,
+ REFTIME Time,
+ long SearchDirection) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IAMTimelineTransableVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IAMTimelineTransable * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IAMTimelineTransable * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IAMTimelineTransable * This);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *TransAdd )(
+ IAMTimelineTransable * This,
+ IAMTimelineObj *pTrans);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *TransGetCount )(
+ IAMTimelineTransable * This,
+ long *pCount);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetNextTrans )(
+ IAMTimelineTransable * This,
+ /* [out] */ IAMTimelineObj **ppTrans,
+ REFERENCE_TIME *pInOut);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetNextTrans2 )(
+ IAMTimelineTransable * This,
+ /* [out] */ IAMTimelineObj **ppTrans,
+ REFTIME *pInOut);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetTransAtTime )(
+ IAMTimelineTransable * This,
+ /* [out] */ IAMTimelineObj **ppObj,
+ REFERENCE_TIME Time,
+ long SearchDirection);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetTransAtTime2 )(
+ IAMTimelineTransable * This,
+ /* [out] */ IAMTimelineObj **ppObj,
+ REFTIME Time,
+ long SearchDirection);
+
+ END_INTERFACE
+ } IAMTimelineTransableVtbl;
+
+ interface IAMTimelineTransable
+ {
+ CONST_VTBL struct IAMTimelineTransableVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IAMTimelineTransable_QueryInterface(This,riid,ppvObject) \
+ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
+
+#define IAMTimelineTransable_AddRef(This) \
+ (This)->lpVtbl -> AddRef(This)
+
+#define IAMTimelineTransable_Release(This) \
+ (This)->lpVtbl -> Release(This)
+
+
+#define IAMTimelineTransable_TransAdd(This,pTrans) \
+ (This)->lpVtbl -> TransAdd(This,pTrans)
+
+#define IAMTimelineTransable_TransGetCount(This,pCount) \
+ (This)->lpVtbl -> TransGetCount(This,pCount)
+
+#define IAMTimelineTransable_GetNextTrans(This,ppTrans,pInOut) \
+ (This)->lpVtbl -> GetNextTrans(This,ppTrans,pInOut)
+
+#define IAMTimelineTransable_GetNextTrans2(This,ppTrans,pInOut) \
+ (This)->lpVtbl -> GetNextTrans2(This,ppTrans,pInOut)
+
+#define IAMTimelineTransable_GetTransAtTime(This,ppObj,Time,SearchDirection) \
+ (This)->lpVtbl -> GetTransAtTime(This,ppObj,Time,SearchDirection)
+
+#define IAMTimelineTransable_GetTransAtTime2(This,ppObj,Time,SearchDirection) \
+ (This)->lpVtbl -> GetTransAtTime2(This,ppObj,Time,SearchDirection)
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTransable_TransAdd_Proxy(
+ IAMTimelineTransable * This,
+ IAMTimelineObj *pTrans);
+
+
+void __RPC_STUB IAMTimelineTransable_TransAdd_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTransable_TransGetCount_Proxy(
+ IAMTimelineTransable * This,
+ long *pCount);
+
+
+void __RPC_STUB IAMTimelineTransable_TransGetCount_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTransable_GetNextTrans_Proxy(
+ IAMTimelineTransable * This,
+ /* [out] */ IAMTimelineObj **ppTrans,
+ REFERENCE_TIME *pInOut);
+
+
+void __RPC_STUB IAMTimelineTransable_GetNextTrans_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTransable_GetNextTrans2_Proxy(
+ IAMTimelineTransable * This,
+ /* [out] */ IAMTimelineObj **ppTrans,
+ REFTIME *pInOut);
+
+
+void __RPC_STUB IAMTimelineTransable_GetNextTrans2_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTransable_GetTransAtTime_Proxy(
+ IAMTimelineTransable * This,
+ /* [out] */ IAMTimelineObj **ppObj,
+ REFERENCE_TIME Time,
+ long SearchDirection);
+
+
+void __RPC_STUB IAMTimelineTransable_GetTransAtTime_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTransable_GetTransAtTime2_Proxy(
+ IAMTimelineTransable * This,
+ /* [out] */ IAMTimelineObj **ppObj,
+ REFTIME Time,
+ long SearchDirection);
+
+
+void __RPC_STUB IAMTimelineTransable_GetTransAtTime2_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+
+#endif /* __IAMTimelineTransable_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAMTimelineSplittable_INTERFACE_DEFINED__
+#define __IAMTimelineSplittable_INTERFACE_DEFINED__
+
+/* interface IAMTimelineSplittable */
+/* [unique][helpstring][uuid][object] */
+
+
+EXTERN_C const IID IID_IAMTimelineSplittable;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("A0F840A0-D590-11d2-8D55-00A0C9441E20")
+ IAMTimelineSplittable : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE SplitAt(
+ REFERENCE_TIME Time) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SplitAt2(
+ REFTIME Time) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IAMTimelineSplittableVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IAMTimelineSplittable * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IAMTimelineSplittable * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IAMTimelineSplittable * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SplitAt )(
+ IAMTimelineSplittable * This,
+ REFERENCE_TIME Time);
+
+ HRESULT ( STDMETHODCALLTYPE *SplitAt2 )(
+ IAMTimelineSplittable * This,
+ REFTIME Time);
+
+ END_INTERFACE
+ } IAMTimelineSplittableVtbl;
+
+ interface IAMTimelineSplittable
+ {
+ CONST_VTBL struct IAMTimelineSplittableVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IAMTimelineSplittable_QueryInterface(This,riid,ppvObject) \
+ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
+
+#define IAMTimelineSplittable_AddRef(This) \
+ (This)->lpVtbl -> AddRef(This)
+
+#define IAMTimelineSplittable_Release(This) \
+ (This)->lpVtbl -> Release(This)
+
+
+#define IAMTimelineSplittable_SplitAt(This,Time) \
+ (This)->lpVtbl -> SplitAt(This,Time)
+
+#define IAMTimelineSplittable_SplitAt2(This,Time) \
+ (This)->lpVtbl -> SplitAt2(This,Time)
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+HRESULT STDMETHODCALLTYPE IAMTimelineSplittable_SplitAt_Proxy(
+ IAMTimelineSplittable * This,
+ REFERENCE_TIME Time);
+
+
+void __RPC_STUB IAMTimelineSplittable_SplitAt_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IAMTimelineSplittable_SplitAt2_Proxy(
+ IAMTimelineSplittable * This,
+ REFTIME Time);
+
+
+void __RPC_STUB IAMTimelineSplittable_SplitAt2_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+
+#endif /* __IAMTimelineSplittable_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAMTimelineTrans_INTERFACE_DEFINED__
+#define __IAMTimelineTrans_INTERFACE_DEFINED__
+
+/* interface IAMTimelineTrans */
+/* [unique][helpstring][uuid][object] */
+
+
+EXTERN_C const IID IID_IAMTimelineTrans;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("BCE0C265-622D-11d2-8CAD-00A024580902")
+ IAMTimelineTrans : public IUnknown
+ {
+ public:
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetCutPoint(
+ REFERENCE_TIME *pTLTime) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetCutPoint2(
+ REFTIME *pTLTime) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetCutPoint(
+ REFERENCE_TIME TLTime) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetCutPoint2(
+ REFTIME TLTime) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetSwapInputs(
+ BOOL *pVal) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetSwapInputs(
+ BOOL pVal) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetCutsOnly(
+ BOOL *pVal) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetCutsOnly(
+ BOOL pVal) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IAMTimelineTransVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IAMTimelineTrans * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IAMTimelineTrans * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IAMTimelineTrans * This);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetCutPoint )(
+ IAMTimelineTrans * This,
+ REFERENCE_TIME *pTLTime);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetCutPoint2 )(
+ IAMTimelineTrans * This,
+ REFTIME *pTLTime);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetCutPoint )(
+ IAMTimelineTrans * This,
+ REFERENCE_TIME TLTime);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetCutPoint2 )(
+ IAMTimelineTrans * This,
+ REFTIME TLTime);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetSwapInputs )(
+ IAMTimelineTrans * This,
+ BOOL *pVal);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetSwapInputs )(
+ IAMTimelineTrans * This,
+ BOOL pVal);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetCutsOnly )(
+ IAMTimelineTrans * This,
+ BOOL *pVal);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetCutsOnly )(
+ IAMTimelineTrans * This,
+ BOOL pVal);
+
+ END_INTERFACE
+ } IAMTimelineTransVtbl;
+
+ interface IAMTimelineTrans
+ {
+ CONST_VTBL struct IAMTimelineTransVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IAMTimelineTrans_QueryInterface(This,riid,ppvObject) \
+ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
+
+#define IAMTimelineTrans_AddRef(This) \
+ (This)->lpVtbl -> AddRef(This)
+
+#define IAMTimelineTrans_Release(This) \
+ (This)->lpVtbl -> Release(This)
+
+
+#define IAMTimelineTrans_GetCutPoint(This,pTLTime) \
+ (This)->lpVtbl -> GetCutPoint(This,pTLTime)
+
+#define IAMTimelineTrans_GetCutPoint2(This,pTLTime) \
+ (This)->lpVtbl -> GetCutPoint2(This,pTLTime)
+
+#define IAMTimelineTrans_SetCutPoint(This,TLTime) \
+ (This)->lpVtbl -> SetCutPoint(This,TLTime)
+
+#define IAMTimelineTrans_SetCutPoint2(This,TLTime) \
+ (This)->lpVtbl -> SetCutPoint2(This,TLTime)
+
+#define IAMTimelineTrans_GetSwapInputs(This,pVal) \
+ (This)->lpVtbl -> GetSwapInputs(This,pVal)
+
+#define IAMTimelineTrans_SetSwapInputs(This,pVal) \
+ (This)->lpVtbl -> SetSwapInputs(This,pVal)
+
+#define IAMTimelineTrans_GetCutsOnly(This,pVal) \
+ (This)->lpVtbl -> GetCutsOnly(This,pVal)
+
+#define IAMTimelineTrans_SetCutsOnly(This,pVal) \
+ (This)->lpVtbl -> SetCutsOnly(This,pVal)
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTrans_GetCutPoint_Proxy(
+ IAMTimelineTrans * This,
+ REFERENCE_TIME *pTLTime);
+
+
+void __RPC_STUB IAMTimelineTrans_GetCutPoint_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTrans_GetCutPoint2_Proxy(
+ IAMTimelineTrans * This,
+ REFTIME *pTLTime);
+
+
+void __RPC_STUB IAMTimelineTrans_GetCutPoint2_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTrans_SetCutPoint_Proxy(
+ IAMTimelineTrans * This,
+ REFERENCE_TIME TLTime);
+
+
+void __RPC_STUB IAMTimelineTrans_SetCutPoint_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTrans_SetCutPoint2_Proxy(
+ IAMTimelineTrans * This,
+ REFTIME TLTime);
+
+
+void __RPC_STUB IAMTimelineTrans_SetCutPoint2_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTrans_GetSwapInputs_Proxy(
+ IAMTimelineTrans * This,
+ BOOL *pVal);
+
+
+void __RPC_STUB IAMTimelineTrans_GetSwapInputs_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTrans_SetSwapInputs_Proxy(
+ IAMTimelineTrans * This,
+ BOOL pVal);
+
+
+void __RPC_STUB IAMTimelineTrans_SetSwapInputs_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTrans_GetCutsOnly_Proxy(
+ IAMTimelineTrans * This,
+ BOOL *pVal);
+
+
+void __RPC_STUB IAMTimelineTrans_GetCutsOnly_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTrans_SetCutsOnly_Proxy(
+ IAMTimelineTrans * This,
+ BOOL pVal);
+
+
+void __RPC_STUB IAMTimelineTrans_SetCutsOnly_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+
+#endif /* __IAMTimelineTrans_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAMTimelineSrc_INTERFACE_DEFINED__
+#define __IAMTimelineSrc_INTERFACE_DEFINED__
+
+/* interface IAMTimelineSrc */
+/* [unique][helpstring][uuid][object] */
+
+
+EXTERN_C const IID IID_IAMTimelineSrc;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("78530B79-61F9-11D2-8CAD-00A024580902")
+ IAMTimelineSrc : public IUnknown
+ {
+ public:
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMediaTimes(
+ REFERENCE_TIME *pStart,
+ REFERENCE_TIME *pStop) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMediaTimes2(
+ REFTIME *pStart,
+ REFTIME *pStop) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE ModifyStopTime(
+ REFERENCE_TIME Stop) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE ModifyStopTime2(
+ REFTIME Stop) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE FixMediaTimes(
+ REFERENCE_TIME *pStart,
+ REFERENCE_TIME *pStop) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE FixMediaTimes2(
+ REFTIME *pStart,
+ REFTIME *pStop) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMediaTimes(
+ REFERENCE_TIME Start,
+ REFERENCE_TIME Stop) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMediaTimes2(
+ REFTIME Start,
+ REFTIME Stop) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMediaLength(
+ REFERENCE_TIME Length) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMediaLength2(
+ REFTIME Length) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMediaLength(
+ REFERENCE_TIME *pLength) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMediaLength2(
+ REFTIME *pLength) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMediaName(
+ /* [retval][out] */ BSTR *pVal) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMediaName(
+ BSTR newVal) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SpliceWithNext(
+ IAMTimelineObj *pNext) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetStreamNumber(
+ long *pVal) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetStreamNumber(
+ long Val) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE IsNormalRate(
+ BOOL *pVal) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetDefaultFPS(
+ double *pFPS) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetDefaultFPS(
+ double FPS) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetStretchMode(
+ int *pnStretchMode) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetStretchMode(
+ int nStretchMode) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IAMTimelineSrcVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IAMTimelineSrc * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IAMTimelineSrc * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IAMTimelineSrc * This);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMediaTimes )(
+ IAMTimelineSrc * This,
+ REFERENCE_TIME *pStart,
+ REFERENCE_TIME *pStop);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMediaTimes2 )(
+ IAMTimelineSrc * This,
+ REFTIME *pStart,
+ REFTIME *pStop);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *ModifyStopTime )(
+ IAMTimelineSrc * This,
+ REFERENCE_TIME Stop);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *ModifyStopTime2 )(
+ IAMTimelineSrc * This,
+ REFTIME Stop);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *FixMediaTimes )(
+ IAMTimelineSrc * This,
+ REFERENCE_TIME *pStart,
+ REFERENCE_TIME *pStop);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *FixMediaTimes2 )(
+ IAMTimelineSrc * This,
+ REFTIME *pStart,
+ REFTIME *pStop);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetMediaTimes )(
+ IAMTimelineSrc * This,
+ REFERENCE_TIME Start,
+ REFERENCE_TIME Stop);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetMediaTimes2 )(
+ IAMTimelineSrc * This,
+ REFTIME Start,
+ REFTIME Stop);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetMediaLength )(
+ IAMTimelineSrc * This,
+ REFERENCE_TIME Length);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetMediaLength2 )(
+ IAMTimelineSrc * This,
+ REFTIME Length);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMediaLength )(
+ IAMTimelineSrc * This,
+ REFERENCE_TIME *pLength);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMediaLength2 )(
+ IAMTimelineSrc * This,
+ REFTIME *pLength);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMediaName )(
+ IAMTimelineSrc * This,
+ /* [retval][out] */ BSTR *pVal);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetMediaName )(
+ IAMTimelineSrc * This,
+ BSTR newVal);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SpliceWithNext )(
+ IAMTimelineSrc * This,
+ IAMTimelineObj *pNext);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetStreamNumber )(
+ IAMTimelineSrc * This,
+ long *pVal);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetStreamNumber )(
+ IAMTimelineSrc * This,
+ long Val);
+
+ HRESULT ( STDMETHODCALLTYPE *IsNormalRate )(
+ IAMTimelineSrc * This,
+ BOOL *pVal);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetDefaultFPS )(
+ IAMTimelineSrc * This,
+ double *pFPS);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetDefaultFPS )(
+ IAMTimelineSrc * This,
+ double FPS);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetStretchMode )(
+ IAMTimelineSrc * This,
+ int *pnStretchMode);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetStretchMode )(
+ IAMTimelineSrc * This,
+ int nStretchMode);
+
+ END_INTERFACE
+ } IAMTimelineSrcVtbl;
+
+ interface IAMTimelineSrc
+ {
+ CONST_VTBL struct IAMTimelineSrcVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IAMTimelineSrc_QueryInterface(This,riid,ppvObject) \
+ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
+
+#define IAMTimelineSrc_AddRef(This) \
+ (This)->lpVtbl -> AddRef(This)
+
+#define IAMTimelineSrc_Release(This) \
+ (This)->lpVtbl -> Release(This)
+
+
+#define IAMTimelineSrc_GetMediaTimes(This,pStart,pStop) \
+ (This)->lpVtbl -> GetMediaTimes(This,pStart,pStop)
+
+#define IAMTimelineSrc_GetMediaTimes2(This,pStart,pStop) \
+ (This)->lpVtbl -> GetMediaTimes2(This,pStart,pStop)
+
+#define IAMTimelineSrc_ModifyStopTime(This,Stop) \
+ (This)->lpVtbl -> ModifyStopTime(This,Stop)
+
+#define IAMTimelineSrc_ModifyStopTime2(This,Stop) \
+ (This)->lpVtbl -> ModifyStopTime2(This,Stop)
+
+#define IAMTimelineSrc_FixMediaTimes(This,pStart,pStop) \
+ (This)->lpVtbl -> FixMediaTimes(This,pStart,pStop)
+
+#define IAMTimelineSrc_FixMediaTimes2(This,pStart,pStop) \
+ (This)->lpVtbl -> FixMediaTimes2(This,pStart,pStop)
+
+#define IAMTimelineSrc_SetMediaTimes(This,Start,Stop) \
+ (This)->lpVtbl -> SetMediaTimes(This,Start,Stop)
+
+#define IAMTimelineSrc_SetMediaTimes2(This,Start,Stop) \
+ (This)->lpVtbl -> SetMediaTimes2(This,Start,Stop)
+
+#define IAMTimelineSrc_SetMediaLength(This,Length) \
+ (This)->lpVtbl -> SetMediaLength(This,Length)
+
+#define IAMTimelineSrc_SetMediaLength2(This,Length) \
+ (This)->lpVtbl -> SetMediaLength2(This,Length)
+
+#define IAMTimelineSrc_GetMediaLength(This,pLength) \
+ (This)->lpVtbl -> GetMediaLength(This,pLength)
+
+#define IAMTimelineSrc_GetMediaLength2(This,pLength) \
+ (This)->lpVtbl -> GetMediaLength2(This,pLength)
+
+#define IAMTimelineSrc_GetMediaName(This,pVal) \
+ (This)->lpVtbl -> GetMediaName(This,pVal)
+
+#define IAMTimelineSrc_SetMediaName(This,newVal) \
+ (This)->lpVtbl -> SetMediaName(This,newVal)
+
+#define IAMTimelineSrc_SpliceWithNext(This,pNext) \
+ (This)->lpVtbl -> SpliceWithNext(This,pNext)
+
+#define IAMTimelineSrc_GetStreamNumber(This,pVal) \
+ (This)->lpVtbl -> GetStreamNumber(This,pVal)
+
+#define IAMTimelineSrc_SetStreamNumber(This,Val) \
+ (This)->lpVtbl -> SetStreamNumber(This,Val)
+
+#define IAMTimelineSrc_IsNormalRate(This,pVal) \
+ (This)->lpVtbl -> IsNormalRate(This,pVal)
+
+#define IAMTimelineSrc_GetDefaultFPS(This,pFPS) \
+ (This)->lpVtbl -> GetDefaultFPS(This,pFPS)
+
+#define IAMTimelineSrc_SetDefaultFPS(This,FPS) \
+ (This)->lpVtbl -> SetDefaultFPS(This,FPS)
+
+#define IAMTimelineSrc_GetStretchMode(This,pnStretchMode) \
+ (This)->lpVtbl -> GetStretchMode(This,pnStretchMode)
+
+#define IAMTimelineSrc_SetStretchMode(This,nStretchMode) \
+ (This)->lpVtbl -> SetStretchMode(This,nStretchMode)
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_GetMediaTimes_Proxy(
+ IAMTimelineSrc * This,
+ REFERENCE_TIME *pStart,
+ REFERENCE_TIME *pStop);
+
+
+void __RPC_STUB IAMTimelineSrc_GetMediaTimes_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_GetMediaTimes2_Proxy(
+ IAMTimelineSrc * This,
+ REFTIME *pStart,
+ REFTIME *pStop);
+
+
+void __RPC_STUB IAMTimelineSrc_GetMediaTimes2_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_ModifyStopTime_Proxy(
+ IAMTimelineSrc * This,
+ REFERENCE_TIME Stop);
+
+
+void __RPC_STUB IAMTimelineSrc_ModifyStopTime_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_ModifyStopTime2_Proxy(
+ IAMTimelineSrc * This,
+ REFTIME Stop);
+
+
+void __RPC_STUB IAMTimelineSrc_ModifyStopTime2_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_FixMediaTimes_Proxy(
+ IAMTimelineSrc * This,
+ REFERENCE_TIME *pStart,
+ REFERENCE_TIME *pStop);
+
+
+void __RPC_STUB IAMTimelineSrc_FixMediaTimes_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_FixMediaTimes2_Proxy(
+ IAMTimelineSrc * This,
+ REFTIME *pStart,
+ REFTIME *pStop);
+
+
+void __RPC_STUB IAMTimelineSrc_FixMediaTimes2_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_SetMediaTimes_Proxy(
+ IAMTimelineSrc * This,
+ REFERENCE_TIME Start,
+ REFERENCE_TIME Stop);
+
+
+void __RPC_STUB IAMTimelineSrc_SetMediaTimes_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_SetMediaTimes2_Proxy(
+ IAMTimelineSrc * This,
+ REFTIME Start,
+ REFTIME Stop);
+
+
+void __RPC_STUB IAMTimelineSrc_SetMediaTimes2_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_SetMediaLength_Proxy(
+ IAMTimelineSrc * This,
+ REFERENCE_TIME Length);
+
+
+void __RPC_STUB IAMTimelineSrc_SetMediaLength_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_SetMediaLength2_Proxy(
+ IAMTimelineSrc * This,
+ REFTIME Length);
+
+
+void __RPC_STUB IAMTimelineSrc_SetMediaLength2_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_GetMediaLength_Proxy(
+ IAMTimelineSrc * This,
+ REFERENCE_TIME *pLength);
+
+
+void __RPC_STUB IAMTimelineSrc_GetMediaLength_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_GetMediaLength2_Proxy(
+ IAMTimelineSrc * This,
+ REFTIME *pLength);
+
+
+void __RPC_STUB IAMTimelineSrc_GetMediaLength2_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_GetMediaName_Proxy(
+ IAMTimelineSrc * This,
+ /* [retval][out] */ BSTR *pVal);
+
+
+void __RPC_STUB IAMTimelineSrc_GetMediaName_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_SetMediaName_Proxy(
+ IAMTimelineSrc * This,
+ BSTR newVal);
+
+
+void __RPC_STUB IAMTimelineSrc_SetMediaName_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_SpliceWithNext_Proxy(
+ IAMTimelineSrc * This,
+ IAMTimelineObj *pNext);
+
+
+void __RPC_STUB IAMTimelineSrc_SpliceWithNext_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_GetStreamNumber_Proxy(
+ IAMTimelineSrc * This,
+ long *pVal);
+
+
+void __RPC_STUB IAMTimelineSrc_GetStreamNumber_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_SetStreamNumber_Proxy(
+ IAMTimelineSrc * This,
+ long Val);
+
+
+void __RPC_STUB IAMTimelineSrc_SetStreamNumber_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IAMTimelineSrc_IsNormalRate_Proxy(
+ IAMTimelineSrc * This,
+ BOOL *pVal);
+
+
+void __RPC_STUB IAMTimelineSrc_IsNormalRate_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_GetDefaultFPS_Proxy(
+ IAMTimelineSrc * This,
+ double *pFPS);
+
+
+void __RPC_STUB IAMTimelineSrc_GetDefaultFPS_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_SetDefaultFPS_Proxy(
+ IAMTimelineSrc * This,
+ double FPS);
+
+
+void __RPC_STUB IAMTimelineSrc_SetDefaultFPS_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_GetStretchMode_Proxy(
+ IAMTimelineSrc * This,
+ int *pnStretchMode);
+
+
+void __RPC_STUB IAMTimelineSrc_GetStretchMode_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_SetStretchMode_Proxy(
+ IAMTimelineSrc * This,
+ int nStretchMode);
+
+
+void __RPC_STUB IAMTimelineSrc_SetStretchMode_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+
+#endif /* __IAMTimelineSrc_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAMTimelineTrack_INTERFACE_DEFINED__
+#define __IAMTimelineTrack_INTERFACE_DEFINED__
+
+/* interface IAMTimelineTrack */
+/* [unique][helpstring][uuid][object] */
+
+
+EXTERN_C const IID IID_IAMTimelineTrack;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("EAE58538-622E-11d2-8CAD-00A024580902")
+ IAMTimelineTrack : public IUnknown
+ {
+ public:
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SrcAdd(
+ IAMTimelineObj *pSource) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetNextSrc(
+ /* [out] */ IAMTimelineObj **ppSrc,
+ REFERENCE_TIME *pInOut) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetNextSrc2(
+ /* [out] */ IAMTimelineObj **ppSrc,
+ REFTIME *pInOut) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE MoveEverythingBy(
+ REFERENCE_TIME Start,
+ REFERENCE_TIME MoveBy) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE MoveEverythingBy2(
+ REFTIME Start,
+ REFTIME MoveBy) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetSourcesCount(
+ long *pVal) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE AreYouBlank(
+ long *pVal) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetSrcAtTime(
+ /* [out] */ IAMTimelineObj **ppSrc,
+ REFERENCE_TIME Time,
+ long SearchDirection) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetSrcAtTime2(
+ /* [out] */ IAMTimelineObj **ppSrc,
+ REFTIME Time,
+ long SearchDirection) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE InsertSpace(
+ REFERENCE_TIME rtStart,
+ REFERENCE_TIME rtEnd) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE InsertSpace2(
+ REFTIME rtStart,
+ REFTIME rtEnd) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE ZeroBetween(
+ REFERENCE_TIME rtStart,
+ REFERENCE_TIME rtEnd) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE ZeroBetween2(
+ REFTIME rtStart,
+ REFTIME rtEnd) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetNextSrcEx(
+ IAMTimelineObj *pLast,
+ /* [out] */ IAMTimelineObj **ppNext) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IAMTimelineTrackVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IAMTimelineTrack * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IAMTimelineTrack * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IAMTimelineTrack * This);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SrcAdd )(
+ IAMTimelineTrack * This,
+ IAMTimelineObj *pSource);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetNextSrc )(
+ IAMTimelineTrack * This,
+ /* [out] */ IAMTimelineObj **ppSrc,
+ REFERENCE_TIME *pInOut);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetNextSrc2 )(
+ IAMTimelineTrack * This,
+ /* [out] */ IAMTimelineObj **ppSrc,
+ REFTIME *pInOut);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *MoveEverythingBy )(
+ IAMTimelineTrack * This,
+ REFERENCE_TIME Start,
+ REFERENCE_TIME MoveBy);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *MoveEverythingBy2 )(
+ IAMTimelineTrack * This,
+ REFTIME Start,
+ REFTIME MoveBy);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetSourcesCount )(
+ IAMTimelineTrack * This,
+ long *pVal);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *AreYouBlank )(
+ IAMTimelineTrack * This,
+ long *pVal);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetSrcAtTime )(
+ IAMTimelineTrack * This,
+ /* [out] */ IAMTimelineObj **ppSrc,
+ REFERENCE_TIME Time,
+ long SearchDirection);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetSrcAtTime2 )(
+ IAMTimelineTrack * This,
+ /* [out] */ IAMTimelineObj **ppSrc,
+ REFTIME Time,
+ long SearchDirection);
+
+ HRESULT ( STDMETHODCALLTYPE *InsertSpace )(
+ IAMTimelineTrack * This,
+ REFERENCE_TIME rtStart,
+ REFERENCE_TIME rtEnd);
+
+ HRESULT ( STDMETHODCALLTYPE *InsertSpace2 )(
+ IAMTimelineTrack * This,
+ REFTIME rtStart,
+ REFTIME rtEnd);
+
+ HRESULT ( STDMETHODCALLTYPE *ZeroBetween )(
+ IAMTimelineTrack * This,
+ REFERENCE_TIME rtStart,
+ REFERENCE_TIME rtEnd);
+
+ HRESULT ( STDMETHODCALLTYPE *ZeroBetween2 )(
+ IAMTimelineTrack * This,
+ REFTIME rtStart,
+ REFTIME rtEnd);
+
+ HRESULT ( STDMETHODCALLTYPE *GetNextSrcEx )(
+ IAMTimelineTrack * This,
+ IAMTimelineObj *pLast,
+ /* [out] */ IAMTimelineObj **ppNext);
+
+ END_INTERFACE
+ } IAMTimelineTrackVtbl;
+
+ interface IAMTimelineTrack
+ {
+ CONST_VTBL struct IAMTimelineTrackVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IAMTimelineTrack_QueryInterface(This,riid,ppvObject) \
+ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
+
+#define IAMTimelineTrack_AddRef(This) \
+ (This)->lpVtbl -> AddRef(This)
+
+#define IAMTimelineTrack_Release(This) \
+ (This)->lpVtbl -> Release(This)
+
+
+#define IAMTimelineTrack_SrcAdd(This,pSource) \
+ (This)->lpVtbl -> SrcAdd(This,pSource)
+
+#define IAMTimelineTrack_GetNextSrc(This,ppSrc,pInOut) \
+ (This)->lpVtbl -> GetNextSrc(This,ppSrc,pInOut)
+
+#define IAMTimelineTrack_GetNextSrc2(This,ppSrc,pInOut) \
+ (This)->lpVtbl -> GetNextSrc2(This,ppSrc,pInOut)
+
+#define IAMTimelineTrack_MoveEverythingBy(This,Start,MoveBy) \
+ (This)->lpVtbl -> MoveEverythingBy(This,Start,MoveBy)
+
+#define IAMTimelineTrack_MoveEverythingBy2(This,Start,MoveBy) \
+ (This)->lpVtbl -> MoveEverythingBy2(This,Start,MoveBy)
+
+#define IAMTimelineTrack_GetSourcesCount(This,pVal) \
+ (This)->lpVtbl -> GetSourcesCount(This,pVal)
+
+#define IAMTimelineTrack_AreYouBlank(This,pVal) \
+ (This)->lpVtbl -> AreYouBlank(This,pVal)
+
+#define IAMTimelineTrack_GetSrcAtTime(This,ppSrc,Time,SearchDirection) \
+ (This)->lpVtbl -> GetSrcAtTime(This,ppSrc,Time,SearchDirection)
+
+#define IAMTimelineTrack_GetSrcAtTime2(This,ppSrc,Time,SearchDirection) \
+ (This)->lpVtbl -> GetSrcAtTime2(This,ppSrc,Time,SearchDirection)
+
+#define IAMTimelineTrack_InsertSpace(This,rtStart,rtEnd) \
+ (This)->lpVtbl -> InsertSpace(This,rtStart,rtEnd)
+
+#define IAMTimelineTrack_InsertSpace2(This,rtStart,rtEnd) \
+ (This)->lpVtbl -> InsertSpace2(This,rtStart,rtEnd)
+
+#define IAMTimelineTrack_ZeroBetween(This,rtStart,rtEnd) \
+ (This)->lpVtbl -> ZeroBetween(This,rtStart,rtEnd)
+
+#define IAMTimelineTrack_ZeroBetween2(This,rtStart,rtEnd) \
+ (This)->lpVtbl -> ZeroBetween2(This,rtStart,rtEnd)
+
+#define IAMTimelineTrack_GetNextSrcEx(This,pLast,ppNext) \
+ (This)->lpVtbl -> GetNextSrcEx(This,pLast,ppNext)
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTrack_SrcAdd_Proxy(
+ IAMTimelineTrack * This,
+ IAMTimelineObj *pSource);
+
+
+void __RPC_STUB IAMTimelineTrack_SrcAdd_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTrack_GetNextSrc_Proxy(
+ IAMTimelineTrack * This,
+ /* [out] */ IAMTimelineObj **ppSrc,
+ REFERENCE_TIME *pInOut);
+
+
+void __RPC_STUB IAMTimelineTrack_GetNextSrc_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTrack_GetNextSrc2_Proxy(
+ IAMTimelineTrack * This,
+ /* [out] */ IAMTimelineObj **ppSrc,
+ REFTIME *pInOut);
+
+
+void __RPC_STUB IAMTimelineTrack_GetNextSrc2_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTrack_MoveEverythingBy_Proxy(
+ IAMTimelineTrack * This,
+ REFERENCE_TIME Start,
+ REFERENCE_TIME MoveBy);
+
+
+void __RPC_STUB IAMTimelineTrack_MoveEverythingBy_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTrack_MoveEverythingBy2_Proxy(
+ IAMTimelineTrack * This,
+ REFTIME Start,
+ REFTIME MoveBy);
+
+
+void __RPC_STUB IAMTimelineTrack_MoveEverythingBy2_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTrack_GetSourcesCount_Proxy(
+ IAMTimelineTrack * This,
+ long *pVal);
+
+
+void __RPC_STUB IAMTimelineTrack_GetSourcesCount_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTrack_AreYouBlank_Proxy(
+ IAMTimelineTrack * This,
+ long *pVal);
+
+
+void __RPC_STUB IAMTimelineTrack_AreYouBlank_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTrack_GetSrcAtTime_Proxy(
+ IAMTimelineTrack * This,
+ /* [out] */ IAMTimelineObj **ppSrc,
+ REFERENCE_TIME Time,
+ long SearchDirection);
+
+
+void __RPC_STUB IAMTimelineTrack_GetSrcAtTime_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTrack_GetSrcAtTime2_Proxy(
+ IAMTimelineTrack * This,
+ /* [out] */ IAMTimelineObj **ppSrc,
+ REFTIME Time,
+ long SearchDirection);
+
+
+void __RPC_STUB IAMTimelineTrack_GetSrcAtTime2_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IAMTimelineTrack_InsertSpace_Proxy(
+ IAMTimelineTrack * This,
+ REFERENCE_TIME rtStart,
+ REFERENCE_TIME rtEnd);
+
+
+void __RPC_STUB IAMTimelineTrack_InsertSpace_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IAMTimelineTrack_InsertSpace2_Proxy(
+ IAMTimelineTrack * This,
+ REFTIME rtStart,
+ REFTIME rtEnd);
+
+
+void __RPC_STUB IAMTimelineTrack_InsertSpace2_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IAMTimelineTrack_ZeroBetween_Proxy(
+ IAMTimelineTrack * This,
+ REFERENCE_TIME rtStart,
+ REFERENCE_TIME rtEnd);
+
+
+void __RPC_STUB IAMTimelineTrack_ZeroBetween_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IAMTimelineTrack_ZeroBetween2_Proxy(
+ IAMTimelineTrack * This,
+ REFTIME rtStart,
+ REFTIME rtEnd);
+
+
+void __RPC_STUB IAMTimelineTrack_ZeroBetween2_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IAMTimelineTrack_GetNextSrcEx_Proxy(
+ IAMTimelineTrack * This,
+ IAMTimelineObj *pLast,
+ /* [out] */ IAMTimelineObj **ppNext);
+
+
+void __RPC_STUB IAMTimelineTrack_GetNextSrcEx_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+
+#endif /* __IAMTimelineTrack_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAMTimelineVirtualTrack_INTERFACE_DEFINED__
+#define __IAMTimelineVirtualTrack_INTERFACE_DEFINED__
+
+/* interface IAMTimelineVirtualTrack */
+/* [unique][helpstring][uuid][object] */
+
+
+EXTERN_C const IID IID_IAMTimelineVirtualTrack;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("A8ED5F80-C2C7-11d2-8D39-00A0C9441E20")
+ IAMTimelineVirtualTrack : public IUnknown
+ {
+ public:
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE TrackGetPriority(
+ long *pPriority) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetTrackDirty( void) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IAMTimelineVirtualTrackVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IAMTimelineVirtualTrack * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IAMTimelineVirtualTrack * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IAMTimelineVirtualTrack * This);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *TrackGetPriority )(
+ IAMTimelineVirtualTrack * This,
+ long *pPriority);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetTrackDirty )(
+ IAMTimelineVirtualTrack * This);
+
+ END_INTERFACE
+ } IAMTimelineVirtualTrackVtbl;
+
+ interface IAMTimelineVirtualTrack
+ {
+ CONST_VTBL struct IAMTimelineVirtualTrackVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IAMTimelineVirtualTrack_QueryInterface(This,riid,ppvObject) \
+ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
+
+#define IAMTimelineVirtualTrack_AddRef(This) \
+ (This)->lpVtbl -> AddRef(This)
+
+#define IAMTimelineVirtualTrack_Release(This) \
+ (This)->lpVtbl -> Release(This)
+
+
+#define IAMTimelineVirtualTrack_TrackGetPriority(This,pPriority) \
+ (This)->lpVtbl -> TrackGetPriority(This,pPriority)
+
+#define IAMTimelineVirtualTrack_SetTrackDirty(This) \
+ (This)->lpVtbl -> SetTrackDirty(This)
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineVirtualTrack_TrackGetPriority_Proxy(
+ IAMTimelineVirtualTrack * This,
+ long *pPriority);
+
+
+void __RPC_STUB IAMTimelineVirtualTrack_TrackGetPriority_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineVirtualTrack_SetTrackDirty_Proxy(
+ IAMTimelineVirtualTrack * This);
+
+
+void __RPC_STUB IAMTimelineVirtualTrack_SetTrackDirty_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+
+#endif /* __IAMTimelineVirtualTrack_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAMTimelineComp_INTERFACE_DEFINED__
+#define __IAMTimelineComp_INTERFACE_DEFINED__
+
+/* interface IAMTimelineComp */
+/* [unique][helpstring][uuid][object] */
+
+
+EXTERN_C const IID IID_IAMTimelineComp;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("EAE58536-622E-11d2-8CAD-00A024580902")
+ IAMTimelineComp : public IUnknown
+ {
+ public:
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE VTrackInsBefore(
+ IAMTimelineObj *pVirtualTrack,
+ long Priority) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE VTrackSwapPriorities(
+ long VirtualTrackA,
+ long VirtualTrackB) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE VTrackGetCount(
+ long *pVal) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetVTrack(
+ /* [out] */ IAMTimelineObj **ppVirtualTrack,
+ long Which) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetCountOfType(
+ long *pVal,
+ long *pValWithComps,
+ TIMELINE_MAJOR_TYPE MajorType) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetRecursiveLayerOfType(
+ /* [out] */ IAMTimelineObj **ppVirtualTrack,
+ long WhichLayer,
+ TIMELINE_MAJOR_TYPE Type) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetRecursiveLayerOfTypeI(
+ /* [out] */ IAMTimelineObj **ppVirtualTrack,
+ /* [out][in] */ long *pWhichLayer,
+ TIMELINE_MAJOR_TYPE Type) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetNextVTrack(
+ IAMTimelineObj *pVirtualTrack,
+ /* [out] */ IAMTimelineObj **ppNextVirtualTrack) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IAMTimelineCompVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IAMTimelineComp * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IAMTimelineComp * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IAMTimelineComp * This);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *VTrackInsBefore )(
+ IAMTimelineComp * This,
+ IAMTimelineObj *pVirtualTrack,
+ long Priority);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *VTrackSwapPriorities )(
+ IAMTimelineComp * This,
+ long VirtualTrackA,
+ long VirtualTrackB);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *VTrackGetCount )(
+ IAMTimelineComp * This,
+ long *pVal);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetVTrack )(
+ IAMTimelineComp * This,
+ /* [out] */ IAMTimelineObj **ppVirtualTrack,
+ long Which);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetCountOfType )(
+ IAMTimelineComp * This,
+ long *pVal,
+ long *pValWithComps,
+ TIMELINE_MAJOR_TYPE MajorType);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetRecursiveLayerOfType )(
+ IAMTimelineComp * This,
+ /* [out] */ IAMTimelineObj **ppVirtualTrack,
+ long WhichLayer,
+ TIMELINE_MAJOR_TYPE Type);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetRecursiveLayerOfTypeI )(
+ IAMTimelineComp * This,
+ /* [out] */ IAMTimelineObj **ppVirtualTrack,
+ /* [out][in] */ long *pWhichLayer,
+ TIMELINE_MAJOR_TYPE Type);
+
+ HRESULT ( STDMETHODCALLTYPE *GetNextVTrack )(
+ IAMTimelineComp * This,
+ IAMTimelineObj *pVirtualTrack,
+ /* [out] */ IAMTimelineObj **ppNextVirtualTrack);
+
+ END_INTERFACE
+ } IAMTimelineCompVtbl;
+
+ interface IAMTimelineComp
+ {
+ CONST_VTBL struct IAMTimelineCompVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IAMTimelineComp_QueryInterface(This,riid,ppvObject) \
+ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
+
+#define IAMTimelineComp_AddRef(This) \
+ (This)->lpVtbl -> AddRef(This)
+
+#define IAMTimelineComp_Release(This) \
+ (This)->lpVtbl -> Release(This)
+
+
+#define IAMTimelineComp_VTrackInsBefore(This,pVirtualTrack,Priority) \
+ (This)->lpVtbl -> VTrackInsBefore(This,pVirtualTrack,Priority)
+
+#define IAMTimelineComp_VTrackSwapPriorities(This,VirtualTrackA,VirtualTrackB) \
+ (This)->lpVtbl -> VTrackSwapPriorities(This,VirtualTrackA,VirtualTrackB)
+
+#define IAMTimelineComp_VTrackGetCount(This,pVal) \
+ (This)->lpVtbl -> VTrackGetCount(This,pVal)
+
+#define IAMTimelineComp_GetVTrack(This,ppVirtualTrack,Which) \
+ (This)->lpVtbl -> GetVTrack(This,ppVirtualTrack,Which)
+
+#define IAMTimelineComp_GetCountOfType(This,pVal,pValWithComps,MajorType) \
+ (This)->lpVtbl -> GetCountOfType(This,pVal,pValWithComps,MajorType)
+
+#define IAMTimelineComp_GetRecursiveLayerOfType(This,ppVirtualTrack,WhichLayer,Type) \
+ (This)->lpVtbl -> GetRecursiveLayerOfType(This,ppVirtualTrack,WhichLayer,Type)
+
+#define IAMTimelineComp_GetRecursiveLayerOfTypeI(This,ppVirtualTrack,pWhichLayer,Type) \
+ (This)->lpVtbl -> GetRecursiveLayerOfTypeI(This,ppVirtualTrack,pWhichLayer,Type)
+
+#define IAMTimelineComp_GetNextVTrack(This,pVirtualTrack,ppNextVirtualTrack) \
+ (This)->lpVtbl -> GetNextVTrack(This,pVirtualTrack,ppNextVirtualTrack)
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineComp_VTrackInsBefore_Proxy(
+ IAMTimelineComp * This,
+ IAMTimelineObj *pVirtualTrack,
+ long Priority);
+
+
+void __RPC_STUB IAMTimelineComp_VTrackInsBefore_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineComp_VTrackSwapPriorities_Proxy(
+ IAMTimelineComp * This,
+ long VirtualTrackA,
+ long VirtualTrackB);
+
+
+void __RPC_STUB IAMTimelineComp_VTrackSwapPriorities_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineComp_VTrackGetCount_Proxy(
+ IAMTimelineComp * This,
+ long *pVal);
+
+
+void __RPC_STUB IAMTimelineComp_VTrackGetCount_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineComp_GetVTrack_Proxy(
+ IAMTimelineComp * This,
+ /* [out] */ IAMTimelineObj **ppVirtualTrack,
+ long Which);
+
+
+void __RPC_STUB IAMTimelineComp_GetVTrack_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineComp_GetCountOfType_Proxy(
+ IAMTimelineComp * This,
+ long *pVal,
+ long *pValWithComps,
+ TIMELINE_MAJOR_TYPE MajorType);
+
+
+void __RPC_STUB IAMTimelineComp_GetCountOfType_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineComp_GetRecursiveLayerOfType_Proxy(
+ IAMTimelineComp * This,
+ /* [out] */ IAMTimelineObj **ppVirtualTrack,
+ long WhichLayer,
+ TIMELINE_MAJOR_TYPE Type);
+
+
+void __RPC_STUB IAMTimelineComp_GetRecursiveLayerOfType_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineComp_GetRecursiveLayerOfTypeI_Proxy(
+ IAMTimelineComp * This,
+ /* [out] */ IAMTimelineObj **ppVirtualTrack,
+ /* [out][in] */ long *pWhichLayer,
+ TIMELINE_MAJOR_TYPE Type);
+
+
+void __RPC_STUB IAMTimelineComp_GetRecursiveLayerOfTypeI_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IAMTimelineComp_GetNextVTrack_Proxy(
+ IAMTimelineComp * This,
+ IAMTimelineObj *pVirtualTrack,
+ /* [out] */ IAMTimelineObj **ppNextVirtualTrack);
+
+
+void __RPC_STUB IAMTimelineComp_GetNextVTrack_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+
+#endif /* __IAMTimelineComp_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAMTimelineGroup_INTERFACE_DEFINED__
+#define __IAMTimelineGroup_INTERFACE_DEFINED__
+
+/* interface IAMTimelineGroup */
+/* [unique][helpstring][uuid][object] */
+
+
+EXTERN_C const IID IID_IAMTimelineGroup;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("9EED4F00-B8A6-11d2-8023-00C0DF10D434")
+ IAMTimelineGroup : public IUnknown
+ {
+ public:
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetTimeline(
+ IAMTimeline *pTimeline) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetTimeline(
+ /* [out] */ IAMTimeline **ppTimeline) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetPriority(
+ long *pPriority) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMediaType(
+ /* [out] */ AM_MEDIA_TYPE *__MIDL_0040) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMediaType(
+ /* [in] */ AM_MEDIA_TYPE *__MIDL_0041) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetOutputFPS(
+ double FPS) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetOutputFPS(
+ double *pFPS) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetGroupName(
+ BSTR pGroupName) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetGroupName(
+ /* [retval][out] */ BSTR *pGroupName) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetPreviewMode(
+ BOOL fPreview) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetPreviewMode(
+ BOOL *pfPreview) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMediaTypeForVB(
+ /* [in] */ long Val) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetOutputBuffering(
+ /* [out] */ int *pnBuffer) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetOutputBuffering(
+ /* [in] */ int nBuffer) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetSmartRecompressFormat(
+ long *pFormat) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetSmartRecompressFormat(
+ long **ppFormat) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE IsSmartRecompressFormatSet(
+ BOOL *pVal) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE IsRecompressFormatDirty(
+ BOOL *pVal) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE ClearRecompressFormatDirty( void) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetRecompFormatFromSource(
+ IAMTimelineSrc *pSource) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IAMTimelineGroupVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IAMTimelineGroup * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IAMTimelineGroup * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IAMTimelineGroup * This);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetTimeline )(
+ IAMTimelineGroup * This,
+ IAMTimeline *pTimeline);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetTimeline )(
+ IAMTimelineGroup * This,
+ /* [out] */ IAMTimeline **ppTimeline);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetPriority )(
+ IAMTimelineGroup * This,
+ long *pPriority);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMediaType )(
+ IAMTimelineGroup * This,
+ /* [out] */ AM_MEDIA_TYPE *__MIDL_0040);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetMediaType )(
+ IAMTimelineGroup * This,
+ /* [in] */ AM_MEDIA_TYPE *__MIDL_0041);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetOutputFPS )(
+ IAMTimelineGroup * This,
+ double FPS);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetOutputFPS )(
+ IAMTimelineGroup * This,
+ double *pFPS);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetGroupName )(
+ IAMTimelineGroup * This,
+ BSTR pGroupName);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetGroupName )(
+ IAMTimelineGroup * This,
+ /* [retval][out] */ BSTR *pGroupName);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetPreviewMode )(
+ IAMTimelineGroup * This,
+ BOOL fPreview);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetPreviewMode )(
+ IAMTimelineGroup * This,
+ BOOL *pfPreview);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetMediaTypeForVB )(
+ IAMTimelineGroup * This,
+ /* [in] */ long Val);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetOutputBuffering )(
+ IAMTimelineGroup * This,
+ /* [out] */ int *pnBuffer);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetOutputBuffering )(
+ IAMTimelineGroup * This,
+ /* [in] */ int nBuffer);
+
+ HRESULT ( STDMETHODCALLTYPE *SetSmartRecompressFormat )(
+ IAMTimelineGroup * This,
+ long *pFormat);
+
+ HRESULT ( STDMETHODCALLTYPE *GetSmartRecompressFormat )(
+ IAMTimelineGroup * This,
+ long **ppFormat);
+
+ HRESULT ( STDMETHODCALLTYPE *IsSmartRecompressFormatSet )(
+ IAMTimelineGroup * This,
+ BOOL *pVal);
+
+ HRESULT ( STDMETHODCALLTYPE *IsRecompressFormatDirty )(
+ IAMTimelineGroup * This,
+ BOOL *pVal);
+
+ HRESULT ( STDMETHODCALLTYPE *ClearRecompressFormatDirty )(
+ IAMTimelineGroup * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetRecompFormatFromSource )(
+ IAMTimelineGroup * This,
+ IAMTimelineSrc *pSource);
+
+ END_INTERFACE
+ } IAMTimelineGroupVtbl;
+
+ interface IAMTimelineGroup
+ {
+ CONST_VTBL struct IAMTimelineGroupVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IAMTimelineGroup_QueryInterface(This,riid,ppvObject) \
+ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
+
+#define IAMTimelineGroup_AddRef(This) \
+ (This)->lpVtbl -> AddRef(This)
+
+#define IAMTimelineGroup_Release(This) \
+ (This)->lpVtbl -> Release(This)
+
+
+#define IAMTimelineGroup_SetTimeline(This,pTimeline) \
+ (This)->lpVtbl -> SetTimeline(This,pTimeline)
+
+#define IAMTimelineGroup_GetTimeline(This,ppTimeline) \
+ (This)->lpVtbl -> GetTimeline(This,ppTimeline)
+
+#define IAMTimelineGroup_GetPriority(This,pPriority) \
+ (This)->lpVtbl -> GetPriority(This,pPriority)
+
+#define IAMTimelineGroup_GetMediaType(This,__MIDL_0040) \
+ (This)->lpVtbl -> GetMediaType(This,__MIDL_0040)
+
+#define IAMTimelineGroup_SetMediaType(This,__MIDL_0041) \
+ (This)->lpVtbl -> SetMediaType(This,__MIDL_0041)
+
+#define IAMTimelineGroup_SetOutputFPS(This,FPS) \
+ (This)->lpVtbl -> SetOutputFPS(This,FPS)
+
+#define IAMTimelineGroup_GetOutputFPS(This,pFPS) \
+ (This)->lpVtbl -> GetOutputFPS(This,pFPS)
+
+#define IAMTimelineGroup_SetGroupName(This,pGroupName) \
+ (This)->lpVtbl -> SetGroupName(This,pGroupName)
+
+#define IAMTimelineGroup_GetGroupName(This,pGroupName) \
+ (This)->lpVtbl -> GetGroupName(This,pGroupName)
+
+#define IAMTimelineGroup_SetPreviewMode(This,fPreview) \
+ (This)->lpVtbl -> SetPreviewMode(This,fPreview)
+
+#define IAMTimelineGroup_GetPreviewMode(This,pfPreview) \
+ (This)->lpVtbl -> GetPreviewMode(This,pfPreview)
+
+#define IAMTimelineGroup_SetMediaTypeForVB(This,Val) \
+ (This)->lpVtbl -> SetMediaTypeForVB(This,Val)
+
+#define IAMTimelineGroup_GetOutputBuffering(This,pnBuffer) \
+ (This)->lpVtbl -> GetOutputBuffering(This,pnBuffer)
+
+#define IAMTimelineGroup_SetOutputBuffering(This,nBuffer) \
+ (This)->lpVtbl -> SetOutputBuffering(This,nBuffer)
+
+#define IAMTimelineGroup_SetSmartRecompressFormat(This,pFormat) \
+ (This)->lpVtbl -> SetSmartRecompressFormat(This,pFormat)
+
+#define IAMTimelineGroup_GetSmartRecompressFormat(This,ppFormat) \
+ (This)->lpVtbl -> GetSmartRecompressFormat(This,ppFormat)
+
+#define IAMTimelineGroup_IsSmartRecompressFormatSet(This,pVal) \
+ (This)->lpVtbl -> IsSmartRecompressFormatSet(This,pVal)
+
+#define IAMTimelineGroup_IsRecompressFormatDirty(This,pVal) \
+ (This)->lpVtbl -> IsRecompressFormatDirty(This,pVal)
+
+#define IAMTimelineGroup_ClearRecompressFormatDirty(This) \
+ (This)->lpVtbl -> ClearRecompressFormatDirty(This)
+
+#define IAMTimelineGroup_SetRecompFormatFromSource(This,pSource) \
+ (This)->lpVtbl -> SetRecompFormatFromSource(This,pSource)
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineGroup_SetTimeline_Proxy(
+ IAMTimelineGroup * This,
+ IAMTimeline *pTimeline);
+
+
+void __RPC_STUB IAMTimelineGroup_SetTimeline_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineGroup_GetTimeline_Proxy(
+ IAMTimelineGroup * This,
+ /* [out] */ IAMTimeline **ppTimeline);
+
+
+void __RPC_STUB IAMTimelineGroup_GetTimeline_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineGroup_GetPriority_Proxy(
+ IAMTimelineGroup * This,
+ long *pPriority);
+
+
+void __RPC_STUB IAMTimelineGroup_GetPriority_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineGroup_GetMediaType_Proxy(
+ IAMTimelineGroup * This,
+ /* [out] */ AM_MEDIA_TYPE *__MIDL_0040);
+
+
+void __RPC_STUB IAMTimelineGroup_GetMediaType_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineGroup_SetMediaType_Proxy(
+ IAMTimelineGroup * This,
+ /* [in] */ AM_MEDIA_TYPE *__MIDL_0041);
+
+
+void __RPC_STUB IAMTimelineGroup_SetMediaType_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineGroup_SetOutputFPS_Proxy(
+ IAMTimelineGroup * This,
+ double FPS);
+
+
+void __RPC_STUB IAMTimelineGroup_SetOutputFPS_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineGroup_GetOutputFPS_Proxy(
+ IAMTimelineGroup * This,
+ double *pFPS);
+
+
+void __RPC_STUB IAMTimelineGroup_GetOutputFPS_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineGroup_SetGroupName_Proxy(
+ IAMTimelineGroup * This,
+ BSTR pGroupName);
+
+
+void __RPC_STUB IAMTimelineGroup_SetGroupName_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineGroup_GetGroupName_Proxy(
+ IAMTimelineGroup * This,
+ /* [retval][out] */ BSTR *pGroupName);
+
+
+void __RPC_STUB IAMTimelineGroup_GetGroupName_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineGroup_SetPreviewMode_Proxy(
+ IAMTimelineGroup * This,
+ BOOL fPreview);
+
+
+void __RPC_STUB IAMTimelineGroup_SetPreviewMode_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineGroup_GetPreviewMode_Proxy(
+ IAMTimelineGroup * This,
+ BOOL *pfPreview);
+
+
+void __RPC_STUB IAMTimelineGroup_GetPreviewMode_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineGroup_SetMediaTypeForVB_Proxy(
+ IAMTimelineGroup * This,
+ /* [in] */ long Val);
+
+
+void __RPC_STUB IAMTimelineGroup_SetMediaTypeForVB_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineGroup_GetOutputBuffering_Proxy(
+ IAMTimelineGroup * This,
+ /* [out] */ int *pnBuffer);
+
+
+void __RPC_STUB IAMTimelineGroup_GetOutputBuffering_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineGroup_SetOutputBuffering_Proxy(
+ IAMTimelineGroup * This,
+ /* [in] */ int nBuffer);
+
+
+void __RPC_STUB IAMTimelineGroup_SetOutputBuffering_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IAMTimelineGroup_SetSmartRecompressFormat_Proxy(
+ IAMTimelineGroup * This,
+ long *pFormat);
+
+
+void __RPC_STUB IAMTimelineGroup_SetSmartRecompressFormat_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IAMTimelineGroup_GetSmartRecompressFormat_Proxy(
+ IAMTimelineGroup * This,
+ long **ppFormat);
+
+
+void __RPC_STUB IAMTimelineGroup_GetSmartRecompressFormat_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IAMTimelineGroup_IsSmartRecompressFormatSet_Proxy(
+ IAMTimelineGroup * This,
+ BOOL *pVal);
+
+
+void __RPC_STUB IAMTimelineGroup_IsSmartRecompressFormatSet_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IAMTimelineGroup_IsRecompressFormatDirty_Proxy(
+ IAMTimelineGroup * This,
+ BOOL *pVal);
+
+
+void __RPC_STUB IAMTimelineGroup_IsRecompressFormatDirty_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IAMTimelineGroup_ClearRecompressFormatDirty_Proxy(
+ IAMTimelineGroup * This);
+
+
+void __RPC_STUB IAMTimelineGroup_ClearRecompressFormatDirty_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IAMTimelineGroup_SetRecompFormatFromSource_Proxy(
+ IAMTimelineGroup * This,
+ IAMTimelineSrc *pSource);
+
+
+void __RPC_STUB IAMTimelineGroup_SetRecompFormatFromSource_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+
+#endif /* __IAMTimelineGroup_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAMTimeline_INTERFACE_DEFINED__
+#define __IAMTimeline_INTERFACE_DEFINED__
+
+/* interface IAMTimeline */
+/* [unique][helpstring][uuid][object] */
+
+
+EXTERN_C const IID IID_IAMTimeline;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("78530B74-61F9-11D2-8CAD-00A024580902")
+ IAMTimeline : public IUnknown
+ {
+ public:
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE CreateEmptyNode(
+ /* [out] */ IAMTimelineObj **ppObj,
+ TIMELINE_MAJOR_TYPE Type) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE AddGroup(
+ IAMTimelineObj *pGroup) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE RemGroupFromList(
+ IAMTimelineObj *pGroup) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetGroup(
+ /* [out] */ IAMTimelineObj **ppGroup,
+ long WhichGroup) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetGroupCount(
+ long *pCount) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE ClearAllGroups( void) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetInsertMode(
+ long *pMode) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetInsertMode(
+ long Mode) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE EnableTransitions(
+ BOOL fEnabled) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE TransitionsEnabled(
+ BOOL *pfEnabled) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE EnableEffects(
+ BOOL fEnabled) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE EffectsEnabled(
+ BOOL *pfEnabled) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetInterestRange(
+ REFERENCE_TIME Start,
+ REFERENCE_TIME Stop) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetDuration(
+ REFERENCE_TIME *pDuration) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetDuration2(
+ double *pDuration) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetDefaultFPS(
+ double FPS) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetDefaultFPS(
+ double *pFPS) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE IsDirty(
+ BOOL *pDirty) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetDirtyRange(
+ REFERENCE_TIME *pStart,
+ REFERENCE_TIME *pStop) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetCountOfType(
+ long Group,
+ long *pVal,
+ long *pValWithComps,
+ TIMELINE_MAJOR_TYPE MajorType) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE ValidateSourceNames(
+ long ValidateFlags,
+ IMediaLocator *pOverride,
+ LONG_PTR NotifyEventHandle) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetDefaultTransition(
+ GUID *pGuid) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetDefaultTransition(
+ GUID *pGuid) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetDefaultEffect(
+ GUID *pGuid) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetDefaultEffect(
+ GUID *pGuid) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetDefaultTransitionB(
+ BSTR pGuid) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetDefaultTransitionB(
+ /* [retval][out] */ BSTR *pGuid) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetDefaultEffectB(
+ BSTR pGuid) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetDefaultEffectB(
+ /* [retval][out] */ BSTR *pGuid) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IAMTimelineVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IAMTimeline * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IAMTimeline * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IAMTimeline * This);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *CreateEmptyNode )(
+ IAMTimeline * This,
+ /* [out] */ IAMTimelineObj **ppObj,
+ TIMELINE_MAJOR_TYPE Type);
+
+ HRESULT ( STDMETHODCALLTYPE *AddGroup )(
+ IAMTimeline * This,
+ IAMTimelineObj *pGroup);
+
+ HRESULT ( STDMETHODCALLTYPE *RemGroupFromList )(
+ IAMTimeline * This,
+ IAMTimelineObj *pGroup);
+
+ HRESULT ( STDMETHODCALLTYPE *GetGroup )(
+ IAMTimeline * This,
+ /* [out] */ IAMTimelineObj **ppGroup,
+ long WhichGroup);
+
+ HRESULT ( STDMETHODCALLTYPE *GetGroupCount )(
+ IAMTimeline * This,
+ long *pCount);
+
+ HRESULT ( STDMETHODCALLTYPE *ClearAllGroups )(
+ IAMTimeline * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetInsertMode )(
+ IAMTimeline * This,
+ long *pMode);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetInsertMode )(
+ IAMTimeline * This,
+ long Mode);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *EnableTransitions )(
+ IAMTimeline * This,
+ BOOL fEnabled);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *TransitionsEnabled )(
+ IAMTimeline * This,
+ BOOL *pfEnabled);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *EnableEffects )(
+ IAMTimeline * This,
+ BOOL fEnabled);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *EffectsEnabled )(
+ IAMTimeline * This,
+ BOOL *pfEnabled);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetInterestRange )(
+ IAMTimeline * This,
+ REFERENCE_TIME Start,
+ REFERENCE_TIME Stop);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetDuration )(
+ IAMTimeline * This,
+ REFERENCE_TIME *pDuration);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetDuration2 )(
+ IAMTimeline * This,
+ double *pDuration);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetDefaultFPS )(
+ IAMTimeline * This,
+ double FPS);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetDefaultFPS )(
+ IAMTimeline * This,
+ double *pFPS);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *IsDirty )(
+ IAMTimeline * This,
+ BOOL *pDirty);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetDirtyRange )(
+ IAMTimeline * This,
+ REFERENCE_TIME *pStart,
+ REFERENCE_TIME *pStop);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetCountOfType )(
+ IAMTimeline * This,
+ long Group,
+ long *pVal,
+ long *pValWithComps,
+ TIMELINE_MAJOR_TYPE MajorType);
+
+ HRESULT ( STDMETHODCALLTYPE *ValidateSourceNames )(
+ IAMTimeline * This,
+ long ValidateFlags,
+ IMediaLocator *pOverride,
+ LONG_PTR NotifyEventHandle);
+
+ HRESULT ( STDMETHODCALLTYPE *SetDefaultTransition )(
+ IAMTimeline * This,
+ GUID *pGuid);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDefaultTransition )(
+ IAMTimeline * This,
+ GUID *pGuid);
+
+ HRESULT ( STDMETHODCALLTYPE *SetDefaultEffect )(
+ IAMTimeline * This,
+ GUID *pGuid);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDefaultEffect )(
+ IAMTimeline * This,
+ GUID *pGuid);
+
+ HRESULT ( STDMETHODCALLTYPE *SetDefaultTransitionB )(
+ IAMTimeline * This,
+ BSTR pGuid);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDefaultTransitionB )(
+ IAMTimeline * This,
+ /* [retval][out] */ BSTR *pGuid);
+
+ HRESULT ( STDMETHODCALLTYPE *SetDefaultEffectB )(
+ IAMTimeline * This,
+ BSTR pGuid);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDefaultEffectB )(
+ IAMTimeline * This,
+ /* [retval][out] */ BSTR *pGuid);
+
+ END_INTERFACE
+ } IAMTimelineVtbl;
+
+ interface IAMTimeline
+ {
+ CONST_VTBL struct IAMTimelineVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IAMTimeline_QueryInterface(This,riid,ppvObject) \
+ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
+
+#define IAMTimeline_AddRef(This) \
+ (This)->lpVtbl -> AddRef(This)
+
+#define IAMTimeline_Release(This) \
+ (This)->lpVtbl -> Release(This)
+
+
+#define IAMTimeline_CreateEmptyNode(This,ppObj,Type) \
+ (This)->lpVtbl -> CreateEmptyNode(This,ppObj,Type)
+
+#define IAMTimeline_AddGroup(This,pGroup) \
+ (This)->lpVtbl -> AddGroup(This,pGroup)
+
+#define IAMTimeline_RemGroupFromList(This,pGroup) \
+ (This)->lpVtbl -> RemGroupFromList(This,pGroup)
+
+#define IAMTimeline_GetGroup(This,ppGroup,WhichGroup) \
+ (This)->lpVtbl -> GetGroup(This,ppGroup,WhichGroup)
+
+#define IAMTimeline_GetGroupCount(This,pCount) \
+ (This)->lpVtbl -> GetGroupCount(This,pCount)
+
+#define IAMTimeline_ClearAllGroups(This) \
+ (This)->lpVtbl -> ClearAllGroups(This)
+
+#define IAMTimeline_GetInsertMode(This,pMode) \
+ (This)->lpVtbl -> GetInsertMode(This,pMode)
+
+#define IAMTimeline_SetInsertMode(This,Mode) \
+ (This)->lpVtbl -> SetInsertMode(This,Mode)
+
+#define IAMTimeline_EnableTransitions(This,fEnabled) \
+ (This)->lpVtbl -> EnableTransitions(This,fEnabled)
+
+#define IAMTimeline_TransitionsEnabled(This,pfEnabled) \
+ (This)->lpVtbl -> TransitionsEnabled(This,pfEnabled)
+
+#define IAMTimeline_EnableEffects(This,fEnabled) \
+ (This)->lpVtbl -> EnableEffects(This,fEnabled)
+
+#define IAMTimeline_EffectsEnabled(This,pfEnabled) \
+ (This)->lpVtbl -> EffectsEnabled(This,pfEnabled)
+
+#define IAMTimeline_SetInterestRange(This,Start,Stop) \
+ (This)->lpVtbl -> SetInterestRange(This,Start,Stop)
+
+#define IAMTimeline_GetDuration(This,pDuration) \
+ (This)->lpVtbl -> GetDuration(This,pDuration)
+
+#define IAMTimeline_GetDuration2(This,pDuration) \
+ (This)->lpVtbl -> GetDuration2(This,pDuration)
+
+#define IAMTimeline_SetDefaultFPS(This,FPS) \
+ (This)->lpVtbl -> SetDefaultFPS(This,FPS)
+
+#define IAMTimeline_GetDefaultFPS(This,pFPS) \
+ (This)->lpVtbl -> GetDefaultFPS(This,pFPS)
+
+#define IAMTimeline_IsDirty(This,pDirty) \
+ (This)->lpVtbl -> IsDirty(This,pDirty)
+
+#define IAMTimeline_GetDirtyRange(This,pStart,pStop) \
+ (This)->lpVtbl -> GetDirtyRange(This,pStart,pStop)
+
+#define IAMTimeline_GetCountOfType(This,Group,pVal,pValWithComps,MajorType) \
+ (This)->lpVtbl -> GetCountOfType(This,Group,pVal,pValWithComps,MajorType)
+
+#define IAMTimeline_ValidateSourceNames(This,ValidateFlags,pOverride,NotifyEventHandle) \
+ (This)->lpVtbl -> ValidateSourceNames(This,ValidateFlags,pOverride,NotifyEventHandle)
+
+#define IAMTimeline_SetDefaultTransition(This,pGuid) \
+ (This)->lpVtbl -> SetDefaultTransition(This,pGuid)
+
+#define IAMTimeline_GetDefaultTransition(This,pGuid) \
+ (This)->lpVtbl -> GetDefaultTransition(This,pGuid)
+
+#define IAMTimeline_SetDefaultEffect(This,pGuid) \
+ (This)->lpVtbl -> SetDefaultEffect(This,pGuid)
+
+#define IAMTimeline_GetDefaultEffect(This,pGuid) \
+ (This)->lpVtbl -> GetDefaultEffect(This,pGuid)
+
+#define IAMTimeline_SetDefaultTransitionB(This,pGuid) \
+ (This)->lpVtbl -> SetDefaultTransitionB(This,pGuid)
+
+#define IAMTimeline_GetDefaultTransitionB(This,pGuid) \
+ (This)->lpVtbl -> GetDefaultTransitionB(This,pGuid)
+
+#define IAMTimeline_SetDefaultEffectB(This,pGuid) \
+ (This)->lpVtbl -> SetDefaultEffectB(This,pGuid)
+
+#define IAMTimeline_GetDefaultEffectB(This,pGuid) \
+ (This)->lpVtbl -> GetDefaultEffectB(This,pGuid)
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimeline_CreateEmptyNode_Proxy(
+ IAMTimeline * This,
+ /* [out] */ IAMTimelineObj **ppObj,
+ TIMELINE_MAJOR_TYPE Type);
+
+
+void __RPC_STUB IAMTimeline_CreateEmptyNode_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IAMTimeline_AddGroup_Proxy(
+ IAMTimeline * This,
+ IAMTimelineObj *pGroup);
+
+
+void __RPC_STUB IAMTimeline_AddGroup_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IAMTimeline_RemGroupFromList_Proxy(
+ IAMTimeline * This,
+ IAMTimelineObj *pGroup);
+
+
+void __RPC_STUB IAMTimeline_RemGroupFromList_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IAMTimeline_GetGroup_Proxy(
+ IAMTimeline * This,
+ /* [out] */ IAMTimelineObj **ppGroup,
+ long WhichGroup);
+
+
+void __RPC_STUB IAMTimeline_GetGroup_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IAMTimeline_GetGroupCount_Proxy(
+ IAMTimeline * This,
+ long *pCount);
+
+
+void __RPC_STUB IAMTimeline_GetGroupCount_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IAMTimeline_ClearAllGroups_Proxy(
+ IAMTimeline * This);
+
+
+void __RPC_STUB IAMTimeline_ClearAllGroups_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IAMTimeline_GetInsertMode_Proxy(
+ IAMTimeline * This,
+ long *pMode);
+
+
+void __RPC_STUB IAMTimeline_GetInsertMode_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimeline_SetInsertMode_Proxy(
+ IAMTimeline * This,
+ long Mode);
+
+
+void __RPC_STUB IAMTimeline_SetInsertMode_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimeline_EnableTransitions_Proxy(
+ IAMTimeline * This,
+ BOOL fEnabled);
+
+
+void __RPC_STUB IAMTimeline_EnableTransitions_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimeline_TransitionsEnabled_Proxy(
+ IAMTimeline * This,
+ BOOL *pfEnabled);
+
+
+void __RPC_STUB IAMTimeline_TransitionsEnabled_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimeline_EnableEffects_Proxy(
+ IAMTimeline * This,
+ BOOL fEnabled);
+
+
+void __RPC_STUB IAMTimeline_EnableEffects_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimeline_EffectsEnabled_Proxy(
+ IAMTimeline * This,
+ BOOL *pfEnabled);
+
+
+void __RPC_STUB IAMTimeline_EffectsEnabled_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimeline_SetInterestRange_Proxy(
+ IAMTimeline * This,
+ REFERENCE_TIME Start,
+ REFERENCE_TIME Stop);
+
+
+void __RPC_STUB IAMTimeline_SetInterestRange_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimeline_GetDuration_Proxy(
+ IAMTimeline * This,
+ REFERENCE_TIME *pDuration);
+
+
+void __RPC_STUB IAMTimeline_GetDuration_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimeline_GetDuration2_Proxy(
+ IAMTimeline * This,
+ double *pDuration);
+
+
+void __RPC_STUB IAMTimeline_GetDuration2_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimeline_SetDefaultFPS_Proxy(
+ IAMTimeline * This,
+ double FPS);
+
+
+void __RPC_STUB IAMTimeline_SetDefaultFPS_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimeline_GetDefaultFPS_Proxy(
+ IAMTimeline * This,
+ double *pFPS);
+
+
+void __RPC_STUB IAMTimeline_GetDefaultFPS_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimeline_IsDirty_Proxy(
+ IAMTimeline * This,
+ BOOL *pDirty);
+
+
+void __RPC_STUB IAMTimeline_IsDirty_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimeline_GetDirtyRange_Proxy(
+ IAMTimeline * This,
+ REFERENCE_TIME *pStart,
+ REFERENCE_TIME *pStop);
+
+
+void __RPC_STUB IAMTimeline_GetDirtyRange_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimeline_GetCountOfType_Proxy(
+ IAMTimeline * This,
+ long Group,
+ long *pVal,
+ long *pValWithComps,
+ TIMELINE_MAJOR_TYPE MajorType);
+
+
+void __RPC_STUB IAMTimeline_GetCountOfType_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IAMTimeline_ValidateSourceNames_Proxy(
+ IAMTimeline * This,
+ long ValidateFlags,
+ IMediaLocator *pOverride,
+ LONG_PTR NotifyEventHandle);
+
+
+void __RPC_STUB IAMTimeline_ValidateSourceNames_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IAMTimeline_SetDefaultTransition_Proxy(
+ IAMTimeline * This,
+ GUID *pGuid);
+
+
+void __RPC_STUB IAMTimeline_SetDefaultTransition_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IAMTimeline_GetDefaultTransition_Proxy(
+ IAMTimeline * This,
+ GUID *pGuid);
+
+
+void __RPC_STUB IAMTimeline_GetDefaultTransition_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IAMTimeline_SetDefaultEffect_Proxy(
+ IAMTimeline * This,
+ GUID *pGuid);
+
+
+void __RPC_STUB IAMTimeline_SetDefaultEffect_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IAMTimeline_GetDefaultEffect_Proxy(
+ IAMTimeline * This,
+ GUID *pGuid);
+
+
+void __RPC_STUB IAMTimeline_GetDefaultEffect_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IAMTimeline_SetDefaultTransitionB_Proxy(
+ IAMTimeline * This,
+ BSTR pGuid);
+
+
+void __RPC_STUB IAMTimeline_SetDefaultTransitionB_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IAMTimeline_GetDefaultTransitionB_Proxy(
+ IAMTimeline * This,
+ /* [retval][out] */ BSTR *pGuid);
+
+
+void __RPC_STUB IAMTimeline_GetDefaultTransitionB_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IAMTimeline_SetDefaultEffectB_Proxy(
+ IAMTimeline * This,
+ BSTR pGuid);
+
+
+void __RPC_STUB IAMTimeline_SetDefaultEffectB_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE IAMTimeline_GetDefaultEffectB_Proxy(
+ IAMTimeline * This,
+ /* [retval][out] */ BSTR *pGuid);
+
+
+void __RPC_STUB IAMTimeline_GetDefaultEffectB_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+
+#endif /* __IAMTimeline_INTERFACE_DEFINED__ */
+
+
+#ifndef __IXml2Dex_INTERFACE_DEFINED__
+#define __IXml2Dex_INTERFACE_DEFINED__
+
+/* interface IXml2Dex */
+/* [unique][helpstring][uuid][object] */
+
+
+EXTERN_C const IID IID_IXml2Dex;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("18C628ED-962A-11D2-8D08-00A0C9441E20")
+ IXml2Dex : public IDispatch
+ {
+ public:
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE CreateGraphFromFile(
+ /* [out] */ IUnknown **ppGraph,
+ IUnknown *pTimeline,
+ BSTR Filename) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE WriteGrfFile(
+ IUnknown *pGraph,
+ BSTR FileName) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE WriteXMLFile(
+ IUnknown *pTimeline,
+ BSTR FileName) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ReadXMLFile(
+ IUnknown *pTimeline,
+ BSTR XMLName) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Delete(
+ IUnknown *pTimeline,
+ double dStart,
+ double dEnd) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE WriteXMLPart(
+ IUnknown *pTimeline,
+ double dStart,
+ double dEnd,
+ BSTR FileName) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE PasteXMLFile(
+ IUnknown *pTimeline,
+ double dStart,
+ BSTR FileName) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE CopyXML(
+ IUnknown *pTimeline,
+ double dStart,
+ double dEnd) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE PasteXML(
+ IUnknown *pTimeline,
+ double dStart) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Reset( void) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ReadXML(
+ IUnknown *pTimeline,
+ IUnknown *pXML) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE WriteXML(
+ IUnknown *pTimeline,
+ BSTR *pbstrXML) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IXml2DexVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IXml2Dex * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IXml2Dex * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IXml2Dex * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )(
+ IXml2Dex * This,
+ /* [out] */ UINT *pctinfo);
+
+ HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )(
+ IXml2Dex * This,
+ /* [in] */ UINT iTInfo,
+ /* [in] */ LCID lcid,
+ /* [out] */ ITypeInfo **ppTInfo);
+
+ HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )(
+ IXml2Dex * This,
+ /* [in] */ REFIID riid,
+ /* [size_is][in] */ LPOLESTR *rgszNames,
+ /* [in] */ UINT cNames,
+ /* [in] */ LCID lcid,
+ /* [size_is][out] */ DISPID *rgDispId);
+
+ /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )(
+ IXml2Dex * This,
+ /* [in] */ DISPID dispIdMember,
+ /* [in] */ REFIID riid,
+ /* [in] */ LCID lcid,
+ /* [in] */ WORD wFlags,
+ /* [out][in] */ DISPPARAMS *pDispParams,
+ /* [out] */ VARIANT *pVarResult,
+ /* [out] */ EXCEPINFO *pExcepInfo,
+ /* [out] */ UINT *puArgErr);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *CreateGraphFromFile )(
+ IXml2Dex * This,
+ /* [out] */ IUnknown **ppGraph,
+ IUnknown *pTimeline,
+ BSTR Filename);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *WriteGrfFile )(
+ IXml2Dex * This,
+ IUnknown *pGraph,
+ BSTR FileName);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *WriteXMLFile )(
+ IXml2Dex * This,
+ IUnknown *pTimeline,
+ BSTR FileName);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *ReadXMLFile )(
+ IXml2Dex * This,
+ IUnknown *pTimeline,
+ BSTR XMLName);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Delete )(
+ IXml2Dex * This,
+ IUnknown *pTimeline,
+ double dStart,
+ double dEnd);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *WriteXMLPart )(
+ IXml2Dex * This,
+ IUnknown *pTimeline,
+ double dStart,
+ double dEnd,
+ BSTR FileName);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *PasteXMLFile )(
+ IXml2Dex * This,
+ IUnknown *pTimeline,
+ double dStart,
+ BSTR FileName);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *CopyXML )(
+ IXml2Dex * This,
+ IUnknown *pTimeline,
+ double dStart,
+ double dEnd);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *PasteXML )(
+ IXml2Dex * This,
+ IUnknown *pTimeline,
+ double dStart);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Reset )(
+ IXml2Dex * This);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *ReadXML )(
+ IXml2Dex * This,
+ IUnknown *pTimeline,
+ IUnknown *pXML);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *WriteXML )(
+ IXml2Dex * This,
+ IUnknown *pTimeline,
+ BSTR *pbstrXML);
+
+ END_INTERFACE
+ } IXml2DexVtbl;
+
+ interface IXml2Dex
+ {
+ CONST_VTBL struct IXml2DexVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IXml2Dex_QueryInterface(This,riid,ppvObject) \
+ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
+
+#define IXml2Dex_AddRef(This) \
+ (This)->lpVtbl -> AddRef(This)
+
+#define IXml2Dex_Release(This) \
+ (This)->lpVtbl -> Release(This)
+
+
+#define IXml2Dex_GetTypeInfoCount(This,pctinfo) \
+ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo)
+
+#define IXml2Dex_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \
+ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo)
+
+#define IXml2Dex_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \
+ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
+
+#define IXml2Dex_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \
+ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
+
+
+#define IXml2Dex_CreateGraphFromFile(This,ppGraph,pTimeline,Filename) \
+ (This)->lpVtbl -> CreateGraphFromFile(This,ppGraph,pTimeline,Filename)
+
+#define IXml2Dex_WriteGrfFile(This,pGraph,FileName) \
+ (This)->lpVtbl -> WriteGrfFile(This,pGraph,FileName)
+
+#define IXml2Dex_WriteXMLFile(This,pTimeline,FileName) \
+ (This)->lpVtbl -> WriteXMLFile(This,pTimeline,FileName)
+
+#define IXml2Dex_ReadXMLFile(This,pTimeline,XMLName) \
+ (This)->lpVtbl -> ReadXMLFile(This,pTimeline,XMLName)
+
+#define IXml2Dex_Delete(This,pTimeline,dStart,dEnd) \
+ (This)->lpVtbl -> Delete(This,pTimeline,dStart,dEnd)
+
+#define IXml2Dex_WriteXMLPart(This,pTimeline,dStart,dEnd,FileName) \
+ (This)->lpVtbl -> WriteXMLPart(This,pTimeline,dStart,dEnd,FileName)
+
+#define IXml2Dex_PasteXMLFile(This,pTimeline,dStart,FileName) \
+ (This)->lpVtbl -> PasteXMLFile(This,pTimeline,dStart,FileName)
+
+#define IXml2Dex_CopyXML(This,pTimeline,dStart,dEnd) \
+ (This)->lpVtbl -> CopyXML(This,pTimeline,dStart,dEnd)
+
+#define IXml2Dex_PasteXML(This,pTimeline,dStart) \
+ (This)->lpVtbl -> PasteXML(This,pTimeline,dStart)
+
+#define IXml2Dex_Reset(This) \
+ (This)->lpVtbl -> Reset(This)
+
+#define IXml2Dex_ReadXML(This,pTimeline,pXML) \
+ (This)->lpVtbl -> ReadXML(This,pTimeline,pXML)
+
+#define IXml2Dex_WriteXML(This,pTimeline,pbstrXML) \
+ (This)->lpVtbl -> WriteXML(This,pTimeline,pbstrXML)
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IXml2Dex_CreateGraphFromFile_Proxy(
+ IXml2Dex * This,
+ /* [out] */ IUnknown **ppGraph,
+ IUnknown *pTimeline,
+ BSTR Filename);
+
+
+void __RPC_STUB IXml2Dex_CreateGraphFromFile_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IXml2Dex_WriteGrfFile_Proxy(
+ IXml2Dex * This,
+ IUnknown *pGraph,
+ BSTR FileName);
+
+
+void __RPC_STUB IXml2Dex_WriteGrfFile_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IXml2Dex_WriteXMLFile_Proxy(
+ IXml2Dex * This,
+ IUnknown *pTimeline,
+ BSTR FileName);
+
+
+void __RPC_STUB IXml2Dex_WriteXMLFile_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IXml2Dex_ReadXMLFile_Proxy(
+ IXml2Dex * This,
+ IUnknown *pTimeline,
+ BSTR XMLName);
+
+
+void __RPC_STUB IXml2Dex_ReadXMLFile_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IXml2Dex_Delete_Proxy(
+ IXml2Dex * This,
+ IUnknown *pTimeline,
+ double dStart,
+ double dEnd);
+
+
+void __RPC_STUB IXml2Dex_Delete_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IXml2Dex_WriteXMLPart_Proxy(
+ IXml2Dex * This,
+ IUnknown *pTimeline,
+ double dStart,
+ double dEnd,
+ BSTR FileName);
+
+
+void __RPC_STUB IXml2Dex_WriteXMLPart_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IXml2Dex_PasteXMLFile_Proxy(
+ IXml2Dex * This,
+ IUnknown *pTimeline,
+ double dStart,
+ BSTR FileName);
+
+
+void __RPC_STUB IXml2Dex_PasteXMLFile_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IXml2Dex_CopyXML_Proxy(
+ IXml2Dex * This,
+ IUnknown *pTimeline,
+ double dStart,
+ double dEnd);
+
+
+void __RPC_STUB IXml2Dex_CopyXML_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IXml2Dex_PasteXML_Proxy(
+ IXml2Dex * This,
+ IUnknown *pTimeline,
+ double dStart);
+
+
+void __RPC_STUB IXml2Dex_PasteXML_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IXml2Dex_Reset_Proxy(
+ IXml2Dex * This);
+
+
+void __RPC_STUB IXml2Dex_Reset_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IXml2Dex_ReadXML_Proxy(
+ IXml2Dex * This,
+ IUnknown *pTimeline,
+ IUnknown *pXML);
+
+
+void __RPC_STUB IXml2Dex_ReadXML_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IXml2Dex_WriteXML_Proxy(
+ IXml2Dex * This,
+ IUnknown *pTimeline,
+ BSTR *pbstrXML);
+
+
+void __RPC_STUB IXml2Dex_WriteXML_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+
+#endif /* __IXml2Dex_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAMErrorLog_INTERFACE_DEFINED__
+#define __IAMErrorLog_INTERFACE_DEFINED__
+
+/* interface IAMErrorLog */
+/* [unique][helpstring][uuid][object] */
+
+
+EXTERN_C const IID IID_IAMErrorLog;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("E43E73A2-0EFA-11d3-9601-00A0C9441E20")
+ IAMErrorLog : public IUnknown
+ {
+ public:
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE LogError(
+ long Severity,
+ BSTR pErrorString,
+ long ErrorCode,
+ long hresult,
+ /* [in] */ VARIANT *pExtraInfo) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IAMErrorLogVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IAMErrorLog * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IAMErrorLog * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IAMErrorLog * This);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *LogError )(
+ IAMErrorLog * This,
+ long Severity,
+ BSTR pErrorString,
+ long ErrorCode,
+ long hresult,
+ /* [in] */ VARIANT *pExtraInfo);
+
+ END_INTERFACE
+ } IAMErrorLogVtbl;
+
+ interface IAMErrorLog
+ {
+ CONST_VTBL struct IAMErrorLogVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IAMErrorLog_QueryInterface(This,riid,ppvObject) \
+ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
+
+#define IAMErrorLog_AddRef(This) \
+ (This)->lpVtbl -> AddRef(This)
+
+#define IAMErrorLog_Release(This) \
+ (This)->lpVtbl -> Release(This)
+
+
+#define IAMErrorLog_LogError(This,Severity,pErrorString,ErrorCode,hresult,pExtraInfo) \
+ (This)->lpVtbl -> LogError(This,Severity,pErrorString,ErrorCode,hresult,pExtraInfo)
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMErrorLog_LogError_Proxy(
+ IAMErrorLog * This,
+ long Severity,
+ BSTR pErrorString,
+ long ErrorCode,
+ long hresult,
+ /* [in] */ VARIANT *pExtraInfo);
+
+
+void __RPC_STUB IAMErrorLog_LogError_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+
+#endif /* __IAMErrorLog_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAMSetErrorLog_INTERFACE_DEFINED__
+#define __IAMSetErrorLog_INTERFACE_DEFINED__
+
+/* interface IAMSetErrorLog */
+/* [unique][helpstring][uuid][object] */
+
+
+EXTERN_C const IID IID_IAMSetErrorLog;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("963566DA-BE21-4eaf-88E9-35704F8F52A1")
+ IAMSetErrorLog : public IUnknown
+ {
+ public:
+ virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_ErrorLog(
+ /* [retval][out] */ IAMErrorLog **pVal) = 0;
+
+ virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_ErrorLog(
+ /* [in] */ IAMErrorLog *newVal) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IAMSetErrorLogVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IAMSetErrorLog * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IAMSetErrorLog * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IAMSetErrorLog * This);
+
+ /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ErrorLog )(
+ IAMSetErrorLog * This,
+ /* [retval][out] */ IAMErrorLog **pVal);
+
+ /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_ErrorLog )(
+ IAMSetErrorLog * This,
+ /* [in] */ IAMErrorLog *newVal);
+
+ END_INTERFACE
+ } IAMSetErrorLogVtbl;
+
+ interface IAMSetErrorLog
+ {
+ CONST_VTBL struct IAMSetErrorLogVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IAMSetErrorLog_QueryInterface(This,riid,ppvObject) \
+ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
+
+#define IAMSetErrorLog_AddRef(This) \
+ (This)->lpVtbl -> AddRef(This)
+
+#define IAMSetErrorLog_Release(This) \
+ (This)->lpVtbl -> Release(This)
+
+
+#define IAMSetErrorLog_get_ErrorLog(This,pVal) \
+ (This)->lpVtbl -> get_ErrorLog(This,pVal)
+
+#define IAMSetErrorLog_put_ErrorLog(This,newVal) \
+ (This)->lpVtbl -> put_ErrorLog(This,newVal)
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+/* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IAMSetErrorLog_get_ErrorLog_Proxy(
+ IAMSetErrorLog * This,
+ /* [retval][out] */ IAMErrorLog **pVal);
+
+
+void __RPC_STUB IAMSetErrorLog_get_ErrorLog_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+/* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IAMSetErrorLog_put_ErrorLog_Proxy(
+ IAMSetErrorLog * This,
+ /* [in] */ IAMErrorLog *newVal);
+
+
+void __RPC_STUB IAMSetErrorLog_put_ErrorLog_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+
+#endif /* __IAMSetErrorLog_INTERFACE_DEFINED__ */
+
+
+#ifndef __ISampleGrabberCB_INTERFACE_DEFINED__
+#define __ISampleGrabberCB_INTERFACE_DEFINED__
+
+/* interface ISampleGrabberCB */
+/* [unique][helpstring][local][uuid][object] */
+
+
+EXTERN_C const IID IID_ISampleGrabberCB;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("0579154A-2B53-4994-B0D0-E773148EFF85")
+ ISampleGrabberCB : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE SampleCB(
+ double SampleTime,
+ IMediaSample *pSample) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE BufferCB(
+ double SampleTime,
+ BYTE *pBuffer,
+ long BufferLen) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct ISampleGrabberCBVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ ISampleGrabberCB * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ ISampleGrabberCB * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ ISampleGrabberCB * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SampleCB )(
+ ISampleGrabberCB * This,
+ double SampleTime,
+ IMediaSample *pSample);
+
+ HRESULT ( STDMETHODCALLTYPE *BufferCB )(
+ ISampleGrabberCB * This,
+ double SampleTime,
+ BYTE *pBuffer,
+ long BufferLen);
+
+ END_INTERFACE
+ } ISampleGrabberCBVtbl;
+
+ interface ISampleGrabberCB
+ {
+ CONST_VTBL struct ISampleGrabberCBVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define ISampleGrabberCB_QueryInterface(This,riid,ppvObject) \
+ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
+
+#define ISampleGrabberCB_AddRef(This) \
+ (This)->lpVtbl -> AddRef(This)
+
+#define ISampleGrabberCB_Release(This) \
+ (This)->lpVtbl -> Release(This)
+
+
+#define ISampleGrabberCB_SampleCB(This,SampleTime,pSample) \
+ (This)->lpVtbl -> SampleCB(This,SampleTime,pSample)
+
+#define ISampleGrabberCB_BufferCB(This,SampleTime,pBuffer,BufferLen) \
+ (This)->lpVtbl -> BufferCB(This,SampleTime,pBuffer,BufferLen)
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+HRESULT STDMETHODCALLTYPE ISampleGrabberCB_SampleCB_Proxy(
+ ISampleGrabberCB * This,
+ double SampleTime,
+ IMediaSample *pSample);
+
+
+void __RPC_STUB ISampleGrabberCB_SampleCB_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE ISampleGrabberCB_BufferCB_Proxy(
+ ISampleGrabberCB * This,
+ double SampleTime,
+ BYTE *pBuffer,
+ long BufferLen);
+
+
+void __RPC_STUB ISampleGrabberCB_BufferCB_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+
+#endif /* __ISampleGrabberCB_INTERFACE_DEFINED__ */
+
+
+#ifndef __ISampleGrabber_INTERFACE_DEFINED__
+#define __ISampleGrabber_INTERFACE_DEFINED__
+
+/* interface ISampleGrabber */
+/* [unique][helpstring][local][uuid][object] */
+
+
+EXTERN_C const IID IID_ISampleGrabber;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("6B652FFF-11FE-4fce-92AD-0266B5D7C78F")
+ ISampleGrabber : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE SetOneShot(
+ BOOL OneShot) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetMediaType(
+ const AM_MEDIA_TYPE *pType) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetConnectedMediaType(
+ AM_MEDIA_TYPE *pType) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetBufferSamples(
+ BOOL BufferThem) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetCurrentBuffer(
+ /* [out][in] */ long *pBufferSize,
+ /* [out] */ long *pBuffer) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetCurrentSample(
+ /* [retval][out] */ IMediaSample **ppSample) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetCallback(
+ ISampleGrabberCB *pCallback,
+ long WhichMethodToCallback) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct ISampleGrabberVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ ISampleGrabber * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ ISampleGrabber * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ ISampleGrabber * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetOneShot )(
+ ISampleGrabber * This,
+ BOOL OneShot);
+
+ HRESULT ( STDMETHODCALLTYPE *SetMediaType )(
+ ISampleGrabber * This,
+ const AM_MEDIA_TYPE *pType);
+
+ HRESULT ( STDMETHODCALLTYPE *GetConnectedMediaType )(
+ ISampleGrabber * This,
+ AM_MEDIA_TYPE *pType);
+
+ HRESULT ( STDMETHODCALLTYPE *SetBufferSamples )(
+ ISampleGrabber * This,
+ BOOL BufferThem);
+
+ HRESULT ( STDMETHODCALLTYPE *GetCurrentBuffer )(
+ ISampleGrabber * This,
+ /* [out][in] */ long *pBufferSize,
+ /* [out] */ long *pBuffer);
+
+ HRESULT ( STDMETHODCALLTYPE *GetCurrentSample )(
+ ISampleGrabber * This,
+ /* [retval][out] */ IMediaSample **ppSample);
+
+ HRESULT ( STDMETHODCALLTYPE *SetCallback )(
+ ISampleGrabber * This,
+ ISampleGrabberCB *pCallback,
+ long WhichMethodToCallback);
+
+ END_INTERFACE
+ } ISampleGrabberVtbl;
+
+ interface ISampleGrabber
+ {
+ CONST_VTBL struct ISampleGrabberVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define ISampleGrabber_QueryInterface(This,riid,ppvObject) \
+ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
+
+#define ISampleGrabber_AddRef(This) \
+ (This)->lpVtbl -> AddRef(This)
+
+#define ISampleGrabber_Release(This) \
+ (This)->lpVtbl -> Release(This)
+
+
+#define ISampleGrabber_SetOneShot(This,OneShot) \
+ (This)->lpVtbl -> SetOneShot(This,OneShot)
+
+#define ISampleGrabber_SetMediaType(This,pType) \
+ (This)->lpVtbl -> SetMediaType(This,pType)
+
+#define ISampleGrabber_GetConnectedMediaType(This,pType) \
+ (This)->lpVtbl -> GetConnectedMediaType(This,pType)
+
+#define ISampleGrabber_SetBufferSamples(This,BufferThem) \
+ (This)->lpVtbl -> SetBufferSamples(This,BufferThem)
+
+#define ISampleGrabber_GetCurrentBuffer(This,pBufferSize,pBuffer) \
+ (This)->lpVtbl -> GetCurrentBuffer(This,pBufferSize,pBuffer)
+
+#define ISampleGrabber_GetCurrentSample(This,ppSample) \
+ (This)->lpVtbl -> GetCurrentSample(This,ppSample)
+
+#define ISampleGrabber_SetCallback(This,pCallback,WhichMethodToCallback) \
+ (This)->lpVtbl -> SetCallback(This,pCallback,WhichMethodToCallback)
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+HRESULT STDMETHODCALLTYPE ISampleGrabber_SetOneShot_Proxy(
+ ISampleGrabber * This,
+ BOOL OneShot);
+
+
+void __RPC_STUB ISampleGrabber_SetOneShot_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE ISampleGrabber_SetMediaType_Proxy(
+ ISampleGrabber * This,
+ const AM_MEDIA_TYPE *pType);
+
+
+void __RPC_STUB ISampleGrabber_SetMediaType_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE ISampleGrabber_GetConnectedMediaType_Proxy(
+ ISampleGrabber * This,
+ AM_MEDIA_TYPE *pType);
+
+
+void __RPC_STUB ISampleGrabber_GetConnectedMediaType_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE ISampleGrabber_SetBufferSamples_Proxy(
+ ISampleGrabber * This,
+ BOOL BufferThem);
+
+
+void __RPC_STUB ISampleGrabber_SetBufferSamples_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE ISampleGrabber_GetCurrentBuffer_Proxy(
+ ISampleGrabber * This,
+ /* [out][in] */ long *pBufferSize,
+ /* [out] */ long *pBuffer);
+
+
+void __RPC_STUB ISampleGrabber_GetCurrentBuffer_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE ISampleGrabber_GetCurrentSample_Proxy(
+ ISampleGrabber * This,
+ /* [retval][out] */ IMediaSample **ppSample);
+
+
+void __RPC_STUB ISampleGrabber_GetCurrentSample_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+HRESULT STDMETHODCALLTYPE ISampleGrabber_SetCallback_Proxy(
+ ISampleGrabber * This,
+ ISampleGrabberCB *pCallback,
+ long WhichMethodToCallback);
+
+
+void __RPC_STUB ISampleGrabber_SetCallback_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+
+#endif /* __ISampleGrabber_INTERFACE_DEFINED__ */
+
+
+
+#ifndef __DexterLib_LIBRARY_DEFINED__
+#define __DexterLib_LIBRARY_DEFINED__
+
+/* library DexterLib */
+/* [helpstring][version][uuid] */
+
+
+EXTERN_C const IID LIBID_DexterLib;
+
+EXTERN_C const CLSID CLSID_AMTimeline;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("78530B75-61F9-11D2-8CAD-00A024580902")
+AMTimeline;
+#endif
+
+EXTERN_C const CLSID CLSID_AMTimelineObj;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("78530B78-61F9-11D2-8CAD-00A024580902")
+AMTimelineObj;
+#endif
+
+EXTERN_C const CLSID CLSID_AMTimelineSrc;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("78530B7A-61F9-11D2-8CAD-00A024580902")
+AMTimelineSrc;
+#endif
+
+EXTERN_C const CLSID CLSID_AMTimelineTrack;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("8F6C3C50-897B-11d2-8CFB-00A0C9441E20")
+AMTimelineTrack;
+#endif
+
+EXTERN_C const CLSID CLSID_AMTimelineComp;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("74D2EC80-6233-11d2-8CAD-00A024580902")
+AMTimelineComp;
+#endif
+
+EXTERN_C const CLSID CLSID_AMTimelineGroup;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("F6D371E1-B8A6-11d2-8023-00C0DF10D434")
+AMTimelineGroup;
+#endif
+
+EXTERN_C const CLSID CLSID_AMTimelineTrans;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("74D2EC81-6233-11d2-8CAD-00A024580902")
+AMTimelineTrans;
+#endif
+
+EXTERN_C const CLSID CLSID_AMTimelineEffect;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("74D2EC82-6233-11d2-8CAD-00A024580902")
+AMTimelineEffect;
+#endif
+
+EXTERN_C const CLSID CLSID_RenderEngine;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("64D8A8E0-80A2-11d2-8CF3-00A0C9441E20")
+RenderEngine;
+#endif
+
+EXTERN_C const CLSID CLSID_SmartRenderEngine;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("498B0949-BBE9-4072-98BE-6CCAEB79DC6F")
+SmartRenderEngine;
+#endif
+
+EXTERN_C const CLSID CLSID_AudMixer;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("036A9790-C153-11d2-9EF7-006008039E37")
+AudMixer;
+#endif
+
+EXTERN_C const CLSID CLSID_Xml2Dex;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("18C628EE-962A-11D2-8D08-00A0C9441E20")
+Xml2Dex;
+#endif
+
+EXTERN_C const CLSID CLSID_MediaLocator;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("CC1101F2-79DC-11D2-8CE6-00A0C9441E20")
+MediaLocator;
+#endif
+
+EXTERN_C const CLSID CLSID_PropertySetter;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("ADF95821-DED7-11d2-ACBE-0080C75E246E")
+PropertySetter;
+#endif
+
+EXTERN_C const CLSID CLSID_MediaDet;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("65BD0711-24D2-4ff7-9324-ED2E5D3ABAFA")
+MediaDet;
+#endif
+
+EXTERN_C const CLSID CLSID_SampleGrabber;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("C1F400A0-3F08-11d3-9F0B-006008039E37")
+SampleGrabber;
+#endif
+
+EXTERN_C const CLSID CLSID_NullRenderer;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("C1F400A4-3F08-11d3-9F0B-006008039E37")
+NullRenderer;
+#endif
+
+EXTERN_C const CLSID CLSID_DxtCompositor;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("BB44391D-6ABD-422f-9E2E-385C9DFF51FC")
+DxtCompositor;
+#endif
+
+EXTERN_C const CLSID CLSID_DxtAlphaSetter;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("506D89AE-909A-44f7-9444-ABD575896E35")
+DxtAlphaSetter;
+#endif
+
+EXTERN_C const CLSID CLSID_DxtJpeg;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("DE75D012-7A65-11D2-8CEA-00A0C9441E20")
+DxtJpeg;
+#endif
+
+EXTERN_C const CLSID CLSID_ColorSource;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("0cfdd070-581a-11d2-9ee6-006008039e37")
+ColorSource;
+#endif
+
+EXTERN_C const CLSID CLSID_DxtKey;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("C5B19592-145E-11d3-9F04-006008039E37")
+DxtKey;
+#endif
+#endif /* __DexterLib_LIBRARY_DEFINED__ */
+
+/* interface __MIDL_itf_qedit_0450 */
+/* [local] */
+
+
+enum __MIDL___MIDL_itf_qedit_0450_0001
+ { E_NOTINTREE = 0x80040400,
+ E_RENDER_ENGINE_IS_BROKEN = 0x80040401,
+ E_MUST_INIT_RENDERER = 0x80040402,
+ E_NOTDETERMINED = 0x80040403,
+ E_NO_TIMELINE = 0x80040404,
+ S_WARN_OUTPUTRESET = 40404
+ } ;
+#define DEX_IDS_BAD_SOURCE_NAME 1400
+#define DEX_IDS_BAD_SOURCE_NAME2 1401
+#define DEX_IDS_MISSING_SOURCE_NAME 1402
+#define DEX_IDS_UNKNOWN_SOURCE 1403
+#define DEX_IDS_INSTALL_PROBLEM 1404
+#define DEX_IDS_NO_SOURCE_NAMES 1405
+#define DEX_IDS_BAD_MEDIATYPE 1406
+#define DEX_IDS_STREAM_NUMBER 1407
+#define DEX_IDS_OUTOFMEMORY 1408
+#define DEX_IDS_DIBSEQ_NOTALLSAME 1409
+#define DEX_IDS_CLIPTOOSHORT 1410
+#define DEX_IDS_INVALID_DXT 1411
+#define DEX_IDS_INVALID_DEFAULT_DXT 1412
+#define DEX_IDS_NO_3D 1413
+#define DEX_IDS_BROKEN_DXT 1414
+#define DEX_IDS_NO_SUCH_PROPERTY 1415
+#define DEX_IDS_ILLEGAL_PROPERTY_VAL 1416
+#define DEX_IDS_INVALID_XML 1417
+#define DEX_IDS_CANT_FIND_FILTER 1418
+#define DEX_IDS_DISK_WRITE_ERROR 1419
+#define DEX_IDS_INVALID_AUDIO_FX 1420
+#define DEX_IDS_CANT_FIND_COMPRESSOR 1421
+#define DEX_IDS_TIMELINE_PARSE 1426
+#define DEX_IDS_GRAPH_ERROR 1427
+#define DEX_IDS_GRID_ERROR 1428
+#define DEX_IDS_INTERFACE_ERROR 1429
+EXTERN_GUID(CLSID_VideoEffects1Category, 0xcc7bfb42, 0xf175, 0x11d1, 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59);
+EXTERN_GUID(CLSID_VideoEffects2Category, 0xcc7bfb43, 0xf175, 0x11d1, 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59);
+EXTERN_GUID(CLSID_AudioEffects1Category, 0xcc7bfb44, 0xf175, 0x11d1, 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59);
+EXTERN_GUID(CLSID_AudioEffects2Category, 0xcc7bfb45, 0xf175, 0x11d1, 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59);
+
+
+extern RPC_IF_HANDLE __MIDL_itf_qedit_0450_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_qedit_0450_v0_0_s_ifspec;
+
+/* Additional Prototypes for ALL interfaces */
+
+unsigned long __RPC_USER BSTR_UserSize( unsigned long *, unsigned long , BSTR * );
+unsigned char * __RPC_USER BSTR_UserMarshal( unsigned long *, unsigned char *, BSTR * );
+unsigned char * __RPC_USER BSTR_UserUnmarshal(unsigned long *, unsigned char *, BSTR * );
+void __RPC_USER BSTR_UserFree( unsigned long *, BSTR * );
+
+unsigned long __RPC_USER VARIANT_UserSize( unsigned long *, unsigned long , VARIANT * );
+unsigned char * __RPC_USER VARIANT_UserMarshal( unsigned long *, unsigned char *, VARIANT * );
+unsigned char * __RPC_USER VARIANT_UserUnmarshal(unsigned long *, unsigned char *, VARIANT * );
+void __RPC_USER VARIANT_UserFree( unsigned long *, VARIANT * );
+
+/* end of Additional Prototypes */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
diff --git a/src/imaging/test_comp.png b/src/imaging/test_comp.png
new file mode 100644
index 0000000..35d498e
--- /dev/null
+++ b/src/imaging/test_comp.png
Binary files differ
diff --git a/src/imaging/testimaging.cpp b/src/imaging/testimaging.cpp
new file mode 100644
index 0000000..9877c12
--- /dev/null
+++ b/src/imaging/testimaging.cpp
@@ -0,0 +1,239 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+
+#include "FakeCamera.h"
+#include "TrackerThread.h"
+#include "TrackerConfig.h"
+#include "DeDistort.h"
+#include "FilterWipeBorder.h"
+#include "FilterClearBorder.h"
+
+#include "../graphics/GraphicsTest.h"
+#include "../graphics/Filtergrayscale.h"
+#include "../graphics/BitmapLoader.h"
+
+#include "../base/TestSuite.h"
+#include "../base/Exception.h"
+#include "../base/FileHelper.h"
+#include "../base/MathHelper.h"
+
+#include <boost/thread/thread.hpp>
+#include <boost/bind.hpp>
+
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sstream>
+
+#include <glib-object.h>
+
+using namespace avg;
+using namespace std;
+
+class FilterWipeBorderTest: public GraphicsTest
+{
+public:
+ FilterWipeBorderTest()
+ : GraphicsTest("FilterWipeBorderTest", 2)
+ {
+ }
+
+ void runTests()
+ {
+ BitmapPtr pBmp = loadTestBmp("filterwipeborder", I8);
+ BitmapPtr pDestBmp = FilterWipeBorder(0).apply(pBmp);
+ testEqual(*pDestBmp, *pBmp, "FilterWipeBorderResult0", 0, 0);
+ pDestBmp = FilterWipeBorder(1).apply(pBmp);
+ testEqual(*pDestBmp, "FilterWipeBorderResult1", I8);
+ pDestBmp = FilterWipeBorder(3).apply(pBmp);
+ testEqual(*pDestBmp, "FilterWipeBorderResult3", I8);
+ }
+};
+
+class FilterClearBorderTest: public GraphicsTest
+{
+public:
+ FilterClearBorderTest()
+ : GraphicsTest("FilterClearBorderTest", 2)
+ {
+ }
+
+ void runTests()
+ {
+ BitmapPtr pBmp = loadTestBmp("filterwipeborder", I8);
+ BitmapPtr pDestBmp = FilterClearBorder(0).apply(pBmp);
+ testEqual(*pDestBmp, *pBmp, "FilterClearBorderResult0", 0, 0);
+ pDestBmp = FilterClearBorder(1).apply(pBmp);
+ testEqual(*pDestBmp, "FilterClearBorderResult1", I8);
+ pDestBmp = FilterClearBorder(3).apply(pBmp);
+ testEqual(*pDestBmp, "FilterClearBorderResult3", I8);
+ }
+};
+
+class DeDistortTest: public Test
+{
+public:
+ DeDistortTest()
+ : Test("DeDistortTest", 2)
+ {}
+
+ void runTests()
+ {
+ vector<double> params;
+ params.push_back(0);
+ params.push_back(0);
+ DeDistort IdentityDistort = DeDistort(glm::vec2(1,1),
+ params, 0.0, 0.0, glm::dvec2(0,0), glm::dvec2(1,1));
+ TEST(almostEqual(IdentityDistort.transform_point(glm::dvec2(0,0)),
+ glm::dvec2(0,0)));
+ TEST(almostEqual(IdentityDistort.transform_point(glm::dvec2(1,2)),
+ glm::dvec2(1,2)));
+ TEST(almostEqual(IdentityDistort.transformBlobToScreen(glm::dvec2(0,0)),
+ glm::dvec2(0,0)));
+ TEST(almostEqual(IdentityDistort.transformBlobToScreen(glm::dvec2(1,2)),
+ glm::dvec2(1,2)));
+ TEST(almostEqual(IdentityDistort.inverse_transform_point(glm::dvec2(0,0)),
+ glm::dvec2(0,0)));
+ TEST(almostEqual(IdentityDistort.inverse_transform_point(glm::dvec2(1,2)),
+ glm::dvec2(1,2)));
+ TEST(almostEqual(IdentityDistort.transformScreenToBlob(glm::dvec2(0,0)),
+ glm::dvec2(0,0)));
+ TEST(almostEqual(IdentityDistort.transformScreenToBlob(glm::dvec2(1,2)),
+ glm::dvec2(1,2)));
+ TEST(IdentityDistort.getDisplayArea(glm::vec2(1280,720)) == FRect(0,0,1280,720));
+
+ DeDistort scaler = DeDistort(glm::vec2(1,1), params, 0, 0.0, glm::dvec2(0,0),
+ glm::dvec2(2,2));
+ TEST(almostEqual(scaler.transform_point(glm::dvec2(0,0)), glm::dvec2(0,0)));
+ TEST(almostEqual(scaler.transformBlobToScreen(glm::dvec2(1,2)), glm::dvec2(2,4)));
+ TEST(almostEqual(scaler.inverse_transform_point(glm::dvec2(0,0)), glm::dvec2(0,0)));
+ TEST(almostEqual(scaler.transformScreenToBlob(glm::dvec2(1,2)), glm::dvec2(0.5,1)));
+
+ DeDistort shifter = DeDistort(glm::vec2(1,1), params, 0, 0.0, glm::dvec2(1,1),
+ glm::dvec2(1,1));
+ TEST(almostEqual(shifter.transformBlobToScreen(glm::dvec2(0,0)), glm::dvec2(1,1)));
+ TEST(almostEqual(shifter.transformBlobToScreen(glm::dvec2(1,2)), glm::dvec2(2,3)));
+ TEST(almostEqual(shifter.transformScreenToBlob(glm::dvec2(0,0)),
+ glm::dvec2(-1,-1)));
+ TEST(almostEqual(shifter.transformScreenToBlob(glm::dvec2(1,2)), glm::dvec2(0,1)));
+ TEST(shifter.getDisplayArea(glm::vec2(1,1)) == FRect(-1, -1, 0, 0));
+
+ vector<double> cubed;
+ cubed.push_back(0);
+ cubed.push_back(1);
+ DeDistort barreler = DeDistort(glm::vec2(1,1), cubed, 0, 0.0, glm::dvec2(0,0),
+ glm::dvec2(1,1));
+ for (double xp = 0; xp < 10; xp++) {
+ for(double yp = 0; yp < 10; yp++) {
+ QUIET_TEST(almostEqual(barreler.inverse_transform_point(
+ barreler.transform_point(glm::dvec2(xp,yp))), glm::dvec2(xp,yp)));
+ }
+ }
+ TEST(almostEqual(barreler.transform_point(glm::dvec2(1,1)), glm::dvec2(1,1)));
+
+ DeDistort rotator = DeDistort(glm::vec2(1,1), params, 0, M_PI/2, glm::dvec2(0,0),
+ glm::dvec2(1,1));
+ for (double xp = 0; xp < 10; xp++) {
+ for(double yp = 0; yp < 10; yp++) {
+ QUIET_TEST(almostEqual(rotator.inverse_transform_point(
+ rotator.transform_point(glm::dvec2(xp,yp))), glm::dvec2(xp,yp)));
+ }
+ }
+
+ DeDistort shifterScaler = DeDistort(glm::vec2(1,1), params, 0, 0.0,
+ glm::dvec2(1,1), glm::dvec2(2,2));
+ for (double xp = 0; xp < 10; xp++) {
+ for(double yp = 0; yp < 10; yp++) {
+ QUIET_TEST(almostEqual(shifterScaler.inverse_transform_point(
+ shifterScaler.transform_point(glm::dvec2(xp,yp))),
+ glm::dvec2(xp,yp)));
+ }
+ }
+ }
+};
+
+#ifdef _WIN32
+#pragma warning(disable: 4996)
+#endif
+class SerializeTest: public Test
+{
+public:
+ SerializeTest()
+ : Test("SerializeTest", 2)
+ {
+ }
+
+ void runTests()
+ {
+ TrackerConfig Config;
+ copyFile(getSrcDirName()+"avgtrackerrc.minimal", "avgtrackerrc");
+ Config.load();
+
+ Config.setParam("/transform/distortionparams/@p2", "0");
+ Config.setParam("/transform/distortionparams/@p3", "0");
+ Config.setParam("/transform/trapezoid/@value", "0");
+ Config.setParam("/transform/angle/@value", "0");
+ Config.setParam("/transform/displaydisplacement/@x", "0");
+ Config.setParam("/transform/displaydisplacement/@y", "0");
+ Config.setParam("/transform/displayscale/@x", "2");
+ Config.setParam("/transform/displayscale/@y", "2");
+
+ if (getSrcDirName() == "./") {
+ Config.save();
+
+ TrackerConfig loadedConfig;
+ loadedConfig.load();
+ glm::vec2 scale = loadedConfig.getPointParam("/transform/displayscale/");
+ TEST(almostEqual(scale, glm::vec2(2,2)));
+ unlink("avgtrackerrc.bak");
+ }
+ unlink("avgtrackerrc");
+ }
+};
+
+class ImagingTestSuite: public TestSuite
+{
+public:
+ ImagingTestSuite()
+ : TestSuite("ImagingTestSuite")
+ {
+ addTest(TestPtr(new FilterWipeBorderTest));
+ addTest(TestPtr(new FilterClearBorderTest));
+ addTest(TestPtr(new DeDistortTest));
+ addTest(TestPtr(new SerializeTest));
+ }
+};
+
+
+int main(int nargs, char** args)
+{
+ ImagingTestSuite Suite;
+ BitmapLoader::init(true);
+ Suite.runTests();
+ bool bOK = Suite.isOk();
+
+ if (bOK) {
+ return 0;
+ } else {
+ return 1;
+ }
+}
+
diff --git a/src/imaging/trackerconfigdtd.cpp b/src/imaging/trackerconfigdtd.cpp
new file mode 100644
index 0000000..d4185de
--- /dev/null
+++ b/src/imaging/trackerconfigdtd.cpp
@@ -0,0 +1,175 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+
+const char * g_pTrackerConfigDTD =
+"<!ENTITY % minmaxAttrs\n"
+" \"min CDATA #REQUIRED\n"
+" max CDATA #REQUIRED\" >\n"
+
+"<!ENTITY % posAttrs\n"
+" \"x CDATA #REQUIRED\n"
+" y CDATA #REQUIRED\" >\n"
+
+"<!ELEMENT trackerconfig (camera|tracker|transform)* >\n"
+"<!ELEMENT camera (driver|device|fw800|format|size|framerate|brightness|gamma|exposure|"
+" gain|shutter|strobeduration)* >\n"
+"<!ELEMENT tracker (mask|prescale|historyupdateinterval|brighterregions|"
+" contourprecision|historydelay|touch|track|findfingertips)* >\n"
+"<!ELEMENT touch (threshold|similarity|areabounds|eccentricitybounds|bandpass|"
+" bandpasspostmult)* >\n"
+"<!ELEMENT track (threshold|similarity|areabounds|eccentricitybounds)* >\n"
+"<!ELEMENT transform (cameradisplacement|camerascale|distortionparams|trapezoid|"
+" angle|displaydisplacement|displayscale|activedisplaysize|displayroi)* >\n"
+
+"<!ELEMENT driver EMPTY>\n"
+"<!ATTLIST driver\n"
+" value CDATA #REQUIRED >\n"
+
+"<!ELEMENT device EMPTY>\n"
+"<!ATTLIST device\n"
+" value CDATA #REQUIRED >\n"
+
+"<!ELEMENT fw800 EMPTY>\n"
+"<!ATTLIST fw800\n"
+" value CDATA #REQUIRED >\n"
+
+"<!ELEMENT format EMPTY>\n"
+"<!ATTLIST format\n"
+" value CDATA #REQUIRED >\n"
+
+"<!ELEMENT size EMPTY>\n"
+"<!ATTLIST size\n"
+" %posAttrs; >\n"
+
+"<!ELEMENT framerate EMPTY>\n"
+"<!ATTLIST framerate\n"
+" value CDATA #REQUIRED >\n"
+
+"<!ELEMENT brightness EMPTY>\n"
+"<!ATTLIST brightness\n"
+" value CDATA #REQUIRED >\n"
+
+"<!ELEMENT gamma EMPTY>\n"
+"<!ATTLIST gamma\n"
+" value CDATA #REQUIRED >\n"
+
+"<!ELEMENT exposure EMPTY>\n"
+"<!ATTLIST exposure\n"
+" value CDATA #REQUIRED >\n"
+
+"<!ELEMENT gain EMPTY>\n"
+"<!ATTLIST gain\n"
+" value CDATA #REQUIRED >\n"
+
+"<!ELEMENT shutter EMPTY>\n"
+"<!ATTLIST shutter\n"
+" value CDATA #REQUIRED >\n"
+
+"<!ELEMENT strobeduration EMPTY>\n"
+"<!ATTLIST strobeduration\n"
+" value CDATA #REQUIRED >\n"
+
+"<!ELEMENT brighterregions EMPTY>\n"
+"<!ATTLIST brighterregions\n"
+" value CDATA #REQUIRED >\n"
+
+"<!ELEMENT threshold EMPTY>\n"
+"<!ATTLIST threshold\n"
+" value CDATA #REQUIRED >\n"
+
+"<!ELEMENT mask EMPTY>\n"
+"<!ATTLIST mask\n"
+" value CDATA #REQUIRED >\n"
+
+"<!ELEMENT findfingertips EMPTY>\n"
+"<!ATTLIST findfingertips\n"
+" value CDATA #REQUIRED >\n"
+
+"<!ELEMENT prescale EMPTY>\n"
+"<!ATTLIST prescale\n"
+" value CDATA #REQUIRED >\n"
+
+"<!ELEMENT historyupdateinterval EMPTY>\n"
+"<!ATTLIST historyupdateinterval\n"
+" value CDATA #REQUIRED >\n"
+
+"<!ELEMENT contourprecision EMPTY>\n"
+"<!ATTLIST contourprecision\n"
+" value CDATA #REQUIRED >\n"
+
+"<!ELEMENT historydelay EMPTY>\n"
+"<!ATTLIST historydelay\n"
+" value CDATA #REQUIRED >\n"
+
+"<!ELEMENT similarity EMPTY>\n"
+"<!ATTLIST similarity\n"
+" value CDATA #REQUIRED >\n"
+
+"<!ELEMENT areabounds EMPTY>\n"
+"<!ATTLIST areabounds\n"
+" %minmaxAttrs; >\n"
+
+"<!ELEMENT eccentricitybounds EMPTY>\n"
+"<!ATTLIST eccentricitybounds\n"
+" %minmaxAttrs; >\n"
+
+"<!ELEMENT bandpass EMPTY>\n"
+"<!ATTLIST bandpass\n"
+" %minmaxAttrs; >\n"
+
+"<!ELEMENT bandpasspostmult EMPTY>\n"
+"<!ATTLIST bandpasspostmult\n"
+" value CDATA #REQUIRED >\n"
+
+"<!ELEMENT distortionparams EMPTY>\n"
+"<!ATTLIST distortionparams\n"
+" p2 CDATA #REQUIRED\n"
+" p3 CDATA #REQUIRED >\n"
+
+"<!ELEMENT trapezoid EMPTY>\n"
+"<!ATTLIST trapezoid\n"
+" value CDATA #REQUIRED >\n"
+
+"<!ELEMENT angle EMPTY>\n"
+"<!ATTLIST angle\n"
+" value CDATA #REQUIRED >\n"
+
+"<!ELEMENT displaydisplacement EMPTY>\n"
+"<!ATTLIST displaydisplacement\n"
+" %posAttrs; >\n"
+
+"<!ELEMENT displayscale EMPTY>\n"
+"<!ATTLIST displayscale\n"
+" %posAttrs; >\n"
+
+"<!ELEMENT activedisplaysize EMPTY>\n"
+"<!ATTLIST activedisplaysize\n"
+" %posAttrs; >\n"
+
+"<!ELEMENT displayroi EMPTY>\n"
+"<!ATTLIST displayroi\n"
+" x1 CDATA #REQUIRED\n"
+" y1 CDATA #REQUIRED\n"
+" x2 CDATA #REQUIRED\n"
+" y2 CDATA #REQUIRED >\n"
+
+;
+
diff --git a/src/imaging/trackerconfigdtd.h b/src/imaging/trackerconfigdtd.h
new file mode 100644
index 0000000..366b8d4
--- /dev/null
+++ b/src/imaging/trackerconfigdtd.h
@@ -0,0 +1,27 @@
+//
+// libavg - Media Playback Engine.
+// Copyright (C) 2003-2014 Ulrich von Zadow
+//
+// 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Current versions can be found at www.libavg.de
+//
+
+#ifndef _avgdtd_H_
+
+extern const char * g_pTrackerConfigDTD;
+
+#endif
+