- struct bt_ctf_field *stream_id;
-
- /* Start a new packet in the stream */
- if (stream->flushed_packet_count) {
- /* ctf_init_pos has already initialized the first packet */
- ctf_packet_seek(&stream->pos.parent, 0, SEEK_CUR);
- }
-
- stream_id = bt_ctf_field_structure_get_field(
- writer->trace->trace_packet_header, "stream_id");
- bt_ctf_field_unsigned_integer_set_value(stream_id, stream->stream_class->id);
- bt_ctf_field_put(stream_id);
-
- /* Write the trace_packet_header */
- bt_ctf_field_serialize(writer->trace->trace_packet_header, &stream->pos);