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
c6a4cb11
Commit
c6a4cb11
authored
Oct 11, 2006
by
Damien Fouilleul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- addendum to [17024], backport of [16946]
parent
312523f7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
145 additions
and
6 deletions
+145
-6
activex/supporterrorinfo.cpp
activex/supporterrorinfo.cpp
+70
-0
activex/supporterrorinfo.h
activex/supporterrorinfo.h
+68
-0
modules/access/dshow/filter.cpp
modules/access/dshow/filter.cpp
+3
-2
src/control/audio.c
src/control/audio.c
+2
-2
src/control/input.c
src/control/input.c
+2
-2
No files found.
activex/supporterrorinfo.cpp
0 → 100644
View file @
c6a4cb11
/*****************************************************************************
* supporterrorinfo.cpp: ActiveX control for VLC
*****************************************************************************
* Copyright (C) 2005 the VideoLAN team
*
* Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
*
* 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 "plugin.h"
#include "supporterrorinfo.h"
#include "utils.h"
#include "axvlc_idl.h"
using
namespace
std
;
STDMETHODIMP
VLCSupportErrorInfo
::
InterfaceSupportsErrorInfo
(
REFIID
riid
)
{
if
(
(
riid
==
IID_IVLCAudio
)
||
(
riid
==
IID_IVLCInput
)
||
(
riid
==
IID_IVLCPlaylist
)
||
(
riid
==
IID_IVLCVideo
)
||
(
riid
==
IID_IVLCControl2
)
)
{
return
S_OK
;
}
return
S_FALSE
;
};
void
VLCSupportErrorInfo
::
setErrorInfo
(
LPCOLESTR
progid
,
REFIID
riid
,
const
char
*
description
)
{
BSTR
bstrDescription
=
BSTRFromCStr
(
CP_UTF8
,
description
);
if
(
NULL
!=
bstrDescription
)
{
ICreateErrorInfo
*
pcerrinfo
;
HRESULT
hr
=
CreateErrorInfo
(
&
pcerrinfo
);
if
(
SUCCEEDED
(
hr
)
)
{
IErrorInfo
*
perrinfo
;
pcerrinfo
->
SetSource
((
LPOLESTR
)
progid
);
pcerrinfo
->
SetGUID
(
riid
);
pcerrinfo
->
SetDescription
((
LPOLESTR
)
bstrDescription
);
hr
=
pcerrinfo
->
QueryInterface
(
IID_IErrorInfo
,
(
LPVOID
*
)
&
perrinfo
);
if
(
SUCCEEDED
(
hr
)
)
{
::
SetErrorInfo
(
0
,
perrinfo
);
perrinfo
->
Release
();
}
pcerrinfo
->
Release
();
}
SysFreeString
(
bstrDescription
);
}
};
activex/supporterrorinfo.h
0 → 100644
View file @
c6a4cb11
/*****************************************************************************
* supporterrorinfo.h: ActiveX control for VLC
*****************************************************************************
* Copyright (C) 2006 the VideoLAN team
*
* Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
*
* 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 __SUPPORTERRORINFO_H__
#define __SUPPORTERRORINFO_H__
#include <oaidl.h>
class
VLCSupportErrorInfo
:
public
ISupportErrorInfo
{
public:
VLCSupportErrorInfo
(
VLCPlugin
*
p_instance
)
:
_p_instance
(
p_instance
)
{};
virtual
~
VLCSupportErrorInfo
()
{};
// IUnknown methods
STDMETHODIMP
QueryInterface
(
REFIID
riid
,
void
**
ppv
)
{
if
(
NULL
==
ppv
)
return
E_POINTER
;
if
(
(
IID_IUnknown
==
riid
)
||
(
IID_ISupportErrorInfo
==
riid
)
)
{
AddRef
();
*
ppv
=
reinterpret_cast
<
LPVOID
>
(
this
);
return
NOERROR
;
}
return
_p_instance
->
pUnkOuter
->
QueryInterface
(
riid
,
ppv
);
};
STDMETHODIMP_
(
ULONG
)
AddRef
(
void
)
{
return
_p_instance
->
pUnkOuter
->
AddRef
();
};
STDMETHODIMP_
(
ULONG
)
Release
(
void
)
{
return
_p_instance
->
pUnkOuter
->
Release
();
};
// ISupportErrorInfo methods
STDMETHODIMP
InterfaceSupportsErrorInfo
(
REFIID
riid
);
// VLCSupportErrorInfo methods
void
setErrorInfo
(
LPCOLESTR
progid
,
REFIID
riid
,
const
char
*
description
);
private:
VLCPlugin
*
_p_instance
;
};
#endif
modules/access/dshow/filter.cpp
View file @
c6a4cb11
...
...
@@ -614,10 +614,11 @@ STDMETHODIMP CapturePin::QueryAccept( const AM_MEDIA_TYPE *pmt )
}
msg_Dbg
(
p_input
,
"CapturePin::QueryAccept [OK] "
"(width=%ld, height=%ld, chroma=%4.4s)"
,
"(width=%ld, height=%ld, chroma=%4.4s
, fps=%f
)"
,
((
VIDEOINFOHEADER
*
)
pmt
->
pbFormat
)
->
bmiHeader
.
biWidth
,
((
VIDEOINFOHEADER
*
)
pmt
->
pbFormat
)
->
bmiHeader
.
biHeight
,
(
char
*
)
&
i_fourcc
);
(
char
*
)
&
i_fourcc
,
10000000.0
f
/
((
float
)((
VIDEOINFOHEADER
*
)
pmt
->
pbFormat
)
->
AvgTimePerFrame
)
);
}
else
if
(
pmt
->
majortype
==
MEDIATYPE_Audio
)
{
...
...
src/control/audio.c
View file @
c6a4cb11
...
...
@@ -79,7 +79,7 @@ int libvlc_audio_get_volume( libvlc_instance_t *p_instance,
aout_VolumeGet
(
p_instance
->
p_vlc
,
&
i_volume
);
return
i_volume
*
200
/
AOUT_VOLUME_MAX
;
return
(
i_volume
*
200
+
AOUT_VOLUME_MAX
/
2
)
/
AOUT_VOLUME_MAX
;
}
...
...
@@ -91,7 +91,7 @@ void libvlc_audio_set_volume( libvlc_instance_t *p_instance, int i_volume,
{
if
(
i_volume
>=
0
&&
i_volume
<=
200
)
{
i_volume
=
i_volume
*
AOUT_VOLUME_MAX
/
200
;
i_volume
=
(
i_volume
*
AOUT_VOLUME_MAX
+
100
)
/
200
;
aout_VolumeSet
(
p_instance
->
p_vlc
,
i_volume
);
}
else
...
...
src/control/input.c
View file @
c6a4cb11
...
...
@@ -68,7 +68,7 @@ vlc_int64_t libvlc_input_get_length( libvlc_input_t *p_input,
var_Get
(
p_input_thread
,
"length"
,
&
val
);
vlc_object_release
(
p_input_thread
);
return
val
.
i_time
/
1000LL
;
return
(
val
.
i_time
+
500LL
)
/
1000LL
;
}
vlc_int64_t
libvlc_input_get_time
(
libvlc_input_t
*
p_input
,
...
...
@@ -82,7 +82,7 @@ vlc_int64_t libvlc_input_get_time( libvlc_input_t *p_input,
var_Get
(
p_input_thread
,
"time"
,
&
val
);
vlc_object_release
(
p_input_thread
);
return
val
.
i_time
/
1000LL
;
return
(
val
.
i_time
+
500LL
)
/
1000LL
;
}
void
libvlc_input_set_time
(
libvlc_input_t
*
p_input
,
vlc_int64_t
time
,
...
...
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