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
f4374c59
Commit
f4374c59
authored
Apr 09, 2008
by
Filippo Carone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
when releasing vlm, clear all media
parent
21ca9ddb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
30 deletions
+32
-30
src/control/vlm.c
src/control/vlm.c
+32
-30
No files found.
src/control/vlm.c
View file @
f4374c59
...
@@ -118,12 +118,44 @@ static int libvlc_vlm_init( libvlc_instance_t *p_instance,
...
@@ -118,12 +118,44 @@ static int libvlc_vlm_init( libvlc_instance_t *p_instance,
} while(0)
} while(0)
#define VLM(p) VLM_RET(p,)
#define VLM(p) VLM_RET(p,)
static
vlm_media_instance_t
*
libvlc_vlm_get_media_instance
(
libvlc_instance_t
*
p_instance
,
char
*
psz_name
,
int
i_minstance_idx
,
libvlc_exception_t
*
p_exception
)
{
vlm_t
*
p_vlm
;
vlm_media_instance_t
**
pp_minstance
;
vlm_media_instance_t
*
p_minstance
;
int
i_minstance
;
int64_t
id
;
VLM_RET
(
p_vlm
,
NULL
);
if
(
vlm_Control
(
p_vlm
,
VLM_GET_MEDIA_ID
,
psz_name
,
&
id
)
||
vlm_Control
(
p_vlm
,
VLM_GET_MEDIA_INSTANCES
,
id
,
&
pp_minstance
,
&
i_minstance
)
)
{
libvlc_exception_raise
(
p_exception
,
"Unable to get %s instances"
,
psz_name
);
return
NULL
;
}
p_minstance
=
NULL
;
if
(
i_minstance_idx
>=
0
&&
i_minstance_idx
<
i_minstance
)
{
p_minstance
=
pp_minstance
[
i_minstance_idx
];
TAB_REMOVE
(
i_minstance
,
pp_minstance
,
p_minstance
);
}
while
(
i_minstance
>
0
)
vlm_media_instance_Delete
(
pp_minstance
[
--
i_minstance
]
);
TAB_CLEAN
(
i_minstance
,
pp_minstance
);
return
p_minstance
;
}
void
libvlc_vlm_release
(
libvlc_instance_t
*
p_instance
,
libvlc_exception_t
*
p_exception
)
void
libvlc_vlm_release
(
libvlc_instance_t
*
p_instance
,
libvlc_exception_t
*
p_exception
)
{
{
vlm_t
*
p_vlm
;
vlm_t
*
p_vlm
;
VLM
(
p_vlm
);
VLM
(
p_vlm
);
vlm_Control
(
p_vlm
,
VLM_CLEAR_MEDIAS
,
NULL
);
vlm_Delete
(
p_vlm
);
vlm_Delete
(
p_vlm
);
}
}
...
@@ -325,36 +357,6 @@ void libvlc_vlm_seek_media( libvlc_instance_t *p_instance, char *psz_name,
...
@@ -325,36 +357,6 @@ void libvlc_vlm_seek_media( libvlc_instance_t *p_instance, char *psz_name,
}
}
}
}
static
vlm_media_instance_t
*
libvlc_vlm_get_media_instance
(
libvlc_instance_t
*
p_instance
,
char
*
psz_name
,
int
i_minstance_idx
,
libvlc_exception_t
*
p_exception
)
{
vlm_t
*
p_vlm
;
vlm_media_instance_t
**
pp_minstance
;
vlm_media_instance_t
*
p_minstance
;
int
i_minstance
;
int64_t
id
;
VLM_RET
(
p_vlm
,
NULL
);
if
(
vlm_Control
(
p_vlm
,
VLM_GET_MEDIA_ID
,
psz_name
,
&
id
)
||
vlm_Control
(
p_vlm
,
VLM_GET_MEDIA_INSTANCES
,
id
,
&
pp_minstance
,
&
i_minstance
)
)
{
libvlc_exception_raise
(
p_exception
,
"Unable to get %s instances"
,
psz_name
);
return
NULL
;
}
p_minstance
=
NULL
;
if
(
i_minstance_idx
>=
0
&&
i_minstance_idx
<
i_minstance
)
{
p_minstance
=
pp_minstance
[
i_minstance_idx
];
TAB_REMOVE
(
i_minstance
,
pp_minstance
,
p_minstance
);
}
while
(
i_minstance
>
0
)
vlm_media_instance_Delete
(
pp_minstance
[
--
i_minstance
]
);
TAB_CLEAN
(
i_minstance
,
pp_minstance
);
return
p_minstance
;
}
#define LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( attr, returnType, getType, ret, code )\
#define LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( attr, returnType, getType, ret, code )\
returnType libvlc_vlm_get_media_## attr( libvlc_instance_t *p_instance, \
returnType libvlc_vlm_get_media_## attr( libvlc_instance_t *p_instance, \
char *psz_name, int i_instance, libvlc_exception_t *p_exception ) \
char *psz_name, int i_instance, libvlc_exception_t *p_exception ) \
...
...
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