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
7d5a2026
Commit
7d5a2026
authored
Nov 26, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the unused manager from block_t
parent
cb459a04
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
10 deletions
+4
-10
include/vlc_block.h
include/vlc_block.h
+3
-7
modules/access/screen/win32.c
modules/access/screen/win32.c
+0
-1
src/misc/block.c
src/misc/block.c
+1
-2
No files found.
include/vlc_block.h
View file @
7d5a2026
...
@@ -100,10 +100,6 @@ struct block_t
...
@@ -100,10 +100,6 @@ struct block_t
*/
*/
void
(
*
pf_release
)
(
block_t
*
);
void
(
*
pf_release
)
(
block_t
*
);
/* It's an object that should be valid as long as the block_t is valid */
/* It should become a true block manager to reduce malloc/free */
vlc_object_t
*
p_manager
;
/* Following fields are private, user should never touch it */
/* Following fields are private, user should never touch it */
/* XXX never touch that OK !!! the first that access that will
/* XXX never touch that OK !!! the first that access that will
* have Subversion account removed ;) XXX */
* have Subversion account removed ;) XXX */
...
@@ -126,13 +122,13 @@ struct block_t
...
@@ -126,13 +122,13 @@ struct block_t
* and decrease are supported). Use it as it is optimised.
* and decrease are supported). Use it as it is optimised.
* - block_Duplicate : create a copy of a block.
* - block_Duplicate : create a copy of a block.
****************************************************************************/
****************************************************************************/
#define block_New( a, b ) __block_New(
VLC_OBJECT(a)
, b )
#define block_New( a, b ) __block_New(
NULL
, b )
VLC_EXPORT
(
block_t
*
,
__block_New
,
(
vlc_object_t
*
,
size_t
)
);
VLC_EXPORT
(
block_t
*
,
__block_New
,
(
vlc_object_t
*
,
size_t
)
);
VLC_EXPORT
(
block_t
*
,
block_Realloc
,
(
block_t
*
,
ssize_t
i_pre
,
size_t
i_body
)
);
VLC_EXPORT
(
block_t
*
,
block_Realloc
,
(
block_t
*
,
ssize_t
i_pre
,
size_t
i_body
)
);
static
inline
block_t
*
block_Duplicate
(
block_t
*
p_block
)
static
inline
block_t
*
block_Duplicate
(
block_t
*
p_block
)
{
{
block_t
*
p_dup
=
block_New
(
p_block
->
p_manager
,
p_block
->
i_buffer
);
block_t
*
p_dup
=
block_New
(
NULL
,
p_block
->
i_buffer
);
if
(
p_dup
==
NULL
)
if
(
p_dup
==
NULL
)
return
NULL
;
return
NULL
;
...
@@ -231,7 +227,7 @@ static inline block_t *block_ChainGather( block_t *p_list )
...
@@ -231,7 +227,7 @@ static inline block_t *block_ChainGather( block_t *p_list )
i_length
+=
b
->
i_length
;
i_length
+=
b
->
i_length
;
}
}
g
=
block_New
(
p_list
->
p_manager
,
i_total
);
g
=
block_New
(
NULL
,
i_total
);
block_ChainExtract
(
p_list
,
g
->
p_buffer
,
g
->
i_buffer
);
block_ChainExtract
(
p_list
,
g
->
p_buffer
,
g
->
i_buffer
);
g
->
i_flags
=
p_list
->
i_flags
;
g
->
i_flags
=
p_list
->
i_flags
;
...
...
modules/access/screen/win32.c
View file @
7d5a2026
...
@@ -214,7 +214,6 @@ static block_t *CaptureBlockNew( demux_t *p_demux )
...
@@ -214,7 +214,6 @@ static block_t *CaptureBlockNew( demux_t *p_demux )
p_block
->
i_buffer
=
i_buffer
;
p_block
->
i_buffer
=
i_buffer
;
p_block
->
p_buffer
=
p_buffer
;
p_block
->
p_buffer
=
p_buffer
;
p_block
->
pf_release
=
CaptureBlockRelease
;
p_block
->
pf_release
=
CaptureBlockRelease
;
p_block
->
p_manager
=
VLC_OBJECT
(
p_demux
->
p_libvlc
);
p_block
->
p_sys
->
hbmp
=
hbmp
;
p_block
->
p_sys
->
hbmp
=
hbmp
;
return
p_block
;
return
p_block
;
...
...
src/misc/block.c
View file @
7d5a2026
...
@@ -76,7 +76,6 @@ block_t *__block_New( vlc_object_t *p_obj, size_t i_size )
...
@@ -76,7 +76,6 @@ block_t *__block_New( vlc_object_t *p_obj, size_t i_size )
p_block
->
pf_release
=
BlockRelease
;
p_block
->
pf_release
=
BlockRelease
;
/* Is ok, as no comunication between p_vlc */
/* Is ok, as no comunication between p_vlc */
p_block
->
p_manager
=
VLC_OBJECT
(
p_obj
->
p_libvlc
);
p_block
->
p_sys
=
p_sys
;
p_block
->
p_sys
=
p_sys
;
return
p_block
;
return
p_block
;
...
@@ -123,7 +122,7 @@ block_t *block_Realloc( block_t *p_block, ssize_t i_prebody, size_t i_body )
...
@@ -123,7 +122,7 @@ block_t *block_Realloc( block_t *p_block, ssize_t i_prebody, size_t i_body )
if
(
i_body
>
0
||
i_prebody
>
0
)
if
(
i_body
>
0
||
i_prebody
>
0
)
{
{
block_t
*
p_rea
=
block_New
(
p_block
->
p_manager
,
i_buffer_size
);
block_t
*
p_rea
=
block_New
(
NULL
,
i_buffer_size
);
if
(
p_rea
)
if
(
p_rea
)
{
{
...
...
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