Commit dff43436 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Merge branch 'master' of git@git.videolan.org:vlc

parents c72f2f9d 87db766d
......@@ -133,7 +133,7 @@ public class MediaList
}
/**
* @param media The media descriptor mrl.
* @param mrl The media descriptor mrl.
*/
public boolean removeMedia(String mrl)
{
......
......@@ -38,6 +38,8 @@ public class VLMTest
private String mrl = getClass().getResource("/raffa_voice.ogg").getFile();
private String mediaName = "test";
@Before
public void setup()
{
......@@ -62,18 +64,89 @@ public class VLMTest
public void testAddBroadcast()
{
VLM vlm = jvlc.getVLM();
vlm.addBroadcast("test", "file://" + mrl, "", null, true, false);
vlm.addBroadcast(mediaName, "file://" + mrl, "", null, true, false);
}
@Test
public void testShowMedia()
{
VLM vlm = jvlc.getVLM();
vlm.addBroadcast("test", "file://" + mrl, "", null, true, false);
vlm.showMedia("test");
vlm.addBroadcast(mediaName, "file://" + mrl, "", null, true, false);
vlm.showMedia(mediaName);
}
@Test
public void testDisableMedia()
{
VLM vlm = jvlc.getVLM();
vlm.addBroadcast(mediaName, "file://" + mrl, "", null, true, false);
vlm.disableMedia(mediaName);
}
@Test
public void testPlayMedia()
{
VLM vlm = jvlc.getVLM();
vlm.addBroadcast(mediaName, "file://" + mrl, "", null, true, false);
vlm.playMedia(mediaName);
}
@Test
public void testPauseMedia()
{
VLM vlm = jvlc.getVLM();
vlm.addBroadcast(mediaName, "file://" + mrl, "", null, true, false);
vlm.playMedia(mediaName);
vlm.pauseMedia(mediaName);
}
@Test
public void testStopMedia()
{
VLM vlm = jvlc.getVLM();
vlm.addBroadcast(mediaName, "file://" + mrl, "", null, true, false);
vlm.playMedia(mediaName);
vlm.stopMedia(mediaName);
}
@Test
public void testSeekMedia()
{
VLM vlm = jvlc.getVLM();
vlm.addBroadcast(mediaName, "file://" + mrl, "", null, true, false);
vlm.playMedia(mediaName);
vlm.seekMedia(mediaName, 0.3f);
}
@Test
public void testAddMediaInput()
{
VLM vlm = jvlc.getVLM();
vlm.addBroadcast(mediaName, "file://" + mrl, "", null, true, false);
vlm.addMediaInput(mediaName, "file://" + mrl);
}
@Test
public void testEnableMedia()
{
VLM vlm = jvlc.getVLM();
vlm.addBroadcast(mediaName, "file://" + mrl, "", null, false, false);
vlm.enableMedia(mediaName);
}
@Test
public void testDeleteMedia()
{
VLM vlm = jvlc.getVLM();
vlm.addBroadcast(mediaName, "file://" + mrl, "", null, false, false);
vlm.deleteMedia(mediaName);
}
@Test
public void testMediaLoop()
{
VLM vlm = jvlc.getVLM();
vlm.addBroadcast(mediaName, "file://" + mrl, "", null, false, false);
vlm.setMediaLoop(mediaName, true);
}
}
private.m4
This diff is collapsed.
This diff is collapsed.
......@@ -266,6 +266,10 @@ static aout_buffer_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
{
p_dec->fmt_out.audio.i_rate = i_rate;
p_dec->fmt_out.audio.i_channels = i_channels;
p_dec->fmt_out.audio.i_physical_channels
= p_dec->fmt_out.audio.i_original_channels
= pi_channels_guessed[i_channels];
aout_DateInit( &p_sys->date, i_rate );
}
}
......@@ -286,6 +290,9 @@ static aout_buffer_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
p_dec->fmt_out.audio.i_rate = i_rate;
p_dec->fmt_out.audio.i_channels = i_channels;
p_dec->fmt_out.audio.i_physical_channels
= p_dec->fmt_out.audio.i_original_channels
= pi_channels_guessed[i_channels];
aout_DateInit( &p_sys->date, i_rate );
}
......@@ -362,6 +369,9 @@ static aout_buffer_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
p_dec->fmt_out.audio.i_rate = frame.samplerate;
p_dec->fmt_out.audio.i_channels = frame.channels;
p_dec->fmt_out.audio.i_physical_channels
= p_dec->fmt_out.audio.i_original_channels
= pi_channels_guessed[frame.channels];
/* Adjust stream info when dealing with SBR/PS */
if( (p_sys->b_sbr != frame.sbr || p_sys->b_ps != frame.ps) &&
......
......@@ -601,12 +601,14 @@ static int RtspHandler( rtsp_stream_t *rtsp, rtsp_stream_id_t *id,
answer->i_status = 200;
psz_session = httpd_MsgGet( query, "Session" );
#if 0
/* FIXME: This breaks totem, mplayer and quicktime at least */
if( httpd_MsgGet( query, "Range" ) != NULL )
{
answer->i_status = 456; /* cannot seek */
break;
}
#endif
vlc_mutex_lock( &rtsp->lock );
ses = RtspClientGet( rtsp, psz_session );
if( ses != NULL )
......
......@@ -426,7 +426,7 @@ int E_(Activate) ( vlc_object_t *p_this )
msg_Dbg(p_vout, "Deinterlace = %d", p_vout->p_sys->xvmc_deinterlace_method);
msg_Dbg(p_vout, "Crop = %d", p_vout->p_sys->xvmc_crop_style);
if( !checkXvMCCap( p_vout ) )
if( checkXvMCCap( p_vout ) == VLC_EGENERIC )
{
msg_Err( p_vout, "no XVMC capability found" );
E_(Deactivate)( p_vout );
......
......@@ -148,7 +148,7 @@ vlc_module_begin();
add_string( "xvmc-crop-style", "eq", NULL, CROP_TEXT, CROP_LONGTEXT, VLC_FALSE );
set_description( _("XVMC extension video output") );
set_capability( "video output", 160 );
set_capability( "video output", 10 );
set_callbacks( E_(Activate), E_(Deactivate) );
vlc_module_end();
......@@ -474,10 +474,10 @@ void blend_xx44( uint8_t *dst_img, subpicture_t *sub_img,
int xxmc_xvmc_surface_valid( vout_thread_t *p_vout, XvMCSurface *surf )
{
xvmc_surface_handler_t *handler = &p_vout->p_sys->xvmc_surf_handler;
unsigned int index = surf - handler->surfaces;
unsigned long index = surf - handler->surfaces;
int ret;
if (index >= XVMC_MAX_SURFACES)
if( index >= XVMC_MAX_SURFACES )
return 0;
pthread_mutex_lock(&handler->mutex);
ret = handler->surfValid[index];
......@@ -745,25 +745,27 @@ int checkXvMCCap( vout_thread_t *p_vout )
XFree(surfaceInfo);
/*
* Try to create a direct rendering context. This will fail if we are not
* on the displaying computer or an indirect context is not available.
*/
* Try to create a direct rendering context. This will fail if we are not
* on the displaying computer or an indirect context is not available.
*/
XVMCUNLOCKDISPLAY( p_vout->p_sys->p_display );
curCap = p_vout->p_sys->xvmc_cap;
if( Success == XvMCCreateContext( p_vout->p_sys->p_display, i_xvport,
curCap->type_id,
curCap->max_width,
curCap->max_height,
XVMC_DIRECT, &c) )
XVMC_DIRECT, &c ) )
{
p_vout->p_sys->context_flags = XVMC_DIRECT;
msg_Dbg( p_vout, "using direct XVMC rendering context" );
p_vout->p_sys->context_flags = XVMC_DIRECT;
}
else if( Success == XvMCCreateContext( p_vout->p_sys->p_display, i_xvport,
curCap->type_id,
curCap->max_width,
curCap->max_height,
0, &c) )
0, &c ) )
{
msg_Dbg( p_vout, "using default XVMC rendering context" );
p_vout->p_sys->context_flags = 0;
}
else
......@@ -778,7 +780,7 @@ int checkXvMCCap( vout_thread_t *p_vout )
}
XVMCLOCKDISPLAY( p_vout->p_sys->p_display );
XvMCDestroyContext( p_vout->p_sys->p_display, &c );
xxmc_xvmc_surface_handler_construct(p_vout );
xxmc_xvmc_surface_handler_construct( p_vout );
/* p_vout->p_sys->capabilities |= VO_CAP_XXMC; */
XVMCUNLOCKDISPLAY( p_vout->p_sys->p_display );
init_xx44_palette( &p_vout->p_sys->palette , 0 );
......@@ -960,6 +962,7 @@ static XvMCSurface *xxmc_xvmc_alloc_surface( vout_thread_t *p_vout,
if( handler->surfValid[i] && !handler->surfInUse[i] )
{
handler->surfInUse[i] = 1;
msg_Dbg( p_vout, "reusing surface %d", i );
xxmc_xvmc_dump_surfaces( p_vout );
pthread_mutex_unlock( &handler->mutex );
return (handler->surfaces + i);
......@@ -1117,7 +1120,8 @@ static void xvmc_flushsync(picture_t *picture)
xvmc_context_reader_lock( &p_vout->p_sys->xvmc_lock );
if( ! xxmc_xvmc_surface_valid( p_vout, picture->p_sys->xvmc_surf)) {
if( !xxmc_xvmc_surface_valid( p_vout, picture->p_sys->xvmc_surf ) )
{
msg_Dbg(p_vout, "xvmc_flushsync 1 : %d", picture->p_sys->xxmc_data.result );
picture->p_sys->xxmc_data.result = 128;
xvmc_context_reader_unlock( &p_vout->p_sys->xvmc_lock );
......@@ -1396,7 +1400,7 @@ void xvmc_vld_frame( picture_t *picture )
qmx.load_chroma_non_intra_quantiser_matrix = 0;
xvmc_context_reader_lock( &p_vout->p_sys->xvmc_lock );
if( ! xxmc_xvmc_surface_valid( p_vout, picture->p_sys->xvmc_surf) )
if( !xxmc_xvmc_surface_valid( p_vout, picture->p_sys->xvmc_surf ) )
{
picture->p_sys->xxmc_data.result = 128;
xvmc_context_reader_unlock( &p_vout->p_sys->xvmc_lock );
......
This diff is collapsed.
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