-
Notifications
You must be signed in to change notification settings - Fork 0
/
NetworkStreamSink.cs
903 lines (721 loc) · 29.4 KB
/
NetworkStreamSink.cs
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
using CaptureManagerToCSharpProxy.Interfaces;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Runtime.InteropServices;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
namespace VBEApp_v1._0
{
class NetworkStreamSink : AbstractSink
{
[AttributeUsage(AttributeTargets.Enum | AttributeTargets.Struct | AttributeTargets.Class)]
public class UnmanagedNameAttribute : System.Attribute
{
private string m_Name;
public UnmanagedNameAttribute(string s)
{
m_Name = s;
}
public override string ToString()
{
return m_Name;
}
}
[Flags, UnmanagedName("MFBYTESTREAM_* defines")]
public enum MFByteStreamCapabilities
{
None = 0x00000000,
IsReadable = 0x00000001,
IsWritable = 0x00000002,
IsSeekable = 0x00000004,
IsRemote = 0x00000008,
IsDirectory = 0x00000080,
HasSlowSeek = 0x00000100,
IsPartiallyDownloaded = 0x00000200,
ShareWrite = 0x00000400,
DoesNotUseNetwork = 0x00000800,
}
[UnmanagedName("MFBYTESTREAM_SEEK_ORIGIN")]
public enum MFByteStreamSeekOrigin
{
Begin,
Current
}
[Flags, UnmanagedName("MFBYTESTREAM_SEEK_FLAG_ defines")]
public enum MFByteStreamSeekingFlags
{
None = 0,
CancelPendingIO = 1
}
[Flags, UnmanagedName("MFASYNC_* defines")]
public enum MFASync
{
None = 0,
FastIOProcessingCallback = 0x00000001,
SignalCallback = 0x00000002,
BlockingCallback = 0x00000004,
ReplyCallback = 0x00000008,
LocalizeRemoteCallback = 0x00000010,
}
[UnmanagedName("MFASYNC_CALLBACK_QUEUE_ defines")]
public enum MFAsyncCallbackQueue
{
Undefined = 0x00000000,
Standard = 0x00000001,
RT = 0x00000002,
IO = 0x00000003,
Timer = 0x00000004,
MultiThreaded = 0x00000005,
LongFunction = 0x00000007,
PrivateMask = unchecked((int)0xFFFF0000),
All = unchecked((int)0xFFFFFFFF)
}
[ComImport, System.Security.SuppressUnmanagedCodeSecurity,
InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
Guid("AC6B7889-0740-4D51-8619-905994A55CC6")]
public interface IMFAsyncResult
{
[PreserveSig]
int GetState(
[MarshalAs(UnmanagedType.IUnknown)] out object ppunkState
);
[PreserveSig]
int GetStatus();
[PreserveSig]
int SetStatus(
[In, MarshalAs(UnmanagedType.Error)] int hrStatus
);
[PreserveSig]
int GetObject(
[MarshalAs(UnmanagedType.Interface)] out object ppObject
);
[PreserveSig]
IntPtr GetStateNoAddRef();
}
[ComImport, System.Security.SuppressUnmanagedCodeSecurity,
InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
Guid("A27003CF-2354-4F2A-8D6A-AB7CFF15437E")]
public interface IMFAsyncCallback
{
[PreserveSig]
int GetParameters(
out MFASync pdwFlags,
out MFAsyncCallbackQueue pdwQueue
);
[PreserveSig]
int Invoke(
[In, MarshalAs(UnmanagedType.Interface)] IMFAsyncResult pAsyncResult
);
}
[ComImport, System.Security.SuppressUnmanagedCodeSecurity,
InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
Guid("AD4C1B00-4BF7-422F-9175-756693D9130D")]
public interface IMFByteStream
{
[PreserveSig]
int GetCapabilities(
out MFByteStreamCapabilities pdwCapabilities
);
[PreserveSig]
int GetLength(
out long pqwLength
);
[PreserveSig]
int SetLength(
[In] long qwLength
);
[PreserveSig]
int GetCurrentPosition(
out long pqwPosition
);
[PreserveSig]
int SetCurrentPosition(
[In] long qwPosition
);
[PreserveSig]
int IsEndOfStream(
[MarshalAs(UnmanagedType.Bool)] out bool pfEndOfStream
);
[PreserveSig]
int Read(
IntPtr pb,
[In] int cb,
out int pcbRead
);
[PreserveSig]
int BeginRead(
IntPtr pb,
[In] int cb,
[In, MarshalAs(UnmanagedType.Interface)] IMFAsyncCallback pCallback,
[In, MarshalAs(UnmanagedType.IUnknown)] object pUnkState
);
[PreserveSig]
int EndRead(
[In, MarshalAs(UnmanagedType.Interface)] IMFAsyncResult pResult,
out int pcbRead
);
[PreserveSig]
int Write(
IntPtr pb,
[In] int cb,
out int pcbWritten
);
[PreserveSig]
int BeginWrite(
IntPtr pb,
[In] int cb,
[In, MarshalAs(UnmanagedType.Interface)] IMFAsyncCallback pCallback,
[In, MarshalAs(UnmanagedType.IUnknown)] object pUnkState
);
[PreserveSig]
int EndWrite(
[In, MarshalAs(UnmanagedType.Interface)] IMFAsyncResult pResult,
out int pcbWritten
);
[PreserveSig]
int Seek(
[In] MFByteStreamSeekOrigin SeekOrigin,
[In] long llSeekOffset,
[In] MFByteStreamSeekingFlags dwSeekFlags,
out long pqwCurrentPosition
);
[PreserveSig]
int Flush();
[PreserveSig]
int Close();
}
class HttpOutputByteStream : IMFByteStream
{
/// <summary>
/// HTTPS StatusCodes
/// </summary>
internal enum StatusCode
{
/// <summary>
/// 200 OK
/// </summary>
OK,
/// <summary>
/// 400 Bad Request
/// </summary>
BadRequest,
/// <summary>
/// 403 Access Forbidden
/// </summary>
Forbiden
};
public class WebServerConfiguration
{
#region Fields
private string _MIME = "";
private int _port = 8080;
private string _serverName = "HttpOutputByteStreamWebServer";
private IPAddress _IPAddress = IPAddress.Loopback;
#endregion
/// <summary>
/// Commucation port for incoming connections
/// </summary>
public int Port
{
get { return _port; }
set { _port = value; }
}
/// <summary>
/// IPAddress assigned to web server
/// </summary>
public IPAddress IPAddress
{
get { return _IPAddress; }
set { _IPAddress = value; }
}
/// <summary>
/// Server name to be sent in headers
/// </summary>
public string ServerName
{
get { return _serverName; }
set { _serverName = value; }
}
/// <summary>
/// Server name to be sent in headers
/// </summary>
public string MIME
{
get { return _MIME; }
set { _MIME = value; }
}
}
class WebServer
{
#region Fields
TcpListener tcpListener;
WebServerConfiguration Configuration;
ConcurrentDictionary<TcpClient, TcpClient> mClientBag = new ConcurrentDictionary<TcpClient, TcpClient>();
#endregion
/// <summary>
/// New WebServer
/// </summary>
/// <param name="webServerConf">WebServer Configuration</param>
public WebServer(WebServerConfiguration webServerConf)
{
this.Configuration = webServerConf;
}
/// <summary>
/// Starts the WebServer thread
/// </summary>
public void Start()
{
try
{
tcpListener = new TcpListener(Configuration.IPAddress, Configuration.Port);
tcpListener.Start();
tcpListener.BeginAcceptTcpClient(
new AsyncCallback(callBack),
tcpListener);
}
catch (Exception e)
{
}
}
/// <summary>
/// Stops the WebServer thread
/// </summary>
public void Stop()
{
try
{
tcpListener.Stop();
foreach (var item in mClientBag)
{
item.Value.Client.Close();
item.Value.Client.Dispose();
item.Value.Close();
}
tcpListener.Server.Dispose();
}
catch (Exception e)
{
}
}
private void callBack(IAsyncResult aIAsyncResult)
{
TcpListener ltcpListener = (TcpListener)aIAsyncResult.AsyncState;
if (ltcpListener == null)
return;
TcpClient lclient = null;
try
{
lclient = ltcpListener.EndAcceptTcpClient(aIAsyncResult);
}
catch (Exception exc)
{
return;
}
if (lclient != null && lclient.Client.Connected)
{
StreamReader streamReader = new StreamReader(lclient.GetStream());
// Read full request with client header
StringBuilder receivedData = new StringBuilder();
while (streamReader.Peek() > -1)
receivedData.Append(streamReader.ReadLine());
string request = GetRequest(receivedData.ToString());
if (!SuportedMethod(request))
{
SendError(StatusCode.BadRequest, "Only GET is supported.", lclient);
lclient.Client.Close();
lclient.Close();
}
else
{
Socket socket = lclient.Client;
if (socket.Connected)
{
SendHeader(StatusCode.OK, lclient);
lock (this)
{
if (mHeaderMemory != null)
{
int sentBytes = socket.Send(mHeaderMemory);
}
mClientBag[lclient] = lclient;
}
}
}
}
ltcpListener.BeginAcceptTcpClient(
new AsyncCallback(callBack),
ltcpListener);
}
/// <summary>
/// Sends HTTP header
/// </summary>
/// <param name="mimeType">Mime Type</param>
/// <param name="totalBytes">Length of the response</param>
/// <param name="statusCode">Status code</param>
private void SendHeader(string mimeType, long totalBytes, StatusCode statusCode, TcpClient aTcpClient)
{
StringBuilder header = new StringBuilder();
header.Append(string.Format("HTTP/1.1 {0}\r\n", GetStatusCode(statusCode)));
header.Append(string.Format("Content-Type: {0}\r\n", mimeType));
header.Append(string.Format("Accept-Ranges: bytes\r\n"));
header.Append(string.Format("Server: {0}\r\n", Configuration.ServerName));
header.Append(string.Format("Connection: close\r\n"));
header.Append(string.Format("Content-Length: {0}\r\n", totalBytes));
header.Append("\r\n");
SendToClient(header.ToString(), aTcpClient);
}
private void SendHeader(StatusCode statusCode, TcpClient aTcpClient)
{
StringBuilder header = new StringBuilder();
header.Append(string.Format("HTTP/1.1 {0}\r\n", GetStatusCode(statusCode)));
header.Append(string.Format("Content-Type: {0}\r\n", Configuration.MIME));
header.Append(string.Format("Server: {0}\r\n", Configuration.ServerName));
header.Append(string.Format("Accept-Ranges: none\r\n"));
header.Append(string.Format("TransferMode.DLNA.ORG: Streaming\r\n"));
header.Append(string.Format("Connection: keep-alive\r\n"));
header.Append("\r\n");
SendToClient(header.ToString(), aTcpClient);
}
/// <summary>
/// Sends error page to the client
/// </summary>
/// <param name="statusCode">Status code</param>
/// <param name="message">Error message</param>
private void SendError(StatusCode statusCode, string message, TcpClient aTcpClient)
{
string page = GetErrorPage(statusCode, message);
SendHeader(null, page.Length, statusCode, aTcpClient);
SendToClient(page, aTcpClient);
}
byte[] mHeaderMemory = null;
public void writeHeader(IntPtr pb, int cb)
{
do
{
lock (this)
{
mHeaderMemory = new byte[cb];
Marshal.Copy(pb, mHeaderMemory, 0, cb);
sendRawData(pb, cb);
}
} while (false);
}
public void sendRawData(IntPtr pb, int cb)
{
do
{
byte[] lTempMemory = new byte[cb];
Marshal.Copy(pb, lTempMemory, 0, cb);
foreach (var item in mClientBag)
{
if (!SendToClient(lTempMemory, cb, item.Value))
{
TcpClient lclient;
mClientBag.TryRemove(item.Key, out lclient);
if (lclient != null)
{
lclient.Client.Close();
lclient.Close();
lclient.Client.Dispose();
}
}
}
} while (false);
}
/// <summary>
/// Send string data to client
/// </summary>
/// <param name="data">String data</param>
private void SendToClient(string data, TcpClient aTcpClient)
{
byte[] bytes = Encoding.ASCII.GetBytes(data);
SendToClient(bytes, bytes.Length, aTcpClient);
}
/// <summary>
/// Sends byte array to client
/// </summary>
/// <param name="data">Data array</param>
/// <param name="bytesTosend">Data length</param>
private bool SendToClient(byte[] data, int bytesTosend, TcpClient aTcpClient)
{
bool lresult = true;
try
{
Socket socket = aTcpClient.Client;
if (socket.Connected)
{
int sentBytes = socket.Send(data, 0, bytesTosend, 0);
if (sentBytes < bytesTosend)
Console.WriteLine("Data was not completly send.");
}
else
{
lresult = false;
Console.WriteLine("Connection lost");
}
}
catch (Exception e)
{
Console.WriteLine("Error: " + e.ToString());
lresult = false;
}
return lresult;
}
/// <summary>
/// Checks whether the method in request is supported
/// </summary>
/// <param name="request">Request</param>
/// <returns>True if method is supported</returns>
private bool SuportedMethod(string request)
{
if (request == null || request.Length < 3)
return false;
return (request.Substring(0, 3) != "GET") ? false : true;
}
/// <summary>
/// Gets request from input string
/// </summary>
/// <param name="data">Input string</param>
/// <returns>Request</returns>
private string GetRequest(string data)
{
Match m = Regex.Match(data, @"^[^\n]*");
return m.Value;
}
/// <summary>
/// Gets URI from request
/// </summary>
/// <param name="request">Reuqest string</param>
/// <returns>URI</returns>
private string GetRequestedURI(string request)
{
int startPos = request.IndexOf("HTTP", 1);
request = (startPos > 0) ? request.Substring(0, startPos - 1) : request.Substring(0);
request = request.Replace("\\", "/");
if (request.IndexOf(".") < 1 && !request.EndsWith("/"))
request = request + "/ ";
return request.Substring(request.IndexOf("/")).Trim();
}
/// <summary>
/// Generates error page
/// </summary>
/// <param name="statusCode">StatusCode</param>
/// <param name="message">Message</param>
/// <returns>ErrorPage</returns>
private string GetErrorPage(StatusCode statusCode, string message)
{
string status = GetStatusCode(statusCode);
StringBuilder errorMessage = new StringBuilder();
errorMessage.Append("<html>\n");
errorMessage.Append("<head>\n");
errorMessage.Append(string.Format("<title>{0}</title>\n", status));
errorMessage.Append("</head>\n");
errorMessage.Append("<body>\n");
errorMessage.Append(string.Format("<h1>{0}</h1>\n", status));
errorMessage.Append(string.Format("<p>{0}</p>\n", message));
errorMessage.Append("<hr>\n");
errorMessage.Append(string.Format("<address>{0} Server at {1} Port {2} </address>\n", Configuration.ServerName, Configuration.IPAddress, Configuration.Port));
errorMessage.Append("</body>\n");
errorMessage.Append("</html>\n");
return errorMessage.ToString();
}
/// <summary>
/// Gets string representation for the status code
/// </summary>
/// <param name="statusCode">Status code</param>
/// <returns>Status code as HTTP string</returns>
private string GetStatusCode(StatusCode statusCode)
{
string code;
switch (statusCode)
{
case StatusCode.OK: code = "200 OK"; break;
case StatusCode.BadRequest: code = "400 Bad Request"; break;
case StatusCode.Forbiden: code = "403 Forbidden"; break;
default: code = "202 Accepted"; break;
}
return code;
}
}
class AsyncWriteData
{
public IMFAsyncCallback pCallback;
public object punkState;
public int cb;
public void execute(object state)
{
AsyncResult lAsyncResult = new AsyncResult() { mHRStatus = 0, pCallback = this, punkState = punkState };
int l = pCallback.Invoke(lAsyncResult);
}
}
class AsyncResult : IMFAsyncResult
{
public int mHRStatus;
public object punkState;
public object pCallback;
public int GetState(out object ppunkState)
{
ppunkState = punkState;
return 0;
}
public int GetStatus()
{
return mHRStatus;
}
public int SetStatus(int hrStatus)
{
mHRStatus = hrStatus;
return 0;
}
public int GetObject(out object ppObject)
{
ppObject = pCallback;
return 0;
}
public IntPtr GetStateNoAddRef()
{
var lUnknow = Marshal.GetIUnknownForObject(punkState);
Marshal.Release(lUnknow);
return lUnknow;
}
}
WebServer mWebServer = null;
public static IMFByteStream createByteStream(WebServerConfiguration aConfig)
{
return new HttpOutputByteStream(aConfig);
}
private HttpOutputByteStream(WebServerConfiguration aConfig)
{
mWebServer = new WebServer(aConfig);
mWebServer.Start();
}
public int GetCapabilities(out MFByteStreamCapabilities pdwCapabilities)
{
pdwCapabilities = MFByteStreamCapabilities.IsWritable;
return 0;
}
public int GetLength(out long pqwLength)
{
throw new NotImplementedException();
}
public int SetLength(long qwLength)
{
throw new NotImplementedException();
}
public int GetCurrentPosition(out long pqwPosition)
{
throw new NotImplementedException();
}
public int SetCurrentPosition(long qwPosition)
{
throw new NotImplementedException();
}
public int IsEndOfStream(out bool pfEndOfStream)
{
throw new NotImplementedException();
}
public int Read(IntPtr pb, int cb, out int pcbRead)
{
throw new NotImplementedException();
}
public int BeginRead(IntPtr pb, int cb, IMFAsyncCallback pCallback, object pUnkState)
{
throw new NotImplementedException();
}
public int EndRead(IMFAsyncResult pResult, out int pcbRead)
{
throw new NotImplementedException();
}
public int Write(IntPtr pb, int cb, out int pcbWritten)
{
mWebServer.writeHeader(pb, cb);
pcbWritten = cb;
return 0;
}
public int BeginWrite(IntPtr pb, int cb, IMFAsyncCallback pCallback, object pUnkState)
{
mWebServer.sendRawData(pb, cb);
AsyncWriteData lAsyncWriteData = new AsyncWriteData() { cb = cb, pCallback = pCallback, punkState = pUnkState };
ThreadPool.QueueUserWorkItem(lAsyncWriteData.execute);
return 0;
}
public int EndWrite(IMFAsyncResult pResult, out int pcbWritten)
{
pcbWritten = 0;
do
{
if (pResult == null)
break;
var lstatus = pResult.GetStatus();
if (lstatus != 0)
break;
object lIUnknow;
var lresult = pResult.GetObject(out lIUnknow);
if (lresult != 0)
break;
var lAsyncWriteData = lIUnknow as AsyncWriteData;
if (lAsyncWriteData == null)
break;
pcbWritten = lAsyncWriteData.cb;
} while (false);
return 0;
}
public int Seek(MFByteStreamSeekOrigin SeekOrigin, long llSeekOffset, MFByteStreamSeekingFlags dwSeekFlags, out long pqwCurrentPosition)
{
throw new NotImplementedException();
}
public int Flush()
{
return 0;
}
public int Close()
{
mWebServer.Stop();
return 0;
}
}
IMFByteStream mIMFByteStream = null;
IByteStreamSinkFactory mSinkFactory = null;
string mMIME = "";
public NetworkStreamSink(
IByteStreamSinkFactory aSinkFactory,
string aMIME)
{
mSinkFactory = aSinkFactory;
mMIME = aMIME;
}
public override void setOptions(string aOptions)
{
HttpOutputByteStream.WebServerConfiguration lConfig = new HttpOutputByteStream.WebServerConfiguration();
lConfig.ServerName = "ASF server";
lConfig.IPAddress = IPAddress.Loopback;
lConfig.MIME = mMIME;
ushort lport;
if (ushort.TryParse(aOptions, out lport))
{
lConfig.Port = lport;
}
else
lConfig.Port = 8080;
mIMFByteStream = HttpOutputByteStream.createByteStream(lConfig);
}
public override object getOutputNode(object aUpStreamMediaType)
{
List<object> lCompressedMediaTypeList = new List<object>();
lCompressedMediaTypeList.Add(aUpStreamMediaType);
List<object> lTopologyOutputNodesList = new List<object>();
if (mIMFByteStream != null)
mSinkFactory.createOutputNodes(
lCompressedMediaTypeList,
mIMFByteStream,
out lTopologyOutputNodesList);
return lTopologyOutputNodesList[0];
}
}
}