[bTSstream-devel] [Git][videolan/bitstream][master] 3 commits: scte/104: Add inject_response_data and inject_complete_response_data

Christophe Massiot (@cmassiot) gitlab at videolan.org
Tue Mar 12 15:41:01 UTC 2024



Christophe Massiot pushed to branch master at VideoLAN / bitstream


Commits:
739c7b1a by Kieran Kunhya at 2024-03-01T18:41:21+00:00
scte/104: Add inject_response_data and inject_complete_response_data

(cherry picked from commit 94e6e65172ed4c45e1b1a57098fc2791bfdc92cd)

- - - - -
95930673 by Kieran Kunhya at 2024-03-01T19:34:17+00:00
scte/104: Add result codes

- - - - -
e3a4a99e by Christophe Massiot at 2024-03-12T16:40:31+01:00
Merge branch 'kierank-scte104'

- - - - -


1 changed file:

- scte/104.h


Changes:

=====================================
scte/104.h
=====================================
@@ -40,6 +40,14 @@ extern "C"
 {
 #endif
 
+/*****************************************************************************
+ * SCTE 104 - result codes
+ *****************************************************************************/
+
+#define SCTE104_RESULT_SUCCESSFUL                     100
+#define SCTE104_RESULT_INVALID_MESSAGE_SIZE           114
+#define SCTE104_RESULT_INVALID_MESSAGE_SYNTAX         115
+
 /*****************************************************************************
  * SCTE 104 - timestamp structure
  *****************************************************************************/
@@ -175,6 +183,8 @@ static inline void scte104t_set_gpi_edge(uint8_t *p, uint8_t i_gpi_edge)
 #define SCTE104_OPID_INIT_RESPONSE_DATA             0x0002
 #define SCTE104_OPID_ALIVE_REQUEST_DATA             0x0003
 #define SCTE104_OPID_ALIVE_RESPONSE_DATA            0x0004
+#define SCTE104_OPID_INJECT_RESPONSE                0x0007
+#define SCTE104_OPID_INJECT_COMPLETE_RESPONSE       0x0008
 #define SCTE104_OPID_INJECT_SECTION                 0x0100
 #define SCTE104_OPID_SPLICE                         0x0101
 #define SCTE104_OPID_SPLICE_NULL                    0x0102
@@ -430,6 +440,48 @@ static inline bool scte104m_validate(const uint8_t *p, const int buf_size)
     return true;
 }
 
+/*****************************************************************************
+ * SCTE-104 : inject_response_data
+ *****************************************************************************/
+
+#define SCTE104IRD_HEADER_SIZE          1
+
+static inline uint8_t scte104ird_get_message_number(const uint8_t *p)
+{
+    return p[0];
+}
+
+static inline void scte104ird_set_message_number(uint8_t *p, uint8_t i_message_number)
+{
+    p[0] = i_message_number;
+}
+
+/*****************************************************************************
+ * SCTE-104 : inject_complete_response_data
+ *****************************************************************************/
+
+#define SCTE104ICRD_HEADER_SIZE          2
+
+static inline uint8_t scte104icrd_get_message_number(const uint8_t *p)
+{
+    return p[0];
+}
+
+static inline void scte104icrd_set_message_number(uint8_t *p, uint8_t i_message_number)
+{
+    p[0] = i_message_number;
+}
+
+static inline uint8_t scte104icrd_get_cue_message_count(const uint8_t *p)
+{
+    return p[1];
+}
+
+static inline void scte104icrd_set_cue_message_count(uint8_t *p, uint8_t i_cue_message_count)
+{
+    p[1] = i_cue_message_count;
+}
+
 /*****************************************************************************
  * SCTE-104 : splice_request_data
  *****************************************************************************/



View it on GitLab: https://code.videolan.org/videolan/bitstream/-/compare/757e0e6beaebe869dbf386ae0028a1d2dfef433d...e3a4a99ef0e7c934331665bd0863c77fe6bb378b

-- 
View it on GitLab: https://code.videolan.org/videolan/bitstream/-/compare/757e0e6beaebe869dbf386ae0028a1d2dfef433d...e3a4a99ef0e7c934331665bd0863c77fe6bb378b
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