summaryrefslogtreecommitdiff
path: root/gst/mpeg1sys/buffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'gst/mpeg1sys/buffer.h')
-rw-r--r--gst/mpeg1sys/buffer.h194
1 files changed, 99 insertions, 95 deletions
diff --git a/gst/mpeg1sys/buffer.h b/gst/mpeg1sys/buffer.h
index 0624c3aab..2a9fb71f5 100644
--- a/gst/mpeg1sys/buffer.h
+++ b/gst/mpeg1sys/buffer.h
@@ -24,8 +24,9 @@
#include <gst/gst.h>
#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
+extern "C"
+{
+#endif /* __cplusplus */
#define MPEG1MUX_BUFFER_QUEUED(mb) (g_list_length((mb)->timecode_list))
#define MPEG1MUX_BUFFER_SPACE(mb) ((mb)->length)
@@ -41,101 +42,104 @@ extern "C" {
#define FRAME_TYPE_PFRAME 3
#define FRAME_TYPE_AUDIO 4
-typedef struct _Mpeg1MuxBuffer Mpeg1MuxBuffer;
-typedef struct _Mpeg1MuxTimecode Mpeg1MuxTimecode;
-
-typedef struct video_struc /* Informationen ueber Video Stream */
-{
- unsigned int stream_length ;
- unsigned int num_sequence ;
- unsigned int num_seq_end ;
- unsigned int num_pictures ;
- unsigned int num_groups ;
- unsigned int num_frames[4] ;
- unsigned int avg_frames[4] ;
-
- unsigned int horizontal_size;
- unsigned int vertical_size ;
- unsigned int aspect_ratio ;
- unsigned int picture_rate ;
- unsigned int bit_rate ;
- unsigned int comp_bit_rate ;
- unsigned int vbv_buffer_size;
- unsigned int CSPF ;
-
- guint64 PTS;
- guint64 DTS;
-
- guint64 current_PTS;
- guint64 current_DTS;
- guchar current_type;
-
- double secs_per_frame;
- gulong group_order, decoding_order;
-} Video_struc;
-
-typedef struct audio_struc /* Informationen ueber Audio Stream */
-{
- unsigned int stream_length ;
- unsigned int num_syncword ;
- unsigned int num_frames [2] ;
- unsigned int framesize ;
- unsigned int layer ;
- unsigned int protection ;
- unsigned int bit_rate ;
- unsigned int frequency ;
- unsigned int mode ;
- unsigned int mode_extension ;
- unsigned int copyright ;
- unsigned int original_copy ;
- unsigned int emphasis ;
-
- guint64 PTS;
-
- guint64 current_PTS;
-
- double samples_per_second;
- gulong decoding_order;
-} Audio_struc;
-
-struct _Mpeg1MuxTimecode {
- gulong length;
- gulong original_length;
- guchar frame_type;
- guint64 PTS;
- guint64 DTS;
-};
-
-struct _Mpeg1MuxBuffer {
- unsigned char *buffer;
- gulong length;
- gulong base;
- gulong scan_pos;
- gulong last_pos;
- gulong current_start;
- guchar buffer_type;
- guchar stream_id;
- gboolean new_frame;
- guint64 next_frame_time;
-
- union {
- Video_struc video;
- Audio_struc audio;
- } info;
-
- GList *timecode_list;
- GList *queued_list;
-};
-
-Mpeg1MuxBuffer *mpeg1mux_buffer_new(guchar type, guchar id);
-
-void mpeg1mux_buffer_queue(Mpeg1MuxBuffer *mb, GstBuffer *buf);
-void mpeg1mux_buffer_shrink(Mpeg1MuxBuffer *mb, gulong size);
-gulong mpeg1mux_buffer_update_queued(Mpeg1MuxBuffer *mb, guint64 scr);
+ typedef struct _Mpeg1MuxBuffer Mpeg1MuxBuffer;
+ typedef struct _Mpeg1MuxTimecode Mpeg1MuxTimecode;
+
+ typedef struct video_struc /* Informationen ueber Video Stream */
+ {
+ unsigned int stream_length;
+ unsigned int num_sequence;
+ unsigned int num_seq_end;
+ unsigned int num_pictures;
+ unsigned int num_groups;
+ unsigned int num_frames[4];
+ unsigned int avg_frames[4];
+
+ unsigned int horizontal_size;
+ unsigned int vertical_size;
+ unsigned int aspect_ratio;
+ unsigned int picture_rate;
+ unsigned int bit_rate;
+ unsigned int comp_bit_rate;
+ unsigned int vbv_buffer_size;
+ unsigned int CSPF;
+
+ guint64 PTS;
+ guint64 DTS;
+
+ guint64 current_PTS;
+ guint64 current_DTS;
+ guchar current_type;
+
+ double secs_per_frame;
+ gulong group_order, decoding_order;
+ } Video_struc;
+
+ typedef struct audio_struc /* Informationen ueber Audio Stream */
+ {
+ unsigned int stream_length;
+ unsigned int num_syncword;
+ unsigned int num_frames[2];
+ unsigned int framesize;
+ unsigned int layer;
+ unsigned int protection;
+ unsigned int bit_rate;
+ unsigned int frequency;
+ unsigned int mode;
+ unsigned int mode_extension;
+ unsigned int copyright;
+ unsigned int original_copy;
+ unsigned int emphasis;
+
+ guint64 PTS;
+
+ guint64 current_PTS;
+
+ double samples_per_second;
+ gulong decoding_order;
+ } Audio_struc;
+
+ struct _Mpeg1MuxTimecode
+ {
+ gulong length;
+ gulong original_length;
+ guchar frame_type;
+ guint64 PTS;
+ guint64 DTS;
+ };
+
+ struct _Mpeg1MuxBuffer
+ {
+ unsigned char *buffer;
+ gulong length;
+ gulong base;
+ gulong scan_pos;
+ gulong last_pos;
+ gulong current_start;
+ guchar buffer_type;
+ guchar stream_id;
+ gboolean new_frame;
+ guint64 next_frame_time;
+
+ union
+ {
+ Video_struc video;
+ Audio_struc audio;
+ } info;
+
+ GList *timecode_list;
+ GList *queued_list;
+ };
+
+ Mpeg1MuxBuffer *mpeg1mux_buffer_new (guchar type, guchar id);
+
+ void mpeg1mux_buffer_queue (Mpeg1MuxBuffer * mb, GstBuffer * buf);
+ void mpeg1mux_buffer_shrink (Mpeg1MuxBuffer * mb, gulong size);
+ gulong mpeg1mux_buffer_update_queued (Mpeg1MuxBuffer * mb, guint64 scr);
#ifdef __cplusplus
}
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-#endif /* __BUFFER_H__ */
+#endif /* __BUFFER_H__ */