GST_PAD_ALWAYS,
GST_STATIC_CAPS ("video/x-h264, "
"stream-format = (string) avc, alignment = (string) au; "
- /** optional parameters **/
- /* "width = (int) [ 1, MAX ], " */
- /* "height = (int) [ 1, MAX ], " */
"video/x-h264, "
"stream-format = (string) byte-stream, alignment = (string) { nal, au }")
- /** optional parameters **/
- /* "width = (int) [ 1, MAX ], " */
- /* "height = (int) [ 1, MAX ], " */
);
static GstStaticPadTemplate gst_rtp_h264_depay_sink_template =
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("application/x-rtp, "
"media = (string) \"video\", "
- "clock-rate = (int) 90000, "
- "encoding-name = (string) \"H264\"")
+ "clock-rate = (int) 90000, " "encoding-name = (string) \"H264\"")
/** optional parameters **/
/* "profile-level-id = (string) ANY, " */
/* "max-mbps = (string) ANY, " */
/* "deint-buf-cap = (string) ANY, " */
/* "sprop-init-buf-time = (string) ANY, " */
/* "sprop-max-don-diff = (string) ANY, " */
- /* "max-rcmd-nalu-size = (string) ANY, " */
- /* "width = (int) [ 1, MAX ], " */
- /* "height = (int) [ 1, MAX ], " */
+ /* "max-rcmd-nalu-size = (string) ANY " */
);
#define gst_rtp_h264_depay_parent_class parent_class
rtph264depay->last_ts = 0;
rtph264depay->current_fu_type = 0;
rtph264depay->new_codec_data = FALSE;
- rtph264depay->width = 0;
- rtph264depay->height = 0;
g_ptr_array_set_size (rtph264depay->sps, 0);
g_ptr_array_set_size (rtph264depay->pps, 0);
}
rtph264depay->byte_stream ? "byte-stream" : "avc",
"alignment", G_TYPE_STRING, rtph264depay->merge ? "au" : "nal", NULL);
- if (rtph264depay->width > 0 && rtph264depay->height > 0) {
- gst_caps_set_simple (srccaps, "width", G_TYPE_INT, rtph264depay->width,
- "height", G_TYPE_INT, rtph264depay->height, NULL);
- }
-
if (!rtph264depay->byte_stream) {
GstBuffer *codec_data;
GstMapInfo map;
GstBuffer *codec_data;
GstMapInfo map;
guint8 *ptr;
- gint width = 0, height = 0;
rtph264depay = GST_RTP_H264_DEPAY (depayload);
goto incomplete_caps;
}
- if (gst_structure_get_int (structure, "width", &width) && width <= 0) {
- goto invalid_dimension;
- }
- if (gst_structure_get_int (structure, "height", &height) && height <= 0) {
- goto invalid_dimension;
- }
-
- rtph264depay->width = width;
- rtph264depay->height = height;
-
return gst_rtp_h264_set_src_caps (rtph264depay);
/* ERRORS */
" doing setcaps later");
return TRUE;
}
-invalid_dimension:
- {
- GST_ERROR_OBJECT (depayload, "invalid width/height from caps");
- return FALSE;
- }
}
static GstBuffer *
GPtrArray *sps;
GPtrArray *pps;
gboolean new_codec_data;
- gint width;
- gint height;
};
struct _GstRtpH264DepayClass
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("video/x-h264, "
- "stream-format = (string) avc, alignment = (string) au, "
- "width = (int) [ 1, MAX ], height = (int) [ 1, MAX ]; "
+ "stream-format = (string) avc, alignment = (string) au;"
"video/x-h264, "
- "stream-format = (string) byte-stream, alignment = (string) { nal, au }, "
- "width = (int) [ 1, MAX ], height = (int) [ 1, MAX ]")
+ "stream-format = (string) byte-stream, alignment = (string) { nal, au }")
);
static GstStaticPadTemplate gst_rtp_h264_pay_src_template =
GST_STATIC_CAPS ("application/x-rtp, "
"media = (string) \"video\", "
"payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", "
- "clock-rate = (int) 90000, "
- "encoding-name = (string) \"H264\", "
- "width = (int) [ 1, MAX ], height = (int) [ 1, MAX ]")
+ "clock-rate = (int) 90000, " "encoding-name = (string) \"H264\"")
);
#define DEFAULT_SPROP_PARAMETER_SETS NULL
const gchar *alignment, *stream_format;
gchar *sprops;
gboolean caps_set;
- gint width, height;
rtph264pay = GST_RTP_H264_PAY (basepayload);
rtph264pay->stream_format = GST_H264_STREAM_FORMAT_BYTESTREAM;
}
- if (!gst_structure_get_int (str, "height", &height) || height <= 0) {
- goto invalid_dimension;
- }
- if (!gst_structure_get_int (str, "width", &width) || width <= 0) {
- goto invalid_dimension;
- }
-
/* packetized AVC video has a codec_data */
if ((value = gst_structure_get_value (str, "codec_data"))) {
guint num_sps, num_pps;
}
if (sprops != NULL) {
- caps_set = gst_rtp_base_payload_set_outcaps (basepayload, "width",
- G_TYPE_INT, width, "height", G_TYPE_INT, height,
+ caps_set = gst_rtp_base_payload_set_outcaps (basepayload,
"sprop-parameter-sets", G_TYPE_STRING, sprops, NULL);
} else {
- caps_set = gst_rtp_base_payload_set_outcaps (basepayload, "width",
- G_TYPE_INT, width, "height", G_TYPE_INT, height, NULL);
+ caps_set = gst_rtp_base_payload_set_outcaps (basepayload, NULL);
}
if (sprops != NULL) {
GST_ERROR_OBJECT (rtph264pay, "failed to set caps");
return FALSE;
}
-invalid_dimension:
- {
- GST_ERROR_OBJECT (rtph264pay, "invalid width/height from caps");
- return FALSE;
- }
error:
{
gst_buffer_unmap (buffer, &map);
/* FIXME 0.11: fully specify h264 caps (and make payloader check) */
rtp_pipeline_test (rtp_h264_frame_data, rtp_h264_frame_data_size,
rtp_h264_frame_count,
- "video/x-h264,stream-format=(string)byte-stream,alignment=(string)nal,"
- "width=(int)320,height=(int)240", "rtph264pay", "rtph264depay", 0, 0,
- FALSE);
+ "video/x-h264,stream-format=(string)byte-stream,alignment=(string)nal",
+ "rtph264pay", "rtph264depay", 0, 0, FALSE);
}
GST_END_TEST;
/* FIXME 0.11: fully specify h264 caps (and make payloader check) */
rtp_pipeline_test (rtp_h264_list_lt_mtu_frame_data,
rtp_h264_list_lt_mtu_frame_data_size, rtp_h264_list_lt_mtu_frame_count,
- "video/x-h264,stream-format=(string)byte-stream,alignment=(string)nal,"
- "width=(int)320,height=(int)240", "rtph264pay", "rtph264depay",
+ "video/x-h264,stream-format=(string)byte-stream,alignment=(string)nal",
+ "rtph264pay", "rtph264depay",
rtp_h264_list_lt_mtu_bytes_sent, rtp_h264_list_lt_mtu_mtu_size, TRUE);
}
rtp_pipeline_test (rtp_h264_list_lt_mtu_frame_data_avc,
rtp_h264_list_lt_mtu_frame_data_size, rtp_h264_list_lt_mtu_frame_count,
"video/x-h264,stream-format=(string)avc,alignment=(string)au,"
- "codec_data=(buffer)01640014ffe1001867640014acd94141fb0110000003001773594000f142996001000568ebecb22c,"
- "width=(int)320,height=(int)240,framerate=(fraction)30/1", "rtph264pay",
- "rtph264depay", rtp_h264_list_lt_mtu_bytes_sent_avc,
- rtp_h264_list_lt_mtu_mtu_size, TRUE);
+ "codec_data=(buffer)01640014ffe1001867640014acd94141fb0110000003001773594000f142996001000568ebecb22c",
+ "rtph264pay", "rtph264depay",
+ rtp_h264_list_lt_mtu_bytes_sent_avc, rtp_h264_list_lt_mtu_mtu_size, TRUE);
}
GST_END_TEST;
/* FIXME 0.11: fully specify h264 caps (and make payloader check) */
rtp_pipeline_test (rtp_h264_list_gt_mtu_frame_data,
rtp_h264_list_gt_mtu_frame_data_size, rtp_h264_list_gt_mtu_frame_count,
- "video/x-h264,stream-format=(string)byte-stream,alignment=(string)nal,"
- "width=(int)320,height=(int)240", "rtph264pay", "rtph264depay",
+ "video/x-h264,stream-format=(string)byte-stream,alignment=(string)nal",
+ "rtph264pay", "rtph264depay",
rtp_h264_list_gt_mtu_bytes_sent, rtp_h264_list_gt_mtu_mty_size, TRUE);
}
rtp_pipeline_test (rtp_h264_list_gt_mtu_frame_data_avc,
rtp_h264_list_gt_mtu_frame_data_size, rtp_h264_list_gt_mtu_frame_count,
"video/x-h264,stream-format=(string)avc,alignment=(string)au,"
- "codec_data=(buffer)01640014ffe1001867640014acd94141fb0110000003001773594000f142996001000568ebecb22c,"
- "width=(int)320,height=(int)240,framerate=(fraction)30/1" , "rtph264pay",
- "rtph264depay", rtp_h264_list_gt_mtu_bytes_sent_avc,
- rtp_h264_list_gt_mtu_mty_size, TRUE);
+ "codec_data=(buffer)01640014ffe1001867640014acd94141fb0110000003001773594000f142996001000568ebecb22c",
+ "rtph264pay", "rtph264depay",
+ rtp_h264_list_gt_mtu_bytes_sent_avc, rtp_h264_list_gt_mtu_mty_size, TRUE);
}
GST_END_TEST;