diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2013-07-25 16:49:41 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2013-07-26 12:17:56 +0200 |
commit | 1d02496d15d3fb99c4038b6792b515e51e681104 (patch) | |
tree | 849e59acfd3656abbeee2e12c5f0c620506dace1 /gst/rtpmanager/rtpsource.h | |
parent | ddd071e54cd338e1f2fa89e8d26ac3dd29891185 (diff) |
source: also use the source for bye_reason
Store the BYE reason in our internal source object. Rename the methods on the
source object a little because now the BYE can be received in RTCP or
set when the session wants to send BYE.
Diffstat (limited to 'gst/rtpmanager/rtpsource.h')
-rw-r--r-- | gst/rtpmanager/rtpsource.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/gst/rtpmanager/rtpsource.h b/gst/rtpmanager/rtpsource.h index 153d423fc..82d010a6d 100644 --- a/gst/rtpmanager/rtpsource.h +++ b/gst/rtpmanager/rtpsource.h @@ -51,7 +51,7 @@ typedef struct _RTPSourceClass RTPSourceClass; * Check if @src is active. A source is active when it has been validated * and has not yet received a BYE packet. */ -#define RTP_SOURCE_IS_ACTIVE(src) (src->validated && !src->received_bye) +#define RTP_SOURCE_IS_ACTIVE(src) (src->validated && !src->marked_bye) /** * RTP_SOURCE_IS_SENDER: @@ -60,6 +60,14 @@ typedef struct _RTPSourceClass RTPSourceClass; * Check if @src is a sender. */ #define RTP_SOURCE_IS_SENDER(src) (src->is_sender) +/** + * RTP_SOURCE_IS_MARKED_BYE: + * @src: an #RTPSource + * + * Check if @src is a marked as BYE. + */ +#define RTP_SOURCE_IS_MARKED_BYE(src) (src->marked_bye) + /** * RTPSourcePushRTP: @@ -137,7 +145,7 @@ struct _RTPSource { GstStructure *sdes; - gboolean received_bye; + gboolean marked_bye; gchar *bye_reason; GSocketAddress *rtp_from; @@ -199,7 +207,8 @@ gboolean rtp_source_is_active (RTPSource *src); gboolean rtp_source_is_validated (RTPSource *src); gboolean rtp_source_is_sender (RTPSource *src); -gboolean rtp_source_received_bye (RTPSource *src); +void rtp_source_mark_bye (RTPSource *src, const gchar *reason); +gboolean rtp_source_is_marked_bye (RTPSource *src); gchar * rtp_source_get_bye_reason (RTPSource *src); void rtp_source_update_caps (RTPSource *src, GstCaps *caps); @@ -219,7 +228,6 @@ GstFlowReturn rtp_source_process_rtp (RTPSource *src, GstBuffer *buffe GstFlowReturn rtp_source_send_rtp (RTPSource *src, gpointer data, gboolean is_list, GstClockTime running_time); /* RTCP messages */ -void rtp_source_process_bye (RTPSource *src, const gchar *reason); void rtp_source_process_sr (RTPSource *src, GstClockTime time, guint64 ntptime, guint32 rtptime, guint32 packet_count, guint32 octet_count); void rtp_source_process_rb (RTPSource *src, guint64 ntpnstime, guint8 fractionlost, |