summaryrefslogtreecommitdiffstats
path: root/gst/mpeg1sys
diff options
context:
space:
mode:
authorJohan Dahlin <johan@gnome.org>2004-03-15 16:32:54 +0000
committerJohan Dahlin <johan@gnome.org>2004-03-15 16:32:54 +0000
commit39fd8a2dbd436cbabe5e336d1145b62c2a885ed5 (patch)
tree61df7da4a9d2b8bdb853af50a27219a8921bf5e4 /gst/mpeg1sys
parent1633bd8693c54cbc5f6648703a7ecf01548ec55f (diff)
downloadgst-plugins-bad-39fd8a2dbd436cbabe5e336d1145b62c2a885ed5.tar.gz
gst-plugins-bad-39fd8a2dbd436cbabe5e336d1145b62c2a885ed5.tar.bz2
gst-plugins-bad-39fd8a2dbd436cbabe5e336d1145b62c2a885ed5.zip
*.h: Revert indenting
Original commit message from CVS: * *.h: Revert indenting
Diffstat (limited to 'gst/mpeg1sys')
-rw-r--r--gst/mpeg1sys/buffer.h194
-rw-r--r--gst/mpeg1sys/gstmpeg1systemencode.h93
-rw-r--r--gst/mpeg1sys/main.h111
3 files changed, 192 insertions, 206 deletions
diff --git a/gst/mpeg1sys/buffer.h b/gst/mpeg1sys/buffer.h
index 2a9fb71f..0624c3aa 100644
--- a/gst/mpeg1sys/buffer.h
+++ b/gst/mpeg1sys/buffer.h
@@ -24,9 +24,8 @@
#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)
@@ -42,104 +41,101 @@ 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__ */
diff --git a/gst/mpeg1sys/gstmpeg1systemencode.h b/gst/mpeg1sys/gstmpeg1systemencode.h
index 0580cedc..44555332 100644
--- a/gst/mpeg1sys/gstmpeg1systemencode.h
+++ b/gst/mpeg1sys/gstmpeg1systemencode.h
@@ -29,9 +29,8 @@
#include "main.h"
#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
+extern "C" {
+#endif /* __cplusplus */
#define GST_TYPE_SYSTEM_ENCODE \
@@ -45,68 +44,66 @@ extern "C"
#define GST_IS_SYSTEM_ENCODE_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SYSTEM_ENCODE))
- typedef struct _GstMPEG1SystemEncode GstMPEG1SystemEncode;
- typedef struct _GstMPEG1SystemEncodeClass GstMPEG1SystemEncodeClass;
+typedef struct _GstMPEG1SystemEncode GstMPEG1SystemEncode;
+typedef struct _GstMPEG1SystemEncodeClass GstMPEG1SystemEncodeClass;
- struct _GstMPEG1SystemEncode
- {
- GstElement element;
+struct _GstMPEG1SystemEncode {
+ GstElement element;
- GstPad *srcpad;
+ GstPad *srcpad;
- gboolean have_setup;
+ gboolean have_setup;
- GMutex *lock;
+ GMutex *lock;
- guint num_audio_pads;
- guint num_video_pads;
+ guint num_audio_pads;
+ guint num_video_pads;
- Mpeg1MuxBuffer *audio_buffer;
- Mpeg1MuxBuffer *video_buffer;
+ Mpeg1MuxBuffer *audio_buffer;
+ Mpeg1MuxBuffer *video_buffer;
- Pack_struc *pack;
- Sys_header_struc *sys_header;
- Sector_struc *sector;
+ Pack_struc *pack;
+ Sys_header_struc *sys_header;
+ Sector_struc *sector;
- guint data_rate, video_rate, audio_rate;
- gdouble delay, audio_delay, video_delay;
- gdouble clock_cycles;
- gulong sectors_delay, video_delay_ms, audio_delay_ms;
- gulong startup_delay;
- gulong audio_buffer_size;
- gulong video_buffer_size;
- gulong mux_rate, dmux_rate;
- guint64 SCR;
- gint which_streams;
+ guint data_rate, video_rate, audio_rate;
+ gdouble delay, audio_delay, video_delay;
+ gdouble clock_cycles;
+ gulong sectors_delay, video_delay_ms, audio_delay_ms;
+ gulong startup_delay;
+ gulong audio_buffer_size;
+ gulong video_buffer_size;
+ gulong mux_rate, dmux_rate;
+ guint64 SCR;
+ gint which_streams;
- gint current_pack;
- gulong min_packet_data;
- gulong max_packet_data;
- gint packets_per_pack;
- gulong packet_size;
- gulong bytes_output;
+ gint current_pack;
+ gulong min_packet_data;
+ gulong max_packet_data;
+ gint packets_per_pack;
+ gulong packet_size;
+ gulong bytes_output;
- GList *mta;
+ GList *mta;
- /* stream input pads */
- GstPad *private_1_pad[8]; /* up to 8 ac3 audio tracks <grumble> */
- GstPad *private_2_pad;
- GstPad *video_pad[16];
- GstPad *audio_pad[32];
- };
+ /* stream input pads */
+ GstPad *private_1_pad[8]; /* up to 8 ac3 audio tracks <grumble> */
+ GstPad *private_2_pad;
+ GstPad *video_pad[16];
+ GstPad *audio_pad[32];
+};
- struct _GstMPEG1SystemEncodeClass
- {
- GstElementClass parent_class;
- };
+struct _GstMPEG1SystemEncodeClass {
+ GstElementClass parent_class;
+};
- GType gst_mpeg1_system_encode_get_type (void);
+GType gst_mpeg1_system_encode_get_type(void);
/* multplex.c */
#ifdef __cplusplus
}
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-#endif /* __SYSTEM_ENCODE_H__ */
+#endif /* __SYSTEM_ENCODE_H__ */
diff --git a/gst/mpeg1sys/main.h b/gst/mpeg1sys/main.h
index c09fc41b..434f57f5 100644
--- a/gst/mpeg1sys/main.h
+++ b/gst/mpeg1sys/main.h
@@ -45,82 +45,79 @@
#define ISO11172_END 0x000001b9
#define PACKET_START 0x000001
-#define CLOCKS 90000.0 /* System Clock Hertz */
+#define CLOCKS 90000.0 /* System Clock Hertz */
-#define AFTER_PACKET_LENGTH 15 /* No of non-data-bytes */
- /* following the packet */
- /* length field */
-#define LAST_SCR_BYTE_IN_PACK 9 /* No of bytes in pack */
- /* preceding, and */
- /* including, the SCR */
+#define AFTER_PACKET_LENGTH 15 /* No of non-data-bytes */
+ /* following the packet */
+ /* length field */
+#define LAST_SCR_BYTE_IN_PACK 9 /* No of bytes in pack */
+ /* preceding, and */
+ /* including, the SCR */
/* The following values for sys_header_length & size are only valid for */
/* System streams consisting of two basic streams. When wrapping around */
/* the system layer on a single video or a single audio stream, those */
/* values get decreased by 3. */
-#define SYS_HEADER_LENGTH 12 /* length of Sys Header */
- /* after start code and */
- /* length field */
+#define SYS_HEADER_LENGTH 12 /* length of Sys Header */
+ /* after start code and */
+ /* length field */
-#define SYS_HEADER_SIZE 18 /* incl. start code and */
- /* length field */
+#define SYS_HEADER_SIZE 18 /* incl. start code and */
+ /* length field */
#define PACK_HEADER_SIZE 12
#define PACKET_HEADER_SIZE 6
-#define MAX_SECTOR_SIZE 0x20000 /* Max Sektor Groesse */
+#define MAX_SECTOR_SIZE 0x20000 /* Max Sektor Groesse */
#define STREAMS_VIDEO 1
#define STREAMS_AUDIO 2
#define STREAMS_BOTH 3
-#define AUDIO_STREAMS 0xb8 /* Marker Audio Streams */
-#define VIDEO_STREAMS 0xb9 /* Marker Video Streams */
-#define AUDIO_STR_0 0xc0 /* Marker Audio Stream0 */
-#define VIDEO_STR_0 0xe0 /* Marker Video Stream0 */
-#define PADDING_STR 0xbe /* Marker Padding Stream */
+#define AUDIO_STREAMS 0xb8 /* Marker Audio Streams */
+#define VIDEO_STREAMS 0xb9 /* Marker Video Streams */
+#define AUDIO_STR_0 0xc0 /* Marker Audio Stream0 */
+#define VIDEO_STR_0 0xe0 /* Marker Video Stream0 */
+#define PADDING_STR 0xbe /* Marker Padding Stream*/
#define ZERO_STUFFING_BYTE 0
#define STUFFING_BYTE 0xff
#define RESERVED_BYTE 0xff
-#define TIMESTAMPS_NO 0 /* Flag NO timestamps */
-#define TIMESTAMPS_PTS 1 /* Flag PTS timestamp */
-#define TIMESTAMPS_PTS_DTS 2 /* Flag BOTH timestamps */
+#define TIMESTAMPS_NO 0 /* Flag NO timestamps */
+#define TIMESTAMPS_PTS 1 /* Flag PTS timestamp */
+#define TIMESTAMPS_PTS_DTS 2 /* Flag BOTH timestamps */
-#define MARKER_SCR 2 /* Marker SCR */
-#define MARKER_JUST_PTS 2 /* Marker only PTS */
-#define MARKER_PTS 3 /* Marker PTS */
-#define MARKER_DTS 1 /* Marker DTS */
-#define MARKER_NO_TIMESTAMPS 0x0f /* Marker NO timestamps */
+#define MARKER_SCR 2 /* Marker SCR */
+#define MARKER_JUST_PTS 2 /* Marker only PTS */
+#define MARKER_PTS 3 /* Marker PTS */
+#define MARKER_DTS 1 /* Marker DTS */
+#define MARKER_NO_TIMESTAMPS 0x0f /* Marker NO timestamps */
-#define STATUS_AUDIO_END 0 /* Statusmessage A end */
-#define STATUS_VIDEO_END 1 /* Statusmessage V end */
-#define STATUS_AUDIO_TIME_OUT 2 /* Statusmessage A out */
-#define STATUS_VIDEO_TIME_OUT 3 /* Statusmessage V out */
+#define STATUS_AUDIO_END 0 /* Statusmessage A end */
+#define STATUS_VIDEO_END 1 /* Statusmessage V end */
+#define STATUS_AUDIO_TIME_OUT 2 /* Statusmessage A out */
+#define STATUS_VIDEO_TIME_OUT 3 /* Statusmessage V out */
/*************************************************************************
Typ- und Strukturdefinitionen
*************************************************************************/
-typedef struct sector_struc /* A sector, can contain pack, sys header */
- /* and packet. */
-{
- unsigned char buf[MAX_SECTOR_SIZE];
- unsigned int length_of_sector;
- unsigned int length_of_packet_data;
- guint64 TS;
+typedef struct sector_struc /* A sector, can contain pack, sys header */
+ /* and packet. */
+{ unsigned char buf [MAX_SECTOR_SIZE] ;
+ unsigned int length_of_sector ;
+ unsigned int length_of_packet_data ;
+ guint64 TS ;
} Sector_struc;
-typedef struct pack_struc /* Pack Info */
-{
- unsigned char buf[PACK_HEADER_SIZE];
- guint64 SCR;
+typedef struct pack_struc /* Pack Info */
+{ unsigned char buf [PACK_HEADER_SIZE];
+ guint64 SCR;
} Pack_struc;
-typedef struct sys_header_struc /* System Header Info */
-{
- unsigned char buf[SYS_HEADER_SIZE];
+typedef struct sys_header_struc /* System Header Info */
+{ unsigned char buf [SYS_HEADER_SIZE];
} Sys_header_struc;
/*************************************************************************
@@ -128,20 +125,16 @@ typedef struct sys_header_struc /* System Header Info */
*************************************************************************/
/* systems.c */
-void create_sector (Sector_struc * sector, Pack_struc * pack,
- Sys_header_struc * sys_header, unsigned int packet_size,
- unsigned char *inputbuffer, unsigned char type, unsigned char buffer_scale,
- unsigned int buffer_size, unsigned char buffers, guint64 PTS, guint64 DTS,
- unsigned char timestamps, unsigned int which_streams);
-
-void create_pack (Pack_struc * pack, guint64 SCR, unsigned int mux_rate);
-
-void create_sys_header (Sys_header_struc * sys_header, unsigned int rate_bound,
- unsigned char audio_bound, unsigned char fixed, unsigned char CSPS,
- unsigned char audio_lock, unsigned char video_lock,
- unsigned char video_bound, unsigned char stream1,
- unsigned char buffer1_scale, unsigned int buffer1_size,
- unsigned char stream2, unsigned char buffer2_scale,
- unsigned int buffer2_size, unsigned int which_streams);
+void create_sector (Sector_struc *sector, Pack_struc *pack, Sys_header_struc *sys_header,
+ unsigned int packet_size, unsigned char *inputbuffer, unsigned char type, unsigned char buffer_scale,
+ unsigned int buffer_size, unsigned char buffers, guint64 PTS, guint64 DTS,
+ unsigned char timestamps, unsigned int which_streams);
+
+void create_pack (Pack_struc *pack, guint64 SCR, unsigned int mux_rate);
+
+void create_sys_header (Sys_header_struc *sys_header, unsigned int rate_bound, unsigned char audio_bound,
+ unsigned char fixed, unsigned char CSPS, unsigned char audio_lock, unsigned char video_lock,
+ unsigned char video_bound, unsigned char stream1, unsigned char buffer1_scale, unsigned int buffer1_size,
+ unsigned char stream2, unsigned char buffer2_scale, unsigned int buffer2_size, unsigned int which_streams);
#endif