[vlc-commits] [Git][videolan/vlc][master] 2 commits: mux: ts: replace BLOCK_FLAG_CLOCK

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Fri Nov 11 11:53:01 UTC 2022



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
20737b0e by Francois Cartegnie at 2022-11-11T10:02:46+00:00
mux: ts: replace BLOCK_FLAG_CLOCK

- - - - -
3b379d7a by Francois Cartegnie at 2022-11-11T10:02:46+00:00
block: remove BLOCK_FLAG_CLOCK

was used by removed udp output module to mimic PCR

- - - - -


3 changed files:

- include/vlc_block.h
- include/vlc_frame.h
- modules/mux/mpeg/ts.c


Changes:

=====================================
include/vlc_block.h
=====================================
@@ -62,7 +62,6 @@
 #define BLOCK_FLAG_TYPE_PB VLC_FRAME_FLAG_TYPE_PB
 #define BLOCK_FLAG_HEADER VLC_FRAME_FLAG_HEADER
 #define BLOCK_FLAG_END_OF_SEQUENCE VLC_FRAME_FLAG_END_OF_SEQUENCE
-#define BLOCK_FLAG_CLOCK VLC_FRAME_FLAG_CLOCK
 #define BLOCK_FLAG_SCRAMBLED VLC_FRAME_FLAG_SCRAMBLED
 #define BLOCK_FLAG_PREROLL VLC_FRAME_FLAG_PREROLL
 #define BLOCK_FLAG_CORRUPTED VLC_FRAME_FLAG_CORRUPTED


=====================================
include/vlc_frame.h
=====================================
@@ -81,8 +81,6 @@ typedef struct vlc_frame_t vlc_frame_t;
 #define VLC_FRAME_FLAG_HEADER        0x0020
 /** This frame contains the last part of a sequence  */
 #define VLC_FRAME_FLAG_END_OF_SEQUENCE 0x0040
-/** This frame contains a clock reference */
-#define VLC_FRAME_FLAG_CLOCK         0x0080
 /** This frame is scrambled */
 #define VLC_FRAME_FLAG_SCRAMBLED     0x0100
 /** This frame has to be decoded but not be displayed */


=====================================
modules/mux/mpeg/ts.c
=====================================
@@ -189,6 +189,7 @@ static const char *const ts_standards_list_text[] =
 static_assert (MAX_SDT_DESC >= MAX_PMT, "MAX_SDT_DESC < MAX_PMT");
 
 #define BLOCK_FLAG_NO_KEYFRAME (1 << BLOCK_FLAG_PRIVATE_SHIFT) /* This is not a key frame for bitrate shaping */
+#define BLOCK_FLAG_FOR_PCR     (1 << (BLOCK_FLAG_PRIVATE_SHIFT+1))
 
 vlc_module_begin ()
     set_description( N_("TS muxer (libdvbpsi)") )
@@ -1719,7 +1720,7 @@ static void TSDate( sout_mux_t *p_mux, sout_buffer_chain_t *p_chain_ts,
         p_ts->i_dts    = i_new_dts;
         p_ts->i_length = i_pcr_length / i_packet_count;
 
-        if( p_ts->i_flags & BLOCK_FLAG_CLOCK )
+        if( p_ts->i_flags & BLOCK_FLAG_FOR_PCR )
         {
             /* msg_Dbg( p_mux, "pcr=%lld ms", p_ts->i_dts / 1000 ); */
             TSSetPCR( p_ts, p_ts->i_dts - p_sys->first_dts );
@@ -1787,7 +1788,7 @@ static block_t *TSNew( sout_mux_t *p_mux, sout_input_sys_t *p_stream,
         int i_stuffing = i_payload_max - i_payload;
         if( b_pcr )
         {
-            p_ts->i_flags |= BLOCK_FLAG_CLOCK;
+            p_ts->i_flags |= BLOCK_FLAG_FOR_PCR;
 
             p_ts->p_buffer[4] = 7 + i_stuffing;
             p_ts->p_buffer[5] = 1 << 4; /* PCR_flag */



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/da8312a4178f4539b9f7e398b2bd85a644511252...3b379d7a5bb19cd6e53edab7ed7a129838cef161

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/da8312a4178f4539b9f7e398b2bd85a644511252...3b379d7a5bb19cd6e53edab7ed7a129838cef161
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list