2 * SPDX-License-Identifier: MIT
4 * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
5 * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 #define BT_LOG_TAG "LIB/STREAM-CLASS"
9 #include "lib/logging.h"
11 #include "lib/assert-cond.h"
12 #include <babeltrace2/trace-ir/trace.h>
13 #include "compat/compiler.h"
14 #include "compat/endian.h"
15 #include "common/assert.h"
20 #include "clock-class.h"
21 #include "event-class.h"
22 #include "field-class.h"
23 #include "field-wrapper.h"
24 #include "resolve-field-path.h"
25 #include "stream-class.h"
26 #include "lib/value.h"
27 #include "lib/func-status.h"
28 #include "trace-class.h"
30 #define BT_ASSERT_PRE_DEV_STREAM_CLASS_HOT(_sc) \
31 BT_ASSERT_PRE_DEV_HOT("stream-class", (_sc), "Stream class", \
35 void destroy_stream_class(struct bt_object
*obj
)
37 struct bt_stream_class
*stream_class
= (void *) obj
;
39 BT_LIB_LOGD("Destroying stream class: %!+S", stream_class
);
40 BT_LOGD_STR("Putting default clock class.");
41 BT_OBJECT_PUT_REF_AND_RESET(stream_class
->user_attributes
);
42 BT_OBJECT_PUT_REF_AND_RESET(stream_class
->default_clock_class
);
44 if (stream_class
->event_classes
) {
45 BT_LOGD_STR("Destroying event classes.");
46 g_ptr_array_free(stream_class
->event_classes
, TRUE
);
47 stream_class
->event_classes
= NULL
;
50 g_free(stream_class
->name
);
51 BT_LOGD_STR("Putting packet context field class.");
52 BT_OBJECT_PUT_REF_AND_RESET(stream_class
->packet_context_fc
);
53 BT_LOGD_STR("Putting event common context field class.");
54 BT_OBJECT_PUT_REF_AND_RESET(stream_class
->event_common_context_fc
);
55 bt_object_pool_finalize(&stream_class
->packet_context_field_pool
);
60 void free_field_wrapper(struct bt_field_wrapper
*field_wrapper
,
61 struct bt_stream_class
*stream_class
__attribute__((unused
)))
63 bt_field_wrapper_destroy((void *) field_wrapper
);
67 bool stream_class_id_is_unique(const struct bt_trace_class
*tc
, uint64_t id
)
70 bool is_unique
= true;
72 for (i
= 0; i
< tc
->stream_classes
->len
; i
++) {
73 const struct bt_stream_class
*sc
=
74 tc
->stream_classes
->pdata
[i
];
87 struct bt_stream_class
*create_stream_class_with_id(
88 struct bt_trace_class
*tc
, uint64_t id
)
90 struct bt_stream_class
*stream_class
= NULL
;
94 BT_ASSERT_PRE("stream-class-id-is-unique",
95 stream_class_id_is_unique(tc
, id
),
96 "Duplicate stream class ID: %![tc-]+T, id=%" PRIu64
, tc
, id
);
97 BT_LIB_LOGD("Creating stream class object: %![tc-]+T, id=%" PRIu64
,
99 stream_class
= g_new0(struct bt_stream_class
, 1);
101 BT_LIB_LOGE_APPEND_CAUSE(
102 "Failed to allocate one stream class.");
106 bt_object_init_shared_with_parent(&stream_class
->base
,
107 destroy_stream_class
);
108 stream_class
->user_attributes
= bt_value_map_create();
109 if (!stream_class
->user_attributes
) {
110 BT_LIB_LOGE_APPEND_CAUSE(
111 "Failed to create a map value object.");
115 stream_class
->id
= id
;
116 stream_class
->assigns_automatic_event_class_id
= true;
117 stream_class
->assigns_automatic_stream_id
= true;
118 stream_class
->event_classes
= g_ptr_array_new_with_free_func(
119 (GDestroyNotify
) bt_object_try_spec_release
);
120 if (!stream_class
->event_classes
) {
121 BT_LIB_LOGE_APPEND_CAUSE("Failed to allocate a GPtrArray.");
125 ret
= bt_object_pool_initialize(&stream_class
->packet_context_field_pool
,
126 (bt_object_pool_new_object_func
) bt_field_wrapper_new
,
127 (bt_object_pool_destroy_object_func
) free_field_wrapper
,
130 BT_LIB_LOGE_APPEND_CAUSE(
131 "Failed to initialize packet context field pool: ret=%d",
136 bt_object_set_parent(&stream_class
->base
, &tc
->base
);
137 g_ptr_array_add(tc
->stream_classes
, stream_class
);
138 bt_trace_class_freeze(tc
);
139 BT_LIB_LOGD("Created stream class object: %!+S", stream_class
);
143 BT_OBJECT_PUT_REF_AND_RESET(stream_class
);
150 struct bt_stream_class
*bt_stream_class_create(struct bt_trace_class
*tc
)
152 BT_ASSERT_PRE_NO_ERROR();
153 BT_ASSERT_PRE_TC_NON_NULL(tc
);
154 BT_ASSERT_PRE("trace-class-automatically-assigns-stream-class-ids",
155 tc
->assigns_automatic_stream_class_id
,
156 "Trace class does not automatically assigns stream class IDs: "
158 return create_stream_class_with_id(tc
,
159 (uint64_t) tc
->stream_classes
->len
);
163 struct bt_stream_class
*bt_stream_class_create_with_id(
164 struct bt_trace_class
*tc
, uint64_t id
)
166 BT_ASSERT_PRE_NO_ERROR();
167 BT_ASSERT_PRE_TC_NON_NULL(tc
);
169 "trace-class-does-not-automatically-assigns-stream-class-ids",
170 !tc
->assigns_automatic_stream_class_id
,
171 "Trace class automatically assigns stream class IDs: "
173 return create_stream_class_with_id(tc
, id
);
177 struct bt_trace_class
*bt_stream_class_borrow_trace_class(
178 struct bt_stream_class
*stream_class
)
180 BT_ASSERT_PRE_DEV_SC_NON_NULL(stream_class
);
181 return bt_stream_class_borrow_trace_class_inline(stream_class
);
185 const struct bt_trace_class
*bt_stream_class_borrow_trace_class_const(
186 const struct bt_stream_class
*stream_class
)
188 return bt_stream_class_borrow_trace_class((void *) stream_class
);
192 const char *bt_stream_class_get_name(const struct bt_stream_class
*stream_class
)
194 BT_ASSERT_PRE_DEV_SC_NON_NULL(stream_class
);
195 return stream_class
->name
;
199 enum bt_stream_class_set_name_status
bt_stream_class_set_name(
200 struct bt_stream_class
*stream_class
,
203 BT_ASSERT_PRE_NO_ERROR();
204 BT_ASSERT_PRE_SC_NON_NULL(stream_class
);
205 BT_ASSERT_PRE_NAME_NON_NULL(name
);
206 BT_ASSERT_PRE_DEV_STREAM_CLASS_HOT(stream_class
);
207 g_free(stream_class
->name
);
208 stream_class
->name
= g_strdup(name
);
209 BT_LIB_LOGD("Set stream class's name: %!+S", stream_class
);
210 return BT_FUNC_STATUS_OK
;
214 uint64_t bt_stream_class_get_id(const struct bt_stream_class
*stream_class
)
216 BT_ASSERT_PRE_DEV_SC_NON_NULL(stream_class
);
217 return stream_class
->id
;
221 uint64_t bt_stream_class_get_event_class_count(
222 const struct bt_stream_class
*stream_class
)
224 BT_ASSERT_PRE_DEV_SC_NON_NULL(stream_class
);
225 return (uint64_t) stream_class
->event_classes
->len
;
229 struct bt_event_class
*bt_stream_class_borrow_event_class_by_index(
230 struct bt_stream_class
*stream_class
, uint64_t index
)
232 BT_ASSERT_PRE_DEV_SC_NON_NULL(stream_class
);
233 BT_ASSERT_PRE_DEV_VALID_INDEX(index
, stream_class
->event_classes
->len
);
234 return g_ptr_array_index(stream_class
->event_classes
, index
);
238 const struct bt_event_class
*
239 bt_stream_class_borrow_event_class_by_index_const(
240 const struct bt_stream_class
*stream_class
, uint64_t index
)
242 return bt_stream_class_borrow_event_class_by_index(
243 (void *) stream_class
, index
);
247 struct bt_event_class
*bt_stream_class_borrow_event_class_by_id(
248 struct bt_stream_class
*stream_class
, uint64_t id
)
250 struct bt_event_class
*event_class
= NULL
;
253 BT_ASSERT_PRE_DEV_SC_NON_NULL(stream_class
);
255 for (i
= 0; i
< stream_class
->event_classes
->len
; i
++) {
256 struct bt_event_class
*event_class_candidate
=
257 g_ptr_array_index(stream_class
->event_classes
, i
);
259 if (event_class_candidate
->id
== id
) {
260 event_class
= event_class_candidate
;
270 const struct bt_event_class
*
271 bt_stream_class_borrow_event_class_by_id_const(
272 const struct bt_stream_class
*stream_class
, uint64_t id
)
274 return bt_stream_class_borrow_event_class_by_id(
275 (void *) stream_class
, id
);
279 const struct bt_field_class
*
280 bt_stream_class_borrow_packet_context_field_class_const(
281 const struct bt_stream_class
*stream_class
)
283 BT_ASSERT_PRE_DEV_SC_NON_NULL(stream_class
);
284 return stream_class
->packet_context_fc
;
288 struct bt_field_class
*
289 bt_stream_class_borrow_packet_context_field_class(
290 struct bt_stream_class
*stream_class
)
292 BT_ASSERT_PRE_DEV_SC_NON_NULL(stream_class
);
293 return stream_class
->packet_context_fc
;
297 enum bt_stream_class_set_field_class_status
298 bt_stream_class_set_packet_context_field_class(
299 struct bt_stream_class
*stream_class
,
300 struct bt_field_class
*field_class
)
303 struct bt_resolve_field_path_context resolve_ctx
= {
304 .packet_context
= field_class
,
305 .event_common_context
= NULL
,
306 .event_specific_context
= NULL
,
307 .event_payload
= NULL
,
310 BT_ASSERT_PRE_NO_ERROR();
311 BT_ASSERT_PRE_SC_NON_NULL(stream_class
);
312 BT_ASSERT_PRE("supports-packets",
313 stream_class
->supports_packets
,
314 "Stream class does not support packets: %![sc-]+S",
316 BT_ASSERT_PRE_FC_NON_NULL(field_class
);
317 BT_ASSERT_PRE_DEV_STREAM_CLASS_HOT(stream_class
);
318 BT_ASSERT_PRE_FC_IS_STRUCT("field-class", field_class
,
319 "Packet context field class");
320 ret
= bt_resolve_field_paths(field_class
, &resolve_ctx
, __func__
);
323 * This is the only reason for which
324 * bt_resolve_field_paths() can fail: anything else
325 * would be because a precondition is not satisfied.
327 ret
= BT_FUNC_STATUS_MEMORY_ERROR
;
331 bt_field_class_make_part_of_trace_class(field_class
);
332 bt_object_put_ref(stream_class
->packet_context_fc
);
333 stream_class
->packet_context_fc
= field_class
;
334 bt_object_get_ref_no_null_check(stream_class
->packet_context_fc
);
335 bt_field_class_freeze(field_class
);
336 BT_LIB_LOGD("Set stream class's packet context field class: %!+S",
344 const struct bt_field_class
*
345 bt_stream_class_borrow_event_common_context_field_class_const(
346 const struct bt_stream_class
*stream_class
)
348 BT_ASSERT_PRE_DEV_SC_NON_NULL(stream_class
);
349 return stream_class
->event_common_context_fc
;
353 struct bt_field_class
*
354 bt_stream_class_borrow_event_common_context_field_class(
355 struct bt_stream_class
*stream_class
)
357 BT_ASSERT_PRE_DEV_SC_NON_NULL(stream_class
);
358 return stream_class
->event_common_context_fc
;
362 enum bt_stream_class_set_field_class_status
363 bt_stream_class_set_event_common_context_field_class(
364 struct bt_stream_class
*stream_class
,
365 struct bt_field_class
*field_class
)
368 struct bt_resolve_field_path_context resolve_ctx
= {
369 .packet_context
= NULL
,
370 .event_common_context
= field_class
,
371 .event_specific_context
= NULL
,
372 .event_payload
= NULL
,
375 BT_ASSERT_PRE_NO_ERROR();
376 BT_ASSERT_PRE_SC_NON_NULL(stream_class
);
377 BT_ASSERT_PRE_FC_NON_NULL(field_class
);
378 BT_ASSERT_PRE_DEV_STREAM_CLASS_HOT(stream_class
);
379 BT_ASSERT_PRE_FC_IS_STRUCT("field-class", field_class
,
380 "Event common context field class");
381 resolve_ctx
.packet_context
= stream_class
->packet_context_fc
;
382 ret
= bt_resolve_field_paths(field_class
, &resolve_ctx
, __func__
);
385 * This is the only reason for which
386 * bt_resolve_field_paths() can fail: anything else
387 * would be because a precondition is not satisfied.
389 ret
= BT_FUNC_STATUS_MEMORY_ERROR
;
393 bt_field_class_make_part_of_trace_class(field_class
);
394 bt_object_put_ref(stream_class
->event_common_context_fc
);
395 stream_class
->event_common_context_fc
= field_class
;
396 bt_object_get_ref_no_null_check(stream_class
->event_common_context_fc
);
397 bt_field_class_freeze(field_class
);
398 BT_LIB_LOGD("Set stream class's event common context field class: %!+S",
405 void _bt_stream_class_freeze(const struct bt_stream_class
*stream_class
)
407 /* The field classes and default clock class are already frozen */
408 BT_ASSERT(stream_class
);
409 BT_LIB_LOGD("Freezing stream class's user attributes: %!+v",
410 stream_class
->user_attributes
);
411 bt_value_freeze(stream_class
->user_attributes
);
412 BT_LIB_LOGD("Freezing stream class: %!+S", stream_class
);
413 ((struct bt_stream_class
*) stream_class
)->frozen
= true;
417 enum bt_stream_class_set_default_clock_class_status
418 bt_stream_class_set_default_clock_class(
419 struct bt_stream_class
*stream_class
,
420 struct bt_clock_class
*clock_class
)
422 BT_ASSERT_PRE_NO_ERROR();
423 BT_ASSERT_PRE_SC_NON_NULL(stream_class
);
424 BT_ASSERT_PRE_CLK_CLS_NON_NULL(clock_class
);
425 BT_ASSERT_PRE_DEV_STREAM_CLASS_HOT(stream_class
);
426 bt_object_put_ref(stream_class
->default_clock_class
);
427 stream_class
->default_clock_class
= clock_class
;
428 bt_object_get_ref_no_null_check(stream_class
->default_clock_class
);
429 bt_clock_class_freeze(clock_class
);
430 BT_LIB_LOGD("Set stream class's default clock class: %!+S",
432 return BT_FUNC_STATUS_OK
;
436 struct bt_clock_class
*bt_stream_class_borrow_default_clock_class(
437 struct bt_stream_class
*stream_class
)
439 BT_ASSERT_PRE_DEV_SC_NON_NULL(stream_class
);
440 return stream_class
->default_clock_class
;
444 const struct bt_clock_class
*bt_stream_class_borrow_default_clock_class_const(
445 const struct bt_stream_class
*stream_class
)
447 BT_ASSERT_PRE_DEV_SC_NON_NULL(stream_class
);
448 return stream_class
->default_clock_class
;
452 bt_bool
bt_stream_class_assigns_automatic_event_class_id(
453 const struct bt_stream_class
*stream_class
)
455 BT_ASSERT_PRE_DEV_SC_NON_NULL(stream_class
);
456 return (bt_bool
) stream_class
->assigns_automatic_event_class_id
;
460 void bt_stream_class_set_assigns_automatic_event_class_id(
461 struct bt_stream_class
*stream_class
,
464 BT_ASSERT_PRE_SC_NON_NULL(stream_class
);
465 BT_ASSERT_PRE_DEV_STREAM_CLASS_HOT(stream_class
);
466 stream_class
->assigns_automatic_event_class_id
= (bool) value
;
467 BT_LIB_LOGD("Set stream class's automatic event class ID "
468 "assignment property: %!+S", stream_class
);
472 bt_bool
bt_stream_class_assigns_automatic_stream_id(
473 const struct bt_stream_class
*stream_class
)
475 BT_ASSERT_PRE_DEV_SC_NON_NULL(stream_class
);
476 return (bt_bool
) stream_class
->assigns_automatic_stream_id
;
480 void bt_stream_class_set_supports_discarded_events(
481 struct bt_stream_class
*stream_class
,
482 bt_bool supports_discarded_events
,
483 bt_bool with_default_clock_snapshots
)
485 BT_ASSERT_PRE_SC_NON_NULL(stream_class
);
486 BT_ASSERT_PRE_DEV_STREAM_CLASS_HOT(stream_class
);
487 BT_ASSERT_PRE("supports-discarded-events-for-default-clock-snapshots",
488 supports_discarded_events
||
489 !with_default_clock_snapshots
,
490 "Discarded events cannot have default clock snapshots when "
491 "not supported: %!+S", stream_class
);
492 BT_ASSERT_PRE("has-default-clock-class-for-default-clock-snapshots",
493 !with_default_clock_snapshots
||
494 stream_class
->default_clock_class
,
495 "Stream class has no default clock class: %!+S", stream_class
);
496 stream_class
->supports_discarded_events
=
497 (bool) supports_discarded_events
;
498 stream_class
->discarded_events_have_default_clock_snapshots
=
499 (bool) with_default_clock_snapshots
;
500 BT_LIB_LOGD("Set stream class's discarded events support property: "
501 "%!+S", stream_class
);
505 bt_bool
bt_stream_class_supports_discarded_events(
506 const struct bt_stream_class
*stream_class
)
508 BT_ASSERT_PRE_DEV_SC_NON_NULL(stream_class
);
509 return (bt_bool
) stream_class
->supports_discarded_events
;
513 bt_bool
bt_stream_class_discarded_events_have_default_clock_snapshots(
514 const struct bt_stream_class
*stream_class
)
516 BT_ASSERT_PRE_DEV_SC_NON_NULL(stream_class
);
517 return (bt_bool
) stream_class
->discarded_events_have_default_clock_snapshots
;
521 void bt_stream_class_set_supports_discarded_packets(
522 struct bt_stream_class
*stream_class
,
523 bt_bool supports_discarded_packets
,
524 bt_bool with_default_clock_snapshots
)
526 BT_ASSERT_PRE_SC_NON_NULL(stream_class
);
527 BT_ASSERT_PRE_DEV_STREAM_CLASS_HOT(stream_class
);
528 BT_ASSERT_PRE("supports-packets-for-discarded-packets-support",
529 !supports_discarded_packets
||
530 stream_class
->supports_packets
,
531 "Stream class does not support packets: %!+S",
533 BT_ASSERT_PRE("supports-discarded-packets-for-default-clock-snapshots",
534 supports_discarded_packets
||
535 !with_default_clock_snapshots
,
536 "Discarded packets cannot have default clock snapshots when "
537 "not supported: %!+S", stream_class
);
538 BT_ASSERT_PRE("has-default-clock-class-for-default-clock-snapshots",
539 !with_default_clock_snapshots
||
540 stream_class
->default_clock_class
,
541 "Stream class has no default clock class: %!+S", stream_class
);
542 stream_class
->supports_discarded_packets
=
543 (bool) supports_discarded_packets
;
544 stream_class
->discarded_packets_have_default_clock_snapshots
=
545 (bool) with_default_clock_snapshots
;
546 BT_LIB_LOGD("Set stream class's discarded packets support property: "
547 "%!+S", stream_class
);
551 bt_bool
bt_stream_class_supports_discarded_packets(
552 const struct bt_stream_class
*stream_class
)
554 BT_ASSERT_PRE_DEV_SC_NON_NULL(stream_class
);
555 return (bt_bool
) stream_class
->supports_discarded_packets
;
559 bt_bool
bt_stream_class_discarded_packets_have_default_clock_snapshots(
560 const struct bt_stream_class
*stream_class
)
562 BT_ASSERT_PRE_DEV_SC_NON_NULL(stream_class
);
563 return (bt_bool
) stream_class
->discarded_packets_have_default_clock_snapshots
;
567 void bt_stream_class_set_supports_packets(
568 struct bt_stream_class
*stream_class
,
569 bt_bool supports_packets
,
570 bt_bool with_beginning_default_clock_snapshot
,
571 bt_bool with_end_default_clock_snapshot
)
573 bt_bool with_default_clock_snapshot
=
574 with_beginning_default_clock_snapshot
||
575 with_end_default_clock_snapshot
;
576 BT_ASSERT_PRE_SC_NON_NULL(stream_class
);
577 BT_ASSERT_PRE_DEV_STREAM_CLASS_HOT(stream_class
);
578 BT_ASSERT_PRE("supports-packets-for-default-clock-snapshot",
580 !with_default_clock_snapshot
,
581 "Packets cannot have default clock snapshots when "
582 "not supported: %!+S", stream_class
);
583 BT_ASSERT_PRE("has-default-clock-class-for-default-clock-snapshot",
584 !with_default_clock_snapshot
||
585 stream_class
->default_clock_class
,
586 "Stream class has no default clock class: %!+S", stream_class
);
587 BT_ASSERT_PRE("supports-packets-for-packet-context-field-class",
588 supports_packets
|| !stream_class
->packet_context_fc
,
589 "Stream class already has a packet context field class: %!+S",
591 BT_ASSERT_PRE("supports-packets-for-discarded-packets-support",
592 supports_packets
|| !stream_class
->supports_discarded_packets
,
593 "Stream class already supports discarded packets: %!+S",
595 stream_class
->supports_packets
= (bool) supports_packets
;
596 stream_class
->packets_have_beginning_default_clock_snapshot
=
597 (bool) with_beginning_default_clock_snapshot
;
598 stream_class
->packets_have_end_default_clock_snapshot
=
599 (bool) with_end_default_clock_snapshot
;
600 BT_LIB_LOGD("Set stream class's packets support property: %!+S",
605 bt_bool
bt_stream_class_supports_packets(
606 const struct bt_stream_class
*stream_class
)
608 BT_ASSERT_PRE_SC_NON_NULL(stream_class
);
609 return (bt_bool
) stream_class
->supports_packets
;
613 bt_bool
bt_stream_class_packets_have_beginning_default_clock_snapshot(
614 const struct bt_stream_class
*stream_class
)
616 BT_ASSERT_PRE_DEV_SC_NON_NULL(stream_class
);
617 return (bt_bool
) stream_class
->packets_have_beginning_default_clock_snapshot
;
621 bt_bool
bt_stream_class_packets_have_end_default_clock_snapshot(
622 const struct bt_stream_class
*stream_class
)
624 BT_ASSERT_PRE_DEV_SC_NON_NULL(stream_class
);
625 return (bt_bool
) stream_class
->packets_have_end_default_clock_snapshot
;
629 void bt_stream_class_set_assigns_automatic_stream_id(
630 struct bt_stream_class
*stream_class
,
633 BT_ASSERT_PRE_SC_NON_NULL(stream_class
);
634 BT_ASSERT_PRE_DEV_STREAM_CLASS_HOT(stream_class
);
635 stream_class
->assigns_automatic_stream_id
= (bool) value
;
636 BT_LIB_LOGD("Set stream class's automatic stream ID "
637 "assignment property: %!+S", stream_class
);
641 const struct bt_value
*bt_stream_class_borrow_user_attributes_const(
642 const struct bt_stream_class
*stream_class
)
644 BT_ASSERT_PRE_DEV_SC_NON_NULL(stream_class
);
645 return stream_class
->user_attributes
;
649 struct bt_value
*bt_stream_class_borrow_user_attributes(
650 struct bt_stream_class
*stream_class
)
652 return (void *) bt_stream_class_borrow_user_attributes_const(
653 (void *) stream_class
);
657 void bt_stream_class_set_user_attributes(
658 struct bt_stream_class
*stream_class
,
659 const struct bt_value
*user_attributes
)
661 BT_ASSERT_PRE_SC_NON_NULL(stream_class
);
662 BT_ASSERT_PRE_USER_ATTRS_NON_NULL(user_attributes
);
663 BT_ASSERT_PRE_USER_ATTRS_IS_MAP(user_attributes
);
664 BT_ASSERT_PRE_DEV_STREAM_CLASS_HOT(stream_class
);
665 bt_object_put_ref_no_null_check(stream_class
->user_attributes
);
666 stream_class
->user_attributes
= (void *) user_attributes
;
667 bt_object_get_ref_no_null_check(stream_class
->user_attributes
);
671 void bt_stream_class_get_ref(const struct bt_stream_class
*stream_class
)
673 bt_object_get_ref(stream_class
);
677 void bt_stream_class_put_ref(const struct bt_stream_class
*stream_class
)
679 bt_object_put_ref(stream_class
);