[vlc-commits] modules: remove implied filter_sys_t* casts
Steve Lhomme
git at videolan.org
Tue Feb 20 14:01:39 CET 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Jan 8 14:41:22 2018 +0100| [fbe8e49ef78f8ebfd9ec86e20b42f5290656a717] | committer: Steve Lhomme
modules: remove implied filter_sys_t* casts
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fbe8e49ef78f8ebfd9ec86e20b42f5290656a717
---
modules/hw/d3d11/d3d11_surface.c | 14 ++++----
modules/hw/d3d9/dxa9.c | 6 ++--
.../spu/dynamicoverlay/dynamicoverlay_commands.c | 38 +++++++++++-----------
modules/video_filter/scene.c | 2 +-
4 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/modules/hw/d3d11/d3d11_surface.c b/modules/hw/d3d11/d3d11_surface.c
index 9463a18b64..45196e35e1 100644
--- a/modules/hw/d3d11/d3d11_surface.c
+++ b/modules/hw/d3d11/d3d11_surface.c
@@ -84,7 +84,7 @@ static int SetupProcessor(filter_t *p_filter, ID3D11Device *d3ddevice,
ID3D11DeviceContext *d3dctx,
DXGI_FORMAT srcFormat, DXGI_FORMAT dstFormat)
{
- filter_sys_t *sys = (filter_sys_t*) p_filter->p_sys;
+ filter_sys_t *sys = p_filter->p_sys;
HRESULT hr;
ID3D11VideoProcessorEnumerator *processorEnumerator = NULL;
@@ -188,7 +188,7 @@ static HRESULT can_map(filter_sys_t *sys, ID3D11DeviceContext *context)
static int assert_staging(filter_t *p_filter, picture_sys_t *p_sys)
{
- filter_sys_t *sys = (filter_sys_t*) p_filter->p_sys;
+ filter_sys_t *sys = p_filter->p_sys;
HRESULT hr;
if (sys->staging)
@@ -269,7 +269,7 @@ static void D3D11_YUY2(filter_t *p_filter, picture_t *src, picture_t *dst)
return;
}
- filter_sys_t *sys = (filter_sys_t*) p_filter->p_sys;
+ filter_sys_t *sys = p_filter->p_sys;
picture_sys_t *p_sys = &((struct va_pic_context*)src->context)->picsys;
D3D11_TEXTURE2D_DESC desc;
@@ -410,7 +410,7 @@ static void D3D11_NV12(filter_t *p_filter, picture_t *src, picture_t *dst)
return;
}
- filter_sys_t *sys = (filter_sys_t*) p_filter->p_sys;
+ filter_sys_t *sys = p_filter->p_sys;
picture_sys_t *p_sys = &((struct va_pic_context*)src->context)->picsys;
D3D11_TEXTURE2D_DESC desc;
@@ -586,7 +586,7 @@ static struct picture_context_t *d3d11_pic_context_copy(struct picture_context_t
static void NV12_D3D11(filter_t *p_filter, picture_t *src, picture_t *dst)
{
- filter_sys_t *sys = (filter_sys_t*) p_filter->p_sys;
+ filter_sys_t *sys = p_filter->p_sys;
picture_sys_t *p_sys = dst->p_sys;
if (unlikely(p_sys==NULL))
{
@@ -805,7 +805,7 @@ done:
void D3D11CloseConverter( vlc_object_t *obj )
{
filter_t *p_filter = (filter_t *)obj;
- filter_sys_t *p_sys = (filter_sys_t*) p_filter->p_sys;
+ filter_sys_t *p_sys = p_filter->p_sys;
#if CAN_PROCESSOR
if (p_sys->d3dviddev)
ID3D11VideoDevice_Release(p_sys->d3dviddev);
@@ -827,7 +827,7 @@ void D3D11CloseConverter( vlc_object_t *obj )
void D3D11CloseCPUConverter( vlc_object_t *obj )
{
filter_t *p_filter = (filter_t *)obj;
- filter_sys_t *p_sys = (filter_sys_t*) p_filter->p_sys;
+ filter_sys_t *p_sys = p_filter->p_sys;
DeleteFilter(p_sys->filter);
picture_Release(p_sys->staging_pic);
D3D11_Destroy(&p_sys->hd3d);
diff --git a/modules/hw/d3d9/dxa9.c b/modules/hw/d3d9/dxa9.c
index 92dd872b32..de56cf3312 100644
--- a/modules/hw/d3d9/dxa9.c
+++ b/modules/hw/d3d9/dxa9.c
@@ -242,7 +242,7 @@ static struct picture_context_t *d3d9_pic_context_copy(struct picture_context_t
static void YV12_D3D9(filter_t *p_filter, picture_t *src, picture_t *dst)
{
- filter_sys_t *sys = (filter_sys_t*) p_filter->p_sys;
+ filter_sys_t *sys = p_filter->p_sys;
picture_sys_t *p_sys = dst->p_sys;
D3DSURFACE_DESC texDesc;
@@ -433,7 +433,7 @@ done:
void D3D9CloseConverter( vlc_object_t *obj )
{
filter_t *p_filter = (filter_t *)obj;
- filter_sys_t *p_sys = (filter_sys_t*) p_filter->p_sys;
+ filter_sys_t *p_sys = p_filter->p_sys;
CopyCleanCache( &p_sys->cache );
D3D9_Destroy( &p_sys->hd3d );
free( p_sys );
@@ -443,7 +443,7 @@ void D3D9CloseConverter( vlc_object_t *obj )
void D3D9CloseCPUConverter( vlc_object_t *obj )
{
filter_t *p_filter = (filter_t *)obj;
- filter_sys_t *p_sys = (filter_sys_t*) p_filter->p_sys;
+ filter_sys_t *p_sys = p_filter->p_sys;
DeleteFilter(p_sys->filter);
picture_Release(p_sys->staging);
D3D9_FilterReleaseInstance(&p_sys->d3d_dev);
diff --git a/modules/spu/dynamicoverlay/dynamicoverlay_commands.c b/modules/spu/dynamicoverlay/dynamicoverlay_commands.c
index 81bb1103aa..63c1b2e5d6 100644
--- a/modules/spu/dynamicoverlay/dynamicoverlay_commands.c
+++ b/modules/spu/dynamicoverlay/dynamicoverlay_commands.c
@@ -413,7 +413,7 @@ static int exec_DataSharedMem( filter_t *p_filter,
commandparams_t *p_results )
{
#if defined(HAVE_SYS_SHM_H)
- filter_sys_t *p_sys = (filter_sys_t*) p_filter->p_sys;
+ filter_sys_t *p_sys = p_filter->p_sys;
struct shmid_ds shminfo;
overlay_t *p_ovl;
size_t i_size;
@@ -550,7 +550,7 @@ static int exec_DeleteImage( filter_t *p_filter,
commandparams_t *p_results )
{
VLC_UNUSED(p_results);
- filter_sys_t *p_sys = (filter_sys_t*) p_filter->p_sys;
+ filter_sys_t *p_sys = p_filter->p_sys;
p_sys->b_updated = true;
return ListRemove( &p_sys->overlays, p_params->i_id );
@@ -562,7 +562,7 @@ static int exec_EndAtomic( filter_t *p_filter,
{
VLC_UNUSED(p_params);
VLC_UNUSED(p_results);
- filter_sys_t *p_sys = (filter_sys_t*) p_filter->p_sys;
+ filter_sys_t *p_sys = p_filter->p_sys;
QueueTransfer( &p_sys->pending, &p_sys->atomic );
p_sys->b_atomic = false;
return VLC_SUCCESS;
@@ -573,7 +573,7 @@ static int exec_GenImage( filter_t *p_filter,
commandparams_t *p_results )
{
VLC_UNUSED(p_params);
- filter_sys_t *p_sys = (filter_sys_t*) p_filter->p_sys;
+ filter_sys_t *p_sys = p_filter->p_sys;
overlay_t *p_ovl = OverlayCreate();
if( p_ovl == NULL )
@@ -591,7 +591,7 @@ static int exec_GetAlpha( filter_t *p_filter,
const commandparams_t *p_params,
commandparams_t *p_results )
{
- filter_sys_t *p_sys = (filter_sys_t*) p_filter->p_sys;
+ filter_sys_t *p_sys = p_filter->p_sys;
overlay_t *p_ovl = ListGet( &p_sys->overlays, p_params->i_id );
if( p_ovl == NULL )
return VLC_EGENERIC;
@@ -604,7 +604,7 @@ static int exec_GetPosition( filter_t *p_filter,
const commandparams_t *p_params,
commandparams_t *p_results )
{
- filter_sys_t *p_sys = (filter_sys_t*) p_filter->p_sys;
+ filter_sys_t *p_sys = p_filter->p_sys;
overlay_t *p_ovl = ListGet( &p_sys->overlays, p_params->i_id );
if( p_ovl == NULL )
return VLC_EGENERIC;
@@ -618,7 +618,7 @@ static int exec_GetTextAlpha( filter_t *p_filter,
const commandparams_t *p_params,
commandparams_t *p_results )
{
- filter_sys_t *p_sys = (filter_sys_t*) p_filter->p_sys;
+ filter_sys_t *p_sys = p_filter->p_sys;
overlay_t *p_ovl = ListGet( &p_sys->overlays, p_params->i_id );
if( p_ovl == NULL )
return VLC_EGENERIC;
@@ -632,7 +632,7 @@ static int exec_GetTextColor( filter_t *p_filter,
const commandparams_t *p_params,
commandparams_t *p_results )
{
- filter_sys_t *p_sys = (filter_sys_t*) p_filter->p_sys;
+ filter_sys_t *p_sys = p_filter->p_sys;
overlay_t *p_ovl = ListGet( &p_sys->overlays, p_params->i_id );
if( p_ovl == NULL )
return VLC_EGENERIC;
@@ -646,7 +646,7 @@ static int exec_GetTextSize( filter_t *p_filter,
const commandparams_t *p_params,
commandparams_t *p_results )
{
- filter_sys_t *p_sys = (filter_sys_t*) p_filter->p_sys;
+ filter_sys_t *p_sys = p_filter->p_sys;
overlay_t *p_ovl = ListGet( &p_sys->overlays, p_params->i_id );
if( p_ovl == NULL )
return VLC_EGENERIC;
@@ -659,7 +659,7 @@ static int exec_GetVisibility( filter_t *p_filter,
const commandparams_t *p_params,
commandparams_t *p_results )
{
- filter_sys_t *p_sys = (filter_sys_t*) p_filter->p_sys;
+ filter_sys_t *p_sys = p_filter->p_sys;
overlay_t *p_ovl = ListGet( &p_sys->overlays, p_params->i_id );
if( p_ovl == NULL )
@@ -674,7 +674,7 @@ static int exec_SetAlpha( filter_t *p_filter,
commandparams_t *p_results )
{
VLC_UNUSED(p_results);
- filter_sys_t *p_sys = (filter_sys_t*) p_filter->p_sys;
+ filter_sys_t *p_sys = p_filter->p_sys;
overlay_t *p_ovl = ListGet( &p_sys->overlays, p_params->i_id );
if( p_ovl == NULL )
@@ -690,7 +690,7 @@ static int exec_SetPosition( filter_t *p_filter,
commandparams_t *p_results )
{
VLC_UNUSED(p_results);
- filter_sys_t *p_sys = (filter_sys_t*) p_filter->p_sys;
+ filter_sys_t *p_sys = p_filter->p_sys;
overlay_t *p_ovl = ListGet( &p_sys->overlays, p_params->i_id );
if( p_ovl == NULL )
@@ -708,7 +708,7 @@ static int exec_SetTextAlpha( filter_t *p_filter,
commandparams_t *p_results )
{
VLC_UNUSED(p_results);
- filter_sys_t *p_sys = (filter_sys_t*) p_filter->p_sys;
+ filter_sys_t *p_sys = p_filter->p_sys;
overlay_t *p_ovl = ListGet( &p_sys->overlays, p_params->i_id );
if( p_ovl == NULL )
@@ -725,7 +725,7 @@ static int exec_SetTextColor( filter_t *p_filter,
commandparams_t *p_results )
{
VLC_UNUSED(p_results);
- filter_sys_t *p_sys = (filter_sys_t*) p_filter->p_sys;
+ filter_sys_t *p_sys = p_filter->p_sys;
overlay_t *p_ovl = ListGet( &p_sys->overlays, p_params->i_id );
if( p_ovl == NULL )
@@ -742,7 +742,7 @@ static int exec_SetTextSize( filter_t *p_filter,
commandparams_t *p_results )
{
VLC_UNUSED(p_results);
- filter_sys_t *p_sys = (filter_sys_t*) p_filter->p_sys;
+ filter_sys_t *p_sys = p_filter->p_sys;
overlay_t *p_ovl = ListGet( &p_sys->overlays, p_params->i_id );
if( p_ovl == NULL )
@@ -758,7 +758,7 @@ static int exec_SetVisibility( filter_t *p_filter,
commandparams_t *p_results )
{
VLC_UNUSED(p_results);
- filter_sys_t *p_sys = (filter_sys_t*) p_filter->p_sys;
+ filter_sys_t *p_sys = p_filter->p_sys;
overlay_t *p_ovl = ListGet( &p_sys->overlays, p_params->i_id );
if( p_ovl == NULL )
@@ -773,7 +773,7 @@ static int exec_StartAtomic( filter_t *p_filter,
const commandparams_t *p_params,
commandparams_t *p_results )
{
- filter_sys_t *p_sys = (filter_sys_t*) p_filter->p_sys;
+ filter_sys_t *p_sys = p_filter->p_sys;
VLC_UNUSED(p_params);
VLC_UNUSED(p_results);
@@ -892,7 +892,7 @@ static const commanddesc_static_t p_commands[] =
void RegisterCommand( filter_t *p_filter )
{
- filter_sys_t *p_sys = (filter_sys_t*) p_filter->p_sys;
+ filter_sys_t *p_sys = p_filter->p_sys;
size_t i_index = 0;
p_sys->i_commands = ARRAY_SIZE(p_commands);
@@ -916,7 +916,7 @@ void RegisterCommand( filter_t *p_filter )
void UnregisterCommand( filter_t *p_filter )
{
- filter_sys_t *p_sys = (filter_sys_t*) p_filter->p_sys;
+ filter_sys_t *p_sys = p_filter->p_sys;
size_t i_index = 0;
for( i_index = 0; i_index < p_sys->i_commands; i_index++ )
diff --git a/modules/video_filter/scene.c b/modules/video_filter/scene.c
index 6ed0bfe622..093ecd38d3 100644
--- a/modules/video_filter/scene.c
+++ b/modules/video_filter/scene.c
@@ -209,7 +209,7 @@ static int Create( vlc_object_t *p_this )
static void Destroy( vlc_object_t *p_this )
{
filter_t *p_filter = (filter_t *)p_this;
- filter_sys_t *p_sys = (filter_sys_t *) p_filter->p_sys;
+ filter_sys_t *p_sys = p_filter->p_sys;
image_HandlerDelete( p_sys->p_image );
More information about the vlc-commits
mailing list