Commit e1870821 authored by Rohit Yadav's avatar Rohit Yadav

VLCMediaPlayer: Refactor setDrawable tackle platform specific drawing methods.

parent bc426099
......@@ -20,6 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include <QtGlobal>
#include <QtDebug>
#include <cassert>
#include "VLCMediaPlayer.h"
......@@ -219,15 +220,16 @@ MediaPlayer::isSeekable()
}
void
MediaPlayer::setDrawable( void* hwnd )
MediaPlayer::setDrawable( void* drawable )
{
libvlc_media_player_set_hwnd( m_internalPtr, hwnd );
}
void
MediaPlayer::setDrawable( uint32_t drawable )
{
libvlc_media_player_set_xwindow( m_internalPtr, drawable );
qDebug() << "In MediaPlayer::setDrawable(hwnd), == " << drawable;
#if defined ( Q_WS_MAC )
libvlc_media_player_set_nsobject( m_internalPtr, drawable );
#elif defined ( Q_OS_UNIX )
libvlc_media_player_set_xwindow( m_internalPtr, static_cast< uint32_t >(drawable) );
#elif defined ( Q_OS_WIN )
libvlc_media_player_set_hwnd( m_internalPtr, drawable );
#endif
}
void
......
......@@ -60,8 +60,7 @@ namespace LibVLCpp
void takeSnapshot( const char* outputFile, unsigned int width, unsigned int heigth );
bool isPlaying();
bool isSeekable();
void setDrawable( void* hwnd );
void setDrawable( quint32 drawable );
void setDrawable( void* drawable );
void setMedia(Media* media);
void getSize( quint32 *outWidth, quint32 *outHeight);
float getFps();
......
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