1 year ago
#151768
Viettel Solutions
Advanced function define syntax at c++ with ':' after function prototype
I'm reading testRTSPClient.cpp at live555 library for read RTSP stream At a constructor's implementation of DummySink, i meet a strange syntax
DummySink::DummySink(UsageEnvironment& env, MediaSubsession& subsession, char const* streamId)
: MediaSink(env),
fSubsession(subsession) {
fStreamId = strDup(streamId);
fReceiveBuffer = new u_int8_t[DUMMY_SINK_RECEIVE_BUFFER_SIZE];
}
I don't understand what
: MediaSink(env),
fSubsession(subsession)
that after function prototype means, because common function defining syntax is
functionName(args)
//without :
{
//implement
}
If anyone know about it, please tell me know. Thank you so much
c++
oop
syntax
live555
0 Answers
Your Answer