mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
rtpj2kpay: set marker bit correctly
This commit is contained in:
parent
1e34187973
commit
5ec808cf7e
1 changed files with 40 additions and 0 deletions
|
@ -133,6 +133,9 @@ static void gst_rtp_j2k_pay_set_property (GObject * object, guint prop_id,
|
|||
static void gst_rtp_j2k_pay_get_property (GObject * object, guint prop_id,
|
||||
GValue * value, GParamSpec * pspec);
|
||||
|
||||
static GstStateChangeReturn
|
||||
gst_rtp_j2k_pay_change_state (GstElement * element, GstStateChange transition);
|
||||
|
||||
static gboolean gst_rtp_j2k_pay_setcaps (GstBaseRTPPayload * basepayload,
|
||||
GstCaps * caps);
|
||||
|
||||
|
@ -159,14 +162,18 @@ static void
|
|||
gst_rtp_j2k_pay_class_init (GstRtpJ2KPayClass * klass)
|
||||
{
|
||||
GObjectClass *gobject_class;
|
||||
GstElementClass *gstelement_class;
|
||||
GstBaseRTPPayloadClass *gstbasertppayload_class;
|
||||
|
||||
gobject_class = (GObjectClass *) klass;
|
||||
gstelement_class = (GstElementClass *) klass;
|
||||
gstbasertppayload_class = (GstBaseRTPPayloadClass *) klass;
|
||||
|
||||
gobject_class->set_property = gst_rtp_j2k_pay_set_property;
|
||||
gobject_class->get_property = gst_rtp_j2k_pay_get_property;
|
||||
|
||||
gstelement_class->change_state = gst_rtp_j2k_pay_change_state;
|
||||
|
||||
gstbasertppayload_class->set_caps = gst_rtp_j2k_pay_setcaps;
|
||||
gstbasertppayload_class->handle_buffer = gst_rtp_j2k_pay_handle_buffer;
|
||||
|
||||
|
@ -361,6 +368,8 @@ gst_rtp_j2k_pay_handle_buffer (GstBaseRTPPayload * basepayload,
|
|||
else
|
||||
j2k_header.MHF = 2;
|
||||
}
|
||||
if (end >= size)
|
||||
gst_rtp_buffer_set_marker (outbuf, TRUE);
|
||||
}
|
||||
|
||||
/* copy the header and push the packet */
|
||||
|
@ -422,6 +431,37 @@ gst_rtp_j2k_pay_get_property (GObject * object, guint prop_id,
|
|||
}
|
||||
}
|
||||
|
||||
static GstStateChangeReturn
|
||||
gst_rtp_j2k_pay_change_state (GstElement * element, GstStateChange transition)
|
||||
{
|
||||
GstRtpJ2KPay *rtpj2kpay;
|
||||
GstStateChangeReturn ret;
|
||||
|
||||
rtpj2kpay = GST_RTP_J2K_PAY (element);
|
||||
|
||||
switch (transition) {
|
||||
case GST_STATE_CHANGE_NULL_TO_READY:
|
||||
break;
|
||||
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
|
||||
|
||||
switch (transition) {
|
||||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||
break;
|
||||
case GST_STATE_CHANGE_READY_TO_NULL:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
gboolean
|
||||
gst_rtp_j2k_pay_plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue