summaryrefslogtreecommitdiffstats
path: root/sdk/dx8sdk/Include/DShowIDL/sbe.idl
blob: 246b148c7c611bdd16ea559aa9c8453bca2d980e (plain) (blame)
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
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
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
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
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
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348

/*++

    Copyright (c) 2002 Microsoft Corporation

    Module Name:

        sbe.idl

    Abstract:

        This module the StreamBuffer interface definitions & CLSIDs, public

--*/

import "unknwn.idl" ;
import "wtypes.idl" ;
import "objidl.idl";
import "strmif.idl" ;

//  ============================================================================

//  interfaces
interface   IStreamBufferSink ;                     //  locking & recording
interface   IStreamBufferSink2 ;                    //  ext locking
interface   IStreamBufferSink3 ;                    //  specify the minimum
interface   IStreamBufferSource ;                   //  associates with IStreamBufferSink
interface   IStreamBufferRecordControl ;            //  recording control
interface   IStreamBufferRecordingAttribute ;       //  StreamBuffer attribute creation
interface   IEnumStreamBufferRecordingAttrib ;      //  StreamBuffer attribute enumeration
interface   IStreamBufferConfigure ;                //  configuration interface
interface   IStreamBufferConfigure2 ;               //  configuration interface; more
interface   IStreamBufferMediaSeeking ;             //  IMediaSeeking but with different GUID
interface   IStreamBufferMediaSeeking2 ;            //  + available filter & frame rate on FF/RW
interface   IStreamBufferPolicy ;                   //  StreamBuffer policies
interface   IStreamBufferInitialize ;               //  allows 3rd party app to set HKEY
interface   IStreamBufferDataCounters ;             //  collect data rate from the pins

[
    object,
    uuid(9ce50f2d-6ba7-40fb-a034-50b1a674ec78),
    pointer_default(unique)
]
[local] interface IStreamBufferInitialize : IUnknown
{
    /*++
        ------------------------------------------------------------------------
        SetHKEY ()

        Implemented on StreamBufferStreamSink and StreamBufferSource filters.
        Gives a hosting application the ability to specify HKEY root in
          registry.  This method must called **early**: after the filter is
          instantiated, but before StreamBufferSource is locked (explicitly or
          implicitely) if calling the method on StreamBufferSource, or before
          a source is set (via IStreamBufferSource or IFileSourceFilter) if
          calling the method on StreamBufferStreamSource.  If a call is made
          after either filter has been initialized internally, the call will
          fail with E_UNEXPECTED.  The hosting application is responsible for
          ensuring that the HKEY passed in is writable & readable per the
          logged-on user privileges.  The HKEY is duplicated internally,
          so the caller can close it after making this call.
    --*/
    HRESULT
    SetHKEY (
        [in]    HKEY    hkeyRoot
        ) ;

    /*++
        ------------------------------------------------------------------------
        SetSIDs ()

        Implemented on StreamBufferStreamSink and StreamBufferSource filters.
        Provides a way for the hosting application to specify security-level
          sharing between capture and render processes and contexts.  By
          default security attributes are inherited from the hosting process,
          unless the application overrides the defaults and provides them via
          this method.
    --*/
    HRESULT
    SetSIDs (
        [in]                    DWORD   cSIDs,
        [in, size_is (cSIDs)]   PSID *  ppSID
        ) ;
} ;

/*++
    ============================================================================
    ============================================================================
    IStreamBufferSink

    Stream Source interface;
    implemented on the StreamBufferSink filter;
    Only way to get a recorder object's IUnknown (object will subsequently
        be associated with this Sink)
--*/

enum {
    RECORDING_TYPE_CONTENT = 0,         //  no post-recording or overlapped
    RECORDING_TYPE_REFERENCE,           //  allows post-recording & overlapped
} ;

[
    object,
    uuid(afd1f242-7efd-45ee-ba4e-407a25c9a77a),
    pointer_default(unique)
]
interface IStreamBufferSink : IUnknown
{
    /*++
        ------------------------------------------------------------------------
        LockProfile ()

        1.  Locks the profile;
        2.  No *new* input pin connections will be accepted;
        3.  Existing pins that are, or have ever been, connected can be
            reconnected if the media type is exactly the same as the first
            successful connection;
        4.  Can be called multiple times with the same parameter as the initial
            LockProfile() call was made with i.e. more than once with NULL if
            initially locked with NULL, or more than once with a string if
            initially locked with a string; if the profile is already locked,
            and the parameters are the same, returns S_FALSE, else the call
            fails (if trying to lock a locked profile with a different
            parameter)
        5.  Must be called before the filter that implements this interface is
            ever run; when it is run, it locks implicitely and this method has
            no effect if called with NULL parameters, or fails if called with
            non-NULL parameter for the reasons listed above;
        6.  Errors with VFW_E_UNSUPPORTED_STREAM if there are no streams in the
            profile;

        Parameter Detail
        ----------------

        pszStreamBufferFilename

            Is a NULL-terminated filename string.  If the content written by
            this sink is to be shared cross-process, this parameter specifies a
            filename that will be opened by any reader(s) to read & render the
            content sent into the sink.

            Can be NULL (not specified)

            Must be a full-path filename; if no path is specified, the file is
            created in a "current" directory

            If the file already exists, the call fails

            Is opened with DELETE_ON_CLOSE flag, so is automatically deleted
            when the sink is unlocked, or when the hosting process terminates
    --*/
    HRESULT
    LockProfile (
        [in]    LPCWSTR pszStreamBufferFilename
        ) ;

    /*++
        ------------------------------------------------------------------------
        CreateRecorder ()

        1.  Returns a *new* recorder object's IUnknown;
        2.  Caller can call QueryInterface() on the returned pointer to get
            interface pointers to configure & control the recording;
        3.  Returned IUnknown pointer is ref'd & must be Release()'d by the
            caller
        4.  IStreamBufferSink interface must have been locked (explicitely or
            implicitely) prior to call

        To create an ordinary recording, specify RECORDING_TYPE_CONTENT for the
        dwRecordType parammeter.  This will record the content directly into
        the specified file.  These recording types only accept start and stop
        times that occur in the future.

        A recording of type RECORDING_TYPE_REFERENCE generates a small file
        that references content saved in temporary storage.  Recordings of this
        type can have start and stop times that occurs in the past, and can
        overlap other same-type recordings.

        Reference recording *content* will be saved in the same subdirectory as
        the specified reference file, but with hidden and system attributes.
        The naming convention of the files will append a _1.sbe, _2.sbe, etc...
        to the filename (minus extension) specified in the call e.g. a
        "seinfeld01.sbe" reference file will have saved content in hidden
        and system files "seinfeld01_1.sbe", "seinfeld01_2.sbe", etc...

    --*/
    HRESULT
    CreateRecorder (
        [in]    LPCWSTR     pszFilename,
        [in]    DWORD       dwRecordType,       //  RECORDING_TYPE_CONTENT or RECORDING_TYPE_REFERENCE
        [out]   IUnknown ** pRecordingIUnknown
        ) ;

    /*++
        ------------------------------------------------------------------------
        IsProfileLocked ()

        1.  Returns S_OK if the profile is locked and S_FALSE if it is not.
        2.  Returns E_FAIL on error.
    --*/
    HRESULT
    IsProfileLocked (
        ) ;
} ;

/*++
    ============================================================================
    ============================================================================
    IStreamBufferSink2 ()

    Stream Source interface;
    implemented on the StreamBufferSink filter;
--*/
[
    object,
    uuid(DB94A660-F4FB-4bfa-BCC6-FE159A4EEA93),
    pointer_default(unique)
]
interface IStreamBufferSink2 : IStreamBufferSink
{
    /*++
        ------------------------------------------------------------------------
        UnlockProfile ()

        1.  Unlocks a profile explicitely.
        2.  Is a noop if the sink is not locked & returns S_FALSE.
        3.  Can only be called when the graph & filter are stopped.
        4.  Since recordings are bound to the "lock session", incomplete
            recordings i.e. those that have never been started, are
            invalidated & must be re-created under the next "lock session".
        5.  Profile still unlocks implicitly when the filter is stopped.
    --*/
    HRESULT
    UnlockProfile (
        ) ;
} ;

/*++
    ============================================================================
    ============================================================================
    IStreamBufferSink3 ()

    Stream Source interface;
    implemented on the StreamBufferSink filter;
--*/
[
    object,
    uuid(974723f2-887a-4452-9366-2cff3057bc8f),
    pointer_default(unique)
]
interface IStreamBufferSink3 : IStreamBufferSink2
{
    /*++
        -----------------------------------------------------------------------
        SetAvailableFilter ()

        Bounds the minimum.  This affects readers so they cannot seek past
          the specified minimum.

        Parameter Detail
        ----------------

        prtMin

            min time relative to "now"

            cannot be NULL

            [in]: time, specified relative to the last sample written, to set
            as the minimum time available to readers; valid values are <= 0;
            use -MAXLONGLONG if all the backing store should be made available.

            [out]: actual min time; if the [in] value further back than what is
            available, the [out] value will be set to the actual time made
            available.

        Return Values
        -------------

            success     S_OK

            failure     error code
    --*/
    HRESULT
    SetAvailableFilter (
        [in, out]   REFERENCE_TIME *    prtMin
        ) ;
} ;

/*++
    ============================================================================
    ============================================================================
    IStreamBufferSource ()

    Stream Source reader interface;
    Implemented on the StreamBufferSource filter;
--*/
[
    object,
    uuid(1c5bd776-6ced-4f44-8164-5eab0e98db12),
    pointer_default(unique)
]
interface IStreamBufferSource : IUnknown
{
    /*++
        ------------------------------------------------------------------------
        SetStreamSink ()

        1.  Sets the StreamBuffer Sink that streams from this Source;
        2.  IStreamBufferSink object must be in the same process as this object;
        3.  Interface is AddRef()'d if the call succeeds;

        Parameter Detail
        ----------------

        pIStreamBufferSink

            Sink that will stream to this Source
    --*/
    HRESULT
    SetStreamSink (
        [in]    IStreamBufferSink *    pIStreamBufferSink
        ) ;
} ;

/*++
    ============================================================================
    ============================================================================
    IStreamBufferRecordControl

    obtained by QIing IStreamBufferSink::CreateRecorder()-returned IUnknown *
--*/
[
    object,
    uuid(ba9b6c99-f3c7-4ff2-92db-cfdd4851bf31),
    pointer_default(unique)
]
interface IStreamBufferRecordControl : IUnknown
{
    /*++
        ------------------------------------------------------------------------
        Start ()

        1.  Starts a recording;
        2.  Will save to the filename that is specified when this interface's
            IUnknown is requested (IStreamBufferSink::CreateRecorder());

        Parameter Detail
        ----------------

        rtStart

            Start time relative to "now;

            If the recording type is a content recording, can only refer to
            seconds in the future; allowed seconds are [0,5]

            If the recording type is a reference recording, can refer to any
            time that still has valid content i.e. content that has not yet
            become stale

            If the recording is a reference recording and (* prtStart) is
            earlier than the earliest still-valid content, the call will reset
            it to the earliest content; the value when the recording was
            actually started will be [out]
    --*/
    HRESULT
    Start (
        [in,out]    REFERENCE_TIME *    prtStart
        ) ;

    /*++
        ------------------------------------------------------------------------
        Stop ()

        1.  Stops a recording;
        2.  Closes out the file;

        Parameter Detail
        ----------------

        rtStart

            Stop time relative to "now;

            If the recording type is a content recording, can only refer to
            seconds in the future; allowed seconds are [0,5]

            If the recording type is a reference recording, can refer to any
            time that still has valid content i.e. content that has not yet
            become stale; stop time cannot be <= start time
    --*/
    HRESULT
    Stop (
        [in]    REFERENCE_TIME  rtStop
        ) ;

    /*++
        ------------------------------------------------------------------------
        GetRecordingStatus ()

        1.  Retrieves the status of the recording

        Parameter Detail
        ----------------

        phResult

            The (current) status of writing or closing the recording file;

            Can be NULL;

        pbStarted

            If supplied, set to a non-zero value if the recording has been
            started

            Can be NULL;

        pbStopped

            If supplied, set to a non-zero value if the recording has been
            stopped;

            Can be NULL;

        NOTE: If the recording has never been started, it will not be flagged
                as stopped.

    --*/
    HRESULT
    GetRecordingStatus (
        [out] HRESULT * phResult,
        [out] BOOL *    pbStarted,
        [out] BOOL *    pbStopped
        ) ;
} ;

/*++
    ============================================================================
    ============================================================================
    IStreamBufferRecComp

    CoCreateInstance CLSID_StreamBufferComposeRecording and QueryInterface for
    this interface; this interface allows the creation of a single target
    content recording which consists of a number of concatenated recordings
    (reference or content; can mix & match if desired)
--*/

[
    object,
    uuid(9E259A9B-8815-42ae-B09F-221970B154FD),
    pointer_default(unique)
]
interface IStreamBufferRecComp : IUnknown
{
    /*++
        ------------------------------------------------------------------------
        Initialize ()

        1. Initializes for a target recording

        Parameter Detail
        ----------------

        pszTargetFilename

            Sets the target filename

            Fails if the file already exists

        pszSBRecProfileRef

            Must be a completed, SBE-generated recording

            This recording's profile will be used to define the target profile

            Appended files must have exactly the same profile
    --*/
    HRESULT
    Initialize (
        [in]    LPCWSTR pszTargetFilename,
        [in]    LPCWSTR pszSBRecProfileRef
        ) ;

    /*++
        ------------------------------------------------------------------------
        Append ()

        1.  appends an entire recording
        2.  fails if the recording is live
    --*/
    HRESULT
    Append (
        [in]    LPCWSTR pszSBRecording
        ) ;

    /*++
        ------------------------------------------------------------------------
        AppendEx ()

        1.  appends the specified portion of the recording; the parameters must
            be accurate; the call will not readjust them within the boundaries
        2.  the time spread must be at least 2 seconds
        3.  fails if the recording is live
    --*/
    HRESULT
    AppendEx (
        [in]    LPCWSTR         pszSBRecording,
        [in]    REFERENCE_TIME  rtStart,
        [in]    REFERENCE_TIME  rtStop
        ) ;

    /*++
        ------------------------------------------------------------------------
        GetCurrentLength ()

        1.  returns the current length of the recording; updates as recordings
            are appended;
        2.  can be called repeatedly during a Append() call on another
            thread;
    --*/
    HRESULT
    GetCurrentLength (
        [out]   DWORD * pcSeconds
        ) ;

    /*++
        ------------------------------------------------------------------------
        Close ()

        1.  explicitely closes the recording

        2.  final release of interface closes the recording as well
    --*/
    HRESULT
    Close (
        ) ;

    /*++
        ------------------------------------------------------------------------
        Cancel ()

        1.  cancels an in-progress appending operation; has no effect otherwise
    --*/
    HRESULT
    Cancel (
        ) ;
} ;

/*++
    ============================================================================
    ============================================================================
    IStreamBufferRecordingAttribute

    obtained by calling QueryInterface on a recorder

    well-known attributes:

        NAME                DESCRIPTION
        ------------------- ----------------------------------------------------

        Title               String containing the content title.

        Author              String containing the name of the content author.

        Description         String containing a description of the content.

        Rating              String containing a content rating.

        Copyright           String containing a content copyright message.

        Duration            Quadruple word value containing the playing duration
                                of the file, in 100-nanosecond units.

        Bitrate             Double word value containing the bit rate.

        Seekable            Boolean value; true denoting that the content is
                                seekable.

        Stridable           Boolean value, true denoting that the content is
                                stridable (fast forward and rewind are enabled).

        Broadcast           Boolean value; true denoting that the content is not
                                copyright-protected, and can be broadcast.

        Use_DRM             reserved

        DRM_Flags           reserved

        DRM_Level           reserved

        Is_Protected        reserved

        Is_Trusted          reserved

        Signature_Name      reserved

        HasAudio            Boolean, true denoting the content includes an
                                audio stream.

        HasImage            Boolean, true denoting the content includes a still
                                image stream (such as JPEG images).

        HasScript           Boolean, true denoting the content includes a script
                                stream.

        HasVideo            Boolean, true denoting the content includes a video
                                stream.

        CurrentBitrate      Double word containing the current total bitrate,
                                usually used for MEB (multi-bit rate) streams.

        OptimalBitrate      Double word containing the minimum total bitrate
                                recommended to stream the content and get
                                maximum quality.

        WM/AlbumTitle       String containing the album title.

        WM/Track            Double word containing the track number.

        WM/PromotionURL     String with a URL to an HTML page that contains
                                information about products and events (such as
                                concerts) that are related to this music.

        WM/AlbumCoverURL    String with a URL to an HTML page that contains an
                                image of the album cover and information about
                                the album.

        WM/Genre            String with the genre of the music.

        WM/Year             String with the year of publication of the music.

        WM/GenreID

        WM/MCDI

        BannerImageType     One member of the WMT_ATTR_IMAGETYPE enumeration
                                type.

        BannerImageData     The actual image data: a bitmap, JPEG, or GIF image.


        BannerImageURL      If the banner image is clicked on then this URL is
                                activated.

        CopyrightURL        An URL to a copyright page.

        NSC_Name            String containing the multicast station contact
                                name (read-only).

        NSC_Address         String containing the multicast station contact
                                address (read-only).

        NSC_Phone           String containing the multicast station contact
                                phone number (read-only).

        NSC_Email           String containing the multicast station contact
                                email address (read-only).

        NSC_Description     String containing the multicast station contact
                                description (read-only).

--*/

cpp_quote( "////////////////////////////////////////////////////////////////" )
cpp_quote( "//" )
cpp_quote( "// List of pre-defined attributes " )
cpp_quote( "//" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingDuration[] =L\"Duration\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingBitrate[] =L\"Bitrate\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingSeekable[] =L\"Seekable\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingStridable[] =L\"Stridable\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingBroadcast[] =L\"Broadcast\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingProtected[] =L\"Is_Protected\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingTrusted[] =L\"Is_Trusted\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingSignature_Name[] =L\"Signature_Name\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingHasAudio[] =L\"HasAudio\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingHasImage[] =L\"HasImage\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingHasScript[] =L\"HasScript\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingHasVideo[] =L\"HasVideo\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingCurrentBitrate[] =L\"CurrentBitrate\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingOptimalBitrate[] =L\"OptimalBitrate\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingHasAttachedImages[] =L\"HasAttachedImages\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingSkipBackward[] =L\"Can_Skip_Backward\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingSkipForward[] =L\"Can_Skip_Forward\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingNumberOfFrames[] =L\"NumberOfFrames\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingFileSize[] =L\"FileSize\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingHasArbitraryDataStream[] =L\"HasArbitraryDataStream\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingHasFileTransferStream[] =L\"HasFileTransferStream\";" )
cpp_quote( "" )
cpp_quote( "////////////////////////////////////////////////////////////////" )
cpp_quote( "//" )
cpp_quote( "// The content description object supports 5 basic attributes." )
cpp_quote( "//" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingTitle[] =L\"Title\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingAuthor[] =L\"Author\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingDescription[] =L\"Description\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingRating[] =L\"Rating\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingCopyright[] =L\"Copyright\";" )
cpp_quote( "" )
cpp_quote( "////////////////////////////////////////////////////////////////" )
cpp_quote( "//" )
cpp_quote( "// These attributes are used to configure DRM using IWMDRMWriter::SetDRMAttribute." )
cpp_quote( "//" )
cpp_quote( "static const WCHAR *g_wszStreamBufferRecordingUse_DRM = L\"Use_DRM\";" )
cpp_quote( "static const WCHAR *g_wszStreamBufferRecordingDRM_Flags = L\"DRM_Flags\";" )
cpp_quote( "static const WCHAR *g_wszStreamBufferRecordingDRM_Level = L\"DRM_Level\";" )
cpp_quote( "" )
cpp_quote( "////////////////////////////////////////////////////////////////" )
cpp_quote( "//" )
cpp_quote( "// These are the additional attributes defined in the WM attribute" )
cpp_quote( "// namespace that give information about the content." )
cpp_quote( "//" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingAlbumTitle[] =L\"WM/AlbumTitle\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingTrack[] =L\"WM/Track\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingPromotionURL[] =L\"WM/PromotionURL\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingAlbumCoverURL[] =L\"WM/AlbumCoverURL\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingGenre[] =L\"WM/Genre\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingYear[] =L\"WM/Year\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingGenreID[] =L\"WM/GenreID\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingMCDI[] =L\"WM/MCDI\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingComposer[] =L\"WM/Composer\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingLyrics[] =L\"WM/Lyrics\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingTrackNumber[] =L\"WM/TrackNumber\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingToolName[] =L\"WM/ToolName\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingToolVersion[] =L\"WM/ToolVersion\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingIsVBR[] =L\"IsVBR\";" )

//
// WM/AlbumArtist is a potentially different value than Author
//
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingAlbumArtist[] =L\"WM/AlbumArtist\";" )
cpp_quote( "" )

cpp_quote( "////////////////////////////////////////////////////////////////" )
cpp_quote( "//" )
cpp_quote( "// These optional attributes may be used to give information " )
cpp_quote( "// about the branding of the content." )
cpp_quote( "//" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingBannerImageType[] =L\"BannerImageType\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingBannerImageData[] =L\"BannerImageData\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingBannerImageURL[] =L\"BannerImageURL\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingCopyrightURL[] =L\"CopyrightURL\";" )

cpp_quote( "////////////////////////////////////////////////////////////////" )
cpp_quote( "//" )
cpp_quote( "// Optional attributes, used to give information " )
cpp_quote( "// about video stream properties." )
cpp_quote( "//" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingAspectRatioX[] =L\"AspectRatioX\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingAspectRatioY[] =L\"AspectRatioY\";" )

cpp_quote( "////////////////////////////////////////////////////////////////" )
cpp_quote( "//" )
cpp_quote( "// The NSC file supports the following attributes." )
cpp_quote( "//" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingNSCName[] =L\"NSC_Name\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingNSCAddress[] =L\"NSC_Address\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingNSCPhone[] =L\"NSC_Phone\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingNSCEmail[] =L\"NSC_Email\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingNSCDescription[] =L\"NSC_Description\";" )
cpp_quote( "" )

//
// StreamBuffer Attribute datatypes;
//
typedef enum {
    STREAMBUFFER_TYPE_DWORD  = 0,
    STREAMBUFFER_TYPE_STRING = 1,
    STREAMBUFFER_TYPE_BINARY = 2,
    STREAMBUFFER_TYPE_BOOL   = 3,
    STREAMBUFFER_TYPE_QWORD  = 4,
    STREAMBUFFER_TYPE_WORD   = 5,
    STREAMBUFFER_TYPE_GUID   = 6,
} STREAMBUFFER_ATTR_DATATYPE ;

[
    object,
    uuid(16CA4E03-FE69-4705-BD41-5B7DFC0C95F3),
    pointer_default(unique)
]
interface IStreamBufferRecordingAttribute : IUnknown
{
    /*++
        ------------------------------------------------------------------------
        SetAttribute ()

        1.  Sets an attribute on a recording object;
        2.  Fails if the IStreamBufferRecordControl::Start has already been successfully
            called;
        3.  If an attribute of the same name already exists, overwrites the old;
    --*/
    HRESULT
    SetAttribute (
        [in]    ULONG                       ulReserved,
        [in]    LPCWSTR                     pszAttributeName,
        [in]    STREAMBUFFER_ATTR_DATATYPE  StreamBufferAttributeType,
        [in, size_is (cbAttributeLength)]   BYTE *     pbAttribute,
        [in]    WORD                        cbAttributeLength
        ) ;

    /*++
        ------------------------------------------------------------------------
        GetAttributeCount ()

        1.  Returns the count of attributes currently set;
    --*/
    HRESULT
    GetAttributeCount (
        [in]    ULONG   ulReserved,
        [out]   WORD *  pcAttributes
        ) ;

    /*++
        ------------------------------------------------------------------------
        GetAttributeByName ()

        1.  Given a name, returns the attribute data;
        2.  If the provided buffer is too small, returns VFW_E_BUFFER_OVERFLOW,
            and (* pcbLength) contains the minimum required length of the buffer
        3.  To learn the length of the attribute, pass in non-NULL pcbLength,
            and NULL pbAttribute parameter; [out] value will be the length of
            the attribute
    --*/
    HRESULT
    GetAttributeByName (
        [in]        LPCWSTR                         pszAttributeName,
        [in]        ULONG *                         pulReserved,
        [out]       STREAMBUFFER_ATTR_DATATYPE *    pStreamBufferAttributeType,
        [out, size_is (* pcbLength)]    BYTE *      pbAttribute,
        [in, out]   WORD *                          pcbLength
        ) ;

    /*++
        ------------------------------------------------------------------------
        GetAttributeByIndex ()

        1.  Given an 0-based index, returns the attribute name and data
        2.  If either buffer is too small, returns VFW_E_BUFFER_OVERFLOW, and
            (* pcbLength) and (* pcchNameLength) contain the minimum required
            length of each buffer
        3.  The length returned by pcchNameLength includes the null-terminator
        4.  To learn the length of the name & attribute, pass in non-NULL
            pcchNameLength & pcbLength, and NULL pszAttributeName & pbAttribute
            parameters; [out] value of the non-NULL parameters will be the
            lengths of the name and attribute
    --*/
    HRESULT
    GetAttributeByIndex (
        [in]        WORD                            wIndex,
        [in]        ULONG *                         pulReserved,
        [out]       WCHAR *                         pszAttributeName,
        [in, out]   WORD *                          pcchNameLength,         //  includes NULL-terminator; in BYTES
        [out]       STREAMBUFFER_ATTR_DATATYPE *    pStreamBufferAttributeType,
        [out, size_is (* pcbLength)]    BYTE *      pbAttribute,
        [in, out]   WORD *                          pcbLength
        ) ;

    /*++
        ------------------------------------------------------------------------
        EnumAttributes ()

        1.  Returns a StreamBuffer attribute enumeration object that snapshots
            the attributes at time-of-call
    --*/
    HRESULT
    EnumAttributes (
        [out]   IEnumStreamBufferRecordingAttrib **     ppIEnumStreamBufferAttrib
        ) ;
} ;

/*++
    ============================================================================
    ============================================================================
    IEnumStreamBufferRecordingAttrib

    obtained by calling IStreamBufferRecordingAttribute::EnumAttributes, or
    calling clone on this interface
--*/

typedef struct {
    LPWSTR                      pszName ;                   //  allocated by callee; freed by caller
    STREAMBUFFER_ATTR_DATATYPE  StreamBufferAttributeType ;
    BYTE *                      pbAttribute ;               //  allocated by callee; freed by caller
    WORD                        cbLength ;
} STREAMBUFFER_ATTRIBUTE ;

[
    object,
    uuid (C18A9162-1E82-4142-8C73-5690FA62FE33),
    pointer_default(unique)
]
interface IEnumStreamBufferRecordingAttrib : IUnknown
{
    HRESULT
    Next (
        [in]                            ULONG                       cRequest,
        [in, out, size_is (cRequest)]   STREAMBUFFER_ATTRIBUTE *    pStreamBufferAttribute,
        [out]                           ULONG *                     pcReceived
        ) ;

    HRESULT
    Skip (
        [in]    ULONG   cRecords
        ) ;

    HRESULT
    Reset (
        ) ;

    HRESULT
    Clone (
        [out]   IEnumStreamBufferRecordingAttrib **  ppIEnumStreamBufferAttrib
        ) ;
} ;

/*++
    ============================================================================
    ============================================================================
    IStreamBufferConfigure

--*/
[
    object,
    uuid(ce14dfae-4098-4af7-bbf7-d6511f835414),
    pointer_default(unique)
]
interface IStreamBufferConfigure : IUnknown
{
    /*++
        ------------------------------------------------------------------------
        SetStreamBufferDirectory ()

        1.  Sets the directory where all content is saved, ringbuffer &
            StreamBuffer;
        2.  Creates directory if necessary;
        3.  All TEMP files have hidden+system attributes
    --*/
    HRESULT
    SetDirectory (
        [in]    LPCWSTR pszDirectoryName
        ) ;

    /*++
        ------------------------------------------------------------------------
        GetStreamBufferDirectory ()

        1.  Retrieves previously set backing store directory, or default
            location if none was specified
    --*/
    HRESULT
    GetDirectory (
        [out]   LPWSTR *    ppszDirectoryName
        ) ;

    /*++
        ------------------------------------------------------------------------
        SetBackingFileCount ()

        1.  Sets the number of backing files
        2.  valid values

                4 <= min <= 100
                6 <= max <= 102
                min max delta >= 2
    --*/
    HRESULT
    SetBackingFileCount (
        [in]    DWORD   dwMin,
        [in]    DWORD   dwMax
        ) ;

    /*++
        ------------------------------------------------------------------------
        GetBackingFileCount ()

        1.  Retrieves previously set backing file counts, or defaults if none
            have have been set
    --*/
    HRESULT
    GetBackingFileCount (
        [out]   DWORD * pdwMin,
        [out]   DWORD * pdwMax
        ) ;

    /*++
        ------------------------------------------------------------------------
        SetEachBackingFileDuration ()

        1.  Sets the seconds of content each backing file will hold
        2.  valid values:

                dwSeconds >= 15
    --*/
    HRESULT
    SetBackingFileDuration (
        [in]    DWORD   dwSeconds
        ) ;

    /*++
        ------------------------------------------------------------------------
        GetEachBackingFileDuration ()

        1.  Retrieves previously set backing file duration, or default of none
            is set
    --*/
    HRESULT
    GetBackingFileDuration (
        [out]   DWORD * pdwSeconds
        ) ;
} ;

/*++
    ============================================================================
    ============================================================================
    IStreamBufferConfigure2

--*/
[
    object,
    uuid(53E037BF-3992-4282-AE34-2487B4DAE06B),
    pointer_default(unique)
]
interface IStreamBufferConfigure2 : IStreamBufferConfigure
{
    /*++
        ------------------------------------------------------------------------
        SetMultiplexedPacketSize ()

        1.  sets the size of the target multiplexed packet size
        2.  valid values:

                8192 <= cbBytesPerPacket <= 65535

        This is useful if low-bitrate streams are used, and the time to fill a
        multiplexed packet is excessive when the default value of 65535 bytes
        is used.
    --*/
    HRESULT
    SetMultiplexedPacketSize (
        [in]    DWORD   cbBytesPerPacket
        ) ;

    /*++
        ------------------------------------------------------------------------
        GetMultiplexedPacketSize ()

        1.  gets the size of the target multiplexed packet size
    --*/
    HRESULT
    GetMultiplexedPacketSize (
        [out]   DWORD * pcbBytesPerPacket
        ) ;

    /*++
        ------------------------------------------------------------------------
        SetFFTransitionRates ()

        1.  sets the fast forward (FF) rates for which the Stream Buffer Engine
              transitions from FullFrame to KeyFrame to KeyFrame + Seeks.
        2.  valid values:

                1 < dwMaxFullFrameRate < dwMaxNonSkippingRate

        FF playback transitions from full-frame play, then to all keyframes,
        then to keyframes + seekaheads.  This method allows the transition
        rates to be set.  By default they are 4 and 6.  If the rate is in (0,4]
        all the frames are sent to the codec.  If the rate is in (4,6] just
        keyframes are sent.  If the rate is > 6, then only keyframes are sent,
        and a seekahead between keyframes is used that is proportionally
        aggressive to the specified rate.
    --*/
    HRESULT
    SetFFTransitionRates (
        [in]    DWORD   dwMaxFullFrameRate,
        [in]    DWORD   dwMaxNonSkippingRate
        ) ;

    /*++
        ------------------------------------------------------------------------
        GetFFTransitionRates ()

        1.  gets the fast forward (FF) rates for which the Stream Buffer Engine
              transitions from FullFrame to KeyFrame to KeyFrameWithSeeks.
    --*/
    HRESULT
    GetFFTransitionRates (
        [out]   DWORD * pdwMaxFullFrameRate,
        [out]   DWORD * pdwMaxNonSkippingRate
        ) ;
} ;

/*++
    ============================================================================
    ============================================================================
    IStreamBufferMediaSeeking

    Implemented on the StreamBufferSource filter.  Used to seek and set the
    playback rate.

--*/

[
    object,
    uuid(f61f5c26-863d-4afa-b0ba-2f81dc978596),
    pointer_default(unique)
]
interface IStreamBufferMediaSeeking : IMediaSeeking
{
    //  no additional methods have been added
} ;

/*++
    ============================================================================
    ============================================================================
    IStreamBufferMediaSeeking2

    Implemented on the StreamBufferSource filter.  Used to seek and set the
    playback rate.

--*/

[
    object,
    uuid(3a439ab0-155f-470a-86a6-9ea54afd6eaf),
    pointer_default(unique)
]
interface IStreamBufferMediaSeeking2 : IStreamBufferMediaSeeking
{
    /*++
        -----------------------------------------------------------------------
        SetRateEx ()

        Allows the application to override SBE's trick mode seekahead
        computation.

        The specified frame rate will, on average, be correct, but may
        have some variance if averaged over short periods of time.  This is
        due to the content's compression schema.

        The frame rate is applied to the video stream, if one exists.  If no
        video stream exists, the rate call fails.  The framerate parameter
        (dwFramesPerSec) is ignored when the specified abs(rate) is less than or
        equal to the maximum non-skipping rate (see IStreamBufferConfigure2::
        SetFFTransitionRates ()).

        Parameter Detail
        ----------------

            dRate           rate at which the content is to be played.
                            valid values are all rates, excluding the following
                              range: (-0.1, 0.1)

            dwFramesPerSec  frames per second
                            cannot be 0
                            SBE does not enforce this parameter with respect to
                              the screen refresh rate
                            ignored if the abs(dRate) value is <= max non-
                              skipping rate (see IStreamBufferConfigure2::
                              SetFFTransitionRates ()).

        Return Values
        -------------

            success     S_OK

            failure     error code
    --*/
    HRESULT
    SetRateEx (
        [in]    double  dRate,
        [in]    DWORD   dwFramesPerSec
        ) ;
} ;


/*++
    ============================================================================
    ============================================================================
    IStreamBufferDataCounters

    Implemented on the StreamBufferSource & StreamBufferSink filter pins.  Used
      to get instantaneous traffic counters for the pin.

--*/

typedef struct {
    ULONGLONG   cDataBytes ;            //  total sample payload bytes
    ULONGLONG   cSamplesProcessed ;     //  samples processed
    ULONGLONG   cDiscontinuities ;      //  number of discontinuities
    ULONGLONG   cSyncPoints ;           //  number of syncpoints
    ULONGLONG   cTimestamps ;           //  number of timestamps
} SBE_PIN_DATA ;

[
    object,
    uuid(9D2A2563-31AB-402e-9A6B-ADB903489440),
    pointer_default(unique)
]
interface IStreamBufferDataCounters : IUnknown
{
    //  retrieves the instantaneous values in the data structure
    HRESULT
    GetData (
        [out]   SBE_PIN_DATA *  pPinData
        ) ;

    //  sets all the data structure values to 0
    HRESULT
    ResetData (
        ) ;
} ;

/*++
    ============================================================================
    ============================================================================
    events
--*/

//  see evcode.h comment for range
//  stream buffer engine (PVR)   0x0326 - 0x0350 (sbe.idl)

cpp_quote ("#define STREAMBUFFER_EC_BASE                     0x0326")

cpp_quote ("enum {")
cpp_quote ("    //  timehole event")
cpp_quote ("    //      param1 = timehole stream offset ms")
cpp_quote ("    //      param1 = timehole size ms")
cpp_quote ("    STREAMBUFFER_EC_TIMEHOLE = STREAMBUFFER_EC_BASE,")
cpp_quote ("    ")
cpp_quote ("    STREAMBUFFER_EC_STALE_DATA_READ,")
cpp_quote ("    ")
cpp_quote ("    STREAMBUFFER_EC_STALE_FILE_DELETED,")
cpp_quote ("    STREAMBUFFER_EC_CONTENT_BECOMING_STALE,")
cpp_quote ("    STREAMBUFFER_EC_WRITE_FAILURE,")
cpp_quote ("    //")
cpp_quote ("    //  unexpected read failure")
cpp_quote ("    //      param1 = HRESULT failure")
cpp_quote ("    //      param2 = undefined")
cpp_quote ("    STREAMBUFFER_EC_READ_FAILURE,")
cpp_quote ("    //")
cpp_quote ("    //  playback rate change")
cpp_quote ("    //      param1 = old_playback_rate * 10000 e.g. 2x is 20000")
cpp_quote ("    //      param2 = new_playback_rate * 10000")
cpp_quote ("    STREAMBUFFER_EC_RATE_CHANGED,")
cpp_quote ("} ;")

/*++
    ============================================================================
    ============================================================================
    trick mode

    We've extended the 1.0 interfaces as follows:

    1. source filter presents timestamps that monotonically increase overtime

    2. flushes should have no effect over queued rate segments

    3. discontinuities have no effect over queued rate segments

    To use the interface, continue to use AM_KSPROPSETID_TSRateChange, but use
    dwPropId that is higher

--*/

#ifdef USE_AM_PROPERTY_TS_RATE_CHANGE_11
cpp_quote ("typedef enum {")
cpp_quote ("    AM_RATE_UseRateVersion = AM_RATE_Step + 1,")
cpp_quote ("    AM_RATE_QueryFullFrameRate,")
cpp_quote ("    AM_RATE_QueryLastRateSegPTS")
cpp_quote ("} AM_PROPERTY_TS_RATE_CHANGE_11 ;")

//  AM_RATE_QueryRate; this is the max full-frame rate; source filter can use
//    up to this; it can use less
cpp_quote ("typedef struct {")
cpp_quote ("    LONG    lMaxForwardFullFrame ;          //  rate * 10000")
cpp_quote ("    LONG    lMaxReverseFullFrame ;          //  rate * 10000")
cpp_quote ("} AM_QueryRate ;")
#endif // USE_AM_PROPERTY_TS_RATE_CHANGE_11

/*
================================================================================
AM_RATE_UseRateVersion
--------------------------------------------------------------------------------
Specifies the rate change version to be used.

The default behavior should be per 1.0.

Use a WORD value.  The high-order byte specifies the minor version (revision)
number; the low-order byte specifies the major version number.  On a
little-endian system (e.g. x86), the WORD value version for the contents of
this specification is 0x0101.

If the specified rate version is not supported, the call should fail with
an E_NOINTERFACE error code.

================================================================================
AM_RATE_QueryFullFrameRate
--------------------------------------------------------------------------------
Allows a source filter to query for maximum full-frame rates the timestamp
scaling filter is capable of.  Maximum full-frame forward and reverse rates
are queried for.

Use AM_QueryRate structure.  Timestamp scaling filter must set
lMaxReverseFullFrame struct member to negative rate.

The sourcing filter can still choose to set the full-frame rate to a value
smaller than the value returned by the timestamp scaling filter.  For example,
there may be IO issues that prevent a full-frame playback, even if the timestamp
scaling filter is capable.

Non-full frame playback will consist of groups of continuous samples sent to
the timestamp scaling filter, separated by discontinuities.  The timestamps for
each group of samples will jump across the discontinuities, but still increase
per the RunTimePlus timeline, when compared to RenderTime, once a steady state
runstate has been achieved.

Note that Rate is used this call, vs. speed.

================================================================================
AM_RATE_QueryLastRateSegPTS
--------------------------------------------------------------------------------
Allows a source filter to query the timestamp scaling filter for the last-set
rate-segment's effective PTS, regardless of rate-segment position.

Note that Rate is used this call, vs. speed.

================================================================================
AM_RATE_SimpleRateChange (with 1.1 semantics)
--------------------------------------------------------------------------------
If the rate is to be set to the most forward sample, the
AM_SimpleRateChange.StartTime member is set to value -1 by the sourcing filter.
This has meaning to the timestamp scaling filter to set the rate to the most
forward sample, and return that sample's presentation time via the method call's
[out] parameter.

If the specified rate segment is incompatible, all queued samples with PTS in
rate-incompatible segment can be discarded.

If the current rate is incompatible i.e. samples are being dropped by the
timestamp scaling filter and it is not keeping an internal queued, it should
fail the querying call (AM_SimpleRateChagne.StartTime = -1) with return error
VFW_E_DVD_WRONG_SPEED.  The sourcing filter will then set a rate with an
effective PTS.

*/