Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
252d6200
Commit
252d6200
authored
Jun 05, 2015
by
Luca Barbato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avio: Add avio_put_str16be
parent
9b56ac74
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
15 deletions
+36
-15
APIchanges
doc/APIchanges
+3
-0
avio.h
libavformat/avio.h
+12
-0
aviobuf.c
libavformat/aviobuf.c
+20
-14
version.h
libavformat/version.h
+1
-1
No files found.
doc/APIchanges
View file @
252d6200
...
...
@@ -13,6 +13,9 @@ libavutil: 2014-08-09
API changes, most recent first:
2015-xx-xx - xxxxxxx - lavf 56.20.0 - avio.h
Add avio_put_str16be.
2015-xx-xx - xxxxxxx - lavu 54.14.0 - cpu.h
Add AV_CPU_FLAG_AVXSLOW.
...
...
libavformat/avio.h
View file @
252d6200
...
...
@@ -178,10 +178,22 @@ int avio_put_str(AVIOContext *s, const char *str);
/**
* Convert an UTF-8 string to UTF-16LE and write it.
* @param s the AVIOContext
* @param str NULL-terminated UTF-8 string
*
* @return number of bytes written.
*/
int
avio_put_str16le
(
AVIOContext
*
s
,
const
char
*
str
);
/**
* Convert an UTF-8 string to UTF-16BE and write it.
* @param s the AVIOContext
* @param str NULL-terminated UTF-8 string
*
* @return number of bytes written.
*/
int
avio_put_str16be
(
AVIOContext
*
s
,
const
char
*
str
);
/**
* Passing this as the "whence" parameter to a seek function causes it to
* return the filesize without seeking anywhere. Supporting this is optional.
...
...
libavformat/aviobuf.c
View file @
252d6200
...
...
@@ -284,22 +284,28 @@ int avio_put_str(AVIOContext *s, const char *str)
return
len
;
}
int
avio_put_str16le
(
AVIOContext
*
s
,
const
char
*
str
)
{
const
uint8_t
*
q
=
str
;
int
ret
=
0
;
#define PUT_STR16(type, write) \
int avio_put_str16 ## type(AVIOContext * s, const char *str) \
{ \
const uint8_t *q = str; \
int ret = 0; \
\
while (*q) { \
uint32_t ch; \
uint16_t tmp; \
\
GET_UTF8(ch, *q++, break; ) \
PUT_UTF16(ch, tmp, write(s, tmp); ret += 2; ) \
} \
write(s, 0); \
ret += 2; \
return ret; \
}
while
(
*
q
)
{
uint32_t
ch
;
uint16_t
tmp
;
PUT_STR16
(
le
,
avio_wl16
)
PUT_STR16
(
be
,
avio_wb16
)
GET_UTF8
(
ch
,
*
q
++
,
break
;)
PUT_UTF16
(
ch
,
tmp
,
avio_wl16
(
s
,
tmp
);
ret
+=
2
;)
}
avio_wl16
(
s
,
0
);
ret
+=
2
;
return
ret
;
}
#undef PUT_STR16
int
ff_get_v_length
(
uint64_t
val
)
{
...
...
libavformat/version.h
View file @
252d6200
...
...
@@ -30,7 +30,7 @@
#include "libavutil/version.h"
#define LIBAVFORMAT_VERSION_MAJOR 56
#define LIBAVFORMAT_VERSION_MINOR
19
#define LIBAVFORMAT_VERSION_MINOR
20
#define LIBAVFORMAT_VERSION_MICRO 0
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
...
...
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