3 * unit test for gstrtpbin
5 * Copyright (C) <2009> Wim Taymans <wim.taymans@gmail.com>
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
23 #include <gst/check/gstcheck.h>
25 GST_START_TEST (test_pads)
30 element = gst_element_factory_make ("rtpsession", NULL);
32 pad = gst_element_get_request_pad (element, "recv_rtcp_sink");
33 gst_object_unref (pad);
34 gst_object_unref (element);
39 GST_START_TEST (test_cleanup_send)
42 GstPad *rtp_sink, *rtp_src, *rtcp_src;
46 rtpbin = gst_element_factory_make ("rtpbin", "rtpbin");
49 /* request session 0 */
50 rtp_sink = gst_element_get_request_pad (rtpbin, "send_rtp_sink_0");
51 fail_unless (rtp_sink != NULL);
52 ASSERT_OBJECT_REFCOUNT (rtp_sink, "rtp_sink", 2);
54 /* this static pad should be created automatically now */
55 rtp_src = gst_element_get_static_pad (rtpbin, "send_rtp_src_0");
56 fail_unless (rtp_src != NULL);
57 ASSERT_OBJECT_REFCOUNT (rtp_src, "rtp_src", 2);
59 /* we should be able to get an internal session 0 now */
60 g_signal_emit_by_name (rtpbin, "get-internal-session", 0, &session);
61 fail_unless (session != NULL);
62 g_object_unref (session);
64 /* get the send RTCP pad too */
65 rtcp_src = gst_element_get_request_pad (rtpbin, "send_rtcp_src_0");
66 fail_unless (rtcp_src != NULL);
67 ASSERT_OBJECT_REFCOUNT (rtcp_src, "rtcp_src", 2);
69 gst_element_release_request_pad (rtpbin, rtp_sink);
70 /* we should only have our refs to the pads now */
71 ASSERT_OBJECT_REFCOUNT (rtp_sink, "rtp_sink", 1);
72 ASSERT_OBJECT_REFCOUNT (rtp_src, "rtp_src", 1);
73 ASSERT_OBJECT_REFCOUNT (rtcp_src, "rtp_src", 2);
75 /* the other pad should be gone now */
76 fail_unless (gst_element_get_static_pad (rtpbin, "send_rtp_src_0") == NULL);
78 /* internal session should still be there */
79 g_signal_emit_by_name (rtpbin, "get-internal-session", 0, &session);
80 fail_unless (session != NULL);
81 g_object_unref (session);
83 /* release the RTCP pad */
84 gst_element_release_request_pad (rtpbin, rtcp_src);
85 /* we should only have our refs to the pads now */
86 ASSERT_OBJECT_REFCOUNT (rtp_sink, "rtp_sink", 1);
87 ASSERT_OBJECT_REFCOUNT (rtp_src, "rtp_src", 1);
88 ASSERT_OBJECT_REFCOUNT (rtcp_src, "rtp_src", 1);
90 /* the session should be gone now */
91 g_signal_emit_by_name (rtpbin, "get-internal-session", 0, &session);
92 fail_unless (session == NULL);
94 /* unref the request pad and the static pad */
95 gst_object_unref (rtp_sink);
96 gst_object_unref (rtp_src);
97 gst_object_unref (rtcp_src);
100 gst_object_unref (rtpbin);
118 init_data (CleanupData * data)
121 data->pad_added = FALSE;
122 g_mutex_init (&data->lock);
123 g_cond_init (&data->cond);
129 clean_data (CleanupData * data)
131 g_list_foreach (data->pads, (GFunc) gst_object_unref, NULL);
132 g_list_free (data->pads);
133 g_mutex_clear (&data->lock);
134 g_cond_clear (&data->cond);
136 gst_caps_unref (data->caps);
139 static guint8 rtp_packet[] = { 0x80, 0x60, 0x94, 0xbc, 0x8f, 0x37, 0x4e, 0xb8,
140 0x44, 0xa8, 0xf3, 0x7c, 0x06, 0x6a, 0x0c, 0xce,
141 0x13, 0x25, 0x19, 0x69, 0x1f, 0x93, 0x25, 0x9d,
142 0x2b, 0x82, 0x31, 0x3b, 0x36, 0xc1, 0x3c, 0x13
146 chain_rtp_packet (GstPad * pad, CleanupData * data)
153 if (data->caps == NULL) {
154 data->caps = gst_caps_from_string ("application/x-rtp,"
155 "media=(string)audio, clock-rate=(int)44100, "
156 "encoding-name=(string)L16, encoding-params=(string)1, channels=(int)1");
160 gst_pad_send_event (pad, gst_event_new_stream_start (GST_OBJECT_NAME (pad)));
161 gst_pad_send_event (pad, gst_event_new_caps (data->caps));
162 gst_segment_init (&segment, GST_FORMAT_TIME);
163 gst_pad_send_event (pad, gst_event_new_segment (&segment));
165 buffer = gst_buffer_new_and_alloc (sizeof (rtp_packet));
166 gst_buffer_map (buffer, &map, GST_MAP_WRITE);
167 memcpy (map.data, rtp_packet, sizeof (rtp_packet));
169 map.data[2] = (data->seqnum >> 8) & 0xff;
170 map.data[3] = data->seqnum & 0xff;
173 gst_buffer_unmap (buffer, &map);
175 res = gst_pad_chain (pad, buffer);
181 dummy_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
183 gst_buffer_unref (buffer);
188 static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
191 GST_STATIC_CAPS ("application/x-rtp"));
195 make_sinkpad (CleanupData * data)
199 pad = gst_pad_new_from_static_template (&sink_factory, "sink");
201 gst_pad_set_chain_function (pad, dummy_chain);
202 gst_pad_set_active (pad, TRUE);
204 data->pads = g_list_prepend (data->pads, pad);
210 pad_added_cb (GstElement * rtpbin, GstPad * pad, CleanupData * data)
214 GST_DEBUG ("pad added %s:%s\n", GST_DEBUG_PAD_NAME (pad));
216 if (GST_PAD_IS_SINK (pad))
219 fail_unless (data->pad_added == FALSE);
221 sinkpad = make_sinkpad (data);
222 fail_unless (gst_pad_link (pad, sinkpad) == GST_PAD_LINK_OK);
224 g_mutex_lock (&data->lock);
225 data->pad_added = TRUE;
227 g_cond_signal (&data->cond);
228 g_mutex_unlock (&data->lock);
232 pad_removed_cb (GstElement * rtpbin, GstPad * pad, CleanupData * data)
234 GST_DEBUG ("pad removed %s:%s\n", GST_DEBUG_PAD_NAME (pad));
236 if (data->pad != pad)
239 fail_unless (data->pad_added == TRUE);
241 g_mutex_lock (&data->lock);
242 data->pad_added = FALSE;
243 g_cond_signal (&data->cond);
244 g_mutex_unlock (&data->lock);
247 GST_START_TEST (test_cleanup_recv)
252 GstStateChangeReturn ret;
258 rtpbin = gst_element_factory_make ("rtpbin", "rtpbin");
260 g_signal_connect (rtpbin, "pad-added", (GCallback) pad_added_cb, &data);
261 g_signal_connect (rtpbin, "pad-removed", (GCallback) pad_removed_cb, &data);
263 ret = gst_element_set_state (rtpbin, GST_STATE_PLAYING);
264 fail_unless (ret == GST_STATE_CHANGE_SUCCESS);
267 /* request session 0 */
268 rtp_sink = gst_element_get_request_pad (rtpbin, "recv_rtp_sink_0");
269 fail_unless (rtp_sink != NULL);
270 ASSERT_OBJECT_REFCOUNT (rtp_sink, "rtp_sink", 2);
272 /* no sourcepads are created yet */
273 fail_unless (rtpbin->numsinkpads == 1);
274 fail_unless (rtpbin->numsrcpads == 0);
276 res = chain_rtp_packet (rtp_sink, &data);
277 GST_DEBUG ("res %d, %s\n", res, gst_flow_get_name (res));
278 fail_unless (res == GST_FLOW_OK);
280 res = chain_rtp_packet (rtp_sink, &data);
281 GST_DEBUG ("res %d, %s\n", res, gst_flow_get_name (res));
282 fail_unless (res == GST_FLOW_OK);
284 /* we wait for the new pad to appear now */
285 g_mutex_lock (&data.lock);
286 while (!data.pad_added)
287 g_cond_wait (&data.cond, &data.lock);
288 g_mutex_unlock (&data.lock);
290 /* sourcepad created now */
291 fail_unless (rtpbin->numsinkpads == 1);
292 fail_unless (rtpbin->numsrcpads == 1);
294 /* remove the session */
295 gst_element_release_request_pad (rtpbin, rtp_sink);
296 gst_object_unref (rtp_sink);
298 /* pad should be gone now */
299 g_mutex_lock (&data.lock);
300 while (data.pad_added)
301 g_cond_wait (&data.cond, &data.lock);
302 g_mutex_unlock (&data.lock);
304 /* nothing left anymore now */
305 fail_unless (rtpbin->numsinkpads == 0);
306 fail_unless (rtpbin->numsrcpads == 0);
309 ret = gst_element_set_state (rtpbin, GST_STATE_NULL);
310 fail_unless (ret == GST_STATE_CHANGE_SUCCESS);
312 gst_object_unref (rtpbin);
319 GST_START_TEST (test_cleanup_recv2)
324 GstStateChangeReturn ret;
330 rtpbin = gst_element_factory_make ("rtpbin", "rtpbin");
332 g_signal_connect (rtpbin, "pad-added", (GCallback) pad_added_cb, &data);
333 g_signal_connect (rtpbin, "pad-removed", (GCallback) pad_removed_cb, &data);
335 ret = gst_element_set_state (rtpbin, GST_STATE_PLAYING);
336 fail_unless (ret == GST_STATE_CHANGE_SUCCESS);
338 /* request session 0 */
339 rtp_sink = gst_element_get_request_pad (rtpbin, "recv_rtp_sink_0");
340 fail_unless (rtp_sink != NULL);
341 ASSERT_OBJECT_REFCOUNT (rtp_sink, "rtp_sink", 2);
344 /* no sourcepads are created yet */
345 fail_unless (rtpbin->numsinkpads == 1);
346 fail_unless (rtpbin->numsrcpads == 0);
348 res = chain_rtp_packet (rtp_sink, &data);
349 GST_DEBUG ("res %d, %s\n", res, gst_flow_get_name (res));
350 fail_unless (res == GST_FLOW_OK);
352 res = chain_rtp_packet (rtp_sink, &data);
353 GST_DEBUG ("res %d, %s\n", res, gst_flow_get_name (res));
354 fail_unless (res == GST_FLOW_OK);
356 /* we wait for the new pad to appear now */
357 g_mutex_lock (&data.lock);
358 while (!data.pad_added)
359 g_cond_wait (&data.cond, &data.lock);
360 g_mutex_unlock (&data.lock);
362 /* sourcepad created now */
363 fail_unless (rtpbin->numsinkpads == 1);
364 fail_unless (rtpbin->numsrcpads == 1);
367 ret = gst_element_set_state (rtpbin, GST_STATE_NULL);
368 fail_unless (ret == GST_STATE_CHANGE_SUCCESS);
370 /* pad should be gone now */
371 g_mutex_lock (&data.lock);
372 while (data.pad_added)
373 g_cond_wait (&data.cond, &data.lock);
374 g_mutex_unlock (&data.lock);
376 /* back to playing for the next round */
377 ret = gst_element_set_state (rtpbin, GST_STATE_PLAYING);
378 fail_unless (ret == GST_STATE_CHANGE_SUCCESS);
381 /* remove the session */
382 gst_element_release_request_pad (rtpbin, rtp_sink);
383 gst_object_unref (rtp_sink);
385 /* nothing left anymore now */
386 fail_unless (rtpbin->numsinkpads == 0);
387 fail_unless (rtpbin->numsrcpads == 0);
389 ret = gst_element_set_state (rtpbin, GST_STATE_NULL);
390 fail_unless (ret == GST_STATE_CHANGE_SUCCESS);
392 gst_object_unref (rtpbin);
399 GST_START_TEST (test_request_pad_by_template_name)
402 GstPad *rtp_sink1, *rtp_sink2, *rtp_sink3;
404 rtpbin = gst_element_factory_make ("rtpbin", "rtpbin");
405 rtp_sink1 = gst_element_get_request_pad (rtpbin, "recv_rtp_sink_%u");
406 fail_unless (rtp_sink1 != NULL);
407 fail_unless_equals_string (GST_PAD_NAME (rtp_sink1), "recv_rtp_sink_0");
408 ASSERT_OBJECT_REFCOUNT (rtp_sink1, "rtp_sink1", 2);
410 rtp_sink2 = gst_element_get_request_pad (rtpbin, "recv_rtp_sink_%u");
411 fail_unless (rtp_sink2 != NULL);
412 fail_unless_equals_string (GST_PAD_NAME (rtp_sink2), "recv_rtp_sink_1");
413 ASSERT_OBJECT_REFCOUNT (rtp_sink2, "rtp_sink2", 2);
415 rtp_sink3 = gst_element_get_request_pad (rtpbin, "recv_rtp_sink_%u");
416 fail_unless (rtp_sink3 != NULL);
417 fail_unless_equals_string (GST_PAD_NAME (rtp_sink3), "recv_rtp_sink_2");
418 ASSERT_OBJECT_REFCOUNT (rtp_sink3, "rtp_sink3", 2);
421 gst_element_release_request_pad (rtpbin, rtp_sink2);
422 gst_element_release_request_pad (rtpbin, rtp_sink1);
423 gst_element_release_request_pad (rtpbin, rtp_sink3);
424 ASSERT_OBJECT_REFCOUNT (rtp_sink3, "rtp_sink3", 1);
425 ASSERT_OBJECT_REFCOUNT (rtp_sink2, "rtp_sink2", 1);
426 ASSERT_OBJECT_REFCOUNT (rtp_sink1, "rtp_sink", 1);
427 gst_object_unref (rtp_sink1);
428 gst_object_unref (rtp_sink2);
429 gst_object_unref (rtp_sink3);
431 gst_object_unref (rtpbin);
437 encoder_cb (GstElement * rtpbin, guint sessid, GstElement * bin)
439 GstPad *srcpad, *sinkpad;
441 fail_unless (sessid == 2);
443 GST_DEBUG ("making encoder");
444 sinkpad = gst_ghost_pad_new_no_target ("rtp_sink_2", GST_PAD_SINK);
445 srcpad = gst_ghost_pad_new_no_target ("rtp_src_2", GST_PAD_SRC);
447 gst_element_add_pad (bin, sinkpad);
448 gst_element_add_pad (bin, srcpad);
450 return gst_object_ref (bin);
454 encoder_cb2 (GstElement * rtpbin, guint sessid, GstElement * bin)
456 GstPad *srcpad, *sinkpad;
458 fail_unless (sessid == 3);
460 GST_DEBUG ("making encoder");
461 sinkpad = gst_ghost_pad_new_no_target ("rtp_sink_3", GST_PAD_SINK);
462 srcpad = gst_ghost_pad_new_no_target ("rtp_src_3", GST_PAD_SRC);
464 gst_element_add_pad (bin, sinkpad);
465 gst_element_add_pad (bin, srcpad);
467 return gst_object_ref (bin);
470 GST_START_TEST (test_encoder)
472 GstElement *rtpbin, *bin;
473 GstPad *rtp_sink1, *rtp_sink2;
476 bin = gst_bin_new ("rtpenc");
478 rtpbin = gst_element_factory_make ("rtpbin", "rtpbin");
480 id = g_signal_connect (rtpbin, "request-rtp-encoder", (GCallback) encoder_cb,
483 rtp_sink1 = gst_element_get_request_pad (rtpbin, "send_rtp_sink_2");
484 fail_unless (rtp_sink1 != NULL);
485 fail_unless_equals_string (GST_PAD_NAME (rtp_sink1), "send_rtp_sink_2");
486 ASSERT_OBJECT_REFCOUNT (rtp_sink1, "rtp_sink1", 2);
488 g_signal_handler_disconnect (rtpbin, id);
490 id = g_signal_connect (rtpbin, "request-rtp-encoder", (GCallback) encoder_cb2,
493 rtp_sink2 = gst_element_get_request_pad (rtpbin, "send_rtp_sink_3");
494 fail_unless (rtp_sink2 != NULL);
496 /* remove the session */
497 gst_element_release_request_pad (rtpbin, rtp_sink1);
498 gst_object_unref (rtp_sink1);
500 gst_element_release_request_pad (rtpbin, rtp_sink2);
501 gst_object_unref (rtp_sink2);
503 /* nothing left anymore now */
504 fail_unless (rtpbin->numsinkpads == 0);
505 fail_unless (rtpbin->numsrcpads == 0);
507 gst_object_unref (rtpbin);
508 gst_object_unref (bin);
514 decoder_cb (GstElement * rtpbin, guint sessid, gpointer user_data)
517 GstPad *srcpad, *sinkpad;
519 bin = gst_bin_new (NULL);
521 GST_DEBUG ("making decoder");
522 sinkpad = gst_ghost_pad_new_no_target ("rtp_sink", GST_PAD_SINK);
523 srcpad = gst_ghost_pad_new_no_target ("rtp_src", GST_PAD_SRC);
525 gst_element_add_pad (bin, sinkpad);
526 gst_element_add_pad (bin, srcpad);
531 GST_START_TEST (test_decoder)
534 GstPad *rtp_sink1, *rtp_sink2;
538 rtpbin = gst_element_factory_make ("rtpbin", "rtpbin");
540 id = g_signal_connect (rtpbin, "request-rtp-decoder", (GCallback) decoder_cb,
543 rtp_sink1 = gst_element_get_request_pad (rtpbin, "recv_rtp_sink_2");
544 fail_unless (rtp_sink1 != NULL);
545 fail_unless_equals_string (GST_PAD_NAME (rtp_sink1), "recv_rtp_sink_2");
546 ASSERT_OBJECT_REFCOUNT (rtp_sink1, "rtp_sink1", 2);
548 rtp_sink2 = gst_element_get_request_pad (rtpbin, "recv_rtp_sink_3");
549 fail_unless (rtp_sink2 != NULL);
551 g_signal_handler_disconnect (rtpbin, id);
553 /* remove the session */
554 gst_element_release_request_pad (rtpbin, rtp_sink1);
555 gst_object_unref (rtp_sink1);
557 gst_element_release_request_pad (rtpbin, rtp_sink2);
558 gst_object_unref (rtp_sink2);
560 /* nothing left anymore now */
561 fail_unless (rtpbin->numsinkpads == 0);
562 fail_unless (rtpbin->numsrcpads == 0);
564 gst_object_unref (rtpbin);
570 aux_sender_cb (GstElement * rtpbin, guint sessid, gpointer user_data)
573 GstPad *srcpad, *sinkpad;
575 bin = gst_bin_new (NULL);
577 GST_DEBUG ("making AUX sender");
578 sinkpad = gst_ghost_pad_new_no_target ("sink_2", GST_PAD_SINK);
579 gst_element_add_pad (bin, sinkpad);
581 srcpad = gst_ghost_pad_new_no_target ("src_2", GST_PAD_SRC);
582 gst_element_add_pad (bin, srcpad);
583 srcpad = gst_ghost_pad_new_no_target ("src_1", GST_PAD_SRC);
584 gst_element_add_pad (bin, srcpad);
585 srcpad = gst_ghost_pad_new_no_target ("src_3", GST_PAD_SRC);
586 gst_element_add_pad (bin, srcpad);
591 GST_START_TEST (test_aux_sender)
594 GstPad *rtp_sink1, *rtp_src, *rtcp_src;
597 rtpbin = gst_element_factory_make ("rtpbin", "rtpbin");
599 id = g_signal_connect (rtpbin, "request-aux-sender",
600 (GCallback) aux_sender_cb, NULL);
602 rtp_sink1 = gst_element_get_request_pad (rtpbin, "send_rtp_sink_2");
603 fail_unless (rtp_sink1 != NULL);
604 fail_unless_equals_string (GST_PAD_NAME (rtp_sink1), "send_rtp_sink_2");
605 ASSERT_OBJECT_REFCOUNT (rtp_sink1, "rtp_sink1", 2);
607 g_signal_handler_disconnect (rtpbin, id);
609 rtp_src = gst_element_get_static_pad (rtpbin, "send_rtp_src_2");
610 fail_unless (rtp_src != NULL);
611 gst_object_unref (rtp_src);
613 rtp_src = gst_element_get_static_pad (rtpbin, "send_rtp_src_1");
614 fail_unless (rtp_src != NULL);
615 gst_object_unref (rtp_src);
617 rtcp_src = gst_element_get_request_pad (rtpbin, "send_rtcp_src_1");
618 fail_unless (rtcp_src != NULL);
619 gst_element_release_request_pad (rtpbin, rtcp_src);
620 gst_object_unref (rtcp_src);
622 rtp_src = gst_element_get_static_pad (rtpbin, "send_rtp_src_3");
623 fail_unless (rtp_src != NULL);
624 gst_object_unref (rtp_src);
626 /* remove the session */
627 gst_element_release_request_pad (rtpbin, rtp_sink1);
628 gst_object_unref (rtp_sink1);
630 gst_object_unref (rtpbin);
636 aux_receiver_cb (GstElement * rtpbin, guint sessid, gpointer user_data)
639 GstPad *srcpad, *sinkpad;
641 bin = gst_bin_new (NULL);
643 GST_DEBUG ("making AUX receiver");
644 srcpad = gst_ghost_pad_new_no_target ("src_2", GST_PAD_SRC);
645 gst_element_add_pad (bin, srcpad);
647 sinkpad = gst_ghost_pad_new_no_target ("sink_2", GST_PAD_SINK);
648 gst_element_add_pad (bin, sinkpad);
649 sinkpad = gst_ghost_pad_new_no_target ("sink_1", GST_PAD_SINK);
650 gst_element_add_pad (bin, sinkpad);
651 sinkpad = gst_ghost_pad_new_no_target ("sink_3", GST_PAD_SINK);
652 gst_element_add_pad (bin, sinkpad);
657 GST_START_TEST (test_aux_receiver)
660 GstPad *rtp_sink1, *rtp_sink2, *rtcp_sink;
663 rtpbin = gst_element_factory_make ("rtpbin", "rtpbin");
665 id = g_signal_connect (rtpbin, "request-aux-receiver",
666 (GCallback) aux_receiver_cb, NULL);
668 rtp_sink1 = gst_element_get_request_pad (rtpbin, "recv_rtp_sink_2");
669 fail_unless (rtp_sink1 != NULL);
671 rtp_sink2 = gst_element_get_request_pad (rtpbin, "recv_rtp_sink_1");
672 fail_unless (rtp_sink2 != NULL);
674 g_signal_handler_disconnect (rtpbin, id);
676 rtcp_sink = gst_element_get_request_pad (rtpbin, "recv_rtcp_sink_1");
677 fail_unless (rtcp_sink != NULL);
678 gst_element_release_request_pad (rtpbin, rtcp_sink);
679 gst_object_unref (rtcp_sink);
681 /* remove the session */
682 gst_element_release_request_pad (rtpbin, rtp_sink1);
683 gst_object_unref (rtp_sink1);
684 gst_element_release_request_pad (rtpbin, rtp_sink2);
685 gst_object_unref (rtp_sink2);
687 gst_object_unref (rtpbin);
695 Suite *s = suite_create ("rtpbin");
696 TCase *tc_chain = tcase_create ("general");
698 suite_add_tcase (s, tc_chain);
699 tcase_add_test (tc_chain, test_pads);
700 tcase_add_test (tc_chain, test_cleanup_send);
701 tcase_add_test (tc_chain, test_cleanup_recv);
702 tcase_add_test (tc_chain, test_cleanup_recv2);
703 tcase_add_test (tc_chain, test_request_pad_by_template_name);
704 tcase_add_test (tc_chain, test_encoder);
705 tcase_add_test (tc_chain, test_decoder);
706 tcase_add_test (tc_chain, test_aux_sender);
707 tcase_add_test (tc_chain, test_aux_receiver);
712 GST_CHECK_MAIN (rtpbin);