};
const gchar *media_type;
gboolean audio_only;
- gboolean is_webm = FALSE;
guint64 master, child;
GSList *collected;
int i;
g_snprintf (s_id, sizeof (s_id), "matroskamux-%08x", g_random_int ());
gst_pad_push_event (mux->srcpad, gst_event_new_stream_start (s_id));
- /* Are we muxing a WebM stream? */
- if (!strcmp (mux->doctype, GST_MATROSKA_DOCTYPE_WEBM)) {
- is_webm = TRUE;
- }
/* output caps */
audio_only = mux->num_v_streams == 0 && mux->num_a_streams > 0;
- if (is_webm) {
+ if (mux->is_webm) {
media_type = (audio_only) ? "audio/webm" : "video/webm";
} else {
media_type = (audio_only) ? "audio/x-matroska" : "video/x-matroska";
master = gst_ebml_write_master_start (ebml, GST_MATROSKA_ID_SEGMENTINFO);
/* WebM does not support SegmentUID field on SegmentInfo */
- if (!is_webm) {
+ if (!mux->is_webm) {
for (i = 0; i < 4; i++) {
segment_uid[i] = g_random_int ();
}
/* GstForceKeyUnit event */
GstEvent *force_key_unit_event;
+
+ /* Flag to ease handling of WebM specifics */
+ gboolean is_webm;
} GstMatroskaMux;
typedef struct _GstMatroskaMuxClass {