}
struct bt_notification *bt_notification_stream_end_create(
- struct bt_stream *stream)
+ struct bt_graph *graph, struct bt_stream *stream)
{
struct bt_notification_stream_end *notification;
struct bt_stream_class *stream_class;
BT_ASSERT_PRE_NON_NULL(stream, "Stream");
- BT_ASSERT_PRE(stream->pos.fd < 0,
- "Stream is a CTF writer stream: %!+s", stream);
- stream_class = bt_stream_borrow_stream_class(stream);
+ stream_class = bt_stream_borrow_class(stream);
BT_ASSERT(stream_class);
BT_LOGD("Creating stream end notification object: "
"stream-addr=%p, stream-name=\"%s\", "
bt_notification_init(¬ification->parent,
BT_NOTIFICATION_TYPE_STREAM_END,
- bt_notification_stream_end_destroy);
+ bt_notification_stream_end_destroy, NULL);
notification->stream = bt_get(stream);
BT_LOGD("Created stream end notification object: "
"stream-addr=%p, stream-name=\"%s\", "
return NULL;
}
-struct bt_stream *bt_notification_stream_end_get_stream(
+struct bt_stream *bt_notification_stream_end_borrow_stream(
struct bt_notification *notification)
{
struct bt_notification_stream_end *stream_end;
BT_NOTIFICATION_TYPE_STREAM_END);
stream_end = container_of(notification,
struct bt_notification_stream_end, parent);
- return bt_get(stream_end->stream);
+ return stream_end->stream;
}
static
}
struct bt_notification *bt_notification_stream_begin_create(
- struct bt_stream *stream)
+ struct bt_graph *graph, struct bt_stream *stream)
{
struct bt_notification_stream_begin *notification;
struct bt_stream_class *stream_class;
BT_ASSERT_PRE_NON_NULL(stream, "Stream");
- BT_ASSERT_PRE(stream->pos.fd < 0,
- "Stream is a CTF writer stream: %!+s", stream);
- stream_class = bt_stream_borrow_stream_class(stream);
+ stream_class = bt_stream_borrow_class(stream);
BT_ASSERT(stream_class);
BT_LOGD("Creating stream beginning notification object: "
"stream-addr=%p, stream-name=\"%s\", "
bt_notification_init(¬ification->parent,
BT_NOTIFICATION_TYPE_STREAM_BEGIN,
- bt_notification_stream_begin_destroy);
+ bt_notification_stream_begin_destroy, NULL);
notification->stream = bt_get(stream);
BT_LOGD("Created stream beginning notification object: "
"stream-addr=%p, stream-name=\"%s\", "
return NULL;
}
-struct bt_stream *bt_notification_stream_begin_get_stream(
+struct bt_stream *bt_notification_stream_begin_borrow_stream(
struct bt_notification *notification)
{
struct bt_notification_stream_begin *stream_begin;
BT_NOTIFICATION_TYPE_STREAM_BEGIN);
stream_begin = container_of(notification,
struct bt_notification_stream_begin, parent);
- return bt_get(stream_begin->stream);
+ return stream_begin->stream;
}