GPU-Calc: remove Alloc_Host_Ptr for clmem of NAN vector
[LibreOffice.git] / avmedia / source / vlc / wrapper / Instance.cxx
blob23ddef67469bbe87074e98635a35161a72c4ebe2
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
10 #include "Instance.hxx"
11 #include "SymbolLoader.hxx"
13 namespace
15 libvlc_instance_t* ( *libvlc_new ) ( int argc, const char * const *argv );
16 void ( *libvlc_release ) ( libvlc_instance_t *p_instance );
17 void ( *libvlc_retain ) ( libvlc_instance_t *p_instance );
20 namespace avmedia
22 namespace vlc
24 namespace wrapper
26 bool Instance::LoadSymbols()
28 ApiMap VLC_INSTANCE_API[] =
30 SYM_MAP( libvlc_new ),
31 SYM_MAP( libvlc_release ),
32 SYM_MAP( libvlc_retain )
35 return InitApiMap( VLC_INSTANCE_API );
38 Instance::Instance( int argc, const char * const argv[] )
39 : mInstance( libvlc_new( argc, argv ) )
41 if ( mInstance == NULL)
43 //TODO: error
47 Instance::Instance( const Instance& other )
49 operator=( other );
52 Instance& Instance::operator=( const Instance& other )
54 libvlc_release( mInstance );
55 mInstance = other.mInstance;
56 libvlc_retain( mInstance );
57 return *this;
60 Instance::~Instance()
62 libvlc_release( mInstance );
68 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */