Commit 85bf98fe authored by Mark Nauwelaerts's avatar Mark Nauwelaerts
Browse files

tests: rtp: misc compatibiliy fixes

... such as always setting pad caps and providing needed caps fields.
parent 9c178785
...@@ -177,7 +177,8 @@ rtp_pipeline_create (const guint8 * frame_data, int frame_data_size, ...@@ -177,7 +177,8 @@ rtp_pipeline_create (const guint8 * frame_data, int frame_data_size,
/* Set src properties. */ /* Set src properties. */
caps = gst_caps_from_string (filtercaps); caps = gst_caps_from_string (filtercaps);
g_object_set (p->appsrc, "do-timestamp", TRUE, "caps", caps, NULL); g_object_set (p->appsrc, "do-timestamp", TRUE, "caps", caps,
"format", GST_FORMAT_TIME, NULL);
gst_caps_unref (caps); gst_caps_unref (caps);
/* Add elements to the pipeline. */ /* Add elements to the pipeline. */
...@@ -443,8 +444,8 @@ static int rtp_mpa_frame_count = 1; ...@@ -443,8 +444,8 @@ static int rtp_mpa_frame_count = 1;
GST_START_TEST (rtp_mpa) GST_START_TEST (rtp_mpa)
{ {
rtp_pipeline_test (rtp_mpa_frame_data, rtp_mpa_frame_data_size, rtp_pipeline_test (rtp_mpa_frame_data, rtp_mpa_frame_data_size,
rtp_mpa_frame_count, "audio/mpeg", "rtpmpapay", "rtpmpadepay", 0, 0, rtp_mpa_frame_count, "audio/mpeg,mpegversion=1", "rtpmpapay",
FALSE); "rtpmpadepay", 0, 0, FALSE);
} }
GST_END_TEST; GST_END_TEST;
...@@ -495,8 +496,9 @@ GST_START_TEST (rtp_h264) ...@@ -495,8 +496,9 @@ GST_START_TEST (rtp_h264)
{ {
/* FIXME 0.11: fully specify h264 caps (and make payloader check) */ /* FIXME 0.11: fully specify h264 caps (and make payloader check) */
rtp_pipeline_test (rtp_h264_frame_data, rtp_h264_frame_data_size, rtp_pipeline_test (rtp_h264_frame_data, rtp_h264_frame_data_size,
rtp_h264_frame_count, "video/x-h264", "rtph264pay", "rtph264depay", rtp_h264_frame_count,
0, 0, FALSE); "video/x-h264,stream-format=(string)byte-stream,alignment=(string)nal",
"rtph264pay", "rtph264depay", 0, 0, FALSE);
} }
GST_END_TEST; GST_END_TEST;
...@@ -521,7 +523,8 @@ GST_START_TEST (rtp_h264_list_lt_mtu) ...@@ -521,7 +523,8 @@ GST_START_TEST (rtp_h264_list_lt_mtu)
/* FIXME 0.11: fully specify h264 caps (and make payloader check) */ /* FIXME 0.11: fully specify h264 caps (and make payloader check) */
rtp_pipeline_test (rtp_h264_list_lt_mtu_frame_data, 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, rtp_h264_list_lt_mtu_frame_data_size, rtp_h264_list_lt_mtu_frame_count,
"video/x-h264", "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_h264_list_lt_mtu_bytes_sent, rtp_h264_list_lt_mtu_mtu_size, TRUE);
} }
...@@ -550,7 +553,8 @@ GST_START_TEST (rtp_h264_list_gt_mtu) ...@@ -550,7 +553,8 @@ GST_START_TEST (rtp_h264_list_gt_mtu)
/* FIXME 0.11: fully specify h264 caps (and make payloader check) */ /* FIXME 0.11: fully specify h264 caps (and make payloader check) */
rtp_pipeline_test (rtp_h264_list_gt_mtu_frame_data, 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, rtp_h264_list_gt_mtu_frame_data_size, rtp_h264_list_gt_mtu_frame_count,
"video/x-h264", "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_h264_list_gt_mtu_bytes_sent, rtp_h264_list_gt_mtu_mty_size, TRUE);
} }
...@@ -568,7 +572,7 @@ GST_START_TEST (rtp_L16) ...@@ -568,7 +572,7 @@ GST_START_TEST (rtp_L16)
{ {
rtp_pipeline_test (rtp_L16_frame_data, rtp_L16_frame_data_size, rtp_pipeline_test (rtp_L16_frame_data, rtp_L16_frame_data_size,
rtp_L16_frame_count, rtp_L16_frame_count,
"audio/x-raw,format=S16_BE,rate=1,channels=1", "audio/x-raw,format=S16BE,rate=1,channels=1,layout=(string)interleaved",
"rtpL16pay", "rtpL16depay", 0, 0, FALSE); "rtpL16pay", "rtpL16depay", 0, 0, FALSE);
} }
...@@ -747,7 +751,7 @@ static int rtp_g729_frame_count = 1; ...@@ -747,7 +751,7 @@ static int rtp_g729_frame_count = 1;
GST_START_TEST (rtp_g729) GST_START_TEST (rtp_g729)
{ {
rtp_pipeline_test (rtp_g729_frame_data, rtp_g729_frame_data_size, rtp_pipeline_test (rtp_g729_frame_data, rtp_g729_frame_data_size,
rtp_g729_frame_count, "audio/G729", "rtpg729pay", rtp_g729_frame_count, "audio/G729,rate=8000,channels=1", "rtpg729pay",
"rtpg729depay", 0, 0, FALSE); "rtpg729depay", 0, 0, FALSE);
} }
......
...@@ -137,9 +137,10 @@ chain_rtp_packet (GstPad * pad, CleanupData * data) ...@@ -137,9 +137,10 @@ chain_rtp_packet (GstPad * pad, CleanupData * data)
"media=(string)audio, clock-rate=(int)44100, " "media=(string)audio, clock-rate=(int)44100, "
"encoding-name=(string)L16, encoding-params=(string)1, channels=(int)1"); "encoding-name=(string)L16, encoding-params=(string)1, channels=(int)1");
data->seqnum = 0; data->seqnum = 0;
gst_pad_set_caps (pad, caps);
} }
gst_pad_set_caps (pad, caps);
buffer = gst_buffer_new_and_alloc (sizeof (rtp_packet)); buffer = gst_buffer_new_and_alloc (sizeof (rtp_packet));
gst_buffer_map (buffer, &map, GST_MAP_WRITE); gst_buffer_map (buffer, &map, GST_MAP_WRITE);
memcpy (map.data, rtp_packet, sizeof (rtp_packet)); memcpy (map.data, rtp_packet, sizeof (rtp_packet));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment