Skip to content

Commit

Permalink
avformat: Don't anonymously typedef structs
Browse files Browse the repository at this point in the history
  • Loading branch information
DonDiego committed Feb 14, 2015
1 parent 7769be5 commit daf8cf3
Show file tree
Hide file tree
Showing 65 changed files with 117 additions and 117 deletions.
2 changes: 1 addition & 1 deletion libavformat/adtsenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

#define ADTS_HEADER_SIZE 7

typedef struct {
typedef struct ADTSContext {
int write_adts;
int objecttype;
int sample_rate_index;
Expand Down
2 changes: 1 addition & 1 deletion libavformat/aiffdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define AIFF 0
#define AIFF_C_VERSION1 0xA2805140

typedef struct {
typedef struct AIFFInputContext {
int64_t data_end;
int block_duration;
} AIFFInputContext;
Expand Down
2 changes: 1 addition & 1 deletion libavformat/aiffenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "aiff.h"
#include "avio_internal.h"

typedef struct {
typedef struct AIFFOutputContext {
int64_t form;
int64_t frames;
int64_t ssnd;
Expand Down
4 changes: 2 additions & 2 deletions libavformat/anm.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@
#include "avformat.h"
#include "internal.h"

typedef struct {
typedef struct Page {
int base_record;
unsigned int nb_records;
int size;
} Page;

typedef struct {
typedef struct AnmDemuxContext {
unsigned int nb_pages; /**< total pages in file */
unsigned int nb_records; /**< total records in file */
int page_table_offset;
Expand Down
4 changes: 2 additions & 2 deletions libavformat/ape.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@

#define APE_EXTRADATA_SIZE 6

typedef struct {
typedef struct APEFrame {
int64_t pos;
int nblocks;
int size;
int skip;
int64_t pts;
} APEFrame;

typedef struct {
typedef struct APEContext {
/* Derived fields */
uint32_t junklength;
uint32_t firstframe;
Expand Down
2 changes: 1 addition & 1 deletion libavformat/asfdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include "asf.h"
#include "asfcrypt.h"

typedef struct {
typedef struct ASFContext {
const AVClass *class;
int asfid2avid[128]; ///< conversion table from asf ID 2 AVStream ID
ASFStream streams[128]; ///< it's max number and it's not that big
Expand Down
2 changes: 1 addition & 1 deletion libavformat/asfenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@

#define DATA_HEADER_SIZE 50

typedef struct {
typedef struct ASFContext {
uint32_t seqno;
int is_streamed;
ASFStream streams[128]; ///< it's max number and it's not that big
Expand Down
2 changes: 1 addition & 1 deletion libavformat/avidec.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ typedef struct AVIStream {
uint8_t *sub_buffer;
} AVIStream;

typedef struct {
typedef struct AVIContext {
int64_t riff_end;
int64_t movi_end;
int64_t fsize;
Expand Down
4 changes: 2 additions & 2 deletions libavformat/avienc.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ typedef struct AVIIndex {
AVIIentry** cluster;
} AVIIndex;

typedef struct {
typedef struct AVIContext {
int64_t riff_start, movi_list, odml_list;
int64_t frames_hdr_all;
int riff_id;
} AVIContext;

typedef struct {
typedef struct AVIStream {
int64_t frames_hdr_strm;
int audio_strm_length;
int packet_count;
Expand Down
2 changes: 1 addition & 1 deletion libavformat/bink.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ enum BinkAudFlags {
#define BINK_MAX_WIDTH 7680
#define BINK_MAX_HEIGHT 4800

typedef struct {
typedef struct BinkDemuxContext {
uint32_t file_size;

uint32_t num_audio_tracks;
Expand Down
4 changes: 2 additions & 2 deletions libavformat/c93.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
#include "voc.h"
#include "libavutil/intreadwrite.h"

typedef struct {
typedef struct C93BlockRecord {
uint16_t index;
uint8_t length;
uint8_t frames;
} C93BlockRecord;

typedef struct {
typedef struct C93DemuxContext {
VocDecContext voc;

C93BlockRecord block_records[512];
Expand Down
2 changes: 1 addition & 1 deletion libavformat/cafdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include "libavutil/dict.h"
#include "caf.h"

typedef struct {
typedef struct CafContext {
int bytes_per_packet; ///< bytes in a packet, or 0 if variable
int frames_per_packet; ///< frames in a packet, or 0 if variable
int64_t num_bytes; ///< total number of bytes in stream
Expand Down
2 changes: 1 addition & 1 deletion libavformat/crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define MAX_BUFFER_BLOCKS 150
#define BLOCKSIZE 16

typedef struct {
typedef struct CryptoContext {
const AVClass *class;
URLContext *hd;
uint8_t inbuffer [BLOCKSIZE*MAX_BUFFER_BLOCKS],
Expand Down
2 changes: 1 addition & 1 deletion libavformat/dxa.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

#define DXA_EXTRA_SIZE 9

typedef struct{
typedef struct DXAContext {
int frames;
int has_sound;
int bpc;
Expand Down
2 changes: 1 addition & 1 deletion libavformat/eacdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include "avformat.h"
#include "internal.h"

typedef struct {
typedef struct CdataDemuxContext {
unsigned int channels;
unsigned int audio_pts;
} CdataDemuxContext;
Expand Down
2 changes: 1 addition & 1 deletion libavformat/filmstripdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

#define RAND_TAG MKBETAG('R','a','n','d')

typedef struct {
typedef struct FilmstripDemuxContext {
int leading;
} FilmstripDemuxContext;

Expand Down
2 changes: 1 addition & 1 deletion libavformat/filmstripenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

#define RAND_TAG MKBETAG('R','a','n','d')

typedef struct {
typedef struct FilmstripMuxContext {
int nb_frames;
} FilmstripMuxContext;

Expand Down
2 changes: 1 addition & 1 deletion libavformat/flvdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

#define VALIDATE_INDEX_TS_THRESH 2500

typedef struct {
typedef struct FLVContext {
const AVClass *class; ///< Class for private options.
int trust_metadata; ///< configure streams according onMetaData
int wrong_dts; ///< wrong dts due to negative cts
Expand Down
4 changes: 2 additions & 2 deletions libavformat/gif.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
* (byte 19) in the app_header */
#define GIF_ADD_APP_HEADER // required to enable looping of animated gif

typedef struct {
typedef struct rgb_triplet {
unsigned char r;
unsigned char g;
unsigned char b;
Expand Down Expand Up @@ -253,7 +253,7 @@ static int gif_image_write_image(AVIOContext *pb,
return 0;
}

typedef struct {
typedef struct GIFContext {
AVClass *class; /** Class for private options. */
int64_t time, file_time;
uint8_t buffer[100]; /* data chunks */
Expand Down
2 changes: 1 addition & 1 deletion libavformat/gopher.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include "network.h"
#include "url.h"

typedef struct {
typedef struct GopherContext {
URLContext *hd;
} GopherContext;

Expand Down
2 changes: 1 addition & 1 deletion libavformat/gsmdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define GSM_BLOCK_SAMPLES 160
#define GSM_SAMPLE_RATE 8000

typedef struct {
typedef struct GSMDemuxerContext {
AVClass *class;
int sample_rate;
} GSMDemuxerContext;
Expand Down
2 changes: 1 addition & 1 deletion libavformat/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
#define BUFFER_SIZE MAX_URL_SIZE
#define MAX_REDIRECTS 8

typedef struct {
typedef struct HTTPContext {
const AVClass *class;
URLContext *hd;
unsigned char buffer[BUFFER_SIZE], *buf_ptr, *buf_end;
Expand Down
2 changes: 1 addition & 1 deletion libavformat/iff.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ typedef enum {
BITMAP_BYTERUN1
} bitmap_compression_type;

typedef struct {
typedef struct IffDemuxContext {
uint64_t body_pos;
uint32_t body_size;
uint32_t sent_bytes;
Expand Down
2 changes: 1 addition & 1 deletion libavformat/img2.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "libavutil/avstring.h"
#include "internal.h"

typedef struct {
typedef struct IdStrMap {
enum AVCodecID id;
const char *str;
} IdStrMap;
Expand Down
2 changes: 1 addition & 1 deletion libavformat/img2dec.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include "avformat.h"
#include "internal.h"

typedef struct {
typedef struct VideoDemuxData {
const AVClass *class; /**< Class for private options. */
int img_first;
int img_last;
Expand Down
2 changes: 1 addition & 1 deletion libavformat/img2enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include "internal.h"
#include "libavutil/opt.h"

typedef struct {
typedef struct VideoMuxData {
const AVClass *class; /**< Class for private options. */
int img_number;
int is_pipe;
Expand Down
2 changes: 1 addition & 1 deletion libavformat/iss.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#define ISS_SIG_LEN 15
#define MAX_TOKEN_SIZE 20

typedef struct {
typedef struct IssDemuxContext {
int packet_size;
int sample_start_pos;
} IssDemuxContext;
Expand Down
4 changes: 2 additions & 2 deletions libavformat/jvdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@

#define JV_PREAMBLE_SIZE 5

typedef struct {
typedef struct JVFrame {
int audio_size; /** audio packet size (bytes) */
int video_size; /** video packet size (bytes) */
int palette_size; /** palette size (bytes) */
int video_type; /** per-frame video compression type */
} JVFrame;

typedef struct {
typedef struct JVDemuxContext {
JVFrame *frames;
enum {
JV_AUDIO = 0,
Expand Down
2 changes: 1 addition & 1 deletion libavformat/latmenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "libavutil/opt.h"
#include "avformat.h"

typedef struct {
typedef struct LATMContext {
AVClass *av_class;
int off;
int channel_conf;
Expand Down
2 changes: 1 addition & 1 deletion libavformat/lxfdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static const AVCodecTag lxf_tags[] = {
{ AV_CODEC_ID_NONE, 0 },
};

typedef struct {
typedef struct LXFDemuxContext {
int channels; ///< number of audio channels. zero means no audio
int frame_number; ///< current video frame
uint32_t video_format, packet_type, extended_size;
Expand Down
Loading

0 comments on commit daf8cf3

Please sign in to comment.