gstrtspextension.h 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /* GStreamer RTSP Extension
  2. * Copyright (C) 2007 Wim Taymans <[email protected]>
  3. *
  4. * gstrtspextension.h: RTSP Extension interface.
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Library General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2 of the License, or (at your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Library General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Library General Public
  17. * License along with this library; if not, write to the
  18. * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
  19. * Boston, MA 02110-1301, USA.
  20. */
  21. #ifndef __GST_RTSP_EXTENSION_H__
  22. #define __GST_RTSP_EXTENSION_H__
  23. #include <gst/gst.h>
  24. #include <gst/sdp/gstsdpmessage.h>
  25. #include <gst/rtsp/gstrtsptransport.h>
  26. #include <gst/rtsp/gstrtspmessage.h>
  27. #include <gst/rtsp/gstrtspurl.h>
  28. G_BEGIN_DECLS
  29. #define GST_TYPE_RTSP_EXTENSION \
  30. (gst_rtsp_extension_get_type ())
  31. #define GST_RTSP_EXTENSION(obj) \
  32. (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_RTSP_EXTENSION, GstRTSPExtension))
  33. #define GST_IS_RTSP_EXTENSION(obj) \
  34. (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_RTSP_EXTENSION))
  35. #define GST_RTSP_EXTENSION_GET_INTERFACE(inst) \
  36. (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_RTSP_EXTENSION, GstRTSPExtensionInterface))
  37. typedef struct _GstRTSPExtension GstRTSPExtension;
  38. typedef struct _GstRTSPExtensionInterface GstRTSPExtensionInterface;
  39. struct _GstRTSPExtensionInterface {
  40. GTypeInterface parent;
  41. /* vfunctions */
  42. gboolean (*detect_server) (GstRTSPExtension *ext, GstRTSPMessage *resp);
  43. GstRTSPResult (*before_send) (GstRTSPExtension *ext, GstRTSPMessage *req);
  44. GstRTSPResult (*after_send) (GstRTSPExtension *ext, GstRTSPMessage *req, GstRTSPMessage *resp);
  45. GstRTSPResult (*parse_sdp) (GstRTSPExtension *ext, GstSDPMessage *sdp, GstStructure *s);
  46. GstRTSPResult (*setup_media) (GstRTSPExtension *ext, GstSDPMedia *media);
  47. gboolean (*configure_stream) (GstRTSPExtension *ext, GstCaps *caps);
  48. GstRTSPResult (*get_transports) (GstRTSPExtension *ext, GstRTSPLowerTrans protocols, gchar **transport);
  49. GstRTSPResult (*stream_select) (GstRTSPExtension *ext, GstRTSPUrl *url);
  50. /* signals */
  51. GstRTSPResult (*send) (GstRTSPExtension *ext, GstRTSPMessage *req, GstRTSPMessage *resp);
  52. /* ABI: more vfunctions added later */
  53. GstRTSPResult (*receive_request) (GstRTSPExtension *ext, GstRTSPMessage *req);
  54. /*< private >*/
  55. gpointer _gst_reserved[GST_PADDING];
  56. };
  57. GType gst_rtsp_extension_get_type (void);
  58. /* invoke vfunction on interface */
  59. gboolean gst_rtsp_extension_detect_server (GstRTSPExtension *ext, GstRTSPMessage *resp);
  60. GstRTSPResult gst_rtsp_extension_before_send (GstRTSPExtension *ext, GstRTSPMessage *req);
  61. GstRTSPResult gst_rtsp_extension_after_send (GstRTSPExtension *ext, GstRTSPMessage *req,
  62. GstRTSPMessage *resp);
  63. GstRTSPResult gst_rtsp_extension_parse_sdp (GstRTSPExtension *ext, GstSDPMessage *sdp,
  64. GstStructure *s);
  65. GstRTSPResult gst_rtsp_extension_setup_media (GstRTSPExtension *ext, GstSDPMedia *media);
  66. gboolean gst_rtsp_extension_configure_stream (GstRTSPExtension *ext, GstCaps *caps);
  67. GstRTSPResult gst_rtsp_extension_get_transports (GstRTSPExtension *ext, GstRTSPLowerTrans protocols,
  68. gchar **transport);
  69. GstRTSPResult gst_rtsp_extension_stream_select (GstRTSPExtension *ext, GstRTSPUrl *url);
  70. GstRTSPResult gst_rtsp_extension_receive_request (GstRTSPExtension *ext, GstRTSPMessage *req);
  71. /* signal emision */
  72. GstRTSPResult gst_rtsp_extension_send (GstRTSPExtension *ext, GstRTSPMessage *req,
  73. GstRTSPMessage *resp);
  74. G_END_DECLS
  75. #endif /* __GST_RTSP_EXTENSION_H__ */