Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
252d6200
Commit
252d6200
authored
9 years ago
by
Luca Barbato
Browse files
Options
Downloads
Patches
Plain Diff
avio: Add avio_put_str16be
parent
9b56ac74
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
doc/APIchanges
+3
-0
3 additions, 0 deletions
doc/APIchanges
libavformat/avio.h
+12
-0
12 additions, 0 deletions
libavformat/avio.h
libavformat/aviobuf.c
+20
-14
20 additions, 14 deletions
libavformat/aviobuf.c
libavformat/version.h
+1
-1
1 addition, 1 deletion
libavformat/version.h
with
36 additions
and
15 deletions
doc/APIchanges
+
3
−
0
View file @
252d6200
...
@@ -13,6 +13,9 @@ libavutil: 2014-08-09
...
@@ -13,6 +13,9 @@ libavutil: 2014-08-09
API changes, most recent first:
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
2015-xx-xx - xxxxxxx - lavu 54.14.0 - cpu.h
Add AV_CPU_FLAG_AVXSLOW.
Add AV_CPU_FLAG_AVXSLOW.
...
...
This diff is collapsed.
Click to expand it.
libavformat/avio.h
+
12
−
0
View file @
252d6200
...
@@ -178,10 +178,22 @@ int avio_put_str(AVIOContext *s, const char *str);
...
@@ -178,10 +178,22 @@ int avio_put_str(AVIOContext *s, const char *str);
/**
/**
* Convert an UTF-8 string to UTF-16LE and write it.
* 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.
* @return number of bytes written.
*/
*/
int
avio_put_str16le
(
AVIOContext
*
s
,
const
char
*
str
);
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
* Passing this as the "whence" parameter to a seek function causes it to
* return the filesize without seeking anywhere. Supporting this is optional.
* return the filesize without seeking anywhere. Supporting this is optional.
...
...
This diff is collapsed.
Click to expand it.
libavformat/aviobuf.c
+
20
−
14
View file @
252d6200
...
@@ -284,22 +284,28 @@ int avio_put_str(AVIOContext *s, const char *str)
...
@@ -284,22 +284,28 @@ int avio_put_str(AVIOContext *s, const char *str)
return
len
;
return
len
;
}
}
int
avio_put_str16le
(
AVIOContext
*
s
,
const
char
*
str
)
#define PUT_STR16(type, write) \
{
int avio_put_str16 ## type(AVIOContext * s, const char *str) \
const
uint8_t
*
q
=
str
;
{ \
int
ret
=
0
;
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
)
{
PUT_STR16
(
le
,
avio_wl16
)
uint32_t
ch
;
PUT_STR16
(
be
,
avio_wb16
)
uint16_t
tmp
;
GET_UTF8
(
ch
,
*
q
++
,
break
;)
#undef PUT_STR16
PUT_UTF16
(
ch
,
tmp
,
avio_wl16
(
s
,
tmp
);
ret
+=
2
;)
}
avio_wl16
(
s
,
0
);
ret
+=
2
;
return
ret
;
}
int
ff_get_v_length
(
uint64_t
val
)
int
ff_get_v_length
(
uint64_t
val
)
{
{
...
...
This diff is collapsed.
Click to expand it.
libavformat/version.h
+
1
−
1
View file @
252d6200
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
#include
"libavutil/version.h"
#include
"libavutil/version.h"
#define LIBAVFORMAT_VERSION_MAJOR 56
#define LIBAVFORMAT_VERSION_MAJOR 56
#define LIBAVFORMAT_VERSION_MINOR
19
#define LIBAVFORMAT_VERSION_MINOR
20
#define LIBAVFORMAT_VERSION_MICRO 0
#define LIBAVFORMAT_VERSION_MICRO 0
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment