Libav
seek.h
Go to the documentation of this file.
1 /*
2  * seek utility functions for use within format handlers
3  *
4  * Copyright (c) 2009 Ivan Schreter
5  *
6  * This file is part of Libav.
7  *
8  * Libav is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * Libav is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with Libav; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  */
22 
23 #ifndef AVFORMAT_SEEK_H
24 #define AVFORMAT_SEEK_H
25 
26 #include "avformat.h"
27 
31 typedef struct AVParserStreamState {
32  // saved members of AVStream
34  int64_t last_IP_pts;
35  int64_t cur_dts;
38 
42 typedef struct AVParserState {
43  int64_t fpos;
44 
45  // saved members of AVFormatContext
50 
51  // saved info for streams
52  int nb_streams;
55 
79  int stream_index,
80  int64_t pos,
81  int64_t min_ts,
82  int64_t ts,
83  int64_t max_ts,
84  int flags);
85 
101 
113 
121 
122 #endif /* AVFORMAT_SEEK_H */
int64_t cur_dts
Definition: seek.h:35
void ff_free_parser_state(AVFormatContext *s, AVParserState *state)
Free previously saved parser state.
Definition: seek.c:488
int64_t last_IP_pts
Definition: seek.h:34
AVPacketList * raw_packet_buffer
raw packet buffer of original state
Definition: seek.h:48
Format I/O context.
Definition: avformat.h:871
AVParserStreamState * stream_states
states of individual streams (array)
Definition: seek.h:53
void ff_restore_parser_state(AVFormatContext *s, AVParserState *state)
Restore previously saved parser state and file position.
Definition: seek.c:444
static int flags
Definition: log.c:44
structure to store parser state of one AVStream
Definition: seek.h:31
structure to store parser state of AVFormat
Definition: seek.h:42
AVPacketList * parse_queue
parse queue of original state
Definition: seek.h:47
int64_t ff_gen_syncpoint_search(AVFormatContext *s, int stream_index, int64_t pos, int64_t min_ts, int64_t ts, int64_t max_ts, int flags)
Search for the sync point of all active streams.
Definition: seek.c:246
int nb_streams
number of streams with stored state
Definition: seek.h:52
static uint32_t state
Definition: trasher.c:27
AVCodecParserContext * parser
Definition: seek.h:33
Main libavformat public API header.
int64_t fpos
file position at the time of call
Definition: seek.h:43
int raw_packet_buffer_remaining_size
remaining space in raw_packet_buffer
Definition: seek.h:49
AVPacketList * packet_buffer
packet buffer of original state
Definition: seek.h:46
int probe_packets
Definition: seek.h:36
AVParserState * ff_store_parser_state(AVFormatContext *s)
Store current parser state and file position.
Definition: seek.c:396