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
2a8e229e
Commit
2a8e229e
authored
Mar 26, 2008
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvlc: Remove all references to tag and dynamic media list.
parent
27c7a735
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
154 deletions
+0
-154
src/control/libvlc_internal.h
src/control/libvlc_internal.h
+0
-27
src/control/media_descriptor.c
src/control/media_descriptor.c
+0
-127
No files found.
src/control/libvlc_internal.h
View file @
2a8e229e
...
...
@@ -77,12 +77,6 @@ struct libvlc_instance_t
struct
libvlc_callback_entry_list_t
*
p_callback_list
;
};
struct
libvlc_tags_storage_t
{
char
**
ppsz_tags
;
int
i_count
;
};
struct
libvlc_media_descriptor_t
{
libvlc_event_manager_t
*
p_event_manager
;
...
...
@@ -90,21 +84,12 @@ struct libvlc_media_descriptor_t
input_item_t
*
p_input_item
;
int
i_refcount
;
libvlc_instance_t
*
p_libvlc_instance
;
vlc_dictionary_t
tags
;
/* To be merged with core's meta soon */
libvlc_state_t
state
;
struct
libvlc_media_list_t
*
p_subitems
;
/* A media descriptor can have
* Sub item */
void
*
p_user_data
;
/* Allows for VLC.framework to hook into media descriptor without creating a new VLCMedia object. */
};
struct
libvlc_tag_query_t
{
struct
libvlc_instance_t
*
p_libvlc_instance
;
/* Parent instance */
int
i_refcount
;
libvlc_tag_t
tag
;
char
*
psz_tag_key
;
};
struct
libvlc_media_list_t
{
libvlc_event_manager_t
*
p_event_manager
;
...
...
@@ -167,18 +152,6 @@ struct libvlc_media_list_view_t
void
(
*
pf_ml_item_removed
)(
const
libvlc_event_t
*
,
libvlc_media_list_view_t
*
);
};
struct
libvlc_dynamic_media_list_t
{
libvlc_instance_t
*
p_libvlc_instance
;
int
i_refcount
;
libvlc_media_list_t
*
p_media_provider
;
libvlc_tag_query_t
*
p_query
;
char
*
psz_tag_key
;
libvlc_tag_t
tag
;
struct
libvlc_media_list_t
*
p_mlist
;
struct
libvlc_media_list_t
*
p_provider
;
};
struct
libvlc_media_instance_t
{
int
i_refcount
;
...
...
src/control/media_descriptor.c
View file @
2a8e229e
...
...
@@ -252,8 +252,6 @@ libvlc_media_descriptor_t * libvlc_media_descriptor_new_from_input_item(
* It can give a bunch of item to read. */
p_md
->
p_subitems
=
NULL
;
vlc_dictionary_init
(
&
p_md
->
tags
,
1
);
p_md
->
p_event_manager
=
libvlc_event_manager_new
(
p_md
,
p_instance
,
p_e
);
libvlc_event_manager_register_event_type
(
p_md
->
p_event_manager
,
libvlc_MediaDescriptorMetaChanged
,
p_e
);
...
...
@@ -376,19 +374,6 @@ void libvlc_media_descriptor_release( libvlc_media_descriptor_t *p_md )
libvlc_event_manager_release
(
p_md
->
p_event_manager
);
char
**
all_keys
=
vlc_dictionary_all_keys
(
&
p_md
->
tags
);
for
(
i
=
0
;
all_keys
[
i
];
i
++
)
{
int
j
;
struct
libvlc_tags_storage_t
*
p_ts
=
vlc_dictionary_value_for_key
(
&
p_md
->
tags
,
all_keys
[
i
]
);
for
(
j
=
0
;
j
<
p_ts
->
i_count
;
j
++
)
{
free
(
p_ts
->
ppsz_tags
[
j
]
);
free
(
p_ts
->
ppsz_tags
);
}
free
(
p_ts
);
}
vlc_dictionary_clear
(
&
p_md
->
tags
);
free
(
p_md
);
}
...
...
@@ -495,118 +480,6 @@ libvlc_media_descriptor_set_state( libvlc_media_descriptor_t *p_md,
libvlc_event_send
(
p_md
->
p_event_manager
,
&
event
);
}
/**************************************************************************
* Add a tag
**************************************************************************/
void
libvlc_media_descriptor_add_tag
(
libvlc_media_descriptor_t
*
p_md
,
const
char
*
key
,
const
libvlc_tag_t
tag
,
libvlc_exception_t
*
p_e
)
{
VLC_UNUSED
(
p_e
);
struct
libvlc_tags_storage_t
*
p_ts
;
if
(
!
tag
||
!
key
)
return
;
p_ts
=
vlc_dictionary_value_for_key
(
&
p_md
->
tags
,
key
);
if
(
!
p_ts
)
{
p_ts
=
malloc
(
sizeof
(
struct
libvlc_tags_storage_t
));
memset
(
p_ts
,
0
,
sizeof
(
struct
libvlc_tags_storage_t
)
);
}
p_ts
->
i_count
++
;
if
(
!
p_ts
->
ppsz_tags
)
p_ts
->
ppsz_tags
=
malloc
(
sizeof
(
char
*
)
*
(
p_ts
->
i_count
));
else
p_ts
->
ppsz_tags
=
realloc
(
p_ts
->
ppsz_tags
,
sizeof
(
char
*
)
*
(
p_ts
->
i_count
));
p_ts
->
ppsz_tags
[
p_ts
->
i_count
-
1
]
=
strdup
(
tag
);
}
/**************************************************************************
* Remove a tag
**************************************************************************/
void
libvlc_media_descriptor_remove_tag
(
libvlc_media_descriptor_t
*
p_md
,
const
char
*
key
,
const
libvlc_tag_t
tag
,
libvlc_exception_t
*
p_e
)
{
VLC_UNUSED
(
p_e
);
struct
libvlc_tags_storage_t
*
p_ts
;
int
i
;
if
(
!
tag
||
!
key
)
return
;
p_ts
=
vlc_dictionary_value_for_key
(
&
p_md
->
tags
,
key
);
if
(
!
p_ts
)
return
;
for
(
i
=
0
;
i
<
p_ts
->
i_count
;
i
++
)
{
if
(
!
strcmp
(
p_ts
->
ppsz_tags
[
i
],
tag
)
)
{
free
(
p_ts
->
ppsz_tags
[
i
]
);
memcpy
(
p_ts
->
ppsz_tags
+
i
+
1
,
p_ts
->
ppsz_tags
+
i
,
(
p_ts
->
i_count
-
i
-
2
)
*
sizeof
(
char
*
)
);
/* Don't dealloc, the memory will be regain if we add a new tag */
p_ts
->
i_count
--
;
return
;
}
}
}
/**************************************************************************
* Get tags count
**************************************************************************/
int
libvlc_media_descriptor_tags_count_for_key
(
libvlc_media_descriptor_t
*
p_md
,
const
char
*
key
,
libvlc_exception_t
*
p_e
)
{
VLC_UNUSED
(
p_e
);
struct
libvlc_tags_storage_t
*
p_ts
;
if
(
!
key
)
return
0
;
p_ts
=
vlc_dictionary_value_for_key
(
&
p_md
->
tags
,
key
);
if
(
!
p_ts
)
return
0
;
return
p_ts
->
i_count
;
}
/**************************************************************************
* Get a tag
**************************************************************************/
libvlc_tag_t
libvlc_media_descriptor_tag_at_index_for_key
(
libvlc_media_descriptor_t
*
p_md
,
int
i
,
const
char
*
key
,
libvlc_exception_t
*
p_e
)
{
VLC_UNUSED
(
p_e
);
struct
libvlc_tags_storage_t
*
p_ts
;
if
(
!
key
)
return
NULL
;
p_ts
=
vlc_dictionary_value_for_key
(
&
p_md
->
tags
,
key
);
if
(
!
p_ts
)
return
NULL
;
return
strdup
(
p_ts
->
ppsz_tags
[
i
]
);
}
/**************************************************************************
* subitems
**************************************************************************/
...
...
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