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

Media: remove unneessary temporary variable due to generated code

parent 7caed348
......@@ -21,12 +21,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/* This file is autogenerated */
#include <vlc.hpp>
namespace VLC {
namespace VLC
{
Media* Media::fromPath(Instance& instance, const std::string& path)
{
......@@ -74,9 +72,9 @@ Media::Media(const Media& another)
retain();
}
const Media& Media::operator=(const Media& another)
const Media& Media::operator=(const Media& another)
{
if (this == &another)
if (this == &another)
{
return *this;
}
......@@ -86,27 +84,27 @@ const Media& Media::operator=(const Media& another)
return *this;
}
bool Media::operator==(const Media& another) const
bool Media::operator==(const Media& another) const
{
return m_obj == another.m_obj;
}
Media::~Media()
Media::~Media()
{
release();
}
void Media::addOption(const std::string& psz_options)
void Media::addOption(const std::string& psz_options)
{
libvlc_media_add_option(m_obj, psz_options.c_str());
}
void Media::addOptionFlag(const std::string& psz_options, unsigned i_flags)
void Media::addOptionFlag(const std::string& psz_options, unsigned i_flags)
{
libvlc_media_add_option_flag(m_obj, psz_options.c_str(), i_flags);
}
std::string Media::mrl()
std::string Media::mrl()
{
char * c_result = libvlc_media_get_mrl(m_obj);
std::string result = c_result;
......@@ -114,14 +112,12 @@ std::string Media::mrl()
return result;
}
Media Media::duplicate()
Media Media::duplicate()
{
libvlc_media_t * c_result = libvlc_media_duplicate(m_obj);
Media result = c_result;
return result;
return libvlc_media_duplicate(m_obj);
}
std::string Media::meta(libvlc_meta_t e_meta)
std::string Media::meta(libvlc_meta_t e_meta)
{
char * c_result = libvlc_media_get_meta(m_obj, e_meta);
std::string result = c_result;
......@@ -129,73 +125,59 @@ std::string Media::meta(libvlc_meta_t e_meta)
return result;
}
void Media::setMeta(libvlc_meta_t e_meta, const std::string& psz_value)
void Media::setMeta(libvlc_meta_t e_meta, const std::string& psz_value)
{
libvlc_media_set_meta(m_obj, e_meta, psz_value.c_str());
}
int Media::saveMeta()
int Media::saveMeta()
{
int c_result = libvlc_media_save_meta(m_obj);
int result = c_result;
return result;
return libvlc_media_save_meta(m_obj);
}
libvlc_state_t Media::state()
libvlc_state_t Media::state()
{
libvlc_state_t c_result = libvlc_media_get_state(m_obj);
libvlc_state_t result = c_result;
return result;
return libvlc_media_get_state(m_obj);
}
bool Media::stats(libvlc_media_stats_t * p_stats)
bool Media::stats(libvlc_media_stats_t * p_stats)
{
int c_result = libvlc_media_get_stats(m_obj, p_stats);
bool result = c_result;
return result;
return libvlc_media_get_stats(m_obj, p_stats);
}
libvlc_event_manager_t * Media::eventManager()
libvlc_event_manager_t * Media::eventManager()
{
libvlc_event_manager_t * c_result = libvlc_media_event_manager(m_obj);
libvlc_event_manager_t * result = c_result;
return result;
return libvlc_media_event_manager(m_obj);
}
libvlc_time_t Media::duration()
libvlc_time_t Media::duration()
{
libvlc_time_t c_result = libvlc_media_get_duration(m_obj);
libvlc_time_t result = c_result;
return result;
return libvlc_media_get_duration(m_obj);
}
void Media::parse()
void Media::parse()
{
libvlc_media_parse(m_obj);
}
void Media::parseAsync()
void Media::parseAsync()
{
libvlc_media_parse_async(m_obj);
}
bool Media::isParsed()
bool Media::isParsed()
{
int c_result = libvlc_media_is_parsed(m_obj);
bool result = c_result;
return result;
return libvlc_media_is_parsed(m_obj);
}
void Media::setUserData(void * p_new_user_data)
void Media::setUserData(void * p_new_user_data)
{
libvlc_media_set_user_data(m_obj, p_new_user_data);
}
void * Media::userData()
void * Media::userData()
{
void * c_result = libvlc_media_get_user_data(m_obj);
void * result = c_result;
return result;
return libvlc_media_get_user_data(m_obj);
}
std::vector<MediaTrack> Media::tracks()
......@@ -218,12 +200,12 @@ Media::Media(Internal::InternalPtr ptr)
{
}
void Media::retain()
void Media::retain()
{
libvlc_media_retain(m_obj);
}
void Media::release()
void Media::release()
{
libvlc_media_release(m_obj);
}
......
......@@ -21,17 +21,13 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/* This file is autogenerated */
#ifndef LIBVLC_CXX_MEDIA_H
#define LIBVLC_CXX_MEDIA_H
#include <libvlc_common.hpp>
#include "libvlcpp.hpp"
namespace VLC
namespace VLC
{
class MediaList;
......
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