• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2006, 2007, 2008, 2009, 2010 Fluendo S.A.
3  *  Authors: Jan Schmidt <jan@fluendo.com>
4  *           Kapil Agrawal <kapil@fluendo.com>
5  *           Julien Moutte <julien@fluendo.com>
6  *
7  * This library is licensed under 3 different licenses and you
8  * can choose to use it under the terms of any one of them. The
9  * three licenses are the MPL 1.1, the LGPL and the MIT license.
10  *
11  * MPL:
12  *
13  * The contents of this file are subject to the Mozilla Public License
14  * Version 1.1 (the "License"); you may not use this file except in
15  * compliance with the License. You may obtain a copy of the License at
16  * http://www.mozilla.org/MPL/.
17  *
18  * Software distributed under the License is distributed on an "AS IS"
19  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
20  * License for the specific language governing rights and limitations
21  * under the License.
22  *
23  * LGPL:
24  *
25  * This library is free software; you can redistribute it and/or
26  * modify it under the terms of the GNU Library General Public
27  * License as published by the Free Software Foundation; either
28  * version 2 of the License, or (at your option) any later version.
29  *
30  * This library is distributed in the hope that it will be useful,
31  * but WITHOUT ANY WARRANTY; without even the implied warranty of
32  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
33  * Library General Public License for more details.
34  *
35  * You should have received a copy of the GNU Library General Public
36  * License along with this library; if not, write to the
37  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
38  * Boston, MA 02110-1301, USA.
39  *
40  * MIT:
41  *
42  * Unless otherwise indicated, Source Code is licensed under MIT license.
43  * See further explanation attached in License Statement (distributed in the file
44  * LICENSE).
45  *
46  * Permission is hereby granted, free of charge, to any person obtaining a copy of
47  * this software and associated documentation files (the "Software"), to deal in
48  * the Software without restriction, including without limitation the rights to
49  * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
50  * of the Software, and to permit persons to whom the Software is furnished to do
51  * so, subject to the following conditions:
52  *
53  * The above copyright notice and this permission notice shall be included in all
54  * copies or substantial portions of the Software.
55  *
56  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
57  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
58  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
59  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
60  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
61  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
62  * SOFTWARE.
63  *
64  * SPDX-License-Identifier: MPL-1.1 OR MIT OR LGPL-2.0-or-later
65  */
66 
67 #ifndef __MPEGTSMUX_H__
68 #define __MPEGTSMUX_H__
69 
70 #include <gst/gst.h>
71 #include <gst/base/gstcollectpads.h>
72 #include <gst/base/gstadapter.h>
73 
74 G_BEGIN_DECLS
75 
76 #include "gstbasetsmux.h"
77 
78 #define GST_TYPE_MPEG_TS_MUX  (gst_mpeg_ts_mux_get_type())
79 #define GST_MPEG_TS_MUX(obj)  (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_MPEG_TS_MUX, GstMpegTsMux))
80 #define GST_MPEG_TS_MUX_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),GST_TYPE_MPEG_TS_MUX,GstMpegTsMuxClass))
81 
82 typedef struct GstMpegTsMux GstMpegTsMux;
83 typedef struct GstMpegTsMuxClass GstMpegTsMuxClass;
84 typedef struct MpegTsPadData MpegTsPadData;
85 
86 struct GstMpegTsMux {
87   GstBaseTsMux parent;
88 
89   /* Properties */
90   gboolean m2ts_mode;
91 
92   /* m2ts specific */
93   gint64 previous_pcr;
94   gint64 previous_offset;
95   gint64 pcr_rate_num;
96   gint64 pcr_rate_den;
97   GstAdapter *adapter;
98 };
99 
100 struct GstMpegTsMuxClass {
101   GstBaseTsMuxClass parent_class;
102 };
103 
104 GType gst_mpeg_ts_mux_get_type (void);
105 GST_ELEMENT_REGISTER_DECLARE (mpegtsmux);
106 
107 G_END_DECLS
108 
109 #endif
110