axextend.idl 22.9 KB
Newer Older
Robert Shearman's avatar
Robert Shearman committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/*
 * Copyright (C) 2002 Robert Shearman
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
16
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
Robert Shearman's avatar
Robert Shearman committed
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319
 */

interface IAMAnalogVideoDecoder;
interface IAMAnalogVideoEncoder;
interface IAMAudioInputMixer;
interface IAMAudioRendererStats;
interface IAMBufferNegotiation;
interface IAMCameraControl;
interface IAMCopyCaptureFileProgress;
interface IAMCrossbar;
interface IAMDevMemoryAllocator;
interface IAMDevMemoryControl;
interface IAMDroppedFrames;
interface IAMExtDevice;
interface IAMExtTransport;
interface IAMGraphStreams;
interface IAMLatency;
interface IAMOpenProgress;
interface IAMOverlayFX;
interface IAMPhysicalPinInfo;
interface IAMPushSource;
interface IAMStreamConfig;
interface IAMTimecodeDisplay;
interface IAMTimecodeGenerator;
interface IAMTimecodeReader;
interface IAMTVTuner;
interface IAMVfwCaptureDialogs;
interface IAMVfwCompressDialogs;
interface IAMVideoCompression;
interface IAMVideoDecimationProperties;
interface IAMVideoProcAmp;
interface ICaptureGraphBuilder;
interface ICaptureGraphBuilder2;
interface IConfigAviMux;
interface IConfigInterleaving;
interface IDecimateVideoImage;
interface IDrawVideoImage;
interface IEnumRegFilters;
interface IEnumStreamIdMap;
interface IFileSourceFilter;
interface IFileSinkFilter;
interface IFileSinkFilter2;
interface IFilterMapper;
interface IFilterMapper2;
interface IGraphBuilder;
interface IKsPropertySet;
interface IMediaEventSink;
interface IMpeg2Demultiplexer;
interface IMPEG2StreamIdMap;
interface IOverlay;
interface IOverlayNotify;
interface IOverlayNotify2;
interface IQualityControl;
interface ISeekingPassThru;

typedef struct
{
    CLSID Clsid;
    LPWSTR Name;
} REGFILTER;

[
object,
uuid(56a868a4-0ad4-11ce-b03a-0020af0ba770),
pointer_default(unique)
]
interface IEnumRegFilters : IUnknown
{
    HRESULT Next
        ( [in]  ULONG cFilters,
          [out] REGFILTER ** apRegFilter,
          [out] ULONG * pcFetched
        );

    HRESULT Skip(
        [in] ULONG cFilters
    );

    HRESULT Reset(void);

    HRESULT Clone(
        [out] IEnumRegFilters **ppEnum
    );
}


typedef IEnumRegFilters *PENUMREGFILTERS;

[
object,
uuid(56a868a3-0ad4-11ce-b03a-0020af0ba770),
pointer_default(unique)
]
interface IFilterMapper : IUnknown
{
    enum { MERIT_PREFERRED     = 0x800000,
           MERIT_NORMAL        = 0x600000,
           MERIT_UNLIKELY      = 0x400000,
           MERIT_DO_NOT_USE    = 0x200000,
           MERIT_SW_COMPRESSOR = 0x100000,
           MERIT_HW_COMPRESSOR = 0x100050
         };

    HRESULT RegisterFilter
        ( [in] CLSID   clsid,
          [in] LPCWSTR Name,
          [in] DWORD   dwMerit
        );

    HRESULT RegisterFilterInstance
        ( [in]  CLSID  clsid,
          [in]  LPCWSTR Name,
          [out] CLSID *MRId
        );


    HRESULT RegisterPin
        ( [in] CLSID   Filter,
          [in] LPCWSTR Name,
          [in] BOOL    bRendered,
          [in] BOOL    bOutput,
          [in] BOOL    bZero,
          [in] BOOL    bMany,
          [in] CLSID   ConnectsToFilter,
          [in] LPCWSTR ConnectsToPin
        );

    HRESULT RegisterPinType
        ( [in] CLSID   clsFilter,
          [in] LPCWSTR strName,
          [in] CLSID   clsMajorType,
          [in] CLSID   clsSubType
        );


    HRESULT UnregisterFilter
        ( [in] CLSID  Filter
        );


    HRESULT UnregisterFilterInstance
        ( [in] CLSID  MRId
        );


    HRESULT UnregisterPin
        ( [in] CLSID   Filter,
          [in] LPCWSTR Name
        );

    HRESULT EnumMatchingFilters
       ( [out] IEnumRegFilters **ppEnum,
         [in]  DWORD dwMerit,
         [in]  BOOL  bInputNeeded,
         [in]  CLSID clsInMaj,
         [in]  CLSID clsInSub,
         [in]  BOOL  bRender,
         [in]  BOOL  bOututNeeded,
         [in]  CLSID clsOutMaj,
         [in]  CLSID clsOutSub
       );

}

typedef struct
{
    const CLSID * clsMajorType;
    const CLSID * clsMinorType;
} REGPINTYPES;

typedef struct
{
    LPWSTR           strName;
    BOOL             bRendered;
    BOOL             bOutput;
    BOOL             bZero;
    BOOL             bMany;
    const CLSID *    clsConnectsToFilter;
    const WCHAR *    strConnectsToPin;
    UINT             nMediaTypes;
    const REGPINTYPES * lpMediaType;
} REGFILTERPINS;

typedef struct
{
    CLSID clsMedium;
    DWORD dw1;
    DWORD dw2;
} REGPINMEDIUM;

enum
{
    REG_PINFLAG_B_ZERO = 0x1,
    REG_PINFLAG_B_RENDERER = 0x2,
    REG_PINFLAG_B_MANY = 0x4,
    REG_PINFLAG_B_OUTPUT = 0x8
};


typedef struct
{
    DWORD dwFlags;
    UINT             cInstances;
    UINT             nMediaTypes;
    [size_is(nMediaTypes)] const REGPINTYPES * lpMediaType;
    UINT             nMediums;
    [size_is(nMediums)] const REGPINMEDIUM *lpMedium;
    const CLSID      *clsPinCategory;
} REGFILTERPINS2;

typedef struct
{
    DWORD dwVersion;
    DWORD dwMerit;
    [switch_is(dwVersion)] [switch_type(DWORD)] union
    {
        [case(1)]
            struct
            {
                ULONG cPins;
                [size_is(cPins)] const REGFILTERPINS *rgPins;
            } DUMMYSTRUCTNAME;

        [case(2)]
            struct
            {
                ULONG cPins2;
                [size_is(cPins2)] const REGFILTERPINS2 *rgPins2;
            } DUMMYSTRUCTNAME1;

        [default]
            ;
    } DUMMYUNIONNAME;

} REGFILTER2;


[
object,
uuid(b79bb0b0-33c1-11d1-abe1-00a0c905f375),
pointer_default(unique)
]
interface IFilterMapper2 : IUnknown
{
    HRESULT CreateCategory
        ( [in] REFCLSID clsidCategory,
          [in] DWORD dwCategoryMerit,
          [in] LPCWSTR Description
          );

    HRESULT UnregisterFilter
        ( [in] const CLSID *pclsidCategory,
          [in] const OLECHAR *szInstance,
          [in] REFCLSID Filter
        );

    HRESULT RegisterFilter
        ( [in] REFCLSID clsidFilter,
          [in] LPCWSTR Name,
          [in, out] IMoniker **ppMoniker,
          [in] const CLSID *pclsidCategory,
          [in] const OLECHAR *szInstance,
          [in] const REGFILTER2 *prf2
        );

    HRESULT EnumMatchingFilters
       ( [out] IEnumMoniker **ppEnum,
         [in]  DWORD dwFlags,
         [in]  BOOL bExactMatch,
         [in]  DWORD dwMerit,
         [in]  BOOL  bInputNeeded,
         [in]  DWORD cInputTypes,
         [size_is(cInputTypes*2)]  const GUID *pInputTypes,
         [in]  const REGPINMEDIUM *pMedIn,
         [in]  const CLSID *pPinCategoryIn,
         [in]  BOOL  bRender,
         [in]  BOOL  bOutputNeeded,
         [in]  DWORD cOutputTypes,
         [size_is(cOutputTypes*2)]  const GUID *pOutputTypes,
         [in]  const REGPINMEDIUM *pMedOut,
         [in]  const CLSID *pPinCategoryOut
       );
}

[
object,
uuid(b79bb0b1-33c1-11d1-abe1-00a0c905f375),
pointer_default(unique)
]
interface IFilterMapper3 : IFilterMapper2
{
    HRESULT GetICreateDevEnum( [out] ICreateDevEnum **ppEnum );
}

typedef enum tagQualityMessageType
{
    Famine,
    Flood
} QualityMessageType;

typedef struct tagQuality
{
    QualityMessageType Type;
320
    LONG               Proportion;
Robert Shearman's avatar
Robert Shearman committed
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488
    REFERENCE_TIME       Late;
    REFERENCE_TIME       TimeStamp;
} Quality;

typedef IQualityControl *PQUALITYCONTROL;

[
object,
uuid(56a868a5-0ad4-11ce-b03a-0020af0ba770),
pointer_default(unique)
]
interface IQualityControl : IUnknown
{
    HRESULT Notify
        ( [in] IBaseFilter * pSelf,
          [in] Quality q
        );

    HRESULT SetSink
        ( [in] IQualityControl * piqc
        );
}

enum
{
    CK_NOCOLORKEY  = 0x0,
    CK_INDEX       = 0x1,
    CK_RGB         = 0x2
};

typedef struct tagCOLORKEY
{
    DWORD    KeyType;
    DWORD    PaletteIndex;
    COLORREF LowColorValue;
    COLORREF HighColorValue;
} COLORKEY;

enum
{
    ADVISE_NONE = 0x0,
    ADVISE_CLIPPING = 0x1,
    ADVISE_PALETTE = 0x2,
    ADVISE_COLORKEY = 0x4,
    ADVISE_POSITION = 0x8,
    ADVISE_DISPLAY_CHANGE = 0x10
};

const DWORD ADVISE_ALL = ADVISE_CLIPPING |
                         ADVISE_PALETTE  |
                         ADVISE_COLORKEY |
                         ADVISE_POSITION;

const DWORD ADVISE_ALL2 = ADVISE_ALL |
                          ADVISE_DISPLAY_CHANGE;

cpp_quote("#ifndef _WINGDI_")

/* already defined in wingdi.h, but needed for WIDL */

typedef struct _RGNDATAHEADER
{
    DWORD dwSize;
    DWORD iType;
    DWORD nCount;
    DWORD nRgnSize;
    RECT  rcBound;
} RGNDATAHEADER;

typedef struct _RGNDATA
{
    RGNDATAHEADER rdh;
    char Buffer[1];
} RGNDATA;

cpp_quote("#endif /* _WINGDI_ */")

[
object,
local,
uuid(56a868a0-0ad4-11ce-b03a-0020af0ba770),
pointer_default(unique)
]
interface IOverlayNotify : IUnknown
{
    HRESULT OnPaletteChange(
        [in] DWORD dwColors,
        [in] const PALETTEENTRY *pPalette);

    HRESULT OnClipChange(
        [in] const RECT *pSourceRect,
        [in] const RECT *pDestinationRect,
        [in] const RGNDATA *pRgnData);

    HRESULT OnColorKeyChange([in] const COLORKEY *pColorKey);

    HRESULT OnPositionChange([in] const RECT *pSourceRect,
                             [in] const RECT *pDestinationRect);
}

typedef IOverlayNotify *POVERLAYNOTIFY;

cpp_quote("#if 0")
typedef HANDLE HMONITOR;
cpp_quote("#endif /* 0 */")

[
object,
local,
uuid(680EFA10-D535-11D1-87C8-00A0C9223196),
pointer_default(unique)
]
interface IOverlayNotify2 : IOverlayNotify
{
    HRESULT OnDisplayChange(
        HMONITOR hMonitor);
}

typedef IOverlayNotify2 *POVERLAYNOTIFY2;

[
object,
local,
uuid(56a868a1-0ad4-11ce-b03a-0020af0ba770),
pointer_default(unique)
]
interface IOverlay : IUnknown
{
    HRESULT GetPalette(
        [out] DWORD *pdwColors,
        [out] PALETTEENTRY **ppPalette);

    HRESULT SetPalette(
        [in] DWORD dwColors,
        [in] PALETTEENTRY *pPalette);

    HRESULT GetDefaultColorKey([out] COLORKEY *pColorKey);

    HRESULT GetColorKey([out] COLORKEY *pColorKey);

    HRESULT SetColorKey([in,out] COLORKEY *pColorKey);

    HRESULT GetWindowHandle([out] HWND *pHwnd);

    HRESULT GetClipList([out] RECT *pSourceRect,
                        [out] RECT *pDestinationRect,
                        [out] RGNDATA **ppRgnData);

    HRESULT GetVideoPosition([out] RECT *pSourceRect,
                             [out] RECT *pDestinationRect);

    HRESULT Advise(
        [in] IOverlayNotify *pOverlayNotify,
        [in] DWORD dwInterests);

    HRESULT Unadvise();
}

typedef IOverlay *POVERLAY;

[
object,
uuid(56a868a2-0ad4-11ce-b03a-0020af0ba770),
pointer_default(unique)
]
interface IMediaEventSink : IUnknown
{
    HRESULT Notify(
489
        [in] LONG EventCode,
Robert Shearman's avatar
Robert Shearman committed
490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782
        [in] LONG_PTR EventParam1,
        [in] LONG_PTR EventParam2
    );
}

typedef IMediaEventSink *PMEDIAEVENTSINK;

[
object,
uuid(56a868a6-0ad4-11ce-b03a-0020af0ba770),
pointer_default(unique)
]
interface IFileSourceFilter : IUnknown
{
    HRESULT Load(
        [in] LPCOLESTR pszFileName,
        [in, unique] const AM_MEDIA_TYPE *pmt
    );

    HRESULT GetCurFile(
        [out] LPOLESTR *ppszFileName,
        [out] AM_MEDIA_TYPE *pmt
    );
}

typedef IFileSourceFilter *PFILTERFILESOURCE;

[
object,
uuid(a2104830-7c70-11cf-8bce-00aa00a3f1a6),
pointer_default(unique)
]
interface IFileSinkFilter : IUnknown
{
    HRESULT SetFileName(
        [in] LPCOLESTR pszFileName,
        [in, unique] const AM_MEDIA_TYPE *pmt
    );

    HRESULT GetCurFile(
        [out] LPOLESTR *ppszFileName,
        [out] AM_MEDIA_TYPE *pmt
    );
}

typedef IFileSinkFilter *PFILTERFILESINK;

[
        object,
        uuid(00855B90-CE1B-11d0-BD4F-00A0C911CE86),
        pointer_default(unique)
]
interface IFileSinkFilter2 : IFileSinkFilter
{
    HRESULT SetMode(
        [in] DWORD dwFlags
    );

    HRESULT GetMode(
        [out] DWORD *pdwFlags
    );
}

typedef IFileSinkFilter2 *PFILESINKFILTER2;

typedef enum
{
    AM_FILE_OVERWRITE = 0x00000001,
} AM_FILESINK_FLAGS;

[
object,
uuid(56a868a9-0ad4-11ce-b03a-0020af0ba770),
pointer_default(unique)
]
interface IGraphBuilder : IFilterGraph
{
    HRESULT Connect
        ( [in] IPin * ppinOut,
          [in] IPin * ppinIn
        );

    HRESULT Render
        ( [in] IPin * ppinOut
        );

    HRESULT RenderFile
        ( [in] LPCWSTR lpcwstrFile,
          [in, unique] LPCWSTR lpcwstrPlayList
        );

    HRESULT AddSourceFilter
        ( [in]      LPCWSTR lpcwstrFileName,
          [in, unique]      LPCWSTR lpcwstrFilterName,
          [out]     IBaseFilter* *ppFilter
        );

    HRESULT SetLogFile
        ( [in]      DWORD_PTR hFile
        );

    HRESULT Abort();

    HRESULT ShouldOperationContinue();
}


[
    object,
    uuid(bf87b6e0-8c27-11d0-b3f0-00aa003761c5),
    pointer_default(unique)
]
interface ICaptureGraphBuilder : IUnknown {

    HRESULT SetFiltergraph(
        [in] IGraphBuilder *pfg);

    HRESULT GetFiltergraph(
        [out] IGraphBuilder **ppfg);

    HRESULT SetOutputFileName(
        [in] const GUID *pType,
        [in] LPCOLESTR lpstrFile,
        [out] IBaseFilter **ppf,
        [out] IFileSinkFilter **ppSink);

    [local] HRESULT FindInterface(
        [in, unique] const GUID *pCategory,
        [in] IBaseFilter *pf,
        [in] REFIID riid,
        [out] void **ppint);

    [call_as(FindInterface)] HRESULT RemoteFindInterface(
        [in, unique] const GUID *pCategory,
        [in] IBaseFilter *pf,
        [in] REFIID riid,
        [out] IUnknown **ppint);

    HRESULT RenderStream(
        [in] const GUID *pCategory,
        [in] IUnknown *pSource,
        [in] IBaseFilter *pfCompressor,
        [in] IBaseFilter *pfRenderer);

    HRESULT ControlStream(
        [in] const GUID *pCategory,
        [in] IBaseFilter *pFilter,
        [in] REFERENCE_TIME *pstart,
        [in] REFERENCE_TIME *pstop,
        [in] WORD wStartCookie,
        [in] WORD wStopCookie);

    HRESULT AllocCapFile(
        [in] LPCOLESTR lpstr,
        [in] DWORDLONG dwlSize);

    HRESULT CopyCaptureFile(
        [in] LPOLESTR lpwstrOld,
        [in] LPOLESTR lpwstrNew,
        [in] int fAllowEscAbort,
        [in] IAMCopyCaptureFileProgress *pCallback);
}

[
object,
uuid(670d1d20-a068-11d0-b3f0-00aa003761c5),
pointer_default(unique)
]
interface IAMCopyCaptureFileProgress : IUnknown
{
    HRESULT Progress(
        [in] int iProgress);
}

[
    object,
    uuid(93E5A4E0-2D50-11d2-ABFA-00A0C9C6E38D),
    pointer_default(unique)
]
interface ICaptureGraphBuilder2 : IUnknown
{
    HRESULT SetFiltergraph(
        [in] IGraphBuilder *pfg);

    HRESULT GetFiltergraph(
        [out] IGraphBuilder **ppfg);

    HRESULT SetOutputFileName(
        [in] const GUID *pType,
        [in] LPCOLESTR lpstrFile,
        [out] IBaseFilter **ppf,
        [out] IFileSinkFilter **ppSink);

    [local] HRESULT FindInterface(
        [in] const GUID *pCategory,
        [in] const GUID *pType,
        [in] IBaseFilter *pf,
        [in] REFIID riid,
        [out] void **ppint);

    [call_as(FindInterface)] HRESULT RemoteFindInterface(
        [in] const GUID *pCategory,
        [in] const GUID *pType,
        [in] IBaseFilter *pf,
        [in] REFIID riid,
        [out] IUnknown **ppint);

    HRESULT RenderStream(
        [in] const GUID *pCategory,
        [in] const GUID *pType,
        [in] IUnknown *pSource,
        [in] IBaseFilter *pfCompressor,
        [in] IBaseFilter *pfRenderer);

    HRESULT ControlStream(
        [in] const GUID *pCategory,
        [in] const GUID *pType,
        [in] IBaseFilter *pFilter,
        [in] REFERENCE_TIME *pstart,
        [in] REFERENCE_TIME *pstop,
        [in] WORD wStartCookie,
        [in] WORD wStopCookie);

    HRESULT AllocCapFile(
        [in] LPCOLESTR lpstr,
        [in] DWORDLONG dwlSize);

    HRESULT CopyCaptureFile(
        [in] LPOLESTR lpwstrOld,
        [in] LPOLESTR lpwstrNew,
        [in] int fAllowEscAbort,
        [in] IAMCopyCaptureFileProgress *pCallback);

    HRESULT FindPin(
        [in] IUnknown *pSource,
        [in] PIN_DIRECTION pindir,
        [in] const GUID *pCategory,
        [in] const GUID *pType,
        [in] BOOL fUnconnected,
        [in] int num,
        [out] IPin **ppPin);
}

enum _AM_RENSDEREXFLAGS
{
    AM_RENDEREX_RENDERTOEXISTINGRENDERERS = 0x01
};

[
    object,
    uuid(36b73882-c2c8-11cf-8b46-00805f6cef60),
    pointer_default(unique)
]
interface IFilterGraph2: IGraphBuilder
{
    HRESULT AddSourceFilterForMoniker(
          [in] IMoniker *pMoniker,
          [in] IBindCtx *pCtx,
          [in, unique] LPCWSTR lpcwstrFilterName,
          [out] IBaseFilter **ppFilter
    );

    HRESULT ReconnectEx
        ( [in] IPin * ppin,
          [in, unique] const AM_MEDIA_TYPE *pmt
        );

    HRESULT RenderEx( [in] IPin *pPinOut,
                      [in] DWORD dwFlags,
                      [in, out] DWORD *pvContext
                    );
}

[
    object,
    local,
    uuid(56a868bf-0ad4-11ce-b03a-0020af0ba770),
    pointer_default(unique)
]
interface IStreamBuilder : IUnknown
{
    HRESULT Render
        ( [in] IPin * ppinOut,
          [in] IGraphBuilder * pGraph
        );

    HRESULT Backout
        ( [in] IPin * ppinOut,
          [in] IGraphBuilder * pGraph
        );
}


783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800
/*****************************************************************************
 * IAMStreamConfig interface
 */
[
    object,
    uuid(c6e13340-30ac-11d0-a18c-00a0c9118956),
    pointer_default(unique)
]
interface IAMStreamConfig : IUnknown
{
    HRESULT SetFormat( [in] AM_MEDIA_TYPE *pmt);
    HRESULT GetFormat( [in] AM_MEDIA_TYPE **pmt);
    HRESULT GetNumberOfCapabilities( [out] int *piCount, [out] int *piSize);
    HRESULT GetStreamCaps( [in] int iIndex, [out] AM_MEDIA_TYPE **pmt,
                          [out] BYTE *pSCC);
}


801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830
typedef enum tagVideoProcAmpProperty
{
    VideoProcAmp_Brightness,
    VideoProcAmp_Contrast,
    VideoProcAmp_Hue,
    VideoProcAmp_Saturation,
    VideoProcAmp_Sharpness,
    VideoProcAmp_Gamma,
    VideoProcAmp_ColorEnable,
    VideoProcAmp_WhiteBalance,
    VideoProcAmp_BacklightCompensation,
    VideoProcAmp_Gain
} VideoProcAmpProperty;

typedef enum tagVideoProcAmpFlags
{
    VideoProcAmp_Flags_Auto   = 0x0001,
    VideoProcAmp_Flags_Manual = 0x0002,
} VideoProcAmpFlags;

/*****************************************************************************
 * IAMVideoProcAmp interface
 */
[
    object,
    uuid(c6e13360-30ac-11d0-a18c-00a0c9118956),
    pointer_default(unique)
]
interface IAMVideoProcAmp : IUnknown
{
831 832 833 834 835
    HRESULT GetRange( [in] LONG Property, [out] LONG *pMin, [out] LONG *pMax,
                     [out] LONG *pSteppingDelta, [out] LONG *pDefault,
                     [out] LONG *pCapsFlags);
    HRESULT Set( [in] LONG Property, [in] LONG lValue, [in] LONG Flags);
    HRESULT Get( [in] LONG Property, [out] LONG *lValue, [out] LONG *Flags);
836 837 838
}


Robert Shearman's avatar
Robert Shearman committed
839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951
[
        object,
        uuid(56a868aa-0ad4-11ce-b03a-0020af0ba770),
        pointer_default(unique)
]
interface IAsyncReader : IUnknown
{
    HRESULT RequestAllocator(
                [in]  IMemAllocator* pPreferred,
                [in]  ALLOCATOR_PROPERTIES* pProps,
                [out] IMemAllocator ** ppActual);

    HRESULT Request(
                [in] IMediaSample* pSample,
                [in] DWORD_PTR dwUser);

    HRESULT WaitForNext(
                [in]  DWORD dwTimeout,
                [out] IMediaSample** ppSample,
                [out] DWORD_PTR * pdwUser);

    HRESULT SyncReadAligned(
                [in] IMediaSample* pSample);

    HRESULT SyncRead(
                [in]  LONGLONG llPosition,
                [in]  LONG lLength,
                [out, size_is(lLength)]
                      BYTE* pBuffer);

    HRESULT Length(
                [out] LONGLONG* pTotal,
                [out] LONGLONG* pAvailable);

    HRESULT BeginFlush(void);

    HRESULT EndFlush(void);
}


[
    object,
    uuid(56a868ab-0ad4-11ce-b03a-0020af0ba770),
    pointer_default(unique)
]
interface IGraphVersion : IUnknown
{
    HRESULT QueryVersion(LONG* pVersion);
}

[
    object,
    uuid(56a868ad-0ad4-11ce-b03a-0020af0ba770),
    pointer_default(unique)
]
interface IResourceConsumer : IUnknown
{
    HRESULT AcquireResource(
        [in] LONG idResource);

    HRESULT ReleaseResource(
        [in] LONG idResource);
}


[
    object,
    uuid(56a868ac-0ad4-11ce-b03a-0020af0ba770),
    pointer_default(unique)
]
interface IResourceManager : IUnknown
{
    HRESULT Register(
        [in] LPCWSTR pName,
        [in] LONG   cResource,
        [out] LONG* plToken
        );

    HRESULT RegisterGroup(
        [in] LPCWSTR pName,
        [in] LONG cResource,
        [in, size_is(cResource)]
             LONG* palTokens,
        [out] LONG* plToken
        );

    HRESULT RequestResource(
        [in] LONG idResource,
        [in] IUnknown* pFocusObject,
        [in] IResourceConsumer* pConsumer
        );

    HRESULT NotifyAcquire(
        [in] LONG idResource,
        [in] IResourceConsumer* pConsumer,
        [in] HRESULT hr);

    HRESULT NotifyRelease(
        [in] LONG idResource,
        [in] IResourceConsumer* pConsumer,
        [in] BOOL bStillWant);

    HRESULT CancelRequest(
        [in] LONG idResource,
        [in] IResourceConsumer* pConsumer);

    HRESULT SetFocus(
        [in] IUnknown* pFocusObject);

    HRESULT ReleaseFocus(
        [in] IUnknown* pFocusObject);

}
952 953 954 955 956 957 958 959 960

cpp_quote("#ifndef _IKsPropertySet_")
cpp_quote("#define _IKsPropertySet_")
cpp_quote("#define KSPROPERTY_SUPPORT_GET  1")
cpp_quote("#define KSPROPERTY_SUPPORT_SET  2")

[
    object,
    uuid(31efac30-515c-11d0-a9aa-00aa0061be93),
961 962
    pointer_default(unique),
    local
963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985
]
interface IKsPropertySet : IUnknown
{
    HRESULT Set( [in] REFGUID guidPropSet,
                 [in] DWORD dwPropID,
                 [in, size_is(cbInstanceData)] LPVOID pInstanceData,
                 [in] DWORD cbInstanceData,
                 [in, size_is(cbPropData)] LPVOID pPropData,
                 [in] DWORD cbPropData );

    HRESULT Get( [in] REFGUID guidPropSet,
                 [in] DWORD dwPropID,
                 [in, size_is(cbInstanceData)] LPVOID pInstanceData,
                 [in] DWORD cbInstanceData,
                 [out, size_is(cbPropData)] LPVOID pPropData,
                 [in] DWORD cbPropData,
                 [out] DWORD *pcbReturned );

    HRESULT QuerySupported( [in] REFGUID guidPropSet,
                            [in] DWORD dwPropID,
                            [out] DWORD *pTypeSupport);
}
cpp_quote("#endif /* _IKsPropertySet_ */")
986 987 988 989 990 991 992 993 994 995

[
    object,
    uuid(36b73883-c2c8-11cf-8b46-00805f6cef60),
    pointer_default(unique)
]
interface ISeekingPassThru : IUnknown
{
    HRESULT Init( [in] BOOL bSupportRendering, [in] IPin *pPin);
}
996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012

enum _AM_FILTER_MISC_FLAGS
{
    AM_FILTER_MISC_FLAGS_IS_RENDERER = 0x1,
    AM_FILTER_MISC_FLAGS_IS_SOURCE = 0x2
};

[
    local,
    object,
    uuid(2dd74950-a890-11d1-abe8-00a0c905f375),
    pointer_default(unique)
]
interface IAMFilterMiscFlags : IUnknown
{
    ULONG GetMiscFlags();
};