Commit c375cdfc authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

Use the actual pts in qtcapture.

This works, but perhaps i'm loosing too much precission here. Are there better ways to change timevalue + scale into walltime ?
parent 9edde94f
...@@ -107,7 +107,7 @@ vlc_module_end(); ...@@ -107,7 +107,7 @@ vlc_module_end();
{ {
imageBufferToRelease = currentImageBuffer; imageBufferToRelease = currentImageBuffer;
currentImageBuffer = videoFrame; currentImageBuffer = videoFrame;
currentPts = [sampleBuffer presentationTime].timeValue; currentPts = 1000000L / [sampleBuffer presentationTime].timeScale * [sampleBuffer presentationTime].timeValue;
} }
CVBufferRelease(imageBufferToRelease); CVBufferRelease(imageBufferToRelease);
} }
...@@ -356,9 +356,6 @@ static int Demux( demux_t *p_demux ) ...@@ -356,9 +356,6 @@ static int Demux( demux_t *p_demux )
return 1; return 1;
} }
/* FIXME */
p_block->i_pts = mdate();
es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_block->i_pts ); es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_block->i_pts );
es_out_Send( p_demux->out, p_sys->p_es_video, p_block ); es_out_Send( p_demux->out, p_sys->p_es_video, p_block );
...@@ -390,12 +387,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) ...@@ -390,12 +387,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
*pi64 = (int64_t)DEFAULT_PTS_DELAY; *pi64 = (int64_t)DEFAULT_PTS_DELAY;
return VLC_SUCCESS; return VLC_SUCCESS;
case DEMUX_GET_TIME:
pi64 = (int64_t*)va_arg( args, int64_t * );
*pi64 = mdate();
return VLC_SUCCESS;
/* TODO implement others */
default: default:
return VLC_EGENERIC; return VLC_EGENERIC;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment