Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
George Kiagiadakis
gst-plugins-good
Commits
d959bb60
Commit
d959bb60
authored
Sep 19, 2011
by
Mark Nauwelaerts
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qtdemux: parse embedded ID32 tags
parent
e2179cbb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
1 deletion
+51
-1
gst/isomp4/qtdemux.c
gst/isomp4/qtdemux.c
+48
-1
gst/isomp4/qtdemux_fourcc.h
gst/isomp4/qtdemux_fourcc.h
+3
-0
No files found.
gst/isomp4/qtdemux.c
View file @
d959bb60
...
...
@@ -8361,6 +8361,42 @@ unknown_tag:
}
}
static
void
qtdemux_tag_add_id32
(
GstQTDemux
*
demux
,
const
char
*
tag
,
const
char
*
tag_bis
,
GNode
*
node
)
{
guint8
*
data
;
GstBuffer
*
buf
;
guint
len
;
GstTagList
*
taglist
=
NULL
;
GST_LOG_OBJECT
(
demux
,
"parsing ID32"
);
data
=
node
->
data
;
len
=
GST_READ_UINT32_BE
(
data
);
/* need at least full box and language tag */
if
(
len
<
12
+
2
)
return
;
buf
=
gst_buffer_new
();
GST_BUFFER_DATA
(
buf
)
=
data
+
14
;
GST_BUFFER_SIZE
(
buf
)
=
len
-
14
;
taglist
=
gst_tag_list_from_id3v2_tag
(
buf
);
if
(
taglist
)
{
GST_LOG_OBJECT
(
demux
,
"parsing ok"
);
gst_tag_list_insert
(
demux
->
tag_list
,
taglist
,
GST_TAG_MERGE_KEEP
);
}
else
{
GST_LOG_OBJECT
(
demux
,
"parsing failed"
);
}
if
(
taglist
)
gst_tag_list_free
(
taglist
);
gst_buffer_unref
(
buf
);
}
typedef
void
(
*
GstQTDemuxAddTagFunc
)
(
GstQTDemux
*
demux
,
const
char
*
tag
,
const
char
*
tag_bis
,
GNode
*
node
);
...
...
@@ -8430,7 +8466,9 @@ static const struct
* http://atomicparsley.sourceforge.net/mpeg-4files.html and
* bug #614471
*/
FOURCC_____, "", NULL, qtdemux_tag_add_revdns}
FOURCC_____
,
""
,
NULL
,
qtdemux_tag_add_revdns
},
{
/* see http://www.mp4ra.org/specs.html for ID32 in meta box */
FOURCC_ID32
,
""
,
NULL
,
qtdemux_tag_add_id32
}
};
static
void
...
...
@@ -8846,6 +8884,15 @@ qtdemux_parse_tree (GstQTDemux * qtdemux)
GST_LOG_OBJECT
(
qtdemux
,
"No udta node found."
);
}
/* maybe also some tags in meta box */
udta
=
qtdemux_tree_get_child_by_type
(
qtdemux
->
moov_node
,
FOURCC_meta
);
if
(
udta
)
{
GST_DEBUG_OBJECT
(
qtdemux
,
"Parsing meta box for tags."
);
qtdemux_parse_udta
(
qtdemux
,
udta
);
}
else
{
GST_LOG_OBJECT
(
qtdemux
,
"No meta node found."
);
}
qtdemux
->
tag_list
=
qtdemux_add_container_format
(
qtdemux
,
qtdemux
->
tag_list
);
return
TRUE
;
...
...
gst/isomp4/qtdemux_fourcc.h
View file @
d959bb60
...
...
@@ -189,6 +189,9 @@ G_BEGIN_DECLS
#define FOURCC_albm GST_MAKE_FOURCC('a','l','b','m')
#define FOURCC_yrrc GST_MAKE_FOURCC('y','r','r','c')
/* misc tag stuff */
#define FOURCC_ID32 GST_MAKE_FOURCC('I', 'D','3','2')
/* ISO Motion JPEG 2000 fourcc */
#define FOURCC_mjp2 GST_MAKE_FOURCC('m','j','p','2')
#define FOURCC_jp2h GST_MAKE_FOURCC('j','p','2','h')
...
...
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