comparison libdirac_libschro.h @ 10060:965220ebc611 libavcodec

cosmetics: indentation, prettyprinting, K&R coding style
author diego
date Sat, 15 Aug 2009 11:42:15 +0000
parents e9d9d946f213
children 7dd2a45249a9
comparison
equal deleted inserted replaced
10059:c6ace59701ce 10060:965220ebc611
26 #ifndef AVCODEC_LIBDIRAC_LIBSCHRO_H 26 #ifndef AVCODEC_LIBDIRAC_LIBSCHRO_H
27 #define AVCODEC_LIBDIRAC_LIBSCHRO_H 27 #define AVCODEC_LIBDIRAC_LIBSCHRO_H
28 28
29 #include "avcodec.h" 29 #include "avcodec.h"
30 30
31 typedef struct 31 typedef struct {
32 {
33 uint16_t width; 32 uint16_t width;
34 uint16_t height; 33 uint16_t height;
35 uint16_t frame_rate_num; 34 uint16_t frame_rate_num;
36 uint16_t frame_rate_denom; 35 uint16_t frame_rate_denom;
37 } FfmpegDiracSchroVideoFormatInfo; 36 } FfmpegDiracSchroVideoFormatInfo;
38 37
39 /** 38 /**
40 * Returns the index into the Dirac Schro common video format info table 39 * Returns the index into the Dirac Schro common video format info table
41 */ 40 */
42 unsigned int ff_dirac_schro_get_video_format_idx (AVCodecContext *avccontext); 41 unsigned int ff_dirac_schro_get_video_format_idx(AVCodecContext *avccontext);
43 42
44 /** 43 /**
45 * contains a single encoded frame returned from Dirac or Schroedinger 44 * contains a single encoded frame returned from Dirac or Schroedinger
46 */ 45 */
47 typedef struct FfmpegDiracSchroEncodedFrame 46 typedef struct FfmpegDiracSchroEncodedFrame {
48 {
49 /** encoded frame data */ 47 /** encoded frame data */
50 uint8_t *p_encbuf; 48 uint8_t *p_encbuf;
51 49
52 /** encoded frame size */ 50 /** encoded frame size */
53 uint32_t size; 51 uint32_t size;
60 } FfmpegDiracSchroEncodedFrame; 58 } FfmpegDiracSchroEncodedFrame;
61 59
62 /** 60 /**
63 * queue element 61 * queue element
64 */ 62 */
65 typedef struct FfmpegDiracSchroQueueElement 63 typedef struct FfmpegDiracSchroQueueElement {
66 {
67 /** Data to be stored in queue*/ 64 /** Data to be stored in queue*/
68 void *data; 65 void *data;
69 /** Pointer to next element queue */ 66 /** Pointer to next element queue */
70 struct FfmpegDiracSchroQueueElement *next; 67 struct FfmpegDiracSchroQueueElement *next;
71 } FfmpegDiracSchroQueueElement; 68 } FfmpegDiracSchroQueueElement;
72 69
73 70
74 /** 71 /**
75 * A simple queue implementation used in libdirac and libschroedinger 72 * A simple queue implementation used in libdirac and libschroedinger
76 */ 73 */
77 typedef struct FfmpegDiracSchroQueue 74 typedef struct FfmpegDiracSchroQueue {
78 {
79 /** Pointer to head of queue */ 75 /** Pointer to head of queue */
80 FfmpegDiracSchroQueueElement *p_head; 76 FfmpegDiracSchroQueueElement *p_head;
81 /** Pointer to tail of queue */ 77 /** Pointer to tail of queue */
82 FfmpegDiracSchroQueueElement *p_tail; 78 FfmpegDiracSchroQueueElement *p_tail;
83 /** Queue size*/ 79 /** Queue size*/
90 void ff_dirac_schro_queue_init(FfmpegDiracSchroQueue *queue); 86 void ff_dirac_schro_queue_init(FfmpegDiracSchroQueue *queue);
91 87
92 /** 88 /**
93 * Add an element to the end of the queue 89 * Add an element to the end of the queue
94 */ 90 */
95 int ff_dirac_schro_queue_push_back (FfmpegDiracSchroQueue *queue, void *p_data); 91 int ff_dirac_schro_queue_push_back(FfmpegDiracSchroQueue *queue, void *p_data);
96 92
97 /** 93 /**
98 * Return the first element in the queue 94 * Return the first element in the queue
99 */ 95 */
100 void *ff_dirac_schro_queue_pop (FfmpegDiracSchroQueue *queue); 96 void *ff_dirac_schro_queue_pop(FfmpegDiracSchroQueue *queue);
101 97
102 /** 98 /**
103 * Free the queue resources. free_func is a function supplied by the caller to 99 * Free the queue resources. free_func is a function supplied by the caller to
104 * free any resources allocated by the caller. The data field of the queue 100 * free any resources allocated by the caller. The data field of the queue
105 * element is passed to it. 101 * element is passed to it.