"mute = (boolean) { FALSE, TRUE }; "
"audio/x-ac3, framed = (boolean) TRUE;"
"audio/x-dts, framed = (boolean) TRUE;"
- "subpicture/x-dvb;" "application/x-teletext"));
+ "subpicture/x-dvb; application/x-teletext; meta/x-klv, parsed=true"));
static GstStaticPadTemplate mpegtsmux_src_factory =
GST_STATIC_PAD_TEMPLATE ("src",
st = TSMUX_ST_PS_TELETEXT;
/* needs a particularly sized layout */
ts_data->prepare_func = mpegtsmux_prepare_teletext;
+ } else if (strcmp (mt, "meta/x-klv") == 0) {
+ st = TSMUX_ST_PS_KLV;
}
if (st != TSMUX_ST_RESERVED) {
if (G_UNLIKELY (best == NULL)) {
/* EOS */
+ GST_INFO_OBJECT (mux, "EOS");
/* drain some possibly cached data */
new_packet_m2ts (mux, NULL, -1);
mpegtsmux_push_packets (mux, TRUE);
GST_OBJECT_UNLOCK (mux);
#endif
}
+
+ if (best->stream->is_meta && gst_buffer_get_size (buf) > (G_MAXUINT16 - 3)) {
+ GST_WARNING_OBJECT (mux, "KLV meta unit too big, splitting not supported");
+ return GST_FLOW_OK;
+ }
+
GST_DEBUG_OBJECT (mux, "delta: %d", delta);
stream_data = stream_data_new (buf);
TSMUX_PACKET_FLAG_PES_DATA_ALIGNMENT;
break;
+ case TSMUX_ST_PS_KLV:
+ /* FIXME: assign sequential extended IDs? */
+ stream->id = 0xBD;
+ stream->stream_type = TSMUX_ST_PRIVATE_DATA;
+ stream->is_meta = TRUE;
+ stream->pi.flags |=
+ TSMUX_PACKET_FLAG_PES_FULL_HEADER |
+ TSMUX_PACKET_FLAG_PES_DATA_ALIGNMENT;
+ break;
default:
g_critical ("Stream type 0x%0x not yet implemented", stream_type);
break;
g_ptr_array_add (pmt_stream->descriptors, descriptor);
break;
}
+ if (stream->is_meta) {
+ descriptor = gst_mpegts_descriptor_from_registration ("KLVA", NULL, 0);
+ GST_ERROR ("adding KLVA registration descriptor!");
+ g_ptr_array_add (pmt_stream->descriptors, descriptor);
+ }
default:
break;
}
TSMUX_ST_PS_AUDIO_LPCM = 0x8b,
TSMUX_ST_PS_DVB_SUBPICTURE = 0x8c,
TSMUX_ST_PS_TELETEXT = 0x8d,
+ TSMUX_ST_PS_KLV = 0x8e, /* only used internally */
TSMUX_ST_PS_DVD_SUBPICTURE = 0xff,
/* Non-standard definitions */
gboolean is_dvb_sub;
gchar language[4];
+
+ gboolean is_meta;
};
/* stream management */