qedit.idl 13.7 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
/*
 * Copyright (C) 2008 Google (Lei Zhang)
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 */

import "oaidl.idl";
import "ocidl.idl";
/* import "dxtrans.idl"; */
import "amstream.idl";
import "msxml.idl";

[
    object,
    uuid(0579154A-2B53-4994-B0D0-E773148EFF85),
    local,
    pointer_default(unique)
]
interface ISampleGrabberCB : IUnknown
{
    HRESULT SampleCB(
        double SampleTime,
        IMediaSample * pSample
    );
    HRESULT BufferCB(
        double SampleTime,
        BYTE * pBuffer,
40
        LONG BufferLen
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

[
    object,
    uuid(6B652FFF-11FE-4fce-92AD-0266B5D7C78F),
    local,
    pointer_default(unique)
]
interface ISampleGrabber: IUnknown
{
    HRESULT SetOneShot(
        BOOL OneShot
    );

    HRESULT SetMediaType(
        const AM_MEDIA_TYPE * pType
    );

    HRESULT GetConnectedMediaType(
        AM_MEDIA_TYPE * pType
    );

    HRESULT SetBufferSamples(
        BOOL BufferThem
    );

    HRESULT GetCurrentBuffer(
69 70
        [in,out] LONG * pBufferSize,
        [out] LONG * pBuffer
71 72 73 74 75 76 77 78
    );

    HRESULT GetCurrentSample(
        [out] IMediaSample ** ppSample
    );

    HRESULT SetCallback(
        ISampleGrabberCB * pCallback,
79
        LONG WhichMethodToCallback
80 81
    );
};
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98

[
    object,
    uuid(65bd0710-24d2-4FF7-9324-ed2e5d3abafa),
    pointer_default(unique)
]
interface IMediaDet : IUnknown
{
    HRESULT get_Filter(
        [out] IUnknown* *pVal
    );

    HRESULT put_Filter(
        IUnknown* newVal
    );

    HRESULT get_OutputStreams(
99
        [out] LONG *pVal
100 101 102
    );

    HRESULT get_CurrentStream(
103
        [out] LONG *pVal
104 105 106
    );

    HRESULT put_CurrentStream(
107
        LONG newVal
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
    );

    HRESULT get_StreamType(
        [out] GUID *pVal
    );

    HRESULT get_StreamTypeB(
        [out] BSTR *pVal
    );

    HRESULT get_StreamLength(
        [out] double *pVal
    );

    HRESULT get_Filename(
        [out] BSTR *pVal
    );

    HRESULT put_Filename(
        BSTR newVal
    );

    HRESULT GetBitmapBits(
        double StreamTime,
132
        LONG * pBufferSize,
133
        char * pBuffer,
134 135
        LONG Width,
        LONG Height
136 137 138 139
    );

    HRESULT WriteBitmapBits(
        double StreamTime,
140 141
        LONG Width,
        LONG Height,
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
        BSTR Filename
    );

    HRESULT get_StreamMediaType(
        [out] AM_MEDIA_TYPE * pVal
    );

    HRESULT GetSampleGrabber(
        [out] ISampleGrabber ** ppVal
    );

    HRESULT get_FrameRate(
        [out] double *pVal
    );

    HRESULT EnterBitmapGrabMode(
        double SeekTime
    );
};

[
    uuid(65BD0711-24D2-4ff7-9324-ED2E5D3ABAFA),
]
coclass MediaDet
{
    [default] interface IMediaDet;
};
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 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 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 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 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808
[
    object,
    uuid(288581E0-66CE-11d2-918F-00C0DF10D434),
    odl,
    pointer_default(unique)
]
interface IMediaLocator : IUnknown
{
    HRESULT FindMediaFile(
        BSTR input,
        BSTR filter,
        BSTR * output,
        long flags
    );

    HRESULT AddFoundLocation(
        BSTR dir
    );
};

typedef struct
{
    BSTR name;
    DISPID dispID;
    LONG nValues;
} DEXTER_PARAM;

typedef struct
{
    VARIANT v;
    REFERENCE_TIME rt;
    DWORD dwInterp;
} DEXTER_VALUE;

[
    object,
    uuid(AE9472BD-B0C3-11D2-8D24-00A0C9441E20),
    pointer_default(unique)
]
interface IPropertySetter : IUnknown
{
    HRESULT LoadXML(
        [in] IUnknown * pxml
    );

    HRESULT PrintXML(
        [out] char * xml,
        [in] int size,
        [out] int * printed,
        [in] int indent
    );

    HRESULT CloneProps(
        [out] IPropertySetter ** setter,
        [in] REFERENCE_TIME start,
        [in] REFERENCE_TIME stop
    );

    HRESULT AddProp(
        [in] DEXTER_PARAM param,
        [in] DEXTER_VALUE * value
    );

    HRESULT GetProps(
        [out] LONG * params,
        [out] DEXTER_PARAM ** param,
        [out] DEXTER_VALUE ** value
    );

    HRESULT FreeProps(
        [in] LONG params,
        [in] DEXTER_PARAM * param,
        [in] DEXTER_VALUE * value
    );

    HRESULT ClearProps();

    HRESULT SaveToBlob(
        [out] LONG * size,
        [out] BYTE ** blob
    );

    HRESULT LoadFromBlob(
        [in] LONG size,
        [in] BYTE * blob
    );

    HRESULT SetProps(
        [in] IUnknown * target,
        [in] REFERENCE_TIME now
    );
};

[
    object,
    uuid(E43E73A2-0EFA-11d3-9601-00A0C9441E20),
    odl,
    pointer_default(unique)
]
interface IAMErrorLog : IUnknown
{
    HRESULT LogError(
        long severity,
        BSTR error_str,
        long error_code,
        long hresult,
        [in] VARIANT * extra
    );
};

[
    object,
    uuid(963566DA-BE21-4eaf-88E9-35704F8F52A1),
    odl,
    pointer_default(unique)
]
interface IAMSetErrorLog : IUnknown
{
    [propget] HRESULT ErrorLog(
        [out, retval] IAMErrorLog ** log
    );

    [propput] HRESULT ErrorLog(
        [in] IAMErrorLog * log
    );
};

interface IAMTimeline;
interface IAMTimelineGroup;
interface IAMTimelineObj;
interface IAMTimelineSrc;

typedef enum
{
    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;

[
    object,
    uuid(78530B74-61F9-11D2-8CAD-00A024580902),
    odl,
    pointer_default(unique)
]
interface IAMTimeline : IUnknown
{
    HRESULT CreateEmptyNode(
        [out] IAMTimelineObj ** obj,
        TIMELINE_MAJOR_TYPE type
    );

    HRESULT AddGroup(
        IAMTimelineObj * group
    );

    HRESULT RemGroupFromList(
        IAMTimelineObj * group
    );

    HRESULT GetGroup(
        [out] IAMTimelineObj ** group,
        long index
    );

    HRESULT GetGroupCount(
        long * count
    );

    HRESULT ClearAllGroups();

    HRESULT GetInsertMode(
        long * mode
    );

    HRESULT SetInsertMode(
        long mode
    );

    HRESULT EnableTransitions(
        BOOL enabled
    );

    HRESULT TransitionsEnabled(
        BOOL * enabled
    );

    HRESULT EnableEffects(
        BOOL enabled
    );

    HRESULT EffectsEnabled(
        BOOL * enabled
    );

    HRESULT SetInterestRange(
        REFERENCE_TIME start,
        REFERENCE_TIME stop
    );

    HRESULT GetDuration(
        REFERENCE_TIME * duration
    );

    HRESULT GetDuration2(
        double * duration
    );

    HRESULT SetDefaultFPS(
        double fps
    );

    HRESULT GetDefaultFPS(
        double * fps
    );

    HRESULT IsDirty(
        BOOL * dirty
    );

    HRESULT GetDirtyRange(
        REFERENCE_TIME * start,
        REFERENCE_TIME * stop
    );

    HRESULT GetCountOfType(
        long group,
        long * value,
        long * value_with_comps,
        TIMELINE_MAJOR_TYPE type
    );

    HRESULT ValidateSourceNames(
        long flags,
        IMediaLocator * override,
        LONG_PTR notify_event
    );

    HRESULT SetDefaultTransition(
        GUID * guid
    );

    HRESULT GetDefaultTransition(
        GUID * guid
    );

    HRESULT SetDefaultEffect(
        GUID * guid
    );

    HRESULT GetDefaultEffect(
        GUID * guid
    );

    HRESULT SetDefaultTransitionB(
        BSTR guidb
    );

    HRESULT GetDefaultTransitionB(
        [out,retval] BSTR * guidb
    );

    HRESULT SetDefaultEffectB(
        BSTR guidb
    );

    HRESULT GetDefaultEffectB(
        [out,retval] BSTR * guidb
    );
};

[
    uuid(78530B75-61F9-11D2-8CAD-00A024580902)
]
coclass AMTimeline
{
    [default] interface IAMTimeline;
    interface IPersistStream;
    interface IAMSetErrorLog;
};

[
    object,
    uuid(9EED4F00-B8A6-11d2-8023-00C0DF10D434),
    odl,
    pointer_default(unique)
]
interface IAMTimelineGroup : IUnknown
{
    HRESULT SetTimeline(
        IAMTimeline * timeline
    );

    HRESULT GetTimeline(
        [out] IAMTimeline ** timeline
    );

    HRESULT GetPriority(
        long * priority
    );

    HRESULT GetMediaType(
        [out] AM_MEDIA_TYPE *
    );

    HRESULT SetMediaType(
        [in] AM_MEDIA_TYPE *
    );

    HRESULT SetOutputFPS(
        double fps
    );

    HRESULT GetOutputFPS(
        double * fps
    );

    HRESULT SetGroupName(
        BSTR name
    );

    HRESULT GetGroupName(
        [out,retval] BSTR * name
    );

    HRESULT SetPreviewMode(
        BOOL preview
    );

    HRESULT GetPreviewMode(
        BOOL * preview
    );

    HRESULT SetMediaTypeForVB(
        [in] long type
    );

    HRESULT GetOutputBuffering(
        [out] int * buffer
    );

    HRESULT SetOutputBuffering(
        [in] int buffer
    );

    HRESULT SetSmartRecompressFormat(
        long * format
    );

    HRESULT GetSmartRecompressFormat(
        long ** format
    );

    HRESULT IsSmartRecompressFormatSet(
        BOOL * set
    );

    HRESULT IsRecompressFormatDirty(
        BOOL * dirty
    );

    HRESULT ClearRecompressFormatDirty();

    HRESULT SetRecompFormatFromSource(
        IAMTimelineSrc * source
    );
};

[
    object,
    local,
    uuid(78530B77-61F9-11D2-8CAD-00A024580902),
    odl,
    pointer_default(unique)
]
interface IAMTimelineObj : IUnknown
{
    HRESULT GetStartStop(
        REFERENCE_TIME * start,
        REFERENCE_TIME * stop
    );

    HRESULT GetStartStop2(
        REFTIME * start, REFTIME * stop
    );

    HRESULT FixTimes(
        REFERENCE_TIME * start, REFERENCE_TIME * stop
    );

    HRESULT FixTimes2(
        REFTIME * start, REFTIME * stop
    );

    HRESULT SetStartStop(
        REFERENCE_TIME start,
        REFERENCE_TIME stop
    );

    HRESULT SetStartStop2(
        REFTIME start,
        REFTIME stop
    );

    HRESULT GetPropertySetter(
        [out,retval] IPropertySetter ** setter
    );

    HRESULT SetPropertySetter(
        IPropertySetter * setter
    );

    HRESULT GetSubObject(
        [out,retval] IUnknown ** obj
    );

    HRESULT SetSubObject(
        IUnknown * obj
    );

    HRESULT SetSubObjectGUID(
        GUID guid
    );

    HRESULT SetSubObjectGUIDB(
        BSTR guidb
    );

    HRESULT GetSubObjectGUID(
        GUID * guid
    );

    HRESULT GetSubObjectGUIDB(
        [out,retval] BSTR * guidb
    );

    HRESULT GetSubObjectLoaded(
        BOOL * loaded
    );

    HRESULT GetTimelineType(
        TIMELINE_MAJOR_TYPE * type
    );

    HRESULT SetTimelineType(
        TIMELINE_MAJOR_TYPE type
    );

    HRESULT GetUserID(
        long * id
    );

    HRESULT SetUserID(
        long id
    );

    HRESULT GetGenID(
        long * id
    );

    HRESULT GetUserName(
        [out,retval] BSTR * name
    );

    HRESULT SetUserName(
        BSTR name
    );

    HRESULT GetUserData(
        BYTE * data,
        long * size
    );

    HRESULT SetUserData(
        BYTE * data,
        long size
    );

    HRESULT GetMuted(
        BOOL * muted
    );

    HRESULT SetMuted(
        BOOL muted
    );

    HRESULT GetLocked(
        BOOL * locked
    );

    HRESULT SetLocked(
        BOOL locked
    );

    HRESULT GetDirtyRange(
        REFERENCE_TIME * start,
        REFERENCE_TIME * stop
    );

    HRESULT GetDirtyRange2(
        REFTIME * start,
        REFTIME * stop
    );

    HRESULT SetDirtyRange(
        REFERENCE_TIME start,
        REFERENCE_TIME stop
    );

    HRESULT SetDirtyRange2(
        REFTIME start,
        REFTIME stop
    );

    HRESULT ClearDirty();

    HRESULT Remove();

    HRESULT RemoveAll();

    HRESULT GetTimelineNoRef(
        IAMTimeline ** timeline
    );

    HRESULT GetGroupIBelongTo(
        [out] IAMTimelineGroup ** group
    );

    HRESULT GetEmbedDepth(
        long * depth
    );
};

[
    object,
    uuid(78530B79-61F9-11D2-8CAD-00A024580902),
    odl,
    pointer_default(unique)
]
interface IAMTimelineSrc : IUnknown
{
    HRESULT GetMediaTimes(
        REFERENCE_TIME * start,
        REFERENCE_TIME * stop
    );

    HRESULT GetMediaTimes2(
        REFTIME * start,
        REFTIME * stop
    );

    HRESULT ModifyStopTime(
        REFERENCE_TIME stop
    );

    HRESULT ModifyStopTime2(
        REFTIME stop
    );

    HRESULT FixMediaTimes(
        REFERENCE_TIME * start,
        REFERENCE_TIME * stop
    );

    HRESULT FixMediaTimes2(
        REFTIME * start,
        REFTIME * stop
    );

    HRESULT SetMediaTimes(
        REFERENCE_TIME Start,
        REFERENCE_TIME Stop
    );

    HRESULT SetMediaTimes2(
        REFTIME Start,
        REFTIME Stop
    );

    HRESULT SetMediaLength(
        REFERENCE_TIME length
    );

    HRESULT SetMediaLength2(
        REFTIME length
    );

    HRESULT GetMediaLength(
        REFERENCE_TIME * length
    );

    HRESULT GetMediaLength2(
        REFTIME * length
    );

    HRESULT GetMediaName(
        [out,retval] BSTR * name
    );

    HRESULT SetMediaName(
        BSTR name
    );

    HRESULT SpliceWithNext(
        IAMTimelineObj * next
    );

    HRESULT GetStreamNumber(
        long * num
    );

    HRESULT SetStreamNumber(
        long num
    );

    HRESULT IsNormalRate(
        BOOL * normal
    );

    HRESULT GetDefaultFPS(
        double * fps
    );

    HRESULT SetDefaultFPS(
        double fps
    );

    HRESULT GetStretchMode(
        int * mode
    );

    HRESULT SetStretchMode(
        int mode
    );
};

809 810 811 812 813 814 815 816 817
enum
{
    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
};