summaryrefslogtreecommitdiff
path: root/gst/mpegtsdemux/mpegtspacketizer.h
diff options
context:
space:
mode:
authorEdward Hervey <edward@collabora.com>2013-07-05 17:11:46 +0200
committerEdward Hervey <edward@collabora.com>2013-09-28 13:15:43 +0200
commit5017ba84a75bfb0947264374ad6aff095569d25e (patch)
treee2a6df81b7d0fcfbf9f955ae9a9d5aef1c4d4bc8 /gst/mpegtsdemux/mpegtspacketizer.h
parent0bdf13c36ae61e150fe6c56d3c4a4e6ab3188ca2 (diff)
downloadgstreamer-plugins-bad-5017ba84a75bfb0947264374ad6aff095569d25e.tar.gz
mpegtspacketizer: No longer use a private struct
These are not public headers, it just adds complexity for no reason
Diffstat (limited to 'gst/mpegtsdemux/mpegtspacketizer.h')
-rw-r--r--gst/mpegtsdemux/mpegtspacketizer.h57
1 files changed, 55 insertions, 2 deletions
diff --git a/gst/mpegtsdemux/mpegtspacketizer.h b/gst/mpegtsdemux/mpegtspacketizer.h
index cb1edfdc9..f4743751d 100644
--- a/gst/mpegtsdemux/mpegtspacketizer.h
+++ b/gst/mpegtsdemux/mpegtspacketizer.h
@@ -65,7 +65,6 @@ G_BEGIN_DECLS
typedef struct _MpegTSPacketizer2 MpegTSPacketizer2;
typedef struct _MpegTSPacketizer2Class MpegTSPacketizer2Class;
-typedef struct _MpegTSPacketizerPrivate MpegTSPacketizerPrivate;
typedef struct
{
@@ -92,6 +91,43 @@ typedef struct
guint64 offset;
} MpegTSPacketizerStream;
+/* Maximum number of MpegTSPcr
+ * 256 should be sufficient for most multiplexes */
+#define MAX_PCR_OBS_CHANNELS 256
+
+typedef struct _MpegTSPCR
+{
+ guint16 pid;
+
+ /* Following variables are only active/used when
+ * calculate_skew is TRUE */
+ GstClockTime base_time;
+ GstClockTime base_pcrtime;
+ GstClockTime prev_out_time;
+ GstClockTime prev_in_time;
+ GstClockTime last_pcrtime;
+ gint64 window[MAX_WINDOW];
+ guint window_pos;
+ guint window_size;
+ gboolean window_filling;
+ gint64 window_min;
+ gint64 skew;
+ gint64 prev_send_diff;
+
+ /* Offset to apply to PCR to handle wraparounds */
+ guint64 pcroffset;
+
+ /* Used for bitrate calculation */
+ /* FIXME : Replace this later on with a balanced tree or sequence */
+ guint64 first_offset;
+ guint64 first_pcr;
+ GstClockTime first_pcr_ts;
+ guint64 last_offset;
+ guint64 last_pcr;
+ GstClockTime last_pcr_ts;
+
+} MpegTSPCR;
+
struct _MpegTSPacketizer2 {
GObject parent;
@@ -112,7 +148,24 @@ struct _MpegTSPacketizer2 {
/* offset/bitrate calculator */
gboolean calculate_offset;
- MpegTSPacketizerPrivate *priv;
+ /* Shortcuts for adapter usage */
+ guint8 *map_data;
+ gsize map_offset;
+ gsize map_size;
+ gboolean need_sync;
+
+ /* Reference offset */
+ guint64 refoffset;
+
+ guint nb_seen_offsets;
+
+ /* Last inputted timestamp */
+ GstClockTime last_in_time;
+
+ /* offset to observations table */
+ guint8 pcrtablelut[0x2000];
+ MpegTSPCR *observations[MAX_PCR_OBS_CHANNELS];
+ guint8 lastobsid;
};
struct _MpegTSPacketizer2Class {