Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
338f5aa9
Commit
338f5aa9
authored
Jun 07, 2005
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/stream_out/transcode.c: backport of 11327.
parent
09f5cc1a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
modules/stream_out/transcode.c
modules/stream_out/transcode.c
+32
-0
No files found.
modules/stream_out/transcode.c
View file @
338f5aa9
...
@@ -322,10 +322,12 @@ struct sout_stream_sys_t
...
@@ -322,10 +322,12 @@ struct sout_stream_sys_t
struct
decoder_owner_sys_t
struct
decoder_owner_sys_t
{
{
picture_t
*
pp_pics
[
PICTURE_RING_SIZE
];
picture_t
*
pp_pics
[
PICTURE_RING_SIZE
];
sout_stream_sys_t
*
p_sys
;
};
};
struct
filter_owner_sys_t
struct
filter_owner_sys_t
{
{
picture_t
*
pp_pics
[
PICTURE_RING_SIZE
];
picture_t
*
pp_pics
[
PICTURE_RING_SIZE
];
sout_stream_sys_t
*
p_sys
;
};
};
/*****************************************************************************
/*****************************************************************************
...
@@ -1281,6 +1283,7 @@ static int transcode_video_new( sout_stream_t *p_stream, sout_stream_id_t *id )
...
@@ -1281,6 +1283,7 @@ static int transcode_video_new( sout_stream_t *p_stream, sout_stream_id_t *id )
id
->
p_decoder
->
p_owner
=
malloc
(
sizeof
(
decoder_owner_sys_t
)
);
id
->
p_decoder
->
p_owner
=
malloc
(
sizeof
(
decoder_owner_sys_t
)
);
for
(
i
=
0
;
i
<
PICTURE_RING_SIZE
;
i
++
)
for
(
i
=
0
;
i
<
PICTURE_RING_SIZE
;
i
++
)
id
->
p_decoder
->
p_owner
->
pp_pics
[
i
]
=
0
;
id
->
p_decoder
->
p_owner
->
pp_pics
[
i
]
=
0
;
id
->
p_decoder
->
p_owner
->
p_sys
=
p_sys
;
//id->p_decoder->p_cfg = p_sys->p_video_cfg;
//id->p_decoder->p_cfg = p_sys->p_video_cfg;
id
->
p_decoder
->
p_module
=
id
->
p_decoder
->
p_module
=
...
@@ -1624,6 +1627,7 @@ static int transcode_video_process( sout_stream_t *p_stream,
...
@@ -1624,6 +1627,7 @@ static int transcode_video_process( sout_stream_t *p_stream,
malloc
(
sizeof
(
filter_owner_sys_t
)
);
malloc
(
sizeof
(
filter_owner_sys_t
)
);
for
(
i
=
0
;
i
<
PICTURE_RING_SIZE
;
i
++
)
for
(
i
=
0
;
i
<
PICTURE_RING_SIZE
;
i
++
)
id
->
pp_filter
[
id
->
i_filter
]
->
p_owner
->
pp_pics
[
i
]
=
0
;
id
->
pp_filter
[
id
->
i_filter
]
->
p_owner
->
pp_pics
[
i
]
=
0
;
id
->
pp_filter
[
id
->
i_filter
]
->
p_owner
->
p_sys
=
p_sys
;
id
->
i_filter
++
;
id
->
i_filter
++
;
}
}
...
@@ -1666,6 +1670,7 @@ static int transcode_video_process( sout_stream_t *p_stream,
...
@@ -1666,6 +1670,7 @@ static int transcode_video_process( sout_stream_t *p_stream,
malloc
(
sizeof
(
filter_owner_sys_t
)
);
malloc
(
sizeof
(
filter_owner_sys_t
)
);
for
(
i
=
0
;
i
<
PICTURE_RING_SIZE
;
i
++
)
for
(
i
=
0
;
i
<
PICTURE_RING_SIZE
;
i
++
)
id
->
pp_filter
[
id
->
i_filter
]
->
p_owner
->
pp_pics
[
i
]
=
0
;
id
->
pp_filter
[
id
->
i_filter
]
->
p_owner
->
pp_pics
[
i
]
=
0
;
id
->
pp_filter
[
id
->
i_filter
]
->
p_owner
->
p_sys
=
p_sys
;
id
->
i_filter
++
;
id
->
i_filter
++
;
}
}
...
@@ -1866,6 +1871,33 @@ static picture_t *video_new_buffer( vlc_object_t *p_this, picture_t **pp_ring )
...
@@ -1866,6 +1871,33 @@ static picture_t *video_new_buffer( vlc_object_t *p_this, picture_t **pp_ring )
if
(
pp_ring
[
i
]
==
0
)
break
;
if
(
pp_ring
[
i
]
==
0
)
break
;
}
}
if
(
i
==
PICTURE_RING_SIZE
&&
p_dec
->
p_owner
->
p_sys
->
i_threads
>=
1
)
{
int
i_first_pic
=
p_dec
->
p_owner
->
p_sys
->
i_first_pic
;
if
(
p_dec
->
p_owner
->
p_sys
->
i_first_pic
!=
p_dec
->
p_owner
->
p_sys
->
i_last_pic
)
{
/* Encoder still has stuff to encode, wait to clear-up the list */
while
(
p_dec
->
p_owner
->
p_sys
->
i_first_pic
==
i_first_pic
)
msleep
(
100000
);
}
/* Find an empty space in the picture ring buffer */
for
(
i
=
0
;
i
<
PICTURE_RING_SIZE
;
i
++
)
{
if
(
pp_ring
[
i
]
!=
0
&&
pp_ring
[
i
]
->
i_status
==
DESTROYED_PICTURE
)
{
pp_ring
[
i
]
->
i_status
=
RESERVED_PICTURE
;
return
pp_ring
[
i
];
}
}
for
(
i
=
0
;
i
<
PICTURE_RING_SIZE
;
i
++
)
{
if
(
pp_ring
[
i
]
==
0
)
break
;
}
}
if
(
i
==
PICTURE_RING_SIZE
)
if
(
i
==
PICTURE_RING_SIZE
)
{
{
msg_Err
(
p_this
,
"decoder/filter is leaking pictures, "
msg_Err
(
p_this
,
"decoder/filter is leaking pictures, "
...
...
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