1sdp_find_medCioam_mrutnpimcaapt(i3oCnOMPMrPoUtToIcLo)l Parser Utilistdipe_sfiLnidb_rmaerdyiaF_urntcptmiaopn(s3COMMPUTIL)
2
3
4
6 sdp_find_media_rtpmap - find the rtpmap attribute in the specified
7 media
8
10 cc [ flag...] file... -lcommputil [ library...]
11 #include <sdp.h>
12
13 sdp_attr_t *sdp_find_media_rtpmap(sdp_media_t *media,
14 const char *format);
15
16
18 The sdp_find_media_rtpmap() function searches the attribute list of the
19 specified media structure, media, for the specified format. If the
20 search is successful a pointer to that rtpmap attribute is returned.
21 Otherwise it returns NULL.
22
24 The sdp_find_media_rtpmap() function returns the attribute (sdp_attr_t
25 *) on success and NULL when the search fails or the mandatory input
26 parameters are NULL.
27
29 Example 1 An (incomplete) SDP description that contains two media sec‐
30 tions: audio and video.
31
32 m=audio 49170 RTP/AVP 0 8
33 a=rtpmap:0 PCMU/8000
34 a=rtpmap:8 PCMA/8000
35 m=video 51372 RTP/AVP 31 32
36 a=rtpmap:31 H261/90000
37 a=rtpmap:32 MPV/90000
38
39 /*
40 * Assuming that above description is parsed using sdp_parse() and that
41 * the parsed structure is in "session" sdp_session_t structure.
42 */
43
44 sdp_media_t *video;
45 sdp_attr_t *mpv;
46
47 video = sdp_find_media(session->s_media, "video);
48 mpv = sdp_find_media_rtpmap(video, "32");
49
50 /*
51 * Now the attribute structure sdp_attr_t, mpv will be having
52 * values from the attribute field "a=rtpmap:32 MPV/90000"
53 */
54
55
57 See attributes(5) for descriptions of the following attributes:
58
59
60
61
62 ┌─────────────────────────────┬─────────────────────────────┐
63 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
64 ├─────────────────────────────┼─────────────────────────────┤
65 │Interface Stability │Committed │
66 ├─────────────────────────────┼─────────────────────────────┤
67 │MT-Level │Safe │
68 └─────────────────────────────┴─────────────────────────────┘
69
71 libcommputil(3LIB), sdp_parse(3COMMPUTIL), attributes(5)
72
73
74
75SunOS 5.11 12 Oct 2007sdp_find_media_rtpmap(3COMMPUTIL)