1 /*****************************************************************************
3 *****************************************************************************
4 * Copyright (C) 2004-2007 the VideoLAN team
7 * Authors: Antoine Cellerier <dionoea@videolan.org>
8 * Christophe Massiot <massiot@via.ecp.fr>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23 *****************************************************************************/
25 /*****************************************************************************
27 *****************************************************************************/
33 #include <errno.h> /* ENOMEM */
35 #include <vlc_common.h>
36 #include <vlc_plugin.h>
38 #include <vlc_block.h>
39 #include <vlc_codec.h>
42 #include <vlc_image.h>
43 #include <vlc_filter.h>
45 #include "../video_filter/mosaic.h"
49 /*****************************************************************************
51 *****************************************************************************/
52 struct sout_stream_sys_t
58 image_handler_t *p_image; /* filter for resizing */
59 int i_height, i_width;
60 unsigned int i_sar_num, i_sar_den;
64 int i_chroma; /* force image format chroma */
66 filter_chain_t *p_vf2;
69 struct decoder_owner_sys_t
71 /* Current format in use by the output */
75 /*****************************************************************************
77 *****************************************************************************/
78 static int Open ( vlc_object_t * );
79 static void Close ( vlc_object_t * );
80 static sout_stream_id_t *Add ( sout_stream_t *, es_format_t * );
81 static int Del ( sout_stream_t *, sout_stream_id_t * );
82 static int Send( sout_stream_t *, sout_stream_id_t *, block_t * );
84 inline static void video_del_buffer_decoder( decoder_t *, picture_t * );
85 inline static void video_del_buffer_filter( filter_t *, picture_t * );
87 inline static picture_t *video_new_buffer_decoder( decoder_t * );
88 inline static picture_t *video_new_buffer_filter( filter_t * );
89 static picture_t *video_new_buffer( vlc_object_t *, decoder_owner_sys_t *,
92 static void video_link_picture_decoder( decoder_t *, picture_t * );
93 static void video_unlink_picture_decoder( decoder_t *, picture_t * );
95 static int HeightCallback( vlc_object_t *, char const *,
96 vlc_value_t, vlc_value_t, void * );
97 static int WidthCallback( vlc_object_t *, char const *,
98 vlc_value_t, vlc_value_t, void * );
99 static int alphaCallback( vlc_object_t *, char const *,
100 vlc_value_t, vlc_value_t, void * );
101 static int xCallback( vlc_object_t *, char const *,
102 vlc_value_t, vlc_value_t, void * );
103 static int yCallback( vlc_object_t *, char const *,
104 vlc_value_t, vlc_value_t, void * );
106 /*****************************************************************************
108 *****************************************************************************/
109 #define ID_TEXT N_("ID")
110 #define ID_LONGTEXT N_( \
111 "Specify an identifier string for this subpicture" )
113 #define WIDTH_TEXT N_("Video width")
114 #define WIDTH_LONGTEXT N_( \
115 "Output video width." )
116 #define HEIGHT_TEXT N_("Video height")
117 #define HEIGHT_LONGTEXT N_( \
118 "Output video height." )
119 #define RATIO_TEXT N_("Sample aspect ratio")
120 #define RATIO_LONGTEXT N_( \
121 "Sample aspect ratio of the destination (1:1, 3:4, 2:3)." )
123 #define VFILTER_TEXT N_("Video filter")
124 #define VFILTER_LONGTEXT N_( \
125 "Video filters will be applied to the video stream." )
127 #define CHROMA_TEXT N_("Image chroma")
128 #define CHROMA_LONGTEXT N_( \
129 "Force the use of a specific chroma. Use YUVA if you're planning " \
130 "to use the Alphamask or Bluescreen video filter." )
132 #define ALPHA_TEXT N_("Transparency")
133 #define ALPHA_LONGTEXT N_( \
134 "Transparency of the mosaic picture." )
136 #define X_TEXT N_("X offset")
137 #define X_LONGTEXT N_( \
138 "X coordinate of the upper left corner in the mosaic if non negative." )
140 #define Y_TEXT N_("Y offset")
141 #define Y_LONGTEXT N_( \
142 "Y coordinate of the upper left corner in the mosaic if non negative." )
144 #define CFG_PREFIX "sout-mosaic-bridge-"
147 set_shortname( N_( "Mosaic bridge" ) )
148 set_description(N_("Mosaic bridge stream output") )
149 set_capability( "sout stream", 0 )
150 add_shortcut( "mosaic-bridge" )
152 add_string( CFG_PREFIX "id", "Id", NULL, ID_TEXT, ID_LONGTEXT,
154 add_integer( CFG_PREFIX "width", 0, NULL, WIDTH_TEXT,
155 WIDTH_LONGTEXT, true )
156 add_integer( CFG_PREFIX "height", 0, NULL, HEIGHT_TEXT,
157 HEIGHT_LONGTEXT, true )
158 add_string( CFG_PREFIX "sar", "1:1", NULL, RATIO_TEXT,
159 RATIO_LONGTEXT, false )
160 add_string( CFG_PREFIX "chroma", 0, NULL, CHROMA_TEXT, CHROMA_LONGTEXT,
163 add_module_list( CFG_PREFIX "vfilter", "video filter2",
164 NULL, NULL, VFILTER_TEXT, VFILTER_LONGTEXT, false )
166 add_integer_with_range( CFG_PREFIX "alpha", 255, 0, 255, NULL,
167 ALPHA_TEXT, ALPHA_LONGTEXT, false )
168 add_integer( CFG_PREFIX "x", -1, NULL, X_TEXT, X_LONGTEXT, false )
169 add_integer( CFG_PREFIX "y", -1, NULL, Y_TEXT, Y_LONGTEXT, false )
171 set_callbacks( Open, Close )
174 static const char *const ppsz_sout_options[] = {
175 "id", "width", "height", "sar", "vfilter", "chroma", "alpha", "x", "y", NULL
178 /*****************************************************************************
180 *****************************************************************************/
181 static int Open( vlc_object_t *p_this )
183 sout_stream_t *p_stream = (sout_stream_t *)p_this;
184 sout_stream_sys_t *p_sys;
185 vlc_object_t *p_libvlc = VLC_OBJECT( p_this->p_libvlc );
188 config_ChainParse( p_stream, CFG_PREFIX, ppsz_sout_options,
191 p_sys = malloc( sizeof( sout_stream_sys_t ) );
195 p_stream->p_sys = p_sys;
196 p_sys->b_inited = false;
198 var_Create( p_libvlc, "mosaic-lock", VLC_VAR_MUTEX );
199 var_Get( p_libvlc, "mosaic-lock", &val );
200 p_sys->p_lock = val.p_address;
202 p_sys->psz_id = var_CreateGetString( p_stream, CFG_PREFIX "id" );
205 var_CreateGetIntegerCommand( p_stream, CFG_PREFIX "height" );
206 var_AddCallback( p_stream, CFG_PREFIX "height", HeightCallback, p_stream );
209 var_CreateGetIntegerCommand( p_stream, CFG_PREFIX "width" );
210 var_AddCallback( p_stream, CFG_PREFIX "width", WidthCallback, p_stream );
212 var_Get( p_stream, CFG_PREFIX "sar", &val );
215 char *psz_parser = strchr( val.psz_string, ':' );
219 *psz_parser++ = '\0';
220 p_sys->i_sar_num = atoi( val.psz_string );
221 p_sys->i_sar_den = atoi( psz_parser );
222 vlc_ureduce( &p_sys->i_sar_num, &p_sys->i_sar_den,
223 p_sys->i_sar_num, p_sys->i_sar_den, 0 );
227 msg_Warn( p_stream, "bad aspect ratio %s", val.psz_string );
228 p_sys->i_sar_num = p_sys->i_sar_den = 1;
231 free( val.psz_string );
235 p_sys->i_sar_num = p_sys->i_sar_den = 1;
239 val.psz_string = var_GetNonEmptyString( p_stream, CFG_PREFIX "chroma" );
240 if( val.psz_string && strlen( val.psz_string ) >= 4 )
242 memcpy( &p_sys->i_chroma, val.psz_string, 4 );
243 msg_Dbg( p_stream, "Forcing image chroma to 0x%.8x (%4.4s)", p_sys->i_chroma, (char*)&p_sys->i_chroma );
245 free( val.psz_string );
247 #define INT_COMMAND( a ) do { \
248 var_Create( p_stream, CFG_PREFIX #a, \
249 VLC_VAR_INTEGER | VLC_VAR_DOINHERIT | VLC_VAR_ISCOMMAND ); \
250 var_AddCallback( p_stream, CFG_PREFIX #a, a ## Callback, \
251 p_stream ); } while(0)
252 INT_COMMAND( alpha );
258 p_stream->pf_add = Add;
259 p_stream->pf_del = Del;
260 p_stream->pf_send = Send;
262 p_stream->p_sout->i_out_pace_nocontrol++;
267 /*****************************************************************************
269 *****************************************************************************/
270 static void Close( vlc_object_t * p_this )
272 sout_stream_t *p_stream = (sout_stream_t*)p_this;
273 sout_stream_sys_t *p_sys = p_stream->p_sys;
275 p_stream->p_sout->i_out_pace_nocontrol--;
277 free( p_sys->psz_id );
282 static int video_filter_buffer_allocation_init( filter_t *p_filter, void *p_data )
284 p_filter->pf_vout_buffer_new = video_new_buffer_filter;
285 p_filter->pf_vout_buffer_del = video_del_buffer_filter;
286 p_filter->p_owner = p_data;
290 static sout_stream_id_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
292 sout_stream_sys_t *p_sys = p_stream->p_sys;
298 if( p_sys->b_inited || p_fmt->i_cat != VIDEO_ES )
301 /* Create decoder object */
302 p_sys->p_decoder = vlc_object_create( p_stream, VLC_OBJECT_DECODER );
303 if( !p_sys->p_decoder )
305 vlc_object_attach( p_sys->p_decoder, p_stream );
306 p_sys->p_decoder->p_module = NULL;
307 p_sys->p_decoder->fmt_in = *p_fmt;
308 p_sys->p_decoder->b_pace_control = false;
309 p_sys->p_decoder->fmt_out = p_sys->p_decoder->fmt_in;
310 p_sys->p_decoder->fmt_out.i_extra = 0;
311 p_sys->p_decoder->fmt_out.p_extra = 0;
312 p_sys->p_decoder->pf_decode_video = 0;
313 p_sys->p_decoder->pf_vout_buffer_new = video_new_buffer_decoder;
314 p_sys->p_decoder->pf_vout_buffer_del = video_del_buffer_decoder;
315 p_sys->p_decoder->pf_picture_link = video_link_picture_decoder;
316 p_sys->p_decoder->pf_picture_unlink = video_unlink_picture_decoder;
317 p_sys->p_decoder->p_owner = malloc( sizeof(decoder_owner_sys_t) );
318 if( !p_sys->p_decoder->p_owner )
320 vlc_object_detach( p_sys->p_decoder );
321 vlc_object_release( p_sys->p_decoder );
325 p_sys->p_decoder->p_owner->video = p_fmt->video;
326 //p_sys->p_decoder->p_cfg = p_sys->p_video_cfg;
328 p_sys->p_decoder->p_module =
329 module_need( p_sys->p_decoder, "decoder", "$codec", false );
331 if( !p_sys->p_decoder->p_module || !p_sys->p_decoder->pf_decode_video )
333 if( p_sys->p_decoder->p_module )
335 msg_Err( p_stream, "instanciated a non video decoder" );
336 module_unneed( p_sys->p_decoder, p_sys->p_decoder->p_module );
340 msg_Err( p_stream, "cannot find decoder" );
342 free( p_sys->p_decoder->p_owner );
343 vlc_object_detach( p_sys->p_decoder );
344 vlc_object_release( p_sys->p_decoder );
348 p_sys->b_inited = true;
349 vlc_mutex_lock( p_sys->p_lock );
351 p_bridge = GetBridge( p_stream );
352 if ( p_bridge == NULL )
354 vlc_object_t *p_libvlc = VLC_OBJECT( p_stream->p_libvlc );
357 p_bridge = malloc( sizeof( bridge_t ) );
359 var_Create( p_libvlc, "mosaic-struct", VLC_VAR_ADDRESS );
360 val.p_address = p_bridge;
361 var_Set( p_libvlc, "mosaic-struct", val );
363 p_bridge->i_es_num = 0;
364 p_bridge->pp_es = NULL;
367 for ( i = 0; i < p_bridge->i_es_num; i++ )
369 if ( p_bridge->pp_es[i]->b_empty )
373 if ( i == p_bridge->i_es_num )
375 p_bridge->pp_es = realloc( p_bridge->pp_es,
376 (p_bridge->i_es_num + 1)
377 * sizeof(bridged_es_t *) );
378 p_bridge->i_es_num++;
379 p_bridge->pp_es[i] = malloc( sizeof(bridged_es_t) );
382 p_sys->p_es = p_es = p_bridge->pp_es[i];
384 p_es->i_alpha = var_GetInteger( p_stream, CFG_PREFIX "alpha" );
385 p_es->i_x = var_GetInteger( p_stream, CFG_PREFIX "x" );
386 p_es->i_y = var_GetInteger( p_stream, CFG_PREFIX "y" );
388 //p_es->fmt = *p_fmt;
389 p_es->psz_id = p_sys->psz_id;
390 p_es->p_picture = NULL;
391 p_es->pp_last = &p_es->p_picture;
392 p_es->b_empty = false;
394 vlc_mutex_unlock( p_sys->p_lock );
396 if ( p_sys->i_height || p_sys->i_width )
398 p_sys->p_image = image_HandlerCreate( p_stream );
402 p_sys->p_image = NULL;
405 msg_Dbg( p_stream, "mosaic bridge id=%s pos=%d", p_es->psz_id, i );
407 /* Create user specified video filters */
408 psz_chain = var_GetNonEmptyString( p_stream, CFG_PREFIX "vfilter" );
409 msg_Dbg( p_stream, "psz_chain: %s", psz_chain );
412 p_sys->p_vf2 = filter_chain_New( p_stream, "video filter2", false,
413 video_filter_buffer_allocation_init,
414 NULL, p_sys->p_decoder->p_owner );
416 es_format_Copy( &fmt, &p_sys->p_decoder->fmt_out );
417 if( p_sys->i_chroma )
418 fmt.video.i_chroma = p_sys->i_chroma;
419 filter_chain_Reset( p_sys->p_vf2, &fmt, &fmt );
420 filter_chain_AppendFromString( p_sys->p_vf2, psz_chain );
428 return (sout_stream_id_t *)p_sys;
431 static int Del( sout_stream_t *p_stream, sout_stream_id_t *id )
434 sout_stream_sys_t *p_sys = p_stream->p_sys;
437 bool b_last_es = true;
440 if( !p_sys->b_inited )
443 if( p_sys->p_decoder != NULL )
445 decoder_owner_sys_t *p_owner = p_sys->p_decoder->p_owner;
447 if( p_sys->p_decoder->p_module )
448 module_unneed( p_sys->p_decoder, p_sys->p_decoder->p_module );
449 if( p_sys->p_decoder->p_description )
450 vlc_meta_Delete( p_sys->p_decoder->p_description );
452 vlc_object_detach( p_sys->p_decoder );
453 vlc_object_release( p_sys->p_decoder );
458 /* Destroy user specified video filters */
460 filter_chain_Delete( p_sys->p_vf2 );
462 vlc_mutex_lock( p_sys->p_lock );
464 p_bridge = GetBridge( p_stream );
467 p_es->b_empty = true;
468 while ( p_es->p_picture )
470 picture_t *p_next = p_es->p_picture->p_next;
471 picture_Release( p_es->p_picture );
472 p_es->p_picture = p_next;
475 for ( i = 0; i < p_bridge->i_es_num; i++ )
477 if ( !p_bridge->pp_es[i]->b_empty )
486 vlc_object_t *p_libvlc = VLC_OBJECT( p_stream->p_libvlc );
487 for ( i = 0; i < p_bridge->i_es_num; i++ )
488 free( p_bridge->pp_es[i] );
489 free( p_bridge->pp_es );
491 var_Destroy( p_libvlc, "mosaic-struct" );
494 vlc_mutex_unlock( p_sys->p_lock );
496 if ( p_sys->p_image )
498 image_HandlerDelete( p_sys->p_image );
501 p_sys->b_inited = false;
506 /*****************************************************************************
507 * PushPicture : push a picture in the mosaic-struct structure
508 *****************************************************************************/
509 static void PushPicture( sout_stream_t *p_stream, picture_t *p_picture )
511 sout_stream_sys_t *p_sys = p_stream->p_sys;
512 bridged_es_t *p_es = p_sys->p_es;
514 vlc_mutex_lock( p_sys->p_lock );
516 *p_es->pp_last = p_picture;
517 p_picture->p_next = NULL;
518 p_es->pp_last = &p_picture->p_next;
520 vlc_mutex_unlock( p_sys->p_lock );
523 static int Send( sout_stream_t *p_stream, sout_stream_id_t *id,
526 sout_stream_sys_t *p_sys = p_stream->p_sys;
529 if ( (sout_stream_sys_t *)id != p_sys )
531 block_ChainRelease( p_buffer );
535 while ( (p_pic = p_sys->p_decoder->pf_decode_video( p_sys->p_decoder,
538 picture_t *p_new_pic;
540 if( p_sys->i_height || p_sys->i_width )
542 video_format_t fmt_out, fmt_in;
544 memset( &fmt_in, 0, sizeof(video_format_t) );
545 memset( &fmt_out, 0, sizeof(video_format_t) );
546 fmt_in = p_sys->p_decoder->fmt_out.video;
549 if( p_sys->i_chroma )
550 fmt_out.i_chroma = p_sys->i_chroma;
552 fmt_out.i_chroma = VLC_CODEC_I420;
554 if ( !p_sys->i_height )
556 fmt_out.i_width = p_sys->i_width;
557 fmt_out.i_height = (p_sys->i_width * VOUT_ASPECT_FACTOR
558 * p_sys->i_sar_num / p_sys->i_sar_den / fmt_in.i_aspect)
561 else if ( !p_sys->i_width )
563 fmt_out.i_height = p_sys->i_height;
564 fmt_out.i_width = (p_sys->i_height * fmt_in.i_aspect
565 * p_sys->i_sar_den / p_sys->i_sar_num / VOUT_ASPECT_FACTOR)
570 fmt_out.i_width = p_sys->i_width;
571 fmt_out.i_height = p_sys->i_height;
573 fmt_out.i_visible_width = fmt_out.i_width;
574 fmt_out.i_visible_height = fmt_out.i_height;
576 p_new_pic = image_Convert( p_sys->p_image,
577 p_pic, &fmt_in, &fmt_out );
578 if( p_new_pic == NULL )
580 msg_Err( p_stream, "image conversion failed" );
581 picture_Release( p_pic );
587 /* TODO: chroma conversion if needed */
589 p_new_pic = picture_New( p_pic->format.i_chroma,
590 p_pic->format.i_width, p_pic->format.i_height,
591 p_sys->p_decoder->fmt_out.video.i_aspect );
594 picture_Release( p_pic );
595 msg_Err( p_stream, "image allocation failed" );
599 picture_Copy( p_new_pic, p_pic );
601 picture_Release( p_pic );
604 p_new_pic = filter_chain_VideoFilter( p_sys->p_vf2, p_new_pic );
606 PushPicture( p_stream, p_new_pic );
612 inline static picture_t *video_new_buffer_decoder( decoder_t *p_dec )
614 return video_new_buffer( VLC_OBJECT( p_dec ),
615 (decoder_owner_sys_t *)p_dec->p_owner,
619 inline static picture_t *video_new_buffer_filter( filter_t *p_filter )
621 return video_new_buffer( VLC_OBJECT( p_filter ),
622 (decoder_owner_sys_t *)p_filter->p_owner,
623 &p_filter->fmt_out );
626 static picture_t *video_new_buffer( vlc_object_t *p_this,
627 decoder_owner_sys_t *p_sys,
628 es_format_t *fmt_out )
630 if( fmt_out->video.i_width != p_sys->video.i_width ||
631 fmt_out->video.i_height != p_sys->video.i_height ||
632 fmt_out->video.i_chroma != p_sys->video.i_chroma ||
633 fmt_out->video.i_aspect != p_sys->video.i_aspect )
635 if( !fmt_out->video.i_sar_num ||
636 !fmt_out->video.i_sar_den )
638 fmt_out->video.i_sar_num =
639 fmt_out->video.i_aspect * fmt_out->video.i_height;
641 fmt_out->video.i_sar_den =
642 VOUT_ASPECT_FACTOR * fmt_out->video.i_width;
645 vlc_ureduce( &fmt_out->video.i_sar_num,
646 &fmt_out->video.i_sar_den,
647 fmt_out->video.i_sar_num,
648 fmt_out->video.i_sar_den, 0 );
650 if( !fmt_out->video.i_visible_width ||
651 !fmt_out->video.i_visible_height )
653 fmt_out->video.i_visible_width = fmt_out->video.i_width;
654 fmt_out->video.i_visible_height = fmt_out->video.i_height;
657 fmt_out->video.i_chroma = fmt_out->i_codec;
658 p_sys->video = fmt_out->video;
662 fmt_out->video.i_chroma = fmt_out->i_codec;
664 return picture_New( fmt_out->video.i_chroma,
665 fmt_out->video.i_width,
666 fmt_out->video.i_height,
667 fmt_out->video.i_aspect );
670 inline static void video_del_buffer_decoder( decoder_t *p_this,
674 picture_Release( p_pic );
677 inline static void video_del_buffer_filter( filter_t *p_this,
681 picture_Release( p_pic );
684 static void video_link_picture_decoder( decoder_t *p_dec, picture_t *p_pic )
687 picture_Hold( p_pic );
690 static void video_unlink_picture_decoder( decoder_t *p_dec, picture_t *p_pic )
693 picture_Release( p_pic );
697 /**********************************************************************
698 * Callback to update (some) params on the fly
699 **********************************************************************/
700 static int HeightCallback( vlc_object_t *p_this, char const *psz_var,
701 vlc_value_t oldval, vlc_value_t newval,
704 VLC_UNUSED(p_this); VLC_UNUSED(oldval); VLC_UNUSED(psz_var);
705 sout_stream_t *p_stream = (sout_stream_t *)p_data;
706 sout_stream_sys_t *p_sys = p_stream->p_sys;
708 /* We create the handler before updating the value in p_sys
709 * so we don't have to worry about locking */
710 if( !p_sys->p_image && newval.i_int )
711 p_sys->p_image = image_HandlerCreate( p_stream );
712 p_sys->i_height = newval.i_int;
717 static int WidthCallback( vlc_object_t *p_this, char const *psz_var,
718 vlc_value_t oldval, vlc_value_t newval,
721 VLC_UNUSED(p_this); VLC_UNUSED(oldval); VLC_UNUSED(psz_var);
722 sout_stream_t *p_stream = (sout_stream_t *)p_data;
723 sout_stream_sys_t *p_sys = p_stream->p_sys;
725 /* We create the handler before updating the value in p_sys
726 * so we don't have to worry about locking */
727 if( !p_sys->p_image && newval.i_int )
728 p_sys->p_image = image_HandlerCreate( p_stream );
729 p_sys->i_width = newval.i_int;
734 static int alphaCallback( vlc_object_t *p_this, char const *psz_var,
735 vlc_value_t oldval, vlc_value_t newval,
738 VLC_UNUSED(p_this); VLC_UNUSED(oldval); VLC_UNUSED(psz_var);
739 sout_stream_t *p_stream = (sout_stream_t *)p_data;
740 sout_stream_sys_t *p_sys = p_stream->p_sys;
743 p_sys->p_es->i_alpha = newval.i_int;
748 static int xCallback( vlc_object_t *p_this, char const *psz_var,
749 vlc_value_t oldval, vlc_value_t newval,
752 VLC_UNUSED(p_this); VLC_UNUSED(oldval); VLC_UNUSED(psz_var);
753 sout_stream_t *p_stream = (sout_stream_t *)p_data;
754 sout_stream_sys_t *p_sys = p_stream->p_sys;
757 p_sys->p_es->i_x = newval.i_int;
762 static int yCallback( vlc_object_t *p_this, char const *psz_var,
763 vlc_value_t oldval, vlc_value_t newval,
766 VLC_UNUSED(p_this); VLC_UNUSED(oldval); VLC_UNUSED(psz_var);
767 sout_stream_t *p_stream = (sout_stream_t *)p_data;
768 sout_stream_sys_t *p_sys = p_stream->p_sys;
771 p_sys->p_es->i_y = newval.i_int;