Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
3a348579
Commit
3a348579
authored
Jan 28, 2010
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvlcpp: add an audio class to handle audio functions.
parent
cd6da087
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
214 additions
and
2 deletions
+214
-2
bindings/libvlcpp/src/Makefile.am
bindings/libvlcpp/src/Makefile.am
+2
-0
bindings/libvlcpp/src/audio.cpp
bindings/libvlcpp/src/audio.cpp
+88
-0
bindings/libvlcpp/src/audio.hpp
bindings/libvlcpp/src/audio.hpp
+122
-0
bindings/libvlcpp/src/video.cpp
bindings/libvlcpp/src/video.cpp
+1
-1
bindings/libvlcpp/src/video.hpp
bindings/libvlcpp/src/video.hpp
+1
-1
No files found.
bindings/libvlcpp/src/Makefile.am
View file @
3a348579
lib_LTLIBRARIES
=
libvlcpp.la
lib_LTLIBRARIES
=
libvlcpp.la
libvlcpp_la_SOURCES
=
\
libvlcpp_la_SOURCES
=
\
audio.cpp
\
audio.hpp
\
exception.cpp
\
exception.cpp
\
exception.hpp
\
exception.hpp
\
libvlc.cpp
\
libvlc.cpp
\
...
...
bindings/libvlcpp/src/audio.cpp
0 → 100644
View file @
3a348579
/*****************************************************************************
* audio.cpp: audio part of the media player
*****************************************************************************
* Copyright (C) 2010 the VideoLAN team
* $Id$
*
* Authors: Rémi Duraffort <ivoire@videolan.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include "audio.hpp"
#include "exception.hpp"
using
namespace
libvlc
;
Audio
::
Audio
(
libvlc_instance_t
*
libvlcInstance
,
libvlc_media_player_t
*
player
)
{
m_libvlcInstance
=
libvlcInstance
;
libvlc_retain
(
m_libvlcInstance
);
m_player
=
player
;
libvlc_media_player_retain
(
m_player
);
}
Audio
::~
Audio
()
{
libvlc_media_player_release
(
m_player
);
libvlc_release
(
m_libvlcInstance
);
}
void
Audio
::
toggleMute
()
{
libvlc_audio_toggle_mute
(
m_libvlcInstance
);
}
int
Audio
::
mute
()
{
return
libvlc_audio_get_mute
(
m_libvlcInstance
);
}
void
Audio
::
setMute
(
int
mute
)
{
libvlc_audio_set_mute
(
m_libvlcInstance
,
mute
);
}
int
Audio
::
volume
()
{
return
libvlc_audio_get_volume
(
m_libvlcInstance
);
}
void
Audio
::
setVolume
(
int
volume
)
{
Exception
ex
;
libvlc_audio_set_volume
(
m_libvlcInstance
,
volume
,
&
ex
.
ex
);
}
int
Audio
::
track
()
{
Exception
ex
;
return
libvlc_audio_get_track
(
m_player
,
&
ex
.
ex
);
}
int
Audio
::
trackCount
()
{
Exception
ex
;
return
libvlc_audio_get_track_count
(
m_player
,
&
ex
.
ex
);
}
void
Audio
::
setTrack
(
int
track
)
{
Exception
ex
;
libvlc_audio_set_track
(
m_player
,
track
,
&
ex
.
ex
);
}
bindings/libvlcpp/src/audio.hpp
0 → 100644
View file @
3a348579
/*****************************************************************************
* audio.hpp: audio part of the media player
*****************************************************************************
* Copyright (C) 2010 the VideoLAN team
* $Id$
*
* Authors: Rémi Duraffort <ivoire@videolan.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef LIBVLCPP_AUDIO_HPP
#define LIBVLCPP_AUDIO_HPP
#include <vlc/libvlc.h>
#include <vlc/libvlc_media.h>
#include <vlc/libvlc_media_player.h>
#include "libvlc.hpp"
namespace
libvlc
{
class
Audio
{
public:
/**
* Constructor
* @param libvlcInstance: the libvlc instance
* @param player: the player handling the audio
*/
Audio
(
libvlc_instance_t
*
libvlcInstance
,
libvlc_media_player_t
*
player
);
/** Destructor */
~
Audio
();
/**
* Toggle mute status
*/
void
toggleMute
();
/**
* Get the mute status
* @return true if the sound is muted
*/
int
mute
();
/**
* Set the mute status
* @param mute: true to mute, otherwise unmute
*/
void
setMute
(
int
mute
);
/**
* Get the current volume
* @return the current volume
*/
int
volume
();
/**
* Set the volume
* @param volume: the new volume
*/
void
setVolume
(
int
volume
);
/**
* Get the current track
* @return the current audio track
*/
int
track
();
/**
* Get the number of audio tracks
* @return the number of audio tracks
*/
int
trackCount
();
/**
* Set the audio track
* @param track: the audio track
*/
void
setTrack
(
int
track
);
/**
* Get the current audio channel
* @return the current audio channel
*/
int
channel
();
/**
* Set the audio channel
* @param channel: the new audio channel
*/
void
setChannel
(
int
channel
);
/** trackDescription */
private:
/** The media player instance of libvlc */
libvlc_media_player_t
*
m_player
;
/** The instance of libvlc */
libvlc_instance_t
*
m_libvlcInstance
;
};
};
#endif // LIBVLCPP_AUDIO_HPP
bindings/libvlcpp/src/video.cpp
View file @
3a348579
/*****************************************************************************
/*****************************************************************************
* video.cpp: video part of
an
media player
* video.cpp: video part of
the
media player
*****************************************************************************
*****************************************************************************
* Copyright (C) 2010 the VideoLAN team
* Copyright (C) 2010 the VideoLAN team
* $Id$
* $Id$
...
...
bindings/libvlcpp/src/video.hpp
View file @
3a348579
/*****************************************************************************
/*****************************************************************************
* video.hpp: video part of
an
media player
* video.hpp: video part of
the
media player
*****************************************************************************
*****************************************************************************
* Copyright (C) 2010 the VideoLAN team
* Copyright (C) 2010 the VideoLAN team
* $Id$
* $Id$
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment