gstsdpmessage.h 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507
  1. /* GStreamer
  2. * Copyright (C) <2005,2006> Wim Taymans <[email protected]>
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Library General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2 of the License, or (at your option) any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Library General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Library General Public
  15. * License along with this library; if not, write to the
  16. * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
  17. * Boston, MA 02110-1301, USA.
  18. */
  19. /*
  20. * Unless otherwise indicated, Source Code is licensed under MIT license.
  21. * See further explanation attached in License Statement (distributed in the file
  22. * LICENSE).
  23. *
  24. * Permission is hereby granted, free of charge, to any person obtaining a copy of
  25. * this software and associated documentation files (the "Software"), to deal in
  26. * the Software without restriction, including without limitation the rights to
  27. * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
  28. * of the Software, and to permit persons to whom the Software is furnished to do
  29. * so, subject to the following conditions:
  30. *
  31. * The above copyright notice and this permission notice shall be included in all
  32. * copies or substantial portions of the Software.
  33. *
  34. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  35. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  36. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  37. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  38. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  39. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  40. * SOFTWARE.
  41. */
  42. #ifndef __GST_SDP_MESSAGE_H__
  43. #define __GST_SDP_MESSAGE_H__
  44. #include <glib.h>
  45. #include <gst/gst.h>
  46. #include <gst/sdp/gstsdp.h>
  47. G_BEGIN_DECLS
  48. /**
  49. * GstSDPOrigin:
  50. * @username: the user's login on the originating host, or it is "-"
  51. * if the originating host does not support the concept of user ids.
  52. * @sess_id: is a numeric string such that the tuple of @username, @sess_id,
  53. * @nettype, @addrtype and @addr form a globally unique identifier for the
  54. * session.
  55. * @sess_version: a version number for this announcement
  56. * @nettype: the type of network. "IN" is defined to have the meaning
  57. * "Internet".
  58. * @addrtype: the type of @addr.
  59. * @addr: the globally unique address of the machine from which the session was
  60. * created.
  61. *
  62. * The contents of the SDP "o=" field which gives the originator of the session
  63. * (their username and the address of the user's host) plus a session id and
  64. * session version number.
  65. */
  66. typedef struct {
  67. gchar *username;
  68. gchar *sess_id;
  69. gchar *sess_version;
  70. gchar *nettype;
  71. gchar *addrtype;
  72. gchar *addr;
  73. } GstSDPOrigin;
  74. /**
  75. * GstSDPConnection:
  76. * @nettype: the type of network. "IN" is defined to have the meaning
  77. * "Internet".
  78. * @addrtype: the type of @address.
  79. * @address: the address
  80. * @ttl: the time to live of the address
  81. * @addr_number: the number of layers
  82. *
  83. * The contents of the SDP "c=" field which contains connection data.
  84. */
  85. typedef struct {
  86. gchar *nettype;
  87. gchar *addrtype;
  88. gchar *address;
  89. guint ttl;
  90. guint addr_number;
  91. } GstSDPConnection;
  92. GstSDPResult gst_sdp_connection_set (GstSDPConnection *conn,
  93. const gchar *nettype,
  94. const gchar *addrtype,
  95. const gchar *address,
  96. guint ttl, guint addr_number);
  97. GstSDPResult gst_sdp_connection_clear (GstSDPConnection *conn);
  98. /**
  99. * GST_SDP_BWTYPE_CT:
  100. *
  101. * The Conference Total bandwidth modifier.
  102. */
  103. #define GST_SDP_BWTYPE_CT "CT"
  104. /**
  105. * GST_SDP_BWTYPE_AS:
  106. *
  107. * The Application-Specific Maximum bandwidth modifier.
  108. */
  109. #define GST_SDP_BWTYPE_AS "AS"
  110. /**
  111. * GST_SDP_BWTYPE_EXT_PREFIX:
  112. *
  113. * The extension prefix bandwidth modifier.
  114. */
  115. #define GST_SDP_BWTYPE_EXT_PREFIX "X-"
  116. /**
  117. * GST_SDP_BWTYPE_RS:
  118. *
  119. * RTCP bandwidth allocated to active data senders (RFC 3556).
  120. */
  121. #define GST_SDP_BWTYPE_RS "RS"
  122. /**
  123. * GST_SDP_BWTYPE_RR:
  124. *
  125. * RTCP bandwidth allocated to data receivers (RFC 3556).
  126. */
  127. #define GST_SDP_BWTYPE_RR "RR"
  128. /**
  129. * GST_SDP_BWTYPE_TIAS:
  130. *
  131. * Transport Independent Application Specific Maximum bandwidth (RFC 3890).
  132. */
  133. #define GST_SDP_BWTYPE_TIAS "TIAS"
  134. /**
  135. * GstSDPBandwidth:
  136. * @bwtype: the bandwidth modifier type
  137. * @bandwidth: the bandwidth in kilobits per second
  138. *
  139. * The contents of the SDP "b=" field which specifies the proposed bandwidth to
  140. * be used by the session or media.
  141. */
  142. typedef struct {
  143. gchar *bwtype;
  144. guint bandwidth;
  145. } GstSDPBandwidth;
  146. GstSDPResult gst_sdp_bandwidth_set (GstSDPBandwidth *bw, const gchar *bwtype,
  147. guint bandwidth);
  148. GstSDPResult gst_sdp_bandwidth_clear (GstSDPBandwidth *bw);
  149. /**
  150. * GstSDPTime:
  151. * @start: start time for the conference. The value is the decimal
  152. * representation of Network Time Protocol (NTP) time values in seconds
  153. * @stop: stop time for the conference. The value is the decimal
  154. * representation of Network Time Protocol (NTP) time values in seconds
  155. * @repeat: repeat times for a session
  156. *
  157. * The contents of the SDP "t=" field which specify the start and stop times for
  158. * a conference session.
  159. */
  160. typedef struct {
  161. gchar *start;
  162. gchar *stop;
  163. GArray *repeat;
  164. } GstSDPTime;
  165. GstSDPResult gst_sdp_time_set (GstSDPTime *t, const gchar *start,
  166. const gchar *stop, const gchar **repeat);
  167. GstSDPResult gst_sdp_time_clear (GstSDPTime *t);
  168. /**
  169. * GstSDPZone:
  170. * @time: the NTP time that a time zone adjustment happens
  171. * @typed_time: the offset from the time when the session was first scheduled
  172. *
  173. * The contents of the SDP "z=" field which allows the sender to
  174. * specify a list of time zone adjustments and offsets from the base
  175. * time.
  176. */
  177. typedef struct {
  178. gchar *time;
  179. gchar *typed_time;
  180. } GstSDPZone;
  181. GstSDPResult gst_sdp_zone_set (GstSDPZone *zone, const gchar *adj_time,
  182. const gchar *typed_time);
  183. GstSDPResult gst_sdp_zone_clear (GstSDPZone *zone);
  184. /**
  185. * GstSDPKey:
  186. * @type: the encryption type
  187. * @data: the encryption data
  188. *
  189. * The contents of the SDP "k=" field which is used to convey encryption
  190. * keys.
  191. */
  192. typedef struct {
  193. gchar *type;
  194. gchar *data;
  195. } GstSDPKey;
  196. /**
  197. * GstSDPAttribute:
  198. * @key: the attribute key
  199. * @value: the attribute value or NULL when it was a property attribute
  200. *
  201. * The contents of the SDP "a=" field which contains a key/value pair.
  202. */
  203. typedef struct {
  204. gchar *key;
  205. gchar *value;
  206. } GstSDPAttribute;
  207. GstSDPResult gst_sdp_attribute_set (GstSDPAttribute *attr, const gchar *key,
  208. const gchar *value);
  209. GstSDPResult gst_sdp_attribute_clear (GstSDPAttribute *attr);
  210. /**
  211. * GstSDPMedia:
  212. * @media: the media type
  213. * @port: the transport port to which the media stream will be sent
  214. * @num_ports: the number of ports or -1 if only one port was specified
  215. * @proto: the transport protocol
  216. * @fmts: an array of #gchar formats
  217. * @information: the media title
  218. * @connections: array of #GstSDPConnection with media connection information
  219. * @bandwidths: array of #GstSDPBandwidth with media bandwidth information
  220. * @key: the encryption key
  221. * @attributes: array of #GstSDPAttribute with the additional media attributes
  222. *
  223. * The contents of the SDP "m=" field with all related fields.
  224. */
  225. typedef struct {
  226. gchar *media;
  227. guint port;
  228. guint num_ports;
  229. gchar *proto;
  230. GArray *fmts;
  231. gchar *information;
  232. GArray *connections;
  233. GArray *bandwidths;
  234. GstSDPKey key;
  235. GArray *attributes;
  236. } GstSDPMedia;
  237. /**
  238. * GstSDPMessage:
  239. * @version: the protocol version
  240. * @origin: owner/creator and session identifier
  241. * @session_name: session name
  242. * @information: session information
  243. * @uri: URI of description
  244. * @emails: array of #gchar with email addresses
  245. * @phones: array of #gchar with phone numbers
  246. * @connection: connection information for the session
  247. * @bandwidths: array of #GstSDPBandwidth with bandwidth information
  248. * @times: array of #GstSDPTime with time descriptions
  249. * @zones: array of #GstSDPZone with time zone adjustments
  250. * @key: encryption key
  251. * @attributes: array of #GstSDPAttribute with session attributes
  252. * @medias: array of #GstSDPMedia with media descriptions
  253. *
  254. * The contents of the SDP message.
  255. */
  256. typedef struct {
  257. gchar *version;
  258. GstSDPOrigin origin;
  259. gchar *session_name;
  260. gchar *information;
  261. gchar *uri;
  262. GArray *emails;
  263. GArray *phones;
  264. GstSDPConnection connection;
  265. GArray *bandwidths;
  266. GArray *times;
  267. GArray *zones;
  268. GstSDPKey key;
  269. GArray *attributes;
  270. GArray *medias;
  271. } GstSDPMessage;
  272. GType gst_sdp_message_get_type (void);
  273. #define GST_TYPE_SDP_MESSAGE (gst_sdp_message_get_type())
  274. #define GST_SDP_MESSAGE_CAST(object) ((GstSDPMessage *)(object))
  275. #define GST_SDP_MESSAGE(object) (GST_SDP_MESSAGE_CAST(object))
  276. /* Session descriptions */
  277. GstSDPResult gst_sdp_message_new (GstSDPMessage **msg);
  278. GstSDPResult gst_sdp_message_init (GstSDPMessage *msg);
  279. GstSDPResult gst_sdp_message_uninit (GstSDPMessage *msg);
  280. GstSDPResult gst_sdp_message_free (GstSDPMessage *msg);
  281. GstSDPResult gst_sdp_message_copy (const GstSDPMessage *msg, GstSDPMessage **copy);
  282. GstSDPResult gst_sdp_message_parse_buffer (const guint8 *data, guint size, GstSDPMessage *msg);
  283. gchar* gst_sdp_message_as_text (const GstSDPMessage *msg);
  284. /* convert from/to uri */
  285. GstSDPResult gst_sdp_message_parse_uri (const gchar *uri, GstSDPMessage *msg);
  286. gchar* gst_sdp_message_as_uri (const gchar *scheme, const GstSDPMessage *msg);
  287. /* utils */
  288. gboolean gst_sdp_address_is_multicast (const gchar *nettype, const gchar *addrtype,
  289. const gchar *addr);
  290. /* v=.. */
  291. const gchar* gst_sdp_message_get_version (const GstSDPMessage *msg);
  292. GstSDPResult gst_sdp_message_set_version (GstSDPMessage *msg, const gchar *version);
  293. /* o=<username> <sess-id> <sess-version> <nettype> <addrtype> <unicast-address> */
  294. const GstSDPOrigin* gst_sdp_message_get_origin (const GstSDPMessage *msg);
  295. GstSDPResult gst_sdp_message_set_origin (GstSDPMessage *msg, const gchar *username,
  296. const gchar *sess_id, const gchar *sess_version,
  297. const gchar *nettype, const gchar *addrtype,
  298. const gchar *addr);
  299. /* s=<session name> */
  300. const gchar* gst_sdp_message_get_session_name (const GstSDPMessage *msg);
  301. GstSDPResult gst_sdp_message_set_session_name (GstSDPMessage *msg, const gchar *session_name);
  302. /* i=<session description> */
  303. const gchar* gst_sdp_message_get_information (const GstSDPMessage *msg);
  304. GstSDPResult gst_sdp_message_set_information (GstSDPMessage *msg, const gchar *information);
  305. /* u=<uri> */
  306. const gchar* gst_sdp_message_get_uri (const GstSDPMessage *msg);
  307. GstSDPResult gst_sdp_message_set_uri (GstSDPMessage *msg, const gchar *uri);
  308. /* e=<email-address> */
  309. guint gst_sdp_message_emails_len (const GstSDPMessage *msg);
  310. const gchar* gst_sdp_message_get_email (const GstSDPMessage *msg, guint idx);
  311. GstSDPResult gst_sdp_message_insert_email (GstSDPMessage *msg, gint idx,
  312. const gchar *email);
  313. GstSDPResult gst_sdp_message_replace_email (GstSDPMessage *msg, guint idx,
  314. const gchar *email);
  315. GstSDPResult gst_sdp_message_remove_email (GstSDPMessage *msg, guint idx);
  316. GstSDPResult gst_sdp_message_add_email (GstSDPMessage *msg, const gchar *email);
  317. /* p=<phone-number> */
  318. guint gst_sdp_message_phones_len (const GstSDPMessage *msg);
  319. const gchar* gst_sdp_message_get_phone (const GstSDPMessage *msg, guint idx);
  320. GstSDPResult gst_sdp_message_insert_phone (GstSDPMessage *msg, gint idx,
  321. const gchar *phone);
  322. GstSDPResult gst_sdp_message_replace_phone (GstSDPMessage *msg, guint idx,
  323. const gchar *phone);
  324. GstSDPResult gst_sdp_message_remove_phone (GstSDPMessage *msg, guint idx);
  325. GstSDPResult gst_sdp_message_add_phone (GstSDPMessage *msg, const gchar *phone);
  326. /* c=<nettype> <addrtype> <connection-address>[/<ttl>][/<number of addresses>] */
  327. const GstSDPConnection* gst_sdp_message_get_connection (const GstSDPMessage *msg);
  328. GstSDPResult gst_sdp_message_set_connection (GstSDPMessage *msg, const gchar *nettype,
  329. const gchar *addrtype, const gchar *address,
  330. guint ttl, guint addr_number);
  331. /* b=<bwtype>:<bandwidth> */
  332. guint gst_sdp_message_bandwidths_len (const GstSDPMessage *msg);
  333. const GstSDPBandwidth* gst_sdp_message_get_bandwidth (const GstSDPMessage *msg, guint idx);
  334. GstSDPResult gst_sdp_message_insert_bandwidth (GstSDPMessage * msg, gint idx,
  335. GstSDPBandwidth * bw);
  336. GstSDPResult gst_sdp_message_replace_bandwidth (GstSDPMessage * msg, guint idx,
  337. GstSDPBandwidth * bw);
  338. GstSDPResult gst_sdp_message_remove_bandwidth (GstSDPMessage * msg, guint idx);
  339. GstSDPResult gst_sdp_message_add_bandwidth (GstSDPMessage *msg, const gchar *bwtype,
  340. guint bandwidth);
  341. /* t=<start-time> <stop-time> and
  342. * r=<repeat interval> <active duration> <offsets from start-time> */
  343. guint gst_sdp_message_times_len (const GstSDPMessage *msg);
  344. const GstSDPTime* gst_sdp_message_get_time (const GstSDPMessage *msg, guint idx);
  345. GstSDPResult gst_sdp_message_insert_time (GstSDPMessage *msg, gint idx,
  346. GstSDPTime *t);
  347. GstSDPResult gst_sdp_message_replace_time (GstSDPMessage *msg, guint idx,
  348. GstSDPTime *t);
  349. GstSDPResult gst_sdp_message_remove_time (GstSDPMessage *msg, guint idx);
  350. GstSDPResult gst_sdp_message_add_time (GstSDPMessage *msg, const gchar *start,
  351. const gchar *stop, const gchar **repeat);
  352. /* z=<adjustment time> <offset> <adjustment time> <offset> .... */
  353. guint gst_sdp_message_zones_len (const GstSDPMessage *msg);
  354. const GstSDPZone* gst_sdp_message_get_zone (const GstSDPMessage *msg, guint idx);
  355. GstSDPResult gst_sdp_message_insert_zone (GstSDPMessage *msg, gint idx,
  356. GstSDPZone *zone);
  357. GstSDPResult gst_sdp_message_replace_zone (GstSDPMessage *msg, guint idx,
  358. GstSDPZone *zone);
  359. GstSDPResult gst_sdp_message_remove_zone (GstSDPMessage *msg, guint idx);
  360. GstSDPResult gst_sdp_message_add_zone (GstSDPMessage *msg, const gchar *adj_time,
  361. const gchar *typed_time);
  362. /* k=<method>[:<encryption key>] */
  363. const GstSDPKey* gst_sdp_message_get_key (const GstSDPMessage *msg);
  364. GstSDPResult gst_sdp_message_set_key (GstSDPMessage *msg, const gchar *type,
  365. const gchar *data);
  366. /* a=... */
  367. guint gst_sdp_message_attributes_len (const GstSDPMessage *msg);
  368. const GstSDPAttribute* gst_sdp_message_get_attribute (const GstSDPMessage *msg, guint idx);
  369. const gchar* gst_sdp_message_get_attribute_val (const GstSDPMessage *msg,
  370. const gchar *key);
  371. const gchar* gst_sdp_message_get_attribute_val_n (const GstSDPMessage *msg,
  372. const gchar *key, guint nth);
  373. GstSDPResult gst_sdp_message_insert_attribute (GstSDPMessage *msg, gint idx,
  374. GstSDPAttribute *attr);
  375. GstSDPResult gst_sdp_message_replace_attribute (GstSDPMessage *msg, guint idx,
  376. GstSDPAttribute *attr);
  377. GstSDPResult gst_sdp_message_remove_attribute (GstSDPMessage *msg, guint idx);
  378. GstSDPResult gst_sdp_message_add_attribute (GstSDPMessage *msg, const gchar *key,
  379. const gchar *value);
  380. /* m=.. sections */
  381. guint gst_sdp_message_medias_len (const GstSDPMessage *msg);
  382. const GstSDPMedia* gst_sdp_message_get_media (const GstSDPMessage *msg, guint idx);
  383. GstSDPResult gst_sdp_message_add_media (GstSDPMessage *msg, GstSDPMedia *media);
  384. GstSDPResult gst_sdp_message_dump (const GstSDPMessage *msg);
  385. /* Media descriptions */
  386. GstSDPResult gst_sdp_media_new (GstSDPMedia **media);
  387. GstSDPResult gst_sdp_media_init (GstSDPMedia *media);
  388. GstSDPResult gst_sdp_media_uninit (GstSDPMedia *media);
  389. GstSDPResult gst_sdp_media_free (GstSDPMedia *media);
  390. GstSDPResult gst_sdp_media_copy (const GstSDPMedia *media, GstSDPMedia **copy);
  391. gchar* gst_sdp_media_as_text (const GstSDPMedia *media);
  392. /* m=<media> <port>/<number of ports> <proto> <fmt> ... */
  393. const gchar* gst_sdp_media_get_media (const GstSDPMedia *media);
  394. GstSDPResult gst_sdp_media_set_media (GstSDPMedia *media, const gchar *med);
  395. guint gst_sdp_media_get_port (const GstSDPMedia *media);
  396. guint gst_sdp_media_get_num_ports (const GstSDPMedia *media);
  397. GstSDPResult gst_sdp_media_set_port_info (GstSDPMedia *media, guint port,
  398. guint num_ports);
  399. const gchar* gst_sdp_media_get_proto (const GstSDPMedia *media);
  400. GstSDPResult gst_sdp_media_set_proto (GstSDPMedia *media, const gchar *proto);
  401. guint gst_sdp_media_formats_len (const GstSDPMedia *media);
  402. const gchar* gst_sdp_media_get_format (const GstSDPMedia *media, guint idx);
  403. GstSDPResult gst_sdp_media_insert_format (GstSDPMedia *media, gint idx,
  404. const gchar *format);
  405. GstSDPResult gst_sdp_media_replace_format (GstSDPMedia *media, guint idx,
  406. const gchar *format);
  407. GstSDPResult gst_sdp_media_remove_format (GstSDPMedia *media, guint idx);
  408. GstSDPResult gst_sdp_media_add_format (GstSDPMedia *media, const gchar *format);
  409. /* i=<session description> */
  410. const gchar* gst_sdp_media_get_information (const GstSDPMedia *media);
  411. GstSDPResult gst_sdp_media_set_information (GstSDPMedia *media, const gchar *information);
  412. /* c=<nettype> <addrtype> <connection-address>[/<ttl>][/<number of addresses>] */
  413. guint gst_sdp_media_connections_len (const GstSDPMedia *media);
  414. const GstSDPConnection* gst_sdp_media_get_connection (const GstSDPMedia *media, guint idx);
  415. GstSDPResult gst_sdp_media_insert_connection (GstSDPMedia *media, gint idx,
  416. GstSDPConnection *conn);
  417. GstSDPResult gst_sdp_media_replace_connection (GstSDPMedia *media, guint idx,
  418. GstSDPConnection *conn);
  419. GstSDPResult gst_sdp_media_remove_connection (GstSDPMedia *media, guint idx);
  420. GstSDPResult gst_sdp_media_add_connection (GstSDPMedia *media,
  421. const gchar *nettype,
  422. const gchar *addrtype,
  423. const gchar *address,
  424. guint ttl, guint addr_number);
  425. /* b=<bwtype>:<bandwidth> */
  426. guint gst_sdp_media_bandwidths_len (const GstSDPMedia *media);
  427. const GstSDPBandwidth* gst_sdp_media_get_bandwidth (const GstSDPMedia *media, guint idx);
  428. GstSDPResult gst_sdp_media_insert_bandwidth (GstSDPMedia *media, gint idx,
  429. GstSDPBandwidth *bw);
  430. GstSDPResult gst_sdp_media_replace_bandwidth (GstSDPMedia *media, guint idx,
  431. GstSDPBandwidth *bw);
  432. GstSDPResult gst_sdp_media_remove_bandwidth (GstSDPMedia *media, guint idx);
  433. GstSDPResult gst_sdp_media_add_bandwidth (GstSDPMedia *media, const gchar *bwtype,
  434. guint bandwidth);
  435. /* k=<method>:<encryption key> */
  436. const GstSDPKey* gst_sdp_media_get_key (const GstSDPMedia *media);
  437. GstSDPResult gst_sdp_media_set_key (GstSDPMedia *media, const gchar *type,
  438. const gchar *data);
  439. /* a=... */
  440. guint gst_sdp_media_attributes_len (const GstSDPMedia *media);
  441. const GstSDPAttribute * gst_sdp_media_get_attribute (const GstSDPMedia *media, guint idx);
  442. const gchar* gst_sdp_media_get_attribute_val (const GstSDPMedia *media, const gchar *key);
  443. const gchar* gst_sdp_media_get_attribute_val_n (const GstSDPMedia *media, const gchar *key,
  444. guint nth);
  445. GstSDPResult gst_sdp_media_insert_attribute (GstSDPMedia *media, gint idx,
  446. GstSDPAttribute *attr);
  447. GstSDPResult gst_sdp_media_replace_attribute (GstSDPMedia *media, guint idx,
  448. GstSDPAttribute *attr);
  449. GstSDPResult gst_sdp_media_remove_attribute (GstSDPMedia *media, guint idx);
  450. GstSDPResult gst_sdp_media_add_attribute (GstSDPMedia *media, const gchar *key,
  451. const gchar *value);
  452. G_END_DECLS
  453. #endif /* __GST_SDP_MESSAGE_H__ */