mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 18:35:35 +00:00
mpegtsdemux: Revert indentation and comment header file.
One shouldn't run gst-indent on .h files, in this case it was un-beautifying the indentation :)
This commit is contained in:
parent
29d53b22f9
commit
5aa3358f3b
1 changed files with 97 additions and 92 deletions
|
@ -52,14 +52,18 @@
|
||||||
#include "gstsectionfilter.h"
|
#include "gstsectionfilter.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define MPEGTS_MIN_PES_BUFFER_SIZE 4 * 1024
|
#define MPEGTS_MIN_PES_BUFFER_SIZE 4 * 1024
|
||||||
#define MPEGTS_MAX_PES_BUFFER_SIZE 256 * 1024
|
#define MPEGTS_MAX_PES_BUFFER_SIZE 256 * 1024
|
||||||
|
|
||||||
#define MPEGTS_MAX_PID 0x1fff
|
#define MPEGTS_MAX_PID 0x1fff
|
||||||
#define MPEGTS_NORMAL_TS_PACKETSIZE 188
|
#define MPEGTS_NORMAL_TS_PACKETSIZE 188
|
||||||
#define MPEGTS_M2TS_TS_PACKETSIZE 192
|
#define MPEGTS_M2TS_TS_PACKETSIZE 192
|
||||||
|
|
||||||
#define IS_MPEGTS_SYNC(data) (((data)[0] == 0x47) && \
|
#define IS_MPEGTS_SYNC(data) (((data)[0] == 0x47) && \
|
||||||
(((data)[1] & 0x80) == 0x00) && \
|
(((data)[1] & 0x80) == 0x00) && \
|
||||||
(((data)[3] & 0x10) == 0x10))
|
(((data)[3] & 0x10) == 0x10))
|
||||||
|
|
||||||
#define GST_TYPE_MPEGTS_DEMUX (gst_mpegts_demux_get_type())
|
#define GST_TYPE_MPEGTS_DEMUX (gst_mpegts_demux_get_type())
|
||||||
#define GST_MPEGTS_DEMUX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),\
|
#define GST_MPEGTS_DEMUX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),\
|
||||||
GST_TYPE_MPEGTS_DEMUX,GstMpegTSDemux))
|
GST_TYPE_MPEGTS_DEMUX,GstMpegTSDemux))
|
||||||
|
@ -71,6 +75,7 @@ G_BEGIN_DECLS
|
||||||
GST_TYPE_MPEGTS_DEMUX))
|
GST_TYPE_MPEGTS_DEMUX))
|
||||||
#define GST_IS_MPEGTS_DEMUX_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),\
|
#define GST_IS_MPEGTS_DEMUX_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),\
|
||||||
GST_TYPE_MPEGTS_DEMUX))
|
GST_TYPE_MPEGTS_DEMUX))
|
||||||
|
|
||||||
typedef struct _GstMpegTSStream GstMpegTSStream;
|
typedef struct _GstMpegTSStream GstMpegTSStream;
|
||||||
typedef struct _GstMpegTSPMTEntry GstMpegTSPMTEntry;
|
typedef struct _GstMpegTSPMTEntry GstMpegTSPMTEntry;
|
||||||
typedef struct _GstMpegTSPMT GstMpegTSPMT;
|
typedef struct _GstMpegTSPMT GstMpegTSPMT;
|
||||||
|
@ -79,13 +84,11 @@ typedef struct _GstMpegTSPAT GstMpegTSPAT;
|
||||||
typedef struct _GstMpegTSDemux GstMpegTSDemux;
|
typedef struct _GstMpegTSDemux GstMpegTSDemux;
|
||||||
typedef struct _GstMpegTSDemuxClass GstMpegTSDemuxClass;
|
typedef struct _GstMpegTSDemuxClass GstMpegTSDemuxClass;
|
||||||
|
|
||||||
struct _GstMpegTSPMTEntry
|
struct _GstMpegTSPMTEntry {
|
||||||
{
|
|
||||||
guint16 PID;
|
guint16 PID;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstMpegTSPMT
|
struct _GstMpegTSPMT {
|
||||||
{
|
|
||||||
guint16 program_number;
|
guint16 program_number;
|
||||||
guint8 version_number;
|
guint8 version_number;
|
||||||
gboolean current_next_indicator;
|
gboolean current_next_indicator;
|
||||||
|
@ -98,14 +101,12 @@ struct _GstMpegTSPMT
|
||||||
GArray * entries;
|
GArray * entries;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstMpegTSPATEntry
|
struct _GstMpegTSPATEntry {
|
||||||
{
|
|
||||||
guint16 program_number;
|
guint16 program_number;
|
||||||
guint16 PID;
|
guint16 PID;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstMpegTSPAT
|
struct _GstMpegTSPAT {
|
||||||
{
|
|
||||||
guint16 transport_stream_id;
|
guint16 transport_stream_id;
|
||||||
guint8 version_number;
|
guint8 version_number;
|
||||||
gboolean current_next_indicator;
|
gboolean current_next_indicator;
|
||||||
|
@ -115,16 +116,14 @@ struct _GstMpegTSPAT
|
||||||
GArray * entries;
|
GArray * entries;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef enum _MpegTsStreamFlags
|
typedef enum _MpegTsStreamFlags {
|
||||||
{
|
|
||||||
MPEGTS_STREAM_FLAG_STREAM_TYPE_UNKNOWN = 0x01,
|
MPEGTS_STREAM_FLAG_STREAM_TYPE_UNKNOWN = 0x01,
|
||||||
MPEGTS_STREAM_FLAG_PMT_VALID = 0x02,
|
MPEGTS_STREAM_FLAG_PMT_VALID = 0x02,
|
||||||
MPEGTS_STREAM_FLAG_IS_VIDEO = 0x04
|
MPEGTS_STREAM_FLAG_IS_VIDEO = 0x04
|
||||||
} MpegTsStreamFlags;
|
} MpegTsStreamFlags;
|
||||||
|
|
||||||
/* Information associated to a single MPEG stream. */
|
/* Information associated to a single MPEG stream. */
|
||||||
struct _GstMpegTSStream
|
struct _GstMpegTSStream {
|
||||||
{
|
|
||||||
GstMpegTSDemux * demux;
|
GstMpegTSDemux * demux;
|
||||||
|
|
||||||
MpegTsStreamFlags flags;
|
MpegTsStreamFlags flags;
|
||||||
|
@ -171,8 +170,7 @@ struct _GstMpegTSStream
|
||||||
guint16 PMT_pid;
|
guint16 PMT_pid;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstMpegTSDemux
|
struct _GstMpegTSDemux {
|
||||||
{
|
|
||||||
GstElement parent;
|
GstElement parent;
|
||||||
|
|
||||||
/* properties */
|
/* properties */
|
||||||
|
@ -207,18 +205,24 @@ struct _GstMpegTSDemux
|
||||||
/* clocking */
|
/* clocking */
|
||||||
GstClock * clock;
|
GstClock * clock;
|
||||||
GstClockTime clock_base;
|
GstClockTime clock_base;
|
||||||
/* Additional information required for seeking */
|
|
||||||
|
/* Additional information required for seeking.
|
||||||
|
* num_packets: Number of packets outputted
|
||||||
|
* bitrate: estimated bitrate (based on pcr and num_packets */
|
||||||
guint64 num_packets;
|
guint64 num_packets;
|
||||||
gint64 bitrate;
|
gint64 bitrate;
|
||||||
|
|
||||||
/* Two PCRs observations to calculate bitrate */
|
/* Two PCRs observations to calculate bitrate */
|
||||||
gint64 pcr[2];
|
gint64 pcr[2];
|
||||||
|
|
||||||
|
/* Cached duration estimation */
|
||||||
GstClockTime cache_duration;
|
GstClockTime cache_duration;
|
||||||
|
|
||||||
/* Cached base_PCR in GStreamer time. */
|
/* Cached base_PCR in GStreamer time. */
|
||||||
GstClockTime base_pts;
|
GstClockTime base_pts;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstMpegTSDemuxClass
|
struct _GstMpegTSDemuxClass {
|
||||||
{
|
|
||||||
GstElementClass parent_class;
|
GstElementClass parent_class;
|
||||||
|
|
||||||
GstPadTemplate * sink_template;
|
GstPadTemplate * sink_template;
|
||||||
|
@ -232,4 +236,5 @@ GType gst_mpegts_demux_get_type (void);
|
||||||
gboolean gst_mpegts_demux_plugin_init (GstPlugin *plugin);
|
gboolean gst_mpegts_demux_plugin_init (GstPlugin *plugin);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_MPEGTS_DEMUX_H__ */
|
#endif /* __GST_MPEGTS_DEMUX_H__ */
|
||||||
|
|
Loading…
Reference in a new issue