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
b442ca69
Commit
b442ca69
authored
Jun 30, 2011
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf: add an API to get output timestamps.
parent
d1b029de
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
0 deletions
+30
-0
avformat.h
libavformat/avformat.h
+21
-0
utils.c
libavformat/utils.c
+9
-0
No files found.
libavformat/avformat.h
View file @
b442ca69
...
...
@@ -316,6 +316,9 @@ typedef struct AVOutputFormat {
const
AVClass
*
priv_class
;
///< AVClass for the private context
void
(
*
get_output_timestamp
)(
struct
AVFormatContext
*
s
,
int
stream
,
int64_t
*
dts
,
int64_t
*
wall
);
/* private fields */
struct
AVOutputFormat
*
next
;
}
AVOutputFormat
;
...
...
@@ -1518,6 +1521,24 @@ int av_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out,
*/
int
av_write_trailer
(
AVFormatContext
*
s
);
/**
* Get timing information for the data currently output.
* The exact meaning of "currently output" depends on the format.
* It is mostly relevant for devices that have an internal buffer and/or
* work in real time.
* @param s media file handle
* @param stream stream in the media file
* @param dts[out] DTS of the last packet output for the stream, in stream
* time_base units
* @param wall[out] absolute time when that packet whas output,
* in microsecond
* @return 0 if OK, AVERROR(ENOSYS) if the format does not support it
* Note: some formats or devices may not allow to measure dts and wall
* atomically.
*/
int
av_get_output_timestamp
(
struct
AVFormatContext
*
s
,
int
stream
,
int64_t
*
dts
,
int64_t
*
wall
);
#if FF_API_DUMP_FORMAT
/**
* @deprecated Deprecated in favor of av_dump_format().
...
...
libavformat/utils.c
View file @
b442ca69
...
...
@@ -3285,6 +3285,15 @@ fail:
return
ret
;
}
int
av_get_output_timestamp
(
struct
AVFormatContext
*
s
,
int
stream
,
int64_t
*
dts
,
int64_t
*
wall
)
{
if
(
!
s
->
oformat
||
!
s
->
oformat
->
get_output_timestamp
)
return
AVERROR
(
ENOSYS
);
s
->
oformat
->
get_output_timestamp
(
s
,
stream
,
dts
,
wall
);
return
0
;
}
void
ff_program_add_stream_index
(
AVFormatContext
*
ac
,
int
progid
,
unsigned
int
idx
)
{
int
i
,
j
;
...
...
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