1 /*****************************************************************************
3 *****************************************************************************
4 * Copyright (C) 2004-2007 VLC authors and VideoLAN
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 it
11 * under the terms of the GNU Lesser General Public License as published by
12 * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with this program; if not, write to the Free Software Foundation,
22 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23 *****************************************************************************/
25 /*****************************************************************************
27 *****************************************************************************/
33 #include <vlc_common.h>
34 #include <vlc_plugin.h>
36 #include <vlc_block.h>
37 #include <vlc_codec.h>
40 #include <vlc_image.h>
41 #include <vlc_filter.h>
42 #include <vlc_modules.h>
44 #include "../video_filter/mosaic.h"
46 /*****************************************************************************
48 *****************************************************************************/
49 struct sout_stream_sys_t
54 image_handler_t *p_image; /* filter for resizing */
55 int i_height, i_width;
56 unsigned int i_sar_num, i_sar_den;
60 int i_chroma; /* force image format chroma */
62 filter_chain_t *p_vf2;
65 struct decoder_owner_sys_t
67 /* Current format in use by the output */
71 /*****************************************************************************
73 *****************************************************************************/
74 static int Open ( vlc_object_t * );
75 static void Close ( vlc_object_t * );
76 static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * );
77 static int Del ( sout_stream_t *, sout_stream_id_sys_t * );
78 static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_t * );
80 inline static void video_del_buffer_decoder( decoder_t *, picture_t * );
81 inline static void video_del_buffer_filter( filter_t *, picture_t * );
83 inline static int video_update_format_decoder( decoder_t *p_dec );
84 inline static picture_t *video_new_buffer_decoder( decoder_t * );
85 inline static picture_t *video_new_buffer_filter( filter_t * );
86 static int video_update_format( vlc_object_t *, decoder_owner_sys_t *,
89 static void video_link_picture_decoder( decoder_t *, picture_t * );
90 static void video_unlink_picture_decoder( decoder_t *, picture_t * );
92 static int HeightCallback( vlc_object_t *, char const *,
93 vlc_value_t, vlc_value_t, void * );
94 static int WidthCallback( vlc_object_t *, char const *,
95 vlc_value_t, vlc_value_t, void * );
96 static int alphaCallback( vlc_object_t *, char const *,
97 vlc_value_t, vlc_value_t, void * );
98 static int xCallback( vlc_object_t *, char const *,
99 vlc_value_t, vlc_value_t, void * );
100 static int yCallback( vlc_object_t *, char const *,
101 vlc_value_t, vlc_value_t, void * );
103 /*****************************************************************************
105 *****************************************************************************/
106 #define ID_TEXT N_("ID")
107 #define ID_LONGTEXT N_( \
108 "Specify an identifier string for this subpicture" )
110 #define WIDTH_TEXT N_("Video width")
111 #define WIDTH_LONGTEXT N_( \
112 "Output video width." )
113 #define HEIGHT_TEXT N_("Video height")
114 #define HEIGHT_LONGTEXT N_( \
115 "Output video height." )
116 #define RATIO_TEXT N_("Sample aspect ratio")
117 #define RATIO_LONGTEXT N_( \
118 "Sample aspect ratio of the destination (1:1, 3:4, 2:3)." )
120 #define VFILTER_TEXT N_("Video filter")
121 #define VFILTER_LONGTEXT N_( \
122 "Video filters will be applied to the video stream." )
124 #define CHROMA_TEXT N_("Image chroma")
125 #define CHROMA_LONGTEXT N_( \
126 "Force the use of a specific chroma. Use YUVA if you're planning " \
127 "to use the Alphamask or Bluescreen video filter." )
129 #define ALPHA_TEXT N_("Transparency")
130 #define ALPHA_LONGTEXT N_( \
131 "Transparency of the mosaic picture." )
133 #define X_TEXT N_("X offset")
134 #define X_LONGTEXT N_( \
135 "X coordinate of the upper left corner in the mosaic if non negative." )
137 #define Y_TEXT N_("Y offset")
138 #define Y_LONGTEXT N_( \
139 "Y coordinate of the upper left corner in the mosaic if non negative." )
141 #define CFG_PREFIX "sout-mosaic-bridge-"
144 set_shortname( N_( "Mosaic bridge" ) )
145 set_description(N_("Mosaic bridge stream output") )
146 set_capability( "sout stream", 0 )
147 add_shortcut( "mosaic-bridge" )
149 add_string( CFG_PREFIX "id", "Id", ID_TEXT, ID_LONGTEXT,
151 add_integer( CFG_PREFIX "width", 0, WIDTH_TEXT,
152 WIDTH_LONGTEXT, true )
153 add_integer( CFG_PREFIX "height", 0, HEIGHT_TEXT,
154 HEIGHT_LONGTEXT, true )
155 add_string( CFG_PREFIX "sar", "1:1", RATIO_TEXT,
156 RATIO_LONGTEXT, false )
157 add_string( CFG_PREFIX "chroma", NULL, CHROMA_TEXT, CHROMA_LONGTEXT,
160 add_module_list( CFG_PREFIX "vfilter", "video filter2",
161 NULL, VFILTER_TEXT, VFILTER_LONGTEXT, false )
163 add_integer_with_range( CFG_PREFIX "alpha", 255, 0, 255,
164 ALPHA_TEXT, ALPHA_LONGTEXT, false )
165 add_integer( CFG_PREFIX "x", -1, X_TEXT, X_LONGTEXT, false )
166 add_integer( CFG_PREFIX "y", -1, Y_TEXT, Y_LONGTEXT, false )
168 set_callbacks( Open, Close )
171 static const char *const ppsz_sout_options[] = {
172 "id", "width", "height", "sar", "vfilter", "chroma", "alpha", "x", "y", NULL
175 /*****************************************************************************
177 *****************************************************************************/
178 static int Open( vlc_object_t *p_this )
180 sout_stream_t *p_stream = (sout_stream_t *)p_this;
181 sout_stream_sys_t *p_sys;
184 config_ChainParse( p_stream, CFG_PREFIX, ppsz_sout_options,
187 p_sys = malloc( sizeof( sout_stream_sys_t ) );
191 p_stream->p_sys = p_sys;
192 p_sys->b_inited = false;
194 p_sys->psz_id = var_CreateGetString( p_stream, CFG_PREFIX "id" );
197 var_CreateGetIntegerCommand( p_stream, CFG_PREFIX "height" );
198 var_AddCallback( p_stream, CFG_PREFIX "height", HeightCallback, p_stream );
201 var_CreateGetIntegerCommand( p_stream, CFG_PREFIX "width" );
202 var_AddCallback( p_stream, CFG_PREFIX "width", WidthCallback, p_stream );
204 var_Get( p_stream, CFG_PREFIX "sar", &val );
207 char *psz_parser = strchr( val.psz_string, ':' );
211 *psz_parser++ = '\0';
212 p_sys->i_sar_num = atoi( val.psz_string );
213 p_sys->i_sar_den = atoi( psz_parser );
214 vlc_ureduce( &p_sys->i_sar_num, &p_sys->i_sar_den,
215 p_sys->i_sar_num, p_sys->i_sar_den, 0 );
219 msg_Warn( p_stream, "bad aspect ratio %s", val.psz_string );
220 p_sys->i_sar_num = p_sys->i_sar_den = 1;
223 free( val.psz_string );
227 p_sys->i_sar_num = p_sys->i_sar_den = 1;
231 val.psz_string = var_GetNonEmptyString( p_stream, CFG_PREFIX "chroma" );
232 if( val.psz_string && strlen( val.psz_string ) >= 4 )
234 memcpy( &p_sys->i_chroma, val.psz_string, 4 );
235 msg_Dbg( p_stream, "Forcing image chroma to 0x%.8x (%4.4s)", p_sys->i_chroma, (char*)&p_sys->i_chroma );
237 free( val.psz_string );
239 #define INT_COMMAND( a ) do { \
240 var_Create( p_stream, CFG_PREFIX #a, \
241 VLC_VAR_INTEGER | VLC_VAR_DOINHERIT | VLC_VAR_ISCOMMAND ); \
242 var_AddCallback( p_stream, CFG_PREFIX #a, a ## Callback, \
243 p_stream ); } while(0)
244 INT_COMMAND( alpha );
250 p_stream->pf_add = Add;
251 p_stream->pf_del = Del;
252 p_stream->pf_send = Send;
253 p_stream->pace_nocontrol = true;
258 /*****************************************************************************
260 *****************************************************************************/
261 static void Close( vlc_object_t * p_this )
263 sout_stream_t *p_stream = (sout_stream_t*)p_this;
264 sout_stream_sys_t *p_sys = p_stream->p_sys;
266 /* Delete the callbacks */
267 var_DelCallback( p_stream, CFG_PREFIX "height", HeightCallback, p_stream );
268 var_DelCallback( p_stream, CFG_PREFIX "width", WidthCallback, p_stream );
269 var_DelCallback( p_stream, CFG_PREFIX "alpha", alphaCallback, p_stream );
270 var_DelCallback( p_stream, CFG_PREFIX "x", xCallback, p_stream );
271 var_DelCallback( p_stream, CFG_PREFIX "y", yCallback, p_stream );
273 free( p_sys->psz_id );
278 static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
280 sout_stream_sys_t *p_sys = p_stream->p_sys;
286 if( p_sys->b_inited || p_fmt->i_cat != VIDEO_ES )
289 /* Create decoder object */
290 p_sys->p_decoder = vlc_object_create( p_stream, sizeof( decoder_t ) );
291 if( !p_sys->p_decoder )
293 p_sys->p_decoder->p_module = NULL;
294 p_sys->p_decoder->fmt_in = *p_fmt;
295 p_sys->p_decoder->b_pace_control = false;
296 p_sys->p_decoder->fmt_out = p_sys->p_decoder->fmt_in;
297 p_sys->p_decoder->fmt_out.i_extra = 0;
298 p_sys->p_decoder->fmt_out.p_extra = 0;
299 p_sys->p_decoder->pf_decode_video = 0;
300 p_sys->p_decoder->pf_vout_format_update = video_update_format_decoder;
301 p_sys->p_decoder->pf_vout_buffer_new = video_new_buffer_decoder;
302 p_sys->p_decoder->pf_vout_buffer_del = video_del_buffer_decoder;
303 p_sys->p_decoder->pf_picture_link = video_link_picture_decoder;
304 p_sys->p_decoder->pf_picture_unlink = video_unlink_picture_decoder;
305 p_sys->p_decoder->p_owner = malloc( sizeof(decoder_owner_sys_t) );
306 if( !p_sys->p_decoder->p_owner )
308 vlc_object_release( p_sys->p_decoder );
312 p_sys->p_decoder->p_owner->video = p_fmt->video;
313 //p_sys->p_decoder->p_cfg = p_sys->p_video_cfg;
315 p_sys->p_decoder->p_module =
316 module_need( p_sys->p_decoder, "decoder", "$codec", false );
318 if( !p_sys->p_decoder->p_module || !p_sys->p_decoder->pf_decode_video )
320 if( p_sys->p_decoder->p_module )
322 msg_Err( p_stream, "instanciated a non video decoder" );
323 module_unneed( p_sys->p_decoder, p_sys->p_decoder->p_module );
327 msg_Err( p_stream, "cannot find decoder" );
329 free( p_sys->p_decoder->p_owner );
330 vlc_object_release( p_sys->p_decoder );
334 p_sys->b_inited = true;
335 vlc_global_lock( VLC_MOSAIC_MUTEX );
337 p_bridge = GetBridge( p_stream );
338 if ( p_bridge == NULL )
340 vlc_object_t *p_libvlc = VLC_OBJECT( p_stream->p_libvlc );
343 p_bridge = xmalloc( sizeof( bridge_t ) );
345 var_Create( p_libvlc, "mosaic-struct", VLC_VAR_ADDRESS );
346 val.p_address = p_bridge;
347 var_Set( p_libvlc, "mosaic-struct", val );
349 p_bridge->i_es_num = 0;
350 p_bridge->pp_es = NULL;
353 for ( i = 0; i < p_bridge->i_es_num; i++ )
355 if ( p_bridge->pp_es[i]->b_empty )
359 if ( i == p_bridge->i_es_num )
361 p_bridge->pp_es = xrealloc( p_bridge->pp_es,
362 (p_bridge->i_es_num + 1) * sizeof(bridged_es_t *) );
363 p_bridge->i_es_num++;
364 p_bridge->pp_es[i] = xmalloc( sizeof(bridged_es_t) );
367 p_sys->p_es = p_es = p_bridge->pp_es[i];
369 p_es->i_alpha = var_GetInteger( p_stream, CFG_PREFIX "alpha" );
370 p_es->i_x = var_GetInteger( p_stream, CFG_PREFIX "x" );
371 p_es->i_y = var_GetInteger( p_stream, CFG_PREFIX "y" );
373 //p_es->fmt = *p_fmt;
374 p_es->psz_id = p_sys->psz_id;
375 p_es->p_picture = NULL;
376 p_es->pp_last = &p_es->p_picture;
377 p_es->b_empty = false;
379 vlc_global_unlock( VLC_MOSAIC_MUTEX );
381 if ( p_sys->i_height || p_sys->i_width )
383 p_sys->p_image = image_HandlerCreate( p_stream );
387 p_sys->p_image = NULL;
390 msg_Dbg( p_stream, "mosaic bridge id=%s pos=%d", p_es->psz_id, i );
392 /* Create user specified video filters */
393 psz_chain = var_GetNonEmptyString( p_stream, CFG_PREFIX "vfilter" );
394 msg_Dbg( p_stream, "psz_chain: %s", psz_chain );
397 filter_owner_t owner = {
398 .sys = p_sys->p_decoder->p_owner,
400 .buffer_new = video_new_buffer_filter,
401 .buffer_del = video_del_buffer_filter,
405 p_sys->p_vf2 = filter_chain_NewVideo( p_stream, false, &owner );
407 es_format_Copy( &fmt, &p_sys->p_decoder->fmt_out );
408 if( p_sys->i_chroma )
409 fmt.video.i_chroma = p_sys->i_chroma;
410 filter_chain_Reset( p_sys->p_vf2, &fmt, &fmt );
411 filter_chain_AppendFromString( p_sys->p_vf2, psz_chain );
419 return (sout_stream_id_sys_t *)p_sys;
422 static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
425 sout_stream_sys_t *p_sys = p_stream->p_sys;
428 bool b_last_es = true;
431 if( !p_sys->b_inited )
434 if( p_sys->p_decoder != NULL )
436 decoder_owner_sys_t *p_owner = p_sys->p_decoder->p_owner;
438 if( p_sys->p_decoder->p_module )
439 module_unneed( p_sys->p_decoder, p_sys->p_decoder->p_module );
440 if( p_sys->p_decoder->p_description )
441 vlc_meta_Delete( p_sys->p_decoder->p_description );
443 vlc_object_release( p_sys->p_decoder );
448 /* Destroy user specified video filters */
450 filter_chain_Delete( p_sys->p_vf2 );
452 vlc_global_lock( VLC_MOSAIC_MUTEX );
454 p_bridge = GetBridge( p_stream );
457 p_es->b_empty = true;
458 while ( p_es->p_picture )
460 picture_t *p_next = p_es->p_picture->p_next;
461 picture_Release( p_es->p_picture );
462 p_es->p_picture = p_next;
465 for ( i = 0; i < p_bridge->i_es_num; i++ )
467 if ( !p_bridge->pp_es[i]->b_empty )
476 vlc_object_t *p_libvlc = VLC_OBJECT( p_stream->p_libvlc );
477 for ( i = 0; i < p_bridge->i_es_num; i++ )
478 free( p_bridge->pp_es[i] );
479 free( p_bridge->pp_es );
481 var_Destroy( p_libvlc, "mosaic-struct" );
484 vlc_global_unlock( VLC_MOSAIC_MUTEX );
486 if ( p_sys->p_image )
488 image_HandlerDelete( p_sys->p_image );
491 p_sys->b_inited = false;
496 /*****************************************************************************
497 * PushPicture : push a picture in the mosaic-struct structure
498 *****************************************************************************/
499 static void PushPicture( sout_stream_t *p_stream, picture_t *p_picture )
501 sout_stream_sys_t *p_sys = p_stream->p_sys;
502 bridged_es_t *p_es = p_sys->p_es;
504 vlc_global_lock( VLC_MOSAIC_MUTEX );
506 *p_es->pp_last = p_picture;
507 p_picture->p_next = NULL;
508 p_es->pp_last = &p_picture->p_next;
510 vlc_global_unlock( VLC_MOSAIC_MUTEX );
513 static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
516 sout_stream_sys_t *p_sys = p_stream->p_sys;
519 if ( (sout_stream_sys_t *)id != p_sys )
521 block_ChainRelease( p_buffer );
525 while ( (p_pic = p_sys->p_decoder->pf_decode_video( p_sys->p_decoder,
528 picture_t *p_new_pic;
530 if( p_sys->i_height || p_sys->i_width )
532 video_format_t fmt_out, fmt_in;
534 memset( &fmt_in, 0, sizeof(video_format_t) );
535 memset( &fmt_out, 0, sizeof(video_format_t) );
536 fmt_in = p_sys->p_decoder->fmt_out.video;
539 if( p_sys->i_chroma )
540 fmt_out.i_chroma = p_sys->i_chroma;
542 fmt_out.i_chroma = VLC_CODEC_I420;
544 const unsigned i_fmt_in_aspect =
545 (int64_t)VOUT_ASPECT_FACTOR *
546 fmt_in.i_sar_num * fmt_in.i_width /
547 (fmt_in.i_sar_den * fmt_in.i_height);
548 if ( !p_sys->i_height )
550 fmt_out.i_width = p_sys->i_width;
551 fmt_out.i_height = (p_sys->i_width * VOUT_ASPECT_FACTOR
552 * p_sys->i_sar_num / p_sys->i_sar_den / i_fmt_in_aspect)
555 else if ( !p_sys->i_width )
557 fmt_out.i_height = p_sys->i_height;
558 fmt_out.i_width = (p_sys->i_height * i_fmt_in_aspect
559 * p_sys->i_sar_den / p_sys->i_sar_num / VOUT_ASPECT_FACTOR)
564 fmt_out.i_width = p_sys->i_width;
565 fmt_out.i_height = p_sys->i_height;
567 fmt_out.i_visible_width = fmt_out.i_width;
568 fmt_out.i_visible_height = fmt_out.i_height;
570 p_new_pic = image_Convert( p_sys->p_image,
571 p_pic, &fmt_in, &fmt_out );
572 if( p_new_pic == NULL )
574 msg_Err( p_stream, "image conversion failed" );
575 picture_Release( p_pic );
581 /* TODO: chroma conversion if needed */
583 p_new_pic = picture_New( p_pic->format.i_chroma,
584 p_pic->format.i_width, p_pic->format.i_height,
585 p_sys->p_decoder->fmt_out.video.i_sar_num,
586 p_sys->p_decoder->fmt_out.video.i_sar_den );
589 picture_Release( p_pic );
590 msg_Err( p_stream, "image allocation failed" );
594 picture_Copy( p_new_pic, p_pic );
596 picture_Release( p_pic );
599 p_new_pic = filter_chain_VideoFilter( p_sys->p_vf2, p_new_pic );
601 PushPicture( p_stream, p_new_pic );
607 inline static int video_update_format_decoder( decoder_t *p_dec )
609 return video_update_format( VLC_OBJECT( p_dec ),
610 (decoder_owner_sys_t *)p_dec->p_owner,
614 inline static picture_t *video_new_buffer_decoder( decoder_t *p_dec )
616 return picture_NewFromFormat( &p_dec->fmt_out.video );
619 inline static picture_t *video_new_buffer_filter( filter_t *p_filter )
621 if( video_update_format( VLC_OBJECT( p_filter ),
622 (decoder_owner_sys_t *)p_filter->owner.sys,
623 &p_filter->fmt_out ) ) {
624 msg_Warn( p_filter, "can't get output picture" );
627 return picture_NewFromFormat( &p_filter->fmt_out.video );
630 static int video_update_format( vlc_object_t *p_this,
631 decoder_owner_sys_t *p_sys,
632 es_format_t *fmt_out )
635 if( fmt_out->video.i_width != p_sys->video.i_width ||
636 fmt_out->video.i_height != p_sys->video.i_height ||
637 fmt_out->video.i_chroma != p_sys->video.i_chroma ||
638 (int64_t)fmt_out->video.i_sar_num * p_sys->video.i_sar_den !=
639 (int64_t)fmt_out->video.i_sar_den * p_sys->video.i_sar_num )
641 vlc_ureduce( &fmt_out->video.i_sar_num,
642 &fmt_out->video.i_sar_den,
643 fmt_out->video.i_sar_num,
644 fmt_out->video.i_sar_den, 0 );
646 if( !fmt_out->video.i_visible_width ||
647 !fmt_out->video.i_visible_height )
649 fmt_out->video.i_visible_width = fmt_out->video.i_width;
650 fmt_out->video.i_visible_height = fmt_out->video.i_height;
653 fmt_out->video.i_chroma = fmt_out->i_codec;
654 p_sys->video = fmt_out->video;
658 fmt_out->video.i_chroma = fmt_out->i_codec;
662 inline static void video_del_buffer_decoder( decoder_t *p_this,
666 picture_Release( p_pic );
669 inline static void video_del_buffer_filter( filter_t *p_this,
673 picture_Release( p_pic );
676 static void video_link_picture_decoder( decoder_t *p_dec, picture_t *p_pic )
679 picture_Hold( p_pic );
682 static void video_unlink_picture_decoder( decoder_t *p_dec, picture_t *p_pic )
685 picture_Release( p_pic );
689 /**********************************************************************
690 * Callback to update (some) params on the fly
691 **********************************************************************/
692 static int HeightCallback( vlc_object_t *p_this, char const *psz_var,
693 vlc_value_t oldval, vlc_value_t newval,
696 VLC_UNUSED(p_this); VLC_UNUSED(oldval); VLC_UNUSED(psz_var);
697 sout_stream_t *p_stream = (sout_stream_t *)p_data;
698 sout_stream_sys_t *p_sys = p_stream->p_sys;
700 /* We create the handler before updating the value in p_sys
701 * so we don't have to worry about locking */
702 if( !p_sys->p_image && newval.i_int )
703 p_sys->p_image = image_HandlerCreate( p_stream );
704 p_sys->i_height = newval.i_int;
709 static int WidthCallback( vlc_object_t *p_this, char const *psz_var,
710 vlc_value_t oldval, vlc_value_t newval,
713 VLC_UNUSED(p_this); VLC_UNUSED(oldval); VLC_UNUSED(psz_var);
714 sout_stream_t *p_stream = (sout_stream_t *)p_data;
715 sout_stream_sys_t *p_sys = p_stream->p_sys;
717 /* We create the handler before updating the value in p_sys
718 * so we don't have to worry about locking */
719 if( !p_sys->p_image && newval.i_int )
720 p_sys->p_image = image_HandlerCreate( p_stream );
721 p_sys->i_width = newval.i_int;
726 static int alphaCallback( vlc_object_t *p_this, char const *psz_var,
727 vlc_value_t oldval, vlc_value_t newval,
730 VLC_UNUSED(p_this); VLC_UNUSED(oldval); VLC_UNUSED(psz_var);
731 sout_stream_t *p_stream = (sout_stream_t *)p_data;
732 sout_stream_sys_t *p_sys = p_stream->p_sys;
735 p_sys->p_es->i_alpha = newval.i_int;
740 static int xCallback( vlc_object_t *p_this, char const *psz_var,
741 vlc_value_t oldval, vlc_value_t newval,
744 VLC_UNUSED(p_this); VLC_UNUSED(oldval); VLC_UNUSED(psz_var);
745 sout_stream_t *p_stream = (sout_stream_t *)p_data;
746 sout_stream_sys_t *p_sys = p_stream->p_sys;
749 p_sys->p_es->i_x = newval.i_int;
754 static int yCallback( vlc_object_t *p_this, char const *psz_var,
755 vlc_value_t oldval, vlc_value_t newval,
758 VLC_UNUSED(p_this); VLC_UNUSED(oldval); VLC_UNUSED(psz_var);
759 sout_stream_t *p_stream = (sout_stream_t *)p_data;
760 sout_stream_sys_t *p_sys = p_stream->p_sys;
763 p_sys->p_es->i_y = newval.i_int;