[vlc-commits] es_out: add type-safe es_out_SetPCR() helper

Rémi Denis-Courmont git at videolan.org
Sun Jul 30 19:43:55 CEST 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jul 30 20:35:31 2017 +0300| [c2c02e2876557d1860e9a2785f62a88da61465da] | committer: Rémi Denis-Courmont

es_out: add type-safe es_out_SetPCR() helper

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c2c02e2876557d1860e9a2785f62a88da61465da
---

 include/vlc_es_out.h                 |  5 +++++
 modules/access/alsa.c                |  2 +-
 modules/access/avcapture.m           |  2 +-
 modules/access/cdda.c                |  2 +-
 modules/access/dc1394.c              |  2 +-
 modules/access/dcp/dcp.cpp           |  4 ++--
 modules/access/decklink.cpp          |  4 ++--
 modules/access/dshow/dshow.cpp       |  2 +-
 modules/access/dvdnav.c              |  2 +-
 modules/access/dvdread.c             |  2 +-
 modules/access/imem.c                |  2 +-
 modules/access/jack.c                |  2 +-
 modules/access/linsys/linsys_hdsdi.c |  2 +-
 modules/access/linsys/linsys_sdi.c   |  2 +-
 modules/access/live555.cpp           |  4 ++--
 modules/access/oss.c                 |  2 +-
 modules/access/pulse.c               |  2 +-
 modules/access/qtsound.m             |  2 +-
 modules/access/rdp.c                 |  2 +-
 modules/access/rtp/rtp.c             |  2 +-
 modules/access/screen/screen.c       |  2 +-
 modules/access/screen/wayland.c      |  2 +-
 modules/access/screen/xcb.c          |  2 +-
 modules/access/shm.c                 |  4 ++--
 modules/access/timecode.c            |  2 +-
 modules/access/v4l2/demux.c          |  6 +++---
 modules/access/vnc.c                 |  2 +-
 modules/access/wasapi.c              |  2 +-
 modules/demux/aiff.c                 |  2 +-
 modules/demux/asf/asf.c              |  4 ++--
 modules/demux/au.c                   |  2 +-
 modules/demux/avformat/demux.c       |  2 +-
 modules/demux/avi/avi.c              |  6 +++---
 modules/demux/caf.c                  |  2 +-
 modules/demux/cdg.c                  |  2 +-
 modules/demux/dirac.c                |  2 +-
 modules/demux/flac.c                 |  4 ++--
 modules/demux/gme.c                  |  2 +-
 modules/demux/image.c                |  4 ++--
 modules/demux/mjpeg.c                |  2 +-
 modules/demux/mkv/mkv.cpp            |  2 +-
 modules/demux/mod.c                  |  2 +-
 modules/demux/mp4/mp4.c              | 12 ++++++------
 modules/demux/mpc.c                  |  2 +-
 modules/demux/mpeg/es.c              |  2 +-
 modules/demux/mpeg/h26x.c            |  2 +-
 modules/demux/mpeg/mpgv.c            |  2 +-
 modules/demux/mpeg/ps.c              |  6 +++---
 modules/demux/nsv.c                  |  2 +-
 modules/demux/nuv.c                  |  2 +-
 modules/demux/ogg.c                  |  6 +++---
 modules/demux/pva.c                  |  4 ++--
 modules/demux/rawaud.c               |  2 +-
 modules/demux/rawdv.c                |  2 +-
 modules/demux/rawvid.c               |  2 +-
 modules/demux/real.c                 |  4 ++--
 modules/demux/sid.cpp                |  2 +-
 modules/demux/smf.c                  |  2 +-
 modules/demux/stl.c                  |  4 ++--
 modules/demux/subtitle.c             |  4 ++--
 modules/demux/tta.c                  |  2 +-
 modules/demux/ttml.c                 |  4 ++--
 modules/demux/vc1.c                  |  2 +-
 modules/demux/voc.c                  |  2 +-
 modules/demux/wav.c                  |  2 +-
 modules/demux/xa.c                   |  2 +-
 modules/misc/stats.c                 |  2 +-
 67 files changed, 96 insertions(+), 91 deletions(-)

diff --git a/include/vlc_es_out.h b/include/vlc_es_out.h
index e6dc67b2e0..396c7edc98 100644
--- a/include/vlc_es_out.h
+++ b/include/vlc_es_out.h
@@ -155,6 +155,11 @@ static inline void es_out_Delete( es_out_t *p_out )
     p_out->pf_destroy( p_out );
 }
 
+static inline int es_out_SetPCR( es_out_t *out, int64_t pcr )
+{
+    return es_out_Control( out, ES_OUT_SET_PCR, pcr );
+}
+
 static inline int es_out_ControlSetMeta( es_out_t *out, const vlc_meta_t *p_meta )
 {
     return es_out_Control( out, ES_OUT_SET_META, p_meta );
diff --git a/modules/access/alsa.c b/modules/access/alsa.c
index 406dcde0e3..8985a0a1ab 100644
--- a/modules/access/alsa.c
+++ b/modules/access/alsa.c
@@ -229,7 +229,7 @@ static void *Thread (void *data)
         block->i_pts = pts;
         block->i_length = (CLOCK_FREQ * frames) / sys->rate;
 
-        es_out_Control (demux->out, ES_OUT_SET_PCR, block->i_pts);
+        es_out_SetPCR(demux->out, block->i_pts);
         es_out_Send (demux->out, sys->es, block);
     }
     return NULL;
diff --git a/modules/access/avcapture.m b/modules/access/avcapture.m
index d43cbb28c3..6580000a35 100644
--- a/modules/access/avcapture.m
+++ b/modules/access/avcapture.m
@@ -427,7 +427,7 @@ static int Demux(demux_t *p_demux)
             }
         }
         
-        es_out_Control(p_demux->out, ES_OUT_SET_PCR, p_block->i_pts);
+        es_out_SetPCR(p_demux->out, p_block->i_pts);
         es_out_Send(p_demux->out, p_sys->p_es_video, p_block);
         
     }
diff --git a/modules/access/cdda.c b/modules/access/cdda.c
index 1bba490438..1dc3227f2e 100644
--- a/modules/access/cdda.c
+++ b/modules/access/cdda.c
@@ -160,7 +160,7 @@ static int Demux(demux_t *demux)
     date_Increment(&sys->pts, block->i_nb_samples);
 
     es_out_Send(demux->out, sys->es, block);
-    es_out_Control(demux->out, ES_OUT_SET_PCR, VLC_TS_0 + date_Get(&sys->pts));
+    es_out_SetPCR(demux->out, VLC_TS_0 + date_Get(&sys->pts));
     return VLC_DEMUXER_SUCCESS;
 }
 
diff --git a/modules/access/dc1394.c b/modules/access/dc1394.c
index d089e69ab3..43a8fc93bf 100644
--- a/modules/access/dc1394.c
+++ b/modules/access/dc1394.c
@@ -479,7 +479,7 @@ static int Demux( demux_t *p_demux )
 
     if( p_blockv )
     {
-        es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_blockv->i_pts );
+        es_out_SetPCR( p_demux->out, p_blockv->i_pts );
         es_out_Send( p_demux->out, p_sys->p_es_video, p_blockv );
     }
     return 1;
diff --git a/modules/access/dcp/dcp.cpp b/modules/access/dcp/dcp.cpp
index 970685ca95..0495ce56f4 100644
--- a/modules/access/dcp/dcp.cpp
+++ b/modules/access/dcp/dcp.cpp
@@ -748,7 +748,7 @@ static int Demux( demux_t *p_demux )
     }
 
     p_sys->i_pts = p_video_frame->i_pts;
-    es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_sys->i_pts );
+    es_out_SetPCR( p_demux->out, p_sys->i_pts );
     if(p_video_frame)
         es_out_Send( p_demux->out, p_sys->p_video_es, p_video_frame );
     if(p_audio_frame)
@@ -827,7 +827,7 @@ static int Control( demux_t *p_demux, int query, va_list args )
             msg_Warn( p_demux, "DEMUX_SET_TIME"  );
             p_sys->frame_no = i64 * p_sys->frame_rate_num / ( CLOCK_FREQ * p_sys->frame_rate_denom );
             p_sys->i_pts= i64;
-            es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_sys->i_pts);
+            es_out_SetPCR(p_demux->out, p_sys->i_pts);
             es_out_Control( p_demux->out, ES_OUT_SET_NEXT_DISPLAY_TIME, ( mtime_t ) i64 );
             break;
         case DEMUX_GET_PTS_DELAY:
diff --git a/modules/access/decklink.cpp b/modules/access/decklink.cpp
index 6523bf0f73..ec11470e79 100644
--- a/modules/access/decklink.cpp
+++ b/modules/access/decklink.cpp
@@ -341,7 +341,7 @@ HRESULT DeckLinkCaptureDelegate::VideoInputFrameArrived(IDeckLinkVideoInputFrame
             sys->last_pts = video_frame->i_pts;
         vlc_mutex_unlock(&sys->pts_lock);
 
-        es_out_Control(demux_->out, ES_OUT_SET_PCR, video_frame->i_pts);
+        es_out_SetPCR(demux_->out, video_frame->i_pts);
         es_out_Send(demux_->out, sys->video_es, video_frame);
     }
 
@@ -365,7 +365,7 @@ HRESULT DeckLinkCaptureDelegate::VideoInputFrameArrived(IDeckLinkVideoInputFrame
             sys->last_pts = audio_frame->i_pts;
         vlc_mutex_unlock(&sys->pts_lock);
 
-        es_out_Control(demux_->out, ES_OUT_SET_PCR, audio_frame->i_pts);
+        es_out_SetPCR(demux_->out, audio_frame->i_pts);
         es_out_Send(demux_->out, sys->audio_es, audio_frame);
     }
 
diff --git a/modules/access/dshow/dshow.cpp b/modules/access/dshow/dshow.cpp
index 5bfa5bac5f..a24f010a1e 100644
--- a/modules/access/dshow/dshow.cpp
+++ b/modules/access/dshow/dshow.cpp
@@ -1895,7 +1895,7 @@ static int Demux( demux_t *p_demux )
             p_block->i_pts = p_block->i_dts = i_pts;
 
             if( i_pts > VLC_TS_INVALID )
-                es_out_Control( p_demux->out, ES_OUT_SET_PCR, i_pts );
+                es_out_SetPCR( p_demux->out, i_pts );
             es_out_Send( p_demux->out, p_stream->p_es, p_block );
 
             i_samples--;
diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c
index c6e5761a81..42e7f6d011 100644
--- a/modules/access/dvdnav.c
+++ b/modules/access/dvdnav.c
@@ -1364,7 +1364,7 @@ static int DemuxBlock( demux_t *p_demux, const uint8_t *p, int len )
             int i_mux_rate;
             if( !ps_pkt_parse_pack( p_pkt, &i_scr, &i_mux_rate ) )
             {
-                es_out_Control( p_demux->out, ES_OUT_SET_PCR, i_scr + 1 );
+                es_out_SetPCR( p_demux->out, i_scr + 1 );
                 if( i_mux_rate > 0 ) p_sys->i_mux_rate = i_mux_rate;
             }
             block_Release( p_pkt );
diff --git a/modules/access/dvdread.c b/modules/access/dvdread.c
index 6312d1d6a5..9982ab76ba 100644
--- a/modules/access/dvdread.c
+++ b/modules/access/dvdread.c
@@ -606,7 +606,7 @@ static int DemuxBlock( demux_t *p_demux, const uint8_t *p, int len )
             int i_mux_rate;
             if( !ps_pkt_parse_pack( p_pkt, &i_scr, &i_mux_rate ) )
             {
-                es_out_Control( p_demux->out, ES_OUT_SET_PCR, i_scr );
+                es_out_SetPCR( p_demux->out, i_scr );
                 if( i_mux_rate > 0 ) p_sys->i_mux_rate = i_mux_rate;
             }
             block_Release( p_pkt );
diff --git a/modules/access/imem.c b/modules/access/imem.c
index 09a74f1c15..d98e764bb6 100644
--- a/modules/access/imem.c
+++ b/modules/access/imem.c
@@ -599,7 +599,7 @@ static int Demux(demux_t *demux)
                 block->i_pts = pts >= 0 ? (1 + pts) : VLC_TS_INVALID;
                 memcpy(block->p_buffer, buffer, buffer_size);
 
-                es_out_Control(demux->out, ES_OUT_SET_PCR, block->i_dts);
+                es_out_SetPCR(demux->out, block->i_dts);
                 es_out_Send(demux->out, sys->es, block);
             }
         }
diff --git a/modules/access/jack.c b/modules/access/jack.c
index fa48b51024..be1afd9806 100644
--- a/modules/access/jack.c
+++ b/modules/access/jack.c
@@ -370,7 +370,7 @@ static int Demux( demux_t *p_demux )
 
     if( p_block )
     {
-        es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_block->i_pts );
+        es_out_SetPCR( p_demux->out, p_block->i_pts );
         es_out_Send( p_demux->out, p_es, p_block );
     }
 
diff --git a/modules/access/linsys/linsys_hdsdi.c b/modules/access/linsys/linsys_hdsdi.c
index b6d439483d..4b48426383 100644
--- a/modules/access/linsys/linsys_hdsdi.c
+++ b/modules/access/linsys/linsys_hdsdi.c
@@ -614,7 +614,7 @@ static int HandleVideo( demux_t *p_demux, const uint8_t *p_buffer )
     p_current_picture->i_dts = p_current_picture->i_pts = p_sys->i_next_vdate;
     es_out_Send( p_demux->out, p_sys->p_es_video, p_current_picture );
 
-    es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_sys->i_next_vdate );
+    es_out_SetPCR( p_demux->out, p_sys->i_next_vdate );
     p_sys->i_next_vdate += p_sys->i_incr;
     return VLC_SUCCESS;
 }
diff --git a/modules/access/linsys/linsys_sdi.c b/modules/access/linsys/linsys_sdi.c
index c641b24c12..23990b7da0 100644
--- a/modules/access/linsys/linsys_sdi.c
+++ b/modules/access/linsys/linsys_sdi.c
@@ -993,7 +993,7 @@ static int DecodeFrame( demux_t *p_demux )
 
     DecodeVideo( p_demux );
 
-    es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_sys->i_next_date );
+    es_out_SetPCR( p_demux->out, p_sys->i_next_date );
     p_sys->i_next_date += p_sys->i_incr;
 
     if( NewFrame( p_demux ) != VLC_SUCCESS )
diff --git a/modules/access/live555.cpp b/modules/access/live555.cpp
index c259455ac9..b8d2fad870 100644
--- a/modules/access/live555.cpp
+++ b/modules/access/live555.cpp
@@ -1379,14 +1379,14 @@ static int Demux( demux_t *p_demux )
                 tk->i_next_block_flags |= BLOCK_FLAG_DISCONTINUITY;
             }
             if( p_sys->i_pcr != VLC_TS_INVALID )
-                es_out_Control( p_demux->out, ES_OUT_SET_PCR, VLC_TS_0 + p_sys->i_pcr );
+                es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_pcr );
         }
         else if( p_sys->i_pcr == VLC_TS_INVALID ||
                  i_minpcr > p_sys->i_pcr + CLOCK_FREQ / 4 )
         {
             p_sys->i_pcr = i_minpcr;
             if( p_sys->i_pcr != VLC_TS_INVALID )
-                es_out_Control( p_demux->out, ES_OUT_SET_PCR, VLC_TS_0 + p_sys->i_pcr );
+                es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_pcr );
         }
     }
 
diff --git a/modules/access/oss.c b/modules/access/oss.c
index 802dbf010f..a6e291c42f 100644
--- a/modules/access/oss.c
+++ b/modules/access/oss.c
@@ -271,7 +271,7 @@ static int Demux( demux_t *p_demux )
             {
                 p_block = GrabAudio( p_demux );
                 if( p_block )
-                    es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_block->i_pts );
+                    es_out_SetPCR( p_demux->out, p_block->i_pts );
             }
         }
     } while( p_block && p_sys->i_next_demux_date > 0 &&
diff --git a/modules/access/pulse.c b/modules/access/pulse.c
index 3ab5d9a2b4..e2a3006c4d 100644
--- a/modules/access/pulse.c
+++ b/modules/access/pulse.c
@@ -174,7 +174,7 @@ static void stream_read_cb(pa_stream *s, size_t length, void *userdata)
     else
         pts -= latency;
 
-    es_out_Control(demux->out, ES_OUT_SET_PCR, pts);
+    es_out_SetPCR(demux->out, pts);
     if (unlikely(sys->es == NULL))
         goto race;
 
diff --git a/modules/access/qtsound.m b/modules/access/qtsound.m
index 6183474a49..947b566527 100644
--- a/modules/access/qtsound.m
+++ b/modules/access/qtsound.m
@@ -521,7 +521,7 @@ static int Demux(demux_t *p_demux)
             return 1;
         }
 
-        es_out_Control(p_demux->out, ES_OUT_SET_PCR, p_blocka->i_pts);
+        es_out_SetPCR(p_demux->out, p_blocka->i_pts);
         es_out_Send(p_demux->out, p_sys->p_es_audio, p_blocka);
     }
 
diff --git a/modules/access/rdp.c b/modules/access/rdp.c
index 926994cbd7..78321452ce 100644
--- a/modules/access/rdp.c
+++ b/modules/access/rdp.c
@@ -408,7 +408,7 @@ static void *DemuxThread( void *p_data )
             if (likely( p_block && p_sys->p_block ))
             {
                 p_sys->p_block->i_dts = p_sys->p_block->i_pts = mdate() - p_sys->i_starttime;
-                es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_sys->p_block->i_pts );
+                es_out_SetPCR( p_demux->out, p_sys->p_block->i_pts );
                 es_out_Send( p_demux->out, p_sys->es, p_sys->p_block );
                 p_sys->p_block = p_block;
             }
diff --git a/modules/access/rtp/rtp.c b/modules/access/rtp/rtp.c
index 9c6c0666b4..5fa7086f93 100644
--- a/modules/access/rtp/rtp.c
+++ b/modules/access/rtp/rtp.c
@@ -443,7 +443,7 @@ void codec_decode (demux_t *demux, void *data, block_t *block)
     if (data)
     {
         block->i_dts = VLC_TS_INVALID; /* RTP does not specify this */
-        es_out_Control (demux->out, ES_OUT_SET_PCR, block->i_pts );
+        es_out_SetPCR(demux->out, block->i_pts);
         es_out_Send (demux->out, (es_out_id_t *)data, block);
     }
     else
diff --git a/modules/access/screen/screen.c b/modules/access/screen/screen.c
index 7fb4a11210..28798da0ae 100644
--- a/modules/access/screen/screen.c
+++ b/modules/access/screen/screen.c
@@ -288,7 +288,7 @@ static int Demux( demux_t *p_demux )
 
     p_block->i_dts = p_block->i_pts = p_sys->i_next_date;
 
-    es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_block->i_pts );
+    es_out_SetPCR( p_demux->out, p_block->i_pts );
     es_out_Send( p_demux->out, p_sys->es, p_block );
 
     p_sys->i_next_date += p_sys->i_incr;
diff --git a/modules/access/screen/wayland.c b/modules/access/screen/wayland.c
index f6b300da20..1e6c178144 100644
--- a/modules/access/screen/wayland.c
+++ b/modules/access/screen/wayland.c
@@ -254,7 +254,7 @@ static void *Thread(void *data)
             block_t *block = Shoot(demux);
 
             block->i_pts = block->i_dts = mdate();
-            es_out_Control(demux->out, ES_OUT_SET_PCR, block->i_pts);
+            es_out_SetPCR(demux->out, block->i_pts);
             es_out_Send(demux->out, sys->es, block);
         }
 
diff --git a/modules/access/screen/xcb.c b/modules/access/screen/xcb.c
index bfdfacf055..7531faf0ff 100644
--- a/modules/access/screen/xcb.c
+++ b/modules/access/screen/xcb.c
@@ -502,7 +502,7 @@ noshm:
     {
         block->i_pts = block->i_dts = mdate ();
 
-        es_out_Control (demux->out, ES_OUT_SET_PCR, block->i_pts);
+        es_out_SetPCR(demux->out, block->i_pts);
         es_out_Send (demux->out, sys->es, block);
     }
     else
diff --git a/modules/access/shm.c b/modules/access/shm.c
index 86ff704a67..2139b2ef85 100644
--- a/modules/access/shm.c
+++ b/modules/access/shm.c
@@ -326,7 +326,7 @@ static void DemuxFile (void *data)
     block->i_pts = block->i_dts = mdate ();
 
     /* Send block */
-    es_out_Control (demux->out, ES_OUT_SET_PCR, block->i_pts);
+    es_out_SetPCR(demux->out, block->i_pts);
     es_out_Send (demux->out, sys->es, block);
 }
 
@@ -349,7 +349,7 @@ static void DemuxIPC (void *data)
     block->i_pts = block->i_dts = mdate ();
 
     /* Send block */
-    es_out_Control (demux->out, ES_OUT_SET_PCR, block->i_pts);
+    es_out_SetPCR(demux->out, block->i_pts);
     es_out_Send (demux->out, sys->es, block);
 }
 
diff --git a/modules/access/timecode.c b/modules/access/timecode.c
index b7116239a8..735d267bcd 100644
--- a/modules/access/timecode.c
+++ b/modules/access/timecode.c
@@ -89,7 +89,7 @@ static int DemuxOnce (demux_t *demux, bool master)
     block->i_length = date_Increment (&sys->date, 1) - pts;
     es_out_Send (demux->out, sys->es, block);
     if (master)
-        es_out_Control (demux->out, ES_OUT_SET_PCR, pts);
+        es_out_SetPCR(demux->out, pts);
     return 1;
 }
 
diff --git a/modules/access/v4l2/demux.c b/modules/access/v4l2/demux.c
index 6c1093bffa..159b39233f 100644
--- a/modules/access/v4l2/demux.c
+++ b/modules/access/v4l2/demux.c
@@ -714,7 +714,7 @@ static void *UserPtrThread (void *data)
         block->i_buffer = buf.length;
         block->i_pts = block->i_dts = GetBufferPTS (&buf);
         block->i_flags |= sys->block_flags;
-        es_out_Control (demux->out, ES_OUT_SET_PCR, block->i_pts);
+        es_out_SetPCR(demux->out, block->i_pts);
         es_out_Send (demux->out, sys->es, block);
     }
     vlc_restorecancel (canc); /* <- hmm, this is purely cosmetic */
@@ -758,7 +758,7 @@ static void *MmapThread (void *data)
             if (block != NULL)
             {
                 block->i_flags |= sys->block_flags;
-                es_out_Control (demux->out, ES_OUT_SET_PCR, block->i_pts);
+                es_out_SetPCR(demux->out, block->i_pts);
                 es_out_Send (demux->out, sys->es, block);
             }
             vlc_restorecancel (canc);
@@ -819,7 +819,7 @@ static void *ReadThread (void *data)
             if (val != -1)
             {
                 block->i_buffer = val;
-                es_out_Control (demux->out, ES_OUT_SET_PCR, block->i_pts);
+                es_out_SetPCR(demux->out, block->i_pts);
                 es_out_Send (demux->out, sys->es, block);
             }
             else
diff --git a/modules/access/vnc.c b/modules/access/vnc.c
index 82b8f3c1a9..eb08926c4b 100644
--- a/modules/access/vnc.c
+++ b/modules/access/vnc.c
@@ -367,7 +367,7 @@ static void *DemuxThread( void *p_data )
                 if ( p_block ) /* drop frame/content if no next block */
                 {
                     p_sys->p_block->i_dts = p_sys->p_block->i_pts = mdate();
-                    es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_sys->p_block->i_pts );
+                    es_out_SetPCR( p_demux->out, p_sys->p_block->i_pts );
                     es_out_Send( p_demux->out, p_sys->es, p_sys->p_block );
                     p_sys->p_block = p_block;
                 }
diff --git a/modules/access/wasapi.c b/modules/access/wasapi.c
index 296e2feda2..77d985600c 100644
--- a/modules/access/wasapi.c
+++ b/modules/access/wasapi.c
@@ -327,7 +327,7 @@ static unsigned __stdcall Thread(void *data)
 
         pts = mdate() - ((GetQPC() - qpc) / 10);
 
-        es_out_Control(demux->out, ES_OUT_SET_PCR, pts);
+        es_out_SetPCR(demux->out, pts);
 
         size_t bytes = frames * sys->frame_size;
         block_t *block = block_Alloc(bytes);
diff --git a/modules/demux/aiff.c b/modules/demux/aiff.c
index 6413b86d3e..e87d216098 100644
--- a/modules/demux/aiff.c
+++ b/modules/demux/aiff.c
@@ -247,7 +247,7 @@ static int Demux( demux_t *p_demux )
     }
 
     /* Set PCR */
-    es_out_Control( p_demux->out, ES_OUT_SET_PCR, VLC_TS_0 + p_sys->i_time);
+    es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_time);
 
     /* we will read 100ms at once */
     i_read = p_sys->i_ssnd_fsize * ( p_sys->fmt.audio.i_rate / 10 );
diff --git a/modules/demux/asf/asf.c b/modules/demux/asf/asf.c
index deaf02a968..65603d75c7 100644
--- a/modules/demux/asf/asf.c
+++ b/modules/demux/asf/asf.c
@@ -248,7 +248,7 @@ static int Demux( demux_t *p_demux )
         bool b_data = Block_Dequeue( p_demux, p_sys->i_time + CHUNK );
 
         p_sys->i_time += CHUNK;
-        es_out_Control( p_demux->out, ES_OUT_SET_PCR, VLC_TS_0 + p_sys->i_time );
+        es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_time );
 #ifdef ASF_DEBUG
         msg_Dbg( p_demux, "Demux Loop Setting PCR to %"PRId64, VLC_TS_0 + p_sys->i_time );
 #endif
@@ -681,7 +681,7 @@ static bool Block_Dequeue( demux_t *p_demux, mtime_t i_nexttime )
 
             if( p_sys->i_time < VLC_TS_0 )
             {
-                es_out_Control( p_demux->out, ES_OUT_SET_PCR, VLC_TS_0 + p_sys->i_time );
+                es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_time );
 #ifdef ASF_DEBUG
                 msg_Dbg( p_demux, "    dequeue setting PCR to %"PRId64, VLC_TS_0 + p_sys->i_time );
 #endif
diff --git a/modules/demux/au.c b/modules/demux/au.c
index baf20a4eb8..0cda4bf73e 100644
--- a/modules/demux/au.c
+++ b/modules/demux/au.c
@@ -312,7 +312,7 @@ static int Demux( demux_t *p_demux )
     block_t     *p_block;
 
     /* set PCR */
-    es_out_Control( p_demux->out, ES_OUT_SET_PCR, VLC_TS_0 + p_sys->i_time );
+    es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_time );
 
     p_block = vlc_stream_Block( p_demux->s, p_sys->i_frame_size );
     if( p_block == NULL )
diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c
index 0d299a93d8..22fa9aae5a 100644
--- a/modules/demux/avformat/demux.c
+++ b/modules/demux/avformat/demux.c
@@ -823,7 +823,7 @@ static int Demux( demux_t *p_demux )
     if( i_ts_min >= p_sys->i_pcr )
     {
         p_sys->i_pcr = i_ts_min;
-        es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_sys->i_pcr );
+        es_out_SetPCR( p_demux->out, p_sys->i_pcr );
         UpdateSeekPoint( p_demux, p_sys->i_pcr );
     }
 
diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c
index 34b867d721..e71a046838 100644
--- a/modules/demux/avi/avi.c
+++ b/modules/demux/avi/avi.c
@@ -1046,7 +1046,7 @@ static int Demux_Seekable( demux_t *p_demux )
     }
 
     /* wait for the good time */
-    es_out_Control( p_demux->out, ES_OUT_SET_PCR, VLC_TS_0 + p_sys->i_time );
+    es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_time );
     p_sys->i_time += p_sys->i_read_increment;
 
     /* init toread */
@@ -1351,7 +1351,7 @@ static int Demux_UnSeekable( demux_t *p_demux )
     unsigned int i_stream;
     unsigned int i_packet;
 
-    es_out_Control( p_demux->out, ES_OUT_SET_PCR, VLC_TS_0 + p_sys->i_time );
+    es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_time );
 
     /* *** find master stream for data packet skipping algo *** */
     /* *** -> first video, if any, or first audio ES *** */
@@ -1610,7 +1610,7 @@ static int Seek( demux_t *p_demux, mtime_t i_date, int i_percent )
             p_stream->b_eof = AVI_TrackSeek( p_demux, i_stream, i_date ) != 0;
         }
         p_sys->i_time = i_date;
-        es_out_Control( p_demux->out, ES_OUT_SET_PCR, VLC_TS_0 + p_sys->i_time );
+        es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_time );
         es_out_Control( p_demux->out, ES_OUT_SET_NEXT_DISPLAY_TIME, VLC_TS_0 + p_sys->i_time );
         msg_Dbg( p_demux, "seek: %"PRId64" seconds", p_sys->i_time /CLOCK_FREQ );
         return VLC_SUCCESS;
diff --git a/modules/demux/caf.c b/modules/demux/caf.c
index b44e1b625e..cce8e93afb 100644
--- a/modules/demux/caf.c
+++ b/modules/demux/caf.c
@@ -987,7 +987,7 @@ static int Demux( demux_t *p_demux )
     FrameSpanAddSpan( &p_sys->position, &advance );
 
     /* set PCR */
-    es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_block->i_pts );
+    es_out_SetPCR( p_demux->out, p_block->i_pts );
 
     es_out_Send( p_demux->out, p_sys->es, p_block );
 
diff --git a/modules/demux/cdg.c b/modules/demux/cdg.c
index d5679d6d93..c36bac3488 100644
--- a/modules/demux/cdg.c
+++ b/modules/demux/cdg.c
@@ -143,7 +143,7 @@ static int Demux( demux_t *p_demux )
         p_block->i_pts = date_Get( &p_sys->pts );
     }
 
-    es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_block->i_pts );
+    es_out_SetPCR( p_demux->out, p_block->i_pts );
 
     es_out_Send( p_demux->out, p_sys->p_es, p_block );
 
diff --git a/modules/demux/dirac.c b/modules/demux/dirac.c
index 045f8a9098..c6eb7180ce 100644
--- a/modules/demux/dirac.c
+++ b/modules/demux/dirac.c
@@ -205,7 +205,7 @@ static int Demux( demux_t *p_demux)
                 p_sys->i_pts_offset_lowtide = i_delay;
             }
 
-            es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_block_out->i_dts );
+            es_out_SetPCR( p_demux->out, p_block_out->i_dts );
             es_out_Send( p_demux->out, p_sys->p_es, p_block_out );
 
             p_block_out = p_next;
diff --git a/modules/demux/flac.c b/modules/demux/flac.c
index a9966ada1c..74769e7df4 100644
--- a/modules/demux/flac.c
+++ b/modules/demux/flac.c
@@ -365,13 +365,13 @@ static int Demux( demux_t *p_demux )
 
             /* set PCR */
             if( unlikely(p_sys->i_pts == VLC_TS_INVALID) )
-                es_out_Control( p_demux->out, ES_OUT_SET_PCR, __MAX(p_block_out->i_dts - 1, VLC_TS_0) );
+                es_out_SetPCR( p_demux->out, __MAX(p_block_out->i_dts - 1, VLC_TS_0) );
 
             p_sys->i_pts = p_block_out->i_dts;
 
             es_out_Send( p_demux->out, p_sys->p_es, p_block_out );
 
-            es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_sys->i_pts );
+            es_out_SetPCR( p_demux->out, p_sys->i_pts );
 
             p_block_out = p_next;
         }
diff --git a/modules/demux/gme.c b/modules/demux/gme.c
index 40dbcd02d5..0a4d20be6c 100644
--- a/modules/demux/gme.c
+++ b/modules/demux/gme.c
@@ -227,7 +227,7 @@ static int Demux (demux_t *demux)
     }
 
     block->i_pts = block->i_dts = VLC_TS_0 + date_Get (&sys->pts);
-    es_out_Control (demux->out, ES_OUT_SET_PCR, block->i_pts);
+    es_out_SetPCR (demux->out, block->i_pts);
     es_out_Send (demux->out, sys->es, block);
     date_Increment (&sys->pts, SAMPLES);
     return 1;
diff --git a/modules/demux/image.c b/modules/demux/image.c
index 76a83cd652..90cfc3ccb4 100644
--- a/modules/demux/image.c
+++ b/modules/demux/image.c
@@ -198,7 +198,7 @@ static int Demux(demux_t *demux)
         deadline = mdate();
         const mtime_t max_wait = CLOCK_FREQ / 50;
         if (deadline + max_wait < pts_first) {
-            es_out_Control(demux->out, ES_OUT_SET_PCR, deadline);
+            es_out_SetPCR(demux->out, deadline);
             /* That's ugly, but not yet easily fixable */
             mwait(deadline + max_wait);
             return 1;
@@ -221,7 +221,7 @@ static int Demux(demux_t *demux)
 
         data->i_dts =
         data->i_pts = VLC_TS_0 + pts;
-        es_out_Control(demux->out, ES_OUT_SET_PCR, data->i_pts);
+        es_out_SetPCR(demux->out, data->i_pts);
         es_out_Send(demux->out, sys->es, data);
 
         date_Increment(&sys->pts, 1);
diff --git a/modules/demux/mjpeg.c b/modules/demux/mjpeg.c
index 81db1002db..2d7dde7c3c 100644
--- a/modules/demux/mjpeg.c
+++ b/modules/demux/mjpeg.c
@@ -280,7 +280,7 @@ static int SendBlock( demux_t *p_demux, int i )
     p_block->i_dts = p_block->i_pts;
 
     /* set PCR */
-    es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_block->i_pts );
+    es_out_SetPCR( p_demux->out, p_block->i_pts );
     es_out_Send( p_demux->out, p_sys->p_es, p_block );
 
     if( p_sys->b_still )
diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index d7d969aecb..ecb57f8cd2 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -784,7 +784,7 @@ static int Demux( demux_t *p_demux)
 
         if( i_pcr > VLC_TS_INVALID && i_pcr > p_sys->i_pcr )
         {
-            if( es_out_Control( p_demux->out, ES_OUT_SET_PCR, i_pcr ) )
+            if( es_out_SetPCR( p_demux->out, i_pcr ) )
             {
                 msg_Err( p_demux, "ES_OUT_SET_PCR failed, aborting." );
                 return 0;
diff --git a/modules/demux/mod.c b/modules/demux/mod.c
index 73bf7be4a8..58d6a9e792 100644
--- a/modules/demux/mod.c
+++ b/modules/demux/mod.c
@@ -282,7 +282,7 @@ static int Demux( demux_t *p_demux )
     p_frame->i_pts = VLC_TS_0 + date_Get( &p_sys->pts );
 
     /* Set PCR */
-    es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_frame->i_pts );
+    es_out_SetPCR( p_demux->out, p_frame->i_pts );
 
     /* Send data */
     es_out_Send( p_demux->out, p_sys->es, p_frame );
diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 663abf6fc7..f8b8d242bf 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -1260,7 +1260,7 @@ static int DemuxTrack( demux_t *p_demux, mp4_track_t *tk, uint64_t i_readpos,
             /* !important! Ensure clock is set before sending data */
             if( p_demux->p_sys->i_pcr == VLC_TS_INVALID )
             {
-                es_out_Control( p_demux->out, ES_OUT_SET_PCR, VLC_TS_0 + i_current_nzdts );
+                es_out_SetPCR( p_demux->out, VLC_TS_0 + i_current_nzdts );
                 p_demux->p_sys->i_pcr = VLC_TS_0 + i_current_nzdts;
             }
 
@@ -1410,7 +1410,7 @@ static int DemuxMoov( demux_t *p_demux )
     if( p_sys->i_pcr > VLC_TS_INVALID )
     {
         p_sys->i_pcr = VLC_TS_0 + MP4_rescale( p_sys->i_time, p_sys->i_timescale, CLOCK_FREQ );
-        es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_sys->i_pcr );
+        es_out_SetPCR( p_demux->out, p_sys->i_pcr );
     }
 
     /* */
@@ -4350,7 +4350,7 @@ static int DemuxMoof( demux_t *p_demux )
 
     /* !important! Ensure clock is set before sending data */
     if( p_sys->i_pcr == VLC_TS_INVALID )
-        es_out_Control( p_demux->out, ES_OUT_SET_PCR, VLC_TS_0 + i_nztime );
+        es_out_SetPCR( p_demux->out, VLC_TS_0 + i_nztime );
 
     /* demux up to increment amount of data on every track, or just set pcr if empty data */
     for( ;; )
@@ -4416,7 +4416,7 @@ static int DemuxMoof( demux_t *p_demux )
     {
         p_sys->i_time += __MAX(i_scaledincrement, 1);
         p_sys->i_pcr = VLC_TS_0 + MP4_rescale( p_sys->i_time, p_sys->i_timescale, CLOCK_FREQ );
-        es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_sys->i_pcr );
+        es_out_SetPCR( p_demux->out, p_sys->i_pcr );
     }
     else
     {
@@ -4435,7 +4435,7 @@ static int DemuxMoof( demux_t *p_demux )
         {
             p_sys->i_time = i_segment_end;
             p_sys->i_pcr = VLC_TS_0 + MP4_rescale( p_sys->i_time, p_sys->i_timescale, CLOCK_FREQ );
-            es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_sys->i_pcr );
+            es_out_SetPCR( p_demux->out, p_sys->i_pcr );
         }
     }
 
@@ -4941,7 +4941,7 @@ end:
                 i_demux_end = i_track_end;
         }
         if( i_demux_end != INT64_MIN )
-            es_out_Control( p_demux->out, ES_OUT_SET_PCR, VLC_TS_0 + i_demux_end );
+            es_out_SetPCR( p_demux->out, VLC_TS_0 + i_demux_end );
     }
 
     return i_status;
diff --git a/modules/demux/mpc.c b/modules/demux/mpc.c
index 75ea342e9b..f8648b7b85 100644
--- a/modules/demux/mpc.c
+++ b/modules/demux/mpc.c
@@ -295,7 +295,7 @@ static int Demux( demux_t *p_demux )
     p_data->i_dts = p_data->i_pts =
             VLC_TS_0 + CLOCK_FREQ * p_sys->i_position / p_sys->info.sample_freq;
 
-    es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_data->i_dts );
+    es_out_SetPCR( p_demux->out, p_data->i_dts );
 
     es_out_Send( p_demux->out, p_sys->p_es, p_data );
 
diff --git a/modules/demux/mpeg/es.c b/modules/demux/mpeg/es.c
index a86b370198..5d646ac2c4 100644
--- a/modules/demux/mpeg/es.c
+++ b/modules/demux/mpeg/es.c
@@ -347,7 +347,7 @@ static int Demux( demux_t *p_demux )
         if( p_block_out->i_dts > VLC_TS_INVALID )
         {
             p_block_out->i_dts += p_sys->i_time_offset;
-            es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_block_out->i_dts );
+            es_out_SetPCR( p_demux->out, p_block_out->i_dts );
         }
         /* Re-estimate bitrate */
         if( p_sys->b_estimate_bitrate && p_sys->i_pts > INT64_C(500000) )
diff --git a/modules/demux/mpeg/h26x.c b/modules/demux/mpeg/h26x.c
index 04e71d51f5..fb5114f269 100644
--- a/modules/demux/mpeg/h26x.c
+++ b/modules/demux/mpeg/h26x.c
@@ -472,7 +472,7 @@ static int Demux( demux_t *p_demux)
                     msg_Dbg( p_demux, "using %.2f fps", (double) p_sys->frame_rate_num / p_sys->frame_rate_den );
                 }
 
-                es_out_Control( p_demux->out, ES_OUT_SET_PCR, date_Get( &p_sys->dts ) );
+                es_out_SetPCR( p_demux->out, date_Get( &p_sys->dts ) );
                 unsigned i_nb_fields;
                 if( i_frame_length > 0 )
                 {
diff --git a/modules/demux/mpeg/mpgv.c b/modules/demux/mpeg/mpgv.c
index c8d3e3ed39..47be270dbe 100644
--- a/modules/demux/mpeg/mpgv.c
+++ b/modules/demux/mpeg/mpgv.c
@@ -170,7 +170,7 @@ static int Demux( demux_t *p_demux )
         {
             block_t *p_next = p_block_out->p_next;
 
-            es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_block_out->i_dts );
+            es_out_SetPCR( p_demux->out, p_block_out->i_dts );
 
             p_block_out->p_next = NULL;
             es_out_Send( p_demux->out, p_sys->p_es, p_block_out );
diff --git a/modules/demux/mpeg/ps.c b/modules/demux/mpeg/ps.c
index bf8abb75bb..a92648e6b9 100644
--- a/modules/demux/mpeg/ps.c
+++ b/modules/demux/mpeg/ps.c
@@ -455,7 +455,7 @@ static int Demux( demux_t *p_demux )
             p_sys->i_lastpack_byte = vlc_stream_Tell( p_demux->s );
             if( !p_sys->b_have_pack ) p_sys->b_have_pack = true;
             /* done later on to work around bad vcd/svcd streams */
-            /* es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_sys->i_scr ); */
+            /* es_out_SetPCR( p_demux->out, p_sys->i_scr ); */
             if( i_mux_rate > 0 ) p_sys->i_mux_rate = i_mux_rate;
         }
         block_Release( p_pkt );
@@ -574,7 +574,7 @@ static int Demux( demux_t *p_demux )
                     p_sys->i_first_scr = -1;
                 }
                 else
-                    es_out_Control( p_demux->out, ES_OUT_SET_PCR, VLC_TS_0 + p_sys->i_pack_scr );
+                    es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_pack_scr );
             }
 
             if( tk->b_configured && tk->es &&
@@ -606,7 +606,7 @@ static int Demux( demux_t *p_demux )
                     p_sys->i_scr = p_pkt->i_pts;
                     if( p_sys->i_first_scr == -1 )
                         p_sys->i_first_scr = p_sys->i_scr;
-                    es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_pkt->i_pts );
+                    es_out_SetPCR( p_demux->out, p_pkt->i_pts );
                 }
 
                 if( tk->fmt.i_codec == VLC_CODEC_TELETEXT &&
diff --git a/modules/demux/nsv.c b/modules/demux/nsv.c
index a30667da65..033149c220 100644
--- a/modules/demux/nsv.c
+++ b/modules/demux/nsv.c
@@ -207,7 +207,7 @@ static int Demux( demux_t *p_demux )
     }
 
     /* Set PCR */
-    es_out_Control( p_demux->out, ES_OUT_SET_PCR, VLC_TS_0 + p_sys->i_pcr );
+    es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_pcr );
 
     /* Read video */
     i_size = ( header[0] >> 4 ) | ( header[1] << 4 ) | ( header[2] << 12 );
diff --git a/modules/demux/nuv.c b/modules/demux/nuv.c
index b8d88a4bee..16aa90f7d4 100644
--- a/modules/demux/nuv.c
+++ b/modules/demux/nuv.c
@@ -401,7 +401,7 @@ static int Demux( demux_t *p_demux )
     if( p_sys->i_pcr < 0 || p_sys->i_pcr < p_data->i_dts - VLC_TS_0 )
     {
         p_sys->i_pcr = p_data->i_dts - VLC_TS_0;
-        es_out_Control( p_demux->out, ES_OUT_SET_PCR, VLC_TS_0 + p_sys->i_pcr );
+        es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_pcr );
     }
 
     if( fh.i_type == 'A' && p_sys->p_es_audio )
diff --git a/modules/demux/ogg.c b/modules/demux/ogg.c
index 3ca3ac0dd1..2bf003e37d 100644
--- a/modules/demux/ogg.c
+++ b/modules/demux/ogg.c
@@ -321,7 +321,7 @@ static int Demux( demux_t * p_demux )
             if( i_lastpcr > VLC_TS_INVALID )
             {
                 p_sys->i_nzpcr_offset = i_lastpcr - VLC_TS_0;
-                es_out_Control( p_demux->out, ES_OUT_SET_PCR, i_lastpcr );
+                es_out_SetPCR( p_demux->out, i_lastpcr );
             }
             p_sys->i_pcr = VLC_TS_INVALID;
         }
@@ -691,7 +691,7 @@ static int Demux( demux_t * p_demux )
         if( ! b_skipping && p_sys->b_preparsing_done )
         {
             p_sys->i_pcr = i_pcr_candidate;
-            es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_sys->i_pcr );
+            es_out_SetPCR( p_demux->out, p_sys->i_pcr );
         }
     }
 
@@ -1157,7 +1157,7 @@ static void Ogg_SendOrQueueBlocks( demux_t *p_demux, logical_stream_t *p_stream,
                 if ( p_ogg->i_pcr < VLC_TS_0 && i_firstpts > VLC_TS_INVALID )
                 {
                     p_ogg->i_pcr = i_firstpts;
-                    es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_ogg->i_pcr );
+                    es_out_SetPCR( p_demux->out, p_ogg->i_pcr );
                 }
             }
             p_stream->p_preparse_block = NULL;
diff --git a/modules/demux/pva.c b/modules/demux/pva.c
index ec47f0c64b..106a0fc049 100644
--- a/modules/demux/pva.c
+++ b/modules/demux/pva.c
@@ -217,7 +217,7 @@ static int Demux( demux_t *p_demux )
 
                     if( p_frame->i_pts > VLC_TS_INVALID && !p_sys->b_pcr_audio )
                     {
-                        es_out_Control( p_demux->out, ES_OUT_SET_PCR, (int64_t)p_frame->i_pts);
+                        es_out_SetPCR( p_demux->out, p_frame->i_pts);
                     }
                     es_out_Send( p_demux->out, p_sys->p_video, p_frame );
 
@@ -446,7 +446,7 @@ static void ParsePES( demux_t *p_demux )
     /* Set PCR */
     if( p_pes->i_pts > 0 )
     {
-        es_out_Control( p_demux->out, ES_OUT_SET_PCR, (int64_t)p_pes->i_pts);
+        es_out_SetPCR( p_demux->out, p_pes->i_pts);
         p_sys->b_pcr_audio = true;
     }
     es_out_Send( p_demux->out, p_sys->p_audio, p_pes );
diff --git a/modules/demux/rawaud.c b/modules/demux/rawaud.c
index 968bc4af2d..241900a1c3 100644
--- a/modules/demux/rawaud.c
+++ b/modules/demux/rawaud.c
@@ -253,7 +253,7 @@ static int Demux( demux_t *p_demux )
 
     p_block->i_dts = p_block->i_pts = VLC_TS_0 + date_Get( &p_sys->pts );
 
-    es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_block->i_pts );
+    es_out_SetPCR( p_demux->out, p_block->i_pts );
     es_out_Send( p_demux->out, p_sys->p_es, p_block );
 
     date_Increment( &p_sys->pts, p_sys->i_frame_samples );
diff --git a/modules/demux/rawdv.c b/modules/demux/rawdv.c
index 76d4c63d41..c081982f69 100644
--- a/modules/demux/rawdv.c
+++ b/modules/demux/rawdv.c
@@ -263,7 +263,7 @@ static int Demux( demux_t *p_demux )
     }
 
     /* Call the pace control */
-    es_out_Control( p_demux->out, ES_OUT_SET_PCR, VLC_TS_0 + p_sys->i_pcr );
+    es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_pcr );
     p_block = vlc_stream_Block( p_demux->s, p_sys->frame_size );
     if( p_block == NULL )
     {
diff --git a/modules/demux/rawvid.c b/modules/demux/rawvid.c
index cfaf69487e..6bcfa68653 100644
--- a/modules/demux/rawvid.c
+++ b/modules/demux/rawvid.c
@@ -385,7 +385,7 @@ static int Demux( demux_t *p_demux )
     mtime_t i_pcr = date_Get( &p_sys->pcr );
 
     /* Call the pace control */
-    es_out_Control( p_demux->out, ES_OUT_SET_PCR, VLC_TS_0 + i_pcr );
+    es_out_SetPCR( p_demux->out, VLC_TS_0 + i_pcr );
 
     if( p_sys->b_y4m )
     {
diff --git a/modules/demux/real.c b/modules/demux/real.c
index be5fe9fd94..72dba3b099 100644
--- a/modules/demux/real.c
+++ b/modules/demux/real.c
@@ -354,7 +354,7 @@ static int Demux( demux_t *p_demux )
     if( i_pcr > VLC_TS_INVALID && i_pcr != p_sys->i_pcr )
     {
         p_sys->i_pcr = i_pcr;
-        es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_sys->i_pcr );
+        es_out_SetPCR( p_demux->out, p_sys->i_pcr );
     }
     return 1;
 }
@@ -506,7 +506,7 @@ static void CheckPcr( demux_t *p_demux, real_track_t *tk, mtime_t i_dts )
         return;
 
     p_sys->i_pcr = i_dts;
-    es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_sys->i_pcr );
+    es_out_SetPCR( p_demux->out, p_sys->i_pcr );
 }
 
 static void DemuxVideo( demux_t *p_demux, real_track_t *tk, mtime_t i_dts, unsigned i_flags )
diff --git a/modules/demux/sid.cpp b/modules/demux/sid.cpp
index 332a6d4102..9d768ee350 100644
--- a/modules/demux/sid.cpp
+++ b/modules/demux/sid.cpp
@@ -220,7 +220,7 @@ static int Demux (demux_t *demux)
     block->i_buffer = i_read;
     block->i_pts = block->i_dts = VLC_TS_0 + date_Get (&sys->pts);
 
-    es_out_Control (demux->out, ES_OUT_SET_PCR, block->i_pts);
+    es_out_SetPCR (demux->out, block->i_pts);
 
     es_out_Send (demux->out, sys->es, block);
 
diff --git a/modules/demux/smf.c b/modules/demux/smf.c
index 1c1c8a61cd..37b16d6ac5 100644
--- a/modules/demux/smf.c
+++ b/modules/demux/smf.c
@@ -452,7 +452,7 @@ static int Demux (demux_t *demux)
         tick->i_dts = tick->i_pts = sys->tick;
 
         es_out_Send (demux->out, sys->es, tick);
-        es_out_Control (demux->out, ES_OUT_SET_PCR, sys->tick);
+        es_out_SetPCR (demux->out, sys->tick);
 
         sys->tick += TICK;
         return 1;
diff --git a/modules/demux/stl.c b/modules/demux/stl.c
index b006821e40..238b515cc6 100644
--- a/modules/demux/stl.c
+++ b/modules/demux/stl.c
@@ -183,7 +183,7 @@ static int Demux(demux_t *demux)
 
         if (!sys->b_slave && sys->b_first_time)
         {
-            es_out_Control(demux->out, ES_OUT_SET_PCR, VLC_TS_0 + i_barrier);
+            es_out_SetPCR(demux->out, VLC_TS_0 + i_barrier);
             sys->b_first_time = false;
         }
 
@@ -213,7 +213,7 @@ static int Demux(demux_t *demux)
 
     if (!sys->b_slave)
     {
-        es_out_Control(demux->out, ES_OUT_SET_PCR, VLC_TS_0 + i_barrier);
+        es_out_SetPCR(demux->out, VLC_TS_0 + i_barrier);
         sys->next_date += CLOCK_FREQ / 8;
     }
 
diff --git a/modules/demux/subtitle.c b/modules/demux/subtitle.c
index ebba2602d6..cf3e4c30c2 100644
--- a/modules/demux/subtitle.c
+++ b/modules/demux/subtitle.c
@@ -803,7 +803,7 @@ static int Demux( demux_t *p_demux )
 
         if ( !p_sys->b_slave && p_sys->b_first_time )
         {
-            es_out_Control( p_demux->out, ES_OUT_SET_PCR, VLC_TS_0 + i_barrier );
+            es_out_SetPCR( p_demux->out, VLC_TS_0 + i_barrier );
             p_sys->b_first_time = false;
         }
 
@@ -836,7 +836,7 @@ static int Demux( demux_t *p_demux )
 
     if ( !p_sys->b_slave )
     {
-        es_out_Control( p_demux->out, ES_OUT_SET_PCR, VLC_TS_0 + i_barrier );
+        es_out_SetPCR( p_demux->out, VLC_TS_0 + i_barrier );
         p_sys->i_next_demux_date += CLOCK_FREQ / 8;
     }
 
diff --git a/modules/demux/tta.c b/modules/demux/tta.c
index c95a9a156c..2da7460cc9 100644
--- a/modules/demux/tta.c
+++ b/modules/demux/tta.c
@@ -211,7 +211,7 @@ static int Demux( demux_t *p_demux )
 
     p_sys->i_currentframe++;
 
-    es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_data->i_dts );
+    es_out_SetPCR( p_demux->out, p_data->i_dts );
     if( p_sys->p_es )
         es_out_Send( p_demux->out, p_sys->p_es, p_data );
 
diff --git a/modules/demux/ttml.c b/modules/demux/ttml.c
index 146d129ff8..a22cbb6a79 100644
--- a/modules/demux/ttml.c
+++ b/modules/demux/ttml.c
@@ -351,7 +351,7 @@ static int Demux( demux_t* p_demux )
 
         if ( !p_sys->b_slave && p_sys->b_first_time )
         {
-            es_out_Control( p_demux->out, ES_OUT_SET_PCR, VLC_TS_0 + i_playbacktime );
+            es_out_SetPCR( p_demux->out, VLC_TS_0 + i_playbacktime );
             p_sys->b_first_time = false;
         }
 
@@ -381,7 +381,7 @@ static int Demux( demux_t* p_demux )
 
     if ( !p_sys->b_slave )
     {
-        es_out_Control( p_demux->out, ES_OUT_SET_PCR, VLC_TS_0 + p_sys->i_next_demux_time );
+        es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_next_demux_time );
         p_sys->i_next_demux_time += CLOCK_FREQ / 8;
     }
 
diff --git a/modules/demux/vc1.c b/modules/demux/vc1.c
index 57c85c1de9..41d2366921 100644
--- a/modules/demux/vc1.c
+++ b/modules/demux/vc1.c
@@ -170,7 +170,7 @@ static int Demux( demux_t *p_demux)
                 p_sys->p_es = es_out_Add( p_demux->out, &p_sys->p_packetizer->fmt_out);
             }
 
-            es_out_Control( p_demux->out, ES_OUT_SET_PCR, VLC_TS_0 + p_sys->i_dts );
+            es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_dts );
             p_block_out->i_dts = VLC_TS_0 + p_sys->i_dts;
             p_block_out->i_pts = VLC_TS_0 + p_sys->i_dts;
 
diff --git a/modules/demux/voc.c b/modules/demux/voc.c
index 25b77e8394..f5bcd52e02 100644
--- a/modules/demux/voc.c
+++ b/modules/demux/voc.c
@@ -514,7 +514,7 @@ static int Demux( demux_t *p_demux )
     p_block->i_dts = p_block->i_pts = VLC_TS_0 + date_Get( &p_sys->pts );
     p_block->i_nb_samples = i_read_frames * p_sys->fmt.audio.i_frame_length;
     date_Increment( &p_sys->pts, p_block->i_nb_samples );
-    es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_block->i_pts );
+    es_out_SetPCR( p_demux->out, p_block->i_pts );
     es_out_Send( p_demux->out, p_sys->p_es, p_block );
 
     return 1;
diff --git a/modules/demux/wav.c b/modules/demux/wav.c
index f490039908..ab94767f06 100644
--- a/modules/demux/wav.c
+++ b/modules/demux/wav.c
@@ -471,7 +471,7 @@ static int Demux( demux_t *p_demux )
     p_block->i_pts = VLC_TS_0 + date_Get( &p_sys->pts );
 
     /* set PCR */
-    es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_block->i_pts );
+    es_out_SetPCR( p_demux->out, p_block->i_pts );
 
     /* Do the channel reordering */
     if( p_sys->i_chans_to_reorder )
diff --git a/modules/demux/xa.c b/modules/demux/xa.c
index f673002a18..40dc4e08f7 100644
--- a/modules/demux/xa.c
+++ b/modules/demux/xa.c
@@ -186,7 +186,7 @@ static int Demux( demux_t *p_demux )
 
     i_frames = p_block->i_buffer / p_sys->i_frame_size;
     p_block->i_dts = p_block->i_pts = date_Get( &p_sys->pts );
-    es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_block->i_pts );
+    es_out_SetPCR( p_demux->out, p_block->i_pts );
     es_out_Send( p_demux->out, p_sys->p_es, p_block );
 
     date_Increment( &p_sys->pts, i_frames * FRAME_LENGTH );
diff --git a/modules/misc/stats.c b/modules/misc/stats.c
index a0401b6da3..427ec5f3be 100644
--- a/modules/misc/stats.c
+++ b/modules/misc/stats.c
@@ -154,7 +154,7 @@ static int Demux( demux_t *p_demux )
 
     msg_Dbg( p_demux, "demux got %d ms offset", (int)(mdate() - *(mtime_t *)p_block->p_buffer) / 1000 );
 
-    //es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_block->i_pts );
+    //es_out_SetPCR( p_demux->out, p_block->i_pts );
 
     es_out_Send( p_demux->out, p_sys->p_es, p_block );
 




More information about the vlc-commits mailing list