Communication Protocol Parser Utilities Library Functions
sdpfindmedia(3COMPUTIL)
NAME
sdpfindmedia - find the specified media from the media
list
SYNOPSIS
cc [ flag...] file... -lcommputil [ library...]
#include
sdpmediat *sdpfindmedia(sdpmediat *media, const char *name);
DESCRIPTION
The sdpfindmedia() function searches the media list for
the media specified by name. If the media is found it
returns the pointer to the media. Otherwise it returns NUL.
RETURN VALUES
The sdpfindmedia() function returns the media (sdpmediat
*) on success and NUL when the search fails or the manda-
tory input parameters are NUL.
EXAMPLES
Example 1 An (incomplete) SDP description that contains two
media sections: audio and video.
m=audio 49170 RTP/AVP 0 8
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
m=video 51372 RTP/AVP 31 32
a=rtpmap:31 H261/90000
a=rtpmap:32 MPV/90000
/*
* Assuming that above description is parsed using sdpparse() and that
* the parsed structure is in "session" sdpsessiont structure.
*/
sdpmediat *mymedia;
mymedia = sdpfindmedia(session->smedia, "video");
/*
* mymedia now points to the structure containg video media section
* information
*/
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
SunOS 5.11 Last change: 12 Oct 2007 1
Communication Protocol Parser Utilities Library Functions
sdpfindmedia(3COMPUTIL)
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Committed
MT-Level Safe
SEE ALSO
libcommputil(3LIB), sdpparse(3COMPUTIL), attributes(5)
SunOS 5.11 Last change: 12 Oct 2007 2
Communication Protocol Parser Utilities Library Functions
sdpfindmedia(3COMPUTIL)
SunOS 5.11 Last change: 12 Oct 2007 3
|