mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-04 05:22:30 +00:00
ext/: remove explicit newmedia support from oggmux and vorbisenc add debug category to vorbisenc
Original commit message from CVS: 2004-09-22 Zaheer Abbas Merali <zaheerabbas at merali dot org> * ext/ogg/gstoggmux.c: (gst_ogg_mux_init), (gst_ogg_mux_next_buffer), (gst_ogg_mux_loop): * ext/vorbis/vorbis.c: (plugin_init): * ext/vorbis/vorbisenc.c: (gst_vorbisenc_init), (gst_vorbisenc_chain): * ext/vorbis/vorbisenc.h: remove explicit newmedia support from oggmux and vorbisenc add debug category to vorbisenc * gst/multifilesink/gstmultifilesink.c: (gst_multifilesink_class_init), (gst_multifilesink_init), (gst_multifilesink_dispose), (gst_multifilesink_set_location), (gst_multifilesink_set_property), (gst_multifilesink_next_file), (gst_multifilesink_handle_event), (gst_multifilesink_chain), (plugin_init): * gst/multifilesink/gstmultifilesink.h: add support for streamheader in multifilesink
This commit is contained in:
parent
07b9b8ac0b
commit
fa3ce15bbc
5 changed files with 34 additions and 30 deletions
19
ChangeLog
19
ChangeLog
|
@ -1,3 +1,22 @@
|
|||
2004-09-22 Zaheer Abbas Merali <zaheerabbas at merali dot org>
|
||||
|
||||
* ext/ogg/gstoggmux.c: (gst_ogg_mux_init),
|
||||
(gst_ogg_mux_next_buffer), (gst_ogg_mux_loop):
|
||||
* ext/vorbis/vorbis.c: (plugin_init):
|
||||
* ext/vorbis/vorbisenc.c: (gst_vorbisenc_init),
|
||||
(gst_vorbisenc_chain):
|
||||
* ext/vorbis/vorbisenc.h:
|
||||
remove explicit newmedia support from oggmux and vorbisenc
|
||||
add debug category to vorbisenc
|
||||
* gst/multifilesink/gstmultifilesink.c:
|
||||
(gst_multifilesink_class_init), (gst_multifilesink_init),
|
||||
(gst_multifilesink_dispose), (gst_multifilesink_set_location),
|
||||
(gst_multifilesink_set_property), (gst_multifilesink_next_file),
|
||||
(gst_multifilesink_handle_event), (gst_multifilesink_chain),
|
||||
(plugin_init):
|
||||
* gst/multifilesink/gstmultifilesink.h:
|
||||
add support for streamheader in multifilesink
|
||||
|
||||
2004-09-22 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||
|
||||
* gst/asfdemux/gstasfdemux.c: (_read_var_length), (_read_guid),
|
||||
|
|
|
@ -100,7 +100,7 @@ struct _GstOggMux
|
|||
GstOggPad *delta_pad; /* when a delta frame is detected on a stream, we mark
|
||||
pages as delta frames up to the page that has the
|
||||
keyframe */
|
||||
guint16 newmediacount;
|
||||
|
||||
};
|
||||
|
||||
typedef enum
|
||||
|
@ -270,7 +270,7 @@ gst_ogg_mux_init (GstOggMux * ogg_mux)
|
|||
ogg_mux->max_page_delay = DEFAULT_MAX_PAGE_DELAY;
|
||||
|
||||
ogg_mux->delta_pad = NULL;
|
||||
ogg_mux->newmediacount = 0;
|
||||
|
||||
gst_element_set_loop_function (GST_ELEMENT (ogg_mux), gst_ogg_mux_loop);
|
||||
}
|
||||
|
||||
|
@ -429,19 +429,11 @@ gst_ogg_mux_next_buffer (GstOggPad * pad)
|
|||
return NULL;
|
||||
case GST_EVENT_DISCONTINUOUS:
|
||||
{
|
||||
gint64 value = 0;
|
||||
guint64 value;
|
||||
|
||||
if (GST_EVENT_DISCONT_NEW_MEDIA (event)) {
|
||||
/* only handle if its not first new media event */
|
||||
if (ogg_mux->newmediacount++ > 0) {
|
||||
ogg_mux->next_ts = 0;
|
||||
ogg_mux->offset = 0;
|
||||
ogg_mux->pulling = NULL;
|
||||
pad->offset = 0;
|
||||
GST_DEBUG_OBJECT (ogg_mux, "received new media event");
|
||||
gst_pad_event_default (pad->pad, event);
|
||||
break;
|
||||
}
|
||||
gst_pad_event_default (pad->pad, event);
|
||||
break;
|
||||
}
|
||||
if (gst_event_discont_get_value (event, GST_FORMAT_TIME, &value)) {
|
||||
GST_DEBUG_OBJECT (ogg_mux,
|
||||
|
@ -450,8 +442,9 @@ gst_ogg_mux_next_buffer (GstOggPad * pad)
|
|||
}
|
||||
pad->offset = value;
|
||||
gst_event_unref (event);
|
||||
break;
|
||||
|
||||
}
|
||||
break;
|
||||
default:
|
||||
gst_pad_event_default (pad->pad, event);
|
||||
break;
|
||||
|
@ -856,6 +849,7 @@ gst_ogg_mux_loop (GstElement * element)
|
|||
|
||||
best = gst_ogg_mux_queue_pads (ogg_mux);
|
||||
|
||||
|
||||
/* we're pulling a pad and there is a better one, see if we need
|
||||
* to flush the current page */
|
||||
if (ogg_mux->pulling && best &&
|
||||
|
@ -896,6 +890,7 @@ gst_ogg_mux_loop (GstElement * element)
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (ogg_mux->need_headers) {
|
||||
gst_ogg_mux_send_headers (ogg_mux);
|
||||
ogg_mux->need_headers = FALSE;
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "vorbisdec.h"
|
||||
#include "vorbisparse.h"
|
||||
|
||||
GST_DEBUG_CATEGORY (vorbisenc_debug);
|
||||
GST_DEBUG_CATEGORY (vorbisdec_debug);
|
||||
GST_DEBUG_CATEGORY (vorbisparse_debug);
|
||||
|
||||
|
@ -54,6 +55,8 @@ plugin_init (GstPlugin * plugin)
|
|||
gst_vorbis_parse_get_type ()))
|
||||
return FALSE;
|
||||
|
||||
GST_DEBUG_CATEGORY_INIT (vorbisenc_debug, "vorbisenc", 0,
|
||||
"vorbis encoding element");
|
||||
GST_DEBUG_CATEGORY_INIT (vorbisdec_debug, "vorbisdec", 0,
|
||||
"vorbis decoding element");
|
||||
GST_DEBUG_CATEGORY_INIT (vorbisparse_debug, "vorbisparse", 0,
|
||||
|
|
|
@ -30,6 +30,9 @@
|
|||
#include <gst/tag/tag.h>
|
||||
#include "vorbisenc.h"
|
||||
|
||||
GST_DEBUG_CATEGORY_EXTERN (vorbisenc_debug);
|
||||
#define GST_CAT_DEFAULT vorbisenc_debug
|
||||
|
||||
static GstPadTemplate *gst_vorbisenc_src_template, *gst_vorbisenc_sink_template;
|
||||
|
||||
/* elementfactory information */
|
||||
|
@ -473,7 +476,6 @@ gst_vorbisenc_init (VorbisEnc * vorbisenc)
|
|||
vorbisenc->eos = FALSE;
|
||||
vorbisenc->header_sent = FALSE;
|
||||
|
||||
vorbisenc->newmediacount = 0;
|
||||
vorbisenc->tags = gst_tag_list_new ();
|
||||
|
||||
/* we're chained and we can deal with events */
|
||||
|
@ -809,20 +811,6 @@ gst_vorbisenc_chain (GstPad * pad, GstData * _data)
|
|||
}
|
||||
gst_pad_event_default (pad, event);
|
||||
return;
|
||||
case GST_EVENT_DISCONTINUOUS:
|
||||
if (GST_EVENT_DISCONT_NEW_MEDIA (event)) {
|
||||
/* only do for new media events after the first one */
|
||||
if (vorbisenc->newmediacount++ > 0) {
|
||||
vorbisenc->setup = FALSE;
|
||||
vorbisenc->header_sent = FALSE;
|
||||
gst_tag_list_free (vorbisenc->tags);
|
||||
vorbisenc->tags = gst_tag_list_new ();
|
||||
vorbisenc->eos = FALSE;
|
||||
gst_vorbisenc_setup (vorbisenc);
|
||||
}
|
||||
gst_pad_event_default (pad, event);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
gst_pad_event_default (pad, event);
|
||||
return;
|
||||
|
|
|
@ -77,7 +77,6 @@ struct _VorbisEnc {
|
|||
gboolean setup;
|
||||
gboolean header_sent;
|
||||
gchar *last_message;
|
||||
guint16 newmediacount;
|
||||
};
|
||||
|
||||
struct _VorbisEncClass {
|
||||
|
|
Loading…
Reference in a new issue