diff options
Diffstat (limited to 'gst/rtp')
-rw-r--r-- | gst/rtp/gstrtp-common.h | 2 | ||||
-rw-r--r-- | gst/rtp/gstrtpL16depay.h | 32 | ||||
-rw-r--r-- | gst/rtp/gstrtpL16enc.h | 44 | ||||
-rw-r--r-- | gst/rtp/gstrtpL16parse.h | 32 | ||||
-rw-r--r-- | gst/rtp/gstrtpL16pay.h | 44 | ||||
-rw-r--r-- | gst/rtp/gstrtpgsmdepay.h | 28 | ||||
-rw-r--r-- | gst/rtp/gstrtpgsmenc.h | 42 | ||||
-rw-r--r-- | gst/rtp/gstrtpgsmparse.h | 28 | ||||
-rw-r--r-- | gst/rtp/gstrtpgsmpay.h | 42 | ||||
-rw-r--r-- | gst/rtp/rtp-packet.h | 107 |
10 files changed, 199 insertions, 202 deletions
diff --git a/gst/rtp/gstrtp-common.h b/gst/rtp/gstrtp-common.h index ec4cd947..fb675189 100644 --- a/gst/rtp/gstrtp-common.h +++ b/gst/rtp/gstrtp-common.h @@ -26,7 +26,7 @@ typedef enum { /* Audio: */ - PAYLOAD_PCMU = 0, /* ITU-T G.711. mu-law audio (RFC 3551) */ + PAYLOAD_PCMU = 0, /* ITU-T G.711. mu-law audio (RFC 3551) */ PAYLOAD_GSM = 3, PAYLOAD_PCMA = 8, /* ITU-T G.711 A-law audio (RFC 3551) */ PAYLOAD_L16_STEREO = 10, diff --git a/gst/rtp/gstrtpL16depay.h b/gst/rtp/gstrtpL16depay.h index b49cf240..dad467bf 100644 --- a/gst/rtp/gstrtpL16depay.h +++ b/gst/rtp/gstrtpL16depay.h @@ -30,26 +30,26 @@ extern "C" #endif /* __cplusplus */ /* Definition of structure storing data for this element. */ - typedef struct _GstRtpL16Parse GstRtpL16Parse; - struct _GstRtpL16Parse - { - GstElement element; +typedef struct _GstRtpL16Parse GstRtpL16Parse; +struct _GstRtpL16Parse +{ + GstElement element; - GstPad *sinkpad; - GstPad *srcpad; + GstPad *sinkpad; + GstPad *srcpad; - guint frequency; - guint channels; + guint frequency; + guint channels; - rtp_payload_t payload_type; - }; + rtp_payload_t payload_type; +}; /* Standard definition defining a class for this element. */ - typedef struct _GstRtpL16ParseClass GstRtpL16ParseClass; - struct _GstRtpL16ParseClass - { - GstElementClass parent_class; - }; +typedef struct _GstRtpL16ParseClass GstRtpL16ParseClass; +struct _GstRtpL16ParseClass +{ + GstElementClass parent_class; +}; /* Standard macros for defining types for this element. */ #define GST_TYPE_RTP_L16_PARSE \ @@ -63,7 +63,7 @@ extern "C" #define GST_IS_RTP_L16_PARSE_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_L16_PARSE)) - gboolean gst_rtpL16parse_plugin_init (GstPlugin * plugin); +gboolean gst_rtpL16parse_plugin_init (GstPlugin * plugin); #ifdef __cplusplus } diff --git a/gst/rtp/gstrtpL16enc.h b/gst/rtp/gstrtpL16enc.h index 7e902483..15ed92f6 100644 --- a/gst/rtp/gstrtpL16enc.h +++ b/gst/rtp/gstrtpL16enc.h @@ -31,32 +31,32 @@ extern "C" #endif /* __cplusplus */ /* Definition of structure storing data for this element. */ - typedef struct _GstRtpL16Enc GstRtpL16Enc; - struct _GstRtpL16Enc - { - GstElement element; - - GstPad *sinkpad; - GstPad *srcpad; +typedef struct _GstRtpL16Enc GstRtpL16Enc; +struct _GstRtpL16Enc +{ + GstElement element; - guint frequency; - guint channels; + GstPad *sinkpad; + GstPad *srcpad; - /* the timestamp of the next frame */ - guint64 next_time; - /* the interval between frames */ - guint64 time_interval; + guint frequency; + guint channels; - guint32 ssrc; - guint16 seq; - }; + /* the timestamp of the next frame */ + guint64 next_time; + /* the interval between frames */ + guint64 time_interval; + + guint32 ssrc; + guint16 seq; +}; /* Standard definition defining a class for this element. */ - typedef struct _GstRtpL16EncClass GstRtpL16EncClass; - struct _GstRtpL16EncClass - { - GstElementClass parent_class; - }; +typedef struct _GstRtpL16EncClass GstRtpL16EncClass; +struct _GstRtpL16EncClass +{ + GstElementClass parent_class; +}; /* Standard macros for defining types for this element. */ #define GST_TYPE_RTP_L16_ENC \ @@ -70,7 +70,7 @@ extern "C" #define GST_IS_RTP_L16_ENC_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_L16_ENC)) - gboolean gst_rtpL16enc_plugin_init (GstPlugin * plugin); +gboolean gst_rtpL16enc_plugin_init (GstPlugin * plugin); #ifdef __cplusplus } diff --git a/gst/rtp/gstrtpL16parse.h b/gst/rtp/gstrtpL16parse.h index b49cf240..dad467bf 100644 --- a/gst/rtp/gstrtpL16parse.h +++ b/gst/rtp/gstrtpL16parse.h @@ -30,26 +30,26 @@ extern "C" #endif /* __cplusplus */ /* Definition of structure storing data for this element. */ - typedef struct _GstRtpL16Parse GstRtpL16Parse; - struct _GstRtpL16Parse - { - GstElement element; +typedef struct _GstRtpL16Parse GstRtpL16Parse; +struct _GstRtpL16Parse +{ + GstElement element; - GstPad *sinkpad; - GstPad *srcpad; + GstPad *sinkpad; + GstPad *srcpad; - guint frequency; - guint channels; + guint frequency; + guint channels; - rtp_payload_t payload_type; - }; + rtp_payload_t payload_type; +}; /* Standard definition defining a class for this element. */ - typedef struct _GstRtpL16ParseClass GstRtpL16ParseClass; - struct _GstRtpL16ParseClass - { - GstElementClass parent_class; - }; +typedef struct _GstRtpL16ParseClass GstRtpL16ParseClass; +struct _GstRtpL16ParseClass +{ + GstElementClass parent_class; +}; /* Standard macros for defining types for this element. */ #define GST_TYPE_RTP_L16_PARSE \ @@ -63,7 +63,7 @@ extern "C" #define GST_IS_RTP_L16_PARSE_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_L16_PARSE)) - gboolean gst_rtpL16parse_plugin_init (GstPlugin * plugin); +gboolean gst_rtpL16parse_plugin_init (GstPlugin * plugin); #ifdef __cplusplus } diff --git a/gst/rtp/gstrtpL16pay.h b/gst/rtp/gstrtpL16pay.h index 7e902483..15ed92f6 100644 --- a/gst/rtp/gstrtpL16pay.h +++ b/gst/rtp/gstrtpL16pay.h @@ -31,32 +31,32 @@ extern "C" #endif /* __cplusplus */ /* Definition of structure storing data for this element. */ - typedef struct _GstRtpL16Enc GstRtpL16Enc; - struct _GstRtpL16Enc - { - GstElement element; - - GstPad *sinkpad; - GstPad *srcpad; +typedef struct _GstRtpL16Enc GstRtpL16Enc; +struct _GstRtpL16Enc +{ + GstElement element; - guint frequency; - guint channels; + GstPad *sinkpad; + GstPad *srcpad; - /* the timestamp of the next frame */ - guint64 next_time; - /* the interval between frames */ - guint64 time_interval; + guint frequency; + guint channels; - guint32 ssrc; - guint16 seq; - }; + /* the timestamp of the next frame */ + guint64 next_time; + /* the interval between frames */ + guint64 time_interval; + + guint32 ssrc; + guint16 seq; +}; /* Standard definition defining a class for this element. */ - typedef struct _GstRtpL16EncClass GstRtpL16EncClass; - struct _GstRtpL16EncClass - { - GstElementClass parent_class; - }; +typedef struct _GstRtpL16EncClass GstRtpL16EncClass; +struct _GstRtpL16EncClass +{ + GstElementClass parent_class; +}; /* Standard macros for defining types for this element. */ #define GST_TYPE_RTP_L16_ENC \ @@ -70,7 +70,7 @@ extern "C" #define GST_IS_RTP_L16_ENC_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_L16_ENC)) - gboolean gst_rtpL16enc_plugin_init (GstPlugin * plugin); +gboolean gst_rtpL16enc_plugin_init (GstPlugin * plugin); #ifdef __cplusplus } diff --git a/gst/rtp/gstrtpgsmdepay.h b/gst/rtp/gstrtpgsmdepay.h index f3b0e659..0a006e70 100644 --- a/gst/rtp/gstrtpgsmdepay.h +++ b/gst/rtp/gstrtpgsmdepay.h @@ -30,23 +30,23 @@ extern "C" #endif /* __cplusplus */ /* Definition of structure storing data for this element. */ - typedef struct _GstRtpGSMParse GstRtpGSMParse; - struct _GstRtpGSMParse - { - GstElement element; +typedef struct _GstRtpGSMParse GstRtpGSMParse; +struct _GstRtpGSMParse +{ + GstElement element; - GstPad *sinkpad; - GstPad *srcpad; + GstPad *sinkpad; + GstPad *srcpad; - guint frequency; - }; + guint frequency; +}; /* Standard definition defining a class for this element. */ - typedef struct _GstRtpGSMParseClass GstRtpGSMParseClass; - struct _GstRtpGSMParseClass - { - GstElementClass parent_class; - }; +typedef struct _GstRtpGSMParseClass GstRtpGSMParseClass; +struct _GstRtpGSMParseClass +{ + GstElementClass parent_class; +}; /* Standard macros for defining types for this element. */ #define GST_TYPE_RTP_GSM_PARSE \ @@ -60,7 +60,7 @@ extern "C" #define GST_IS_RTP_GSM_PARSE_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_GSM_PARSE)) - gboolean gst_rtpgsmparse_plugin_init (GstPlugin * plugin); +gboolean gst_rtpgsmparse_plugin_init (GstPlugin * plugin); #ifdef __cplusplus } diff --git a/gst/rtp/gstrtpgsmenc.h b/gst/rtp/gstrtpgsmenc.h index e44e5dae..1220d402 100644 --- a/gst/rtp/gstrtpgsmenc.h +++ b/gst/rtp/gstrtpgsmenc.h @@ -31,31 +31,31 @@ extern "C" #endif /* __cplusplus */ /* Definition of structure storing data for this element. */ - typedef struct _GstRtpGSMEnc GstRtpGSMEnc; - struct _GstRtpGSMEnc - { - GstElement element; - - GstPad *sinkpad; - GstPad *srcpad; +typedef struct _GstRtpGSMEnc GstRtpGSMEnc; +struct _GstRtpGSMEnc +{ + GstElement element; - guint frequency; + GstPad *sinkpad; + GstPad *srcpad; - /* the timestamp of the next frame */ - guint64 next_time; - /* the interval between frames */ - guint64 time_interval; + guint frequency; - guint32 ssrc; - guint16 seq; - }; + /* the timestamp of the next frame */ + guint64 next_time; + /* the interval between frames */ + guint64 time_interval; + + guint32 ssrc; + guint16 seq; +}; /* Standard definition defining a class for this element. */ - typedef struct _GstRtpGSMEncClass GstRtpGSMEncClass; - struct _GstRtpGSMEncClass - { - GstElementClass parent_class; - }; +typedef struct _GstRtpGSMEncClass GstRtpGSMEncClass; +struct _GstRtpGSMEncClass +{ + GstElementClass parent_class; +}; /* Standard macros for defining types for this element. */ #define GST_TYPE_RTP_GSM_ENC \ @@ -69,7 +69,7 @@ extern "C" #define GST_IS_RTP_GSM_ENC_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_GSM_ENC)) - gboolean gst_rtpgsmenc_plugin_init (GstPlugin * plugin); +gboolean gst_rtpgsmenc_plugin_init (GstPlugin * plugin); #ifdef __cplusplus } diff --git a/gst/rtp/gstrtpgsmparse.h b/gst/rtp/gstrtpgsmparse.h index f3b0e659..0a006e70 100644 --- a/gst/rtp/gstrtpgsmparse.h +++ b/gst/rtp/gstrtpgsmparse.h @@ -30,23 +30,23 @@ extern "C" #endif /* __cplusplus */ /* Definition of structure storing data for this element. */ - typedef struct _GstRtpGSMParse GstRtpGSMParse; - struct _GstRtpGSMParse - { - GstElement element; +typedef struct _GstRtpGSMParse GstRtpGSMParse; +struct _GstRtpGSMParse +{ + GstElement element; - GstPad *sinkpad; - GstPad *srcpad; + GstPad *sinkpad; + GstPad *srcpad; - guint frequency; - }; + guint frequency; +}; /* Standard definition defining a class for this element. */ - typedef struct _GstRtpGSMParseClass GstRtpGSMParseClass; - struct _GstRtpGSMParseClass - { - GstElementClass parent_class; - }; +typedef struct _GstRtpGSMParseClass GstRtpGSMParseClass; +struct _GstRtpGSMParseClass +{ + GstElementClass parent_class; +}; /* Standard macros for defining types for this element. */ #define GST_TYPE_RTP_GSM_PARSE \ @@ -60,7 +60,7 @@ extern "C" #define GST_IS_RTP_GSM_PARSE_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_GSM_PARSE)) - gboolean gst_rtpgsmparse_plugin_init (GstPlugin * plugin); +gboolean gst_rtpgsmparse_plugin_init (GstPlugin * plugin); #ifdef __cplusplus } diff --git a/gst/rtp/gstrtpgsmpay.h b/gst/rtp/gstrtpgsmpay.h index e44e5dae..1220d402 100644 --- a/gst/rtp/gstrtpgsmpay.h +++ b/gst/rtp/gstrtpgsmpay.h @@ -31,31 +31,31 @@ extern "C" #endif /* __cplusplus */ /* Definition of structure storing data for this element. */ - typedef struct _GstRtpGSMEnc GstRtpGSMEnc; - struct _GstRtpGSMEnc - { - GstElement element; - - GstPad *sinkpad; - GstPad *srcpad; +typedef struct _GstRtpGSMEnc GstRtpGSMEnc; +struct _GstRtpGSMEnc +{ + GstElement element; - guint frequency; + GstPad *sinkpad; + GstPad *srcpad; - /* the timestamp of the next frame */ - guint64 next_time; - /* the interval between frames */ - guint64 time_interval; + guint frequency; - guint32 ssrc; - guint16 seq; - }; + /* the timestamp of the next frame */ + guint64 next_time; + /* the interval between frames */ + guint64 time_interval; + + guint32 ssrc; + guint16 seq; +}; /* Standard definition defining a class for this element. */ - typedef struct _GstRtpGSMEncClass GstRtpGSMEncClass; - struct _GstRtpGSMEncClass - { - GstElementClass parent_class; - }; +typedef struct _GstRtpGSMEncClass GstRtpGSMEncClass; +struct _GstRtpGSMEncClass +{ + GstElementClass parent_class; +}; /* Standard macros for defining types for this element. */ #define GST_TYPE_RTP_GSM_ENC \ @@ -69,7 +69,7 @@ extern "C" #define GST_IS_RTP_GSM_ENC_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_GSM_ENC)) - gboolean gst_rtpgsmenc_plugin_init (GstPlugin * plugin); +gboolean gst_rtpgsmenc_plugin_init (GstPlugin * plugin); #ifdef __cplusplus } diff --git a/gst/rtp/rtp-packet.h b/gst/rtp/rtp-packet.h index b130c86e..f731c5f0 100644 --- a/gst/rtp/rtp-packet.h +++ b/gst/rtp/rtp-packet.h @@ -30,80 +30,77 @@ #endif #ifdef __cplusplus -extern "C" -{ +extern "C" { #endif #define RTP_VERSION 2 #define RTP_HEADER_LEN 12 #define RTP_MTU 2048 - typedef struct Rtp_Header *Rtp_Header; +typedef struct Rtp_Header *Rtp_Header; - struct Rtp_Packet_Struct - { - gpointer data; - guint data_len; - }; +struct Rtp_Packet_Struct { + gpointer data; + guint data_len; +}; - struct Rtp_Header - { +struct Rtp_Header { #if G_BYTE_ORDER == G_LITTLE_ENDIAN - unsigned int csrc_count:4; /* CSRC count */ - unsigned int extension:1; /* header extension flag */ - unsigned int padding:1; /* padding flag */ - unsigned int version:2; /* protocol version */ - unsigned int payload_type:7; /* payload type */ - unsigned int marker:1; /* marker bit */ + unsigned int csrc_count:4; /* CSRC count */ + unsigned int extension:1; /* header extension flag */ + unsigned int padding:1; /* padding flag */ + unsigned int version:2; /* protocol version */ + unsigned int payload_type:7; /* payload type */ + unsigned int marker:1; /* marker bit */ #elif G_BYTE_ORDER == G_BIG_ENDIAN - unsigned int version:2; /* protocol version */ - unsigned int padding:1; /* padding flag */ - unsigned int extension:1; /* header extension flag */ - unsigned int csrc_count:4; /* CSRC count */ - unsigned int marker:1; /* marker bit */ - unsigned int payload_type:7; /* payload type */ + unsigned int version:2; /* protocol version */ + unsigned int padding:1; /* padding flag */ + unsigned int extension:1; /* header extension flag */ + unsigned int csrc_count:4; /* CSRC count */ + unsigned int marker:1; /* marker bit */ + unsigned int payload_type:7; /* payload type */ #else #error "G_BYTE_ORDER should be big or little endian." #endif - guint16 seq; /* sequence number */ - guint32 timestamp; /* timestamp */ - guint32 ssrc; /* synchronization source */ - guint32 csrc[1]; /* optional CSRC list */ - }; + guint16 seq; /* sequence number */ + guint32 timestamp; /* timestamp */ + guint32 ssrc; /* synchronization source */ + guint32 csrc[1]; /* optional CSRC list */ +}; - typedef struct Rtp_Packet_Struct *Rtp_Packet; +typedef struct Rtp_Packet_Struct *Rtp_Packet; - Rtp_Packet rtp_packet_new_take_data (gpointer data, guint data_len); - Rtp_Packet rtp_packet_new_copy_data (gpointer data, guint data_len); - Rtp_Packet rtp_packet_new_allocate (guint payload_len, - guint pad_len, guint csrc_count); - void rtp_packet_free (Rtp_Packet packet); +Rtp_Packet rtp_packet_new_take_data(gpointer data, guint data_len); +Rtp_Packet rtp_packet_new_copy_data(gpointer data, guint data_len); +Rtp_Packet rtp_packet_new_allocate(guint payload_len, + guint pad_len, guint csrc_count); +void rtp_packet_free(Rtp_Packet packet); //Rtp_Packet rtp_packet_read(int fd, struct sockaddr *fromaddr, socklen_t *fromlen); //void rtp_packet_send(Rtp_Packet packet, int fd, struct sockaddr *toaddr, socklen_t tolen); - guint8 rtp_packet_get_version (Rtp_Packet packet); - void rtp_packet_set_version (Rtp_Packet packet, guint8 version); - guint8 rtp_packet_get_padding (Rtp_Packet packet); - void rtp_packet_set_padding (Rtp_Packet packet, guint8 padding); - guint8 rtp_packet_get_csrc_count (Rtp_Packet packet); - guint8 rtp_packet_get_extension (Rtp_Packet packet); - void rtp_packet_set_extension (Rtp_Packet packet, guint8 extension); - void rtp_packet_set_csrc_count (Rtp_Packet packet, guint8 csrc_count); - guint8 rtp_packet_get_marker (Rtp_Packet packet); - void rtp_packet_set_marker (Rtp_Packet packet, guint8 marker); - guint8 rtp_packet_get_payload_type (Rtp_Packet packet); - void rtp_packet_set_payload_type (Rtp_Packet packet, guint8 payload_type); - guint16 rtp_packet_get_seq (Rtp_Packet packet); - void rtp_packet_set_seq (Rtp_Packet packet, guint16 seq); - guint32 rtp_packet_get_timestamp (Rtp_Packet packet); - void rtp_packet_set_timestamp (Rtp_Packet packet, guint32 timestamp); - guint32 rtp_packet_get_ssrc (Rtp_Packet packet); - void rtp_packet_set_ssrc (Rtp_Packet packet, guint32 ssrc); - guint rtp_packet_get_payload_len (Rtp_Packet packet); - gpointer rtp_packet_get_payload (Rtp_Packet packet); - guint rtp_packet_get_packet_len (Rtp_Packet packet); +guint8 rtp_packet_get_version(Rtp_Packet packet); +void rtp_packet_set_version(Rtp_Packet packet, guint8 version); +guint8 rtp_packet_get_padding(Rtp_Packet packet); +void rtp_packet_set_padding(Rtp_Packet packet, guint8 padding); +guint8 rtp_packet_get_csrc_count(Rtp_Packet packet); +guint8 rtp_packet_get_extension(Rtp_Packet packet); +void rtp_packet_set_extension(Rtp_Packet packet, guint8 extension); +void rtp_packet_set_csrc_count(Rtp_Packet packet, guint8 csrc_count); +guint8 rtp_packet_get_marker(Rtp_Packet packet); +void rtp_packet_set_marker(Rtp_Packet packet, guint8 marker); +guint8 rtp_packet_get_payload_type(Rtp_Packet packet); +void rtp_packet_set_payload_type(Rtp_Packet packet, guint8 payload_type); +guint16 rtp_packet_get_seq(Rtp_Packet packet); +void rtp_packet_set_seq(Rtp_Packet packet, guint16 seq); +guint32 rtp_packet_get_timestamp(Rtp_Packet packet); +void rtp_packet_set_timestamp(Rtp_Packet packet, guint32 timestamp); +guint32 rtp_packet_get_ssrc(Rtp_Packet packet); +void rtp_packet_set_ssrc(Rtp_Packet packet, guint32 ssrc); +guint rtp_packet_get_payload_len(Rtp_Packet packet); +gpointer rtp_packet_get_payload(Rtp_Packet packet); +guint rtp_packet_get_packet_len(Rtp_Packet packet); #ifdef __cplusplus } #endif -#endif /* rtp-packet.h */ +#endif /* rtp-packet.h */ |