[Live-devel] problems with New FramedSource creation
Yedidia Amit
amit.yedidia at elbitsystems.com
Wed Dec 3 07:56:07 PST 2008
few things you must notice:
1.doGetNextFrame should NOT call deliver frame. it should only scheduled
deliverFrame in the taskSchedulaer waiting on some socket or the
watchVariable.
2. you call startPlaying only once!!! (when you want to start playing -
it should not be used to notify new data.
Regards,
Amit Yedidia
Elbit System Ltd.
Email: amit.yedidia at elbitsystems.com
Tel: 972-4-8318905
----------------------------------------------------------
________________________________
From: live-devel-bounces at ns.live555.com
[mailto:live-devel-bounces at ns.live555.com] On Behalf Of anand meher
Sent: Wednesday, December 03, 2008 5:35 PM
To: live-devel at ns.live555.com
Subject: Re: [Live-devel] problems with New FramedSource
creation
Dear Ross,
I am relatively new using the live555 libraries and sorry
if my questions are too trivial. I read the FAQ especially the question
which says how to modify test*Streamer application to read from a live
audio or video. I wanted to modify testMPEG2TransportStreamer so that it
can read from my buffers instead of a file.
I have tried piping and using files as mentioned in the FAQ but
i dont have cotrol over the syncronization.
I intended to implement something like below....
NewDeviceSource (which reads from the buffer containing *TS )
--> TransportStreamFramer --> sink( a simple RTP sink)
*TS = (MPEG2 Transport Stream 188 byte packets)
One question which i have is whether i have to also write a
new Filter for TransportStreamFramer . I already have the MPEG2
transport stream packets in my buffer so i thought i need not write a
new filter but instead use the exising TransportStreamFramer.
Also i have a doubt in the way i need to signal the arrival of
new data to the event loop and i explain it below.
I used the watchVariable of the doEventloop and when ever its
set i call
videoSink->startPlaying ( ).and i am not calling
newDeviceSource->doGetNextFrame() because it needs to be framed by the
TransportStreamFramer.
I dont know wether calling videoSink->startPlaying() is the
correct way of signalling the new data.
i can clarify some of the points if its not clear.
best regards
Anand Meher.
On Wed, Dec 3, 2008 at 2:46 PM, anand meher
<kvmsanand at gmail.com> wrote:
Hi everyone,
I am developing software which is a
multithreaded program and one thread requires the transport stream
packets to be streamed from my data structures. I should also take care
of mutual exclusion to the access of the data structure .I have created
a new Device Source and implemented the doGetNextFrame() and
deliverFrame() functions.
the doGetNextFrame() function reads from the data
strcutres and calls the deliver frame function.
the deliverFrame function copies the data to fTo and
then deletes the respective bytes from the data strucutre.
//I have modelled the actual thread which streams along
the lines of testMPEG2TransportStreamer.cpp
in the play() function i do the following steps
vectorSource = VectorDeviceSource::createNew(*env,
g_packets_outputvector, g_packets_outputvectorlock,signal_vector);
//where vectorSource is the new Device Source i have
created.
videoSource =
MPEG2TransportStreamFramer::createNew(*env, vectorSource);
//then i create a videoSource for Framer and i pass
theVectorSource object.
then i call
videoSink->startPlaying(*videoSource, afterPlaying,
videoSink);
BUT my program some how does not work properly...
firslty it gets stuck in the deliverFrame() function
always ....and uses lot of CPU and causes the other threads running to
slow down as well.....
I read some of the posts of live555 and feared that may
be the program is going to a infinite loop..so i tried using the
watchVariable in the event loop , but even that did not work .....
1) it would be great if some can help me in what i am
missing .....
i can claify if something is missing .........
Regards
Anand.
The information in this e-mail transmission contains proprietary and business
sensitive information. Unauthorized interception of this e-mail may constitute
a violation of law. If you are not the intended recipient, you are hereby
notified that any review, dissemination, distribution or duplication of this
communication is strictly prohibited. You are also asked to contact the sender
by reply email and immediately destroy all copies of the original message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20081203/85ca52e1/attachment.html>
More information about the live-devel
mailing list