Commit 4bd858b5 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

MediaListPlayer: remove unnecessary temporary variables

parent 6f377385
......@@ -21,23 +21,20 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/* This file is autogenerated */
#include <vlc.hpp>
namespace VLC {
namespace VLC
{
MediaListPlayer::MediaListPlayer(const MediaListPlayer& another)
MediaListPlayer::MediaListPlayer(const MediaListPlayer& another)
{
m_obj = another.m_obj;
retain();
}
const MediaListPlayer& MediaListPlayer::operator=(const MediaListPlayer& another)
const MediaListPlayer& MediaListPlayer::operator=(const MediaListPlayer& another)
{
if (this == &another)
if (this == &another)
{
return *this;
}
......@@ -47,12 +44,12 @@ const MediaListPlayer& MediaListPlayer::operator=(const MediaListPlayer& another
return *this;
}
bool MediaListPlayer::operator==(const MediaListPlayer& another) const
bool MediaListPlayer::operator==(const MediaListPlayer& another) const
{
return m_obj == another.m_obj;
}
MediaListPlayer::~MediaListPlayer()
MediaListPlayer::~MediaListPlayer()
{
release();
}
......@@ -65,11 +62,9 @@ MediaListPlayer* MediaListPlayer::create(Instance& instance)
return new MediaListPlayer( ptr );
}
libvlc_event_manager_t * MediaListPlayer::eventManager()
libvlc_event_manager_t * MediaListPlayer::eventManager()
{
libvlc_event_manager_t * c_result = libvlc_media_list_player_event_manager(m_obj);
libvlc_event_manager_t * result = c_result;
return result;
return libvlc_media_list_player_event_manager(m_obj);
}
void MediaListPlayer::setMediaPlayer( MediaPlayer &mi )
......@@ -82,64 +77,52 @@ void MediaListPlayer::setMediaList( MediaList &mlist )
libvlc_media_list_player_set_media_list( m_obj, mlist );
}
void MediaListPlayer::play()
void MediaListPlayer::play()
{
libvlc_media_list_player_play(m_obj);
}
void MediaListPlayer::pause()
void MediaListPlayer::pause()
{
libvlc_media_list_player_pause(m_obj);
}
bool MediaListPlayer::isPlaying()
bool MediaListPlayer::isPlaying()
{
int c_result = libvlc_media_list_player_is_playing(m_obj);
bool result = c_result;
return result;
return libvlc_media_list_player_is_playing(m_obj) != 0;
}
libvlc_state_t MediaListPlayer::state()
libvlc_state_t MediaListPlayer::state()
{
libvlc_state_t c_result = libvlc_media_list_player_get_state(m_obj);
libvlc_state_t result = c_result;
return result;
return libvlc_media_list_player_get_state( m_obj );
}
int MediaListPlayer::playItemAtIndex(int i_index)
int MediaListPlayer::playItemAtIndex(int i_index)
{
int c_result = libvlc_media_list_player_play_item_at_index(m_obj, i_index);
int result = c_result;
return result;
return libvlc_media_list_player_play_item_at_index(m_obj, i_index);
}
int MediaListPlayer::playItem(Media & p_md)
{
int c_result = libvlc_media_list_player_play_item( m_obj, p_md );
int result = c_result;
return result;
return libvlc_media_list_player_play_item( m_obj, p_md );
}
void MediaListPlayer::stop()
void MediaListPlayer::stop()
{
libvlc_media_list_player_stop(m_obj);
}
int MediaListPlayer::next()
int MediaListPlayer::next()
{
int c_result = libvlc_media_list_player_next(m_obj);
int result = c_result;
return result;
return libvlc_media_list_player_next(m_obj);
}
int MediaListPlayer::previous()
int MediaListPlayer::previous()
{
int c_result = libvlc_media_list_player_previous(m_obj);
int result = c_result;
return result;
return libvlc_media_list_player_previous(m_obj);
}
void MediaListPlayer::setPlaybackMode(libvlc_playback_mode_t e_mode)
void MediaListPlayer::setPlaybackMode(libvlc_playback_mode_t e_mode)
{
libvlc_media_list_player_set_playback_mode(m_obj, e_mode);
}
......@@ -149,12 +132,12 @@ MediaListPlayer::MediaListPlayer(Internal::InternalPtr ptr)
{
}
void MediaListPlayer::release()
void MediaListPlayer::release()
{
libvlc_media_list_player_release(m_obj);
}
void MediaListPlayer::retain()
void MediaListPlayer::retain()
{
libvlc_media_list_player_retain(m_obj);
}
......
......@@ -21,20 +21,15 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/* This file is autogenerated */
#ifndef LIBVLC_CXX_MEDIALISTPLAYER_H
#define LIBVLC_CXX_MEDIALISTPLAYER_H
#include <libvlc_common.hpp>
#include "libvlcpp.hpp"
namespace VLC
namespace VLC
{
class MediaListPlayer : public Internal<libvlc_media_list_player_t>
{
public:
......
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