Libav
Main Page
Related Pages
Modules
Data Structures
Files
Examples
File List
Globals
libavformat
framehash.c
Go to the documentation of this file.
1
/*
2
* Common functions for the frame{crc,md5} muxers
3
*
4
* This file is part of Libav.
5
*
6
* Libav is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU Lesser General Public
8
* License as published by the Free Software Foundation; either
9
* version 2.1 of the License, or (at your option) any later version.
10
*
11
* Libav is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Lesser General Public License for more details.
15
*
16
* You should have received a copy of the GNU Lesser General Public
17
* License along with Libav; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
*/
20
21
#include "
internal.h
"
22
23
int
ff_framehash_write_header
(
AVFormatContext
*s)
24
{
25
int
i;
26
for
(i = 0; i < s->
nb_streams
; i++) {
27
AVStream
*st = s->
streams
[i];
28
avpriv_set_pts_info
(st, 64, st->
codec
->
time_base
.
num
, st->
codec
->
time_base
.
den
);
29
avio_printf
(s->
pb
,
"#tb %d: %d/%d\n"
, i, st->
time_base
.
num
, st->
time_base
.
den
);
30
avio_flush
(s->
pb
);
31
}
32
return
0;
33
}
avpriv_set_pts_info
void avpriv_set_pts_info(AVStream *s, int pts_wrap_bits, unsigned int pts_num, unsigned int pts_den)
Set the time base and wrapping info for a given stream.
Definition:
utils.c:3208
AVRational::num
int num
numerator
Definition:
rational.h:44
AVCodecContext::time_base
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented...
Definition:
avcodec.h:1173
AVFormatContext
Format I/O context.
Definition:
avformat.h:871
AVFormatContext::streams
AVStream ** streams
A list of all streams in the file.
Definition:
avformat.h:935
internal.h
AVStream::codec
AVCodecContext * codec
Codec context associated with this stream.
Definition:
avformat.h:702
AVFormatContext::nb_streams
unsigned int nb_streams
Number of elements in AVFormatContext.streams.
Definition:
avformat.h:923
avio_flush
int void avio_flush(AVIOContext *s)
Definition:
aviobuf.c:180
ff_framehash_write_header
int ff_framehash_write_header(AVFormatContext *s)
Set the timebase for each stream from the corresponding codec timebase and print it.
Definition:
framehash.c:23
AVStream
Stream structure.
Definition:
avformat.h:683
AVFormatContext::pb
AVIOContext * pb
I/O context.
Definition:
avformat.h:913
AVRational::den
int den
denominator
Definition:
rational.h:45
AVStream::time_base
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented...
Definition:
avformat.h:719
avio_printf
int avio_printf(AVIOContext *s, const char *fmt,...) av_printf_format(2
Generated on Fri Aug 15 2014 22:31:08 for Libav by
1.8.7