+ bt_notification_init(¬ification->parent,
+ BT_NOTIFICATION_TYPE_PACKET_END,
+ (bt_object_release_func) bt_notification_packet_end_recycle,
+ graph);
+ goto end;
+
+error:
+ BT_OBJECT_PUT_REF_AND_RESET(notification);
+
+end:
+ return (void *) notification;
+}
+
+struct bt_notification *bt_notification_packet_end_create(
+ struct bt_private_connection_private_notification_iterator *notif_iter,
+ struct bt_packet *packet)
+{
+ struct bt_notification_packet_end *notification = NULL;
+ struct bt_stream *stream;
+ struct bt_stream_class *stream_class;
+ struct bt_graph *graph;
+
+ BT_ASSERT_PRE_NON_NULL(notif_iter, "Notification iterator");
+ BT_ASSERT_PRE_NON_NULL(packet, "Packet");
+ stream = bt_packet_borrow_stream(packet);
+ BT_ASSERT(stream);
+ stream_class = bt_stream_borrow_class(stream);
+ BT_ASSERT(stream_class);