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
61ee5045
Commit
61ee5045
authored
Oct 20, 2009
by
Daniel Verkamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Seek function for TMV
Originally committed as revision 20336 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
0319ba5e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
tmv.c
libavformat/tmv.c
+21
-0
No files found.
libavformat/tmv.c
View file @
61ee5045
...
...
@@ -43,6 +43,8 @@ typedef struct TMVContext {
unsigned
stream_index
;
}
TMVContext
;
#define TMV_HEADER_SIZE 12
#define PROBE_MIN_SAMPLE_RATE 5000
#define PROBE_MAX_FPS 120
#define PROBE_MIN_AUDIO_SIZE (PROBE_MIN_SAMPLE_RATE / PROBE_MAX_FPS)
...
...
@@ -160,6 +162,23 @@ static int tmv_read_packet(AVFormatContext *s, AVPacket *pkt)
return
ret
;
}
static
int
tmv_read_seek
(
AVFormatContext
*
s
,
int
stream_index
,
int64_t
timestamp
,
int
flags
)
{
TMVContext
*
tmv
=
s
->
priv_data
;
int64_t
pos
;
if
(
stream_index
)
return
-
1
;
pos
=
timestamp
*
(
tmv
->
audio_chunk_size
+
tmv
->
video_chunk_size
+
tmv
->
padding
);
url_fseek
(
s
->
pb
,
pos
+
TMV_HEADER_SIZE
,
SEEK_SET
);
tmv
->
stream_index
=
0
;
return
0
;
}
AVInputFormat
tmv_demuxer
=
{
"tmv"
,
NULL_IF_CONFIG_SMALL
(
"8088flex TMV"
),
...
...
@@ -167,5 +186,7 @@ AVInputFormat tmv_demuxer = {
tmv_probe
,
tmv_read_header
,
tmv_read_packet
,
NULL
,
tmv_read_seek
,
.
flags
=
AVFMT_GENERIC_INDEX
,
};
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