[MPlayer-dev-eng] [RFC] EDL seeking and timing

Vlad Seryakov vseryakov at gmail.com
Thu Sep 2 03:40:26 CEST 2010


On Sep 1, 2010, at 8:41 PM, Reynaldo H. Verdejo Pinochet wrote:

> Hi Vlad
> 
> On Wed, Sep 01, 2010 at 03:57:17PM -0400, Vlad Seryakov wrote:
>> 
>> On Sep 1, 2010, at 1:17 PM, Reynaldo H. Verdejo Pinochet wrote:
>>> [...] 
>>> 
>>> Wouldn't using CONF_TYPE_FLOAT with a 0 default serve the same purpose
>>> and add the possibility of using a diferent start without making the
>>> added code more complex at all?
>>> 
>> 
>> You mean storing actual start pts in this conf variable? Still need a flag to enable this feature so i decided for now keep it simple
>> I can make it double, for this code it does not matter.
> 
> I meant to say you can add the possiblility for the user to
> convert positions in the EDL file to be relative to any value
> , not necesarily starting from 0 which is your particular case.
> Anyway, nevermind. You can add that latter if you find it
> worth your time.
> 

I changed type to double jus tin case

>> Index: mplayer.c
>> ===================================================================
>> --- mplayer.c	(revision 32037)
>> +++ mplayer.c	(working copy)
>> @@ -142,7 +142,7 @@
>> int quiet=0;
>> int enable_mouse_movements=0;
>> float start_volume = -1;
>> -
>> +double start_pts = MP_NOPTS_VALUE;
>> char *heartbeat_cmd;
>> 
>> #define ROUND(x) ((int)((x)<0 ? (x)-0.5 : (x)+0.5))
>> @@ -339,6 +339,7 @@
>> // (next seek, pause,...), otherwise after the seek it will
>> // enter the same scene again and skip forward immediately
>> float edl_backward_delay = 2;
>> +float edl_adjust_pts = 0; // Automatically add/sub start_pts
> 
> Please use '///<' like te rest of that code block.
> 
>> [...]
>> extern int use_menu;
>> +extern int edl_adjust_pts;
>> +extern double start_pts;
>> 
>> static void rescale_input_coordinates(int ix, int iy, double *dx, double *dy)
>> {
>> @@ -2614,7 +2616,8 @@
>>                     if (mpctx->begin_skip > v)
>>                         mp_msg(MSGT_CPLAYER, MSGL_WARN, MSGTR_EdloutBadStop);
>>                     else {
>> -                        fprintf(edl_fd, "%f %f %d\n", mpctx->begin_skip, v, 0);
>> +                        float pts = edl_adjust_pts ? start_pts : 0;
> 
> pts should be double.
> 

Done

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: edladjust.txt
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20100901/50533dc6/attachment-0001.txt>


More information about the MPlayer-dev-eng mailing list