Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Wednesday, March 18, 2009 10:17:48 PM(UTC)

uk15  
uk15

Groups: Registered
Posts: 40


I am having leadtool module on server.But on capturing side I am using third party library.I am sending RTP packets to central server.How to give these packets as source file to leadtool module for streaming.Thanks.
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Friday, March 20, 2009 5:09:15 AM(UTC)

jigar  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

Could you explain your setup?  The capture server uses non-LEADTOOLS components to capture and stream out to the central server?  And on the central you are using LEADTOOLS to receive that stream?
 
#3 Posted : Monday, March 23, 2009 1:42:54 AM(UTC)

uk15  
uk15

Groups: Registered
Posts: 40


Yes.On capture server I am not using leadtool module.On capture server I am taking raw data from grabber and converting it to mpeg2 format.Then I am using third party library to create RTP packets.I am then sending these RTP packets to central server.I want to give these RTP packets as input to leadtool streaming module on central server .How to go for this.Please give me the direction.This is urgent. How to stream mpeg2 transport stream from memory.
 
#4 Posted : Monday, March 23, 2009 5:25:58 AM(UTC)

uk15  
uk15

Groups: Registered
Posts: 40


I am taking mpeg2(does mpeg2 program file can be streamed?) file and converting it to RTP packets using third party library.How I can give these RTP packets as input to put_source stream?Does each packet requires header informtion of mpeg2.Thanking you.
 
#5 Posted : Monday, March 23, 2009 12:12:05 PM(UTC)

jigar  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

If you are sending those packets through a tcp:// or udp:// stream then you can just set the sourcefile property on our convert control.  If your are sending it through your on protocol then you will have to set the SourceObject to a ltmmSampleSource object.  You then have to fill the buffer for the ltmmSampleSource object.

What language are you programming in?  What version of the toolkit do you have?

If you haven't already worked with our multimedia toolkit, you will need to use the ltmmConvertCtrl object.  What type of stream are you going to output from the central server?  Will it be a MPEG2 Transport stream?
 
#6 Posted : Tuesday, March 24, 2009 2:54:54 AM(UTC)

uk15  
uk15

Groups: Registered
Posts: 40


I am sending mpeg2 transport stream output from central server.I am filling buffer on central server side with RTP payload data and trying to convert using memory conversion example.I am using safearray for taking byte array into leadtool part.Then I  am using setdata method to get data into IltmmMemory object.Then I am using put_sourcestream method for taking this memory object and then trying to convert it to mpeg2Ts for streaming to client.I am using put_targetfile for streaming.My code snippet is

    hr = pMemory->put_BufferSize(dwSize);
 
    SAFEARRAY sa;
    memset(&sa, 0, sizeof(sa));
 sa.cbElements = sizeof(unsigned char);
 sa.cDims = 1;
 sa.fFeatures = (FADF_AUTO | FADF_FIXEDSIZE);
 sa.pvData = Filebuf; //my rtp buffer

sa.rgsabound[0].cElements =dwSize;
 VariantInit(&var);
 V_VT(&var) = (VT_ARRAY | VT_UI1);
 V_ARRAY(&var) = &sa;
 pMemory->SetData (0, dwSize, var); 
     // assign the source object
   m_convert->put_SourceStream(pMemory);

   if(FAILED(hr))
   {
       CString s;
       AfxMessageBox(s, MB_OK | MB_ICONEXCLAMATION);
       StopStreaming();
       return;
   }
   hr = m_convert->StartConvert();

and then I call put_targetfile for streaming by giving url.

I am getting error in startconvert function.I am using targetformat as ltmmConvert_TargetFormat_MPEG2_TRANSPORT.

Please help me on this.Are these steps are correct.Can u provide me some code snippet on this.

Thanks.

 
#7 Posted : Tuesday, March 24, 2009 6:23:12 AM(UTC)

uk15  
uk15

Groups: Registered
Posts: 40


For processing RTP packets coming from capture server, which module should be used on central server?

I am using video streaming module. Does it requires MPEG2 transport module for taking RTP packets input and stream to clients?

Please help on this.

 
#8 Posted : Tuesday, March 24, 2009 7:12:15 AM(UTC)

jigar  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

You use the IltmmSampleSource if you are receiving the data in small chunks.  You use the IltmmMemory object if you have all the data in memory and just want to stream it.  It seems to me that if you are sending RTP packets then you are doing streaming and in that case you will need to use the IltmmSampleSource object.  So can you tell me if you are receiving the whole stream first or if you are receving the stream piece by piece and you want to stream it out as it comes in?
 
#9 Posted : Wednesday, March 25, 2009 10:25:34 PM(UTC)

uk15  
uk15

Groups: Registered
Posts: 40


I am recieving stream as piece by piece from capture device . My stream is in the form of RTP packets of 500 bytes. My another issue is,If  I send stream using udp protocol,on client side when I want to record some part of recieving stream, live stream stops for the time when recording is on.When I use ltsf protocol I can record part of live stream without stopping. How to use udp protocol on client side for recording the video.

 
#10 Posted : Thursday, March 26, 2009 5:30:44 AM(UTC)

jigar  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

Attached is a project that shows you how to use the IltmmSampleSource object.  The sample uses the play object, but you can change the code to use the convert object.  I have the code commented so it you can know what is going on.

As for your other question, how are you recording the live stream?  Is the client playing the live stream and then if they choose to they can record the live stream?  You are creating a convert object when they press record and you set the sourcefile to the same stream?
File Attachment(s):
SourceObjectPlayer.zip (42kb) downloaded 71 time(s).
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.296 seconds.