[bTSstream-devel] [Git][videolan/bitstream][master] 4 commits: scte/35: add avail splice descriptor helpers

Christophe Massiot (@cmassiot) gitlab at videolan.org
Wed Mar 5 10:50:09 UTC 2025



Christophe Massiot pushed to branch master at VideoLAN / bitstream


Commits:
5c6d469c by Arnaud de Turckheim at 2025-03-03T18:10:03+01:00
scte/35: add avail splice descriptor helpers

- - - - -
dd82c0ae by Arnaud de Turckheim at 2025-03-05T11:49:56+01:00
dvb/si/desc_6f: fix typo

- - - - -
d2483df1 by Arnaud de Turckheim at 2025-03-05T11:49:56+01:00
dvb/si: add AIT

- - - - -
2944df2f by Christophe Massiot at 2025-03-05T11:50:03+01:00
Merge branch 'quarium-avail-splice-desc'

- - - - -


1 changed file:

- scte/35.h


Changes:

=====================================
scte/35.h
=====================================
@@ -695,6 +695,38 @@ static inline void scte35_splice_desc_set_identifier(uint8_t *p_desc,
     p_desc[5] = identifier & 0xff;
 }
 
+/*****************************************************************************
+ * Splice Information Table - avail descriptor
+ *****************************************************************************/
+#define SCTE35_AVAIL_DESC_HEADER_SIZE       4
+
+static inline void scte35_avail_desc_init(uint8_t *p_desc)
+{
+    scte35_splice_desc_set_tag(p_desc, SCTE35_SPLICE_DESC_TAG_AVAIL);
+    scte35_splice_desc_set_length(p_desc,
+                                  SCTE35_SPLICE_DESC_HEADER_SIZE -
+                                  DESC_HEADER_SIZE +
+                                  SCTE35_AVAIL_DESC_HEADER_SIZE);
+    scte35_splice_desc_set_identifier(p_desc, SCTE35_SPLICE_DESC_IDENTIFIER);
+    p_desc[10] = 0x7f;
+}
+
+static inline uint32_t
+scte35_avail_desc_get_provider_avail_id(const uint8_t *p_desc)
+{
+    return ((uint32_t)p_desc[6] << 24) | (p_desc[7] << 16) |
+        (p_desc[8] << 8) | p_desc[9];
+}
+
+static inline void scte35_avail_desc_set_provider_avail_id(uint8_t *p_desc,
+                                                           uint32_t id)
+{
+    p_desc[6] = (id >> 24) & 0xff;
+    p_desc[7] = (id >> 16) & 0xff;
+    p_desc[8] = (id >> 8) & 0xff;
+    p_desc[9] = id & 0xff;
+}
+
 /*****************************************************************************
  * Splice Information Table - segmentation descriptor
  *****************************************************************************/



View it on GitLab: https://code.videolan.org/videolan/bitstream/-/compare/ebc8106ce8279b8be7861ab9e83e9ac42bb528f8...2944df2f18e761b78af95e7f33adfacf15097ca8

-- 
View it on GitLab: https://code.videolan.org/videolan/bitstream/-/compare/ebc8106ce8279b8be7861ab9e83e9ac42bb528f8...2944df2f18e761b78af95e7f33adfacf15097ca8
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the biTStream-devel mailing list