<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
--></style><title>Re: [Live-devel] LIVE555 Streaming Media question:
C or C+</title></head><body>
<blockquote type="cite" cite><font face="Arial" size="-1">I would like
to use LIVE555 Streaming Media libraries in my application which is
written in C++ with MFC use. However, I can see that interface
implemented in LIVE555 Streaming Media requires parent
application to use C rather than C++. Mostly because of C-style
callbacks:</font></blockquote>
<blockquote type="cite" cite> </blockquote>
<blockquote type="cite" cite><font face="Arial" size="-1">
typedef void (responseHandler)(RTSPClient* rtspClient, int resultCode,
char* resultString);</font></blockquote>
<blockquote type="cite" cite> </blockquote>
<blockquote type="cite" cite><font face="Arial" size="-1">But what
should I do if I need all my code to be written in C++ and callbacks
to be the class members?</font></blockquote>
<div><br></div>
<div>C is basically a subset of C++, so 'C-style' code is also legal
in C++.</div>
<div><br></div>
<div>There are several examples of RTSPClient 'response handlers' in
the "openRTSP" source code
("testProgs/playCommon.cpp").</div>
<x-sigsep><pre>--
</pre></x-sigsep>
<div><br>
Ross Finlayson<br>
Live Networks, Inc.<br>
http://www.live555.com/</div>
</body>
</html>