Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
80e18bb4
Commit
80e18bb4
authored
Jun 17, 2015
by
Mariusz Szczepańczyk
Committed by
Michael Niedermayer
Jun 22, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf/avio: Extend API with avio_move() and avio_delete()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
8fb672b5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
64 additions
and
1 deletion
+64
-1
APIchanges
doc/APIchanges
+4
-0
avio.c
libavformat/avio.c
+38
-0
avio.h
libavformat/avio.h
+19
-0
url.h
libavformat/url.h
+2
-0
version.h
libavformat/version.h
+1
-1
No files found.
doc/APIchanges
View file @
80e18bb4
...
...
@@ -15,6 +15,10 @@ libavutil: 2014-08-09
API changes, most recent first:
2015-xx-xx - xxxxxxx - lavf 56.38.100 - avio.h url.h
Add avio_move(), avio_delete().
Extend URLProtocol with url_move(), url_delete().
-------- 8< --------- FFmpeg 2.7 was cut here -------- 8< ---------
2015-06-04 - cc17b43 - lswr 1.2.100
...
...
libavformat/avio.c
View file @
80e18bb4
...
...
@@ -421,6 +421,44 @@ int avio_check(const char *url, int flags)
return
ret
;
}
int
avio_move
(
const
char
*
url_src
,
const
char
*
url_dst
)
{
URLContext
*
h_src
,
*
h_dst
;
int
ret
=
ffurl_alloc
(
&
h_src
,
url_src
,
AVIO_FLAG_READ_WRITE
,
NULL
);
if
(
ret
<
0
)
return
ret
;
ret
=
ffurl_alloc
(
&
h_dst
,
url_dst
,
AVIO_FLAG_WRITE
,
NULL
);
if
(
ret
<
0
)
{
ffurl_close
(
h_src
);
return
ret
;
}
if
(
h_src
->
prot
==
h_dst
->
prot
&&
h_src
->
prot
->
url_move
)
ret
=
h_src
->
prot
->
url_move
(
h_src
,
h_dst
);
else
ret
=
AVERROR
(
ENOSYS
);
ffurl_close
(
h_src
);
ffurl_close
(
h_dst
);
return
ret
;
}
int
avio_delete
(
const
char
*
url
)
{
URLContext
*
h
;
int
ret
=
ffurl_alloc
(
&
h
,
url
,
AVIO_FLAG_WRITE
,
NULL
);
if
(
ret
<
0
)
return
ret
;
if
(
h
->
prot
->
url_delete
)
ret
=
h
->
prot
->
url_delete
(
h
);
else
ret
=
AVERROR
(
ENOSYS
);
ffurl_close
(
h
);
return
ret
;
}
int
avio_open_dir
(
AVIODirContext
**
s
,
const
char
*
url
,
AVDictionary
**
options
)
{
URLContext
*
h
=
NULL
;
...
...
libavformat/avio.h
View file @
80e18bb4
...
...
@@ -229,6 +229,25 @@ const char *avio_find_protocol_name(const char *url);
*/
int
avio_check
(
const
char
*
url
,
int
flags
);
/**
* Move or rename a resource.
*
* @note url_src and url_dst should share the same protocol and authority.
*
* @param url_src url to resource to be moved
* @param url_dst new url to resource if the operation succeeded
* @return >=0 on success or negative on error.
*/
int
avio_move
(
const
char
*
url_src
,
const
char
*
url_dst
);
/**
* Delete a resource.
*
* @param url resource to be deleted.
* @return >=0 on success or negative on error.
*/
int
avio_delete
(
const
char
*
url
);
/**
* Open directory for reading.
*
...
...
libavformat/url.h
View file @
80e18bb4
...
...
@@ -90,6 +90,8 @@ typedef struct URLProtocol {
int
(
*
url_open_dir
)(
URLContext
*
h
);
int
(
*
url_read_dir
)(
URLContext
*
h
,
AVIODirEntry
**
next
);
int
(
*
url_close_dir
)(
URLContext
*
h
);
int
(
*
url_delete
)(
URLContext
*
h
);
int
(
*
url_move
)(
URLContext
*
h_src
,
URLContext
*
h_dst
);
}
URLProtocol
;
/**
...
...
libavformat/version.h
View file @
80e18bb4
...
...
@@ -30,7 +30,7 @@
#include "libavutil/version.h"
#define LIBAVFORMAT_VERSION_MAJOR 56
#define LIBAVFORMAT_VERSION_MINOR 3
7
#define LIBAVFORMAT_VERSION_MINOR 3
8
#define LIBAVFORMAT_VERSION_MICRO 100
#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