axcore.idl 15.3 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
#if 0
#pragma makedep install
#endif

Robert Shearman's avatar
Robert Shearman committed
23 24 25 26 27
#define CHARS_IN_GUID 39
cpp_quote("#define CHARS_IN_GUID 39")

/* GetTimeFormat is defined in winnls.h as
 * either the W or A suffixed version */
28
cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
Robert Shearman's avatar
Robert Shearman committed
29
cpp_quote("#undef GetTimeFormat")
30
cpp_quote("#endif")
Robert Shearman's avatar
Robert Shearman committed
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

typedef struct _AMMediaType
{
    GUID       majortype;
    GUID       subtype;
    BOOL       bFixedSizeSamples;
    BOOL       bTemporalCompression;
    ULONG      lSampleSize;
    GUID       formattype;
    IUnknown * pUnk;
    ULONG      cbFormat;
    [size_is(cbFormat)] BYTE * pbFormat;
} AM_MEDIA_TYPE;

typedef enum _PinDirection
{
    PINDIR_INPUT,
    PINDIR_OUTPUT
} PIN_DIRECTION;

#define MAX_PIN_NAME    128
#define MAX_FILTER_NAME 128
cpp_quote("#define MAX_PIN_NAME    128")
cpp_quote("#define MAX_FILTER_NAME 128")

56 57
cpp_quote("#ifndef REFERENCE_TIME_DEFINED")
cpp_quote("#define REFERENCE_TIME_DEFINED")
Robert Shearman's avatar
Robert Shearman committed
58
typedef LONGLONG REFERENCE_TIME;
59
cpp_quote("#endif")
60 61 62

cpp_quote("#ifndef REFTIME_DEFINED")
cpp_quote("#define REFTIME_DEFINED")
63
typedef DOUBLE REFTIME;
64
cpp_quote("#endif")
Robert Shearman's avatar
Robert Shearman committed
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 320 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

typedef DWORD_PTR HSEMAPHORE;
typedef DWORD_PTR HEVENT;

typedef struct _AllocatorProperties
{
    long cBuffers;
    long cbBuffer;
    long cbAlign;
    long cbPrefix;
} ALLOCATOR_PROPERTIES;

interface IAMovieSetup;
interface IEnumFilters;
interface IEnumMediaTypes;
interface IEnumPins;
interface IBaseFilter;
interface IFilterGraph;
interface IMediaFilter;
interface IMediaSample;
interface IMemAllocator;
interface IMemAllocatorCallbackTemp;
interface IMemAllocatorNotifyCallbackTemp;
interface IMemInputPin;
interface IPin;
interface IReferenceClock;

[
object,
uuid(56a86891-0ad4-11ce-b03a-0020af0ba770),
pointer_default(unique)
]
interface IPin : IUnknown
{
    typedef struct _PinInfo
    {
        IBaseFilter *pFilter;
        PIN_DIRECTION dir;
        WCHAR achName[MAX_PIN_NAME];
    } PIN_INFO;

    HRESULT Connect(
        [in] IPin * pReceivePin,
        [in] const AM_MEDIA_TYPE * pmt);

    HRESULT ReceiveConnection(
        [in] IPin * pConnector,
        [in] const AM_MEDIA_TYPE *pmt);

    HRESULT Disconnect(void);

    HRESULT ConnectedTo(
        [out] IPin **pPin);

    HRESULT ConnectionMediaType(
        [out] AM_MEDIA_TYPE *pmt);

    HRESULT QueryPinInfo(
        [out] PIN_INFO * pInfo);

    HRESULT QueryDirection(
        [out] PIN_DIRECTION *pPinDir);

    HRESULT QueryId(
        [out] LPWSTR * Id);

    HRESULT QueryAccept(
        [in] const AM_MEDIA_TYPE *pmt);

    HRESULT EnumMediaTypes(
        [out] IEnumMediaTypes **ppEnum);

    HRESULT QueryInternalConnections(
        [out] IPin* *apPin,
        [in, out] ULONG *nPin);

    HRESULT EndOfStream(void);

    HRESULT BeginFlush(void);

    HRESULT EndFlush(void);
    HRESULT NewSegment(
        [in] REFERENCE_TIME tStart,
        [in] REFERENCE_TIME tStop,
        [in] double dRate);
}

typedef IPin *PPIN;

[
object,
uuid(56a86892-0ad4-11ce-b03a-0020af0ba770),
pointer_default(unique)
]
interface IEnumPins : IUnknown
{

    HRESULT Next(
        [in] ULONG cPins,
        [out, size_is(cPins)] IPin ** ppPins,
        [out] ULONG * pcFetched);

    HRESULT Skip(
        [in] ULONG cPins);

    HRESULT Reset(void);

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

typedef IEnumPins *PENUMPINS;

[
object,
uuid(89c31040-846b-11ce-97d3-00aa0055595a),
pointer_default(unique)
]
interface IEnumMediaTypes : IUnknown
{
    HRESULT Next(
        [in] ULONG cMediaTypes,
        [out, size_is(cMediaTypes)]
             AM_MEDIA_TYPE ** ppMediaTypes,
        [out] ULONG * pcFetched
    );

    HRESULT Skip(
        [in] ULONG cMediaTypes);

    HRESULT Reset(void);

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

typedef IEnumMediaTypes *PENUMMEDIATYPES;

[
object,
uuid(56a8689f-0ad4-11ce-b03a-0020af0ba770),
pointer_default(unique)
]
interface IFilterGraph : IUnknown
{
    HRESULT AddFilter(
        [in] IBaseFilter * pFilter,
        [in, string] LPCWSTR pName);

    HRESULT RemoveFilter(
        [in] IBaseFilter * pFilter);

    HRESULT EnumFilters(
        [out] IEnumFilters **ppEnum);

    HRESULT FindFilterByName(
        [in, string] LPCWSTR pName,
        [out] IBaseFilter ** ppFilter);

    HRESULT ConnectDirect(
        [in] IPin * ppinOut,
        [in] IPin * ppinIn,
        [in, unique] const AM_MEDIA_TYPE* pmt);

    HRESULT Reconnect(
        [in] IPin * ppin);

    HRESULT Disconnect(
        [in] IPin * ppin);

    HRESULT SetDefaultSyncSource(void);
}

typedef IFilterGraph *PFILTERGRAPH;

[
object,
uuid(56a86893-0ad4-11ce-b03a-0020af0ba770),
pointer_default(unique)
]
interface IEnumFilters : IUnknown
{
    HRESULT Next(
        [in]  ULONG cFilters,
        [out] IBaseFilter ** ppFilter,
        [out] ULONG * pcFetched);


    HRESULT Skip(
        [in] ULONG cFilters);


    HRESULT Reset(void);


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

typedef IEnumFilters *PENUMFILTERS;

[
object,
uuid(56a86899-0ad4-11ce-b03a-0020af0ba770),
pointer_default(unique)
]
interface IMediaFilter : IPersist
{
    typedef enum _FilterState
    {
        State_Stopped,
        State_Paused,
        State_Running
    } FILTER_STATE;

    HRESULT Stop(void);
    HRESULT Pause(void);

    HRESULT Run(REFERENCE_TIME tStart);

    HRESULT GetState(
        [in] DWORD dwMilliSecsTimeout,
        [out] FILTER_STATE *State);

    HRESULT SetSyncSource(
        [in] IReferenceClock * pClock);

    HRESULT GetSyncSource(
        [out] IReferenceClock ** pClock);
}

typedef IMediaFilter *PMEDIAFILTER;

[
object,
uuid(56a86895-0ad4-11ce-b03a-0020af0ba770),
pointer_default(unique)
]
interface IBaseFilter : IMediaFilter
{
    typedef struct _FilterInfo
    {
        WCHAR achName[MAX_FILTER_NAME];
        IFilterGraph * pGraph;
    } FILTER_INFO;

    HRESULT EnumPins(
        [out] IEnumPins ** ppEnum);

    HRESULT FindPin(
        [in, string] LPCWSTR Id,
        [out] IPin ** ppPin);

    HRESULT QueryFilterInfo(
        [out] FILTER_INFO * pInfo);

    HRESULT JoinFilterGraph(
        [in] IFilterGraph * pGraph,
        [in, string] LPCWSTR pName);

    HRESULT QueryVendorInfo(
        [out, string] LPWSTR* pVendorInfo);
}

typedef IBaseFilter *PFILTER;

[
object,
uuid(56a86897-0ad4-11ce-b03a-0020af0ba770),
pointer_default(unique)
]
interface IReferenceClock : IUnknown
{
    HRESULT GetTime(
        [out] REFERENCE_TIME *pTime);

    HRESULT AdviseTime(
        [in] REFERENCE_TIME baseTime,
        [in] REFERENCE_TIME streamTime,
        [in] HEVENT hEvent,
        [out] DWORD_PTR * pdwAdviseCookie);

    HRESULT AdvisePeriodic(
        [in] REFERENCE_TIME startTime,
        [in] REFERENCE_TIME periodTime,
        [in] HSEMAPHORE hSemaphore,
        [out] DWORD_PTR * pdwAdviseCookie);

    HRESULT Unadvise(
        [in] DWORD_PTR dwAdviseCookie);
}

typedef IReferenceClock *PREFERENCECLOCK;

/*
[
object,
uuid(36b73885-c2c8-11cf-8b46-00805f6cef60),
pointer_default(unique)
]
interface IReferenceClock2 : IReferenceClock
{
}

typedef IReferenceClock2 *PREFERENCECLOCK2;

*/

[
local,
object,
uuid(56a8689a-0ad4-11ce-b03a-0020af0ba770),
pointer_default(unique)
]
interface IMediaSample : IUnknown
{
    HRESULT GetPointer([out] BYTE ** ppBuffer);

    long GetSize(void);

    HRESULT GetTime(
        [out] REFERENCE_TIME * pTimeStart,
        [out] REFERENCE_TIME * pTimeEnd);

    HRESULT SetTime(
        [in] REFERENCE_TIME * pTimeStart,
        [in] REFERENCE_TIME * pTimeEnd);

    HRESULT IsSyncPoint(void);

    HRESULT SetSyncPoint(BOOL bIsSyncPoint);

    HRESULT IsPreroll(void);

    HRESULT SetPreroll(BOOL bIsPreroll);

402
    LONG GetActualDataLength(void);
Robert Shearman's avatar
Robert Shearman committed
403

404
    HRESULT SetActualDataLength(LONG length);
Robert Shearman's avatar
Robert Shearman committed
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

    HRESULT GetMediaType(AM_MEDIA_TYPE **ppMediaType);

    HRESULT SetMediaType(AM_MEDIA_TYPE *pMediaType);

    HRESULT IsDiscontinuity(void);

    HRESULT SetDiscontinuity(BOOL bDiscontinuity);

    HRESULT GetMediaTime(
        [out] LONGLONG * pTimeStart,
        [out] LONGLONG * pTimeEnd);

    HRESULT SetMediaTime(
        [in] LONGLONG * pTimeStart,
        [in] LONGLONG * pTimeEnd);
}

typedef IMediaSample *PMEDIASAMPLE;

enum tagAM_SAMPLE_PROPERTY_FLAGS
{
       AM_SAMPLE_SPLICEPOINT        = 0x01,
       AM_SAMPLE_PREROLL            = 0x02,
       AM_SAMPLE_DATADISCONTINUITY  = 0x04,
       AM_SAMPLE_TYPECHANGED        = 0x08,
       AM_SAMPLE_TIMEVALID          = 0x10,
       AM_SAMPLE_TIMEDISCONTINUITY  = 0x40,
       AM_SAMPLE_FLUSH_ON_PAUSE     = 0x80,
       AM_SAMPLE_STOPVALID          = 0x100,
       AM_SAMPLE_ENDOFSTREAM        = 0x200,
       AM_STREAM_MEDIA              = 0,
       AM_STREAM_CONTROL            = 1
};

typedef struct tagAM_SAMPLE2_PROPERTIES
{
    DWORD    cbData;
    DWORD    dwTypeSpecificFlags;
    DWORD    dwSampleFlags;
    LONG     lActual;
    REFERENCE_TIME tStart;
    REFERENCE_TIME tStop;
    DWORD    dwStreamId;
    AM_MEDIA_TYPE *pMediaType;
    BYTE    *pbBuffer;
    LONG     cbBuffer;
} AM_SAMPLE2_PROPERTIES;

[
        local,
        object,
        uuid(36b73884-c2c8-11cf-8b46-00805f6cef60),
        pointer_default(unique)
]
interface IMediaSample2 : IMediaSample
{
    HRESULT GetProperties(
        [in] DWORD cbProperties,
        [out, size_is(cbProperties)] BYTE * pbProperties
    );

    HRESULT SetProperties(
        [in] DWORD cbProperties,
        [in, size_is(cbProperties)] const BYTE * pbProperties
    );
}

typedef IMediaSample2 *PMEDIASAMPLE2;

#define AM_GBF_PREVFRAMESKIPPED 1
#define AM_GBF_NOTASYNCPOINT    2
cpp_quote("#define AM_GBF_PREVFRAMESKIPPED 1")
cpp_quote("#define AM_GBF_NOTASYNCPOINT 2")

cpp_quote("#define AM_GBF_NOWAIT 4")
481
cpp_quote("#define AM_GBF_NODDSURFACELOCK 8")
Robert Shearman's avatar
Robert Shearman committed
482 483 484 485 486 487 488 489 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

[
object,
uuid(56a8689c-0ad4-11ce-b03a-0020af0ba770),
pointer_default(unique)
]
interface IMemAllocator : IUnknown
{
    HRESULT SetProperties(
        [in] ALLOCATOR_PROPERTIES* pRequest,
        [out] ALLOCATOR_PROPERTIES* pActual);

    HRESULT GetProperties(
        [out] ALLOCATOR_PROPERTIES* pProps);

    HRESULT Commit(void);

    HRESULT Decommit(void);

    HRESULT GetBuffer(
        [out] IMediaSample **ppBuffer,
        [in] REFERENCE_TIME * pStartTime,
        [in] REFERENCE_TIME * pEndTime,
        [in] DWORD dwFlags);

    HRESULT ReleaseBuffer(
        [in] IMediaSample *pBuffer);
}

typedef IMemAllocator *PMEMALLOCATOR;

[
object,
uuid(379a0cf0-c1de-11d2-abf5-00a0c905f375),
pointer_default(unique)
]
interface IMemAllocatorCallbackTemp : IMemAllocator
{
    HRESULT SetNotify(
        [in] IMemAllocatorNotifyCallbackTemp *pNotify);

    HRESULT GetFreeCount(
        [out] LONG *plBuffersFree);
}

[
object,
uuid(92980b30-c1de-11d2-abf5-00a0c905f375),
pointer_default(unique)
]
interface IMemAllocatorNotifyCallbackTemp : IUnknown
{
    HRESULT NotifyRelease();
}

[
object,
uuid(56a8689d-0ad4-11ce-b03a-0020af0ba770),
pointer_default(unique)
]
interface IMemInputPin : IUnknown
{
    HRESULT GetAllocator(
        [out] IMemAllocator ** ppAllocator);

    HRESULT NotifyAllocator(
        [in] IMemAllocator * pAllocator,
        [in] BOOL bReadOnly);

    HRESULT GetAllocatorRequirements( [out] ALLOCATOR_PROPERTIES*pProps );

    HRESULT Receive(
        [in] IMediaSample * pSample);

    HRESULT ReceiveMultiple(
        [in, size_is(nSamples)] IMediaSample **pSamples,
        [in] long nSamples,
        [out] long *nSamplesProcessed);

    HRESULT ReceiveCanBlock();
}

typedef IMemInputPin *PMEMINPUTPIN;

[
object,
uuid(a3d8cec0-7e5a-11cf-bbc5-00805f6cef20),
pointer_default(unique)
]
interface IAMovieSetup : IUnknown
{
    HRESULT Register( );
    HRESULT Unregister( );
}

typedef IAMovieSetup *PAMOVIESETUP;

typedef enum AM_SEEKING_SeekingFlags
{
    AM_SEEKING_NoPositioning            = 0x00,
    AM_SEEKING_AbsolutePositioning      = 0x01,
    AM_SEEKING_RelativePositioning      = 0x02,
    AM_SEEKING_IncrementalPositioning   = 0x03,
    AM_SEEKING_PositioningBitsMask      = 0x03,
    AM_SEEKING_SeekToKeyFrame           = 0x04,
    AM_SEEKING_ReturnTime               = 0x08,
    AM_SEEKING_Segment                  = 0x10,
    AM_SEEKING_NoFlush                  = 0x20
} AM_SEEKING_SEEKING_FLAGS;

typedef enum AM_SEEKING_SeekingCapabilities
{
    AM_SEEKING_CanSeekAbsolute     = 0x001,
    AM_SEEKING_CanSeekForwards     = 0x002,
    AM_SEEKING_CanSeekBackwards    = 0x004,
    AM_SEEKING_CanGetCurrentPos    = 0x008,
    AM_SEEKING_CanGetStopPos       = 0x010,
    AM_SEEKING_CanGetDuration      = 0x020,
    AM_SEEKING_CanPlayBackwards    = 0x040,
    AM_SEEKING_CanDoSegments       = 0x080,
    AM_SEEKING_Source              = 0x100
} AM_SEEKING_SEEKING_CAPABILITIES;

[
object,
uuid(36b73880-c2c8-11cf-8b46-00805f6cef60),
pointer_default(unique)
]
interface IMediaSeeking : IUnknown
{
    HRESULT GetCapabilities( [out] DWORD * pCapabilities );

    HRESULT CheckCapabilities( [in,out] DWORD * pCapabilities );

    HRESULT IsFormatSupported([in] const GUID * pFormat);

    HRESULT QueryPreferredFormat([out] GUID * pFormat);

    HRESULT GetTimeFormat([out] GUID *pFormat);

    HRESULT IsUsingTimeFormat([in] const GUID * pFormat);

    HRESULT SetTimeFormat([in] const GUID * pFormat);

    HRESULT GetDuration([out] LONGLONG *pDuration);

    HRESULT GetStopPosition([out] LONGLONG *pStop);

    HRESULT GetCurrentPosition([out] LONGLONG *pCurrent);

    HRESULT ConvertTimeFormat([out] LONGLONG * pTarget, [in] const GUID * pTargetFormat,
                              [in]  LONGLONG    Source, [in] const GUID * pSourceFormat );

    HRESULT SetPositions(
        [in,out] LONGLONG * pCurrent,
        [in] DWORD dwCurrentFlags,
        [in,out] LONGLONG * pStop,
        [in] DWORD dwStopFlags);

    HRESULT GetPositions(
        [out] LONGLONG * pCurrent,
        [out] LONGLONG * pStop);

    HRESULT GetAvailable(
        [out] LONGLONG * pEarliest,
        [out] LONGLONG * pLatest);

    HRESULT SetRate([in]  double dRate);

    HRESULT GetRate([out] double * pdRate);

    HRESULT GetPreroll([out] LONGLONG * pllPreroll);
}

typedef IMediaSeeking *PMEDIASEEKING;

enum tagAM_MEDIAEVENT_FLAGS
{
    AM_MEDIAEVENT_NONOTIFY = 0x01
};
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

enum _AMSTREAMSELECTINFOFLAGS
{
    AMSTREAMSELECTINFO_ENABLED      = 0x1,
    AMSTREAMSELECTINFO_EXCLUSIVE    = 0x2
};

enum _AMSTREAMSELECTENABLEFLAGS
{
    AMSTREAMSELECTENABLE_ENABLE     = 0x1,
    AMSTREAMSELECTENABLE_ENABLEALL  = 0x2
};

[
object,
uuid(c1960960-17f5-11d1-abe1-00a0c905f375),
pointer_default(unique)
]
interface IAMStreamSelect : IUnknown
{
    HRESULT Count(
        [out] DWORD *streams);

    HRESULT Info(
        [in] long index,
        [out] AM_MEDIA_TYPE **media_type,
        [out] DWORD *flags,
        [out] LCID *lcid,
        [out] DWORD *group,
        [out] WCHAR **name,
        [out] IUnknown **object,
        [out] IUnknown **unknown);

    HRESULT Enable(
        [in] long index,
        [in] DWORD flags);
}

typedef IAMStreamSelect *PAMSTREAMSELECT;