Commit 80bfa16c authored by Mathieu Duponchelle's avatar Mathieu Duponchelle 🐸 Committed by Mathieu Duponchelle

mpegtsmux: add an ATSC subclass

parent 98c98c7c
/* ATSC Transport Stream muxer
* Copyright (C) 2019 Mathieu Duponchelle <mathieu@centricular.com>
*
* atscmux.c:
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#include "atscmux.h"
GST_DEBUG_CATEGORY (atscmux_debug);
#define GST_CAT_DEFAULT atscmux_debug
G_DEFINE_TYPE (ATSCMux, atscmux, GST_TYPE_MPEG_TSMUX)
static void atscmux_class_init (ATSCMuxClass * klass)
{
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);
GST_DEBUG_CATEGORY_INIT (atscmux_debug, "atscmux", 0, "ATSC muxer");
gst_element_class_set_static_metadata (gstelement_class,
"ATSC Transport Stream Muxer", "Codec/Muxer",
"Multiplexes media streams into an ATSC-compliant Transport Stream",
"Mathieu Duponchelle <mathieu@centricular.com>");
}
static void
atscmux_init (ATSCMux * mux)
{
}
/* ATSC Transport Stream muxer
* Copyright (C) 2019 Mathieu Duponchelle <mathieu@centricular.com>
*
* atscmux.h:
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef __ATSCMUX_H__
#define __ATSCMUX_H__
#include "mpegtsmux.h"
G_BEGIN_DECLS
#define GST_TYPE_ATSCMUX (atscmux_get_type())
typedef struct ATSCMux ATSCMux;
typedef struct ATSCMuxClass ATSCMuxClass;
struct ATSCMux {
MpegTsMux parent;
};
struct ATSCMuxClass {
MpegTsMuxClass parent_class;
};
GType atscmux_get_type (void);
G_END_DECLS
#endif /* __ATSCMUX_H__ */
tsmux_sources = [
'mpegtsmuxplugin.c',
'mpegtsmux.c',
'atscmux.c',
'mpegtsmux_aac.c',
'mpegtsmux_opus.c',
'mpegtsmux_ttxt.c',
'mpegtsmux_jpeg2000.c',
'tsmux/tsmux.c',
'tsmux/tsmuxstream.c',
'tsmux/tsmuxstream.c'
]
gstmpegtsmux = library('gstmpegtsmux',
......
......@@ -82,9 +82,6 @@
*
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h>
#include <string.h>
......@@ -247,6 +244,9 @@ mpegtsmux_class_init (MpegTsMuxClass * klass)
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GST_DEBUG_CATEGORY_INIT (mpegtsmux_debug, "mpegtsmux", 0,
"MPEG Transport Stream muxer");
gst_element_class_add_static_pad_template (gstelement_class,
&mpegtsmux_sink_factory);
gst_element_class_add_static_pad_template (gstelement_class,
......@@ -2063,21 +2063,3 @@ mpegtsmux_send_event (GstElement * element, GstEvent * event)
return FALSE;
}
static gboolean
plugin_init (GstPlugin * plugin)
{
gst_mpegts_initialize ();
if (!gst_element_register (plugin, "mpegtsmux", GST_RANK_PRIMARY,
mpegtsmux_get_type ()))
return FALSE;
GST_DEBUG_CATEGORY_INIT (mpegtsmux_debug, "mpegtsmux", 0,
"MPEG Transport Stream muxer");
return TRUE;
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR,
mpegtsmux, "MPEG-TS muxer",
plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "mpegtsmux.h"
#include "atscmux.h"
static gboolean
plugin_init (GstPlugin * plugin)
{
gst_mpegts_initialize ();
if (!gst_element_register (plugin, "mpegtsmux", GST_RANK_PRIMARY,
mpegtsmux_get_type ()))
return FALSE;
if (!gst_element_register (plugin, "atscmux", GST_RANK_PRIMARY,
atscmux_get_type ()))
return FALSE;
return TRUE;
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR,
mpegtsmux, "MPEG-TS muxer",
plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment