wxU( INPUT_OPEN ) );
radioSizer->Add( input_radios[0], 0, wxALL, 5 );
input_radios[1] = new wxRadioButton( radio_panel, InputRadio1_Event ,
- wxU( INPUT_PL ) );
+ wxU( INPUT_PL ) );
radioSizer->Add( input_radios[1], 0, wxALL, 5 );
radio_panel->SetSizer( radioSizer );
openSizer->Fit(open_panel);
mainSizer->Add( open_panel );
- playlist_t *p_playlist = (playlist_t *)vlc_object_find( p_intf,
- VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
-
+ playlist_t *p_playlist = pl_Yield( p_intf );
if( p_playlist )
{
if( !playlist_IsEmpty( p_playlist ) )
{
input_radios[1]->Disable();
}
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
}
else
{
if( i != -1 )
{
long data = listview->GetItemData( i );
- playlist_t *p_playlist = (playlist_t *)vlc_object_find( p_intf,
- VLC_OBJECT_PLAYLIST, FIND_ANYWHERE);
+ playlist_t *p_playlist = pl_Yield( p_intf );
if( p_playlist )
{
- playlist_item_t * p_item = playlist_ItemGetById( p_playlist, (int)data, VLC_FALSE );
+ playlist_item_t * p_item = playlist_ItemGetById( p_playlist, (int)data, false );
if( p_item )
{
const char *psz_uri = input_item_GetURI( p_item->p_input );
}
else
event.Veto();
+ pl_Release( p_playlist );
}
else
event.Veto();
/* Line 2 : codec */
video_sizer1->Add( new wxStaticText(this, -1, wxU(_("Codec"))),0,wxLEFT ,5);
video_combo = new wxComboBox( this, VideoCodec_Event, wxT(""),
- wxDefaultPosition, wxSize(200,25), 0, NULL,
+ wxDefaultPosition, wxSize(200,25), 0, NULL,
wxCB_DROPDOWN| wxCB_READONLY );
for( i= 0; vcodecs_array[i].psz_display != NULL; i++ )
{
/* Line 2 : codec */
audio_sizer1->Add( new wxStaticText(this, -1, wxU(_("Codec"))),0,wxLEFT,5);
audio_combo = new wxComboBox( this, AudioCodec_Event, wxT(""),
- wxDefaultPosition, wxSize(200,25), 0, NULL,
+ wxDefaultPosition, wxSize(200,25), 0, NULL,
wxCB_DROPDOWN| wxCB_READONLY );
for( i= 0; acodecs_array[i].psz_display != NULL; i++ )
{
wizTranscodeCodecPage::~wizTranscodeCodecPage()
{
- if( acodec ) free( acodec );
- if( vcodec ) free( vcodec );
+ free( acodec );
+ free( vcodec );
}
void wizTranscodeCodecPage::OnEnableVideo(wxCommandEvent& event)
if( !event.GetDirection() ) return;
/* Check valid address */
- if( i_method == 1
- && !net_AddressIsMulticast( (vlc_object_t *)p_intf,
- address_txtctrl->GetValue().mb_str(wxConvUTF8)) )
- {
- wxMessageBox( wxU( INVALID_MCAST_ADDRESS ) , wxU( ERROR_MSG ),
- wxICON_WARNING | wxOK, this->p_parent );
- event.Veto();
-
- }
- else if( i_method == 0 && address_txtctrl->GetValue().IsEmpty() )
+ if( i_method == 0 && address_txtctrl->GetValue().IsEmpty() )
{
wxMessageBox( wxU( NO_ADDRESS_TEXT ) , wxU( ERROR_MSG ),
wxICON_WARNING | wxOK, this->p_parent );
":sout=#%smux=%s,dst=%s%s%s%s}", method,
mux, v6 ? "[" : "", address, v6 ? "]" : "",
psz_sap_option ?: "" );
- if( psz_sap_option ) free( psz_sap_option );
+ free( psz_sap_option );
}
- playlist_t *p_playlist = (playlist_t *)vlc_object_find( p_intf,
- VLC_OBJECT_PLAYLIST, FIND_ANYWHERE);
+ playlist_t *p_playlist = pl_Yield( p_intf );
if( p_playlist )
{
input_item_t *p_input = input_ItemNew( p_playlist, mrl,
snprintf( psz_ttl, 20, "ttl=%i",i_ttl );
input_ItemAddOption( p_input, psz_ttl );
+ /* FIXME: playlist_AddInput() can fail */
playlist_AddInput( p_playlist, p_input,
- PLAYLIST_GO, PLAYLIST_END, VLC_TRUE, VLC_FALSE );
- vlc_object_release(p_playlist);
+ PLAYLIST_GO, PLAYLIST_END, true, pl_Unlocked );
+ vlc_gc_decref( p_input );
+ pl_Release( p_playlist );
}
else
{