Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
59b29b20
Commit
59b29b20
authored
Nov 01, 2008
by
Lukas Durfina
Committed by
Jean-Baptiste Kempf
Nov 07, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvlc: better audio handling
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
1e2f42cb
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
457 additions
and
28 deletions
+457
-28
include/vlc/libvlc.h
include/vlc/libvlc.h
+146
-4
include/vlc/libvlc_structures.h
include/vlc/libvlc_structures.h
+23
-0
src/control/audio.c
src/control/audio.c
+277
-24
src/libvlc.sym
src/libvlc.sym
+11
-0
No files found.
include/vlc/libvlc.h
View file @
59b29b20
...
@@ -1022,6 +1022,135 @@ VLC_PUBLIC_API void libvlc_video_set_viewport( libvlc_instance_t *, const libvlc
...
@@ -1022,6 +1022,135 @@ VLC_PUBLIC_API void libvlc_video_set_viewport( libvlc_instance_t *, const libvlc
* @{
* @{
*/
*/
/**
* Audio device types
*/
typedef
enum
libvlc_audio_output_device_types_t
{
libvlc_AudioOutputDevice_Error
=
-
1
,
libvlc_AudioOutputDevice_Mono
=
1
,
libvlc_AudioOutputDevice_Stereo
=
2
,
libvlc_AudioOutputDevice_2F2R
=
4
,
libvlc_AudioOutputDevice_3F2R
=
5
,
libvlc_AudioOutputDevice_5_1
=
6
,
libvlc_AudioOutputDevice_6_1
=
7
,
libvlc_AudioOutputDevice_7_1
=
8
,
libvlc_AudioOutputDevice_SPDIF
=
10
}
libvlc_audio_output_device_types_t
;
/**
* Audio channels
*/
typedef
enum
libvlc_audio_output_channel_t
{
libvlc_AudioChannel_Error
=
-
1
,
libvlc_AudioChannel_Stereo
=
1
,
libvlc_AudioChannel_RStereo
=
2
,
libvlc_AudioChannel_Left
=
3
,
libvlc_AudioChannel_Right
=
4
,
libvlc_AudioChannel_Dolbys
=
5
}
libvlc_audio_output_channel_t
;
/**
* Get the list of available audio outputs
*
* \param p_instance libvlc instance
* \param p_e an initialized exception pointer
* \return list of available audio outputs, at the end free it with
* \see libvlc_audio_output_list_release \see libvlc_audio_output_t
*/
VLC_PUBLIC_API
libvlc_audio_output_t
*
libvlc_audio_output_list_get
(
libvlc_instance_t
*
,
libvlc_exception_t
*
);
/**
* Free the list of available audio outputs
*
* \param p_list list with audio outputs for release
*/
VLC_PUBLIC_API
void
libvlc_audio_output_list_release
(
libvlc_audio_output_t
*
);
/**
* Set the audio output.
* Change will be applied after stop and play.
*
* \param p_instance libvlc instance
* \param psz_name name of audio output,
* use psz_name of \see libvlc_audio_output_t
* \return true if function succeded
*/
VLC_PUBLIC_API
int
libvlc_audio_output_set
(
libvlc_instance_t
*
,
const
char
*
);
/**
* Get count of devices for audio output, these devices are hardware oriented
* like analor or digital output of sound card
*
* \param p_instance libvlc instance
* \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
* \return number of devices
*/
VLC_PUBLIC_API
int
libvlc_audio_output_device_count
(
libvlc_instance_t
*
,
const
char
*
);
/**
* Get long name of device, if not available short name given
*
* \param p_instance libvlc instance
* \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
* \param i_device device index
* \return long name of device
*/
VLC_PUBLIC_API
char
*
libvlc_audio_output_device_longname
(
libvlc_instance_t
*
,
const
char
*
,
int
);
/**
* Get id name of device
*
* \param p_instance libvlc instance
* \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
* \param i_device device index
* \return id name of device, use for setting device, need to be free after use
*/
VLC_PUBLIC_API
char
*
libvlc_audio_output_device_id
(
libvlc_instance_t
*
,
const
char
*
,
int
);
/**
* Set device for using
*
* \param p_instance libvlc instance
* \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
* \param psz_device_id device
*/
VLC_PUBLIC_API
void
libvlc_audio_output_device_set
(
libvlc_instance_t
*
,
const
char
*
,
const
char
*
);
/**
* Get current audio device type. Device type describes something like
* character of output sound - stereo sound, 2.1, 5.1 etc
*
* \param p_instance vlc instance
* \param p_e an initialized exception pointer
* \return the audio devices type \see libvlc_audio_output_device_types_t
*/
VLC_PUBLIC_API
int
libvlc_audio_output_get_device_type
(
libvlc_instance_t
*
,
libvlc_exception_t
*
);
/**
* Set current audio device type.
*
* \param p_instance vlc instance
* \param device_type the audio device type,
according to \see libvlc_audio_output_device_types_t
* \param p_e an initialized exception pointer
*/
VLC_PUBLIC_API
void
libvlc_audio_output_set_device_type
(
libvlc_instance_t
*
,
int
,
libvlc_exception_t
*
);
/**
/**
* Toggle mute status.
* Toggle mute status.
*
*
...
@@ -1075,6 +1204,16 @@ VLC_PUBLIC_API void libvlc_audio_set_volume( libvlc_instance_t *, int, libvlc_ex
...
@@ -1075,6 +1204,16 @@ VLC_PUBLIC_API void libvlc_audio_set_volume( libvlc_instance_t *, int, libvlc_ex
*/
*/
VLC_PUBLIC_API
int
libvlc_audio_get_track_count
(
libvlc_media_player_t
*
,
libvlc_exception_t
*
);
VLC_PUBLIC_API
int
libvlc_audio_get_track_count
(
libvlc_media_player_t
*
,
libvlc_exception_t
*
);
/**
* Get the description of available audio tracks.
*
* \param p_mi media player
* \param p_e an initialized exception
* \return list with description of available audio tracks
*/
VLC_PUBLIC_API
libvlc_track_description_t
*
libvlc_audio_get_track_description
(
libvlc_media_player_t
*
,
libvlc_exception_t
*
);
/**
/**
* Get current audio track.
* Get current audio track.
*
*
...
@@ -1098,18 +1237,21 @@ VLC_PUBLIC_API void libvlc_audio_set_track( libvlc_media_player_t *, int, libvlc
...
@@ -1098,18 +1237,21 @@ VLC_PUBLIC_API void libvlc_audio_set_track( libvlc_media_player_t *, int, libvlc
*
*
* \param p_instance vlc instance
* \param p_instance vlc instance
* \param p_e an initialized exception pointer
* \param p_e an initialized exception pointer
* \return the audio channel
(int)
* \return the audio channel
\see libvlc_audio_output_channel_t
*/
*/
VLC_PUBLIC_API
int
libvlc_audio_get_channel
(
libvlc_instance_t
*
,
libvlc_exception_t
*
);
VLC_PUBLIC_API
int
libvlc_audio_get_channel
(
libvlc_instance_t
*
,
libvlc_exception_t
*
);
/**
/**
* Set current audio channel.
* Set current audio channel.
*
*
* \param p_instance vlc instance
* \param p_instance vlc instance
* \param
i_channel the audio channel (int)
* \param
channel the audio channel, \see libvlc_audio_output_channel_t
* \param p_e an initialized exception pointer
* \param p_e an initialized exception pointer
*/
*/
VLC_PUBLIC_API
void
libvlc_audio_set_channel
(
libvlc_instance_t
*
,
int
,
libvlc_exception_t
*
);
VLC_PUBLIC_API
void
libvlc_audio_set_channel
(
libvlc_instance_t
*
,
int
,
libvlc_exception_t
*
);
/** @} audio */
/** @} audio */
...
...
include/vlc/libvlc_structures.h
View file @
59b29b20
...
@@ -233,6 +233,29 @@ typedef struct libvlc_track_description_t
...
@@ -233,6 +233,29 @@ typedef struct libvlc_track_description_t
/**@} */
/**@} */
/*****************************************************************************
* Audio
*****************************************************************************/
/** \defgroup libvlc_audio libvlc_audio
* \ingroup libvlc_media_player
* LibVLC Audio handling
* @{
*/
/**
* Description for audio output. It contains
* name, description and pointer to next record.
*/
typedef
struct
libvlc_audio_output_t
{
char
*
psz_name
;
char
*
psz_description
;
struct
libvlc_audio_output_t
*
p_next
;
}
libvlc_audio_output_t
;
/**@} */
/*****************************************************************************
/*****************************************************************************
* Video
* Video
...
...
src/control/audio.c
View file @
59b29b20
This diff is collapsed.
Click to expand it.
src/libvlc.sym
View file @
59b29b20
libvlc_add_intf
libvlc_add_intf
libvlc_audio_output_device_count
libvlc_audio_output_device_id
libvlc_audio_output_device_longname
libvlc_audio_output_device_set
libvlc_audio_output_get_device_type
libvlc_audio_output_list_get
libvlc_audio_output_list_release
libvlc_audio_output_set
libvlc_audio_output_set_device_type
libvlc_audio_get_channel
libvlc_audio_get_channel
libvlc_audio_get_device
libvlc_audio_get_mute
libvlc_audio_get_mute
libvlc_audio_get_track
libvlc_audio_get_track
libvlc_audio_get_track_count
libvlc_audio_get_track_count
libvlc_audio_get_track_description
libvlc_audio_get_track_description
libvlc_audio_get_volume
libvlc_audio_get_volume
libvlc_audio_set_channel
libvlc_audio_set_channel
libvlc_audio_set_device
libvlc_audio_set_mute
libvlc_audio_set_mute
libvlc_audio_set_track
libvlc_audio_set_track
libvlc_audio_set_volume
libvlc_audio_set_volume
...
...
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