2007-03-02 Tim-Philipp Müller <tim at centricular dot net>
+ * ext/dts/gstdtsdec.c: (gst_dtsdec_init), (gst_dtsdec_sink_event):
+ A few small clean-ups.
+
+ * gst/real/gstrealaudiodec.c: (gst_real_audio_dec_setcaps):
+ More debug output for failure cases.
+
+2007-03-02 Tim-Philipp Müller <tim at centricular dot net>
+
Patch by: Young-Ho Cha <ganadist at chollian net>
* ext/dts/gstdtsdec.c: (gst_dtsdec_handle_frame),
enum
{
- /* FILL ME */
- LAST_SIGNAL
-};
-
-enum
-{
ARG_0,
ARG_DRC
- /* FILL ME */
};
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
static void
gst_dtsdec_init (GstDtsDec * dtsdec, GstDtsDecClass * g_class)
{
- /* create the sink and src pads */
- dtsdec->sinkpad =
- gst_pad_new_from_template (gst_static_pad_template_get
- (&sink_factory), "sink");
- gst_pad_set_chain_function (dtsdec->sinkpad, gst_dtsdec_chain);
+ dtsdec->sinkpad = gst_pad_new_from_static_template (&sink_factory, "sink");
+ gst_pad_set_chain_function (dtsdec->sinkpad,
+ GST_DEBUG_FUNCPTR (gst_dtsdec_chain));
gst_pad_set_event_function (dtsdec->sinkpad,
GST_DEBUG_FUNCPTR (gst_dtsdec_sink_event));
gst_element_add_pad (GST_ELEMENT (dtsdec), dtsdec->sinkpad);
- dtsdec->srcpad =
- gst_pad_new_from_template (gst_static_pad_template_get
- (&src_factory), "src");
+ dtsdec->srcpad = gst_pad_new_from_static_template (&src_factory, "src");
gst_pad_use_fixed_caps (dtsdec->srcpad);
gst_element_add_pad (GST_ELEMENT (dtsdec), dtsdec->srcpad);
GstDtsDec *dtsdec = GST_DTSDEC (gst_pad_get_parent (pad));
gboolean ret = FALSE;
- GST_LOG ("Handling event of type %d timestamp %llu", GST_EVENT_TYPE (event),
- GST_EVENT_TIMESTAMP (event));
+ GST_LOG_OBJECT (dtsdec, "%s event", GST_EVENT_TYPE_NAME (event));
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_NEWSEGMENT:{
ret = gst_pad_event_default (pad, event);
break;
}
- case GST_EVENT_TAG:
- case GST_EVENT_EOS:{
- ret = gst_pad_event_default (pad, event);
- break;
- }
- case GST_EVENT_FLUSH_START:
- ret = gst_pad_event_default (pad, event);
- break;
case GST_EVENT_FLUSH_STOP:
if (dtsdec->cache) {
gst_buffer_unref (dtsdec->cache);
if (funcs.SetDLLAccessPath)
funcs.SetDLLAccessPath (DEFAULT_PATH);
- if ((res = funcs.RAOpenCodec2 (&context, NULL)))
+ if ((res = funcs.RAOpenCodec2 (&context, NULL))) {
+ GST_DEBUG_OBJECT (dec, "RAOpenCodec2() failed");
goto could_not_initialize;
+ }
data.samplerate = rate;
data.width = width;
data.datalen = buf ? GST_BUFFER_SIZE (buf) : 0;
data.data = buf ? GST_BUFFER_DATA (buf) : NULL;
- if ((res = funcs.RAInitDecoder (context, &data)))
+ if ((res = funcs.RAInitDecoder (context, &data))) {
+ GST_DEBUG_OBJECT (dec, "RAInitDecoder() failed");
goto could_not_initialize;
+ }
- if (funcs.RASetPwd)
+ if (funcs.RASetPwd) {
funcs.RASetPwd (dec->context, dec->pwd ? dec->pwd : DEFAULT_PWD);
+ }
- res = funcs.RASetFlavor (context, flavor);
- if (res)
+ if ((res = funcs.RASetFlavor (context, flavor))) {
+ GST_DEBUG_OBJECT (dec, "RASetFlavor(%d) failed", flavor);
goto could_not_initialize;
+ }
caps = gst_caps_new_simple ("audio/x-raw-int",
"endianness", G_TYPE_INT, G_BYTE_ORDER,