Originally committed as revision 15784 to svn://svn.ffmpeg.org/ffmpeg/trunk
| ... | ... |
@@ -37,7 +37,7 @@ |
| 37 | 37 |
#define MAX_PAGE_SIZE 65307 |
| 38 | 38 |
#define DECODER_BUFFER_SIZE MAX_PAGE_SIZE |
| 39 | 39 |
|
| 40 |
-static const ogg_codec_t * const ogg_codecs[] = {
|
|
| 40 |
+static const struct ogg_codec * const ogg_codecs[] = {
|
|
| 41 | 41 |
&ff_speex_codec, |
| 42 | 42 |
&ff_vorbis_codec, |
| 43 | 43 |
&ff_theora_codec, |
| ... | ... |
@@ -54,8 +54,8 @@ static const ogg_codec_t * const ogg_codecs[] = {
|
| 54 | 54 |
static int |
| 55 | 55 |
ogg_save (AVFormatContext * s) |
| 56 | 56 |
{
|
| 57 |
- ogg_t *ogg = s->priv_data; |
|
| 58 |
- ogg_state_t *ost = |
|
| 57 |
+ struct ogg *ogg = s->priv_data; |
|
| 58 |
+ struct ogg_state *ost = |
|
| 59 | 59 |
av_malloc(sizeof (*ost) + (ogg->nstreams-1) * sizeof (*ogg->streams)); |
| 60 | 60 |
int i; |
| 61 | 61 |
ost->pos = url_ftell (s->pb); |
| ... | ... |
@@ -65,7 +65,7 @@ ogg_save (AVFormatContext * s) |
| 65 | 65 |
memcpy(ost->streams, ogg->streams, ogg->nstreams * sizeof(*ogg->streams)); |
| 66 | 66 |
|
| 67 | 67 |
for (i = 0; i < ogg->nstreams; i++){
|
| 68 |
- ogg_stream_t *os = ogg->streams + i; |
|
| 68 |
+ struct ogg_stream *os = ogg->streams + i; |
|
| 69 | 69 |
os->buf = av_malloc (os->bufsize); |
| 70 | 70 |
memset (os->buf, 0, os->bufsize); |
| 71 | 71 |
memcpy (os->buf, ost->streams[i].buf, os->bufpos); |
| ... | ... |
@@ -79,9 +79,9 @@ ogg_save (AVFormatContext * s) |
| 79 | 79 |
static int |
| 80 | 80 |
ogg_restore (AVFormatContext * s, int discard) |
| 81 | 81 |
{
|
| 82 |
- ogg_t *ogg = s->priv_data; |
|
| 82 |
+ struct ogg *ogg = s->priv_data; |
|
| 83 | 83 |
ByteIOContext *bc = s->pb; |
| 84 |
- ogg_state_t *ost = ogg->state; |
|
| 84 |
+ struct ogg_state *ost = ogg->state; |
|
| 85 | 85 |
int i; |
| 86 | 86 |
|
| 87 | 87 |
if (!ost) |
| ... | ... |
@@ -106,12 +106,12 @@ ogg_restore (AVFormatContext * s, int discard) |
| 106 | 106 |
} |
| 107 | 107 |
|
| 108 | 108 |
static int |
| 109 |
-ogg_reset (ogg_t * ogg) |
|
| 109 |
+ogg_reset (struct ogg * ogg) |
|
| 110 | 110 |
{
|
| 111 | 111 |
int i; |
| 112 | 112 |
|
| 113 | 113 |
for (i = 0; i < ogg->nstreams; i++){
|
| 114 |
- ogg_stream_t *os = ogg->streams + i; |
|
| 114 |
+ struct ogg_stream *os = ogg->streams + i; |
|
| 115 | 115 |
os->bufpos = 0; |
| 116 | 116 |
os->pstart = 0; |
| 117 | 117 |
os->psize = 0; |
| ... | ... |
@@ -126,7 +126,7 @@ ogg_reset (ogg_t * ogg) |
| 126 | 126 |
return 0; |
| 127 | 127 |
} |
| 128 | 128 |
|
| 129 |
-static const ogg_codec_t * |
|
| 129 |
+static const struct ogg_codec * |
|
| 130 | 130 |
ogg_find_codec (uint8_t * buf, int size) |
| 131 | 131 |
{
|
| 132 | 132 |
int i; |
| ... | ... |
@@ -140,7 +140,7 @@ ogg_find_codec (uint8_t * buf, int size) |
| 140 | 140 |
} |
| 141 | 141 |
|
| 142 | 142 |
static int |
| 143 |
-ogg_find_stream (ogg_t * ogg, int serial) |
|
| 143 |
+ogg_find_stream (struct ogg * ogg, int serial) |
|
| 144 | 144 |
{
|
| 145 | 145 |
int i; |
| 146 | 146 |
|
| ... | ... |
@@ -155,10 +155,10 @@ static int |
| 155 | 155 |
ogg_new_stream (AVFormatContext * s, uint32_t serial) |
| 156 | 156 |
{
|
| 157 | 157 |
|
| 158 |
- ogg_t *ogg = s->priv_data; |
|
| 158 |
+ struct ogg *ogg = s->priv_data; |
|
| 159 | 159 |
int idx = ogg->nstreams++; |
| 160 | 160 |
AVStream *st; |
| 161 |
- ogg_stream_t *os; |
|
| 161 |
+ struct ogg_stream *os; |
|
| 162 | 162 |
|
| 163 | 163 |
ogg->streams = av_realloc (ogg->streams, |
| 164 | 164 |
ogg->nstreams * sizeof (*ogg->streams)); |
| ... | ... |
@@ -179,9 +179,9 @@ ogg_new_stream (AVFormatContext * s, uint32_t serial) |
| 179 | 179 |
} |
| 180 | 180 |
|
| 181 | 181 |
static int |
| 182 |
-ogg_new_buf(ogg_t *ogg, int idx) |
|
| 182 |
+ogg_new_buf(struct ogg *ogg, int idx) |
|
| 183 | 183 |
{
|
| 184 |
- ogg_stream_t *os = ogg->streams + idx; |
|
| 184 |
+ struct ogg_stream *os = ogg->streams + idx; |
|
| 185 | 185 |
uint8_t *nb = av_malloc(os->bufsize); |
| 186 | 186 |
int size = os->bufpos - os->pstart; |
| 187 | 187 |
if(os->buf){
|
| ... | ... |
@@ -199,8 +199,8 @@ static int |
| 199 | 199 |
ogg_read_page (AVFormatContext * s, int *str) |
| 200 | 200 |
{
|
| 201 | 201 |
ByteIOContext *bc = s->pb; |
| 202 |
- ogg_t *ogg = s->priv_data; |
|
| 203 |
- ogg_stream_t *os; |
|
| 202 |
+ struct ogg *ogg = s->priv_data; |
|
| 203 |
+ struct ogg_stream *os; |
|
| 204 | 204 |
int i = 0; |
| 205 | 205 |
int flags, nsegs; |
| 206 | 206 |
uint64_t gp; |
| ... | ... |
@@ -302,9 +302,9 @@ ogg_read_page (AVFormatContext * s, int *str) |
| 302 | 302 |
static int |
| 303 | 303 |
ogg_packet (AVFormatContext * s, int *str, int *dstart, int *dsize) |
| 304 | 304 |
{
|
| 305 |
- ogg_t *ogg = s->priv_data; |
|
| 305 |
+ struct ogg *ogg = s->priv_data; |
|
| 306 | 306 |
int idx; |
| 307 |
- ogg_stream_t *os; |
|
| 307 |
+ struct ogg_stream *os; |
|
| 308 | 308 |
int complete = 0; |
| 309 | 309 |
int segp = 0, psize = 0; |
| 310 | 310 |
|
| ... | ... |
@@ -402,7 +402,7 @@ ogg_packet (AVFormatContext * s, int *str, int *dstart, int *dsize) |
| 402 | 402 |
static int |
| 403 | 403 |
ogg_get_headers (AVFormatContext * s) |
| 404 | 404 |
{
|
| 405 |
- ogg_t *ogg = s->priv_data; |
|
| 405 |
+ struct ogg *ogg = s->priv_data; |
|
| 406 | 406 |
|
| 407 | 407 |
do{
|
| 408 | 408 |
if (ogg_packet (s, NULL, NULL, NULL) < 0) |
| ... | ... |
@@ -419,8 +419,8 @@ ogg_get_headers (AVFormatContext * s) |
| 419 | 419 |
static uint64_t |
| 420 | 420 |
ogg_gptopts (AVFormatContext * s, int i, uint64_t gp) |
| 421 | 421 |
{
|
| 422 |
- ogg_t *ogg = s->priv_data; |
|
| 423 |
- ogg_stream_t *os = ogg->streams + i; |
|
| 422 |
+ struct ogg *ogg = s->priv_data; |
|
| 423 |
+ struct ogg_stream *os = ogg->streams + i; |
|
| 424 | 424 |
uint64_t pts = AV_NOPTS_VALUE; |
| 425 | 425 |
|
| 426 | 426 |
if(os->codec->gptopts){
|
| ... | ... |
@@ -436,7 +436,7 @@ ogg_gptopts (AVFormatContext * s, int i, uint64_t gp) |
| 436 | 436 |
static int |
| 437 | 437 |
ogg_get_length (AVFormatContext * s) |
| 438 | 438 |
{
|
| 439 |
- ogg_t *ogg = s->priv_data; |
|
| 439 |
+ struct ogg *ogg = s->priv_data; |
|
| 440 | 440 |
int idx = -1, i; |
| 441 | 441 |
int64_t size, end; |
| 442 | 442 |
|
| ... | ... |
@@ -476,7 +476,7 @@ ogg_get_length (AVFormatContext * s) |
| 476 | 476 |
static int |
| 477 | 477 |
ogg_read_header (AVFormatContext * s, AVFormatParameters * ap) |
| 478 | 478 |
{
|
| 479 |
- ogg_t *ogg = s->priv_data; |
|
| 479 |
+ struct ogg *ogg = s->priv_data; |
|
| 480 | 480 |
ogg->curidx = -1; |
| 481 | 481 |
//linear headers seek from start |
| 482 | 482 |
if (ogg_get_headers (s) < 0){
|
| ... | ... |
@@ -494,8 +494,8 @@ ogg_read_header (AVFormatContext * s, AVFormatParameters * ap) |
| 494 | 494 |
static int |
| 495 | 495 |
ogg_read_packet (AVFormatContext * s, AVPacket * pkt) |
| 496 | 496 |
{
|
| 497 |
- ogg_t *ogg; |
|
| 498 |
- ogg_stream_t *os; |
|
| 497 |
+ struct ogg *ogg; |
|
| 498 |
+ struct ogg_stream *os; |
|
| 499 | 499 |
int idx = -1; |
| 500 | 500 |
int pstart, psize; |
| 501 | 501 |
|
| ... | ... |
@@ -527,7 +527,7 @@ ogg_read_packet (AVFormatContext * s, AVPacket * pkt) |
| 527 | 527 |
static int |
| 528 | 528 |
ogg_read_close (AVFormatContext * s) |
| 529 | 529 |
{
|
| 530 |
- ogg_t *ogg = s->priv_data; |
|
| 530 |
+ struct ogg *ogg = s->priv_data; |
|
| 531 | 531 |
int i; |
| 532 | 532 |
|
| 533 | 533 |
for (i = 0; i < ogg->nstreams; i++){
|
| ... | ... |
@@ -543,7 +543,7 @@ static int64_t |
| 543 | 543 |
ogg_read_timestamp (AVFormatContext * s, int stream_index, int64_t * pos_arg, |
| 544 | 544 |
int64_t pos_limit) |
| 545 | 545 |
{
|
| 546 |
- ogg_t *ogg = s->priv_data; |
|
| 546 |
+ struct ogg *ogg = s->priv_data; |
|
| 547 | 547 |
ByteIOContext *bc = s->pb; |
| 548 | 548 |
int64_t pts = AV_NOPTS_VALUE; |
| 549 | 549 |
int i; |
| ... | ... |
@@ -575,7 +575,7 @@ static int ogg_probe(AVProbeData *p) |
| 575 | 575 |
AVInputFormat ogg_demuxer = {
|
| 576 | 576 |
"ogg", |
| 577 | 577 |
NULL_IF_CONFIG_SMALL("Ogg"),
|
| 578 |
- sizeof (ogg_t), |
|
| 578 |
+ sizeof (struct ogg), |
|
| 579 | 579 |
ogg_probe, |
| 580 | 580 |
ogg_read_header, |
| 581 | 581 |
ogg_read_packet, |
| ... | ... |
@@ -27,16 +27,16 @@ |
| 27 | 27 |
|
| 28 | 28 |
#include "avformat.h" |
| 29 | 29 |
|
| 30 |
-typedef struct ogg_codec {
|
|
| 30 |
+struct ogg_codec {
|
|
| 31 | 31 |
const int8_t *magic; |
| 32 | 32 |
uint8_t magicsize; |
| 33 | 33 |
const int8_t *name; |
| 34 | 34 |
int (*header)(AVFormatContext *, int); |
| 35 | 35 |
int (*packet)(AVFormatContext *, int); |
| 36 | 36 |
uint64_t (*gptopts)(AVFormatContext *, int, uint64_t); |
| 37 |
-} ogg_codec_t; |
|
| 37 |
+}; |
|
| 38 | 38 |
|
| 39 |
-typedef struct ogg_stream {
|
|
| 39 |
+struct ogg_stream {
|
|
| 40 | 40 |
uint8_t *buf; |
| 41 | 41 |
unsigned int bufsize; |
| 42 | 42 |
unsigned int bufpos; |
| ... | ... |
@@ -47,43 +47,43 @@ typedef struct ogg_stream {
|
| 47 | 47 |
uint32_t seq; |
| 48 | 48 |
uint64_t granule, lastgp; |
| 49 | 49 |
int flags; |
| 50 |
- ogg_codec_t *codec; |
|
| 50 |
+ struct ogg_codec *codec; |
|
| 51 | 51 |
int header; |
| 52 | 52 |
int nsegs, segp; |
| 53 | 53 |
uint8_t segments[255]; |
| 54 | 54 |
void *private; |
| 55 |
-} ogg_stream_t; |
|
| 55 |
+}; |
|
| 56 | 56 |
|
| 57 |
-typedef struct ogg_state {
|
|
| 57 |
+struct ogg_state {
|
|
| 58 | 58 |
uint64_t pos; |
| 59 | 59 |
int curidx; |
| 60 | 60 |
struct ogg_state *next; |
| 61 | 61 |
int nstreams; |
| 62 |
- ogg_stream_t streams[1]; |
|
| 63 |
-} ogg_state_t; |
|
| 62 |
+ struct ogg_stream streams[1]; |
|
| 63 |
+}; |
|
| 64 | 64 |
|
| 65 |
-typedef struct ogg {
|
|
| 66 |
- ogg_stream_t *streams; |
|
| 65 |
+struct ogg {
|
|
| 66 |
+ struct ogg_stream *streams; |
|
| 67 | 67 |
int nstreams; |
| 68 | 68 |
int headers; |
| 69 | 69 |
int curidx; |
| 70 | 70 |
uint64_t size; |
| 71 |
- ogg_state_t *state; |
|
| 72 |
-} ogg_t; |
|
| 71 |
+ struct ogg_state *state; |
|
| 72 |
+}; |
|
| 73 | 73 |
|
| 74 | 74 |
#define OGG_FLAG_CONT 1 |
| 75 | 75 |
#define OGG_FLAG_BOS 2 |
| 76 | 76 |
#define OGG_FLAG_EOS 4 |
| 77 | 77 |
|
| 78 |
-extern const ogg_codec_t ff_flac_codec; |
|
| 79 |
-extern const ogg_codec_t ff_ogm_audio_codec; |
|
| 80 |
-extern const ogg_codec_t ff_ogm_old_codec; |
|
| 81 |
-extern const ogg_codec_t ff_ogm_text_codec; |
|
| 82 |
-extern const ogg_codec_t ff_ogm_video_codec; |
|
| 83 |
-extern const ogg_codec_t ff_old_flac_codec; |
|
| 84 |
-extern const ogg_codec_t ff_speex_codec; |
|
| 85 |
-extern const ogg_codec_t ff_theora_codec; |
|
| 86 |
-extern const ogg_codec_t ff_vorbis_codec; |
|
| 78 |
+extern const struct ogg_codec ff_flac_codec; |
|
| 79 |
+extern const struct ogg_codec ff_ogm_audio_codec; |
|
| 80 |
+extern const struct ogg_codec ff_ogm_old_codec; |
|
| 81 |
+extern const struct ogg_codec ff_ogm_text_codec; |
|
| 82 |
+extern const struct ogg_codec ff_ogm_video_codec; |
|
| 83 |
+extern const struct ogg_codec ff_old_flac_codec; |
|
| 84 |
+extern const struct ogg_codec ff_speex_codec; |
|
| 85 |
+extern const struct ogg_codec ff_theora_codec; |
|
| 86 |
+extern const struct ogg_codec ff_vorbis_codec; |
|
| 87 | 87 |
|
| 88 | 88 |
extern int vorbis_comment(AVFormatContext *ms, uint8_t *buf, int size); |
| 89 | 89 |
|
| ... | ... |
@@ -28,8 +28,8 @@ |
| 28 | 28 |
static int |
| 29 | 29 |
flac_header (AVFormatContext * s, int idx) |
| 30 | 30 |
{
|
| 31 |
- ogg_t *ogg = s->priv_data; |
|
| 32 |
- ogg_stream_t *os = ogg->streams + idx; |
|
| 31 |
+ struct ogg *ogg = s->priv_data; |
|
| 32 |
+ struct ogg_stream *os = ogg->streams + idx; |
|
| 33 | 33 |
AVStream *st = s->streams[idx]; |
| 34 | 34 |
GetBitContext gb; |
| 35 | 35 |
int mdt; |
| ... | ... |
@@ -85,13 +85,13 @@ old_flac_header (AVFormatContext * s, int idx) |
| 85 | 85 |
return 0; |
| 86 | 86 |
} |
| 87 | 87 |
|
| 88 |
-const ogg_codec_t ff_flac_codec = {
|
|
| 88 |
+const struct ogg_codec ff_flac_codec = {
|
|
| 89 | 89 |
.magic = "\177FLAC", |
| 90 | 90 |
.magicsize = 5, |
| 91 | 91 |
.header = flac_header |
| 92 | 92 |
}; |
| 93 | 93 |
|
| 94 |
-const ogg_codec_t ff_old_flac_codec = {
|
|
| 94 |
+const struct ogg_codec ff_old_flac_codec = {
|
|
| 95 | 95 |
.magic = "fLaC", |
| 96 | 96 |
.magicsize = 4, |
| 97 | 97 |
.header = old_flac_header |
| ... | ... |
@@ -33,8 +33,8 @@ |
| 33 | 33 |
static int |
| 34 | 34 |
ogm_header(AVFormatContext *s, int idx) |
| 35 | 35 |
{
|
| 36 |
- ogg_t *ogg = s->priv_data; |
|
| 37 |
- ogg_stream_t *os = ogg->streams + idx; |
|
| 36 |
+ struct ogg *ogg = s->priv_data; |
|
| 37 |
+ struct ogg_stream *os = ogg->streams + idx; |
|
| 38 | 38 |
AVStream *st = s->streams[idx]; |
| 39 | 39 |
const uint8_t *p = os->buf + os->pstart; |
| 40 | 40 |
uint64_t time_unit; |
| ... | ... |
@@ -100,8 +100,8 @@ ogm_header(AVFormatContext *s, int idx) |
| 100 | 100 |
static int |
| 101 | 101 |
ogm_dshow_header(AVFormatContext *s, int idx) |
| 102 | 102 |
{
|
| 103 |
- ogg_t *ogg = s->priv_data; |
|
| 104 |
- ogg_stream_t *os = ogg->streams + idx; |
|
| 103 |
+ struct ogg *ogg = s->priv_data; |
|
| 104 |
+ struct ogg_stream *os = ogg->streams + idx; |
|
| 105 | 105 |
AVStream *st = s->streams[idx]; |
| 106 | 106 |
uint8_t *p = os->buf + os->pstart; |
| 107 | 107 |
uint32_t t; |
| ... | ... |
@@ -134,8 +134,8 @@ ogm_dshow_header(AVFormatContext *s, int idx) |
| 134 | 134 |
static int |
| 135 | 135 |
ogm_packet(AVFormatContext *s, int idx) |
| 136 | 136 |
{
|
| 137 |
- ogg_t *ogg = s->priv_data; |
|
| 138 |
- ogg_stream_t *os = ogg->streams + idx; |
|
| 137 |
+ struct ogg *ogg = s->priv_data; |
|
| 138 |
+ struct ogg_stream *os = ogg->streams + idx; |
|
| 139 | 139 |
uint8_t *p = os->buf + os->pstart; |
| 140 | 140 |
int lb; |
| 141 | 141 |
|
| ... | ... |
@@ -149,28 +149,28 @@ ogm_packet(AVFormatContext *s, int idx) |
| 149 | 149 |
return 0; |
| 150 | 150 |
} |
| 151 | 151 |
|
| 152 |
-const ogg_codec_t ff_ogm_video_codec = {
|
|
| 152 |
+const struct ogg_codec ff_ogm_video_codec = {
|
|
| 153 | 153 |
.magic = "\001video", |
| 154 | 154 |
.magicsize = 6, |
| 155 | 155 |
.header = ogm_header, |
| 156 | 156 |
.packet = ogm_packet |
| 157 | 157 |
}; |
| 158 | 158 |
|
| 159 |
-const ogg_codec_t ff_ogm_audio_codec = {
|
|
| 159 |
+const struct ogg_codec ff_ogm_audio_codec = {
|
|
| 160 | 160 |
.magic = "\001audio", |
| 161 | 161 |
.magicsize = 6, |
| 162 | 162 |
.header = ogm_header, |
| 163 | 163 |
.packet = ogm_packet |
| 164 | 164 |
}; |
| 165 | 165 |
|
| 166 |
-const ogg_codec_t ff_ogm_text_codec = {
|
|
| 166 |
+const struct ogg_codec ff_ogm_text_codec = {
|
|
| 167 | 167 |
.magic = "\001text", |
| 168 | 168 |
.magicsize = 5, |
| 169 | 169 |
.header = ogm_header, |
| 170 | 170 |
.packet = ogm_packet |
| 171 | 171 |
}; |
| 172 | 172 |
|
| 173 |
-const ogg_codec_t ff_ogm_old_codec = {
|
|
| 173 |
+const struct ogg_codec ff_ogm_old_codec = {
|
|
| 174 | 174 |
.magic = "\001Direct Show Samples embedded in Ogg", |
| 175 | 175 |
.magicsize = 35, |
| 176 | 176 |
.header = ogm_dshow_header, |
| ... | ... |
@@ -31,8 +31,8 @@ |
| 31 | 31 |
#include "oggdec.h" |
| 32 | 32 |
|
| 33 | 33 |
static int speex_header(AVFormatContext *s, int idx) {
|
| 34 |
- ogg_t *ogg = s->priv_data; |
|
| 35 |
- ogg_stream_t *os = ogg->streams + idx; |
|
| 34 |
+ struct ogg *ogg = s->priv_data; |
|
| 35 |
+ struct ogg_stream *os = ogg->streams + idx; |
|
| 36 | 36 |
AVStream *st = s->streams[idx]; |
| 37 | 37 |
uint8_t *p = os->buf + os->pstart; |
| 38 | 38 |
|
| ... | ... |
@@ -54,7 +54,7 @@ static int speex_header(AVFormatContext *s, int idx) {
|
| 54 | 54 |
return 0; |
| 55 | 55 |
} |
| 56 | 56 |
|
| 57 |
-const ogg_codec_t ff_speex_codec = {
|
|
| 57 |
+const struct ogg_codec ff_speex_codec = {
|
|
| 58 | 58 |
.magic = "Speex ", |
| 59 | 59 |
.magicsize = 8, |
| 60 | 60 |
.header = speex_header |
| ... | ... |
@@ -28,18 +28,18 @@ |
| 28 | 28 |
#include "avformat.h" |
| 29 | 29 |
#include "oggdec.h" |
| 30 | 30 |
|
| 31 |
-typedef struct theora_params {
|
|
| 31 |
+struct theora_params {
|
|
| 32 | 32 |
int gpshift; |
| 33 | 33 |
int gpmask; |
| 34 |
-} theora_params_t; |
|
| 34 |
+}; |
|
| 35 | 35 |
|
| 36 | 36 |
static int |
| 37 | 37 |
theora_header (AVFormatContext * s, int idx) |
| 38 | 38 |
{
|
| 39 |
- ogg_t *ogg = s->priv_data; |
|
| 40 |
- ogg_stream_t *os = ogg->streams + idx; |
|
| 39 |
+ struct ogg *ogg = s->priv_data; |
|
| 40 |
+ struct ogg_stream *os = ogg->streams + idx; |
|
| 41 | 41 |
AVStream *st = s->streams[idx]; |
| 42 |
- theora_params_t *thp = os->private; |
|
| 42 |
+ struct theora_params *thp = os->private; |
|
| 43 | 43 |
int cds = st->codec->extradata_size + os->psize + 2; |
| 44 | 44 |
uint8_t *cdp; |
| 45 | 45 |
|
| ... | ... |
@@ -119,9 +119,9 @@ theora_header (AVFormatContext * s, int idx) |
| 119 | 119 |
static uint64_t |
| 120 | 120 |
theora_gptopts(AVFormatContext *ctx, int idx, uint64_t gp) |
| 121 | 121 |
{
|
| 122 |
- ogg_t *ogg = ctx->priv_data; |
|
| 123 |
- ogg_stream_t *os = ogg->streams + idx; |
|
| 124 |
- theora_params_t *thp = os->private; |
|
| 122 |
+ struct ogg *ogg = ctx->priv_data; |
|
| 123 |
+ struct ogg_stream *os = ogg->streams + idx; |
|
| 124 |
+ struct theora_params *thp = os->private; |
|
| 125 | 125 |
uint64_t iframe = gp >> thp->gpshift; |
| 126 | 126 |
uint64_t pframe = gp & thp->gpmask; |
| 127 | 127 |
|
| ... | ... |
@@ -131,7 +131,7 @@ theora_gptopts(AVFormatContext *ctx, int idx, uint64_t gp) |
| 131 | 131 |
return iframe + pframe; |
| 132 | 132 |
} |
| 133 | 133 |
|
| 134 |
-const ogg_codec_t ff_theora_codec = {
|
|
| 134 |
+const struct ogg_codec ff_theora_codec = {
|
|
| 135 | 135 |
.magic = "\200theora", |
| 136 | 136 |
.magicsize = 7, |
| 137 | 137 |
.header = theora_header, |
| ... | ... |
@@ -122,14 +122,14 @@ vorbis_comment(AVFormatContext * as, uint8_t *buf, int size) |
| 122 | 122 |
* [framing_flag] = read one bit | Not Used |
| 123 | 123 |
* */ |
| 124 | 124 |
|
| 125 |
-typedef struct {
|
|
| 125 |
+struct oggvorbis_private {
|
|
| 126 | 126 |
unsigned int len[3]; |
| 127 | 127 |
unsigned char *packet[3]; |
| 128 |
-} oggvorbis_private_t; |
|
| 128 |
+}; |
|
| 129 | 129 |
|
| 130 | 130 |
|
| 131 | 131 |
static unsigned int |
| 132 |
-fixup_vorbis_headers(AVFormatContext * as, oggvorbis_private_t *priv, |
|
| 132 |
+fixup_vorbis_headers(AVFormatContext * as, struct oggvorbis_private *priv, |
|
| 133 | 133 |
uint8_t **buf) |
| 134 | 134 |
{
|
| 135 | 135 |
int i,offset, len; |
| ... | ... |
@@ -154,16 +154,16 @@ fixup_vorbis_headers(AVFormatContext * as, oggvorbis_private_t *priv, |
| 154 | 154 |
static int |
| 155 | 155 |
vorbis_header (AVFormatContext * s, int idx) |
| 156 | 156 |
{
|
| 157 |
- ogg_t *ogg = s->priv_data; |
|
| 158 |
- ogg_stream_t *os = ogg->streams + idx; |
|
| 157 |
+ struct ogg *ogg = s->priv_data; |
|
| 158 |
+ struct ogg_stream *os = ogg->streams + idx; |
|
| 159 | 159 |
AVStream *st = s->streams[idx]; |
| 160 |
- oggvorbis_private_t *priv; |
|
| 160 |
+ struct oggvorbis_private *priv; |
|
| 161 | 161 |
|
| 162 | 162 |
if (os->seq > 2) |
| 163 | 163 |
return 0; |
| 164 | 164 |
|
| 165 | 165 |
if (os->seq == 0) {
|
| 166 |
- os->private = av_mallocz(sizeof(oggvorbis_private_t)); |
|
| 166 |
+ os->private = av_mallocz(sizeof(struct oggvorbis_private)); |
|
| 167 | 167 |
if (!os->private) |
| 168 | 168 |
return 0; |
| 169 | 169 |
} |
| ... | ... |
@@ -219,7 +219,7 @@ vorbis_header (AVFormatContext * s, int idx) |
| 219 | 219 |
return os->seq < 3; |
| 220 | 220 |
} |
| 221 | 221 |
|
| 222 |
-const ogg_codec_t ff_vorbis_codec = {
|
|
| 222 |
+const struct ogg_codec ff_vorbis_codec = {
|
|
| 223 | 223 |
.magic = "\001vorbis", |
| 224 | 224 |
.magicsize = 7, |
| 225 | 225 |
.header = vorbis_header |