Changeset 38f79bff37d907dd2765f8e94f2162bcea2cf7e7

Show
Ignore:
Timestamp:
03/21/08 16:22:37 (4 months ago)
Author:
Filippo Carone <littlejohn@videolan.org>
git-committer:
Filippo Carone <littlejohn@videolan.org> 1206112957 +0100
git-parent:

[c4b95b5063089cf126d2df572f4bbbc60ac07fef]

git-author:
Filippo Carone <littlejohn@videolan.org> 1206112945 +0100
Message:

new failing test for medialistplayer_next

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • bindings/java/core/src/main/java/org/videolan/jvlc/MediaListPlayer.java

    r699dd78 r38f79bf  
    5656    } 
    5757 
     58     
     59    /** 
     60     *  
     61     */ 
    5862    public void play() 
    5963    { 
     
    8387        libvlc_exception_t exception = new libvlc_exception_t(); 
    8488        jvlc.getLibvlc().libvlc_media_list_player_pause(instance, exception); 
     89    } 
     90     
     91    public void next() 
     92    { 
     93        libvlc_exception_t exception = new libvlc_exception_t(); 
     94        jvlc.getLibvlc().libvlc_media_list_player_next(instance, exception); 
    8595    } 
    8696 
  • bindings/java/core/src/test/java/org/videolan/jvlc/internal/MediaListPlayerTest.java

    r8b06bdb r38f79bf  
    227227        Assert.assertEquals(0, exception.raised); 
    228228    } 
     229     
     230    @Test 
     231    public void mediaListPlayerNextNoItems() 
     232    { 
     233        libvlc_exception_t exception = new libvlc_exception_t(); 
     234        LibVlcMediaListPlayer mediaListPlayer = libvlc.libvlc_media_list_player_new(libvlcInstance, exception); 
     235        libvlc.libvlc_media_list_player_next(mediaListPlayer, exception); 
     236        Assert.assertEquals(1, exception.raised); 
     237    } 
     238     
     239    /** 
     240     * fails, see https://trac.videolan.org/vlc/ticket/1535 
     241     */ 
     242//    @Test 
     243    public void mediaListPlayerNext() throws Exception 
     244    { 
     245        libvlc_exception_t exception = new libvlc_exception_t(); 
     246        LibVlcMediaListPlayer mediaListPlayer = libvlc.libvlc_media_list_player_new(libvlcInstance, exception); 
     247        LibVlcMediaList mediaList = libvlc.libvlc_media_list_new(libvlcInstance, exception); 
     248        LibVlcMediaDescriptor mediaDescriptor = libvlc.libvlc_media_descriptor_new(libvlcInstance, mrl, exception); 
     249        libvlc.libvlc_media_list_add_media_descriptor(mediaList, mediaDescriptor, exception); 
     250        libvlc.libvlc_media_list_add_media_descriptor(mediaList, mediaDescriptor, exception); 
     251        libvlc.libvlc_media_list_player_set_media_list(mediaListPlayer, mediaList, exception); 
     252        libvlc.libvlc_media_list_player_play_item_at_index(mediaListPlayer, 0, exception); 
     253        Thread.sleep(150); 
     254        libvlc.libvlc_media_list_player_next(mediaListPlayer, exception); 
     255        Assert.assertEquals(0, exception.raised); 
     256    } 
     257     
    229258 
    230259}