Changeset 006c849913eaf70055a988fefc96cc8bd3b09d05

Show
Ignore:
Timestamp:
21/04/07 21:09:23 (2 years ago)
Author:
Gildas Bazin <gbazin@videolan.org>
git-committer:
Gildas Bazin <gbazin@videolan.org> 1177182563 +0000
git-parent:

[a5ed885fd7c592522266bfb8d86aea31de54042b]

git-author:
Gildas Bazin <gbazin@videolan.org> 1177182563 +0000
Message:

* modules/demux/mpeg/m4v.c: new m4v-fps config option.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/demux/mpeg/m4v.c

    rd3fe7f2 r006c849  
    3636static int  Open ( vlc_object_t * ); 
    3737static void Close( vlc_object_t * ); 
     38 
     39#define FPS_TEXT N_("Frames per Second") 
     40#define FPS_LONGTEXT N_("This is the desired frame rate when " \ 
     41    "playing MPEG4 video elementary streams.") 
    3842 
    3943vlc_module_begin(); 
     
    4549    add_shortcut( "m4v" ); 
    4650    add_shortcut( "mp4v" ); 
     51    add_float( "m4v-fps", 25, NULL, FPS_TEXT, FPS_LONGTEXT, VLC_FALSE ); 
    4752vlc_module_end(); 
    4853 
     
    5459    mtime_t     i_dts; 
    5560    es_out_id_t *p_es; 
     61    float       f_fps; 
    5662 
    5763    decoder_t *p_packetizer; 
     
    7177    demux_sys_t *p_sys; 
    7278    uint8_t     *p_peek; 
     79    vlc_value_t val; 
    7380 
    7481    if( stream_Peek( p_demux->s, &p_peek, 4 ) < 4 ) return VLC_EGENERIC; 
     
    100107    /* We need to wait until we get p_extra (VOL header) from the packetizer 
    101108     * before we create the output */ 
     109 
     110    var_Create( p_demux, "m4v-fps", VLC_VAR_FLOAT | VLC_VAR_DOINHERIT ); 
     111    var_Get( p_demux, "m4v-fps", &val ); 
     112    p_sys->f_fps = val.f_float; 
    102113 
    103114    return VLC_SUCCESS; 
     
    166177 
    167178            /* FIXME FIXME FIXME FIXME */ 
    168             p_sys->i_dts += (mtime_t)1000000 / 25
     179            p_sys->i_dts += (mtime_t)1000000 / p_sys->f_fps
    169180            /* FIXME FIXME FIXME FIXME */ 
    170181        }