Lines Matching refs:sit
242 _gst_mpegts_scte_sit_copy (GstMpegtsSCTESIT * sit) in _gst_mpegts_scte_sit_copy() argument
244 GstMpegtsSCTESIT *copy = g_slice_dup (GstMpegtsSCTESIT, sit); in _gst_mpegts_scte_sit_copy()
246 copy->splices = g_ptr_array_ref (sit->splices); in _gst_mpegts_scte_sit_copy()
247 copy->descriptors = g_ptr_array_ref (sit->descriptors); in _gst_mpegts_scte_sit_copy()
253 _gst_mpegts_scte_sit_free (GstMpegtsSCTESIT * sit) in _gst_mpegts_scte_sit_free() argument
255 g_ptr_array_unref (sit->splices); in _gst_mpegts_scte_sit_free()
256 g_ptr_array_unref (sit->descriptors); in _gst_mpegts_scte_sit_free()
257 g_slice_free (GstMpegtsSCTESIT, sit); in _gst_mpegts_scte_sit_free()
268 GstMpegtsSCTESIT *sit = NULL; in _parse_sit() local
281 sit = g_slice_new0 (GstMpegtsSCTESIT); in _parse_sit()
283 sit->fully_parsed = FALSE; in _parse_sit()
301 sit->encrypted_packet = (*data) >> 7; in _parse_sit()
302 sit->encryption_algorithm = (*data) & 0x3f; in _parse_sit()
303 sit->pts_adjustment = ((guint64) (*data & 0x01)) << 32; in _parse_sit()
306 sit->pts_adjustment += GST_READ_UINT32_BE (data); in _parse_sit()
309 sit->cw_index = *data; in _parse_sit()
315 sit->tier = (tmp >> 12); in _parse_sit()
316 sit->splice_command_length = tmp & 0xfff; in _parse_sit()
318 if (sit->splice_command_length == 0xfff) in _parse_sit()
319 sit->splice_command_length = 0; in _parse_sit()
320 GST_LOG ("command length %d", sit->splice_command_length); in _parse_sit()
322 if (sit->encrypted_packet) { in _parse_sit()
327 if (sit->splice_command_length in _parse_sit()
328 && (data + sit->splice_command_length > end - 5)) { in _parse_sit()
330 section->pid, sit->splice_command_length); in _parse_sit()
334 sit->splice_command_type = *data; in _parse_sit()
337 sit->splices = g_ptr_array_new_with_free_func ((GDestroyNotify) in _parse_sit()
339 switch (sit->splice_command_type) { in _parse_sit()
346 sit->splice_time_specified = (*data >> 7); in _parse_sit()
347 if (sit->splice_time_specified) { in _parse_sit()
348 sit->splice_time = ((guint64) (*data & 0x01)) << 32; in _parse_sit()
350 sit->splice_time += GST_READ_UINT32_BE (data); in _parse_sit()
367 g_ptr_array_add (sit->splices, event); in _parse_sit()
376 g_ptr_array_add (sit->splices, event); in _parse_sit()
382 data += sit->splice_command_length; in _parse_sit()
387 sit->splice_command_type); in _parse_sit()
395 sit->descriptors = gst_mpegts_parse_descriptors (data, tmp); in _parse_sit()
396 if (!sit->descriptors) { in _parse_sit()
409 sit->fully_parsed = TRUE; in _parse_sit()
412 return sit; in _parse_sit()
415 if (sit) { in _parse_sit()
416 _gst_mpegts_scte_sit_free (sit); in _parse_sit()
417 sit = NULL; in _parse_sit()
457 GstMpegtsSCTESIT *sit; in gst_mpegts_scte_sit_new() local
459 sit = g_slice_new0 (GstMpegtsSCTESIT); in gst_mpegts_scte_sit_new()
462 sit->tier = 0xfff; in gst_mpegts_scte_sit_new()
463 sit->fully_parsed = TRUE; in gst_mpegts_scte_sit_new()
465 sit->splices = g_ptr_array_new_with_free_func ((GDestroyNotify) in gst_mpegts_scte_sit_new()
467 sit->descriptors = g_ptr_array_new_with_free_func ((GDestroyNotify) in gst_mpegts_scte_sit_new()
470 sit->is_running_time = TRUE; in gst_mpegts_scte_sit_new()
472 return sit; in gst_mpegts_scte_sit_new()
485 GstMpegtsSCTESIT *sit = gst_mpegts_scte_sit_new (); in gst_mpegts_scte_null_new() local
487 sit->splice_command_type = GST_MTS_SCTE_SPLICE_COMMAND_NULL; in gst_mpegts_scte_null_new()
489 sit->is_running_time = TRUE; in gst_mpegts_scte_null_new()
491 return sit; in gst_mpegts_scte_null_new()
506 GstMpegtsSCTESIT *sit = gst_mpegts_scte_sit_new (); in gst_mpegts_scte_cancel_new() local
509 sit->splice_command_type = GST_MTS_SCTE_SPLICE_COMMAND_INSERT; in gst_mpegts_scte_cancel_new()
512 g_ptr_array_add (sit->splices, event); in gst_mpegts_scte_cancel_new()
514 sit->is_running_time = TRUE; in gst_mpegts_scte_cancel_new()
516 return sit; in gst_mpegts_scte_cancel_new()
535 GstMpegtsSCTESIT *sit = gst_mpegts_scte_sit_new (); in gst_mpegts_scte_splice_in_new() local
538 sit->splice_command_type = GST_MTS_SCTE_SPLICE_COMMAND_INSERT; in gst_mpegts_scte_splice_in_new()
547 g_ptr_array_add (sit->splices, event); in gst_mpegts_scte_splice_in_new()
549 sit->is_running_time = TRUE; in gst_mpegts_scte_splice_in_new()
551 return sit; in gst_mpegts_scte_splice_in_new()
575 GstMpegtsSCTESIT *sit = gst_mpegts_scte_sit_new (); in gst_mpegts_scte_splice_out_new() local
578 sit->splice_command_type = GST_MTS_SCTE_SPLICE_COMMAND_INSERT; in gst_mpegts_scte_splice_out_new()
592 g_ptr_array_add (sit->splices, event); in gst_mpegts_scte_splice_out_new()
594 sit->is_running_time = TRUE; in gst_mpegts_scte_splice_out_new()
596 return sit; in gst_mpegts_scte_splice_out_new()
644 const GstMpegtsSCTESIT *sit; in _packetize_sit() local
650 sit = gst_mpegts_section_get_scte_sit (section); in _packetize_sit()
652 if (sit == NULL) in _packetize_sit()
655 if (sit->fully_parsed == FALSE) { in _packetize_sit()
661 if (sit->encrypted_packet) { in _packetize_sit()
666 switch (sit->splice_command_type) { in _packetize_sit()
683 for (i = 0; i < sit->splices->len; i++) { in _packetize_sit()
684 GstMpegtsSCTESpliceEvent *event = g_ptr_array_index (sit->splices, i); in _packetize_sit()
734 if (sit->splice_command_type == GST_MTS_SCTE_SPLICE_COMMAND_TIME) { in _packetize_sit()
735 if (sit->splice_time_specified) in _packetize_sit()
746 for (i = 0; i < sit->descriptors->len; i++) { in _packetize_sit()
747 descriptor = g_ptr_array_index (sit->descriptors, i); in _packetize_sit()
762 *data++ = (sit->pts_adjustment) >> 32 & 0x01; in _packetize_sit()
763 GST_WRITE_UINT32_BE (data, sit->pts_adjustment & 0xffffffff); in _packetize_sit()
766 *data++ = sit->cw_index; in _packetize_sit()
770 tmp32 = (sit->tier & 0xfff) << 20; in _packetize_sit()
772 tmp32 |= sit->splice_command_type; in _packetize_sit()
776 if (sit->splice_command_type == GST_MTS_SCTE_SPLICE_COMMAND_TIME) { in _packetize_sit()
777 if (!sit->splice_time_specified) { in _packetize_sit()
780 *data++ = 0xf2 | ((sit->splice_time >> 32) & 0x1); in _packetize_sit()
781 GST_WRITE_UINT32_BE (data, sit->splice_time & 0xffffffff); in _packetize_sit()
787 for (i = 0; i < sit->splices->len; i++) { in _packetize_sit()
788 GstMpegtsSCTESpliceEvent *event = g_ptr_array_index (sit->splices, i); in _packetize_sit()
877 _packetize_descriptor_array (sit->descriptors, &data); in _packetize_sit()
894 gst_mpegts_section_from_scte_sit (GstMpegtsSCTESIT * sit, guint16 pid) in gst_mpegts_section_from_scte_sit() argument
898 g_return_val_if_fail (sit != NULL, NULL); in gst_mpegts_section_from_scte_sit()
903 section->cached_parsed = (gpointer) sit; in gst_mpegts_section_from_scte_sit()