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
03198bb4
Commit
03198bb4
authored
May 25, 2009
by
Erwan Tulou
Committed by
Jean-Baptiste Kempf
May 26, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
snapshot vout plugin: avoid variables conflicting with the core
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
49f85e90
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
31 deletions
+31
-31
modules/video_output/snapshot.c
modules/video_output/snapshot.c
+31
-31
No files found.
modules/video_output/snapshot.c
View file @
03198bb4
...
...
@@ -26,10 +26,10 @@
* keep a cache of low-res snapshots.
* The snapshot structure is defined in include/snapshot.h
* In order to access the current snapshot cache, object variables are used:
* snapshot-list-pointer : the pointer on the first element in the list
* snapshot-datasize : size of a snapshot
*
vout-
snapshot-list-pointer : the pointer on the first element in the list
*
vout-
snapshot-datasize : size of a snapshot
* (also available in snapshot_t->i_datasize)
* snapshot-cache-size : size of the cache list
*
vout-
snapshot-cache-size : size of the cache list
*
* It is used for the moment by the CORBA module and a specialized
* python-vlc binding.
...
...
@@ -84,10 +84,10 @@ vlc_module_begin ()
set_subcategory
(
SUBCAT_VIDEO_VOUT
)
set_capability
(
"video output"
,
1
)
add_integer
(
"snapshot-width"
,
320
,
NULL
,
WIDTH_TEXT
,
WIDTH_LONGTEXT
,
false
)
add_integer
(
"snapshot-height"
,
200
,
NULL
,
HEIGHT_TEXT
,
HEIGHT_LONGTEXT
,
false
)
add_string
(
"snapshot-chroma"
,
"RV32"
,
NULL
,
CHROMA_TEXT
,
CHROMA_LONGTEXT
,
true
)
add_integer
(
"snapshot-cache-size"
,
50
,
NULL
,
CACHE_TEXT
,
CACHE_LONGTEXT
,
true
)
add_integer
(
"
vout-
snapshot-width"
,
320
,
NULL
,
WIDTH_TEXT
,
WIDTH_LONGTEXT
,
false
)
add_integer
(
"
vout-
snapshot-height"
,
200
,
NULL
,
HEIGHT_TEXT
,
HEIGHT_LONGTEXT
,
false
)
add_string
(
"
vout-
snapshot-chroma"
,
"RV32"
,
NULL
,
CHROMA_TEXT
,
CHROMA_LONGTEXT
,
true
)
add_integer
(
"
vout-
snapshot-cache-size"
,
50
,
NULL
,
CACHE_TEXT
,
CACHE_LONGTEXT
,
true
)
set_callbacks
(
Create
,
Destroy
)
vlc_module_end
()
...
...
@@ -128,11 +128,11 @@ static int Create( vlc_object_t *p_this )
if
(
!
p_vout
->
p_sys
)
return
VLC_ENOMEM
;
var_Create
(
p_vout
,
"snapshot-width"
,
VLC_VAR_INTEGER
);
var_Create
(
p_vout
,
"snapshot-height"
,
VLC_VAR_INTEGER
);
var_Create
(
p_vout
,
"snapshot-datasize"
,
VLC_VAR_INTEGER
);
var_Create
(
p_vout
,
"snapshot-cache-size"
,
VLC_VAR_INTEGER
);
var_Create
(
p_vout
,
"snapshot-list-pointer"
,
VLC_VAR_ADDRESS
);
var_Create
(
p_vout
,
"
vout-
snapshot-width"
,
VLC_VAR_INTEGER
);
var_Create
(
p_vout
,
"
vout-
snapshot-height"
,
VLC_VAR_INTEGER
);
var_Create
(
p_vout
,
"
vout-
snapshot-datasize"
,
VLC_VAR_INTEGER
);
var_Create
(
p_vout
,
"
vout-
snapshot-cache-size"
,
VLC_VAR_INTEGER
);
var_Create
(
p_vout
,
"
vout-
snapshot-list-pointer"
,
VLC_VAR_ADDRESS
);
p_vout
->
pf_init
=
Init
;
p_vout
->
pf_end
=
End
;
...
...
@@ -157,15 +157,15 @@ static int Init( vout_thread_t *p_vout )
int
i_height
;
int
i_datasize
;
i_width
=
config_GetInt
(
p_vout
,
"snapshot-width"
);
i_height
=
config_GetInt
(
p_vout
,
"snapshot-height"
);
i_width
=
config_GetInt
(
p_vout
,
"
vout-
snapshot-width"
);
i_height
=
config_GetInt
(
p_vout
,
"
vout-
snapshot-height"
);
psz_chroma
=
config_GetPsz
(
p_vout
,
"snapshot-chroma"
);
psz_chroma
=
config_GetPsz
(
p_vout
,
"
vout-
snapshot-chroma"
);
if
(
psz_chroma
)
{
if
(
strlen
(
psz_chroma
)
<
4
)
{
msg_Err
(
p_vout
,
"snapshot-chroma should be 4 characters long"
);
msg_Err
(
p_vout
,
"
vout-
snapshot-chroma should be 4 characters long"
);
return
VLC_EGENERIC
;
}
i_chroma
=
VLC_FOURCC
(
psz_chroma
[
0
],
psz_chroma
[
1
],
...
...
@@ -258,11 +258,11 @@ static int Init( vout_thread_t *p_vout )
p_vout
->
p_sys
->
i_datasize
=
i_datasize
;
p_vout
->
p_sys
->
i_index
=
0
;
p_vout
->
p_sys
->
i_size
=
config_GetInt
(
p_vout
,
"snapshot-cache-size"
);
p_vout
->
p_sys
->
i_size
=
config_GetInt
(
p_vout
,
"
vout-
snapshot-cache-size"
);
if
(
p_vout
->
p_sys
->
i_size
<
2
)
{
msg_Err
(
p_vout
,
"snapshot-cache-size must be at least 1."
);
msg_Err
(
p_vout
,
"
vout-
snapshot-cache-size must be at least 1."
);
return
VLC_EGENERIC
;
}
...
...
@@ -293,17 +293,17 @@ static int Init( vout_thread_t *p_vout )
}
val
.
i_int
=
i_width
;
var_Set
(
p_vout
,
"snapshot-width"
,
val
);
var_Set
(
p_vout
,
"
vout-
snapshot-width"
,
val
);
val
.
i_int
=
i_height
;
var_Set
(
p_vout
,
"snapshot-height"
,
val
);
var_Set
(
p_vout
,
"
vout-
snapshot-height"
,
val
);
val
.
i_int
=
i_datasize
;
var_Set
(
p_vout
,
"snapshot-datasize"
,
val
);
var_Set
(
p_vout
,
"
vout-
snapshot-datasize"
,
val
);
val
.
i_int
=
p_vout
->
p_sys
->
i_size
;
var_Set
(
p_vout
,
"snapshot-cache-size"
,
val
);
var_Set
(
p_vout
,
"
vout-
snapshot-cache-size"
,
val
);
val
.
p_address
=
p_vout
->
p_sys
->
p_list
;
var_Set
(
p_vout
,
"snapshot-list-pointer"
,
val
);
var_Set
(
p_vout
,
"
vout-
snapshot-list-pointer"
,
val
);
/* Get the p_input pointer (to access video times) */
p_vout
->
p_sys
->
p_input
=
vlc_object_find
(
p_vout
,
VLC_OBJECT_INPUT
,
...
...
@@ -312,9 +312,9 @@ static int Init( vout_thread_t *p_vout )
if
(
!
p_vout
->
p_sys
->
p_input
)
return
VLC_ENOOBJ
;
if
(
var_Create
(
p_vout
->
p_sys
->
p_input
,
"snapshot-id"
,
VLC_VAR_INTEGER
)
)
if
(
var_Create
(
p_vout
->
p_sys
->
p_input
,
"
vout-
snapshot-id"
,
VLC_VAR_INTEGER
)
)
{
msg_Err
(
p_vout
,
"Cannot create snapshot-id variable in p_input(%p)."
,
msg_Err
(
p_vout
,
"Cannot create
vout-
snapshot-id variable in p_input(%p)."
,
p_vout
->
p_sys
->
p_input
);
return
VLC_EGENERIC
;
}
...
...
@@ -322,9 +322,9 @@ static int Init( vout_thread_t *p_vout )
/* Register the snapshot vout module at the input level */
val
.
p_address
=
p_vout
;
if
(
var_Set
(
p_vout
->
p_sys
->
p_input
,
"snapshot-id"
,
val
)
)
if
(
var_Set
(
p_vout
->
p_sys
->
p_input
,
"
vout-
snapshot-id"
,
val
)
)
{
msg_Err
(
p_vout
,
"Cannot register snapshot-id in p_input(%p)."
,
msg_Err
(
p_vout
,
"Cannot register
vout-
snapshot-id in p_input(%p)."
,
p_vout
->
p_sys
->
p_input
);
return
VLC_EGENERIC
;
}
...
...
@@ -350,12 +350,12 @@ static void Destroy( vlc_object_t *p_this )
vout_thread_t
*
p_vout
=
(
vout_thread_t
*
)
p_this
;
int
i_index
;
var_Destroy
(
p_vout
->
p_sys
->
p_input
,
"snapshot-id"
);
var_Destroy
(
p_vout
->
p_sys
->
p_input
,
"
vout-
snapshot-id"
);
vlc_object_release
(
p_vout
->
p_sys
->
p_input
);
var_Destroy
(
p_this
,
"snapshot-width"
);
var_Destroy
(
p_this
,
"snapshot-height"
);
var_Destroy
(
p_this
,
"snapshot-datasize"
);
var_Destroy
(
p_this
,
"
vout-
snapshot-width"
);
var_Destroy
(
p_this
,
"
vout-
snapshot-height"
);
var_Destroy
(
p_this
,
"
vout-
snapshot-datasize"
);
for
(
i_index
=
0
;
i_index
<
p_vout
->
p_sys
->
i_size
;
i_index
++
)
{
...
...
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