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

instance: cosmetics

parent 7fb3156d
......@@ -4,6 +4,7 @@
* Copyright © 2014 the VideoLAN team
*
* Authors: Alexey Sokolov <alexey@alexeysokolov.co.cc>
* Hugo Beauzée-Luyssen <hugo@beauzee.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
......@@ -20,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
{
Instance::Instance(const Instance& another)
Instance::Instance( const Instance& another )
{
m_obj = another.m_obj;
retain();
}
const Instance& Instance::operator=(const Instance& another)
const Instance& Instance::operator=( const Instance& another )
{
if (this == &another)
if ( this == &another )
{
return *this;
}
......@@ -46,71 +44,68 @@ const Instance& Instance::operator=(const Instance& another)
return *this;
}
bool Instance::operator==(const Instance& another) const
bool Instance::operator==( const Instance& another ) const
{
return m_obj == another.m_obj;
}
Instance::~Instance()
Instance::~Instance()
{
release();
}
Instance* Instance::create(int argc, const char *const * argv)
Instance* Instance::create( int argc, const char *const * argv )
{
InternalPtr ptr = libvlc_new(argc, argv);
InternalPtr ptr = libvlc_new( argc, argv );
if ( ptr == NULL )
return NULL;
return new Instance(ptr);
return new Instance( ptr );
}
int Instance::addIntf(const std::string& name)
int Instance::addIntf( const std::string& name )
{
int c_result = libvlc_add_intf(m_obj, name.c_str());
int result = c_result;
return result;
return libvlc_add_intf( m_obj, name.c_str() );
}
void Instance::setExitHandler(void(*cb)(void *), void * opaque)
void Instance::setExitHandler( void(*cb)(void *), void * opaque )
{
libvlc_set_exit_handler(m_obj, cb, opaque);
libvlc_set_exit_handler( m_obj, cb, opaque );
}
void Instance::setUserAgent(const std::string& name, const std::string& http)
void Instance::setUserAgent( const std::string& name, const std::string& http )
{
libvlc_set_user_agent(m_obj, name.c_str(), http.c_str());
libvlc_set_user_agent( m_obj, name.c_str(), http.c_str() );
}
void Instance::setAppId(const std::string& id, const std::string& version, const std::string& icon)
void Instance::setAppId( const std::string& id, const std::string& version, const std::string& icon )
{
libvlc_set_app_id(m_obj, id.c_str(), version.c_str(), icon.c_str());
libvlc_set_app_id( m_obj, id.c_str(), version.c_str(), icon.c_str() );
}
void Instance::logUnset()
void Instance::logUnset()
{
libvlc_log_unset(m_obj);
libvlc_log_unset( m_obj );
}
void Instance::logSet(libvlc_log_cb cb, void * data)
void Instance::logSet( libvlc_log_cb cb, void * data )
{
libvlc_log_set(m_obj, cb, data);
}
void Instance::logSetFile(FILE * stream)
void Instance::logSetFile( FILE * stream )
{
libvlc_log_set_file(m_obj, stream);
libvlc_log_set_file( m_obj, stream );
}
std::list<ModuleDescription> Instance::audioFilterList()
std::list<ModuleDescription> Instance::audioFilterList()
{
libvlc_module_description_t * c_result = libvlc_audio_filter_list_get(m_obj);
libvlc_module_description_t* c_result = libvlc_audio_filter_list_get(m_obj);
std::list<ModuleDescription> result = ModuleDescription::makeList(c_result);
libvlc_module_description_list_release(c_result);
libvlc_module_description_list_release( c_result );
return result;
}
std::list<ModuleDescription> Instance::videoFilterList()
std::list<ModuleDescription> Instance::videoFilterList()
{
libvlc_module_description_t * c_result = libvlc_video_filter_list_get(m_obj);
std::list<ModuleDescription> result = ModuleDescription::makeList(c_result);
......@@ -118,7 +113,7 @@ std::list<ModuleDescription> Instance::videoFilterList()
return result;
}
std::list<AudioOutputDescription> Instance::audioOutputList()
std::list<AudioOutputDescription> Instance::audioOutputList()
{
libvlc_audio_output_t * c_result = libvlc_audio_output_list_get(m_obj);
std::list<AudioOutputDescription> result = AudioOutputDescription::makeList(c_result);
......@@ -126,11 +121,9 @@ std::list<AudioOutputDescription> Instance::audioOutputList()
return result;
}
libvlc_audio_output_device_t * Instance::audioOutputDeviceList(const std::string& aout)
libvlc_audio_output_device_t * Instance::audioOutputDeviceList(const std::string& aout)
{
libvlc_audio_output_device_t * c_result = libvlc_audio_output_device_list_get(m_obj, aout.c_str());
libvlc_audio_output_device_t * result = c_result;
return result;
return libvlc_audio_output_device_list_get(m_obj, aout.c_str());
}
Instance::Instance(Internal::InternalPtr ptr)
......@@ -138,12 +131,12 @@ Instance::Instance(Internal::InternalPtr ptr)
{
}
void Instance::release()
void Instance::release()
{
libvlc_release(m_obj);
}
void Instance::retain()
void Instance::retain()
{
libvlc_retain(m_obj);
}
......
......@@ -4,6 +4,7 @@
* Copyright © 2014 the VideoLAN team
*
* Authors: Alexey Sokolov <alexey@alexeysokolov.co.cc>
* Hugo Beauzée-Luyssen <hugo@beauzee.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
......@@ -20,18 +21,14 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/* This file is autogenerated */
#ifndef LIBVLC_CXX_INSTANCE_H
#define LIBVLC_CXX_INSTANCE_H
#include <libvlc_common.hpp>
#include "libvlcpp.hpp"
namespace VLC
{
namespace VLC
{
class Instance : public Internal<libvlc_instance_t>
{
......
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