[vlc-devel] [Patch] Sending a signal when a vout is created/destroyed
Hugo Beauzee-Luyssen
beauze.h at gmail.com
Wed Jan 20 00:54:29 CET 2010
On Wed, Jan 20, 2010 at 12:47 AM, Laurent Aimar <fenrir at via.ecp.fr> wrote:
> On Wed, Jan 20, 2010, Hugo Beauzee-Luyssen wrote:
>> This should integrate your advices.
>> I renamed the created field to has_vout. It's enough to know when an
>> user can starts to use the function mentioned earlier.
>>
>>
>> #ifdef __cplusplus
>> @@ -256,6 +257,11 @@ struct libvlc_event_t
>> {
>> libvlc_media_t * new_media;
>> } media_player_media_changed;
>> + /* Vout created or destroyed */
>> + struct
>> + {
>> + int has_vout;
> Using bool would make more sense (unless bool is not to be used in this
> file ?)
That wasn't intentional, but indeed, bool is not to be used in this
file. has_vout is still int, but the value is now explicitly casted to
int
>> + } media_player_vout_changed;
>> } u;
>
>> + else if ( newval.i_int == INPUT_EVENT_VOUT )
>> + {
>> + vout_thread_t* vout = input_GetVout( p_input );
>> + bool has_vout = vout != NULL;
>> + vlc_object_release( vout );
> You cannot call vlc_object_release on NULL.
Fixed
>> +
>> + event.type = libvlc_MediaPlayerVoutChanged;
>> + event.u.media_player_vout_changed.has_vout = has_vout;
>> + libvlc_event_send( p_mi->p_event_manager, &event );
>> + }
>
>
> --
> fenrir
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
>
Regards,
--
Hugo Beauzée-Luyssen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Adding-an-event-when-a-vout-is-created-or-destroyed.patch
Type: text/x-patch
Size: 1878 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20100120/ce74bf40/attachment.bin>
More information about the vlc-devel
mailing list