IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> TStreamSource, TStreamSource - play TS stream from .NET
Mark Twen
post May 2 2011, 11:27 PM
Post #1


Be nice to me, I am new.


Group: New Members
Posts: 3
Joined: 2-May 11
Member No.: 14,246
Card: None


TStreamSource is LGPL library which can play MPEG TS streams (at the moment file and UDP). It is written in .NET and C++

Link to Project
Go to the top of the page
 
+Quote Post
nate
post May 3 2011, 03:24 PM
Post #2


DigitalWatch Developer
Group Icon

Group: Admin
Posts: 2,267
Joined: 30-September 03
From: Melbourne
Member No.: 169
Card: DNTV Quad


Hi Mark,

Nice start. Would be good if you could provide some more information about what it does.

From my quick inspection it looks like you've created a bare essentials push source filter that uses a Callback in the FillBuffer method to get the data to send from your .NET code. This allows you to do all the file or stream parsing in .NET instead of c++ right?

I got it to build and play a file. I did have to remove the post build task from the TStreamSource.GSSF project because of permission problems. In vista you can only register filters if running as administrator. I registered it myself from an elevated cmd prompt and it worked fine.

What are you using the broadcast the udp streams?


--------------------
Go to the top of the page
 
+Quote Post
Mark Twen
post May 3 2011, 11:13 PM
Post #3


Be nice to me, I am new.


Group: New Members
Posts: 3
Joined: 2-May 11
Member No.: 14,246
Card: None


Hi Nate,

Thank you for quick look.

QUOTE (nate @ May 3 2011, 08:24 AM) *
From my quick inspection it looks like you've created a bare essentials push source filter that uses a Callback in the FillBuffer method to get the data to send from your .NET code. This allows you to do all the file or stream parsing in .NET instead of c++ right?


Yes. You are right. I will add more information in a while.

QUOTE (nate @ May 3 2011, 08:24 AM) *
I got it to build and play a file. I did have to remove the post build task from the TStreamSource.GSSF project because of permission problems.


Thank you! I just removed it on github.

QUOTE (nate @ May 3 2011, 08:24 AM) *
What are you using the broadcast the udp streams?


I use VLC.

Best Regards,
Mark
Go to the top of the page
 
+Quote Post
Mark Twen
post May 4 2011, 02:48 AM
Post #4


Be nice to me, I am new.


Group: New Members
Posts: 3
Joined: 2-May 11
Member No.: 14,246
Card: None


Hi Nate,

When I worked with one of my clients I found a bug in TSFileSource when it was used with DSNetwork. To reproduce this bug faster you need to minimize the number of buffers and buffersize (from 250mb to 10mb for example).
After entire virtual buffer will be full (number of buffers * buffersize) the play will start from beginning of the buffer. It means that you will be back in time with buffers * buffersize time, for default settings it is approx 40minutes back.

I changed the line 230 in NetRender.cpp from: (*an error*)
wcsftime(wfileName, 32, L"(%Y-%m-%d %H-%M-%s)", netAddr->tmTime);
to
wcsftime(wfileName, 32, L"(%Y-%m-%d %H-%M-%S)", netAddr->tmTime);

In MultiFileReader.cpp I commented next lines:

//randomly park the file pointer to help minimise HDD clogging (*not sure why*)
if(currentPosition&1)
m_TSBufferFile.SetFilePointer(0, FILE_BEGIN);
else
m_TSBufferFile.SetFilePointer(0, FILE_END);

In TSFileSource.cpp I changed the line 496 from (*not sure why*)
if(!m_pPidParser->m_ParsingLock && m_pPidParser->pidArray.Count() && TRUE) //cold start
to
if(!m_pPidParser->m_ParsingLock && m_pPidParser->pidArray.Count() && FALSE) //cold start

And in TSBuffer.cpp I changed the line: 185 (*bug here*)
llStartPosition2 = llStartPosition - llStartPosition2;
to
if (llStartPosition2 == 0) {
llStartPosition2 = llStartPosition;
}

NOTE: DSNetwork mode with Shared Mem is not working as expected, on every change to new shared mem portion the image is freezing.

Best Regards,
Mark
Go to the top of the page
 
+Quote Post
nate
post Nov 22 2011, 05:53 PM
Post #5


DigitalWatch Developer
Group Icon

Group: Admin
Posts: 2,267
Joined: 30-September 03
From: Melbourne
Member No.: 169
Card: DNTV Quad


Hi Mark,

Thanks for all the details. It's taken me a while to get to it, but I've finally committed fixes for most of these things in one form or another.
You can grab a build to test with here in case you don't want to update and build it yourself.

The only one I haven't touched is the cold start one. Maybe it's been fixed as a result of one of the other changes I made but I don't know what the change achieved. Can you remember what problem it caused?

cheers,
Nate


--------------------
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 22nd August 2019 - 01:32 PM