[Live-devel] H264VideoRTPSink type cast issue
Serge.Grondin at miranda.com
Serge.Grondin at miranda.com
Wed Apr 3 12:23:50 PDT 2013
Thanks for the quick answer. I have to add that I have not changed a
single line of code in the source code, so I don't get it ? My previous
code was working because I implemented the same Boolean function that
returns the "isCurrentNALUnitEndsAU" so the type cast was working anyway.
But now that this was changed to "Boolean& pictureEndMarker()", my
work-around does not work anymore since it returns a reference to the
actual Boolean in the class. I'm writing to the mailing list specially to
avoid making change to the library!
Anyway, I did not remember "sourceIsCompatibleWithUs()" function, I wrote
that code 2 years ago and I just realized that I wrongly implemented the
virtual function and was returning True, that explains everything. I was
just lucky that my previous code was working.
Thanks again.
Serge
From: Ross Finlayson <finlayson at live555.com>
To: LIVE555 Streaming Media - development & use
<live-devel at ns.live555.com>,
Date: 2013-04-03 14:54
Subject: Re: [Live-devel] H264VideoRTPSink type cast issue
Sent by: live-devel-bounces at ns.live555.com
I recently updated to the latest version of the library (March 23rd
2013 version) but I came across a new issue with H264VideoRTPSink.
In the function doSpecialFrameHandling there is "specific" type cast
of the frame source to H264VideoStreamFramer
That's correct. That code has been there for many years, so the fact that
it is an issue for you only with this new release of the code suggests that
you probably had made improper modifications to whatever version of the
code you were using before.
but since my source is not this class, my code now crashes.
That should not be happening, because if if you try to call "getPlaying()"
on a "H264VideoRTPSink" with an object that is *not* a
"H264VideoStreamFramer", you should never get to that code, because the
previous call to "sourceIsCompatibleWithUs()" on line 70 of "MediaSink.cpp"
should have returned False. (This is because "H264VideoRTPSink"
reimplements the "sourceIsCompatibleWithUs()" virtual function to return
True only if the source object is a "H264VideoStreamFramer".) So this
suggests that you are *still* making changes to the supplied source code.
Please stop doing this, if you want to get support on this mailing list!
See:
http://www.live555.com/liveMedia/faq.html#modifying-and-extending
The bottom line is that the object that feeds into a "H264VideoRTPSink"
*must* be a "H264VideoStreamFramer", or a subclass of this. The solution
is simple: Create a "H264VideoStreamDiscreteFramer" (note, *not* a
"H264VideoStreamFramer") object in front of your source object (i.e., in
front of the object that delivers discrete H.264 NAL units - presumably
from an encoder).
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
_______________________________________________
live-devel mailing list
live-devel at lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel
DISCLAIMER:
Privileged and/or Confidential information may be contained in this
message. If you are not the addressee of this message, you may not
copy, use or deliver this message to anyone. In such event, you
should destroy the message and kindly notify the sender by reply
e-mail. It is understood that opinions or conclusions that do not
relate to the official business of the company are neither given
nor endorsed by the company.
Thank You.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20130403/b4821b53/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20130403/b4821b53/attachment-0001.gif>
More information about the live-devel
mailing list