From 8ef8daf4dbdbab23ff49757a6223c3a9bfba11d3 Mon Sep 17 00:00:00 2001 From: Vincent Genieux Date: Sun, 3 May 2009 17:21:22 +0100 Subject: mpegtsparse: make safe changing the program-numbers property dynamically Fixes #569437. --- gst/mpegdemux/mpegtsparse.c | 48 ++++++++++++++++++++++----------------------- gst/mpegdemux/mpegtsparse.h | 1 + 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/gst/mpegdemux/mpegtsparse.c b/gst/mpegdemux/mpegtsparse.c index 3a2d647d..de4de35f 100644 --- a/gst/mpegdemux/mpegtsparse.c +++ b/gst/mpegdemux/mpegtsparse.c @@ -266,9 +266,11 @@ mpegts_parse_init (MpegTSParse * parse, MpegTSParseClass * klass) gst_element_add_pad (GST_ELEMENT (parse), parse->sinkpad); parse->disposed = FALSE; + parse->need_sync_program_pads = FALSE; parse->packetizer = mpegts_packetizer_new (); parse->program_numbers = g_strdup (""); parse->pads_to_add = NULL; + parse->pads_to_remove = NULL; parse->programs = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, (GDestroyNotify) mpegts_parse_free_program); parse->psi_pids = g_hash_table_new (g_direct_hash, g_direct_equal); @@ -422,22 +424,30 @@ mpegts_parse_remove_program (MpegTSParse * parse, gint program_number) } static void -mpegts_parse_sync_program_pads (MpegTSParse * parse, - GList * to_add, GList * to_remove) +mpegts_parse_sync_program_pads (MpegTSParse * parse) { GList *walk; - for (walk = to_remove; walk; walk = walk->next) + GST_INFO_OBJECT (parse, "begin sync pads"); + for (walk = parse->pads_to_remove; walk; walk = walk->next) gst_element_remove_pad (GST_ELEMENT (parse), GST_PAD (walk->data)); - for (walk = to_add; walk; walk = walk->next) + for (walk = parse->pads_to_add; walk; walk = walk->next) gst_element_add_pad (GST_ELEMENT (parse), GST_PAD (walk->data)); - if (to_add) - g_list_free (to_add); + if (parse->pads_to_add) + g_list_free (parse->pads_to_add); + + if (parse->pads_to_remove) + g_list_free (parse->pads_to_remove); + + GST_OBJECT_LOCK (parse); + parse->pads_to_remove = NULL; + parse->pads_to_add = NULL; + parse->need_sync_program_pads = FALSE; + GST_OBJECT_UNLOCK (parse); - if (to_remove) - g_list_free (to_remove); + GST_INFO_OBJECT (parse, "end sync pads"); } @@ -493,9 +503,6 @@ static void mpegts_parse_reset_selected_programs (MpegTSParse * parse, gchar * program_numbers) { - GList *pads_to_add = NULL; - GList *pads_to_remove = NULL; - GST_OBJECT_LOCK (parse); if (parse->program_numbers) g_free (parse->program_numbers); @@ -526,13 +533,9 @@ mpegts_parse_reset_selected_programs (MpegTSParse * parse, g_hash_table_foreach (parse->programs, foreach_program_activate_or_deactivate, parse); - pads_to_add = parse->pads_to_add; - parse->pads_to_add = NULL; - pads_to_remove = parse->pads_to_remove; - parse->pads_to_remove = NULL; + if (parse->pads_to_remove || parse->pads_to_add) + parse->need_sync_program_pads = TRUE; GST_OBJECT_UNLOCK (parse); - - mpegts_parse_sync_program_pads (parse, pads_to_add, pads_to_remove); } static void @@ -850,8 +853,6 @@ mpegts_parse_apply_pat (MpegTSParse * parse, GstStructure * pat_info) guint pid; MpegTSParseProgram *program; gint i; - GList *pads_to_add = NULL; - GList *pads_to_remove = NULL; const GValue *programs; gchar *dbg; @@ -942,13 +943,9 @@ mpegts_parse_apply_pat (MpegTSParse * parse, GstStructure * pat_info) gst_structure_free (old_pat); } - pads_to_add = parse->pads_to_add; - parse->pads_to_add = NULL; - pads_to_remove = parse->pads_to_remove; - parse->pads_to_remove = NULL; GST_OBJECT_UNLOCK (parse); - mpegts_parse_sync_program_pads (parse, pads_to_add, pads_to_remove); + mpegts_parse_sync_program_pads (parse); } static void @@ -1226,6 +1223,9 @@ mpegts_parse_chain (GstPad * pad, GstBuffer * buf) mpegts_packetizer_clear_packet (parse->packetizer, &packet); } + if (parse->need_sync_program_pads) + mpegts_parse_sync_program_pads (parse); + gst_object_unref (parse); return res; } diff --git a/gst/mpegdemux/mpegtsparse.h b/gst/mpegdemux/mpegtsparse.h index 34a78634..d4dc5b1e 100644 --- a/gst/mpegdemux/mpegtsparse.h +++ b/gst/mpegdemux/mpegtsparse.h @@ -61,6 +61,7 @@ struct _MpegTSParse { MpegTSPacketizer *packetizer; GHashTable *psi_pids; gboolean disposed; + gboolean need_sync_program_pads; }; struct _MpegTSParseClass { -- cgit v1.2.1 From e41401e3174b80b2e2ce4febf99f15e766dfc5c6 Mon Sep 17 00:00:00 2001 From: Vincent Genieux Date: Sun, 3 May 2009 17:42:44 +0100 Subject: mpegtsparse: Ignore subtable extension when parsing PAT Fixes #569673. --- gst/mpegdemux/mpegtspacketizer.c | 19 ++++++++++++++++++- gst/mpegdemux/mpegtspacketizer.h | 2 ++ gst/mpegdemux/mpegtsparse.c | 7 +++---- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/gst/mpegdemux/mpegtspacketizer.c b/gst/mpegdemux/mpegtspacketizer.c index 1abbf1fe..b986fa60 100644 --- a/gst/mpegdemux/mpegtspacketizer.c +++ b/gst/mpegdemux/mpegtspacketizer.c @@ -241,7 +241,8 @@ mpegts_packetizer_parse_section_header (MpegTSPacketizer * packetizer, data = GST_BUFFER_DATA (section->buffer); section->table_id = *data++; - if ((data[0] & 0x80) == 0) + /* if table_id is 0 (pat) then ignore the subtable extension */ + if ((data[0] & 0x80) == 0 || section->table_id == 0) section->subtable_extension = 0; else section->subtable_extension = GST_READ_UINT16_BE (data + 2); @@ -1844,6 +1845,22 @@ mpegts_packetizer_clear (MpegTSPacketizer * packetizer) gst_adapter_clear (packetizer->adapter); } +void +mpegts_packetizer_remove_stream (MpegTSPacketizer * packetizer, gint16 pid) +{ + MpegTSPacketizerStream *stream = + (MpegTSPacketizerStream *) g_hash_table_lookup (packetizer->streams, + GINT_TO_POINTER ((gint) pid)); + if (stream) { + GST_INFO ("Removing stream for PID %d", pid); + + g_hash_table_remove (packetizer->streams, GINT_TO_POINTER ((gint) pid)); + + g_object_unref (stream->section_adapter); + g_free (stream); + } +} + MpegTSPacketizer * mpegts_packetizer_new () { diff --git a/gst/mpegdemux/mpegtspacketizer.h b/gst/mpegdemux/mpegtspacketizer.h index c54228af..97e15cf2 100644 --- a/gst/mpegdemux/mpegtspacketizer.h +++ b/gst/mpegdemux/mpegtspacketizer.h @@ -116,6 +116,8 @@ gboolean mpegts_packetizer_next_packet (MpegTSPacketizer *packetizer, MpegTSPacketizerPacket *packet); void mpegts_packetizer_clear_packet (MpegTSPacketizer *packetizer, MpegTSPacketizerPacket *packet); +void mpegts_packetizer_remove_stream(MpegTSPacketizer *packetizer, + gint16 pid); gboolean mpegts_packetizer_push_section (MpegTSPacketizer *packetzer, MpegTSPacketizerPacket *packet, MpegTSPacketizerSection *section); diff --git a/gst/mpegdemux/mpegtsparse.c b/gst/mpegdemux/mpegtsparse.c index de4de35f..614da36c 100644 --- a/gst/mpegdemux/mpegtsparse.c +++ b/gst/mpegdemux/mpegtsparse.c @@ -350,7 +350,7 @@ mpegts_parse_add_program (MpegTSParse * parse, program->pcr_pid = G_MAXUINT16; program->streams = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, (GDestroyNotify) mpegts_parse_free_stream); - program->patcount = 1; + program->patcount = 0; program->selected = 0; program->active = FALSE; @@ -890,14 +890,12 @@ mpegts_parse_apply_pat (MpegTSParse * parse, GstStructure * pat_info) g_hash_table_insert (parse->psi_pids, GINT_TO_POINTER ((gint) pid), GINT_TO_POINTER (1)); } - - program->patcount += 1; } else { g_hash_table_insert (parse->psi_pids, GINT_TO_POINTER ((gint) pid), GINT_TO_POINTER (1)); program = mpegts_parse_add_program (parse, program_number, pid); } - + program->patcount += 1; if (program->selected && !program->active) parse->pads_to_add = g_list_append (parse->pads_to_add, mpegts_parse_activate_program (parse, program)); @@ -938,6 +936,7 @@ mpegts_parse_apply_pat (MpegTSParse * parse, GstStructure * pat_info) mpegts_parse_remove_program (parse, program_number); g_hash_table_remove (parse->psi_pids, GINT_TO_POINTER ((gint) pid)); + mpegts_packetizer_remove_stream (parse->packetizer, pid); } gst_structure_free (old_pat); -- cgit v1.2.1 From 42d24ab5fbab1fc9cde6914445a1876a92413966 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 4 May 2009 12:30:26 +0200 Subject: faac: Implement preset interface --- ext/faac/gstfaac.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ext/faac/gstfaac.c b/ext/faac/gstfaac.c index 22484ffb..638e65b1 100644 --- a/ext/faac/gstfaac.c +++ b/ext/faac/gstfaac.c @@ -118,9 +118,17 @@ gst_faac_get_type (void) 0, (GInstanceInitFunc) gst_faac_init, }; + const GInterfaceInfo preset_interface_info = { + NULL, /* interface_init */ + NULL, /* interface_finalize */ + NULL /* interface_data */ + }; gst_faac_type = g_type_register_static (GST_TYPE_ELEMENT, "GstFaac", &gst_faac_info, 0); + + g_type_add_interface_static (gst_faac_type, GST_TYPE_PRESET, + &preset_interface_info); } return gst_faac_type; -- cgit v1.2.1 From 296caf466014e11e73a67e8ec27d32f6e78b0a9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 4 May 2009 12:31:58 +0200 Subject: xvid: Implement Preset interface --- ext/xvid/gstxvidenc.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ext/xvid/gstxvidenc.c b/ext/xvid/gstxvidenc.c index ea6d3aed..40b5be22 100644 --- a/ext/xvid/gstxvidenc.c +++ b/ext/xvid/gstxvidenc.c @@ -199,9 +199,17 @@ gst_xvidenc_get_type (void) 0, (GInstanceInitFunc) gst_xvidenc_init, }; + const GInterfaceInfo preset_interface_info = { + NULL, /* interface_init */ + NULL, /* interface_finalize */ + NULL /* interface_data */ + }; xvidenc_type = g_type_register_static (GST_TYPE_ELEMENT, "GstXvidEnc", &xvidenc_info, 0); + + g_type_add_interface_static (xvidenc_type, GST_TYPE_PRESET, + &preset_interface_info); } return xvidenc_type; } -- cgit v1.2.1 From e9e52d0a9d9fdafc3ee499a9151f8ffbc22752af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 4 May 2009 12:33:41 +0200 Subject: mpeg2enc: Implement Preset interface --- ext/mpeg2enc/gstmpeg2enc.cc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/ext/mpeg2enc/gstmpeg2enc.cc b/ext/mpeg2enc/gstmpeg2enc.cc index e96e8124..21be81fb 100644 --- a/ext/mpeg2enc/gstmpeg2enc.cc +++ b/ext/mpeg2enc/gstmpeg2enc.cc @@ -99,7 +99,21 @@ static void gst_mpeg2enc_get_property (GObject * object, static void gst_mpeg2enc_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); -GST_BOILERPLATE (GstMpeg2enc, gst_mpeg2enc, GstElement, GST_TYPE_ELEMENT); +static void +_do_init (GType object_type) +{ + const GInterfaceInfo preset_interface_info = { + NULL, /* interface_init */ + NULL, /* interface_finalize */ + NULL /* interface_data */ + }; + + g_type_add_interface_static (object_type, GST_TYPE_PRESET, + &preset_interface_info); +} + +GST_BOILERPLATE_FULL (GstMpeg2enc, gst_mpeg2enc, GstElement, GST_TYPE_ELEMENT, + _do_init); static void gst_mpeg2enc_base_init (gpointer klass) -- cgit v1.2.1 From c53e4b8efcd5bcf8589b9d98af37cf7331b6dd05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 4 May 2009 12:34:59 +0200 Subject: jp2kenc: Implement preset interface --- ext/jp2k/gstjasperenc.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/ext/jp2k/gstjasperenc.c b/ext/jp2k/gstjasperenc.c index 47818eb3..9e6e17c9 100644 --- a/ext/jp2k/gstjasperenc.c +++ b/ext/jp2k/gstjasperenc.c @@ -94,7 +94,21 @@ static GstFlowReturn gst_jasper_enc_chain (GstPad * pad, GstBuffer * buffer); typedef GstJasperEnc GstJp2kEnc; typedef GstJasperEncClass GstJp2kEncClass; -GST_BOILERPLATE (GstJp2kEnc, gst_jasper_enc, GstElement, GST_TYPE_ELEMENT); +static void +_do_init (GType object_type) +{ + const GInterfaceInfo preset_interface_info = { + NULL, /* interface_init */ + NULL, /* interface_finalize */ + NULL /* interface_data */ + }; + + g_type_add_interface_static (object_type, GST_TYPE_PRESET, + &preset_interface_info); +} + +GST_BOILERPLATE_FULL (GstJp2kEnc, gst_jasper_enc, GstElement, GST_TYPE_ELEMENT, + _do_init); static void gst_jasper_enc_base_init (gpointer g_class) -- cgit v1.2.1 From f3105eccd26d69ae022d1a9fc8c510339f8337f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 4 May 2009 12:36:17 +0200 Subject: dirac: Implement preset interface --- ext/dirac/gstdiracenc.cc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/ext/dirac/gstdiracenc.cc b/ext/dirac/gstdiracenc.cc index f3be8202..11372f89 100644 --- a/ext/dirac/gstdiracenc.cc +++ b/ext/dirac/gstdiracenc.cc @@ -148,7 +148,21 @@ GST_STATIC_PAD_TEMPLATE ("src", GST_STATIC_CAPS ("video/x-dirac") ); -GST_BOILERPLATE (GstDiracEnc, gst_dirac_enc, GstElement, GST_TYPE_ELEMENT); +static void +_do_init (GType object_type) +{ + const GInterfaceInfo preset_interface_info = { + NULL, /* interface_init */ + NULL, /* interface_finalize */ + NULL /* interface_data */ + }; + + g_type_add_interface_static (object_type, GST_TYPE_PRESET, + &preset_interface_info); +} + +GST_BOILERPLATE_FULL (GstDiracEnc, gst_dirac_enc, GstElement, GST_TYPE_ELEMENT, + _do_init); static void gst_dirac_enc_base_init (gpointer g_class) -- cgit v1.2.1 From 44f0d31ba385ee644a8bd64efc64679c2e92e7eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 4 May 2009 12:37:31 +0200 Subject: celt: Implement preset interface --- ext/celt/gstceltenc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ext/celt/gstceltenc.c b/ext/celt/gstceltenc.c index 11b57e55..58ed7571 100644 --- a/ext/celt/gstceltenc.c +++ b/ext/celt/gstceltenc.c @@ -106,9 +106,16 @@ static void gst_celt_enc_setup_interfaces (GType celtenc_type) { static const GInterfaceInfo tag_setter_info = { NULL, NULL, NULL }; + const GInterfaceInfo preset_interface_info = { + NULL, /* interface_init */ + NULL, /* interface_finalize */ + NULL /* interface_data */ + }; g_type_add_interface_static (celtenc_type, GST_TYPE_TAG_SETTER, &tag_setter_info); + g_type_add_interface_static (celtenc_type, GST_TYPE_PRESET, + &preset_interface_info); GST_DEBUG_CATEGORY_INIT (celtenc_debug, "celtenc", 0, "Celt encoder"); } -- cgit v1.2.1 From 179f5bb850d0df3841889d88e3ee7ee96cc914aa Mon Sep 17 00:00:00 2001 From: Zaheer Abbas Merali Date: Mon, 4 May 2009 22:09:05 +0100 Subject: mpegtsparse: Remember pids that are meant to be stream pids. Fixes #569781 --- gst/mpegdemux/mpegtsparse.c | 14 ++++++++++++++ gst/mpegdemux/mpegtsparse.h | 1 + 2 files changed, 15 insertions(+) diff --git a/gst/mpegdemux/mpegtsparse.c b/gst/mpegdemux/mpegtsparse.c index 614da36c..976935f2 100644 --- a/gst/mpegdemux/mpegtsparse.c +++ b/gst/mpegdemux/mpegtsparse.c @@ -274,6 +274,7 @@ mpegts_parse_init (MpegTSParse * parse, MpegTSParseClass * klass) parse->programs = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, (GDestroyNotify) mpegts_parse_free_program); parse->psi_pids = g_hash_table_new (g_direct_hash, g_direct_equal); + parse->pes_pids = g_hash_table_new (g_direct_hash, g_direct_equal); mpegts_parse_reset (parse); } @@ -303,6 +304,7 @@ mpegts_parse_finalize (GObject * object) } g_hash_table_destroy (parse->programs); g_hash_table_destroy (parse->psi_pids); + g_hash_table_destroy (parse->pes_pids); if (G_OBJECT_CLASS (parent_class)->finalize) G_OBJECT_CLASS (parent_class)->finalize (object); @@ -807,6 +809,10 @@ mpegts_parse_is_psi (MpegTSParse * parse, MpegTSPacketizerPacket * packet) if (g_hash_table_lookup (parse->psi_pids, GINT_TO_POINTER ((gint) packet->pid)) != NULL) retval = TRUE; + /* check is it is a pes pid */ + if (g_hash_table_lookup (parse->pes_pids, + GINT_TO_POINTER ((gint) packet->pid)) != NULL) + return FALSE; if (!retval) { if (packet->payload_unit_start_indicator) { table_id = *(packet->data); @@ -979,10 +985,13 @@ mpegts_parse_apply_pmt (MpegTSParse * parse, gst_structure_get_uint (stream, "pid", &pid); gst_structure_get_uint (stream, "stream-type", &stream_type); mpegts_parse_program_remove_stream (parse, program, (guint16) pid); + g_hash_table_remove (parse->pes_pids, GINT_TO_POINTER ((gint) pid)); } /* remove pcr stream */ mpegts_parse_program_remove_stream (parse, program, program->pcr_pid); + g_hash_table_remove (parse->pes_pids, + GINT_TO_POINTER ((gint) program->pcr_pid)); gst_structure_free (program->pmt_info); program->pmt_info = NULL; @@ -999,6 +1008,8 @@ mpegts_parse_apply_pmt (MpegTSParse * parse, program->pmt_pid = pmt_pid; program->pcr_pid = pcr_pid; mpegts_parse_program_add_stream (parse, program, (guint16) pcr_pid, -1); + g_hash_table_insert (parse->pes_pids, GINT_TO_POINTER ((gint) pcr_pid), + GINT_TO_POINTER (1)); for (i = 0; i < gst_value_list_get_size (new_streams); ++i) { value = gst_value_list_get_value (new_streams, i); @@ -1008,6 +1019,9 @@ mpegts_parse_apply_pmt (MpegTSParse * parse, gst_structure_get_uint (stream, "stream-type", &stream_type); mpegts_parse_program_add_stream (parse, program, (guint16) pid, (guint8) stream_type); + g_hash_table_insert (parse->pes_pids, GINT_TO_POINTER ((gint) pid), + GINT_TO_POINTER ((gint) 1)); + } GST_OBJECT_UNLOCK (parse); diff --git a/gst/mpegdemux/mpegtsparse.h b/gst/mpegdemux/mpegtsparse.h index d4dc5b1e..36466b81 100644 --- a/gst/mpegdemux/mpegtsparse.h +++ b/gst/mpegdemux/mpegtsparse.h @@ -60,6 +60,7 @@ struct _MpegTSParse { GstStructure *pat; MpegTSPacketizer *packetizer; GHashTable *psi_pids; + GHashTable *pes_pids; gboolean disposed; gboolean need_sync_program_pads; }; -- cgit v1.2.1 From 46139253bcb1ddc32fc8987c194c40d9c622e993 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 5 May 2009 16:48:37 +0200 Subject: rtpssrcdemux: drop unexpected RTCP packets We usually only get SR packets in our chain function but if an invalid packet contains the SR packet after the RR packet, we must not fail but simply ignore the malformed packet. Fixes #581375 --- gst/rtpmanager/gstrtpssrcdemux.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gst/rtpmanager/gstrtpssrcdemux.c b/gst/rtpmanager/gstrtpssrcdemux.c index 64394c45..b9a279c2 100644 --- a/gst/rtpmanager/gstrtpssrcdemux.c +++ b/gst/rtpmanager/gstrtpssrcdemux.c @@ -483,7 +483,7 @@ gst_rtp_ssrc_demux_rtcp_chain (GstPad * pad, GstBuffer * buf) NULL); break; default: - goto invalid_rtcp; + goto unexpected_rtcp; } GST_DEBUG_OBJECT (demux, "received RTCP of SSRC %08x", ssrc); @@ -511,6 +511,12 @@ invalid_rtcp: gst_buffer_unref (buf); return GST_FLOW_ERROR; } +unexpected_rtcp: + { + GST_DEBUG_OBJECT (demux, "dropping unexpected RTCP packet"); + gst_buffer_unref (buf); + return GST_FLOW_OK; + } create_failed: { GST_ELEMENT_ERROR (demux, STREAM, DECODE, (NULL), -- cgit v1.2.1 From 9542d9e2513c0d88a8de65c7585e0d81b7249dda Mon Sep 17 00:00:00 2001 From: Arnout Vandecappelle Date: Tue, 5 May 2009 16:54:39 +0200 Subject: mpeg4videoparse: don't leak the config data Clear the config data when going to READY or when disposed. Fixes #581427 --- gst/mpeg4videoparse/mpeg4videoparse.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gst/mpeg4videoparse/mpeg4videoparse.c b/gst/mpeg4videoparse/mpeg4videoparse.c index 1efa28be..e0e28d0c 100644 --- a/gst/mpeg4videoparse/mpeg4videoparse.c +++ b/gst/mpeg4videoparse/mpeg4videoparse.c @@ -726,6 +726,10 @@ gst_mpeg4vparse_cleanup (GstMpeg4VParse * parse) if (parse->adapter) { gst_adapter_clear (parse->adapter); } + if (parse->config != NULL) { + gst_buffer_unref (parse->config); + parse->config = NULL; + } parse->state = PARSE_NEED_START; parse->have_config = FALSE; @@ -760,6 +764,10 @@ gst_mpeg4vparse_dispose (GObject * object) g_object_unref (parse->adapter); parse->adapter = NULL; } + if (parse->config != NULL) { + gst_buffer_unref (parse->config); + parse->config = NULL; + } GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object)); } -- cgit v1.2.1 From 874549b5360ad897e11f809e929d62803a7b5f2f Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Tue, 5 May 2009 11:34:26 +0100 Subject: resindvd: Make the next/prev angle switching cycle at the ends When the current angle is 1 and prev_angle is requested, loop to the maximum angle and vice versa for next_angle --- ext/resindvd/resindvdsrc.c | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/ext/resindvd/resindvdsrc.c b/ext/resindvd/resindvdsrc.c index a2f31610..ab0fdef9 100644 --- a/ext/resindvd/resindvdsrc.c +++ b/ext/resindvd/resindvdsrc.c @@ -1172,6 +1172,7 @@ static RsnNavResult rsn_dvdsrc_do_command (resinDvdSrc * src, GstNavigationCommand command) { RsnNavResult result = RSN_NAV_RESULT_NONE; + gint new_angle = 0; switch (command) { case GST_NAVIGATION_COMMAND_DVD_MENU: @@ -1212,25 +1213,40 @@ rsn_dvdsrc_do_command (resinDvdSrc * src, GstNavigationCommand command) case GST_NAVIGATION_COMMAND_PREV_ANGLE:{ gint32 cur, agls; - if (dvdnav_get_angle_info (src->dvdnav, &cur, &agls) == DVDNAV_STATUS_OK - && cur > 0 - && dvdnav_angle_change (src->dvdnav, cur - 1) == DVDNAV_STATUS_OK) - GST_INFO_OBJECT (src, "Switched to angle %d", cur - 1); - /* Angle switches are seamless and involve no branching */ + if (dvdnav_get_angle_info (src->dvdnav, &cur, &agls) == DVDNAV_STATUS_OK) { + if (cur > 0 && + dvdnav_angle_change (src->dvdnav, cur - 1) == DVDNAV_STATUS_OK) { + new_angle = cur - 1; + } else if (cur == 1 && + dvdnav_angle_change (src->dvdnav, agls) == DVDNAV_STATUS_OK) { + new_angle = agls; + } + /* Angle switches are seamless and involve no branching */ + } break; } case GST_NAVIGATION_COMMAND_NEXT_ANGLE:{ gint32 cur, agls; - if (dvdnav_get_angle_info (src->dvdnav, &cur, &agls) == DVDNAV_STATUS_OK - && dvdnav_angle_change (src->dvdnav, cur + 1) == DVDNAV_STATUS_OK) - GST_INFO_OBJECT (src, "Switched to angle %d", cur + 1); - /* Angle switches are seamless and involve no branching */ + if (dvdnav_get_angle_info (src->dvdnav, &cur, &agls) == DVDNAV_STATUS_OK) { + if (cur < agls + && dvdnav_angle_change (src->dvdnav, cur + 1) == DVDNAV_STATUS_OK) { + new_angle = cur + 1; + } else if (cur == agls + && dvdnav_angle_change (src->dvdnav, 1) == DVDNAV_STATUS_OK) { + new_angle = 1; + } + /* Angle switches are seamless and involve no branching */ + } break; } default: break; } + if (new_angle) { + GST_INFO_OBJECT (src, "Switched to angle %d", new_angle); + } + return result; } -- cgit v1.2.1 From 491583b6482fd6287653b8c6fb49494dd44b4261 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Tue, 5 May 2009 13:14:47 +0100 Subject: resindvd: send angles-changed messages when appropriate When the current angle changes, or the number of available angles changes, send an angles-changed message to let the app know. --- ext/resindvd/resindvdsrc.c | 59 ++++++++++++++++++++++++++++++++++++++++++---- ext/resindvd/resindvdsrc.h | 3 +++ 2 files changed, 57 insertions(+), 5 deletions(-) diff --git a/ext/resindvd/resindvdsrc.c b/ext/resindvd/resindvdsrc.c index ab0fdef9..35cf8e15 100644 --- a/ext/resindvd/resindvdsrc.c +++ b/ext/resindvd/resindvdsrc.c @@ -391,6 +391,9 @@ rsn_dvdsrc_start (RsnBaseSrc * bsrc) src->active_button = -1; + src->angles_changed = FALSE; + src->n_angles = 0; + src->cur_spu_phys_stream = -1; src->cur_spu_forced_only = FALSE; memset (src->cur_clut, 0, sizeof (guint32) * 16); @@ -859,6 +862,7 @@ rsn_dvdsrc_step (resinDvdSrc * src, gboolean have_dvd_lock) break; case DVDNAV_CELL_CHANGE:{ dvdnav_cell_change_event_t *event = (dvdnav_cell_change_event_t *) data; + gint n_angles, cur; src->pgc_duration = MPEGTIME_TO_GSTTIME (event->pgc_length); /* event->cell_start has the wrong time - it doesn't handle @@ -874,6 +878,12 @@ rsn_dvdsrc_step (resinDvdSrc * src, gboolean have_dvd_lock) rsn_dvdsrc_prepare_streamsinfo_event (src); + if (dvdnav_get_angle_info (src->dvdnav, &cur, + &n_angles) == DVDNAV_STATUS_OK && src->n_angles != n_angles) { + src->angles_changed = TRUE; + src->n_angles = n_angles; + } + break; } case DVDNAV_SPU_CLUT_CHANGE: @@ -998,6 +1008,7 @@ rsn_dvdsrc_create (RsnPushSrc * psrc, GstBuffer ** outbuf) GstEvent *spu_select_event = NULL; GstEvent *audio_select_event = NULL; GstEvent *highlight_event = NULL; + GstMessage *angles_msg = NULL; *outbuf = NULL; @@ -1020,6 +1031,18 @@ rsn_dvdsrc_create (RsnPushSrc * psrc, GstBuffer ** outbuf) clut_event = src->clut_event; src->clut_event = NULL; + if (src->angles_changed) { + gint cur, agls; + if (dvdnav_get_angle_info (src->dvdnav, &cur, &agls) == DVDNAV_STATUS_OK) { + + angles_msg = + gst_navigation_message_new_angles_changed (GST_OBJECT_CAST (src), + cur, agls); + src->n_angles = agls; + } + src->angles_changed = FALSE; + } + g_mutex_unlock (src->dvd_lock); /* Push in-band events now that we've dropped the dvd_lock, before @@ -1089,6 +1112,10 @@ rsn_dvdsrc_create (RsnPushSrc * psrc, GstBuffer ** outbuf) gst_pad_push_event (GST_BASE_SRC_PAD (src), highlight_event); } + if (angles_msg) { + gst_element_post_message (GST_ELEMENT_CAST (src), angles_msg); + } + return ret; } @@ -1172,7 +1199,6 @@ static RsnNavResult rsn_dvdsrc_do_command (resinDvdSrc * src, GstNavigationCommand command) { RsnNavResult result = RSN_NAV_RESULT_NONE; - gint new_angle = 0; switch (command) { case GST_NAVIGATION_COMMAND_DVD_MENU: @@ -1213,6 +1239,7 @@ rsn_dvdsrc_do_command (resinDvdSrc * src, GstNavigationCommand command) case GST_NAVIGATION_COMMAND_PREV_ANGLE:{ gint32 cur, agls; + gint new_angle = 0; if (dvdnav_get_angle_info (src->dvdnav, &cur, &agls) == DVDNAV_STATUS_OK) { if (cur > 0 && dvdnav_angle_change (src->dvdnav, cur - 1) == DVDNAV_STATUS_OK) { @@ -1222,11 +1249,16 @@ rsn_dvdsrc_do_command (resinDvdSrc * src, GstNavigationCommand command) new_angle = agls; } /* Angle switches are seamless and involve no branching */ + if (new_angle) { + src->angles_changed = TRUE; + GST_INFO_OBJECT (src, "Switched to angle %d", new_angle); + } } break; } case GST_NAVIGATION_COMMAND_NEXT_ANGLE:{ gint32 cur, agls; + gint new_angle = 0; if (dvdnav_get_angle_info (src->dvdnav, &cur, &agls) == DVDNAV_STATUS_OK) { if (cur < agls && dvdnav_angle_change (src->dvdnav, cur + 1) == DVDNAV_STATUS_OK) { @@ -1236,6 +1268,10 @@ rsn_dvdsrc_do_command (resinDvdSrc * src, GstNavigationCommand command) new_angle = 1; } /* Angle switches are seamless and involve no branching */ + if (new_angle) { + src->angles_changed = TRUE; + GST_INFO_OBJECT (src, "Switched to angle %d", new_angle); + } } break; } @@ -1243,10 +1279,6 @@ rsn_dvdsrc_do_command (resinDvdSrc * src, GstNavigationCommand command) break; } - if (new_angle) { - GST_INFO_OBJECT (src, "Switched to angle %d", new_angle); - } - return result; } @@ -1258,6 +1290,7 @@ rsn_dvdsrc_handle_navigation_event (resinDvdSrc * src, GstEvent * event) RsnNavResult nav_res = RSN_NAV_RESULT_NONE; GstNavigationEventType etype = gst_navigation_event_get_type (event); GstMessage *mouse_over_msg = NULL; + GstMessage *angles_msg = NULL; switch (etype) { case GST_NAVIGATION_EVENT_KEY_PRESS:{ @@ -1438,6 +1471,18 @@ rsn_dvdsrc_handle_navigation_event (resinDvdSrc * src, GstEvent * event) hl_event = src->highlight_event; src->highlight_event = NULL; + if (src->angles_changed) { + gint cur, agls; + if (dvdnav_get_angle_info (src->dvdnav, &cur, &agls) == DVDNAV_STATUS_OK) { + + angles_msg = + gst_navigation_message_new_angles_changed (GST_OBJECT_CAST (src), + cur, agls); + src->n_angles = agls; + } + src->angles_changed = FALSE; + } + g_mutex_unlock (src->dvd_lock); if (hl_event) { @@ -1451,6 +1496,10 @@ rsn_dvdsrc_handle_navigation_event (resinDvdSrc * src, GstEvent * event) gst_element_post_message (GST_ELEMENT_CAST (src), mouse_over_msg); } + if (angles_msg) { + gst_element_post_message (GST_ELEMENT_CAST (src), angles_msg); + } + return TRUE; not_running: if (have_lock) diff --git a/ext/resindvd/resindvdsrc.h b/ext/resindvd/resindvdsrc.h index 61fa5d19..bfcb7497 100644 --- a/ext/resindvd/resindvdsrc.h +++ b/ext/resindvd/resindvdsrc.h @@ -114,6 +114,8 @@ struct _resinDvdSrc GstEvent *audio_select_event; GstEvent *highlight_event; + gboolean angles_changed; + /* GList of NAV packets awaiting activation, and the * running times to activate them. */ GSList *pending_nav_blocks; @@ -129,6 +131,7 @@ struct _resinDvdSrc gint8 cur_spu_phys_stream; gboolean cur_spu_forced_only; guint32 cur_clut[16]; + gint n_angles; }; struct _resinDvdSrcClass -- cgit v1.2.1 From f7fad4a88b56dd74b14070886c8e86bb14942b20 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Tue, 5 May 2009 13:18:20 +0100 Subject: resindvd: Don't send highlight-reset messages when not needed Fix a small bug that results in the SPU highlight being reset more often than is necessary - ie, clearing it when it's already cleared. --- ext/resindvd/resindvdsrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/resindvd/resindvdsrc.c b/ext/resindvd/resindvdsrc.c index 35cf8e15..389b9016 100644 --- a/ext/resindvd/resindvdsrc.c +++ b/ext/resindvd/resindvdsrc.c @@ -1798,7 +1798,7 @@ rsn_dvdsrc_update_highlight (resinDvdSrc * src) if (button == 0) { /* No highlight available, or no button selected - clear the SPU */ - if (src->active_button < 1) { + if (src->active_button != 0) { src->active_button = 0; s = gst_structure_new ("application/x-gst-dvd", "event", -- cgit v1.2.1 From a5fbb123cab57358325b9cd94d2e8de50361f0c1 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Wed, 6 May 2009 21:19:13 +0100 Subject: resindvd: Send a title tag when we change chapter/menu/angle Allow apps like Totem to display a nicer title that reflects the current position on the disc. --- ext/resindvd/resindvdsrc.c | 78 ++++++++++++++++++++++++++++++++++++++++++---- ext/resindvd/resindvdsrc.h | 4 +++ 2 files changed, 76 insertions(+), 6 deletions(-) diff --git a/ext/resindvd/resindvdsrc.c b/ext/resindvd/resindvdsrc.c index 389b9016..ba800efe 100644 --- a/ext/resindvd/resindvdsrc.c +++ b/ext/resindvd/resindvdsrc.c @@ -374,6 +374,8 @@ rsn_dvdsrc_start (RsnBaseSrc * bsrc) } } + dvdnav_get_title_string (src->dvdnav, &src->disc_name); + src->first_seek = TRUE; src->running = TRUE; src->branching = FALSE; @@ -388,6 +390,8 @@ rsn_dvdsrc_start (RsnBaseSrc * bsrc) src->vts_n = 0; src->in_menu = FALSE; + src->title_n = -1; + src->part_n = -1; src->active_button = -1; @@ -519,6 +523,8 @@ rsn_dvdsrc_stop (RsnBaseSrc * bsrc) src->highlight_event = NULL; } + src->disc_name = NULL; + if (src->dvdnav) { if (dvdnav_close (src->dvdnav) != DVDNAV_STATUS_OK) { GST_ELEMENT_ERROR (src, RESOURCE, CLOSE, (NULL), @@ -725,6 +731,71 @@ get_current_pgc (resinDvdSrc * src) return pgc; } +static void +update_title_info (resinDvdSrc * src) +{ + gint n_angles, cur_agl; + gint title_n, part_n; + + if (dvdnav_get_angle_info (src->dvdnav, &cur_agl, + &n_angles) == DVDNAV_STATUS_OK && src->n_angles != n_angles) { + src->angles_changed = TRUE; + src->n_angles = n_angles; + } + + if (dvdnav_current_title_info (src->dvdnav, &title_n, + &part_n) == DVDNAV_STATUS_OK) { + if (title_n != src->title_n || part_n != src->part_n || src->angles_changed) { + gchar *title_str = NULL; + + src->title_n = title_n; + src->part_n = part_n; + + if (title_n == 0) { + static const char *dvd_menu_map[] = { + NULL, NULL, "Title", "Root", + "Subpicture", "Audio", "Angle", "Part" + }; + + /* In a menu */ + if (part_n >= 0 && part_n < G_N_ELEMENTS (dvd_menu_map) + && dvd_menu_map[part_n]) { + title_str = g_strdup_printf ("DVD %s Menu", dvd_menu_map[part_n]); + } else { + title_str = g_strdup ("DVD Menu"); + } + } else { + /* In a title */ + if (n_angles > 1) { + title_str = g_strdup_printf ("Title %i, Chapter %i, Angle %i of %i", + title_n, part_n, cur_agl, n_angles); + + } else { + title_str = g_strdup_printf ("Title %i, Chapter %i", title_n, part_n); + } + } + + if (src->disc_name && src->disc_name[0]) { + /* We have a name for this disc, publish it */ + if (title_str) { + gchar *new_title_str = + g_strdup_printf ("%s, %s", title_str, src->disc_name); + g_free (title_str); + title_str = new_title_str; + } else { + title_str = g_strdup (src->disc_name); + } + } + if (title_str) { + GstTagList *tags = gst_tag_list_new (); + gst_tag_list_add (tags, GST_TAG_MERGE_REPLACE, GST_TAG_TITLE, + title_str, NULL); + gst_element_found_tags (GST_ELEMENT_CAST (src), tags); + } + } + } +} + static GstFlowReturn rsn_dvdsrc_step (resinDvdSrc * src, gboolean have_dvd_lock) { @@ -862,7 +933,6 @@ rsn_dvdsrc_step (resinDvdSrc * src, gboolean have_dvd_lock) break; case DVDNAV_CELL_CHANGE:{ dvdnav_cell_change_event_t *event = (dvdnav_cell_change_event_t *) data; - gint n_angles, cur; src->pgc_duration = MPEGTIME_TO_GSTTIME (event->pgc_length); /* event->cell_start has the wrong time - it doesn't handle @@ -878,11 +948,7 @@ rsn_dvdsrc_step (resinDvdSrc * src, gboolean have_dvd_lock) rsn_dvdsrc_prepare_streamsinfo_event (src); - if (dvdnav_get_angle_info (src->dvdnav, &cur, - &n_angles) == DVDNAV_STATUS_OK && src->n_angles != n_angles) { - src->angles_changed = TRUE; - src->n_angles = n_angles; - } + update_title_info (src); break; } diff --git a/ext/resindvd/resindvdsrc.h b/ext/resindvd/resindvdsrc.h index bfcb7497..f55b454f 100644 --- a/ext/resindvd/resindvdsrc.h +++ b/ext/resindvd/resindvdsrc.h @@ -58,6 +58,8 @@ struct _resinDvdSrc gchar *device; dvdnav_t *dvdnav; + const char *disc_name; + /* dvd_reader instance is used to load and cache VTS/VMG ifo info */ dvd_reader_t *dvdread; @@ -72,6 +74,8 @@ struct _resinDvdSrc /* Current playback location: VTS 0 = VMG, plus in_menu or not */ gint vts_n; gboolean in_menu; + gint title_n; /* Title num */ + gint part_n; /* Part num */ gboolean running; gboolean discont; -- cgit v1.2.1 From 77aefd58709b2151b59430f944eec80f18201b7f Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Wed, 6 May 2009 21:48:30 +0100 Subject: resindvd: Don't open all VTS ifo at the start Load each VTS ifo the first time the disc enters that VTS, rather than scanning them all at the start. --- ext/resindvd/resindvdsrc.c | 53 +++++++++++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 20 deletions(-) diff --git a/ext/resindvd/resindvdsrc.c b/ext/resindvd/resindvdsrc.c index ba800efe..54a39be1 100644 --- a/ext/resindvd/resindvdsrc.c +++ b/ext/resindvd/resindvdsrc.c @@ -421,7 +421,6 @@ fail: static gboolean read_vts_info (resinDvdSrc * src) { - gint i; gint n_vts; if (src->vts_attrs) { @@ -450,28 +449,48 @@ read_vts_info (resinDvdSrc * src) return FALSE; g_array_set_size (src->vts_attrs, n_vts + 1); - for (i = 1; i <= n_vts; i++) { - ifo_handle_t *ifo = ifoOpen (src->dvdread, i); + return TRUE; +} + +static vtsi_mat_t * +get_vts_attr (resinDvdSrc * src, gint n) +{ + vtsi_mat_t *vts_attr; + + if (src->vts_attrs == NULL || n >= src->vts_attrs->len) { + if (src->vts_attrs) + GST_ERROR_OBJECT (src, "No stream info for VTS %d (have %d)", n, + src->vts_attrs->len); + else + GST_ERROR_OBJECT (src, "No stream info"); + return NULL; + } + + vts_attr = &g_array_index (src->vts_attrs, vtsi_mat_t, src->vts_n); + + /* Check if we have read this VTS ifo yet */ + if (vts_attr->vtsm_vobs == 0) { + ifo_handle_t *ifo = ifoOpen (src->dvdread, n); if (!ifo) { - GST_ERROR ("Can't open VTS %d", i); - return FALSE; + GST_ERROR ("Can't open VTS %d", n); + return NULL; } GST_DEBUG ("VTS %d, Menu has %d audio %d subpictures. " - "Title has %d and %d", i, + "Title has %d and %d", n, ifo->vtsi_mat->nr_of_vtsm_audio_streams, ifo->vtsi_mat->nr_of_vtsm_subp_streams, ifo->vtsi_mat->nr_of_vts_audio_streams, ifo->vtsi_mat->nr_of_vts_subp_streams); - memcpy (&g_array_index (src->vts_attrs, vtsi_mat_t, i), + memcpy (&g_array_index (src->vts_attrs, vtsi_mat_t, n), ifo->vtsi_mat, sizeof (vtsi_mat_t)); ifoClose (ifo); - } + }; - return TRUE; + return vts_attr; } static gboolean @@ -1646,15 +1665,6 @@ rsn_dvdsrc_prepare_streamsinfo_event (resinDvdSrc * src) gboolean have_audio; gboolean have_subp; - if (src->vts_attrs == NULL || src->vts_n >= src->vts_attrs->len) { - if (src->vts_attrs) - GST_ERROR_OBJECT (src, "No stream info for VTS %d (have %d)", src->vts_n, - src->vts_attrs->len); - else - GST_ERROR_OBJECT (src, "No stream info"); - return FALSE; - } - if (src->vts_n == 0) { /* VMGM info */ vts_attr = NULL; @@ -1665,7 +1675,7 @@ rsn_dvdsrc_prepare_streamsinfo_event (resinDvdSrc * src) n_subp = MIN (1, src->vmgm_attr.nr_of_vmgm_subp_streams); } else if (src->in_menu) { /* VTSM attrs */ - vts_attr = &g_array_index (src->vts_attrs, vtsi_mat_t, src->vts_n); + vts_attr = get_vts_attr (src, src->vts_n); v_attr = &vts_attr->vtsm_video_attr; a_attrs = &vts_attr->vtsm_audio_attr; n_audio = vts_attr->nr_of_vtsm_audio_streams; @@ -1673,7 +1683,7 @@ rsn_dvdsrc_prepare_streamsinfo_event (resinDvdSrc * src) n_subp = vts_attr->nr_of_vtsm_subp_streams; } else { /* VTS domain */ - vts_attr = &g_array_index (src->vts_attrs, vtsi_mat_t, src->vts_n); + vts_attr = get_vts_attr (src, src->vts_n); v_attr = &vts_attr->vts_video_attr; a_attrs = vts_attr->vts_audio_attr; n_audio = vts_attr->nr_of_vts_audio_streams; @@ -1681,6 +1691,9 @@ rsn_dvdsrc_prepare_streamsinfo_event (resinDvdSrc * src) n_subp = vts_attr->nr_of_vts_subp_streams; } + if (src->vts_n > 0 && vts_attr == NULL) + return FALSE; + GST_DEBUG_OBJECT (src, "Preparing streamsinfo for %d audio and " "%d subpicture streams", n_audio, n_subp); -- cgit v1.2.1 From 165ccb04e71162f5e3fda0ee6d0135ec91e26622 Mon Sep 17 00:00:00 2001 From: Rov Juvano Date: Thu, 7 May 2009 13:12:34 +0200 Subject: scaletempo: Don't require gconfaudiosink in the demo Fixes bug #537700. --- tests/examples/scaletempo/demo-player.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/examples/scaletempo/demo-player.c b/tests/examples/scaletempo/demo-player.c index 3ed4b718..0adf0e1f 100644 --- a/tests/examples/scaletempo/demo-player.c +++ b/tests/examples/scaletempo/demo-player.c @@ -194,7 +194,7 @@ demo_player_build_pipeline (DemoPlayer * player) priv->pipeline = playbin; priv->scaletempo_line = audioline; - MAKE_ELEMENT (NULL, priv->scalerate_line, "gconfaudiosink", + MAKE_ELEMENT (NULL, priv->scalerate_line, audiosink_name, "scaling_audio_sink"); gst_pad_add_event_probe (gst_element_get_static_pad (priv->scalerate_line, "sink"), G_CALLBACK (demo_player_event_listener), player); -- cgit v1.2.1 From ab77d5092bc1362548758e7f6ab7f817aa9ad846 Mon Sep 17 00:00:00 2001 From: Christian Schaller Date: Thu, 7 May 2009 17:34:36 +0100 Subject: Update spec file --- gst-plugins-bad.spec.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst-plugins-bad.spec.in b/gst-plugins-bad.spec.in index 8992e518..e02a163e 100644 --- a/gst-plugins-bad.spec.in +++ b/gst-plugins-bad.spec.in @@ -126,7 +126,7 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/gstreamer-%{majorminor}/libgstrtpmux.so %{_libdir}/gstreamer-%{majorminor}/libgstsiren.so %{_libdir}/gstreamer-%{majorminor}/libgstxdgmime.so -%{_libdir}/gstreamer-%{majorminor}/libgstfpsdisplaysink.so +%{_libdir}/gstreamer-%{majorminor}/libgstdebugutilsbad.so %{_includedir}/gstreamer-%{majorminor}/gst/interfaces/photography-enumtypes.h %{_includedir}/gstreamer-%{majorminor}/gst/interfaces/photography.h %{_libdir}/libgstphotography-0.10.so @@ -134,6 +134,7 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/libgstphotography-%{majorminor}.so.0 %{_libdir}/libgstphotography-%{majorminor}.so.0.0.0 %{_datadir}/gstreamer-%{majorminor}/presets/GstX264Enc.prs +%{_datadir}/gstreamer-%{majorminor}/presets/GstFAAC.prs # gstreamer-plugins with external dependencies but in the main package @USE_FAAD_TRUE@%{_libdir}/gstreamer-%{majorminor}/libgstfaad.so @USE_FAAC_TRUE@%{_libdir}/gstreamer-%{majorminor}/libgstfaac.so -- cgit v1.2.1 From 67dd3c11f47f1afd3508e3b45a3023ce9612fe67 Mon Sep 17 00:00:00 2001 From: Christian Schaller Date: Thu, 7 May 2009 17:53:42 +0100 Subject: Add ranks to various muxers and encoders in -bad --- ext/faac/gstfaac.c | 3 ++- ext/mpeg2enc/gstmpeg2enc.cc | 2 +- ext/x264/gstx264enc.c | 2 +- gst/flv/gstflvdemux.c | 2 +- gst/mxf/mxf.c | 3 ++- gst/qtmux/gstqtmux.c | 2 +- 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ext/faac/gstfaac.c b/ext/faac/gstfaac.c index 638e65b1..0dc8a42a 100644 --- a/ext/faac/gstfaac.c +++ b/ext/faac/gstfaac.c @@ -806,7 +806,8 @@ gst_faac_change_state (GstElement * element, GstStateChange transition) static gboolean plugin_init (GstPlugin * plugin) { - return gst_element_register (plugin, "faac", GST_RANK_NONE, GST_TYPE_FAAC); + return gst_element_register (plugin, "faac", GST_RANK_SECONDARY, + GST_TYPE_FAAC); } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, diff --git a/ext/mpeg2enc/gstmpeg2enc.cc b/ext/mpeg2enc/gstmpeg2enc.cc index 21be81fb..64008b16 100644 --- a/ext/mpeg2enc/gstmpeg2enc.cc +++ b/ext/mpeg2enc/gstmpeg2enc.cc @@ -717,7 +717,7 @@ plugin_init (GstPlugin * plugin) mjpeg_default_handler_verbosity (0); return gst_element_register (plugin, "mpeg2enc", - GST_RANK_NONE, GST_TYPE_MPEG2ENC); + GST_RANK_SECONDARY, GST_TYPE_MPEG2ENC); } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, diff --git a/ext/x264/gstx264enc.c b/ext/x264/gstx264enc.c index 37f53cce..fcafdd3d 100644 --- a/ext/x264/gstx264enc.c +++ b/ext/x264/gstx264enc.c @@ -1303,7 +1303,7 @@ plugin_init (GstPlugin * plugin) "h264 encoding element"); return gst_element_register (plugin, "x264enc", - GST_RANK_NONE, GST_TYPE_X264_ENC); + GST_RANK_PRIMARY, GST_TYPE_X264_ENC); } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, diff --git a/gst/flv/gstflvdemux.c b/gst/flv/gstflvdemux.c index f31a22e8..5856e7ac 100644 --- a/gst/flv/gstflvdemux.c +++ b/gst/flv/gstflvdemux.c @@ -1311,7 +1311,7 @@ plugin_init (GstPlugin * plugin) if (!gst_element_register (plugin, "flvdemux", GST_RANK_PRIMARY, gst_flv_demux_get_type ()) || - !gst_element_register (plugin, "flvmux", GST_RANK_NONE, + !gst_element_register (plugin, "flvmux", GST_RANK_PRIMARY, gst_flv_mux_get_type ())) return FALSE; diff --git a/gst/mxf/mxf.c b/gst/mxf/mxf.c index c1a0a716..7469317c 100644 --- a/gst/mxf/mxf.c +++ b/gst/mxf/mxf.c @@ -71,7 +71,8 @@ plugin_init (GstPlugin * plugin) if (!gst_element_register (plugin, "mxfdemux", GST_RANK_PRIMARY, GST_TYPE_MXF_DEMUX) || - !gst_element_register (plugin, "mxfmux", GST_RANK_NONE, GST_TYPE_MXF_MUX)) + !gst_element_register (plugin, "mxfmux", GST_RANK_PRIMARY, + GST_TYPE_MXF_MUX)) return FALSE; return TRUE; diff --git a/gst/qtmux/gstqtmux.c b/gst/qtmux/gstqtmux.c index f3e85f5c..b0df9d71 100644 --- a/gst/qtmux/gstqtmux.c +++ b/gst/qtmux/gstqtmux.c @@ -1886,7 +1886,7 @@ gst_qt_mux_register (GstPlugin * plugin) g_type_set_qdata (type, GST_QT_MUX_PARAMS_QDATA, (gpointer) params); g_type_add_interface_static (type, GST_TYPE_TAG_SETTER, &tag_setter_info); - if (!gst_element_register (plugin, prop->name, GST_RANK_NONE, type)) + if (!gst_element_register (plugin, prop->name, GST_RANK_PRIMARY, type)) return FALSE; i++; -- cgit v1.2.1 From 8c57211bd29c7dc620892eefd3dacb06842d2df2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 8 May 2009 15:39:24 +0200 Subject: deinterlace2: Add a disabled mode for passthrough operation Also allow to change the mode in PAUSED and PLAYING by updating the caps if necessary. --- gst/deinterlace2/gstdeinterlace2.c | 30 +++++++++++++++++++----------- gst/deinterlace2/gstdeinterlace2.h | 3 ++- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/gst/deinterlace2/gstdeinterlace2.c b/gst/deinterlace2/gstdeinterlace2.c index b293b43e..42a69240 100644 --- a/gst/deinterlace2/gstdeinterlace2.c +++ b/gst/deinterlace2/gstdeinterlace2.c @@ -350,6 +350,7 @@ gst_deinterlace2_modes_get_type (void) static const GEnumValue modes_types[] = { {GST_DEINTERLACE2_MODE_AUTO, "Auto detection", "auto"}, {GST_DEINTERLACE2_MODE_INTERLACED, "Enfore deinterlacing", "interlaced"}, + {GST_DEINTERLACE2_MODE_DISABLED, "Run in passthrough mode", "disabled"}, {0, NULL, NULL}, }; @@ -729,14 +730,17 @@ gst_deinterlace2_set_property (GObject * object, guint prop_id, self = GST_DEINTERLACE2 (object); switch (prop_id) { - case PROP_MODE: - if (GST_STATE (self) >= GST_STATE_PAUSED) { - g_warning ("Setting the 'mode' property is only allowed in " - "states other than PAUSED and PLAYING"); - } else { - self->mode = g_value_get_enum (value); - } + case PROP_MODE:{ + gint oldmode; + + GST_OBJECT_LOCK (self); + oldmode = self->mode; + self->mode = g_value_get_enum (value); + if (self->mode != oldmode && GST_PAD_CAPS (self->srcpad)) + gst_deinterlace2_setcaps (self->sinkpad, GST_PAD_CAPS (self->sinkpad)); + GST_OBJECT_UNLOCK (self); break; + } case PROP_METHOD: gst_deinterlace2_set_method (self, g_value_get_enum (value)); break; @@ -925,7 +929,8 @@ gst_deinterlace2_chain (GstPad * pad, GstBuffer * buf) self = GST_DEINTERLACE2 (GST_PAD_PARENT (pad)); - if (!self->interlaced && self->mode != GST_DEINTERLACE2_MODE_INTERLACED) + if (self->mode == GST_DEINTERLACE2_MODE_DISABLED || (!self->interlaced + && self->mode != GST_DEINTERLACE2_MODE_INTERLACED)) return gst_pad_push (self->srcpad, buf); if (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DISCONT)) { @@ -1133,7 +1138,8 @@ gst_deinterlace2_getcaps (GstPad * pad) GST_OBJECT_UNLOCK (self); if ((self->interlaced || self->mode == GST_DEINTERLACE2_MODE_INTERLACED) && - self->fields == GST_DEINTERLACE2_ALL) { + self->fields == GST_DEINTERLACE2_ALL + && self->mode != GST_DEINTERLACE2_MODE_DISABLED) { for (len = gst_caps_get_size (ret); len > 0; len--) { GstStructure *s = gst_caps_get_structure (ret, len - 1); const GValue *val; @@ -1269,7 +1275,8 @@ gst_deinterlace2_setcaps (GstPad * pad, GstCaps * caps) goto invalid_caps; if ((self->interlaced || self->mode == GST_DEINTERLACE2_MODE_INTERLACED) && - self->fields == GST_DEINTERLACE2_ALL) { + self->fields == GST_DEINTERLACE2_ALL + && self->mode != GST_DEINTERLACE2_MODE_DISABLED) { gint fps_n = self->frame_rate_n, fps_d = self->frame_rate_d; if (!gst_fraction_double (&fps_n, &fps_d, otherpad != self->srcpad)) @@ -1418,7 +1425,8 @@ gst_deinterlace2_src_query (GstPad * pad, GstQuery * query) switch (GST_QUERY_TYPE (query)) { case GST_QUERY_LATENCY: - if (self->interlaced || self->mode == GST_DEINTERLACE2_MODE_INTERLACED) { + if ((self->interlaced || self->mode == GST_DEINTERLACE2_MODE_INTERLACED) + && self->mode != GST_DEINTERLACE2_MODE_DISABLED) { GstClockTime min, max; gboolean live; GstPad *peer; diff --git a/gst/deinterlace2/gstdeinterlace2.h b/gst/deinterlace2/gstdeinterlace2.h index de63f54e..7a08d411 100644 --- a/gst/deinterlace2/gstdeinterlace2.h +++ b/gst/deinterlace2/gstdeinterlace2.h @@ -189,7 +189,8 @@ typedef enum typedef enum { GST_DEINTERLACE2_MODE_AUTO, - GST_DEINTERLACE2_MODE_INTERLACED + GST_DEINTERLACE2_MODE_INTERLACED, + GST_DEINTERLACE2_MODE_DISABLED } GstDeinterlace2Mode; struct _GstDeinterlace2 -- cgit v1.2.1 From e8504019d88878bc6b40b270319d3db03edf4e81 Mon Sep 17 00:00:00 2001 From: Christian Schaller Date: Fri, 8 May 2009 16:38:26 +0100 Subject: Comment out preset not in yet --- gst-plugins-bad.spec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst-plugins-bad.spec.in b/gst-plugins-bad.spec.in index e02a163e..94efad25 100644 --- a/gst-plugins-bad.spec.in +++ b/gst-plugins-bad.spec.in @@ -134,7 +134,7 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/libgstphotography-%{majorminor}.so.0 %{_libdir}/libgstphotography-%{majorminor}.so.0.0.0 %{_datadir}/gstreamer-%{majorminor}/presets/GstX264Enc.prs -%{_datadir}/gstreamer-%{majorminor}/presets/GstFAAC.prs +# %{_datadir}/gstreamer-%{majorminor}/presets/GstFAAC.prs # gstreamer-plugins with external dependencies but in the main package @USE_FAAD_TRUE@%{_libdir}/gstreamer-%{majorminor}/libgstfaad.so @USE_FAAC_TRUE@%{_libdir}/gstreamer-%{majorminor}/libgstfaac.so -- cgit v1.2.1 From ff7b54e7da95a401665f8d7ae922155a32edac91 Mon Sep 17 00:00:00 2001 From: Zaheer Merali Date: Fri, 8 May 2009 18:24:28 +0100 Subject: mpegtsdemux: Add initial naive seeking support and fix duration query. Sync from gst-fluendo-mpegdemux and have seeking/duration query improvements in. No support however for wrapped around pcrs etc. but a start nonetheless. Also fix indentation issues. --- gst/mpegdemux/gstmpegtsdemux.c | 272 ++++++++++++++++++++++++++++++++++++----- gst/mpegdemux/gstmpegtsdemux.h | 186 +++++++++++++++------------- 2 files changed, 341 insertions(+), 117 deletions(-) diff --git a/gst/mpegdemux/gstmpegtsdemux.c b/gst/mpegdemux/gstmpegtsdemux.c index 4464cdf8..99a499a0 100644 --- a/gst/mpegdemux/gstmpegtsdemux.c +++ b/gst/mpegdemux/gstmpegtsdemux.c @@ -34,9 +34,9 @@ * * The Original Code is Fluendo MPEG Demuxer plugin. * - * The Initial Developer of the Original Code is Fluendo, S.L. - * Portions created by Fluendo, S.L. are Copyright (C) 2005 - * Fluendo, S.L. All Rights Reserved. + * The Initial Developer of the Original Code is Fluendo, S.A. + * Portions created by Fluendo, S.L. are Copyright (C) 2005,2006,2007,2008,2009 + * Fluendo, S.A. All Rights Reserved. * * Contributor(s): Wim Taymans */ @@ -126,6 +126,13 @@ enum PROP_M2TS }; +#define GSTTIME_TO_BYTES(time) \ + ((time != -1) ? gst_util_uint64_scale (MAX(0,(gint64) ((time))), \ + demux->bitrate, GST_SECOND) : -1) +#define BYTES_TO_GSTTIME(bytes) \ + ((bytes != -1) ? (gst_util_uint64_scale (bytes, GST_SECOND, \ + demux->bitrate)) : -1) + #define VIDEO_CAPS \ GST_STATIC_CAPS (\ "video/mpeg, " \ @@ -189,6 +196,7 @@ static void gst_mpegts_demux_get_property (GObject * object, guint prop_id, static gboolean gst_mpegts_demux_is_PMT (GstMpegTSDemux * demux, guint16 PID); static gboolean gst_mpegts_demux_sink_event (GstPad * pad, GstEvent * event); +static gboolean gst_mpegts_demux_src_event (GstPad * pad, GstEvent * event); static GstFlowReturn gst_mpegts_demux_chain (GstPad * pad, GstBuffer * buffer); static gboolean gst_mpegts_demux_sink_setcaps (GstPad * pad, GstCaps * caps); @@ -327,7 +335,12 @@ gst_mpegts_demux_init (GstMpegTSDemux * demux) demux->m2ts_mode = FALSE; demux->sync_lut = NULL; demux->sync_lut_len = 0; - + demux->bitrate = -1; + demux->num_packets = 0; + demux->pcr[0] = -1; + demux->pcr[1] = -1; + demux->cache_duration = GST_CLOCK_TIME_NONE; + demux->base_pts = GST_CLOCK_TIME_NONE; #ifdef USE_LIBOIL oil_init (); #endif @@ -668,6 +681,8 @@ gst_mpegts_demux_fill_stream (GstMpegTSStream * stream, guint8 id, gst_caps_unref (caps); gst_pad_set_query_function (stream->pad, GST_DEBUG_FUNCPTR (gst_mpegts_demux_src_pad_query)); + gst_pad_set_event_function (stream->pad, + GST_DEBUG_FUNCPTR (gst_mpegts_demux_src_event)); g_free (name); return TRUE; @@ -730,7 +745,7 @@ gst_mpegts_demux_send_new_segment (GstMpegTSDemux * demux, } base_PCR = PCR_stream->base_PCR; - time = MPEGTIME_TO_GSTTIME (base_PCR); + demux->base_pts = time = MPEGTIME_TO_GSTTIME (base_PCR); GST_DEBUG_OBJECT (demux, "segment PTS to (%" G_GUINT64_FORMAT ") time: %" G_GUINT64_FORMAT, base_PCR, time); @@ -1680,7 +1695,13 @@ gst_mpegts_demux_parse_adaptation_field (GstMpegTSStream * stream, "valid pcr: %d last PCR difference: %" G_GUINT64_FORMAT, valid_pcr, stream->last_PCR_difference); if (valid_pcr) { - + if (demux->pcr[0] == -1) { + demux->pcr[0] = pcr; + demux->num_packets = 0; + } /* Considering a difference of 1 sec ie 90000 ticks */ + else if (demux->pcr[1] == -1 && ((pcr - demux->pcr[0]) >= 90000)) { + demux->pcr[1] = pcr; + } stream->last_PCR = pcr; if (demux->clock && demux->clock_base != GST_CLOCK_TIME_NONE) { @@ -1955,15 +1976,20 @@ gst_mpegts_demux_is_PMT (GstMpegTSDemux * demux, guint16 PID) } static FORCE_INLINE GstFlowReturn -gst_mpegts_stream_pes_buffer_flush (GstMpegTSStream * stream) +gst_mpegts_stream_pes_buffer_flush (GstMpegTSStream * stream, gboolean discard) { GstFlowReturn ret = GST_FLOW_OK; if (stream->pes_buffer) { - GST_BUFFER_SIZE (stream->pes_buffer) = stream->pes_buffer_used; - ret = gst_pes_filter_push (&stream->filter, stream->pes_buffer); - if (ret == GST_FLOW_LOST_SYNC) + if (discard) { + gst_buffer_unref (stream->pes_buffer); stream->pes_buffer_in_sync = FALSE; + } else { + GST_BUFFER_SIZE (stream->pes_buffer) = stream->pes_buffer_used; + ret = gst_pes_filter_push (&stream->filter, stream->pes_buffer); + if (ret == GST_FLOW_LOST_SYNC) + stream->pes_buffer_in_sync = FALSE; + } stream->pes_buffer = NULL; } return ret; @@ -1985,7 +2011,7 @@ gst_mpegts_stream_pes_buffer_push (GstMpegTSStream * stream, if (stream->pes_buffer_size < (MPEGTS_MAX_PES_BUFFER_SIZE >> 1)) stream->pes_buffer_size <<= 1; - ret = gst_mpegts_stream_pes_buffer_flush (stream); + ret = gst_mpegts_stream_pes_buffer_flush (stream, FALSE); if (ret == GST_FLOW_LOST_SYNC) goto done; } @@ -2010,7 +2036,7 @@ done: } static FORCE_INLINE GstFlowReturn -gst_mpegts_demux_pes_buffer_flush (GstMpegTSDemux * demux) +gst_mpegts_demux_pes_buffer_flush (GstMpegTSDemux * demux, gboolean discard) { gint i; GstFlowReturn ret = GST_FLOW_OK; @@ -2018,7 +2044,7 @@ gst_mpegts_demux_pes_buffer_flush (GstMpegTSDemux * demux) for (i = 0; i < MPEGTS_MAX_PID + 1; i++) { GstMpegTSStream *stream = demux->streams[i]; if (stream && stream->pad) { - gst_mpegts_stream_pes_buffer_flush (stream); + gst_mpegts_stream_pes_buffer_flush (stream, discard); stream->pes_buffer_in_sync = FALSE; } } @@ -2233,7 +2259,7 @@ gst_mpegts_demux_parse_stream (GstMpegTSDemux * demux, GstMpegTSStream * stream, "bytes of %u bytes in the PES buffer", PID, stream->pes_buffer_used, stream->pes_buffer_size); /* Flush buffered PES data */ - gst_mpegts_stream_pes_buffer_flush (stream); + gst_mpegts_stream_pes_buffer_flush (stream, FALSE); gst_pes_filter_drain (&stream->filter); /* Resize the buffer to half if no overflow detected and * had been used less than half of it */ @@ -2319,11 +2345,137 @@ gst_mpegts_demux_parse_transport_packet (GstMpegTSDemux * demux, ret = gst_mpegts_demux_parse_stream (demux, stream, data, MPEGTS_NORMAL_TS_PACKETSIZE - 1); + if (demux->pcr[1] != -1 && demux->bitrate == -1) { + GST_DEBUG_OBJECT (demux, "stream->last_PCR_difference: %" G_GINT64_FORMAT + ", demux->num_packets %" G_GUINT64_FORMAT, + demux->pcr[1] - demux->pcr[0], demux->num_packets); + demux->bitrate = gst_util_uint64_scale (GST_SECOND, + MPEGTS_NORMAL_TS_PACKETSIZE * demux->num_packets, + MPEGTIME_TO_GSTTIME (demux->pcr[1] - demux->pcr[0])); + GST_DEBUG_OBJECT (demux, "bitrate is %" G_GINT64_FORMAT + " bytes per second", demux->bitrate); + } + demux->num_packets++; return ret; /* ERRORS */ } +static gboolean +gst_mpegts_demux_handle_seek_push (GstMpegTSDemux * demux, GstEvent * event) +{ + gboolean res = FALSE; + gdouble rate; + GstFormat format; + GstSeekFlags flags; + GstSeekType start_type, stop_type; + gint64 start, stop, bstart, bstop; + GstEvent *bevent; + + gst_event_parse_seek (event, &rate, &format, &flags, &start_type, &start, + &stop_type, &stop); + + GST_DEBUG_OBJECT (demux, "seek event, rate: %f start: %" GST_TIME_FORMAT + " stop: %" GST_TIME_FORMAT, rate, GST_TIME_ARGS (start), + GST_TIME_ARGS (stop)); + + if (format == GST_FORMAT_BYTES) { + GST_DEBUG_OBJECT (demux, "seek not supported on format %d", format); + goto beach; + } + + GST_DEBUG_OBJECT (demux, "seek - trying directly upstream first"); + + /* first try original format seek */ + res = gst_pad_push_event (demux->sinkpad, gst_event_ref (event)); + if (res == TRUE) + goto beach; + GST_DEBUG_OBJECT (demux, "seek - no upstream"); + + if (format != GST_FORMAT_TIME) { + /* From here down, we only support time based seeks */ + GST_DEBUG_OBJECT (demux, "seek not supported on format %d", format); + goto beach; + } + + /* We need to convert to byte based seek and we need a scr_rate for that. */ + if (demux->bitrate == -1) { + GST_DEBUG_OBJECT (demux, "seek not possible, no bitrate"); + goto beach; + } + + GST_DEBUG_OBJECT (demux, "try with bitrate"); + + bstart = GSTTIME_TO_BYTES (start); + bstop = GSTTIME_TO_BYTES (stop); + + GST_DEBUG_OBJECT (demux, "in bytes bstart %" G_GINT64_FORMAT " bstop %" + G_GINT64_FORMAT, bstart, bstop); + bevent = gst_event_new_seek (rate, GST_FORMAT_BYTES, flags, start_type, + bstart, stop_type, bstop); + + res = gst_pad_push_event (demux->sinkpad, bevent); + +beach: + gst_event_unref (event); + return res; +} + +static gboolean +gst_mpegts_demux_src_event (GstPad * pad, GstEvent * event) +{ + GstMpegTSDemux *demux = GST_MPEGTS_DEMUX (gst_pad_get_parent (pad)); + gboolean res = FALSE; + + GST_DEBUG_OBJECT (demux, "got event %s", + gst_event_type_get_name (GST_EVENT_TYPE (event))); + + switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_SEEK: + res = gst_mpegts_demux_handle_seek_push (demux, event); + break; + default: + res = gst_pad_push_event (demux->sinkpad, event); + break; + } + + gst_object_unref (demux); + + return res; +} + +static void +gst_mpegts_demux_flush (GstMpegTSDemux * demux, gboolean discard) +{ + GstMpegTSStream *PCR_stream; + GstMpegTSStream *PMT_stream; + + GST_DEBUG_OBJECT (demux, "flushing MPEG TS demuxer (discard %d)", discard); + + /* Start by flushing internal buffers */ + gst_mpegts_demux_pes_buffer_flush (demux, discard); + + /* Clear adapter */ + gst_adapter_clear (demux->adapter); + + /* Try resetting the last_PCR value as we will have a discont */ + if (demux->current_PMT == 0) + goto beach; + + PMT_stream = demux->streams[demux->current_PMT]; + if (PMT_stream == NULL) + goto beach; + + PCR_stream = demux->streams[PMT_stream->PMT.PCR_PID]; + if (PCR_stream == NULL) + goto beach; + + PCR_stream->last_PCR = -1; + +beach: + return; +} + static gboolean gst_mpegts_demux_send_event (GstMpegTSDemux * demux, GstEvent * event) { @@ -2347,7 +2499,7 @@ static gboolean gst_mpegts_demux_sink_event (GstPad * pad, GstEvent * event) { GstMpegTSDemux *demux = GST_MPEGTS_DEMUX (gst_pad_get_parent (pad)); - gboolean res; + gboolean res = FALSE; GST_DEBUG_OBJECT (demux, "got event %s", gst_event_type_get_name (GST_EVENT_TYPE (event))); @@ -2358,11 +2510,11 @@ gst_mpegts_demux_sink_event (GstPad * pad, GstEvent * event) break; case GST_EVENT_FLUSH_STOP: gst_adapter_clear (demux->adapter); + gst_mpegts_demux_flush (demux, TRUE); res = gst_mpegts_demux_send_event (demux, event); break; case GST_EVENT_EOS: - /* Flush buffered PES data */ - gst_mpegts_demux_pes_buffer_flush (demux); + gst_mpegts_demux_flush (demux, FALSE); /* Send the EOS event on each stream */ if (!(res = gst_mpegts_demux_send_event (demux, event))) { /* we have no streams */ @@ -2371,15 +2523,46 @@ gst_mpegts_demux_sink_event (GstPad * pad, GstEvent * event) } break; case GST_EVENT_NEWSEGMENT: - res = gst_mpegts_demux_send_event (demux, event); + { + gboolean update; + gdouble rate; + GstFormat format; + gint64 start, stop, time; + + gst_event_parse_new_segment (event, &update, &rate, &format, + &start, &stop, &time); + + gst_event_unref (event); + GST_INFO_OBJECT (demux, "received new segment: rate %g " + "format %d, start: %" G_GINT64_FORMAT ", stop: %" G_GINT64_FORMAT + ", time: %" G_GINT64_FORMAT, rate, format, start, stop, time); + if (format == GST_FORMAT_BYTES && demux->bitrate != -1) { + gint64 tstart = 0, tstop = 0, pos = 0; + + if (demux->base_pts != GST_CLOCK_TIME_NONE) { + tstart = tstop = demux->base_pts; + } + tstart += BYTES_TO_GSTTIME (start); + tstop += BYTES_TO_GSTTIME (stop); + pos = BYTES_TO_GSTTIME (time); + + event = gst_event_new_new_segment (update, rate, + GST_FORMAT_TIME, tstart, tstop, pos); + GST_DEBUG_OBJECT (demux, "pushing time newsegment from %" + GST_TIME_FORMAT " to %" GST_TIME_FORMAT " pos %" GST_TIME_FORMAT, + GST_TIME_ARGS (tstart), GST_TIME_ARGS (tstop), GST_TIME_ARGS (pos)); + + res = gst_mpegts_demux_send_event (demux, event); + } break; + } default: res = gst_mpegts_demux_send_event (demux, event); break; } gst_object_unref (demux); - return TRUE; + return res; } static gboolean @@ -2455,21 +2638,54 @@ gst_mpegts_demux_src_pad_query (GstPad * pad, GstQuery * query) case GST_QUERY_DURATION: { GstFormat format; - gint64 duration; + GstPad *peer; - gst_query_parse_duration (query, &format, &duration); + gst_query_parse_duration (query, &format, NULL); - if (format == GST_FORMAT_BYTES) { - res = FALSE; - } else { - res = gst_pad_query_default (pad, query); + /* Try query upstream first */ + peer = gst_pad_get_peer (demux->sinkpad); + if (peer) { + res = gst_pad_query (peer, query); + /* Try doing something with that query if it failed */ + if (!res && format == GST_FORMAT_TIME && demux->bitrate != -1) { + /* Try using cache first */ + if (GST_CLOCK_TIME_IS_VALID (demux->cache_duration)) { + GST_LOG_OBJECT (demux, "replying duration query from cache %" + GST_TIME_FORMAT, GST_TIME_ARGS (demux->cache_duration)); + gst_query_set_duration (query, GST_FORMAT_TIME, + demux->cache_duration); + res = TRUE; + } else { /* Query upstream and approximate */ + GstQuery *bquery = gst_query_new_duration (GST_FORMAT_BYTES); + gint64 duration = 0; + + /* Query peer for duration in bytes */ + res = gst_pad_query (peer, bquery); + if (res) { + /* Convert to time format */ + gst_query_parse_duration (bquery, &format, &duration); + GST_DEBUG_OBJECT (demux, "query on peer pad reported bytes %" + G_GUINT64_FORMAT, duration); + demux->cache_duration = BYTES_TO_GSTTIME (duration); + GST_DEBUG_OBJECT (demux, "converted to time %" GST_TIME_FORMAT, + GST_TIME_ARGS (demux->cache_duration)); + gst_query_set_duration (query, GST_FORMAT_TIME, + demux->cache_duration); + } + gst_query_unref (bquery); + } + } else { + GST_WARNING_OBJECT (demux, "unsupported query format or no bitrate " + "yet to approximate duration from bytes"); + } + gst_object_unref (peer); } - break; } default: res = gst_pad_query_default (pad, query); } + gst_object_unref (demux); return res; } @@ -2554,9 +2770,7 @@ gst_mpegts_demux_chain (GstPad * pad, GstBuffer * buffer) guint sync_count; if (GST_BUFFER_IS_DISCONT (buffer)) { - /* Flush buffered PES data */ - gst_mpegts_demux_pes_buffer_flush (demux); - gst_adapter_clear (demux->adapter); + gst_mpegts_demux_flush (demux, FALSE); } /* first push the new buffer into the adapter */ gst_adapter_push (demux->adapter, buffer); diff --git a/gst/mpegdemux/gstmpegtsdemux.h b/gst/mpegdemux/gstmpegtsdemux.h index 8a4ca3d2..c4a907a5 100644 --- a/gst/mpegdemux/gstmpegtsdemux.h +++ b/gst/mpegdemux/gstmpegtsdemux.h @@ -34,9 +34,9 @@ * * The Original Code is Fluendo MPEG Demuxer plugin. * - * The Initial Developer of the Original Code is Fluendo, S.L. - * Portions created by Fluendo, S.L. are Copyright (C) 2005 - * Fluendo, S.L. All Rights Reserved. + * The Initial Developer of the Original Code is Fluendo, S.A. + * Portions created by Fluendo, S.A. are Copyright (C) 2005,2006,2007,2008,2009 + * Fluendo, S.A. All Rights Reserved. * * Contributor(s): Wim Taymans */ @@ -52,18 +52,14 @@ #include "gstsectionfilter.h" G_BEGIN_DECLS - #define MPEGTS_MIN_PES_BUFFER_SIZE 4 * 1024 #define MPEGTS_MAX_PES_BUFFER_SIZE 256 * 1024 - #define MPEGTS_MAX_PID 0x1fff #define MPEGTS_NORMAL_TS_PACKETSIZE 188 #define MPEGTS_M2TS_TS_PACKETSIZE 192 - #define IS_MPEGTS_SYNC(data) (((data)[0] == 0x47) && \ (((data)[1] & 0x80) == 0x00) && \ (((data)[3] & 0x10) == 0x10)) - #define GST_TYPE_MPEGTS_DEMUX (gst_mpegts_demux_get_type()) #define GST_MPEGTS_DEMUX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),\ GST_TYPE_MPEGTS_DEMUX,GstMpegTSDemux)) @@ -75,7 +71,6 @@ G_BEGIN_DECLS GST_TYPE_MPEGTS_DEMUX)) #define GST_IS_MPEGTS_DEMUX_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),\ GST_TYPE_MPEGTS_DEMUX)) - typedef struct _GstMpegTSStream GstMpegTSStream; typedef struct _GstMpegTSPMTEntry GstMpegTSPMTEntry; typedef struct _GstMpegTSPMT GstMpegTSPMT; @@ -84,142 +79,157 @@ typedef struct _GstMpegTSPAT GstMpegTSPAT; typedef struct _GstMpegTSDemux GstMpegTSDemux; typedef struct _GstMpegTSDemuxClass GstMpegTSDemuxClass; -struct _GstMpegTSPMTEntry { - guint16 PID; +struct _GstMpegTSPMTEntry +{ + guint16 PID; }; -struct _GstMpegTSPMT { - guint16 program_number; - guint8 version_number; - gboolean current_next_indicator; - guint8 section_number; - guint8 last_section_number; - guint16 PCR_PID; - guint16 program_info_length; - GstMPEGDescriptor * program_info; - - GArray * entries; +struct _GstMpegTSPMT +{ + guint16 program_number; + guint8 version_number; + gboolean current_next_indicator; + guint8 section_number; + guint8 last_section_number; + guint16 PCR_PID; + guint16 program_info_length; + GstMPEGDescriptor *program_info; + + GArray *entries; }; -struct _GstMpegTSPATEntry { - guint16 program_number; - guint16 PID; +struct _GstMpegTSPATEntry +{ + guint16 program_number; + guint16 PID; }; -struct _GstMpegTSPAT { - guint16 transport_stream_id; - guint8 version_number; - gboolean current_next_indicator; - guint8 section_number; - guint8 last_section_number; +struct _GstMpegTSPAT +{ + guint16 transport_stream_id; + guint8 version_number; + gboolean current_next_indicator; + guint8 section_number; + guint8 last_section_number; - GArray * entries; + GArray *entries; }; -typedef enum _MpegTsStreamFlags { +typedef enum _MpegTsStreamFlags +{ MPEGTS_STREAM_FLAG_STREAM_TYPE_UNKNOWN = 0x01, MPEGTS_STREAM_FLAG_PMT_VALID = 0x02, - MPEGTS_STREAM_FLAG_IS_VIDEO = 0x04 + MPEGTS_STREAM_FLAG_IS_VIDEO = 0x04 } MpegTsStreamFlags; /* Information associated to a single MPEG stream. */ -struct _GstMpegTSStream { - GstMpegTSDemux * demux; +struct _GstMpegTSStream +{ + GstMpegTSDemux *demux; - MpegTsStreamFlags flags; + MpegTsStreamFlags flags; /* PID and type */ - guint16 PID; - guint8 PID_type; + guint16 PID; + guint8 PID_type; /* adaptation_field data */ - guint64 last_PCR; - guint64 base_PCR; - guint64 last_OPCR; - guint64 last_PCR_difference; - gboolean discont_PCR; - GstClockTimeDiff discont_difference; + guint64 last_PCR; + guint64 base_PCR; + guint64 last_OPCR; + guint64 last_PCR_difference; + gboolean discont_PCR; + GstClockTimeDiff discont_difference; /* for PAT streams */ - GstMpegTSPAT PAT; + GstMpegTSPAT PAT; /* for PMT streams */ - GstMpegTSPMT PMT; + GstMpegTSPMT PMT; /* for CA streams */ /* for PAT, PMT, CA and private streams */ - GstSectionFilter section_filter; + GstSectionFilter section_filter; /* for PES streams */ - guint8 id; - guint8 stream_type; - GstBuffer * pes_buffer; - guint32 pes_buffer_size; - guint32 pes_buffer_used; - gboolean pes_buffer_overflow; - gboolean pes_buffer_in_sync; - GstPESFilter filter; - GstPad * pad; - GstFlowReturn last_ret; + guint8 id; + guint8 stream_type; + GstBuffer *pes_buffer; + guint32 pes_buffer_size; + guint32 pes_buffer_used; + gboolean pes_buffer_overflow; + gboolean pes_buffer_in_sync; + GstPESFilter filter; + GstPad *pad; + GstFlowReturn last_ret; GstMPEGDescriptor *ES_info; /* needed because 33bit mpeg timestamps wrap around every (approx) 26.5 hrs */ - GstClockTimeDiff base_time; - GstClockTime last_time; + GstClockTimeDiff base_time; + GstClockTime last_time; /* pid of PMT that this stream belongs to */ - guint16 PMT_pid; + guint16 PMT_pid; }; -struct _GstMpegTSDemux { - GstElement parent; +struct _GstMpegTSDemux +{ + GstElement parent; /* properties */ - gboolean check_crc; + gboolean check_crc; /* sink pad and adapter */ - GstPad * sinkpad; - GstAdapter * adapter; - guint8 ** sync_lut; - guint sync_lut_len; + GstPad *sinkpad; + GstAdapter *adapter; + guint8 **sync_lut; + guint sync_lut_len; /* current PMT PID */ - guint16 current_PMT; + guint16 current_PMT; /* Array of MPEGTS_MAX_PID + 1 stream entries */ - GstMpegTSStream ** streams; + GstMpegTSStream **streams; /* Array to perform pmts checks at gst_mpegts_demux_parse_adaptation_field */ - gboolean pmts_checked[MPEGTS_MAX_PID + 1]; - + gboolean pmts_checked[MPEGTS_MAX_PID + 1]; + /* Array of Elementary Stream pids for ts with PMT */ - guint16 * elementary_pids; - guint nb_elementary_pids; + guint16 *elementary_pids; + guint nb_elementary_pids; /* Program number to use */ - gint program_number; + gint program_number; /* indicates that we need to close our pad group, because we've added * at least one pad */ - gboolean need_no_more_pads; - guint16 packetsize; - gboolean m2ts_mode; + gboolean need_no_more_pads; + guint16 packetsize; + gboolean m2ts_mode; /* clocking */ - GstClock * clock; - GstClockTime clock_base; + GstClock *clock; + GstClockTime clock_base; + /* Additional information required for seeking */ + guint64 num_packets; + gint64 bitrate; + /* Two PCRs observations to calculate bitrate */ + gint64 pcr[2]; + GstClockTime cache_duration; + /* Cached base_PCR in GStreamer time. */ + GstClockTime base_pts; }; -struct _GstMpegTSDemuxClass { - GstElementClass parent_class; +struct _GstMpegTSDemuxClass +{ + GstElementClass parent_class; - GstPadTemplate * sink_template; - GstPadTemplate * video_template; - GstPadTemplate * audio_template; - GstPadTemplate * private_template; + GstPadTemplate *sink_template; + GstPadTemplate *video_template; + GstPadTemplate *audio_template; + GstPadTemplate *private_template; }; -GType gst_mpegts_demux_get_type (void); +GType gst_mpegts_demux_get_type (void); -gboolean gst_mpegts_demux_plugin_init (GstPlugin *plugin); +gboolean gst_mpegts_demux_plugin_init (GstPlugin * plugin); G_END_DECLS - #endif /* __GST_MPEGTS_DEMUX_H__ */ -- cgit v1.2.1 From 3c073e45c0aa28e0088cc517ea442d31c4bc09a9 Mon Sep 17 00:00:00 2001 From: Christian Schaller Date: Sat, 9 May 2009 12:42:25 +0100 Subject: Add a more representative example preset file for x264 --- ext/x264/GstX264Enc.prs | 56 ++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 48 insertions(+), 8 deletions(-) diff --git a/ext/x264/GstX264Enc.prs b/ext/x264/GstX264Enc.prs index daf60a77..887247a3 100644 --- a/ext/x264/GstX264Enc.prs +++ b/ext/x264/GstX264Enc.prs @@ -2,12 +2,52 @@ version=0.10 element-name=GstX264Enc -# see http://mewiki.project357.com/wiki/X264_Settings for x264 properties - -# lower default bitrate -# turn of cabac for devices that do not support main-profile -[just-an-example] -_meta/comment=use for mobile pocket video player -_meta/device=pocketvideo -bitrate=1024 +[Pass 1] +pass=pass1 + +[Pass 2] +pass=pass2 + +[Pass 3] +pass=pass3 + +[Profile Baseline] +_meta/comment=Baseline Profile +bframes=0 cabac=false +dct8x8=false + +[Profile Main] +_meta/comment=Main Profile +cabac=true +dct8x8=false + +[Profile High] +_meta/comment=High Profile +cabac=true +dct8x8=true + +[Quality Low] +_meta/comment=Low quality +pass=qual +quantizer=27 +subme=4 +threads=0 + +[Quality Normal] +_meta/comment=Normal quality +pass=qual +quantizer=21 +me=umh +subme=6 +ref=3 +threads=0 + +[Quality High] +_meta/comment=High quality +pass=qual +quantizer=18 +me=umh +subme=6 +ref=3 +threads=0 -- cgit v1.2.1 From 8692ae2a9d0c0bca938d3b7883e3f10adde8d9fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 9 May 2009 15:48:01 +0200 Subject: mxfmux: Don't unref NULL buffers if pushing a buffer after the first failed --- gst/mxf/mxfmux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/mxf/mxfmux.c b/gst/mxf/mxfmux.c index 3ca60a4e..a63172f2 100644 --- a/gst/mxf/mxfmux.c +++ b/gst/mxf/mxfmux.c @@ -1006,7 +1006,7 @@ gst_mxf_mux_write_header_metadata (GstMXFMux * mux) if ((ret = gst_mxf_mux_push (mux, buf)) != GST_FLOW_OK) { GST_ERROR_OBJECT (mux, "Failed pushing buffer: %s", gst_flow_get_name (ret)); - g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL); + g_list_foreach (l, (GFunc) gst_mini_object_unref, NULL); g_list_free (buffers); return ret; } -- cgit v1.2.1 From 18f8c9b0b4057ceaab867d9c36349362458f997a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 9 May 2009 15:48:41 +0200 Subject: mxfmux: Fix EOS logic again --- gst/mxf/mxfmux.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gst/mxf/mxfmux.c b/gst/mxf/mxfmux.c index a63172f2..8aaa014e 100644 --- a/gst/mxf/mxfmux.c +++ b/gst/mxf/mxfmux.c @@ -1150,10 +1150,11 @@ gst_mxf_mux_handle_eos (GstMXFMux * mux) best = cpad; break; } - } else if (have_data && !l->next) { + } + + if (have_data && !l->next) { mux->last_gc_position++; mux->last_gc_timestamp = next_gc_timestamp; - have_data = FALSE; best = NULL; break; } -- cgit v1.2.1 From d09515b49f6c3ddc7969bd12cdb2c40239ba087c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 9 May 2009 15:48:54 +0200 Subject: mxfmux: Write metadata items in reference order This ensures that the metadata items are always written in the same order and that first comes the preface, then the identification linked from the preface, ... Some demuxers can't handle files where the metadata items are in random order. --- gst/mxf/mxfmux.c | 98 +++++++++++++++++++++++++++++++++++++++++++------------- gst/mxf/mxfmux.h | 1 + 2 files changed, 76 insertions(+), 23 deletions(-) diff --git a/gst/mxf/mxfmux.c b/gst/mxf/mxfmux.c index 8aaa014e..7fa7a5fa 100644 --- a/gst/mxf/mxfmux.c +++ b/gst/mxf/mxfmux.c @@ -163,6 +163,8 @@ gst_mxf_mux_finalize (GObject * object) if (mux->metadata) { g_hash_table_destroy (mux->metadata); mux->metadata = NULL; + g_list_free (mux->metadata_list); + mux->metadata_list = NULL; } gst_object_unref (mux->collect); @@ -216,6 +218,8 @@ gst_mxf_mux_reset (GstMXFMux * mux) if (mux->metadata) { g_hash_table_destroy (mux->metadata); mux->preface = NULL; + g_list_free (mux->metadata_list); + mux->metadata_list = NULL; } mux->metadata = mxf_metadata_hash_table_new (); @@ -280,6 +284,7 @@ gst_mxf_mux_setcaps (GstPad * pad, GstCaps * caps) gboolean ret = TRUE; MXFUUID d_instance_uid = { {0,} }; MXFMetadataFileDescriptor *old_descriptor = cpad->descriptor; + GList *l; GST_DEBUG_OBJECT (pad, "Setting caps %" GST_PTR_FORMAT, caps); @@ -309,6 +314,19 @@ gst_mxf_mux_setcaps (GstPad * pad, GstCaps * caps) memcpy (&MXF_METADATA_BASE (cpad->descriptor)->instance_uid, &d_instance_uid, 16); + if (old_descriptor) { + for (l = mux->metadata_list; l; l = l->next) { + MXFMetadataBase *tmp = l->data; + + if (mxf_uuid_is_equal (&d_instance_uid, &tmp->instance_uid)) { + l->data = cpad->descriptor; + break; + } + } + } else { + mux->metadata_list = g_list_prepend (mux->metadata_list, cpad->descriptor); + } + g_hash_table_replace (mux->metadata, &MXF_METADATA_BASE (cpad->descriptor)->instance_uid, cpad->descriptor); @@ -449,6 +467,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) mux->metadata); g_hash_table_insert (mux->metadata, &MXF_METADATA_BASE (mux->preface)->instance_uid, mux->preface); + mux->metadata_list = g_list_prepend (mux->metadata_list, mux->preface); mxf_timestamp_set_now (&mux->preface->last_modified_date); mux->preface->version = 258; @@ -505,6 +524,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) mux->metadata); g_hash_table_insert (mux->metadata, &MXF_METADATA_BASE (identification)->instance_uid, identification); + mux->metadata_list = g_list_prepend (mux->metadata_list, identification); mxf_uuid_init (&identification->this_generation_uid, NULL); @@ -561,6 +581,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) mxf_uuid_init (&MXF_METADATA_BASE (cstorage)->instance_uid, mux->metadata); g_hash_table_insert (mux->metadata, &MXF_METADATA_BASE (cstorage)->instance_uid, cstorage); + mux->metadata_list = g_list_prepend (mux->metadata_list, cstorage); cstorage->n_packages = 2; cstorage->packages = g_new0 (MXFMetadataGenericPackage *, 2); @@ -576,6 +597,8 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) g_hash_table_insert (mux->metadata, &MXF_METADATA_BASE (cstorage->packages[1])->instance_uid, cstorage->packages[1]); + mux->metadata_list = + g_list_prepend (mux->metadata_list, cstorage->packages[1]); p = (MXFMetadataSourcePackage *) cstorage->packages[1]; mxf_umid_init (&p->parent.package_uid); @@ -601,6 +624,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) mxf_uuid_init (&MXF_METADATA_BASE (d)->instance_uid, mux->metadata); g_hash_table_insert (mux->metadata, &MXF_METADATA_BASE (d)->instance_uid, d); + mux->metadata_list = g_list_prepend (mux->metadata_list, d); } /* Tracks */ @@ -621,6 +645,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) mux->metadata); g_hash_table_insert (mux->metadata, &MXF_METADATA_BASE (track)->instance_uid, track); + mux->metadata_list = g_list_prepend (mux->metadata_list, track); track->parent.track_id = n + 1; track->parent.track_number = @@ -637,6 +662,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) mux->metadata); g_hash_table_insert (mux->metadata, &MXF_METADATA_BASE (sequence)->instance_uid, sequence); + mux->metadata_list = g_list_prepend (mux->metadata_list, sequence); memcpy (&sequence->data_definition, &cpad->writer->data_definition, 16); @@ -653,6 +679,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) mux->metadata); g_hash_table_insert (mux->metadata, &MXF_METADATA_BASE (clip)->instance_uid, clip); + mux->metadata_list = g_list_prepend (mux->metadata_list, clip); memcpy (&clip->parent.data_definition, &sequence->data_definition, 16); @@ -687,6 +714,8 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) g_hash_table_insert (mux->metadata, &MXF_METADATA_BASE (cstorage->packages[0])->instance_uid, cstorage->packages[0]); + mux->metadata_list = + g_list_prepend (mux->metadata_list, cstorage->packages[0]); p = (MXFMetadataMaterialPackage *) cstorage->packages[0]; mxf_umid_init (&p->package_uid); @@ -724,6 +753,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) mux->metadata); g_hash_table_insert (mux->metadata, &MXF_METADATA_BASE (track)->instance_uid, track); + mux->metadata_list = g_list_prepend (mux->metadata_list, track); track->parent.track_id = n + 1; track->parent.track_number = 0; @@ -757,6 +787,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) mux->metadata); g_hash_table_insert (mux->metadata, &MXF_METADATA_BASE (sequence)->instance_uid, sequence); + mux->metadata_list = g_list_prepend (mux->metadata_list, sequence); memcpy (&sequence->data_definition, &cpad->writer->data_definition, 16); @@ -772,6 +803,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) mux->metadata); g_hash_table_insert (mux->metadata, &MXF_METADATA_BASE (clip)->instance_uid, clip); + mux->metadata_list = g_list_prepend (mux->metadata_list, clip); memcpy (&clip->parent.data_definition, &sequence->data_definition, 16); @@ -798,6 +830,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) mux->metadata); g_hash_table_insert (mux->metadata, &MXF_METADATA_BASE (track)->instance_uid, track); + mux->metadata_list = g_list_prepend (mux->metadata_list, track); track->parent.track_id = n + 1; track->parent.track_number = 0; @@ -811,6 +844,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) mux->metadata); g_hash_table_insert (mux->metadata, &MXF_METADATA_BASE (sequence)->instance_uid, sequence); + mux->metadata_list = g_list_prepend (mux->metadata_list, sequence); memcpy (&sequence->data_definition, mxf_metadata_track_identifier_get @@ -828,6 +862,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) mux->metadata); g_hash_table_insert (mux->metadata, &MXF_METADATA_BASE (component)->instance_uid, component); + mux->metadata_list = g_list_prepend (mux->metadata_list, component); memcpy (&component->parent.data_definition, &sequence->data_definition, 16); @@ -884,6 +919,9 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) g_hash_table_insert (mux->metadata, &MXF_METADATA_BASE (cstorage->essence_container_data[0])->instance_uid, cstorage->essence_container_data[0]); + mux->metadata_list = + g_list_prepend (mux->metadata_list, + cstorage->essence_container_data[0]); cstorage->essence_container_data[0]->linked_package = MXF_METADATA_SOURCE_PACKAGE (cstorage->packages[1]); @@ -891,6 +929,41 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) cstorage->essence_container_data[0]->body_sid = 1; } + /* Sort descriptors at the correct places */ + { + GList *l; + GList *descriptors; + + for (l = mux->metadata_list; l; l = l->next) { + MXFMetadataBase *m = l->data; + + if (MXF_IS_METADATA_GENERIC_DESCRIPTOR (m) + && !MXF_IS_METADATA_MULTIPLE_DESCRIPTOR (m)) { + descriptors = l; + l->prev->next = NULL; + l->prev = NULL; + break; + } + } + + for (l = mux->metadata_list; l; l = l->next) { + MXFMetadataBase *m = l->data; + GList *s; + + if (MXF_IS_METADATA_MULTIPLE_DESCRIPTOR (m) || + MXF_IS_METADATA_SOURCE_PACKAGE (m)) { + s = l->prev; + l->prev = g_list_last (descriptors); + s->next = descriptors; + descriptors->prev = s; + l->prev->next = l; + break; + } + } + } + + mux->metadata_list = g_list_reverse (mux->metadata_list); + return ret; } @@ -953,38 +1026,17 @@ gst_mxf_mux_write_header_metadata (GstMXFMux * mux) GstFlowReturn ret = GST_FLOW_OK; GstBuffer *buf; GList *buffers = NULL; -#if GLIB_CHECK_VERSION (2, 16, 0) - GHashTableIter iter; -#else - GList *values; -#endif - MXFMetadataBase *m; GList *l; + MXFMetadataBase *m; guint64 header_byte_count = 0; - buf = - mxf_metadata_base_to_buffer (MXF_METADATA_BASE (mux->preface), - &mux->primer); - header_byte_count += GST_BUFFER_SIZE (buf); - buffers = g_list_prepend (buffers, buf); - -#if GLIB_CHECK_VERSION (2, 16, 0) - g_hash_table_iter_init (&iter, mux->metadata); - while (g_hash_table_iter_next (&iter, NULL, (gpointer) & m)) { -#else - values = g_hash_table_get_values (mux->metadata); - for (l = values; l; l = l->next) { + for (l = mux->metadata_list; l; l = l->next) { m = l->data; -#endif buf = mxf_metadata_base_to_buffer (m, &mux->primer); header_byte_count += GST_BUFFER_SIZE (buf); buffers = g_list_prepend (buffers, buf); } -#if !GLIB_CHECK_VERSION (2, 16, 0) - g_list_free (values); -#endif - buffers = g_list_reverse (buffers); buf = mxf_primer_pack_to_buffer (&mux->primer); header_byte_count += GST_BUFFER_SIZE (buf); diff --git a/gst/mxf/mxfmux.h b/gst/mxf/mxfmux.h index c8fd0b09..94330c46 100644 --- a/gst/mxf/mxfmux.h +++ b/gst/mxf/mxfmux.h @@ -85,6 +85,7 @@ typedef struct _GstMXFMux { MXFPrimerPack primer; GHashTable *metadata; + GList *metadata_list; MXFMetadataPreface *preface; MXFFraction min_edit_rate; -- cgit v1.2.1 From 028efb726c73504887e7d40198d7114c029634bb Mon Sep 17 00:00:00 2001 From: Christian Schaller Date: Sat, 9 May 2009 23:47:39 +0100 Subject: Remove wrong stuff from preset file --- ext/x264/GstX264Enc.prs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/ext/x264/GstX264Enc.prs b/ext/x264/GstX264Enc.prs index 887247a3..84c76a94 100644 --- a/ext/x264/GstX264Enc.prs +++ b/ext/x264/GstX264Enc.prs @@ -2,15 +2,6 @@ version=0.10 element-name=GstX264Enc -[Pass 1] -pass=pass1 - -[Pass 2] -pass=pass2 - -[Pass 3] -pass=pass3 - [Profile Baseline] _meta/comment=Baseline Profile bframes=0 -- cgit v1.2.1 From 6451febd143e8d214718c6d0e1b2355f52806b50 Mon Sep 17 00:00:00 2001 From: Tristan Matthews Date: Sun, 10 May 2009 10:40:36 +0200 Subject: mxfmux: Fix uninitialized variable compiler warning This will always be set to something but gcc didn't detect this. Fixes bug #582013. --- gst/mxf/mxfmux.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gst/mxf/mxfmux.c b/gst/mxf/mxfmux.c index 7fa7a5fa..fdc1bc61 100644 --- a/gst/mxf/mxfmux.c +++ b/gst/mxf/mxfmux.c @@ -932,7 +932,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) /* Sort descriptors at the correct places */ { GList *l; - GList *descriptors; + GList *descriptors = NULL; for (l = mux->metadata_list; l; l = l->next) { MXFMetadataBase *m = l->data; @@ -946,6 +946,8 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux) } } + g_assert (descriptors != NULL); + for (l = mux->metadata_list; l; l = l->next) { MXFMetadataBase *m = l->data; GList *s; -- cgit v1.2.1 From a01ccc68e411df271b5b61f5835c190394a9ad65 Mon Sep 17 00:00:00 2001 From: Marc-Andre Lureau Date: Sun, 10 May 2009 11:17:17 +0200 Subject: Run libtoolize before aclocal This unbreaks the build in some cases. Fixes bug #582021 --- autogen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autogen.sh b/autogen.sh index 7ac3720d..f334a566 100755 --- a/autogen.sh +++ b/autogen.sh @@ -76,8 +76,8 @@ fi tool_run "$autopoint --force" patch -p0 < common/gettext.patch -tool_run "$aclocal" "-I m4 -I common/m4 $ACLOCAL_FLAGS" tool_run "$libtoolize" "--copy --force" +tool_run "$aclocal" "-I m4 -I common/m4 $ACLOCAL_FLAGS" tool_run "$autoheader" # touch the stamp-h.in build stamp so we don't re-run autoheader in maintainer mode -- wingo -- cgit v1.2.1 From 9e2b9d18ac66da68ef574485a362cfc0550b5aa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 10 May 2009 17:17:15 +0200 Subject: faad: Fix configure check for the FAAD version The previous version matched things like 297 for version 2.7, etc which could be added to the file by other headers. Fixes bug #582074. --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index d4ec9374..0af76e12 100644 --- a/configure.ac +++ b/configure.ac @@ -830,9 +830,9 @@ AG_GST_CHECK_FEATURE(FAAD, [AAC decoder plug-in], faad, [ AC_MSG_CHECKING([Checking FAAD2 version in $faad_hdr]) for minor in 10 9 8 7 6 5 0; do if test x$faad2_minor_version = "x"; then - AC_EGREP_CPP([2.$minor], [ + AC_EGREP_CPP([GST_CHECK_FAAD_VERSION \"2\.$minor\"], [ #include <$faad_hdr> - FAAD2_VERSION + GST_CHECK_FAAD_VERSION FAAD2_VERSION ], [ faad2_minor_version=$minor ]) -- cgit v1.2.1 From 29d53b22f9934d3d2a6751be91c88caa320efda4 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Sun, 10 May 2009 21:21:36 +0200 Subject: gppmux: Add MPEG-4 part 2 to supported formats. Fixes #581593. --- gst/qtmux/gstqtmuxmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/qtmux/gstqtmuxmap.c b/gst/qtmux/gstqtmuxmap.c index a4972661..11913670 100644 --- a/gst/qtmux/gstqtmuxmap.c +++ b/gst/qtmux/gstqtmuxmap.c @@ -174,7 +174,7 @@ GstQTMuxFormatProp gst_qt_mux_format_list[] = { "3GPP", "GstGPPMux", GST_STATIC_CAPS ("video/quicktime, variant = (string) 3gpp"), - GST_STATIC_CAPS (H263_CAPS "; " H264_CAPS), + GST_STATIC_CAPS (H263_CAPS "; " MPEG4V_CAPS "; " H264_CAPS), GST_STATIC_CAPS (AMR_CAPS "; " MP3_CAPS "; " AAC_CAPS) } , -- cgit v1.2.1 From 5aa3358f3b8604c8daf830847c77744824f53068 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Sat, 9 May 2009 09:57:47 +0200 Subject: mpegtsdemux: Revert indentation and comment header file. One shouldn't run gst-indent on .h files, in this case it was un-beautifying the indentation :) --- gst/mpegdemux/gstmpegtsdemux.h | 191 +++++++++++++++++++++-------------------- 1 file changed, 98 insertions(+), 93 deletions(-) diff --git a/gst/mpegdemux/gstmpegtsdemux.h b/gst/mpegdemux/gstmpegtsdemux.h index c4a907a5..2e2a8e63 100644 --- a/gst/mpegdemux/gstmpegtsdemux.h +++ b/gst/mpegdemux/gstmpegtsdemux.h @@ -52,14 +52,18 @@ #include "gstsectionfilter.h" G_BEGIN_DECLS + #define MPEGTS_MIN_PES_BUFFER_SIZE 4 * 1024 #define MPEGTS_MAX_PES_BUFFER_SIZE 256 * 1024 + #define MPEGTS_MAX_PID 0x1fff #define MPEGTS_NORMAL_TS_PACKETSIZE 188 #define MPEGTS_M2TS_TS_PACKETSIZE 192 + #define IS_MPEGTS_SYNC(data) (((data)[0] == 0x47) && \ (((data)[1] & 0x80) == 0x00) && \ (((data)[3] & 0x10) == 0x10)) + #define GST_TYPE_MPEGTS_DEMUX (gst_mpegts_demux_get_type()) #define GST_MPEGTS_DEMUX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),\ GST_TYPE_MPEGTS_DEMUX,GstMpegTSDemux)) @@ -71,6 +75,7 @@ G_BEGIN_DECLS GST_TYPE_MPEGTS_DEMUX)) #define GST_IS_MPEGTS_DEMUX_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),\ GST_TYPE_MPEGTS_DEMUX)) + typedef struct _GstMpegTSStream GstMpegTSStream; typedef struct _GstMpegTSPMTEntry GstMpegTSPMTEntry; typedef struct _GstMpegTSPMT GstMpegTSPMT; @@ -79,157 +84,157 @@ typedef struct _GstMpegTSPAT GstMpegTSPAT; typedef struct _GstMpegTSDemux GstMpegTSDemux; typedef struct _GstMpegTSDemuxClass GstMpegTSDemuxClass; -struct _GstMpegTSPMTEntry -{ - guint16 PID; +struct _GstMpegTSPMTEntry { + guint16 PID; }; -struct _GstMpegTSPMT -{ - guint16 program_number; - guint8 version_number; - gboolean current_next_indicator; - guint8 section_number; - guint8 last_section_number; - guint16 PCR_PID; - guint16 program_info_length; - GstMPEGDescriptor *program_info; - - GArray *entries; +struct _GstMpegTSPMT { + guint16 program_number; + guint8 version_number; + gboolean current_next_indicator; + guint8 section_number; + guint8 last_section_number; + guint16 PCR_PID; + guint16 program_info_length; + GstMPEGDescriptor * program_info; + + GArray * entries; }; -struct _GstMpegTSPATEntry -{ - guint16 program_number; - guint16 PID; +struct _GstMpegTSPATEntry { + guint16 program_number; + guint16 PID; }; -struct _GstMpegTSPAT -{ - guint16 transport_stream_id; - guint8 version_number; - gboolean current_next_indicator; - guint8 section_number; - guint8 last_section_number; +struct _GstMpegTSPAT { + guint16 transport_stream_id; + guint8 version_number; + gboolean current_next_indicator; + guint8 section_number; + guint8 last_section_number; - GArray *entries; + GArray * entries; }; -typedef enum _MpegTsStreamFlags -{ +typedef enum _MpegTsStreamFlags { MPEGTS_STREAM_FLAG_STREAM_TYPE_UNKNOWN = 0x01, MPEGTS_STREAM_FLAG_PMT_VALID = 0x02, - MPEGTS_STREAM_FLAG_IS_VIDEO = 0x04 + MPEGTS_STREAM_FLAG_IS_VIDEO = 0x04 } MpegTsStreamFlags; /* Information associated to a single MPEG stream. */ -struct _GstMpegTSStream -{ - GstMpegTSDemux *demux; +struct _GstMpegTSStream { + GstMpegTSDemux * demux; - MpegTsStreamFlags flags; + MpegTsStreamFlags flags; /* PID and type */ - guint16 PID; - guint8 PID_type; + guint16 PID; + guint8 PID_type; /* adaptation_field data */ - guint64 last_PCR; - guint64 base_PCR; - guint64 last_OPCR; - guint64 last_PCR_difference; - gboolean discont_PCR; - GstClockTimeDiff discont_difference; + guint64 last_PCR; + guint64 base_PCR; + guint64 last_OPCR; + guint64 last_PCR_difference; + gboolean discont_PCR; + GstClockTimeDiff discont_difference; /* for PAT streams */ - GstMpegTSPAT PAT; + GstMpegTSPAT PAT; /* for PMT streams */ - GstMpegTSPMT PMT; + GstMpegTSPMT PMT; /* for CA streams */ /* for PAT, PMT, CA and private streams */ - GstSectionFilter section_filter; + GstSectionFilter section_filter; /* for PES streams */ - guint8 id; - guint8 stream_type; - GstBuffer *pes_buffer; - guint32 pes_buffer_size; - guint32 pes_buffer_used; - gboolean pes_buffer_overflow; - gboolean pes_buffer_in_sync; - GstPESFilter filter; - GstPad *pad; - GstFlowReturn last_ret; + guint8 id; + guint8 stream_type; + GstBuffer * pes_buffer; + guint32 pes_buffer_size; + guint32 pes_buffer_used; + gboolean pes_buffer_overflow; + gboolean pes_buffer_in_sync; + GstPESFilter filter; + GstPad * pad; + GstFlowReturn last_ret; GstMPEGDescriptor *ES_info; /* needed because 33bit mpeg timestamps wrap around every (approx) 26.5 hrs */ - GstClockTimeDiff base_time; - GstClockTime last_time; + GstClockTimeDiff base_time; + GstClockTime last_time; /* pid of PMT that this stream belongs to */ - guint16 PMT_pid; + guint16 PMT_pid; }; -struct _GstMpegTSDemux -{ - GstElement parent; +struct _GstMpegTSDemux { + GstElement parent; /* properties */ - gboolean check_crc; + gboolean check_crc; /* sink pad and adapter */ - GstPad *sinkpad; - GstAdapter *adapter; - guint8 **sync_lut; - guint sync_lut_len; + GstPad * sinkpad; + GstAdapter * adapter; + guint8 ** sync_lut; + guint sync_lut_len; /* current PMT PID */ - guint16 current_PMT; + guint16 current_PMT; /* Array of MPEGTS_MAX_PID + 1 stream entries */ - GstMpegTSStream **streams; + GstMpegTSStream ** streams; /* Array to perform pmts checks at gst_mpegts_demux_parse_adaptation_field */ - gboolean pmts_checked[MPEGTS_MAX_PID + 1]; - + gboolean pmts_checked[MPEGTS_MAX_PID + 1]; + /* Array of Elementary Stream pids for ts with PMT */ - guint16 *elementary_pids; - guint nb_elementary_pids; + guint16 * elementary_pids; + guint nb_elementary_pids; /* Program number to use */ - gint program_number; + gint program_number; /* indicates that we need to close our pad group, because we've added * at least one pad */ - gboolean need_no_more_pads; - guint16 packetsize; - gboolean m2ts_mode; + gboolean need_no_more_pads; + guint16 packetsize; + gboolean m2ts_mode; /* clocking */ - GstClock *clock; - GstClockTime clock_base; - /* Additional information required for seeking */ - guint64 num_packets; - gint64 bitrate; + GstClock * clock; + GstClockTime clock_base; + + /* Additional information required for seeking. + * num_packets: Number of packets outputted + * bitrate: estimated bitrate (based on pcr and num_packets */ + guint64 num_packets; + gint64 bitrate; + /* Two PCRs observations to calculate bitrate */ - gint64 pcr[2]; - GstClockTime cache_duration; + gint64 pcr[2]; + + /* Cached duration estimation */ + GstClockTime cache_duration; + /* Cached base_PCR in GStreamer time. */ - GstClockTime base_pts; + GstClockTime base_pts; }; -struct _GstMpegTSDemuxClass -{ - GstElementClass parent_class; +struct _GstMpegTSDemuxClass { + GstElementClass parent_class; - GstPadTemplate *sink_template; - GstPadTemplate *video_template; - GstPadTemplate *audio_template; - GstPadTemplate *private_template; + GstPadTemplate * sink_template; + GstPadTemplate * video_template; + GstPadTemplate * audio_template; + GstPadTemplate * private_template; }; -GType gst_mpegts_demux_get_type (void); +GType gst_mpegts_demux_get_type (void); -gboolean gst_mpegts_demux_plugin_init (GstPlugin * plugin); +gboolean gst_mpegts_demux_plugin_init (GstPlugin *plugin); G_END_DECLS + #endif /* __GST_MPEGTS_DEMUX_H__ */ -- cgit v1.2.1 From 432dd98321f011582e17043470d1e4639c880155 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 11 May 2009 16:40:46 +0200 Subject: mpegtsdemux: Change debugging levels for very frequent messages. This allows debugging with mpegtsdemux:4 while being able to track what's going on (and avoid taking up as much cpu for debugging as for the actual demuxing process). --- gst/mpegdemux/gstmpegtsdemux.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/gst/mpegdemux/gstmpegtsdemux.c b/gst/mpegdemux/gstmpegtsdemux.c index 99a499a0..213a4a22 100644 --- a/gst/mpegdemux/gstmpegtsdemux.c +++ b/gst/mpegdemux/gstmpegtsdemux.c @@ -843,7 +843,7 @@ gst_mpegts_demux_data_cb (GstPESFilter * filter, gboolean first, demux = stream->demux; srcpad = stream->pad; - GST_LOG_OBJECT (demux, "got data on PID 0x%04x", stream->PID); + GST_DEBUG_OBJECT (demux, "got data on PID 0x%04x", stream->PID); if (first && filter->pts != -1) { pts = filter->pts; @@ -947,7 +947,7 @@ gst_mpegts_demux_data_cb (GstPESFilter * filter, gboolean first, pts = -1; } - GST_LOG_OBJECT (demux, "setting PTS to (%" G_GUINT64_FORMAT ") time: %" + GST_DEBUG_OBJECT (demux, "setting PTS to (%" G_GUINT64_FORMAT ") time: %" GST_TIME_FORMAT " on buffer %p first buffer: %d base_time: %" GST_TIME_FORMAT, pts, GST_TIME_ARGS (time), buffer, first, GST_TIME_ARGS (stream->base_time)); @@ -996,7 +996,7 @@ gst_mpegts_demux_data_cb (GstPESFilter * filter, gboolean first, gst_mpegts_demux_send_new_segment (demux, stream, pts); } - GST_DEBUG_OBJECT (demux, "pushing buffer"); + GST_DEBUG_OBJECT (srcpad, "pushing buffer"); gst_buffer_set_caps (buffer, GST_PAD_CAPS (srcpad)); ret = gst_pad_push (srcpad, buffer); ret = gst_mpegts_demux_combine_flows (demux, stream, ret); @@ -1199,16 +1199,16 @@ gst_mpegts_stream_parse_pmt (GstMpegTSStream * stream, if (gst_mpegts_demux_calc_crc32 (data - 3, datalen) != 0) goto wrong_crc; - GST_DEBUG_OBJECT (demux, "PMT section_length: %d", datalen - 3); + GST_LOG_OBJECT (demux, "PMT section_length: %d", datalen - 3); PMT = &stream->PMT; /* check if version number changed */ version_number = (data[2] & 0x3e) >> 1; - GST_DEBUG_OBJECT (demux, "PMT version_number: %d", version_number); + GST_LOG_OBJECT (demux, "PMT version_number: %d", version_number); current_next_indicator = (data[2] & 0x01); - GST_DEBUG_OBJECT (demux, "PMT current_next_indicator %d", + GST_LOG_OBJECT (demux, "PMT current_next_indicator %d", current_next_indicator); if (current_next_indicator == 0) goto not_yet_applicable; @@ -1574,7 +1574,7 @@ gst_mpegts_demux_parse_adaptation_field (GstMpegTSStream * stream, if (length > 0) { guint8 flags = *data++; - GST_DEBUG_OBJECT (demux, "flags 0x%02x", flags); + GST_LOG_OBJECT (demux, "flags 0x%02x", flags); /* discontinuity flag */ if (flags & 0x80) { GST_DEBUG_OBJECT (demux, "discontinuity flag set"); @@ -1593,9 +1593,12 @@ gst_mpegts_demux_parse_adaptation_field (GstMpegTSStream * stream, pcr_ext = (pcr2 & 0x01ff); if (pcr_ext) pcr = (pcr * 300 + pcr_ext % 300) / 300; - GST_DEBUG_OBJECT (demux, "have PCR %" G_GUINT64_FORMAT " on PID 0x%04x " - "and last pcr is %" G_GUINT64_FORMAT, - pcr, stream->PID, stream->last_PCR); + GST_DEBUG_OBJECT (demux, + "have PCR %" G_GUINT64_FORMAT "(%" GST_TIME_FORMAT ") on PID 0x%04x " + "and last pcr is %" G_GUINT64_FORMAT " (%" GST_TIME_FORMAT ")", pcr, + GST_TIME_ARGS (MPEGTIME_TO_GSTTIME (pcr)), stream->PID, + stream->last_PCR, + GST_TIME_ARGS (MPEGTIME_TO_GSTTIME (stream->last_PCR))); /* pcr has been converted into units of 90Khz ticks * so assume discont if last pcr was > 900000 (10 second) lower */ if (stream->last_PCR != -1 && @@ -2119,7 +2122,7 @@ gst_mpegts_demux_parse_stream (GstMpegTSDemux * demux, GstMpegTSStream * stream, data += 3; datalen -= 3; - GST_DEBUG_OBJECT (demux, "afc 0x%x, pusi %d, PID 0x%04x datalen %u", + GST_LOG_OBJECT (demux, "afc 0x%x, pusi %d, PID 0x%04x datalen %u", adaptation_field_control, payload_unit_start_indicator, PID, datalen); ret = GST_FLOW_OK; @@ -2141,13 +2144,12 @@ gst_mpegts_demux_parse_stream (GstMpegTSDemux * demux, GstMpegTSStream * stream, data += consumed; datalen -= consumed; - GST_DEBUG_OBJECT (demux, "consumed: %u datalen: %u", consumed, datalen); + GST_LOG_OBJECT (demux, "consumed: %u datalen: %u", consumed, datalen); } /* If this packet has a payload, handle it */ if (adaptation_field_control & 0x1) { - GST_DEBUG_OBJECT (demux, "Packet payload %d bytes, PID 0x%04x", datalen, - PID); + GST_LOG_OBJECT (demux, "Packet payload %d bytes, PID 0x%04x", datalen, PID); /* For unknown streams, check if the PID is in the partial PIDs * list as an elementary stream and override the type if so -- cgit v1.2.1 From bc062b9acf1232ee5643dd7976741c7a47378cd6 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 11 May 2009 16:58:58 +0200 Subject: mpegtsdemux: Only take PCR from the active stream for bitrate estimation. --- gst/mpegdemux/gstmpegtsdemux.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/gst/mpegdemux/gstmpegtsdemux.c b/gst/mpegdemux/gstmpegtsdemux.c index 213a4a22..f07e1743 100644 --- a/gst/mpegdemux/gstmpegtsdemux.c +++ b/gst/mpegdemux/gstmpegtsdemux.c @@ -1694,16 +1694,23 @@ gst_mpegts_demux_parse_adaptation_field (GstMpegTSStream * stream, } stream->last_PCR_difference = pcr - stream->last_PCR; } + GST_DEBUG_OBJECT (demux, "valid pcr: %d last PCR difference: %" G_GUINT64_FORMAT, valid_pcr, stream->last_PCR_difference); if (valid_pcr) { - if (demux->pcr[0] == -1) { - demux->pcr[0] = pcr; - demux->num_packets = 0; - } /* Considering a difference of 1 sec ie 90000 ticks */ - else if (demux->pcr[1] == -1 && ((pcr - demux->pcr[0]) >= 90000)) { - demux->pcr[1] = pcr; + GstMpegTSStream *PMT_stream = demux->streams[demux->current_PMT]; + + if (PMT_stream && PMT_stream->PMT.PCR_PID == stream->PID) { + if (demux->pcr[0] == -1) { + GST_DEBUG ("RECORDING pcr[0]:%" G_GUINT64_FORMAT, pcr); + demux->pcr[0] = pcr; + demux->num_packets = 0; + } /* Considering a difference of 1 sec ie 90000 ticks */ + else if (demux->pcr[1] == -1 && ((pcr - demux->pcr[0]) >= 90000)) { + GST_DEBUG ("RECORDING pcr[1]:%" G_GUINT64_FORMAT, pcr); + demux->pcr[1] = pcr; + } } stream->last_PCR = pcr; -- cgit v1.2.1 From f9dfc44a67320b6f73bb34e05ec80e67e9c8c087 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 11 May 2009 16:59:20 +0200 Subject: mpegtsdemux: Protect bitrate estimation against bogus values. If the estimated bitrate is lower than 188 bytes, there's most likely something completely wrong with the two samples. If that happens, force recalculation. Use guint64 for observation PCR, I saw cases where it would overflow. --- gst/mpegdemux/gstmpegtsdemux.c | 21 +++++++++++++++++---- gst/mpegdemux/gstmpegtsdemux.h | 2 +- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/gst/mpegdemux/gstmpegtsdemux.c b/gst/mpegdemux/gstmpegtsdemux.c index f07e1743..cad385d0 100644 --- a/gst/mpegdemux/gstmpegtsdemux.c +++ b/gst/mpegdemux/gstmpegtsdemux.c @@ -2355,14 +2355,27 @@ gst_mpegts_demux_parse_transport_packet (GstMpegTSDemux * demux, MPEGTS_NORMAL_TS_PACKETSIZE - 1); if (demux->pcr[1] != -1 && demux->bitrate == -1) { - GST_DEBUG_OBJECT (demux, "stream->last_PCR_difference: %" G_GINT64_FORMAT + guint64 bitrate; + GST_DEBUG_OBJECT (demux, "pcr[0]:%" G_GUINT64_FORMAT, demux->pcr[0]); + GST_DEBUG_OBJECT (demux, "pcr[1]:%" G_GUINT64_FORMAT, demux->pcr[1]); + GST_DEBUG_OBJECT (demux, "diff in time %" GST_TIME_FORMAT, + GST_TIME_ARGS (MPEGTIME_TO_GSTTIME (demux->pcr[1] - demux->pcr[0]))); + GST_DEBUG_OBJECT (demux, "stream->last_PCR_difference: %" G_GUINT64_FORMAT ", demux->num_packets %" G_GUINT64_FORMAT, demux->pcr[1] - demux->pcr[0], demux->num_packets); - demux->bitrate = gst_util_uint64_scale (GST_SECOND, + bitrate = gst_util_uint64_scale (GST_SECOND, MPEGTS_NORMAL_TS_PACKETSIZE * demux->num_packets, MPEGTIME_TO_GSTTIME (demux->pcr[1] - demux->pcr[0])); - GST_DEBUG_OBJECT (demux, "bitrate is %" G_GINT64_FORMAT - " bytes per second", demux->bitrate); + /* somehow... I doubt a bitrate below one packet per second is valid */ + if (bitrate > MPEGTS_NORMAL_TS_PACKETSIZE - 1) { + demux->bitrate = bitrate; + GST_DEBUG_OBJECT (demux, "bitrate is %" G_GINT64_FORMAT + " bytes per second", demux->bitrate); + } else { + GST_WARNING_OBJECT (demux, "Couldn't compute valid bitrate, recomputing"); + demux->pcr[0] = demux->pcr[1] = -1; + demux->num_packets = -1; + } } demux->num_packets++; return ret; diff --git a/gst/mpegdemux/gstmpegtsdemux.h b/gst/mpegdemux/gstmpegtsdemux.h index 2e2a8e63..dad2b023 100644 --- a/gst/mpegdemux/gstmpegtsdemux.h +++ b/gst/mpegdemux/gstmpegtsdemux.h @@ -213,7 +213,7 @@ struct _GstMpegTSDemux { gint64 bitrate; /* Two PCRs observations to calculate bitrate */ - gint64 pcr[2]; + guint64 pcr[2]; /* Cached duration estimation */ GstClockTime cache_duration; -- cgit v1.2.1 From 270cd7c421118af2d6f86535c495e216b5e821d2 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 8 May 2009 10:43:27 +0100 Subject: resindvd: Implement navigation command change message and query Send messages when the available DVD navigation commands changes, and handle navigation commands and angles queries. --- ext/resindvd/resindvdsrc.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++ ext/resindvd/resindvdsrc.h | 1 + 2 files changed, 73 insertions(+) diff --git a/ext/resindvd/resindvdsrc.c b/ext/resindvd/resindvdsrc.c index 54a39be1..22f6430b 100644 --- a/ext/resindvd/resindvdsrc.c +++ b/ext/resindvd/resindvdsrc.c @@ -134,6 +134,7 @@ static gboolean rsn_dvdsrc_src_event (RsnBaseSrc * basesrc, GstEvent * event); static gboolean rsn_dvdsrc_src_query (RsnBaseSrc * basesrc, GstQuery * query); static GstClockTime ifotime_to_gsttime (dvd_time_t * ifo_time); +static void rsn_dvdsrc_send_commands_changed (resinDvdSrc * src); static GstClockTime ifotime_to_gsttime (dvd_time_t * ifo_time) @@ -398,6 +399,8 @@ rsn_dvdsrc_start (RsnBaseSrc * bsrc) src->angles_changed = FALSE; src->n_angles = 0; + src->commands_changed = TRUE; + src->cur_spu_phys_stream = -1; src->cur_spu_forced_only = FALSE; memset (src->cur_clut, 0, sizeof (guint32) * 16); @@ -1062,6 +1065,57 @@ branching: return GST_FLOW_WRONG_STATE; } +/* Send app a bus message that the available commands have changed */ +static void +rsn_dvdsrc_send_commands_changed (resinDvdSrc * src) +{ + GstMessage *cmds_msg = + gst_navigation_message_new_commands_changed (GST_OBJECT_CAST (src)); + gst_element_post_message (GST_ELEMENT_CAST (src), cmds_msg); +} + +static gboolean +rsn_dvdsrc_handle_cmds_query (resinDvdSrc * src, GstQuery * query) +{ + return FALSE; +} + +static gboolean +rsn_dvdsrc_handle_angles_query (resinDvdSrc * src, GstQuery * query) +{ + gint cur_agl, n_angles; + gboolean res = FALSE; + + g_mutex_lock (src->dvd_lock); + if (dvdnav_get_angle_info (src->dvdnav, &cur_agl, + &n_angles) == DVDNAV_STATUS_OK) { + gst_navigation_query_set_angles (query, cur_agl, n_angles); + res = TRUE; + } + g_mutex_unlock (src->dvd_lock); + + return res; +} + +static gboolean +rsn_dvdsrc_handle_navigation_query (resinDvdSrc * src, + GstNavigationQueryType nq_type, GstQuery * query) +{ + gboolean res; + switch (nq_type) { + case GST_NAVIGATION_QUERY_COMMANDS: + res = rsn_dvdsrc_handle_cmds_query (src, query); + break; + case GST_NAVIGATION_QUERY_ANGLES: + res = rsn_dvdsrc_handle_angles_query (src, query); + break; + default: + res = FALSE; + } + + return res; +} + static GstFlowReturn rsn_dvdsrc_prepare_next_block (resinDvdSrc * src, gboolean have_dvd_lock) { @@ -1094,6 +1148,7 @@ rsn_dvdsrc_create (RsnPushSrc * psrc, GstBuffer ** outbuf) GstEvent *audio_select_event = NULL; GstEvent *highlight_event = NULL; GstMessage *angles_msg = NULL; + gboolean cmds_changed = FALSE; *outbuf = NULL; @@ -1128,6 +1183,11 @@ rsn_dvdsrc_create (RsnPushSrc * psrc, GstBuffer ** outbuf) src->angles_changed = FALSE; } + if (src->commands_changed) { + cmds_changed = TRUE; + src->commands_changed = FALSE; + } + g_mutex_unlock (src->dvd_lock); /* Push in-band events now that we've dropped the dvd_lock, before @@ -1201,6 +1261,9 @@ rsn_dvdsrc_create (RsnPushSrc * psrc, GstBuffer ** outbuf) gst_element_post_message (GST_ELEMENT_CAST (src), angles_msg); } + if (cmds_changed) + rsn_dvdsrc_send_commands_changed (src); + return ret; } @@ -2261,6 +2324,15 @@ rsn_dvdsrc_src_query (RsnBaseSrc * basesrc, GstQuery * query) } g_mutex_unlock (src->dvd_lock); break; + case GST_QUERY_CUSTOM: + { + GstNavigationQueryType nq_type = gst_navigation_query_get_type (query); + if (nq_type != GST_NAVIGATION_QUERY_INVALID) + res = rsn_dvdsrc_handle_navigation_query (src, nq_type, query); + else + res = GST_BASE_SRC_CLASS (parent_class)->query (basesrc, query); + break; + } default: res = GST_BASE_SRC_CLASS (parent_class)->query (basesrc, query); break; diff --git a/ext/resindvd/resindvdsrc.h b/ext/resindvd/resindvdsrc.h index f55b454f..fd03466a 100644 --- a/ext/resindvd/resindvdsrc.h +++ b/ext/resindvd/resindvdsrc.h @@ -119,6 +119,7 @@ struct _resinDvdSrc GstEvent *highlight_event; gboolean angles_changed; + gboolean commands_changed; /* GList of NAV packets awaiting activation, and the * running times to activate them. */ -- cgit v1.2.1 From 86d908589c4ef2d715e4f015c2455a19de322a51 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 8 May 2009 14:20:32 +0100 Subject: resindvd: Send title info message when current angle is switched. Make sure we send an update title tag when the current angle or available angles changes. --- ext/resindvd/resindvdsrc.c | 12 ++++++++---- ext/resindvd/resindvdsrc.h | 3 ++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ext/resindvd/resindvdsrc.c b/ext/resindvd/resindvdsrc.c index 22f6430b..b95e5c4a 100644 --- a/ext/resindvd/resindvdsrc.c +++ b/ext/resindvd/resindvdsrc.c @@ -398,6 +398,7 @@ rsn_dvdsrc_start (RsnBaseSrc * bsrc) src->angles_changed = FALSE; src->n_angles = 0; + src->cur_angle = 0; src->commands_changed = TRUE; @@ -761,17 +762,20 @@ update_title_info (resinDvdSrc * src) if (dvdnav_get_angle_info (src->dvdnav, &cur_agl, &n_angles) == DVDNAV_STATUS_OK && src->n_angles != n_angles) { + /* Make sure we send an angles-changed message soon */ src->angles_changed = TRUE; - src->n_angles = n_angles; } if (dvdnav_current_title_info (src->dvdnav, &title_n, &part_n) == DVDNAV_STATUS_OK) { - if (title_n != src->title_n || part_n != src->part_n || src->angles_changed) { + if (title_n != src->title_n || part_n != src->part_n || + src->n_angles != n_angles || src->cur_angle != cur_agl) { gchar *title_str = NULL; src->title_n = title_n; src->part_n = part_n; + src->n_angles = n_angles; + src->cur_angle = cur_agl; if (title_n == 0) { static const char *dvd_menu_map[] = { @@ -1178,7 +1182,6 @@ rsn_dvdsrc_create (RsnPushSrc * psrc, GstBuffer ** outbuf) angles_msg = gst_navigation_message_new_angles_changed (GST_OBJECT_CAST (src), cur, agls); - src->n_angles = agls; } src->angles_changed = FALSE; } @@ -1626,9 +1629,10 @@ rsn_dvdsrc_handle_navigation_event (resinDvdSrc * src, GstEvent * event) angles_msg = gst_navigation_message_new_angles_changed (GST_OBJECT_CAST (src), cur, agls); - src->n_angles = agls; } src->angles_changed = FALSE; + + update_title_info (src); } g_mutex_unlock (src->dvd_lock); diff --git a/ext/resindvd/resindvdsrc.h b/ext/resindvd/resindvdsrc.h index fd03466a..0d883744 100644 --- a/ext/resindvd/resindvdsrc.h +++ b/ext/resindvd/resindvdsrc.h @@ -76,6 +76,8 @@ struct _resinDvdSrc gboolean in_menu; gint title_n; /* Title num */ gint part_n; /* Part num */ + gint n_angles; /* number of angles */ + gint cur_angle; /* current angle */ gboolean running; gboolean discont; @@ -136,7 +138,6 @@ struct _resinDvdSrc gint8 cur_spu_phys_stream; gboolean cur_spu_forced_only; guint32 cur_clut[16]; - gint n_angles; }; struct _resinDvdSrcClass -- cgit v1.2.1 From 9f01bd64349cc14c25991cea5e054f286ab732bf Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 8 May 2009 14:23:48 +0100 Subject: resindvd: Remove per-menu description from the TITLE tag The part number reported while in a menu doesn't reflect the selected menu, so it's pointless to use it to report which menu we're in (Audio, Angle etc). Just report "DVD Menu" in the title tag instead. --- ext/resindvd/resindvdsrc.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/ext/resindvd/resindvdsrc.c b/ext/resindvd/resindvdsrc.c index b95e5c4a..7b6a7415 100644 --- a/ext/resindvd/resindvdsrc.c +++ b/ext/resindvd/resindvdsrc.c @@ -778,18 +778,8 @@ update_title_info (resinDvdSrc * src) src->cur_angle = cur_agl; if (title_n == 0) { - static const char *dvd_menu_map[] = { - NULL, NULL, "Title", "Root", - "Subpicture", "Audio", "Angle", "Part" - }; - /* In a menu */ - if (part_n >= 0 && part_n < G_N_ELEMENTS (dvd_menu_map) - && dvd_menu_map[part_n]) { - title_str = g_strdup_printf ("DVD %s Menu", dvd_menu_map[part_n]); - } else { - title_str = g_strdup ("DVD Menu"); - } + title_str = g_strdup ("DVD Menu"); } else { /* In a title */ if (n_angles > 1) { -- cgit v1.2.1 From f2f79cd4108add0071f868c5d8e8857d3421c707 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 8 May 2009 16:06:01 +0100 Subject: resindvd: Simplify some stuff. Remove an unnecessary LOG message. Skip attempting to schedule a nav block unless we're in PLAYING. Take a lock slightly later, when we actually need it. Remove a noisy LOG message. --- ext/resindvd/resindvdsrc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ext/resindvd/resindvdsrc.c b/ext/resindvd/resindvdsrc.c index 7b6a7415..479a883a 100644 --- a/ext/resindvd/resindvdsrc.c +++ b/ext/resindvd/resindvdsrc.c @@ -665,7 +665,7 @@ rsn_dvdsrc_do_still (resinDvdSrc * src, int duration) /* FIXME: Implement timed stills by sleeping on the clock, possibly * in multiple steps if we get paused/unpaused */ g_mutex_unlock (src->dvd_lock); - GST_LOG_OBJECT (src, "cond_timed_wait still"); + GST_LOG_OBJECT (src, "cond_timed_wait still for %d sec", duration); was_signalled = g_cond_timed_wait (src->still_cond, src->branch_lock, &end_time); was_signalled |= src->branching; @@ -2109,19 +2109,19 @@ rsn_dvdsrc_nav_clock_cb (GstClock * clock, GstClockTime time, GstClockID id, return TRUE; } +/* Called with dvd_lock held */ static void rsn_dvdsrc_schedule_nav_cb (resinDvdSrc * src, RsnDvdPendingNav * next_nav) { GstClock *clock; GstClockTime base_ts; - GST_OBJECT_LOCK (src); if (!src->in_playing) { GST_LOG_OBJECT (src, "Not scheduling NAV block - state != PLAYING"); - GST_OBJECT_UNLOCK (src); return; /* Not in playing state yet */ } + GST_OBJECT_LOCK (src); clock = GST_ELEMENT_CLOCK (src); base_ts = GST_ELEMENT (src)->base_time; @@ -2144,6 +2144,7 @@ rsn_dvdsrc_schedule_nav_cb (resinDvdSrc * src, RsnDvdPendingNav * next_nav) gst_object_unref (clock); } +/* Called with dvd_lock held */ static void rsn_dvdsrc_check_nav_blocks (resinDvdSrc * src) { @@ -2154,9 +2155,10 @@ rsn_dvdsrc_check_nav_blocks (resinDvdSrc * src) return; /* Something already scheduled */ } if (src->pending_nav_blocks == NULL) { - GST_LOG_OBJECT (src, "No NAV blocks to schedule"); return; /* No nav blocks available yet */ } + if (!src->in_playing) + return; /* Not in playing state yet */ GST_LOG_OBJECT (src, "Installing NAV callback"); next_nav = (RsnDvdPendingNav *) src->pending_nav_blocks->data; @@ -2164,8 +2166,6 @@ rsn_dvdsrc_check_nav_blocks (resinDvdSrc * src) rsn_dvdsrc_schedule_nav_cb (src, next_nav); } -/* Use libdvdread to read and cache info from the IFO file about - * streams in each VTS */ static gboolean rsn_dvdsrc_src_event (RsnBaseSrc * basesrc, GstEvent * event) { -- cgit v1.2.1 From c0854113a18003cc4a717a49b674f7a2038fa602 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 8 May 2009 16:27:31 +0100 Subject: resindvd: Ensure we send a title tag in the first play section. --- ext/resindvd/resindvdsrc.c | 79 ++++++++++++++++++++++++---------------------- 1 file changed, 42 insertions(+), 37 deletions(-) diff --git a/ext/resindvd/resindvdsrc.c b/ext/resindvd/resindvdsrc.c index 479a883a..f479da2a 100644 --- a/ext/resindvd/resindvdsrc.c +++ b/ext/resindvd/resindvdsrc.c @@ -767,48 +767,54 @@ update_title_info (resinDvdSrc * src) } if (dvdnav_current_title_info (src->dvdnav, &title_n, - &part_n) == DVDNAV_STATUS_OK) { - if (title_n != src->title_n || part_n != src->part_n || - src->n_angles != n_angles || src->cur_angle != cur_agl) { - gchar *title_str = NULL; - - src->title_n = title_n; - src->part_n = part_n; - src->n_angles = n_angles; - src->cur_angle = cur_agl; - - if (title_n == 0) { - /* In a menu */ - title_str = g_strdup ("DVD Menu"); - } else { - /* In a title */ - if (n_angles > 1) { - title_str = g_strdup_printf ("Title %i, Chapter %i, Angle %i of %i", - title_n, part_n, cur_agl, n_angles); + &part_n) != DVDNAV_STATUS_OK) { + if (!src->in_menu) + return; /* Can't update now */ + /* Must be in the first play sequence */ + title_n = -1; + part_n = 0; + } + + if (title_n != src->title_n || part_n != src->part_n || + src->n_angles != n_angles || src->cur_angle != cur_agl) { + gchar *title_str = NULL; + + src->title_n = title_n; + src->part_n = part_n; + src->n_angles = n_angles; + src->cur_angle = cur_agl; + + if (title_n == 0) { + /* In a menu */ + title_str = g_strdup ("DVD Menu"); + } else if (title_n > 0) { + /* In a title */ + if (n_angles > 1) { + title_str = g_strdup_printf ("Title %i, Chapter %i, Angle %i of %i", + title_n, part_n, cur_agl, n_angles); - } else { - title_str = g_strdup_printf ("Title %i, Chapter %i", title_n, part_n); - } + } else { + title_str = g_strdup_printf ("Title %i, Chapter %i", title_n, part_n); } + } - if (src->disc_name && src->disc_name[0]) { - /* We have a name for this disc, publish it */ - if (title_str) { - gchar *new_title_str = - g_strdup_printf ("%s, %s", title_str, src->disc_name); - g_free (title_str); - title_str = new_title_str; - } else { - title_str = g_strdup (src->disc_name); - } - } + if (src->disc_name && src->disc_name[0]) { + /* We have a name for this disc, publish it */ if (title_str) { - GstTagList *tags = gst_tag_list_new (); - gst_tag_list_add (tags, GST_TAG_MERGE_REPLACE, GST_TAG_TITLE, - title_str, NULL); - gst_element_found_tags (GST_ELEMENT_CAST (src), tags); + gchar *new_title_str = + g_strdup_printf ("%s, %s", title_str, src->disc_name); + g_free (title_str); + title_str = new_title_str; + } else { + title_str = g_strdup (src->disc_name); } } + if (title_str) { + GstTagList *tags = gst_tag_list_new (); + gst_tag_list_add (tags, GST_TAG_MERGE_REPLACE, GST_TAG_TITLE, + title_str, NULL); + gst_element_found_tags (GST_ELEMENT_CAST (src), tags); + } } } @@ -911,7 +917,6 @@ rsn_dvdsrc_step (resinDvdSrc * src, gboolean have_dvd_lock) src->next_is_nav_block = FALSE; src->next_nav_ts = GST_CLOCK_TIME_NONE; } - break; } case DVDNAV_STOP: -- cgit v1.2.1 From 64b6d247d4428ce3dadcbe8729cc891a8891c7db Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 8 May 2009 16:29:20 +0100 Subject: resindvd: Rename the audio munger debug category Rename a debug category: rsn_audiomunge -> rsnaudiomunge. --- ext/resindvd/rsnaudiomunge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/resindvd/rsnaudiomunge.c b/ext/resindvd/rsnaudiomunge.c index fc7e552f..c44d7d2e 100644 --- a/ext/resindvd/rsnaudiomunge.c +++ b/ext/resindvd/rsnaudiomunge.c @@ -86,8 +86,8 @@ rsn_audiomunge_class_init (RsnAudioMungeClass * klass) "Jan Schmidt " }; - GST_DEBUG_CATEGORY_INIT (rsn_audiomunge_debug, "rsn_audiomunge", - 0, "Resin audio stream regulator"); + GST_DEBUG_CATEGORY_INIT (rsn_audiomunge_debug, "rsnaudiomunge", + 0, "ResinDVD audio stream regulator"); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&src_template)); -- cgit v1.2.1 From 571a7746fcf18fba066779a43c23683a9d554051 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 8 May 2009 17:40:48 +0100 Subject: dvdspu: Add a guard when we don't have any subpicture buffer to render --- gst/dvdspu/gstdvdspu-render.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gst/dvdspu/gstdvdspu-render.c b/gst/dvdspu/gstdvdspu-render.c index e3bae8b6..a8dadee2 100644 --- a/gst/dvdspu/gstdvdspu-render.c +++ b/gst/dvdspu/gstdvdspu-render.c @@ -400,6 +400,8 @@ gst_dvd_spu_render_spu (GstDVDSpu * dvdspu, GstBuffer * buf) gint y, last_y; /* Set up our initial state */ + if (G_UNLIKELY (state->pix_buf == NULL)) + return; /* Store the start of each plane */ planes[0] = GST_BUFFER_DATA (buf); -- cgit v1.2.1 From 513367a88cb5875c92418f9c2a93b0f3f19ab99a Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 8 May 2009 17:42:12 +0100 Subject: dvdspu: Always push a frame at the start of a still frame, and fix a leak. Make sure to push the frame for a still frame, with discont = true and timestamp=none, so that it gets displayed by the sink. Also, don't leak each rendered video frame during still menus. --- gst/dvdspu/gstdvdspu.c | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/gst/dvdspu/gstdvdspu.c b/gst/dvdspu/gstdvdspu.c index 3b4c1a0c..50b6b603 100644 --- a/gst/dvdspu/gstdvdspu.c +++ b/gst/dvdspu/gstdvdspu.c @@ -94,7 +94,7 @@ static GstFlowReturn gst_dvd_spu_video_chain (GstPad * pad, GstBuffer * buf); static gboolean gst_dvd_spu_video_event (GstPad * pad, GstEvent * event); static GstFlowReturn gst_dvd_spu_buffer_alloc (GstPad * sinkpad, guint64 offset, guint size, GstCaps * caps, GstBuffer ** buf); -static void gst_dvd_spu_redraw_still (GstDVDSpu * dvdspu); +static void gst_dvd_spu_redraw_still (GstDVDSpu * dvdspu, gboolean force); static void gst_dvd_spu_check_still_updates (GstDVDSpu * dvdspu); static GstFlowReturn gst_dvd_spu_subpic_chain (GstPad * pad, GstBuffer * buf); @@ -429,7 +429,7 @@ gst_dvd_spu_video_event (GstPad * pad, GstEvent * event) /* And re-draw the still frame to make sure it appears on * screen, otherwise the last frame might have been discarded * by QoS */ - gst_dvd_spu_redraw_still (dvdspu); + gst_dvd_spu_redraw_still (dvdspu, TRUE); } else state->flags &= ~(SPU_STATE_STILL_FRAME); DVD_SPU_UNLOCK (dvdspu); @@ -633,15 +633,17 @@ no_ref_frame: /* With SPU LOCK */ static void -gst_dvd_spu_redraw_still (GstDVDSpu * dvdspu) +gst_dvd_spu_redraw_still (GstDVDSpu * dvdspu, gboolean force) { /* If we have an active SPU command set and a reference frame, copy the * frame, redraw the SPU and store it as the pending frame for output */ if (dvdspu->ref_frame) { - if ((dvdspu->spu_state.flags & SPU_STATE_FORCED_DSP) || - ((dvdspu->spu_state.flags & SPU_STATE_FORCED_ONLY) == 0 && - (dvdspu->spu_state.flags & SPU_STATE_DISPLAY))) { - GstBuffer *buf = gst_buffer_copy (dvdspu->ref_frame); + gboolean redraw = (dvdspu->spu_state.flags & SPU_STATE_FORCED_DSP); + redraw |= (dvdspu->spu_state.flags & SPU_STATE_FORCED_ONLY) == 0 && + (dvdspu->spu_state.flags & SPU_STATE_DISPLAY); + + if (redraw) { + GstBuffer *buf = gst_buffer_ref (dvdspu->ref_frame); buf = gst_buffer_make_writable (buf); @@ -654,9 +656,21 @@ gst_dvd_spu_redraw_still (GstDVDSpu * dvdspu) /* Render the SPU overlay onto the buffer */ gst_dvd_spu_render_spu (dvdspu, buf); gst_buffer_replace (&dvdspu->pending_frame, buf); + gst_buffer_unref (buf); + } else if (force) { + /* Simply output the reference frame */ + GstBuffer *buf = gst_buffer_ref (dvdspu->ref_frame); + buf = gst_buffer_make_metadata_writable (buf); + GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DISCONT); + GST_BUFFER_TIMESTAMP (buf) = GST_CLOCK_TIME_NONE; + GST_BUFFER_DURATION (buf) = GST_CLOCK_TIME_NONE; + + GST_DEBUG_OBJECT (dvdspu, "Pushing reference frame at start of still"); + + gst_buffer_replace (&dvdspu->pending_frame, buf); + gst_buffer_unref (buf); } else { - GST_LOG_OBJECT (dvdspu, - "Redraw due to Still Frame skipped - no SPU to draw"); + GST_LOG_OBJECT (dvdspu, "Redraw due to Still Frame skipped"); } } else { GST_LOG_OBJECT (dvdspu, "Not redrawing still frame - no ref frame"); @@ -1000,7 +1014,7 @@ gst_dvd_spu_handle_dvd_event (GstDVDSpu * dvdspu, GstEvent * event) } if (hl_change && (state->flags & SPU_STATE_STILL_FRAME)) { - gst_dvd_spu_redraw_still (dvdspu); + gst_dvd_spu_redraw_still (dvdspu, FALSE); } gst_event_unref (event); -- cgit v1.2.1 From ad1f7e6ed3848e5ece2e796ef9dc356485d19e56 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Mon, 11 May 2009 11:04:25 +0100 Subject: dvdspu: Make the debugging output a bit clearer. Display more info about custom DVD events in the debug messages. --- gst/dvdspu/gstdvdspu.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/gst/dvdspu/gstdvdspu.c b/gst/dvdspu/gstdvdspu.c index 50b6b603..82048529 100644 --- a/gst/dvdspu/gstdvdspu.c +++ b/gst/dvdspu/gstdvdspu.c @@ -413,13 +413,14 @@ gst_dvd_spu_video_event (GstPad * pad, GstEvent * event) break; } - GST_DEBUG_OBJECT (dvdspu, - "DVD event of type %s on video pad", event_type); - if (strcmp (event_type, "dvd-still") == 0) { gboolean in_still; if (gst_structure_get_boolean (structure, "still-state", &in_still)) { + GST_DEBUG_OBJECT (dvdspu, + "DVD event of type %s on video pad: in-still = %d", event_type, + in_still); + DVD_SPU_LOCK (dvdspu); if (in_still) { state->flags |= SPU_STATE_STILL_FRAME; @@ -430,14 +431,18 @@ gst_dvd_spu_video_event (GstPad * pad, GstEvent * event) * screen, otherwise the last frame might have been discarded * by QoS */ gst_dvd_spu_redraw_still (dvdspu, TRUE); - } else + } else { state->flags &= ~(SPU_STATE_STILL_FRAME); + } DVD_SPU_UNLOCK (dvdspu); } gst_event_unref (event); res = TRUE; - } else + } else { + GST_DEBUG_OBJECT (dvdspu, + "DVD event of type %s on video pad", event_type); res = gst_pad_event_default (pad, event); + } break; } case GST_EVENT_NEWSEGMENT: -- cgit v1.2.1 From 79f653fde8d6ff1ecee3147ca8afb42f8cec981a Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Mon, 11 May 2009 11:06:03 +0100 Subject: resindvd: Change the audiomunge debug output. Make sure we always show information about the segment events passing through, even when pre-roll audio buffers aren't going to be needed. --- ext/resindvd/rsnaudiomunge.c | 51 +++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/ext/resindvd/rsnaudiomunge.c b/ext/resindvd/rsnaudiomunge.c index c44d7d2e..6368c49a 100644 --- a/ext/resindvd/rsnaudiomunge.c +++ b/ext/resindvd/rsnaudiomunge.c @@ -288,15 +288,12 @@ rsn_audiomunge_sink_event (GstPad * pad, GstEvent * event) gst_segment_set_newsegment_full (segment, update, rate, arate, format, start, stop, time); - if (munge->have_audio) { - ret = gst_pad_push_event (munge->srcpad, event); - break; - } - /* * FIXME: - * If the accum >= threshold or we're in a still frame and there's been - * no audio received, then we need to generate some audio data. + * If this is a segment update and accum >= threshold, + * or we're in a still frame and there's been no audio received, + * then we need to generate some audio data. + * * If caused by a segment start update (time advancing in a gap) adjust * the new-segment and send the buffer. * @@ -304,32 +301,38 @@ rsn_audiomunge_sink_event (GstPad * pad, GstEvent * event) * in the closing segment. */ if (!update) { - GST_DEBUG_OBJECT (munge, "Sending newsegment: start %" GST_TIME_FORMAT - " stop %" GST_TIME_FORMAT " accum now %" GST_TIME_FORMAT, + GST_DEBUG_OBJECT (munge, + "Sending newsegment: update %d start %" GST_TIME_FORMAT " stop %" + GST_TIME_FORMAT " accum now %" GST_TIME_FORMAT, update, GST_TIME_ARGS (start), GST_TIME_ARGS (stop), GST_TIME_ARGS (segment->accum)); ret = gst_pad_push_event (munge->srcpad, event); } - if (segment->accum >= AUDIO_FILL_THRESHOLD || munge->in_still) { - GST_DEBUG_OBJECT (munge, - "Sending audio fill: accum = %" GST_TIME_FORMAT " still-state=%d", - GST_TIME_ARGS (segment->accum), munge->in_still); - - /* Just generate a 100ms silence buffer for now. FIXME: Fill the gap */ - if (rsn_audiomunge_make_audio (munge, segment->start, - GST_SECOND / 10) == GST_FLOW_OK) - munge->have_audio = TRUE; - } else { - GST_LOG_OBJECT (munge, "Not sending audio fill buffer: " - "segment accum below thresh: accum = %" GST_TIME_FORMAT, - GST_TIME_ARGS (segment->accum)); + if (!munge->have_audio) { + if ((update && segment->accum >= AUDIO_FILL_THRESHOLD) + || munge->in_still) { + GST_DEBUG_OBJECT (munge, + "Sending audio fill with ts %" GST_TIME_FORMAT ": accum = %" + GST_TIME_FORMAT " still-state=%d", GST_TIME_ARGS (segment->start), + GST_TIME_ARGS (segment->accum), munge->in_still); + + /* Just generate a 100ms silence buffer for now. FIXME: Fill the gap */ + if (rsn_audiomunge_make_audio (munge, segment->start, + GST_SECOND / 10) == GST_FLOW_OK) + munge->have_audio = TRUE; + } else { + GST_LOG_OBJECT (munge, "Not sending audio fill buffer: " + "Not segment update, or segment accum below thresh: accum = %" + GST_TIME_FORMAT, GST_TIME_ARGS (segment->accum)); + } } if (update) { - GST_DEBUG_OBJECT (munge, "Sending newsegment: start %" GST_TIME_FORMAT - " stop %" GST_TIME_FORMAT " accum now %" GST_TIME_FORMAT, + GST_DEBUG_OBJECT (munge, + "Sending newsegment: update %d start %" GST_TIME_FORMAT " stop %" + GST_TIME_FORMAT " accum now %" GST_TIME_FORMAT, update, GST_TIME_ARGS (start), GST_TIME_ARGS (stop), GST_TIME_ARGS (segment->accum)); -- cgit v1.2.1 From 4204b644ef31c498ba27847dec3e8d6dbfd4eedd Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Mon, 11 May 2009 14:17:42 +0100 Subject: resindvd: Manage timed still sequences better Make timed still frames work better by extending the current segment when needed, and restarting the still sequence with the correct remaining duration when the wait it interrupted by activation of a highlight NAV packet. --- ext/resindvd/resindvdsrc.c | 71 +++++++++++++++++++++++++++++++++------------- ext/resindvd/resindvdsrc.h | 3 ++ 2 files changed, 54 insertions(+), 20 deletions(-) diff --git a/ext/resindvd/resindvdsrc.c b/ext/resindvd/resindvdsrc.c index f479da2a..15a2408d 100644 --- a/ext/resindvd/resindvdsrc.c +++ b/ext/resindvd/resindvdsrc.c @@ -590,6 +590,12 @@ rsn_dvdsrc_do_still (resinDvdSrc * src, int duration) if (src->in_still_state == FALSE) { GST_DEBUG_OBJECT (src, "**** Start STILL FRAME. Duration %d ****", duration); + + if (duration == 255) + src->still_time_remaining = GST_CLOCK_TIME_NONE; + else + src->still_time_remaining = GST_SECOND * duration; + /* Send a close-segment event, and a dvd-still start * event, then sleep */ s = gst_structure_new ("application/x-gst-dvd", @@ -622,7 +628,9 @@ rsn_dvdsrc_do_still (resinDvdSrc * src, int duration) src->in_still_state = TRUE; } else { - GST_DEBUG_OBJECT (src, "Re-entering still wait"); + GST_DEBUG_OBJECT (src, + "Re-entering still wait with %" GST_TIME_FORMAT " remaining", + GST_TIME_ARGS (src->still_time_remaining)); g_mutex_lock (src->branch_lock); } @@ -659,26 +667,42 @@ rsn_dvdsrc_do_still (resinDvdSrc * src, int duration) GTimeVal end_time; gboolean was_signalled; - g_get_current_time (&end_time); - g_time_val_add (&end_time, duration * G_USEC_PER_SEC); + if (src->still_time_remaining > 0) { + g_get_current_time (&end_time); + g_time_val_add (&end_time, src->still_time_remaining / GST_USECOND); - /* FIXME: Implement timed stills by sleeping on the clock, possibly - * in multiple steps if we get paused/unpaused */ - g_mutex_unlock (src->dvd_lock); - GST_LOG_OBJECT (src, "cond_timed_wait still for %d sec", duration); - was_signalled = - g_cond_timed_wait (src->still_cond, src->branch_lock, &end_time); - was_signalled |= src->branching; + /* Implement timed stills by sleeping, possibly + * in multiple steps if we get paused/unpaused */ + g_mutex_unlock (src->dvd_lock); + GST_LOG_OBJECT (src, "cond_timed_wait still for %d sec", duration); + was_signalled = + g_cond_timed_wait (src->still_cond, src->branch_lock, &end_time); + was_signalled |= src->branching; - g_mutex_unlock (src->branch_lock); - g_mutex_lock (src->dvd_lock); + g_mutex_unlock (src->branch_lock); + g_mutex_lock (src->dvd_lock); - if (was_signalled) { - /* Signalled - must be flushing */ - GST_LOG_OBJECT (src, - "cond_timed_wait still over. Signalled, branching = %d", - src->branching); - return TRUE; + if (was_signalled) { + /* Signalled - must be flushing */ + GTimeVal cur_time; + GstClockTimeDiff remain; + + g_get_current_time (&cur_time); + remain = + (end_time.tv_sec - cur_time.tv_sec) * GST_SECOND + + (end_time.tv_usec - cur_time.tv_usec) * GST_USECOND; + if (remain < 0) + src->still_time_remaining = 0; + else + src->still_time_remaining = remain; + + GST_LOG_OBJECT (src, + "cond_timed_wait still aborted by signal with %" GST_TIME_FORMAT + " remaining. branching = %d", + GST_TIME_ARGS (src->still_time_remaining), src->branching); + + return TRUE; + } } /* Else timed out, end the still */ @@ -690,12 +714,17 @@ rsn_dvdsrc_do_still (resinDvdSrc * src, int duration) } /* Tell downstream the still is over. - * Later: We'll only do this if the still isn't interrupted: */ + * We only do this if the still isn't interrupted: */ s = gst_structure_new ("application/x-gst-dvd", "event", G_TYPE_STRING, "dvd-still", "still-state", G_TYPE_BOOLEAN, FALSE, NULL); still_event = gst_event_new_custom (GST_EVENT_CUSTOM_DOWNSTREAM, s); + /* If the segment was too short in a timed still, it may need extending */ + if (segment->last_stop < segment->start + GST_SECOND * duration) + gst_segment_set_last_stop (segment, GST_FORMAT_TIME, + segment->start + (GST_SECOND * duration)); + g_mutex_unlock (src->dvd_lock); gst_pad_push_event (GST_BASE_SRC_PAD (src), still_event); g_mutex_lock (src->dvd_lock); @@ -2040,8 +2069,10 @@ rsn_dvdsrc_activate_nav_block (resinDvdSrc * src, GstBuffer * nav_buf) /* highlight might change, let's check */ rsn_dvdsrc_update_highlight (src); - if (src->highlight_event) + if (src->highlight_event && src->in_still_state) { + GST_LOG_OBJECT (src, "Signalling still condition due to highlight change"); g_cond_broadcast (src->still_cond); + } } static void diff --git a/ext/resindvd/resindvdsrc.h b/ext/resindvd/resindvdsrc.h index 0d883744..d30140ea 100644 --- a/ext/resindvd/resindvdsrc.h +++ b/ext/resindvd/resindvdsrc.h @@ -90,6 +90,9 @@ struct _resinDvdSrc gboolean was_mouse_over; + /* Remaining time to wait in a timed still: */ + GstClockTime still_time_remaining; + GstBuffer *alloc_buf; GstBuffer *next_buf; /* TRUE if the next_buf is a nav block that needs enqueueing */ -- cgit v1.2.1 From d7cabb080134403871f7962bf226b36197b4d6c3 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Mon, 11 May 2009 16:09:56 +0100 Subject: resindvd: Increase the amount of filler audio generated When creating a filler audio buffer in rsnaudiomunge, generate a bit more, as audio sinks don't seem to preroll otherwise. This needs a better algorithm in general, to intelligently fill the gap, rather than hard-coding a value. --- ext/resindvd/rsnaudiomunge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/resindvd/rsnaudiomunge.c b/ext/resindvd/rsnaudiomunge.c index 6368c49a..50d33be7 100644 --- a/ext/resindvd/rsnaudiomunge.c +++ b/ext/resindvd/rsnaudiomunge.c @@ -318,9 +318,9 @@ rsn_audiomunge_sink_event (GstPad * pad, GstEvent * event) GST_TIME_FORMAT " still-state=%d", GST_TIME_ARGS (segment->start), GST_TIME_ARGS (segment->accum), munge->in_still); - /* Just generate a 100ms silence buffer for now. FIXME: Fill the gap */ + /* Just generate a 200ms silence buffer for now. FIXME: Fill the gap */ if (rsn_audiomunge_make_audio (munge, segment->start, - GST_SECOND / 10) == GST_FLOW_OK) + GST_SECOND / 5) == GST_FLOW_OK) munge->have_audio = TRUE; } else { GST_LOG_OBJECT (munge, "Not sending audio fill buffer: " -- cgit v1.2.1 From 11a7e37325cae90f43a02d61cedd4ad09a2b21fd Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Mon, 11 May 2009 17:50:41 +0100 Subject: resindvd: Modify the segment update logic Send segment updates to the audio and subpicture pads more frequently, but less often to the video pad, where timestamps appear less often. This helps with gap filling on some DVDs. --- ext/resindvd/gstmpegdemux.c | 12 ++++++++++-- ext/resindvd/gstmpegdemux.h | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ext/resindvd/gstmpegdemux.c b/ext/resindvd/gstmpegdemux.c index d41ded0b..ed4b3d93 100644 --- a/ext/resindvd/gstmpegdemux.c +++ b/ext/resindvd/gstmpegdemux.c @@ -28,7 +28,8 @@ #include "gstmpegdefs.h" #include "gstmpegdemux.h" -#define SEGMENT_THRESHOLD (GST_SECOND/2) +#define SEGMENT_THRESHOLD (300*GST_MSECOND) +#define VIDEO_SEGMENT_THRESHOLD (500*GST_MSECOND) /* The SCR_MUNGE value is used to offset the scr_adjust value, to avoid * ever generating a negative timestamp */ @@ -248,6 +249,7 @@ gst_flups_demux_create_stream (GstFluPSDemux * demux, gint id, gint stream_type) gchar *name; GstFluPSDemuxClass *klass = GST_FLUPS_DEMUX_GET_CLASS (demux); GstCaps *caps; + GstClockTime threshold = SEGMENT_THRESHOLD; name = NULL; template = NULL; @@ -277,6 +279,7 @@ gst_flups_demux_create_stream (GstFluPSDemux * demux, gint id, gint stream_type) caps = gst_caps_new_simple ("video/mpeg", "mpegversion", G_TYPE_INT, mpeg_version, "systemstream", G_TYPE_BOOLEAN, FALSE, NULL); + threshold = VIDEO_SEGMENT_THRESHOLD; break; } case ST_AUDIO_MPEG1: @@ -296,6 +299,7 @@ gst_flups_demux_create_stream (GstFluPSDemux * demux, gint id, gint stream_type) template = klass->video_template; name = g_strdup_printf ("video_%02x", id); caps = gst_caps_new_simple ("video/x-h264", NULL); + threshold = VIDEO_SEGMENT_THRESHOLD; break; case ST_PS_AUDIO_AC3: template = klass->audio_template; @@ -335,6 +339,7 @@ gst_flups_demux_create_stream (GstFluPSDemux * demux, gint id, gint stream_type) stream->notlinked = FALSE; stream->type = stream_type; stream->pad = gst_pad_new_from_template (template, name); + stream->segment_thresh = threshold; gst_pad_set_event_function (stream->pad, gst_flups_demux_src_event); gst_pad_set_query_function (stream->pad, gst_flups_demux_src_query); gst_pad_use_fixed_caps (stream->pad); @@ -487,11 +492,14 @@ gst_flups_demux_send_segment_updates (GstFluPSDemux * demux, if (stream->last_ts == GST_CLOCK_TIME_NONE || stream->last_ts < demux->src_segment.start) stream->last_ts = demux->src_segment.start; - if (stream->last_ts + SEGMENT_THRESHOLD < new_time) { + if (stream->last_ts + stream->segment_thresh < new_time) { #if 0 g_print ("Segment update to pad %s time %" GST_TIME_FORMAT "\n", GST_PAD_NAME (stream->pad), GST_TIME_ARGS (new_time)); #endif + GST_DEBUG_OBJECT (demux, + "Segment update to pad %s time %" GST_TIME_FORMAT, + GST_PAD_NAME (stream->pad), GST_TIME_ARGS (new_time)); if (event == NULL) { event = gst_event_new_new_segment_full (TRUE, demux->src_segment.rate, demux->src_segment.applied_rate, diff --git a/ext/resindvd/gstmpegdemux.h b/ext/resindvd/gstmpegdemux.h index 3f38b088..b7b2d9fc 100644 --- a/ext/resindvd/gstmpegdemux.h +++ b/ext/resindvd/gstmpegdemux.h @@ -64,6 +64,7 @@ struct _GstFluPSStream { gboolean need_segment; GstClockTime last_ts; + GstClockTime segment_thresh; }; struct _GstFluPSDemux { -- cgit v1.2.1 From 32ab2bd04eb15545e5953aaca445c57a4d083ee3 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Tue, 12 May 2009 00:50:01 +0100 Subject: 0.10.11.2 pre-release --- ChangeLog | 1939 ++++++++++++++++++++++++++++++++++++++++++++++++- configure.ac | 2 +- po/af.po | 16 +- po/az.po | 16 +- po/bg.po | 16 +- po/ca.po | 16 +- po/cs.po | 16 +- po/da.po | 28 +- po/de.po | 16 +- po/en_GB.po | 16 +- po/es.po | 26 +- po/fi.po | 16 +- po/fr.po | 16 +- po/hu.po | 191 ++--- po/id.po | 16 +- po/it.po | 16 +- po/ky.po | 16 +- po/lt.po | 16 +- po/mt.po | 16 +- po/nb.po | 16 +- po/nl.po | 16 +- po/or.po | 16 +- po/pl.po | 16 +- po/pt_BR.po | 16 +- po/ru.po | 16 +- po/sk.po | 16 +- po/sq.po | 16 +- po/sr.po | 16 +- po/sv.po | 16 +- po/tr.po | 16 +- po/uk.po | 16 +- po/vi.po | 16 +- po/zh_CN.po | 16 +- win32/common/config.h | 2 +- 34 files changed, 2287 insertions(+), 349 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3e6e6424..a79d0230 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,1944 @@ +2009-05-11 17:50:41 +0100 Jan Schmidt + + * ext/resindvd/gstmpegdemux.c: + * ext/resindvd/gstmpegdemux.h: + resindvd: Modify the segment update logic + Send segment updates to the audio and subpicture pads more frequently, + but less often to the video pad, where timestamps appear less often. + This helps with gap filling on some DVDs. + +2009-05-11 16:09:56 +0100 Jan Schmidt + + * ext/resindvd/rsnaudiomunge.c: + resindvd: Increase the amount of filler audio generated + When creating a filler audio buffer in rsnaudiomunge, generate + a bit more, as audio sinks don't seem to preroll otherwise. This + needs a better algorithm in general, to intelligently fill the + gap, rather than hard-coding a value. + +2009-05-11 14:17:42 +0100 Jan Schmidt + + * ext/resindvd/resindvdsrc.c: + * ext/resindvd/resindvdsrc.h: + resindvd: Manage timed still sequences better + Make timed still frames work better by extending the current segment + when needed, and restarting the still sequence with the correct + remaining duration when the wait it interrupted by activation of a + highlight NAV packet. + +2009-05-11 11:06:03 +0100 Jan Schmidt + + * ext/resindvd/rsnaudiomunge.c: + resindvd: Change the audiomunge debug output. + Make sure we always show information about the segment events passing through, + even when pre-roll audio buffers aren't going to be needed. + +2009-05-11 11:04:25 +0100 Jan Schmidt + + * gst/dvdspu/gstdvdspu.c: + dvdspu: Make the debugging output a bit clearer. + Display more info about custom DVD events in the debug messages. + +2009-05-08 17:42:12 +0100 Jan Schmidt + + * gst/dvdspu/gstdvdspu.c: + dvdspu: Always push a frame at the start of a still frame, and fix a leak. + Make sure to push the frame for a still frame, with discont = true and + timestamp=none, so that it gets displayed by the sink. Also, don't leak + each rendered video frame during still menus. + +2009-05-08 17:40:48 +0100 Jan Schmidt + + * gst/dvdspu/gstdvdspu-render.c: + dvdspu: Add a guard when we don't have any subpicture buffer to render + +2009-05-08 16:29:20 +0100 Jan Schmidt + + * ext/resindvd/rsnaudiomunge.c: + resindvd: Rename the audio munger debug category + Rename a debug category: rsn_audiomunge -> rsnaudiomunge. + +2009-05-08 16:27:31 +0100 Jan Schmidt + + * ext/resindvd/resindvdsrc.c: + resindvd: Ensure we send a title tag in the first play section. + +2009-05-08 16:06:01 +0100 Jan Schmidt + + * ext/resindvd/resindvdsrc.c: + resindvd: Simplify some stuff. Remove an unnecessary LOG message. + Skip attempting to schedule a nav block unless we're in PLAYING. Take a lock + slightly later, when we actually need it. Remove a noisy LOG message. + +2009-05-08 14:23:48 +0100 Jan Schmidt + + * ext/resindvd/resindvdsrc.c: + resindvd: Remove per-menu description from the TITLE tag + The part number reported while in a menu doesn't reflect the selected + menu, so it's pointless to use it to report which menu we're in (Audio, + Angle etc). Just report "DVD Menu" in the title tag instead. + +2009-05-08 14:20:32 +0100 Jan Schmidt + + * ext/resindvd/resindvdsrc.c: + * ext/resindvd/resindvdsrc.h: + resindvd: Send title info message when current angle is switched. + Make sure we send an update title tag when the current angle or available + angles changes. + +2009-05-08 10:43:27 +0100 Jan Schmidt + + * ext/resindvd/resindvdsrc.c: + * ext/resindvd/resindvdsrc.h: + resindvd: Implement navigation command change message and query + Send messages when the available DVD navigation commands changes, and + handle navigation commands and angles queries. + +2009-05-11 16:59:20 +0200 Edward Hervey + + * gst/mpegdemux/gstmpegtsdemux.c: + * gst/mpegdemux/gstmpegtsdemux.h: + mpegtsdemux: Protect bitrate estimation against bogus values. + If the estimated bitrate is lower than 188 bytes, there's most likely + something completely wrong with the two samples. If that happens, + force recalculation. + Use guint64 for observation PCR, I saw cases where it would overflow. + +2009-05-11 16:58:58 +0200 Edward Hervey + + * gst/mpegdemux/gstmpegtsdemux.c: + mpegtsdemux: Only take PCR from the active stream for bitrate estimation. + +2009-05-11 16:40:46 +0200 Edward Hervey + + * gst/mpegdemux/gstmpegtsdemux.c: + mpegtsdemux: Change debugging levels for very frequent messages. + This allows debugging with mpegtsdemux:4 while being able to track what's + going on (and avoid taking up as much cpu for debugging as for the actual + demuxing process). + +2009-05-09 09:57:47 +0200 Edward Hervey + + * gst/mpegdemux/gstmpegtsdemux.h: + mpegtsdemux: Revert indentation and comment header file. + One shouldn't run gst-indent on .h files, in this case it was un-beautifying + the indentation :) + +2009-05-10 21:21:36 +0200 Mark Nauwelaerts + + * gst/qtmux/gstqtmuxmap.c: + gppmux: Add MPEG-4 part 2 to supported formats. Fixes #581593. + +2009-05-10 17:17:15 +0200 Sebastian Dröge + + * configure.ac: + faad: Fix configure check for the FAAD version + The previous version matched things like 297 for + version 2.7, etc which could be added to the file + by other headers. + Fixes bug #582074. + +2009-05-10 11:17:17 +0200 Marc-Andre Lureau + + * autogen.sh: + Run libtoolize before aclocal + This unbreaks the build in some cases. Fixes bug #582021 + +2009-05-10 10:40:36 +0200 Tristan Matthews + + * gst/mxf/mxfmux.c: + mxfmux: Fix uninitialized variable compiler warning + This will always be set to something but gcc didn't detect + this. Fixes bug #582013. + +2009-05-09 23:47:39 +0100 Christian Schaller + + * ext/x264/GstX264Enc.prs: + Remove wrong stuff from preset file + +2009-05-09 15:48:54 +0200 Sebastian Dröge + + * gst/mxf/mxfmux.c: + * gst/mxf/mxfmux.h: + mxfmux: Write metadata items in reference order + This ensures that the metadata items are always written + in the same order and that first comes the preface, + then the identification linked from the preface, ... + Some demuxers can't handle files where the metadata + items are in random order. + +2009-05-09 15:48:41 +0200 Sebastian Dröge + + * gst/mxf/mxfmux.c: + mxfmux: Fix EOS logic again + +2009-05-09 15:48:01 +0200 Sebastian Dröge + + * gst/mxf/mxfmux.c: + mxfmux: Don't unref NULL buffers if pushing a buffer after the first failed + +2009-05-09 12:42:25 +0100 Christian Schaller + + * ext/x264/GstX264Enc.prs: + Add a more representative example preset file for x264 + +2009-05-08 18:24:28 +0100 Zaheer Merali + + * gst/mpegdemux/gstmpegtsdemux.c: + * gst/mpegdemux/gstmpegtsdemux.h: + mpegtsdemux: Add initial naive seeking support and fix duration query. + Sync from gst-fluendo-mpegdemux and have seeking/duration query + improvements in. No support however for wrapped around pcrs etc. but a + start nonetheless. + Also fix indentation issues. + +2009-05-08 16:38:26 +0100 Christian Schaller + + * gst-plugins-bad.spec.in: + Comment out preset not in yet + +2009-05-08 15:39:24 +0200 Sebastian Dröge + + * gst/deinterlace2/gstdeinterlace2.c: + * gst/deinterlace2/gstdeinterlace2.h: + deinterlace2: Add a disabled mode for passthrough operation + Also allow to change the mode in PAUSED and PLAYING by updating + the caps if necessary. + +2009-05-07 17:53:42 +0100 Christian Schaller + + * ext/faac/gstfaac.c: + * ext/mpeg2enc/gstmpeg2enc.cc: + * ext/x264/gstx264enc.c: + * gst/flv/gstflvdemux.c: + * gst/mxf/mxf.c: + * gst/qtmux/gstqtmux.c: + Add ranks to various muxers and encoders in -bad + +2009-05-07 17:34:36 +0100 Christian Schaller + + * gst-plugins-bad.spec.in: + Update spec file + +2009-05-07 13:12:34 +0200 Rov Juvano + + * tests/examples/scaletempo/demo-player.c: + scaletempo: Don't require gconfaudiosink in the demo + Fixes bug #537700. + +2009-05-06 21:48:30 +0100 Jan Schmidt + + * ext/resindvd/resindvdsrc.c: + resindvd: Don't open all VTS ifo at the start + Load each VTS ifo the first time the disc enters that VTS, + rather than scanning them all at the start. + +2009-05-06 21:19:13 +0100 Jan Schmidt + + * ext/resindvd/resindvdsrc.c: + * ext/resindvd/resindvdsrc.h: + resindvd: Send a title tag when we change chapter/menu/angle + Allow apps like Totem to display a nicer title that reflects the current + position on the disc. + +2009-05-05 13:18:20 +0100 Jan Schmidt + + * ext/resindvd/resindvdsrc.c: + resindvd: Don't send highlight-reset messages when not needed + Fix a small bug that results in the SPU highlight being reset more often + than is necessary - ie, clearing it when it's already cleared. + +2009-05-05 13:14:47 +0100 Jan Schmidt + + * ext/resindvd/resindvdsrc.c: + * ext/resindvd/resindvdsrc.h: + resindvd: send angles-changed messages when appropriate + When the current angle changes, or the number of available angles changes, + send an angles-changed message to let the app know. + +2009-05-05 11:34:26 +0100 Jan Schmidt + + * ext/resindvd/resindvdsrc.c: + resindvd: Make the next/prev angle switching cycle at the ends + When the current angle is 1 and prev_angle is requested, loop to the + maximum angle and vice versa for next_angle + +2009-05-05 16:54:39 +0200 Arnout Vandecappelle + + * gst/mpeg4videoparse/mpeg4videoparse.c: + mpeg4videoparse: don't leak the config data + Clear the config data when going to READY or when disposed. + Fixes #581427 + +2009-05-05 16:48:37 +0200 Wim Taymans + + * gst/rtpmanager/gstrtpssrcdemux.c: + rtpssrcdemux: drop unexpected RTCP packets + We usually only get SR packets in our chain function but if an invalid packet + contains the SR packet after the RR packet, we must not fail but simply ignore + the malformed packet. + Fixes #581375 + +2009-05-04 22:09:05 +0100 Zaheer Abbas Merali + + * gst/mpegdemux/mpegtsparse.c: + * gst/mpegdemux/mpegtsparse.h: + mpegtsparse: Remember pids that are meant to be stream pids. + Fixes #569781 + +2009-05-04 12:37:31 +0200 Sebastian Dröge + + * ext/celt/gstceltenc.c: + celt: Implement preset interface + +2009-05-04 12:36:17 +0200 Sebastian Dröge + + * ext/dirac/gstdiracenc.cc: + dirac: Implement preset interface + +2009-05-04 12:34:59 +0200 Sebastian Dröge + + * ext/jp2k/gstjasperenc.c: + jp2kenc: Implement preset interface + +2009-05-04 12:33:41 +0200 Sebastian Dröge + + * ext/mpeg2enc/gstmpeg2enc.cc: + mpeg2enc: Implement Preset interface + +2009-05-04 12:31:58 +0200 Sebastian Dröge + + * ext/xvid/gstxvidenc.c: + xvid: Implement Preset interface + +2009-05-04 12:30:26 +0200 Sebastian Dröge + + * ext/faac/gstfaac.c: + faac: Implement preset interface + +2009-05-03 17:42:44 +0100 Vincent Genieux + + * gst/mpegdemux/mpegtspacketizer.c: + * gst/mpegdemux/mpegtspacketizer.h: + * gst/mpegdemux/mpegtsparse.c: + mpegtsparse: Ignore subtable extension when parsing PAT + Fixes #569673. + +2009-05-03 17:21:22 +0100 Vincent Genieux + + * gst/mpegdemux/mpegtsparse.c: + * gst/mpegdemux/mpegtsparse.h: + mpegtsparse: make safe changing the program-numbers property dynamically + Fixes #569437. + +2009-05-03 14:28:51 +0200 Mark Nauwelaerts + + * ext/libmms/gstmms.c: + mms: extend BaseSrc query handling rather than overriding + +2009-04-27 22:39:15 +0200 Mark Nauwelaerts + + * gst/aacparse/gstbaseparse.c: + * gst/amrparse/gstbaseparse.c: + * gst/flacparse/gstbaseparse.c: + baseparse: fix (regression in) newsegment handling + (aacparse, amrparse, flacparse). Fixes #580133. + +2009-05-02 12:23:03 +0100 Zaheer Merali + + * sys/dvb/gstdvbsrc.c: + dvbsrc: fix pes filter pid resetting + +2009-05-01 02:26:22 +0100 Tim-Philipp Müller + + * ext/dts/gstdtsdec.h: + dtsdec: cosmetic fix to header structure to make gtk-doc happy + +2009-05-01 14:25:40 +0100 Tim-Philipp Müller + + * docs/plugins/Makefile.am: + * docs/plugins/gst-plugins-bad-plugins-docs.sgml: + * docs/plugins/gst-plugins-bad-plugins-sections.txt: + * gst/debugutils/fpsdisplaysink.c: + docs: make fpsdisplaysink show up in the docs + +2009-05-01 02:21:10 +0100 Tim-Philipp Müller + + * gst/debugutils/fpsdisplaysink.c: + * gst/debugutils/fpsdisplaysink.h: + fpsdisplaysink: move private struct into plugin struct and use Gst namespace + +2009-05-01 01:59:56 +0100 Tim-Philipp Müller + + * docs/plugins/inspect/plugin-debugutilsbad.xml: + * docs/plugins/inspect/plugin-fpsdisplaysink.xml: + * gst/debugutils/Makefile.am: + * gst/debugutils/debugutilsbad.c: + * gst/debugutils/fpsdisplaysink.c: + fpsdisplaysink: rename plugin (not element) to debugutilsbad + Makes it easier to add further utils here without creating yet another plugin. + +2009-05-01 14:28:23 +0100 Zaheer Merali + + * sys/dvb/gstdvbsrc.c: + dvbsrc: unset pid filters correctly + +2009-04-30 14:43:36 -0300 Thiago Santos + + * gst/qtmux/gstqtmuxmap.c: + qtmux: changes caps of src pads to video/quicktime, variant=something + Take a look at bug #580005 for further info. + +2009-04-30 17:29:35 +0100 Christian Schaller + + Merge branch 'master' of ssh://uraeus@git.freedesktop.org/git/gstreamer/gst-plugins-bad + +2009-04-30 17:28:47 +0100 Christian Schaller + + * gst-plugins-bad.spec.in: + Update for new presets file + +2009-04-30 17:08:52 +0100 Tristan Matthews + + * gst/debugutils/fpsdisplaysink.c: + fpsdisplaysink: init variable to NULL to avoid compiler warning + Fixes #580901. + +2009-04-30 14:20:16 +0200 Wim Taymans + + * gst/dvdspu/gstdvdspu-render.c: + * gst/dvdspu/gstdvdspu.h: + dvdspu: do some basic clipping + Add some basic clipping of the subtitle region when the subtitle is bigger than + the image we should put it on. + +2009-04-30 14:18:58 +0200 Wim Taymans + + * gst/dvdspu/gstdvdspu.c: + dvdspu: don't EOS when the subtitle got EOS + Don't forward the EOS on the subtitle pad as the video might still be running. + +2009-04-30 13:45:30 +0300 Stefan Kost + + * gst/debugutils/fpsdisplaysink.c: + fpsdisplay: code cleanup and plug overlay as needed + Pluggin the text-ovelay causes some slowdowns and might need a colorspace + converter. We now only check the text-overlay property whne goint to ready and + plug or unplug the text-overlay at that time. If the property changes during + playing, its not switched immediately. + +2009-04-30 00:06:36 +0300 Stefan Kost + + * ext/x264/GstX264Enc.prs: + * ext/x264/Makefile.am: + * ext/x264/gstx264enc.c: + x264enc: add preset support + Add preset iface and a (dummy) preset file as a starting point. + +2009-04-26 21:26:00 +0100 Jan Schmidt + + * ext/resindvd/gstmpegdemux.c: + * ext/resindvd/resindvdsrc.c: + * ext/resindvd/rsnaudiodec.c: + * ext/resindvd/rsnaudiomunge.c: + resindvd: Convert some g_print to GST_LOG_OBJECT and friends, remove some others + Trim down the g_print verbosity. + +2009-04-26 21:29:27 +0100 Jan Schmidt + + * ext/resindvd/resindvdsrc.c: + resindvd: Add DVDFASTSTART env var to making some testing easier + +2009-04-24 14:08:55 +0100 Jan Schmidt + + * ext/resindvd/gstmpegdemux.c: + resindvd: Remove redundant modulo operation in the demuxer + +2009-04-24 14:07:30 +0100 Jan Schmidt + + * ext/resindvd/gstmpegdemux.c: + * ext/resindvd/resindvdsrc.c: + resindvd: Map audio and subpicture logical streams to physical. + The logical audio and subpicture stream number doesn't always correspond + with the physical substream it is coming from. When configuring the demuxer + pads, use the mapping table provided in each PGC to get the layout and + ensure the demuxer creates the correct pads. + +2009-04-29 18:52:20 +0100 Tristan Matthews + + * gst/flv/gstflvmux.c: + flvmux: init variable to NULL to fix compiler warning + Fixes #580786. + +2009-04-29 16:57:36 +0200 Mark Nauwelaerts + + * ext/x264/gstx264enc.c: + x264enc: add some documentation on profile + +2009-04-29 13:56:07 +0200 Sebastian Dröge + + * gst/flv/gstflvmux.c: + * gst/flv/gstflvparse.c: + flv: Set/require the framed/parsed fields of the audio/mpeg caps to TRUE + +2009-04-29 13:16:25 +0200 Sebastian Dröge + + * gst/flv/gstflvmux.c: + flv: Always write at least the minimal tags and write the PAR as tags + +2009-04-29 13:03:46 +0200 Sebastian Dröge + + * gst/flv/gstflvmux.c: + * gst/flv/gstflvmux.h: + flv: Add support for muxing some tags + +2009-04-29 13:03:27 +0200 Sebastian Dröge + + * gst/flv/gstflvparse.c: + flv: Add support for title tag + +2009-04-29 09:40:41 +0200 Sebastian Dröge + + * gst/flv/gstflvparse.c: + flv: Fix parsing of tags and add new mappings + We shouldn't register a new GstTag for every unknown tag + we find as this might lead to conflicts and also those + tags are essentially unknown. + Add mappings for some known tags and also convert string + dates to GDate, as found in many FLV files. + +2009-04-28 16:10:21 -0400 Olivier Crête + + * gst/rtpmux/gstrtpmux.c: + rtpmux: Reject wrong caps + +2009-04-28 16:03:19 -0400 Olivier Crête + + * gst/rtpmux/gstrtpmux.c: + rtpmux: Fix leak + Fixed a leak discovered by Laurent Glayal + +2009-04-28 15:58:41 -0400 Olivier Crête + + * gst/rtpmux/gstrtpmux.c: + rtpmux: Fix leak + Fixed a leak discovered by Laurent Glayal + +2009-04-27 11:09:08 +0200 Olivier Crete + + * gst/rtpmanager/rtpsource.c: + rtpsouce: make WARNING into LOG + Since neither rtpmanager nor any of the payloaders properly implement + pad allocation, there is no way for the rtpmanager to inform downstream elements + of the new SSRC if there is an SSRC collision. So the warning is emitted all the + time and it is confusing. + Fixes #580144 + +2009-04-27 11:06:01 +0200 Olivier Crete + + * gst/rtpmanager/rtpsession.c: + rtpsession: notify when SSRC changes + Emit a g_object_notify when the SSRc changes because of a collision. + Fixes #580144 + +2009-04-27 10:04:51 +0100 Christian Schaller + + * gst-plugins-bad.spec.in: + * gst/dccp/Makefile.am: + Add new plugin to spec file and add missing header to gst/dccp/Makefile.am + +2009-04-25 00:44:15 +0100 Tim-Philipp Müller + + * tests/check/elements/.gitignore: + * tests/check/pipelines/.gitignore: + tests: make git ignore new unit tests binaries + +2009-04-25 00:42:44 +0100 Tim-Philipp Müller + + * win32/MANIFEST: + win32: dist libgstdshow.def by adding it to win32/MANIFEST + Fixes #578563. + +2009-04-24 18:53:36 -0300 Thiago Santos + + * gst/qtmux/gstqtmuxmap.c: + mp4mux: Changes src caps to application/x-iso-mp4 + Fixes #580005 + +2009-04-24 16:01:44 +0100 Jan Schmidt + + * win32/common/config.h: + win32: Commit the win32 config with bumped version number. + Should have committed this when I unfroze the build last time, sorry. + +2009-04-24 14:51:00 +0100 Jan Schmidt + + * tests/check/Makefile.am: + check: exclude rsndvdbin from the states test + +2009-04-24 15:42:27 +0300 Stefan Kost + + * configure.ac: + soundtouch: fix configure to use proper shell syntax. fixes #580091 + +2009-04-23 17:33:25 +0100 Jan Schmidt + + * configure.ac: + soundtouch: Fix compilation on newer libSoundTouch + Newer libsoundtouch requires that we include an extra header that wasn't + previously required, so define HAVE_SOUNDTOUCH_1_4 for newer builds so that it + gets included. + +2009-04-20 11:38:01 +0300 Stefan Kost + + * gst/debugutils/fpsdisplaysink.c: + fpsdisplay: more cleanups + Use normal gst-defines in PLUGIN_DEFINE. Shorten _start/stop method names. + More ideas. Move debug category-init down to plugin-init. + +2009-04-20 09:51:50 +0300 Stefan Kost + + * gst/debugutils/fpsdisplaysink.c: + fpsdisplay: use a nicer font family + +2009-04-20 10:24:37 +0300 Stefan Kost + + * gst/debugutils/fpsdisplaysink.c: + fpsdisplay: various cleanups, docs and comments + Remove unused base_init. Add basic doc blob. Reuse query object. Rename + variables for clarity. Add comments and ToDos. + +2009-04-20 09:49:32 +0300 Stefan Kost + + * gst/debugutils/fpsdisplaysink.c: + fpsdisplay: remove iface proxy + When we get bus messages for setting the xid, we have the real sink element + instance as message_src. No need to proxy the xoverlay iface therefore + (autovideosink does not do it either). Also we don't need to rewrite the + message src of all messages from that sink. + +2009-04-23 11:04:46 +0100 Jan Schmidt + + * gst/selector/gstinputselector.c: + input-selector: Forward segment events for the active pad immediately. + When a segment event is received on the active pad, forward it downstream + immediately instead of deferring it until the next data buffer arrives. This + fixes problems with segment updates never being sent downstream, like those + needed for sparse streams, or for closing previously opened segments. + This fixes playback of DVD menus with a still video frame and an audio track, + for example. + Fixes: #577843 + +2009-04-22 18:01:07 -0400 Olivier Crête + + * gst/rtpmux/gstrtpmux.c: + rtpmux: Fix warning + +2009-04-20 20:00:15 -0400 Olivier Crête + + * gst/rtpmux/gstrtpmux.c: + rtpmux: Set different caps depending on the input + +2009-04-22 16:25:07 -0400 Olivier Crête + + * gst/rtpmux/gstrtpmux.c: + rtpmux: Only free pad private when pad is disposed + +2009-04-22 19:52:05 +0200 Sebastian Dröge + + * docs/plugins/Makefile.am: + * docs/plugins/gst-plugins-bad-plugins-docs.sgml: + * docs/plugins/gst-plugins-bad-plugins-sections.txt: + * gst/flv/gstflvdemux.c: + * gst/flv/gstflvdemux.h: + * gst/flv/gstflvmux.c: + * gst/flv/gstflvmux.h: + flv: Add documentation to flvmux and flvdemux + Partially fixes bug #573737. + +2009-04-22 19:45:07 +0200 Sebastian Dröge + + * gst/mxf/mxfmux.h: + mxf: Mark most fields of the instance struct as private + +2009-04-22 19:43:22 +0200 Sebastian Dröge + + * docs/plugins/Makefile.am: + * docs/plugins/gst-plugins-bad-plugins-docs.sgml: + * docs/plugins/gst-plugins-bad-plugins-sections.txt: + * gst/deinterlace2/gstdeinterlace2.c: + * gst/deinterlace2/gstdeinterlace2.h: + deinterlace2: Add documentation and integrate into the build system + +2009-04-22 19:24:43 +0200 Sebastian Dröge + + * docs/plugins/Makefile.am: + * docs/plugins/gst-plugins-bad-plugins-docs.sgml: + * docs/plugins/gst-plugins-bad-plugins-sections.txt: + * docs/plugins/gst-plugins-bad-plugins.args: + * docs/plugins/gst-plugins-bad-plugins.hierarchy: + * docs/plugins/gst-plugins-bad-plugins.interfaces: + * docs/plugins/gst-plugins-bad-plugins.prerequisites: + * docs/plugins/gst-plugins-bad-plugins.signals: + * docs/plugins/inspect/plugin-aacparse.xml: + * docs/plugins/inspect/plugin-aiffparse.xml: + * docs/plugins/inspect/plugin-alsaspdif.xml: + * docs/plugins/inspect/plugin-amrparse.xml: + * docs/plugins/inspect/plugin-amrwb.xml: + * docs/plugins/inspect/plugin-apex.xml: + * docs/plugins/inspect/plugin-assrender.xml: + * docs/plugins/inspect/plugin-autoconvert.xml: + * docs/plugins/inspect/plugin-bayer.xml: + * docs/plugins/inspect/plugin-bz2.xml: + * docs/plugins/inspect/plugin-camerabin.xml: + * docs/plugins/inspect/plugin-cdaudio.xml: + * docs/plugins/inspect/plugin-cdxaparse.xml: + * docs/plugins/inspect/plugin-celt.xml: + * docs/plugins/inspect/plugin-dc1394.xml: + * docs/plugins/inspect/plugin-dccp.xml: + * docs/plugins/inspect/plugin-deinterlace2.xml: + * docs/plugins/inspect/plugin-dfbvideosink.xml: + * docs/plugins/inspect/plugin-dtmf.xml: + * docs/plugins/inspect/plugin-dtsdec.xml: + * docs/plugins/inspect/plugin-dvb.xml: + * docs/plugins/inspect/plugin-dvdspu.xml: + * docs/plugins/inspect/plugin-faac.xml: + * docs/plugins/inspect/plugin-faad.xml: + * docs/plugins/inspect/plugin-fbdevsink.xml: + * docs/plugins/inspect/plugin-festival.xml: + * docs/plugins/inspect/plugin-flv.xml: + * docs/plugins/inspect/plugin-fpsdisplaysink.xml: + * docs/plugins/inspect/plugin-freeze.xml: + * docs/plugins/inspect/plugin-gsm.xml: + * docs/plugins/inspect/plugin-gstinterlace.xml: + * docs/plugins/inspect/plugin-gstrtpmanager.xml: + * docs/plugins/inspect/plugin-gstsiren.xml: + * docs/plugins/inspect/plugin-h264parse.xml: + * docs/plugins/inspect/plugin-jack.xml: + * docs/plugins/inspect/plugin-ladspa.xml: + * docs/plugins/inspect/plugin-legacyresample.xml: + * docs/plugins/inspect/plugin-liveadder.xml: + * docs/plugins/inspect/plugin-metadata.xml: + * docs/plugins/inspect/plugin-mms.xml: + * docs/plugins/inspect/plugin-modplug.xml: + * docs/plugins/inspect/plugin-mpeg4videoparse.xml: + * docs/plugins/inspect/plugin-mpegdemux2.xml: + * docs/plugins/inspect/plugin-mpegtsmux.xml: + * docs/plugins/inspect/plugin-mpegvideoparse.xml: + * docs/plugins/inspect/plugin-musepack.xml: + * docs/plugins/inspect/plugin-musicbrainz.xml: + * docs/plugins/inspect/plugin-mve.xml: + * docs/plugins/inspect/plugin-mxf.xml: + * docs/plugins/inspect/plugin-mythtv.xml: + * docs/plugins/inspect/plugin-nas.xml: + * docs/plugins/inspect/plugin-neon.xml: + * docs/plugins/inspect/plugin-nsfdec.xml: + * docs/plugins/inspect/plugin-nuvdemux.xml: + * docs/plugins/inspect/plugin-ofa.xml: + * docs/plugins/inspect/plugin-oss4.xml: + * docs/plugins/inspect/plugin-pcapparse.xml: + * docs/plugins/inspect/plugin-qtmux.xml: + * docs/plugins/inspect/plugin-rawparse.xml: + * docs/plugins/inspect/plugin-real.xml: + * docs/plugins/inspect/plugin-resindvd.xml: + * docs/plugins/inspect/plugin-rfbsrc.xml: + * docs/plugins/inspect/plugin-rtpmux.xml: + * docs/plugins/inspect/plugin-scaletempo.xml: + * docs/plugins/inspect/plugin-sdl.xml: + * docs/plugins/inspect/plugin-sdp.xml: + * docs/plugins/inspect/plugin-selector.xml: + * docs/plugins/inspect/plugin-sndfile.xml: + * docs/plugins/inspect/plugin-speed.xml: + * docs/plugins/inspect/plugin-stereo.xml: + * docs/plugins/inspect/plugin-subenc.xml: + * docs/plugins/inspect/plugin-tta.xml: + * docs/plugins/inspect/plugin-valve.xml: + * docs/plugins/inspect/plugin-vcdsrc.xml: + * docs/plugins/inspect/plugin-videosignal.xml: + * docs/plugins/inspect/plugin-vmnc.xml: + * docs/plugins/inspect/plugin-wildmidi.xml: + * docs/plugins/inspect/plugin-x264.xml: + * docs/plugins/inspect/plugin-xdgmime.xml: + * docs/plugins/inspect/plugin-xvid.xml: + * docs/plugins/inspect/plugin-y4menc.xml: + * gst/mxf/mxfmux.c: + mxf: Add documentation to mxfmux and update the docs + +2009-03-19 15:37:17 -0700 LRN + + * ext/modplug/gstmodplug.cc: + modplug: Use correct header file + modplug's sndfile.h conflicts with libsndfile's sndfile.h, so + we'll access it directly using modplug/sndfile.h. Fixes #573849 + Signed-off-by: David Schleef + +2009-03-19 15:29:04 -0700 LRN + + * m4/gst-sdl.m4: + sdl: Use SDL static-libs for conftest + Fixes: #573847. This fixes building with SDL on Windows. + Signed-off-by: David Schleef + +2009-03-19 14:55:26 -0700 LRN + + * ext/mpeg2enc/gstmpeg2encoptions.cc: + mpeg2enc: Get number of processors on win32 + Fixes #573848. + Signed-off-by: David Schleef + +2009-03-19 14:49:13 -0700 David Schleef + + * configure.ac: + soundtouch: Add pkgconfig check for soundtouch-1.4 + Fixes #573846. + +2009-02-26 14:18:54 -0800 David Schleef + + * gst/rawparse/gstrawparse.c: + * gst/rawparse/gstrawparse.h: + * gst/rawparse/gstvideoparse.c: + * gst/rawparse/gstvideoparse.h: + Add interlaced support to videoparse + Add a virtual method in rawparse to set buffer flags. This doesn't + use API from unreleased -base, since it defines GST_VIDEO_BUFFER_TFF + if it's not defined yet. + +2009-04-21 22:13:12 +0100 Jan Schmidt + + * common: + Automatic update of common submodule + From b3941ea to 6ab11d1 + +2009-04-21 13:27:29 -0400 Olivier Crête + + Merge branch 'rtpmux-fixes' + +2009-04-21 16:48:39 +0200 Edward Hervey + + * ext/libmms/gstmms.c: + mmssrc: If the connection fails, emit a redirection msg to the rtsp equivalent. + This should help fix the issue with Windows Media Server using rtsp... but + still declaring the stream with mms:// + +2009-04-21 16:08:55 +0200 Edward Hervey + + * gst/mpegdemux/gstmpegdemux.c: + mpegdemux: Only error out at EOS push failure if we don't have any streams. + This should remove the bogus error messages while still keeping the original + intent of this, which is to inform the pipeline/application/user that we + could not find any valid streams. + There are many reasons why pushing an event can fail, and not all of them are + because there's no link downstream (it could be because it was blocked, or + flushing). + +2009-04-10 19:24:26 +0200 Zaheer Abbas Merali + + * gst/mpegdemux/gstmpegtsdemux.c: + mpegtsdemux: add hack specific for itvhd + itvhd masks its h264 video stream as a private stream making it harder for + other set top boxes to decode. this checks for specific program number, video + pid and stream type combination before declaring it as h264. + +2009-04-10 19:06:55 +0200 Zaheer Abbas Merali + + * gst/mpegdemux/mpegtspacketizer.c: + mpegtsparse: detect AC3 streams in PMT table + add 'has-ac3' boolean to pmt bus message + +2009-04-10 01:16:30 +0200 Zaheer Abbas Merali + + * gst/mpegdemux/gstmpegtsdemux.c: + itv hd hack + +2009-04-10 01:11:01 +0200 Zaheer Abbas Merali + + * gst/mpegdemux/gstmpegtsdemux.c: + hack for itvhd sid to detect mpeg1 as h264 + +2009-04-20 18:41:39 -0400 Olivier Crête + + * gst/rtpmux/gstrtpmux.c: + rtpmux: Remove useless caps mangling + +2009-04-20 18:36:42 -0400 Olivier Crête + + * gst/rtpmux/gstrtpmux.c: + rtpmux: Rename variable for more clarity + +2009-04-20 17:43:39 -0400 Olivier Crête + + * gst/rtpmux/gstrtpdtmfmux.c: + * gst/rtpmux/gstrtpmux.c: + rtpmux: Use GST_BOILERPLATE + +2009-04-20 17:42:40 -0400 Olivier Crête + + * gst/rtpmux/gstrtpdtmfmux.c: + * gst/rtpmux/gstrtpdtmfmux.h: + * gst/rtpmux/gstrtpmux.c: + rtpmux: Do the includes locally + +2009-04-20 16:34:30 +0200 Andy Wingo + + * sys/osxvideo/osxvideosrc.c: + patch over logic errors in osxvideosrc + apple's compiler carps, with reason, about some constructs in osxvideosrc.c + fix them. + also it seems that for some reason this required a gst-indent run. whee + +2009-04-20 13:09:46 +0200 Andy Wingo + + add osxvideosrc + * configure.ac: + * sys/Makefile.am: + * sys/osxvideo/Makefile.am: Autoconfiscation. + * sys/osxvideo/osxvideoplugin.m: + * sys/osxvideo/osxvideosrc.h: + * sys/osxvideo/osxvideosrc.c: Add osxvideosrc. Should fix #153684. + Patch-by: Ole André Vadla RavnÃ¥s + Patch-by: Ali Sabil + Patch-by: Barracuda Networks + +2009-04-19 17:18:35 +0200 Sebastian Dröge + + * gst/deinterlace2/gstdeinterlace2.c: + deinterlace2: Make it possible to select interlacing autodetection or to enfore deinterlacing + For this add a "mode" property that defaults to "interlaced" for now as + most decoders/demuxers don't properly set the "interlaced" field on the + caps yet. + If this property is set to "auto" the element will work in passthrough + mode unless the caps contain the "interlaced" field. + +2009-04-18 23:42:57 +0100 Zaheer Merali + + * gst/mpegdemux/mpegtspacketizer.c: + mpegtsparse: fix leak of GST_TYPE_LIST gvalue + +2009-04-18 13:09:23 +0100 Zaheer Merali + + * gst/mpegdemux/mpegtsparse.c: + mpegtsparse: fix leak in src_pad_query + +2009-04-17 16:16:29 +0200 Wim Taymans + + * gst/rtpmanager/gstrtpsession.c: + rtpsession: join the RTCP thread + Avoid a case where a joinable thread would be left unjoined, which leaked the + thread structure. + Fixes #577318. + +2009-04-17 15:39:59 +0200 Sebastian Dröge + + * gst/deinterlace2/gstdeinterlace2.c: + deinterlace2: Use GST_(DEBUG|WARNING|ERROR)_OBJECT instead of the non-OBJECT ones + +2009-04-17 15:39:36 +0200 Sebastian Dröge + + * gst/deinterlace2/gstdeinterlace2.c: + deinterlace2: Reset history if DISCONT is set on the incoming buffer + +2009-04-17 15:39:10 +0200 Sebastian Dröge + + * gst/deinterlace2/gstdeinterlace2.c: + deinterlace2: Fix timestamps for buffers with RFF flag set + +2009-04-16 22:14:15 +0200 Sebastian Dröge + + * gst/mxf/mxfmetadata.c: + mxf: Properly handle the new interlaced support from libgstvideo for (de)muxing + +2009-04-16 17:41:37 +0200 Sebastian Dröge + + * gst/deinterlace2/gstdeinterlace2.c: + * gst/deinterlace2/gstdeinterlace2.h: + * gst/deinterlace2/tvtime/greedy.c: + * gst/deinterlace2/tvtime/greedyh.c: + * gst/deinterlace2/tvtime/scalerbob.c: + * gst/deinterlace2/tvtime/tomsmocomp/TomsMoCompAll.inc: + * gst/deinterlace2/tvtime/weave.c: + * gst/deinterlace2/tvtime/weavebff.c: + * gst/deinterlace2/tvtime/weavetff.c: + deinterlace2: Rename line_length to row_stride and remove output_stride + +2009-04-16 15:52:39 +0200 Sebastian Dröge + + * gst/deinterlace2/gstdeinterlace2.c: + deinterlace2: Implement support for RFF and ONEFIELD buffer flags + +2009-04-16 18:36:13 +0300 Stefan Kost + + * configure.ac: + * gst/debugutils/Makefile.am: + * gst/debugutils/fpsdisplaysink.c: + * gst/debugutils/fpsdisplaysink.h: + fpsdisplaysink: add a initial port of a sink with fps display + This now works with a event probe. Needs some extra work. + +2009-03-09 18:22:28 +0200 Lasse Laukkanen + + * gst/camerabin/gstcamerabin.c: + camerabin: clean up and fix assertion fail when setting zoom in NULL state + +2009-03-09 18:31:07 +0200 Lasse Laukkanen + + * gst/camerabin/gstcamerabin.c: + camerabin: fix format matching when detecting allowed frame rate + +2009-03-09 18:25:48 +0200 Lasse Laukkanen + + * gst/camerabin/gstcamerabin.c: + camerabin: don't lose pending state when changing resolution + +2009-02-27 17:12:38 +0200 Lasse Laukkanen + + * gst/camerabin/gstcamerabin-marshal.list: + * gst/camerabin/gstcamerabin.c: + * gst/camerabin/gstcamerabin.h: + * tests/check/elements/camerabin.c: + camerabin: change img-done signal parameter from GString* to const gchar* + Don't allow setting filename via img-done signal parameter but force app + use filename property. Don't stop capture when setting filename property. + Update check unit test based on the change. + +2009-04-15 13:23:01 -0400 Olivier Crête + + * gst/rtpmux/gstrtpdtmfmux.c: + * gst/rtpmux/gstrtpmux.c: + rtpmux: Add GST_DEBUG_FUNCPTRs + +2009-04-15 13:15:55 -0400 Olivier Crête + + * gst/rtpmux/gstrtpdtmfmux.c: + rtpdtmfmux: Release locked pad on release_pad + Release the special pad if the pad is removed from the muxer. + +2009-04-15 13:09:27 -0400 Laurent Glayal + + * gst/rtpmux/gstrtpdtmfmux.c: + rtpdtmfmux: Release special on pad dispose + Fixes #577690 + +2009-04-15 18:14:48 +0200 Wim Taymans + + * gst/rtpmanager/gstrtpjitterbuffer.c: + jitterbuffer: prevent overflow in EOS estimation + Use a guint64 instead of a guint to hold a 64bit value to prevent completely + bogues EOS estimation values due to overflows. + +2009-04-15 17:44:17 +0200 Wim Taymans + + * gst/rtpmanager/gstrtpbin.c: + * gst/rtpmanager/gstrtpbin.h: + rtpbin: we should not provide a clock + There is no need to provide a clock. + +2009-04-15 17:28:56 +0200 Wim Taymans + + * gst/rtpmanager/gstrtpjitterbuffer.c: + jitterbuffer: more estimated EOS fixes + Do more accurate EOS estimate and guard against backward timestamps. + +2009-04-15 17:25:02 +0200 Wim Taymans + + * gst/rtpmanager/gstrtpjitterbuffer.c: + jitterbuffer: release lock before pushing EOS + Make sure we release the jitterbuffer lock before we start pushing out data + because else we might deadlock. + +2009-04-15 15:46:44 +0200 Sebastian Dröge + + * gst/deinterlace2/gstdeinterlace2.c: + * gst/deinterlace2/gstdeinterlace2.h: + * gst/deinterlace2/tvtime/greedy.c: + * gst/deinterlace2/tvtime/greedyh.c: + * gst/deinterlace2/tvtime/tomsmocomp/TomsMoCompAll.inc: + deinterlace2: Move output buffer from the instance struct to a function parameter + +2009-04-15 15:33:17 +0200 Sebastian Dröge + + * gst/deinterlace2/gstdeinterlace2.c: + * gst/deinterlace2/gstdeinterlace2.h: + deinterlace2: Add initial support for automatic detection of the field order + +2009-04-15 14:47:49 +0200 Sebastian Dröge + + * gst/deinterlace2/gstdeinterlace2.c: + deinterlace2: Add support for YVYU colorspace + This is the same as YUY2 with just Cr and Cb swapped. As + we don't make a difference between them when deinterlacing + this works. + +2009-04-13 13:32:34 +0200 Sebastian Dröge + + * gst/mxf/mxfmux.c: + mxfmux: Small cleanup + +2009-04-10 18:00:06 +0100 Tim-Philipp Müller + + * sys/dshowdecwrapper/gstdshowaudiodec.cpp: + * sys/dshowdecwrapper/gstdshowvideodec.cpp: + dshowdec: fix compilation with the debugging system disabled + One GST_DEBUG_CATEGORY_INIT should be enough anyway. + Fixes #578562 (spotted by David Hoyt). + +2009-04-09 23:53:39 +0200 Janin Kolenc + + * ext/x264/gstx264enc.c: + * ext/x264/gstx264enc.h: + x264enc: add force keyframe event handling + Use the GstForceKeyUnit event to force a keyframe. + Fixes #578112. + +2009-04-08 11:52:46 -0700 Michael Smith + + * configure.ac: + * sys/acmenc/Makefile.am: + * sys/acmmp3dec/Makefile.am: + acmenc, acmmp3dec, sdp: link to all requires libraries on win32. + Add winsock for windows (for sdp). Link to all the plugins-base + libs we indirectly use for acmmenc and acmmp3dec. + +2009-04-07 15:50:37 +0200 Sebastian Dröge + + * tests/check/Makefile.am: + * tests/check/pipelines/mxf.c: + mxf: Add unit tests for checking if mxfmux ! mxfdemux pipelines are working without errors + +2009-04-07 15:49:00 +0200 Sebastian Dröge + + * gst/mxf/mxfdemux.c: + mxfdemux: Don't use invalid buffer offsets, instead assume offset == 0 + +2009-04-07 15:45:50 +0200 Sebastian Dröge + + * gst/mxf/mxfmetadata.c: + mxf: Fix comparison + +2009-04-07 15:19:29 +0200 Sebastian Dröge + + * gst/mxf/mxfmetadata.c: + * gst/mxf/mxful.c: + * gst/mxf/mxful.h: + Use UL database for all metadata ULs + +2009-04-07 04:53:02 +0300 René Stadler + + * gst/aacparse/gstbaseparse.c: + * gst/amrparse/gstbaseparse.c: + * gst/flacparse/gstbaseparse.c: + baseparse: Fix slightly broken buffer-in-segment check (aacparse, amrparse, flacparse) + +2009-04-05 03:50:19 +0300 René Stadler + + * gst/aacparse/gstbaseparse.c: + * gst/amrparse/gstbaseparse.c: + baseparse: Fix push mode seeking (aacparse, amrparse) + Sending the flush-start event forward before taking the stream lock actually + works, in contrast to deadlocking in downstream preroll_wait (hunk 1). + After that we get the chain function being stuck in a busy loop. This is fixed + by updating the minimum frame size inside the synchronization loop because the + subclass asks for more data in this way (hunk 2). + Finally, this leads to a very probable crash because the subclass can find a + valid frame with a size greater than the currently available data in the + adapter. This makes the subsequent gst_adapter_take_buffer call return NULL, + which is not expected (hunk 3). + +2009-04-04 21:19:11 +0300 Felipe Contreras + + * common: + Automatic update of common submodule + From d0ea89e to b3941ea + +2009-04-04 17:51:34 +0100 Tim-Philipp Müller + + * ext/bz2/Makefile.am: + * ext/bz2/gstbz2dec.c: + * ext/bz2/gstbz2enc.c: + bz2: fix some refcount mistakes and do some cleaning up + No need to unref buffers if pad_push returns something non-FLOW_OK. + In fact, this will cause assertions or crashes. However, we do need + to unref the input buffer whenever we don't pass it downstream. Also, + a non-OK flow return is not an error, so don't post error messages on + the bus - the pipeline may just be shutting down. Miscellaneous other + clean-ups and crack removal. Plenty of work left for those who feel + like it. + +2009-04-04 14:54:25 +0200 Edward Hervey + + * common: + Automatic update of common submodule + From f8b3d91 to d0ea89e + +2009-04-03 23:10:28 +0100 Tim-Philipp Müller + + * configure.ac: + configure.ac: fix dvdnav version check + Fixes #577864. This time for real. + +2009-04-03 17:55:31 +0100 Tim-Philipp Müller + + * configure.ac: + * ext/resindvd/resindvdsrc.h: + resindvd: require libdvdnav >= 4.1.2 for dvdnav_get_current_time() + Fixes #577864. + +2009-04-03 10:29:53 +0100 Jan Schmidt + + * configure.ac: + misc: Bump plugins-base requirement to 0.10.22.1 + +2009-04-01 17:41:40 +0100 Jan Schmidt + + * ext/resindvd/resindvdsrc.c: + resindvd: Send both the logical and physical substream ID in the stream change. + When sending the stream change message(s) to the demuxer, also include the + logical stream id along with the physical ID, so that the demuxer can remap + logical->physical MPEG stream ID. + +2009-04-01 02:23:20 +0100 Jan Schmidt + + * ext/resindvd/Makefile.am: + * ext/resindvd/resindvdsrc.c: + * ext/resindvd/resindvdsrc.h: + resindvd: Use new GstNavigation functionality. + Handle the new DVD commands, so that we can handle commands from a player + to change angle, jump to menus etc. Use the new GstNavigation event parsing + functions, instead of hand-rolled stuff. + Send GstNavigation notification messages when the mouse enters a button + or leaves it, so UI can turn the mouse cursor to a hand icon. + +2009-03-30 01:07:49 +0100 Jan Schmidt + + * ext/resindvd/resindvdbin.c: + * ext/resindvd/resindvdbin.h: + resindvd: Switch to using a hard-coded mpeg2dec, and change pad blocking a bit. + Change the pad blocking behaviour during startup, and use a hard-coded mpeg2dec (for the moment), in order to make things work with playbin2. + +2009-03-25 12:31:10 +0000 Jan Schmidt + + * ext/resindvd/resindvdsrc.c: + resindvd: Add newline to debug g_print statement + +2009-03-25 02:20:12 +0000 Jan Schmidt + + * ext/resindvd/resindvdsrc.c: + resindvd: Make highlights work when jumping into menus + Make the highlights re-appear correctly when jumping back into menus + by making sure to set the flushing_seek flag for user-action initiated + seeks. + Fiddle some debug related to tracking down the issue. + +2009-03-25 01:21:28 +0000 Jan Schmidt + + * ext/resindvd/resindvdsrc.c: + resindvd: Support multiangle titles. + Add a workaround for an apparent libdvdnav bug where it loses nav packets + during multiangle titles, and add some keypress bindings to switch the angle. + +2009-03-18 09:35:12 +0000 Jan Schmidt + + * ext/resindvd/resindvdbin.c: + resindvd: Add back in support for using hardcoded a52dec + +2009-03-16 20:31:58 +0000 Jan Schmidt + + * ext/resindvd/gstmpegdemux.c: + resindvd: Add some debug when creating the output pads in the demuxer + +2009-03-10 10:39:22 +0000 Jan Schmidt + + * ext/resindvd/rsnaudiodec.c: + resindvd: More hacking on the audio decoder. + +2009-03-05 00:04:24 +0000 Jan Schmidt + + * ext/resindvd/resindvdsrc.c: + resindvd: Trim back the g_print debug - convert to GST_DEBUG and GST_LOG + +2009-03-04 16:16:57 +0000 Jan Schmidt + + * ext/resindvd/resindvdbin.c: + * ext/resindvd/rsnaudiodec.c: + * ext/resindvd/rsnaudiodec.h: + resindvd: Extend the Resin audio decoder element, and switch rsndvdbin to use it + +2009-02-27 10:18:14 +0000 Jan Schmidt + + * ext/resindvd/Makefile.am: + * ext/resindvd/rsnaudiodec.c: + * ext/resindvd/rsnaudiodec.h: + resindvd: First part of the re-plugging audio decoder + +2009-02-27 09:42:35 +0000 Jan Schmidt + + * ext/resindvd/resindvdbin.c: + resindvd: remove unused code path from the bin + +2009-02-26 00:29:26 +0000 Jan Schmidt + + * ext/resindvd/resindvdbin.h: + resindvd: Indent some things + +2009-02-26 00:27:54 +0000 Jan Schmidt + + * ext/resindvd/rsnaudiomunge.c: + * ext/resindvd/rsnwrappedbuffer.c: + resindvd: Switch GST_BOILERPLATE to G_DEFINE_TYPE for no real reason. + +2009-03-24 01:02:28 +0000 Jan Schmidt + + * ext/resindvd/resindvdsrc.c: + * ext/resindvd/resindvdsrc.h: + resindvd: Add faststart, and work around some multi-angle issues + Add a 'fast-start' property to the rsndvdsrc element, that attempts to + jump directly to the DVD menu when starting. Doesn't work correctly on all + titles yet. + Add workarounds for issues with multiple angles in libdvdnav: Use a heuristic + to avoid detecting discontinuities during multiple-angle titles, it seems + caused by libdvdnav losing some NAV packets in multiangle titles. Fix + seeking in multi-angle titles by aligning our sector calculation logic + with libdvdnav's. Also, use libdvdnav's dvdnav_get_current_time() method + to determine the logical position of the current cell when it changes, as the + cell_start value in the cell_change event provides a number that doesn't + compensate for angle cell blocks. + +2009-03-21 19:04:05 +0000 Jan Schmidt + + * ext/resindvd/resindvdsrc.c: + resindvd: Small debug output change in the source element + +2009-04-01 02:25:42 +0100 Jan Schmidt + + * gst/dvdspu/gstdvdspu.c: + dvdspu: Add some debug + Add a little bit of extra debug. Wrap a hardcoded #if 0 into a define instead. + +2009-04-02 13:05:11 +0200 Sebastian Dröge + + * ext/jp2k/gstjasperenc.c: + jp2enc: Unref peer caps after usage to fix a memory leak + +2009-04-02 12:46:13 +0200 Sebastian Dröge + + * tests/check/Makefile.am: + * tests/check/elements/mxfmux.c: + mxfmux: Add unit tests + +2009-04-01 15:45:22 +0100 Tim-Philipp Müller + + * gst/legacyresample/gstlegacyresample.c: + legacyresample: fix negotiation so that upstream can actually fixate to downstream's rate + If one side has a preference for a particular sample rate or set of sample rates, we + should honour this in the caps we advertise and transform to and from, so that elements + actually know about the other side's sample rate preference and can negotiate to it + if supported. Also add unit test for this. + +2009-03-31 16:07:46 +0200 Mark Nauwelaerts + + * gst/aacparse/gstbaseparse.c: + * gst/amrparse/gstbaseparse.c: + baseparse: Delay newsegment as long as possible. + If newsegment is sent (too) early, caps may not yet be fixed/set, + and downstream may not have been linked. + +2009-03-30 21:57:12 +0200 Mark Nauwelaerts + + * ext/mpeg2enc/gstmpeg2encoptions.cc: + mpeg2enc: fix bitrate property settings + Align bitrate property interpretation with usual mpeg2enc behaviour. + Fixes #575736. + +2009-03-27 21:39:05 +0000 Alan Falloon + + * configure.ac: + configure.ac: make --disable-external work again + +2009-03-27 19:37:47 +0000 Tim-Philipp Müller + + * ext/jp2k/gstjasperdec.c: + * ext/jp2k/gstjasperdec.h: + jp2kdec: implement basic QoS + Don't try to decode frames that are going to be late anyway. + +2009-03-27 17:44:57 +0100 Wim Taymans + + * gst/rtpmanager/gstrtpbin.c: + * gst/rtpmanager/gstrtpbin.h: + * gst/rtpmanager/gstrtpjitterbuffer.c: + * gst/rtpmanager/gstrtpjitterbuffer.h: + rtpbin: add on_npt_stop signal + Add the on_npt_stop signal to rtpbin and rtpjitterbuffer to notify the + application that the NPT stop position has been reached. + +2009-03-27 11:20:02 +0100 Wim Taymans + + * gst/selector/gstoutputselector.c: + outputselector: reset state when going to READY + Reset the last-buffer, the pending pad and the segment when going to the READY + state. + Fixes #576712. + +2009-03-25 21:24:44 +0100 Mark Nauwelaerts + + * gst/qtmux/gstqtmux.c: + qtmux: fix reusing element + State change to READY and then back to PAUSED should still provide + the proper structures as are otherwise freshly available following + a request_new_pad. + Pointed out by Thiago Santos. + +2009-03-26 20:28:30 +0100 Sebastian Dröge + + * gst/mxf/mxfmux.c: + * gst/mxf/mxftypes.c: + mxf: Fix compilation and compiler errors with GLib < 2.16.0 + +2009-03-26 14:26:34 +0100 Sebastian Dröge + + * gst/mxf/mxftypes.c: + mxf: Fix "cast to pointer type of different size" compiler warning + +2009-03-26 13:24:49 +0100 Sebastian Dröge + + * gst/mxf/mxftypes.c: + mxf: Rename forgotten function to fix unresolved symbols error + +2009-03-26 13:20:18 +0100 Sebastian Dröge + + * gst/mxf/mxfaes-bwf.c: + * gst/mxf/mxfdemux.c: + * gst/mxf/mxfdv-dif.c: + * gst/mxf/mxfvc3.c: + mxf: Use mxf_u{l,uid}_is_equal() and friends instead of memcmp() + +2009-03-26 13:11:07 +0100 Sebastian Dröge + + * gst/mxf/mxfaes-bwf.c: + * gst/mxf/mxfdemux.c: + * gst/mxf/mxfdms1.c: + * gst/mxf/mxfdms1.h: + * gst/mxf/mxfmetadata.c: + * gst/mxf/mxfmetadata.h: + * gst/mxf/mxfmpeg.c: + * gst/mxf/mxfmux.c: + * gst/mxf/mxftypes.c: + * gst/mxf/mxftypes.h: + mxf: Differentiate between UL and UUID + +2009-03-26 12:46:22 +0100 Sebastian Dröge + + * gst/mxf/Makefile.am: + * gst/mxf/mxf.c: + * gst/mxf/mxfaes-bwf.c: + * gst/mxf/mxfaes-bwf.h: + * gst/mxf/mxfalaw.c: + * gst/mxf/mxfalaw.h: + * gst/mxf/mxfd10.c: + * gst/mxf/mxfd10.h: + * gst/mxf/mxfdemux.c: + * gst/mxf/mxfdemux.h: + * gst/mxf/mxfdms1.c: + * gst/mxf/mxfdv-dif.c: + * gst/mxf/mxfdv-dif.h: + * gst/mxf/mxfessence.c: + * gst/mxf/mxfessence.h: + * gst/mxf/mxfjpeg2000.c: + * gst/mxf/mxfjpeg2000.h: + * gst/mxf/mxfmetadata.c: + * gst/mxf/mxfmpeg.c: + * gst/mxf/mxfmpeg.h: + * gst/mxf/mxfmux.h: + * gst/mxf/mxfparse.c: + * gst/mxf/mxfparse.h: + * gst/mxf/mxftypes.c: + * gst/mxf/mxftypes.h: + * gst/mxf/mxful.c: + * gst/mxf/mxful.h: + * gst/mxf/mxfup.c: + * gst/mxf/mxfup.h: + * gst/mxf/mxfvc3.c: + * gst/mxf/mxfvc3.h: + * gst/mxf/mxfwrite.c: + * gst/mxf/mxfwrite.h: + mxf: Source files and #include cleanup + +2009-03-26 12:10:05 +0100 Sebastian Dröge + + * configure.ac: + * gst/xdgmime/Makefile.am: + * gst/xdgmime/gstxdgmime.c: + xdgmime: Use GIOs g_content_type_guess() if possible + +2009-03-26 11:51:43 +0100 Sebastian Dröge + + * gst/mxf/mxfwrite.c: + mxf: Use the UL database for some more ULs + +2009-03-26 11:42:45 +0100 Sebastian Dröge + + * gst/mxf/mxfmetadata.c: + mxf: Remove some GLib < 2.14 compatibility stuff + +2009-03-26 11:37:28 +0100 РуÑлан Ижбулатов + + * configure.ac: + * sys/acmenc/Makefile.am: + * sys/acmenc/acmenc.c: + * sys/acmmp3dec/Makefile.am: + * sys/acmmp3dec/acmmp3dec.c: + acm: Port to MinGW + Fixes bug #573595. + +2009-03-26 11:33:50 +0100 РуÑлан Ижбулатов + + * configure.ac: + * gst/xdgmime/Makefile.am: + xdgmime: Link with winsock library to fix build with MinGW + Partially fixes bug #573595. + +2009-03-26 11:32:08 +0100 РуÑлан Ижбулатов + + * configure.ac: + * gst/dccp/Makefile.am: + * gst/dccp/gstdccp.c: + * gst/dccp/gstdccp.h: + * gst/dccp/gstdccp_common.h: + * gst/dccp/gstdccpclientsink.c: + * gst/dccp/gstdccpclientsink.h: + * gst/dccp/gstdccpclientsrc.c: + * gst/dccp/gstdccpclientsrc.h: + * gst/dccp/gstdccpserversink.c: + * gst/dccp/gstdccpserversink.h: + * gst/dccp/gstdccpserversrc.c: + * gst/dccp/gstdccpserversrc.h: + dccp: Port DCCP plugin to MinGW + Partially fixes bug #573595. + +2009-03-26 11:23:30 +0100 РуÑлан Ижбулатов + + * configure.ac: + dccp: Disable the dccp plugin if no pthread support is available + Partially fixes bug #573595. + +2009-03-26 08:13:10 +0100 Sebastian Dröge + + Merge branch 'mxfmux' + +2009-03-26 08:12:02 +0100 Sebastian Dröge + + * gst/mxf/mxfdv-dif.c: + * gst/mxf/mxfjpeg2000.c: + * gst/mxf/mxfvc3.c: + mxfmux: Cleanup + +2009-03-26 08:11:20 +0100 Sebastian Dröge + + * gst/mxf/mxfaes-bwf.c: + * gst/mxf/mxfalaw.c: + * gst/mxf/mxfmux.c: + * gst/mxf/mxfmux.h: + mxfmux: Fix handling of buffers with more than one edit unit and EOS handling + +2009-03-25 23:04:13 +0200 Stefan Kost + + * ext/ladspa/gstsignalprocessor.c: + * ext/ladspa/gstsignalprocessor.h: + ladspa: comment signalprocessor class more and do minor code cleanups + +2009-03-25 12:40:35 +0100 Sebastian Dröge + + * configure.ac: + Require core >= 0.10.22.1 for %u pad template support + +2009-03-24 15:23:03 +0100 Wim Taymans + + * gst/selector/gstinputselector.c: + selector: merge the tags + Merge the tags received on the input-selector sinkpads instead of only keeping + the last one we saw. + +2009-03-23 19:33:31 +0000 Jan Schmidt + + * NEWS: + Fix version number in the NEWS file + +2009-03-19 01:17:25 +0200 René Stadler + + * gst/aacparse/gstaacparse.c: + aacparse: Fix busyloop when seeking. Fixes #575388 + The problem is that after a discont, set_min_frame_size(1024) is called when + detect_stream returns FALSE. However, detect_stream calls check_adts_frame + which sets the frame size on its own to something larger than 1024. This is the + same situation as in the beginning, so the base class ends up calling + check_valid_frame in an endless loop. + +2009-03-19 00:32:40 +0200 René Stadler + + * gst/aacparse/gstaacparse.c: + aacparse: Refactor check_valid_frame to expose broken code + Just moving code around and removing an unhelpful/misleading comment. + +2009-03-23 11:17:39 +0100 Wim Taymans + + * gst/qtmux/gstqtmux.c: + qtmux: fix includes for lseek + -- + +2009-03-20 14:20:16 +0100 LRN + + * gst/qtmux/gstqtmux.c: + win32: fix seeking in large files + Use _lseeki64() on Windows to seek in large files. + Fixes #576021. + +2009-03-16 11:21:02 +0100 Wim Taymans + + * ext/jack/gstjack.c: + * ext/jack/gstjack.h: + * ext/jack/gstjackaudiosink.c: + * ext/jack/gstjackaudiosrc.c: + jack: Add new connection mode + Add a new connection mode to jacksrc and jacksink. In this new auto-force + connection mode jack will create as many ports as requested/needed in the + pipeline and will then connect as many physical ports as possible, possibly + leaving some ports unconnected. + Also get rid of some leftover g_print. + Fixes #575284. + +2009-03-23 15:06:11 +0100 Sebastian Dröge + + * gst/mxf/mxfparse.c: + mxf: Move some static const variables into functions + +2009-03-13 19:42:18 +0100 Alessandro Decina + + * configure.ac: + * ext/celt/gstceltenc.c: + celtenc: build with celt 0.5. + +2009-03-22 20:14:25 +0000 Jan Schmidt + + * configure.ac: + back to development -> 0.10.11.1 + +2009-03-20 15:55:19 +0200 Stefan Kost + + * tests/check/Makefile.am: + tests: reenable metadata test + +2009-03-20 15:33:31 +0200 Stefan Kost + + * tests/check/Makefile.am: + metadata: reenable test + +2009-03-20 15:18:05 +0200 Stefan Kost + + * ext/metadata/metadataexif.h: + * ext/metadata/metadataiptc.h: + * ext/metadata/metadatamuxjpeg.c: + * ext/metadata/metadatamuxpng.c: + * ext/metadata/metadataparsejpeg.c: + * ext/metadata/metadataparsepng.c: + * ext/metadata/metadataxmp.h: + metdata: more logging and code cleanups + Sprinkle more debug log statements into the code. Move some repeaded string + constant into header files and use sizeof instead of manually counted bytes. Add + comments. + +2009-03-20 15:14:07 +0200 Stefan Kost + + * ext/metadata/metadatamuxjpeg.c: + metadata: fix muxing jfifless jpeg. Fixes #574401 + Don't error out when to be muxed jpeg has no jfif, as we can easily + add it. + +2009-03-20 15:10:22 +0200 Stefan Kost + + * ext/metadata/metadataexif.h: + * ext/metadata/metadataiptc.h: + * ext/metadata/metadataxmp.h: + metadata: fix include guards + +2009-03-20 15:04:16 +0200 Stefan Kost + + * ext/metadata/metadata.c: + metadata: rework doc comment + +2009-03-09 23:43:55 +0200 Stefan Kost + + * gst/autoconvert/Makefile.am: + * gst/camerabin/Makefile.am: + * gst/dtmf/Makefile.am: + * gst/liveadder/Makefile.am: + * gst/mxf/Makefile.am: + * gst/nuvdemux/Makefile.am: + * gst/qtmux/Makefile.am: + * gst/rtpmux/Makefile.am: + * gst/siren/Makefile.am: + * gst/valve/Makefile.am: + Makefile.am: no static libs for plugins + +2009-03-22 15:58:50 +0100 Sebastian Dröge + + * gst/mxf/mxfmux.c: + mxfmux: Fix error handling + +2009-03-22 15:51:37 +0100 Sebastian Dröge + + * gst/mxf/mxfaes-bwf.c: + * gst/mxf/mxfalaw.c: + * gst/mxf/mxfdv-dif.c: + * gst/mxf/mxfjpeg2000.c: + * gst/mxf/mxfmetadata.c: + * gst/mxf/mxfmetadata.h: + * gst/mxf/mxfmpeg.c: + * gst/mxf/mxfup.c: + * gst/mxf/mxfvc3.c: + mxfmux: Fix some memory leaks, improve debugging and handle errors better + +2009-03-22 15:35:42 +0100 Sebastian Dröge + + * gst/mxf/mxfmux.c: + * gst/mxf/mxfmux.h: + mxfmux: Add an error state from which we return immediately + Also improve debugging a bit. + +2009-03-19 20:41:16 +0100 Sebastian Dröge + + * gst/mxf/mxful.c: + mxf: Optimize mxf_ul_is_subclass() a bit + +2009-03-19 14:30:34 +0100 Sebastian Dröge + + * gst/mxf/Makefile.am: + * gst/mxf/mxfparse.c: + * gst/mxf/mxfparse.h: + * gst/mxf/mxftypes.h: + * gst/mxf/mxful.c: + * gst/mxf/mxful.h: + mxf: Start implementing a central UL database and add some helper functions and use them + +2009-03-17 14:27:50 +0100 Sebastian Dröge + + * gst/mxf/mxfmpeg.c: + mxfmux: Make sure to include a picture in the edit units when muxing MPEG2/MPEG4 + +2009-03-17 14:23:37 +0100 Sebastian Dröge + + * gst/mxf/mxfmpeg.c: + mxfdemux: Remove accidentially committed g_assert_not_reached() + +2009-03-16 17:49:40 +0100 Sebastian Dröge + + * gst/mxf/mxfup.c: + mxf: Add support for muxing/demuxing subsampled YUV formats + +2009-03-16 17:22:22 +0100 Sebastian Dröge + + * gst/mxf/mxfup.c: + mxfdemux: Use correct width/height for stride conversions + +2009-03-16 17:18:17 +0100 Sebastian Dröge + + * gst/mxf/mxfup.c: + mxf: Implement stride transformations for raw video content for muxing and demuxing + +2009-03-16 15:37:25 +0100 Sebastian Dröge + + * gst/mxf/mxfup.c: + mxfdemux: Simplify caps selection by using a lookup table + +2009-03-16 12:48:31 +0100 Sebastian Dröge + + * gst/mxf/mxfup.c: + mxfmux: Add initial support for muxing raw picture essence + +2009-03-16 12:15:46 +0100 Sebastian Dröge + + * gst/mxf/mxfmux.c: + mxfmux: Only add an essence container UL once to the partition and preface + +2009-03-16 12:07:20 +0100 Sebastian Dröge + + * gst/mxf/mxfup.c: + mxfdemux: Add support for AYUV and v308 YUV colorspaces + +2009-03-16 11:00:57 +0100 Sebastian Dröge + + * gst/mxf/mxfmpeg.c: + mxfmux: Use the correct edit rate instead of estimating it from the first buffer duration + +2009-03-15 15:27:56 +0100 Sebastian Dröge + + * gst/mxf/mxfdemux.c: + mxfdemux: Error out directly if pushing a packet downstream failed + +2009-03-15 15:27:24 +0100 Sebastian Dröge + + * gst/mxf/mxfdv-dif.c: + mxfmux: Add support for DV/DIF muxing and add framerate, etc to the caps when demuxing DV/DIF content + +2009-03-15 15:27:03 +0100 Sebastian Dröge + + * gst/mxf/mxfmux.c: + mxfmux: Add some debugging and error out on invalid input data + +2009-03-14 19:59:39 +0100 Sebastian Dröge + + * gst/deinterlace/gstdeinterlace.c: + deinterlace: Fix uninitialized variable compiler warnings + +2009-03-11 19:38:26 +0100 Sebastian Dröge + + * gst/mxf/mxfmpeg.c: + mxfmux: Add support for muxing MPEG audio and video + +2009-03-11 19:38:02 +0100 Sebastian Dröge + + * gst/mxf/mxfmpeg.c: + mxfdemux: Use correct caps type for AC3 audio (audio/x-ac3 instead of audio/ac3) + +2009-03-11 19:34:12 +0100 Sebastian Dröge + + * gst/mxf/mxfjpeg2000.c: + mxfmux: Add support for muxing JPEG2000 code streams + +2009-03-11 19:33:54 +0100 Sebastian Dröge + + * gst/mxf/mxfvc3.c: + mxfmux: Add support for muxing VC-3 (aka DNxHD) video + +2009-03-11 19:33:38 +0100 Sebastian Dröge + + * gst/mxf/mxfalaw.c: + mxfmux: Add support for muxing A-Law audio + +2009-03-11 19:33:18 +0100 Sebastian Dröge + + * gst/mxf/mxfaes-bwf.c: + mxfmux: Add support for muxing raw audio + +2009-03-11 19:32:16 +0100 Sebastian Dröge + + * configure.ac: + * gst/mxf/Makefile.am: + * gst/mxf/mxf.c: + * gst/mxf/mxfmetadata.c: + * gst/mxf/mxfmetadata.h: + * gst/mxf/mxfmux.c: + * gst/mxf/mxfmux.h: + * gst/mxf/mxfparse.c: + * gst/mxf/mxfparse.h: + * gst/mxf/mxftypes.h: + * gst/mxf/mxfwrite.c: + * gst/mxf/mxfwrite.h: + mxf: Add MXF muxer + This muxer currently only supports OP1a and is + probably not yet 100% complying to the standards. + +2009-03-11 19:30:22 +0100 Sebastian Dröge + + * ext/jp2k/gstjasperenc.c: + jp2kenc: Add width/height/fourcc to the pad template caps + === release 0.10.11 === -2009-03-21 Jan Schmidt +2009-03-21 01:09:08 +0000 Jan Schmidt + * ChangeLog: + * NEWS: + * RELEASE: * configure.ac: - releasing 0.10.11, "A precious stone" + * docs/plugins/gst-plugins-bad-plugins.args: + * docs/plugins/gst-plugins-bad-plugins.hierarchy: + * docs/plugins/gst-plugins-bad-plugins.interfaces: + * docs/plugins/gst-plugins-bad-plugins.prerequisites: + * docs/plugins/gst-plugins-bad-plugins.signals: + * docs/plugins/inspect/plugin-aacparse.xml: + * docs/plugins/inspect/plugin-aiffparse.xml: + * docs/plugins/inspect/plugin-alsaspdif.xml: + * docs/plugins/inspect/plugin-amrparse.xml: + * docs/plugins/inspect/plugin-apex.xml: + * docs/plugins/inspect/plugin-autoconvert.xml: + * docs/plugins/inspect/plugin-bayer.xml: + * docs/plugins/inspect/plugin-bz2.xml: + * docs/plugins/inspect/plugin-camerabin.xml: + * docs/plugins/inspect/plugin-cdaudio.xml: + * docs/plugins/inspect/plugin-cdxaparse.xml: + * docs/plugins/inspect/plugin-celt.xml: + * docs/plugins/inspect/plugin-dc1394.xml: + * docs/plugins/inspect/plugin-dccp.xml: + * docs/plugins/inspect/plugin-deinterlace2.xml: + * docs/plugins/inspect/plugin-dfbvideosink.xml: + * docs/plugins/inspect/plugin-dirac.xml: + * docs/plugins/inspect/plugin-dtmf.xml: + * docs/plugins/inspect/plugin-dtsdec.xml: + * docs/plugins/inspect/plugin-dvb.xml: + * docs/plugins/inspect/plugin-dvdspu.xml: + * docs/plugins/inspect/plugin-faac.xml: + * docs/plugins/inspect/plugin-faad.xml: + * docs/plugins/inspect/plugin-fbdevsink.xml: + * docs/plugins/inspect/plugin-festival.xml: + * docs/plugins/inspect/plugin-flv.xml: + * docs/plugins/inspect/plugin-freeze.xml: + * docs/plugins/inspect/plugin-gsm.xml: + * docs/plugins/inspect/plugin-gstinterlace.xml: + * docs/plugins/inspect/plugin-gstrtpmanager.xml: + * docs/plugins/inspect/plugin-gstsiren.xml: + * docs/plugins/inspect/plugin-h264parse.xml: + * docs/plugins/inspect/plugin-jack.xml: + * docs/plugins/inspect/plugin-ladspa.xml: + * docs/plugins/inspect/plugin-legacyresample.xml: + * docs/plugins/inspect/plugin-liveadder.xml: + * docs/plugins/inspect/plugin-metadata.xml: + * docs/plugins/inspect/plugin-mms.xml: + * docs/plugins/inspect/plugin-modplug.xml: + * docs/plugins/inspect/plugin-mpeg2enc.xml: + * docs/plugins/inspect/plugin-mpeg4videoparse.xml: + * docs/plugins/inspect/plugin-mpegdemux2.xml: + * docs/plugins/inspect/plugin-mpegtsmux.xml: + * docs/plugins/inspect/plugin-mpegvideoparse.xml: + * docs/plugins/inspect/plugin-musepack.xml: + * docs/plugins/inspect/plugin-musicbrainz.xml: + * docs/plugins/inspect/plugin-mve.xml: + * docs/plugins/inspect/plugin-mxf.xml: + * docs/plugins/inspect/plugin-mythtv.xml: + * docs/plugins/inspect/plugin-nas.xml: + * docs/plugins/inspect/plugin-neon.xml: + * docs/plugins/inspect/plugin-nsfdec.xml: + * docs/plugins/inspect/plugin-nuvdemux.xml: + * docs/plugins/inspect/plugin-ofa.xml: + * docs/plugins/inspect/plugin-oss4.xml: + * docs/plugins/inspect/plugin-pcapparse.xml: + * docs/plugins/inspect/plugin-qtmux.xml: + * docs/plugins/inspect/plugin-rawparse.xml: + * docs/plugins/inspect/plugin-real.xml: + * docs/plugins/inspect/plugin-resindvd.xml: + * docs/plugins/inspect/plugin-rfbsrc.xml: + * docs/plugins/inspect/plugin-rtpmux.xml: + * docs/plugins/inspect/plugin-scaletempo.xml: + * docs/plugins/inspect/plugin-sdl.xml: + * docs/plugins/inspect/plugin-sdp.xml: + * docs/plugins/inspect/plugin-selector.xml: + * docs/plugins/inspect/plugin-sndfile.xml: + * docs/plugins/inspect/plugin-soundtouch.xml: + * docs/plugins/inspect/plugin-spcdec.xml: + * docs/plugins/inspect/plugin-speed.xml: + * docs/plugins/inspect/plugin-stereo.xml: + * docs/plugins/inspect/plugin-subenc.xml: + * docs/plugins/inspect/plugin-tta.xml: + * docs/plugins/inspect/plugin-valve.xml: + * docs/plugins/inspect/plugin-vcdsrc.xml: + * docs/plugins/inspect/plugin-videosignal.xml: + * docs/plugins/inspect/plugin-vmnc.xml: + * docs/plugins/inspect/plugin-wildmidi.xml: + * docs/plugins/inspect/plugin-x264.xml: + * docs/plugins/inspect/plugin-xdgmime.xml: + * docs/plugins/inspect/plugin-xvid.xml: + * docs/plugins/inspect/plugin-y4menc.xml: + * gst-plugins-bad.doap: + * win32/common/config.h: + Release 0.10.11 2009-03-20 23:37:39 +0000 Jan Schmidt diff --git a/configure.ac b/configure.ac index 0af76e12..6f467cc0 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ AC_PREREQ(2.52) dnl initialize autoconf dnl when going to/from release please set the nano (fourth number) right ! dnl releases only do Wall, cvs and prerelease does Werror too -AC_INIT(GStreamer Bad Plug-ins, 0.10.11.1, +AC_INIT(GStreamer Bad Plug-ins, 0.10.11.2, http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer, gst-plugins-bad) diff --git a/po/af.po b/po/af.po index 623a635d..bcdb15a2 100644 --- a/po/af.po +++ b/po/af.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins 0.7.6\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-03-20 23:36+0000\n" +"POT-Creation-Date: 2009-05-12 00:07+0100\n" "PO-Revision-Date: 2004-03-18 14:16+0200\n" "Last-Translator: Petri Jooste \n" "Language-Team: Afrikaans \n" @@ -15,17 +15,17 @@ msgstr "" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" -#: ext/resindvd/resindvdsrc.c:333 +#: ext/resindvd/resindvdsrc.c:352 #, fuzzy msgid "Could not read title information for DVD." msgstr "Kon nie skryf na lêer \"%s\" nie." -#: ext/resindvd/resindvdsrc.c:339 +#: ext/resindvd/resindvdsrc.c:358 #, fuzzy, c-format msgid "Failed to open DVD device '%s'." msgstr "Kon nie beheertoestel \"%s\" toemaak nie." -#: ext/resindvd/resindvdsrc.c:345 +#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "" @@ -57,22 +57,22 @@ msgstr "" msgid "Could not write to file \"%s\"." msgstr "Kon nie skryf na lêer \"%s\" nie." -#: sys/dvb/gstdvbsrc.c:699 sys/dvb/gstdvbsrc.c:792 +#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Toestel \"%s\" bestaan nie." -#: sys/dvb/gstdvbsrc.c:703 +#: sys/dvb/gstdvbsrc.c:710 #, fuzzy, c-format msgid "Could not open frontend device \"%s\"." msgstr "Kon nie beheertoestel \"%s\" toemaak nie." -#: sys/dvb/gstdvbsrc.c:715 +#: sys/dvb/gstdvbsrc.c:722 #, fuzzy, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Kon nie genoeg buffers vanaf toestel \"%s\" kry nie." -#: sys/dvb/gstdvbsrc.c:796 +#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Kon nie lêer \"%s\" oopmaak om te lees nie." diff --git a/po/az.po b/po/az.po index 1950ffde..343edd02 100644 --- a/po/az.po +++ b/po/az.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-0.8.0\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-03-20 23:36+0000\n" +"POT-Creation-Date: 2009-05-12 00:07+0100\n" "PO-Revision-Date: 2004-03-19 18:29+0200\n" "Last-Translator: Metin Amiroff \n" "Language-Team: Azerbaijani \n" @@ -16,17 +16,17 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.0.2\n" -#: ext/resindvd/resindvdsrc.c:333 +#: ext/resindvd/resindvdsrc.c:352 #, fuzzy msgid "Could not read title information for DVD." msgstr "\"%s\" faylına yazıla bilmÉ™di." -#: ext/resindvd/resindvdsrc.c:339 +#: ext/resindvd/resindvdsrc.c:358 #, fuzzy, c-format msgid "Failed to open DVD device '%s'." msgstr "\"%s\" idarÉ™ avadanlığı baÄŸlana bilmÉ™di." -#: ext/resindvd/resindvdsrc.c:345 +#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "" @@ -58,22 +58,22 @@ msgstr "" msgid "Could not write to file \"%s\"." msgstr "\"%s\" faylına yazıla bilmÉ™di." -#: sys/dvb/gstdvbsrc.c:699 sys/dvb/gstdvbsrc.c:792 +#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "\"%s\" avadanlığı mövcud deyil." -#: sys/dvb/gstdvbsrc.c:703 +#: sys/dvb/gstdvbsrc.c:710 #, fuzzy, c-format msgid "Could not open frontend device \"%s\"." msgstr "\"%s\" idarÉ™ avadanlığı baÄŸlana bilmÉ™di." -#: sys/dvb/gstdvbsrc.c:715 +#: sys/dvb/gstdvbsrc.c:722 #, fuzzy, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "\"%s\" avadanlığından kifayÉ™t qÉ™dÉ™r bufferlÉ™r alına bilmÉ™di." -#: sys/dvb/gstdvbsrc.c:796 +#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "\"%s\" faylı oxuma üçün açıla bilmÉ™di." diff --git a/po/bg.po b/po/bg.po index 346f9c81..80bb8d76 100644 --- a/po/bg.po +++ b/po/bg.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.7.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-03-20 23:36+0000\n" +"POT-Creation-Date: 2009-05-12 00:07+0100\n" "PO-Revision-Date: 2008-07-21 11:20+0300\n" "Last-Translator: Alexander Shopov \n" "Language-Team: Bulgarian \n" @@ -16,17 +16,17 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -#: ext/resindvd/resindvdsrc.c:333 +#: ext/resindvd/resindvdsrc.c:352 #, fuzzy msgid "Could not read title information for DVD." msgstr "Във файла „%s“ не може да Ñе пише." -#: ext/resindvd/resindvdsrc.c:339 +#: ext/resindvd/resindvdsrc.c:358 #, fuzzy, c-format msgid "Failed to open DVD device '%s'." msgstr "УÑтройÑтвото „%s“ не може да бъде отворено." -#: ext/resindvd/resindvdsrc.c:345 +#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "" @@ -59,22 +59,22 @@ msgstr "Вътрешна грешка в потока от данни." msgid "Could not write to file \"%s\"." msgstr "Във файла „%s“ не може да Ñе пише." -#: sys/dvb/gstdvbsrc.c:699 sys/dvb/gstdvbsrc.c:792 +#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "УÑтройÑтвото „%s“ не ÑъщеÑтвува." -#: sys/dvb/gstdvbsrc.c:703 +#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "УÑтройÑтвото „%s“ не може да бъде отворено." -#: sys/dvb/gstdvbsrc.c:715 +#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Ðе могат да бъдат получени наÑтройките от уÑтройÑтвото „%s“." -#: sys/dvb/gstdvbsrc.c:796 +#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Файлът „%s“ не може да бъде отворен за четене." diff --git a/po/ca.po b/po/ca.po index bd8311ff..2f9bde11 100644 --- a/po/ca.po +++ b/po/ca.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins 0.8.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-03-20 23:36+0000\n" +"POT-Creation-Date: 2009-05-12 00:07+0100\n" "PO-Revision-Date: 2004-08-05 15:48+0200\n" "Last-Translator: Jordi Mallach \n" "Language-Team: Catalan \n" @@ -15,17 +15,17 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ext/resindvd/resindvdsrc.c:333 +#: ext/resindvd/resindvdsrc.c:352 #, fuzzy msgid "Could not read title information for DVD." msgstr "No s'ha pogut escriure al fitxer «%s»." -#: ext/resindvd/resindvdsrc.c:339 +#: ext/resindvd/resindvdsrc.c:358 #, fuzzy, c-format msgid "Failed to open DVD device '%s'." msgstr "No s'ha pogut tancar el dispositiu de control «%s»." -#: ext/resindvd/resindvdsrc.c:345 +#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "" @@ -57,22 +57,22 @@ msgstr "" msgid "Could not write to file \"%s\"." msgstr "No s'ha pogut escriure al fitxer «%s»." -#: sys/dvb/gstdvbsrc.c:699 sys/dvb/gstdvbsrc.c:792 +#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "El dispositiu «%s» no existeix." -#: sys/dvb/gstdvbsrc.c:703 +#: sys/dvb/gstdvbsrc.c:710 #, fuzzy, c-format msgid "Could not open frontend device \"%s\"." msgstr "No s'ha pogut tancar el dispositiu de control «%s»." -#: sys/dvb/gstdvbsrc.c:715 +#: sys/dvb/gstdvbsrc.c:722 #, fuzzy, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "No s'han pogut obtenir búfers suficients del dispositiu «%s»." -#: sys/dvb/gstdvbsrc.c:796 +#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "No s'ha pogut obrir el fitxer «%s» per a la lectura." diff --git a/po/cs.po b/po/cs.po index 60927dd3..5c80d30b 100644 --- a/po/cs.po +++ b/po/cs.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.9.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-03-20 23:36+0000\n" +"POT-Creation-Date: 2009-05-12 00:07+0100\n" "PO-Revision-Date: 2009-01-18 18:55+0100\n" "Last-Translator: Petr Kovar \n" "Language-Team: Czech \n" @@ -18,16 +18,16 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -#: ext/resindvd/resindvdsrc.c:333 +#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "NezdaÅ™ilo se pÅ™eÄtení informací o titulu DVD." -#: ext/resindvd/resindvdsrc.c:339 +#: ext/resindvd/resindvdsrc.c:358 #, c-format msgid "Failed to open DVD device '%s'." msgstr "NezdaÅ™ilo se otevÅ™ení zařízení DVD \"%s\"." -#: ext/resindvd/resindvdsrc.c:345 +#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "NezdaÅ™ilo se nastavení hledání založeného na PGC." @@ -58,22 +58,22 @@ msgstr "Chyba proudu vnitÅ™ních dat." msgid "Could not write to file \"%s\"." msgstr "NezdaÅ™il se zápis do souboru \"%s\"." -#: sys/dvb/gstdvbsrc.c:699 sys/dvb/gstdvbsrc.c:792 +#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Zařízení \"%s\" neexistuje." -#: sys/dvb/gstdvbsrc.c:703 +#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "NezdaÅ™ilo se otevÅ™ení zařízení rozhraní \"%s\"." -#: sys/dvb/gstdvbsrc.c:715 +#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Ze zařízení rozhraní \"%s\" se nezdaÅ™ilo získat nastavení." -#: sys/dvb/gstdvbsrc.c:796 +#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "NezdaÅ™ilo se otevÅ™ení souboru \"%s\" ke Ätení." diff --git a/po/da.po b/po/da.po index ff72a86d..3e47de8a 100644 --- a/po/da.po +++ b/po/da.po @@ -1,33 +1,33 @@ # Danish translation of gst-plugins-bad. -# Copyright (C) 2008 gst. +# Copyright (C) 2009 gst. # This file is distributed under the same license as the gst-plugins-bad package. # Mogens Jaeger , 2007. -# Joe Hansen , 2008. +# Joe Hansen , 2008, 2009. # msgid "" msgstr "" -"Project-Id-Version: gst-plugins-bad-0.10.8.3\n" +"Project-Id-Version: gst-plugins-bad-0.10.10.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-03-20 23:36+0000\n" -"PO-Revision-Date: 2008-11-05 11:28+0200\n" +"POT-Creation-Date: 2009-05-12 00:07+0100\n" +"PO-Revision-Date: 2009-04-13 11:28+0200\n" "Last-Translator: Joe Hansen \n" "Language-Team: Danish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ext/resindvd/resindvdsrc.c:333 +#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "Kunne ikke læse titelinformation for dvd." -#: ext/resindvd/resindvdsrc.c:339 +#: ext/resindvd/resindvdsrc.c:358 #, c-format msgid "Failed to open DVD device '%s'." msgstr "Kunne ikke Ã¥bne dvd-enhed »%s«." -#: ext/resindvd/resindvdsrc.c:345 +#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." -msgstr "" +msgstr "Kunne ikke indstille PGC-baseret søgning." #: ext/resindvd/rsnbasesrc.c:1659 msgid "Internal clock error." @@ -45,7 +45,7 @@ msgstr "Intet filnavn er angivet til skrivning." #: ext/sndfile/gstsfsink.c:290 ext/sndfile/gstsfsrc.c:351 #, c-format msgid "Could not open file \"%s\" for writing." -msgstr "Kunne ikke Ã¥bne filen »%s« for skrivning." +msgstr "Kunne ikke Ã¥bne filen »%s« til skrivning." #: ext/sndfile/gstsfsink.c:440 gst/nuvdemux/gstnuvdemux.c:735 msgid "Internal data stream error." @@ -56,22 +56,22 @@ msgstr "Intern datastrømfejl." msgid "Could not write to file \"%s\"." msgstr "Kunne ikke skrive til fil »%s«." -#: sys/dvb/gstdvbsrc.c:699 sys/dvb/gstdvbsrc.c:792 +#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Enheden »%s« eksisterer ikke." -#: sys/dvb/gstdvbsrc.c:703 +#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Kunne ikke Ã¥bne forende-enheden »%s«." -#: sys/dvb/gstdvbsrc.c:715 +#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Kunne ikke hente indstillinger fra forende-enheden »%s«." -#: sys/dvb/gstdvbsrc.c:796 +#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Kunne ikke Ã¥bne filen »%s« for læsning." diff --git a/po/de.po b/po/de.po index 3958c468..4cba82df 100644 --- a/po/de.po +++ b/po/de.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.5.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-03-20 23:36+0000\n" +"POT-Creation-Date: 2009-05-12 00:07+0100\n" "PO-Revision-Date: 2008-01-01 20:00+0100\n" "Last-Translator: Andre Klapper \n" "Language-Team: German \n" @@ -16,17 +16,17 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: ext/resindvd/resindvdsrc.c:333 +#: ext/resindvd/resindvdsrc.c:352 #, fuzzy msgid "Could not read title information for DVD." msgstr "Es konnte nicht in Datei »%s« geschrieben werden." -#: ext/resindvd/resindvdsrc.c:339 +#: ext/resindvd/resindvdsrc.c:358 #, fuzzy, c-format msgid "Failed to open DVD device '%s'." msgstr "Frontend-Gerät »%s« konnte nicht geöffnet werden." -#: ext/resindvd/resindvdsrc.c:345 +#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "" @@ -59,22 +59,22 @@ msgstr "Interner Datenstromfehler." msgid "Could not write to file \"%s\"." msgstr "Es konnte nicht in Datei »%s« geschrieben werden." -#: sys/dvb/gstdvbsrc.c:699 sys/dvb/gstdvbsrc.c:792 +#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Gerät »%s« existiert nicht." -#: sys/dvb/gstdvbsrc.c:703 +#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Frontend-Gerät »%s« konnte nicht geöffnet werden." -#: sys/dvb/gstdvbsrc.c:715 +#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Einstellungen des Frontend-Geräts »%s« konnten nicht aufgerufen werden." -#: sys/dvb/gstdvbsrc.c:796 +#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Datei »%s« konnte nicht zum Lesen geöffnet werden." diff --git a/po/en_GB.po b/po/en_GB.po index ce51a46f..b816d5be 100644 --- a/po/en_GB.po +++ b/po/en_GB.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins 0.8.1\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-03-20 23:36+0000\n" +"POT-Creation-Date: 2009-05-12 00:07+0100\n" "PO-Revision-Date: 2004-04-26 10:41-0400\n" "Last-Translator: Gareth Owen \n" "Language-Team: English (British) \n" @@ -14,17 +14,17 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ext/resindvd/resindvdsrc.c:333 +#: ext/resindvd/resindvdsrc.c:352 #, fuzzy msgid "Could not read title information for DVD." msgstr "Could not write to file \"%s\"." -#: ext/resindvd/resindvdsrc.c:339 +#: ext/resindvd/resindvdsrc.c:358 #, fuzzy, c-format msgid "Failed to open DVD device '%s'." msgstr "Could not close control device \"%s\"." -#: ext/resindvd/resindvdsrc.c:345 +#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "" @@ -56,22 +56,22 @@ msgstr "" msgid "Could not write to file \"%s\"." msgstr "Could not write to file \"%s\"." -#: sys/dvb/gstdvbsrc.c:699 sys/dvb/gstdvbsrc.c:792 +#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Device \"%s\" does not exist." -#: sys/dvb/gstdvbsrc.c:703 +#: sys/dvb/gstdvbsrc.c:710 #, fuzzy, c-format msgid "Could not open frontend device \"%s\"." msgstr "Could not close control device \"%s\"." -#: sys/dvb/gstdvbsrc.c:715 +#: sys/dvb/gstdvbsrc.c:722 #, fuzzy, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Could not get enough buffers from device \"%s\"." -#: sys/dvb/gstdvbsrc.c:796 +#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Could not open file \"%s\" for reading." diff --git a/po/es.po b/po/es.po index 305316c5..cb4fe93c 100644 --- a/po/es.po +++ b/po/es.po @@ -1,14 +1,14 @@ -# translation of gst-plugins-bad-0.10.8.3.po to Español +# translation of gst-plugins-bad-0.10.10.2.po to Español # spanish translation for gst-plugins-bad # This file is put in the public domain. # -# Jorge González González , 2007, 2008. +# Jorge González González , 2007, 20, 2009. msgid "" msgstr "" -"Project-Id-Version: gst-plugins-bad 0.10.8.3\n" +"Project-Id-Version: gst-plugins-bad 0.10.10.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-03-20 23:36+0000\n" -"PO-Revision-Date: 2008-10-18 17:06+0200\n" +"POT-Creation-Date: 2009-05-12 00:07+0100\n" +"PO-Revision-Date: 2009-04-04 13:31+0200\n" "Last-Translator: Jorge González González \n" "Language-Team: Spanish \n" "MIME-Version: 1.0\n" @@ -17,18 +17,18 @@ msgstr "" "X-Generator: KBabel 1.11.4\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: ext/resindvd/resindvdsrc.c:333 +#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "No se pudo leer la información del título para el DVD." -#: ext/resindvd/resindvdsrc.c:339 +#: ext/resindvd/resindvdsrc.c:358 #, c-format msgid "Failed to open DVD device '%s'." msgstr "Falló abrir el dispositivo DVD «%s»." -#: ext/resindvd/resindvdsrc.c:345 +#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." -msgstr "" +msgstr "Falló al establecer la búsqueda basada en PGC." #: ext/resindvd/rsnbasesrc.c:1659 msgid "Internal clock error." @@ -57,22 +57,22 @@ msgstr "Error en el flujo de datos interno." msgid "Could not write to file \"%s\"." msgstr "No se pudo escribir en el archivo «%s»." -#: sys/dvb/gstdvbsrc.c:699 sys/dvb/gstdvbsrc.c:792 +#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "El dispositivo «%s» no existe." -#: sys/dvb/gstdvbsrc.c:703 +#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "No se pudo abrir el dispositivo frontend «%s»." -#: sys/dvb/gstdvbsrc.c:715 +#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "No se pudieron obtener los ajustes del dispositivo frontend «%s»." -#: sys/dvb/gstdvbsrc.c:796 +#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "No se pudo abrir el archivo «%s» para leer." diff --git a/po/fi.po b/po/fi.po index 867bcef9..77e421dd 100644 --- a/po/fi.po +++ b/po/fi.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.10.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-03-20 23:36+0000\n" +"POT-Creation-Date: 2009-05-12 00:07+0100\n" "PO-Revision-Date: 2009-03-11 08:23+0200\n" "Last-Translator: Tommi Vainikainen \n" "Language-Team: Finnish \n" @@ -21,16 +21,16 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: KBabel 1.11.2\n" -#: ext/resindvd/resindvdsrc.c:333 +#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "DVD:n otsikkotietoja ei voitu lukea." -#: ext/resindvd/resindvdsrc.c:339 +#: ext/resindvd/resindvdsrc.c:358 #, c-format msgid "Failed to open DVD device '%s'." msgstr "DVD-laitetta \"%s\" ei voitu avata." -#: ext/resindvd/resindvdsrc.c:345 +#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "PGC-pohjaisen kelauksen asetus epäonnistui." @@ -61,22 +61,22 @@ msgstr "Sisäisen tietovirran virhe." msgid "Could not write to file \"%s\"." msgstr "Tiedostoon \"%s\" ei voitu kirjoittaa." -#: sys/dvb/gstdvbsrc.c:699 sys/dvb/gstdvbsrc.c:792 +#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Laitetta \"%s\" ei ole olemassa." -#: sys/dvb/gstdvbsrc.c:703 +#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Edustalaitetta \"%s\" ei voitu avata." -#: sys/dvb/gstdvbsrc.c:715 +#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Edustalaitteen \"%s\" asetuksia ei saatu." -#: sys/dvb/gstdvbsrc.c:796 +#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Tiedostoa \"%s\" ei voi avata luettavaksi." diff --git a/po/fr.po b/po/fr.po index ff4e8b66..23b7543b 100644 --- a/po/fr.po +++ b/po/fr.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.8.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-03-20 23:36+0000\n" +"POT-Creation-Date: 2009-05-12 00:07+0100\n" "PO-Revision-Date: 2008-10-21 09:59+0200\n" "Last-Translator: Claude Paroz \n" "Language-Team: French \n" @@ -16,16 +16,16 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ext/resindvd/resindvdsrc.c:333 +#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "Impossible de lire les informations de titre du DVD." -#: ext/resindvd/resindvdsrc.c:339 +#: ext/resindvd/resindvdsrc.c:358 #, c-format msgid "Failed to open DVD device '%s'." msgstr "Impossible d'ouvrir le périphérique du DVD « %s »." -#: ext/resindvd/resindvdsrc.c:345 +#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "" @@ -56,22 +56,22 @@ msgstr "Erreur interne de flux de données." msgid "Could not write to file \"%s\"." msgstr "Impossible d'écrire dans le fichier « %s »." -#: sys/dvb/gstdvbsrc.c:699 sys/dvb/gstdvbsrc.c:792 +#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Le périphérique « %s » n'existe pas." -#: sys/dvb/gstdvbsrc.c:703 +#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Impossible d'ouvrir le périphérique frontal « %s »." -#: sys/dvb/gstdvbsrc.c:715 +#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Impossible d'obtenir les paramètres du périphérique frontal « %s »." -#: sys/dvb/gstdvbsrc.c:796 +#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Impossible d'ouvrir le fichier « %s » en lecture." diff --git a/po/hu.po b/po/hu.po index 51d1a976..0891142b 100644 --- a/po/hu.po +++ b/po/hu.po @@ -1,13 +1,13 @@ # Hungarian translation of gst-plugins-bad # This file is distributed under the same license as the gst-plugins-bad package. -# Copyright (C) 2007, 2008 Free Software Foundation, Inc. -# Gabor Kelemen , 2007, 2008. +# Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. +# Gabor Kelemen , 2007, 2008, 2009. msgid "" msgstr "" -"Project-Id-Version: gst-plugins-bad 0.10.6.3\n" +"Project-Id-Version: gst-plugins-bad 0.10.10.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-03-20 23:36+0000\n" -"PO-Revision-Date: 2008-05-12 03:32+0200\n" +"POT-Creation-Date: 2009-05-12 00:07+0100\n" +"PO-Revision-Date: 2009-04-20 02:16+0200\n" "Last-Translator: Gabor Kelemen \n" "Language-Team: Hungarian \n" "MIME-Version: 1.0\n" @@ -16,28 +16,25 @@ msgstr "" "X-Generator: KBabel 1.11.4\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: ext/resindvd/resindvdsrc.c:333 -#, fuzzy +#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." -msgstr "Nem lehet írni a fájlba („%sâ€)." +msgstr "Nem lehet címinformációkat olvasni a DVD-rÅ‘l." -#: ext/resindvd/resindvdsrc.c:339 -#, fuzzy, c-format +#: ext/resindvd/resindvdsrc.c:358 +#, c-format msgid "Failed to open DVD device '%s'." -msgstr "Nem nyitható meg az elÅ‘téteszköz („%sâ€)." +msgstr "Nem nyitható meg a DVD eszköz („%sâ€)." -#: ext/resindvd/resindvdsrc.c:345 +#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." -msgstr "" +msgstr "A PGC-alapú keresés beállítása meghiúsult." #: ext/resindvd/rsnbasesrc.c:1659 -#, fuzzy msgid "Internal clock error." -msgstr "BelsÅ‘ adatfolyamhiba." +msgstr "BelsÅ‘ órahiba." #: ext/resindvd/rsnbasesrc.c:1904 ext/resindvd/rsnbasesrc.c:1915 #: gst/aiffparse/aiffparse.c:1265 -#, fuzzy msgid "Internal data flow error." msgstr "BelsÅ‘ adatfolyamhiba." @@ -59,336 +56,342 @@ msgstr "BelsÅ‘ adatfolyamhiba." msgid "Could not write to file \"%s\"." msgstr "Nem lehet írni a fájlba („%sâ€)." -#: sys/dvb/gstdvbsrc.c:699 sys/dvb/gstdvbsrc.c:792 +#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Az eszköz („%sâ€) nem létezik." -#: sys/dvb/gstdvbsrc.c:703 +#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Nem nyitható meg az elÅ‘téteszköz („%sâ€)." -#: sys/dvb/gstdvbsrc.c:715 +#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Nem kérhetÅ‘k le a beállítások az elÅ‘téteszköztÅ‘l („%sâ€)." -#: sys/dvb/gstdvbsrc.c:796 +#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "A fájl („%sâ€) nem nyitható meg olvasásra." #: sys/oss4/oss4-mixer.c:302 -#, fuzzy msgid "Could not open audio device for mixer control handling." -msgstr "A fájl („%sâ€) nem nyitható meg olvasásra." +msgstr "A hangeszköz nem nyitható meg a keverÅ‘ vezérlÅ‘inek kezeléséhez." #: sys/oss4/oss4-mixer.c:316 msgid "" "Could not open audio device for mixer control handling. This version of the " "Open Sound System is not supported by this element." msgstr "" +"A hangeszköz nem nyitható meg a keverÅ‘ vezérlÅ‘inek kezeléséhez. A Nyílt " +"hangrendszer ezen verzióját nem támogatja az elem." #: sys/oss4/oss4-mixer.c:720 msgid "Fast" -msgstr "" +msgstr "Gyors" #: sys/oss4/oss4-mixer.c:721 msgid "Low" -msgstr "" +msgstr "Alacsony" #: sys/oss4/oss4-mixer.c:722 msgid "Medium" -msgstr "" +msgstr "Közepes" #: sys/oss4/oss4-mixer.c:723 msgid "High" -msgstr "" +msgstr "Magas" #: sys/oss4/oss4-mixer.c:724 msgid "Very high" -msgstr "" +msgstr "Nagyon magas" #: sys/oss4/oss4-mixer.c:725 msgid "Production" -msgstr "" +msgstr "Előállítás" #: sys/oss4/oss4-mixer.c:726 msgid "Off" -msgstr "" +msgstr "Ki" #: sys/oss4/oss4-mixer.c:727 msgid "On" -msgstr "" +msgstr "Be" #: sys/oss4/oss4-mixer.c:728 msgid "Stereo" -msgstr "" +msgstr "Sztereó" #: sys/oss4/oss4-mixer.c:729 msgid "Surround sound" -msgstr "" +msgstr "Térhatású hang" #: sys/oss4/oss4-mixer.c:730 sys/oss4/oss4-mixer.c:805 msgid "Input mix" -msgstr "" +msgstr "Bemeneti keverÅ‘" #: sys/oss4/oss4-mixer.c:731 sys/oss4/oss4-mixer.c:800 msgid "Front" -msgstr "" +msgstr "Elöl" #: sys/oss4/oss4-mixer.c:732 sys/oss4/oss4-mixer.c:801 msgid "Rear" -msgstr "" +msgstr "Hátul" #: sys/oss4/oss4-mixer.c:733 sys/oss4/oss4-mixer.c:802 msgid "Side" -msgstr "" +msgstr "Oldalt" #: sys/oss4/oss4-mixer.c:734 sys/oss4/oss4-mixer.c:803 msgid "Center / LFE" -msgstr "" +msgstr "Közép/LFE" #: sys/oss4/oss4-mixer.c:735 sys/oss4/oss4-mixer.c:794 msgid "Microphone" -msgstr "" +msgstr "Mikrofon" #: sys/oss4/oss4-mixer.c:736 sys/oss4/oss4-mixer.c:795 msgid "Front panel microphone" -msgstr "" +msgstr "ElÅ‘lapi mikrofon" #: sys/oss4/oss4-mixer.c:737 msgid "Input" -msgstr "" +msgstr "Bemenet" #: sys/oss4/oss4-mixer.c:738 sys/oss4/oss4-mixer.c:796 msgid "Line-in" -msgstr "" +msgstr "Vonalbemenet" #: sys/oss4/oss4-mixer.c:739 msgid "PCM 1" -msgstr "" +msgstr "PCM 1" #: sys/oss4/oss4-mixer.c:740 msgid "PCM 2" -msgstr "" +msgstr "PCM 2" #: sys/oss4/oss4-mixer.c:741 msgid "PCM 3" -msgstr "" +msgstr "PCM 3" #: sys/oss4/oss4-mixer.c:742 msgid "PCM 4" -msgstr "" +msgstr "PCM 4" #: sys/oss4/oss4-mixer.c:754 msgid "Green connector" -msgstr "" +msgstr "Zöld csatlakozó" #: sys/oss4/oss4-mixer.c:755 msgid "Green front panel connector" -msgstr "" +msgstr "Zöld elÅ‘lapi csatlakozó" #: sys/oss4/oss4-mixer.c:756 msgid "Pink connector" -msgstr "" +msgstr "Rózsaszín csatlakozó" #: sys/oss4/oss4-mixer.c:757 msgid "Pink front panel connector" -msgstr "" +msgstr "Rózsaszín elÅ‘lapi csatlakozó" #: sys/oss4/oss4-mixer.c:758 msgid "Blue connector" -msgstr "" +msgstr "Kék csatlakozó" #: sys/oss4/oss4-mixer.c:759 msgid "Blue front panel connector" -msgstr "" +msgstr "Kék elÅ‘lapi csatlakozó" #: sys/oss4/oss4-mixer.c:760 msgid "Orange connector" -msgstr "" +msgstr "Narancs csatlakozó" #: sys/oss4/oss4-mixer.c:761 msgid "Orange front panel connector" -msgstr "" +msgstr "Narancs elÅ‘lapi csatlakozó" #: sys/oss4/oss4-mixer.c:762 msgid "Black connector" -msgstr "" +msgstr "Fekete csatlakozó" #: sys/oss4/oss4-mixer.c:763 msgid "Black front panel connector" -msgstr "" +msgstr "Fekete elÅ‘lapi csatlakozó" #: sys/oss4/oss4-mixer.c:764 msgid "Gray connector" -msgstr "" +msgstr "Szürke csatlakozó" #: sys/oss4/oss4-mixer.c:765 msgid "Gray front panel connector" -msgstr "" +msgstr "Szürke elÅ‘lapi csatlakozó" #: sys/oss4/oss4-mixer.c:766 msgid "White connector" -msgstr "" +msgstr "Fehér csatlakozó" #: sys/oss4/oss4-mixer.c:767 msgid "White front panel connector" -msgstr "" +msgstr "Fehér elÅ‘lapi csatlakozó" #: sys/oss4/oss4-mixer.c:768 msgid "Red connector" -msgstr "" +msgstr "Vörös csatlakozó" #: sys/oss4/oss4-mixer.c:769 msgid "Red front panel connector" -msgstr "" +msgstr "Vörös elÅ‘lapi csatlakozó" #: sys/oss4/oss4-mixer.c:770 msgid "Yellow connector" -msgstr "" +msgstr "Sárga csatlakozó" #: sys/oss4/oss4-mixer.c:771 msgid "Yellow front panel connector" -msgstr "" +msgstr "Sárga elÅ‘lapi csatlakozó" #: sys/oss4/oss4-mixer.c:774 msgid "Green connector function" -msgstr "" +msgstr "Zöld csatlakozó funkciója" #: sys/oss4/oss4-mixer.c:775 msgid "Green front panel connector function" -msgstr "" +msgstr "Zöld elÅ‘lapi csatlakozó funkciója" #: sys/oss4/oss4-mixer.c:776 msgid "Pink connector function" -msgstr "" +msgstr "Rózsaszín csatlakozó funkciója" #: sys/oss4/oss4-mixer.c:777 msgid "Pink front panel connector function" -msgstr "" +msgstr "Rózsaszín elÅ‘lapi csatlakozó funkciója" #: sys/oss4/oss4-mixer.c:778 msgid "Blue connector function" -msgstr "" +msgstr "Kék csatlakozó funkciója" #: sys/oss4/oss4-mixer.c:779 msgid "Blue front panel connector function" -msgstr "" +msgstr "Kék elÅ‘lapi csatlakozó funkciója" #: sys/oss4/oss4-mixer.c:780 msgid "Orange connector function" -msgstr "" +msgstr "Narancs csatlakozó funkciója" #: sys/oss4/oss4-mixer.c:781 msgid "Orange front panel connector function" -msgstr "" +msgstr "Narancs elÅ‘lapi csatlakozó funkciója" #: sys/oss4/oss4-mixer.c:782 msgid "Black connector function" -msgstr "" +msgstr "Fekete csatlakozó funkciója" #: sys/oss4/oss4-mixer.c:783 msgid "Black front panel connector function" -msgstr "" +msgstr "Fekete elÅ‘lapi csatlakozó funkciója" #: sys/oss4/oss4-mixer.c:784 msgid "Gray connector function" -msgstr "" +msgstr "Szürke csatlakozó funkciója" #: sys/oss4/oss4-mixer.c:785 msgid "Gray front panel connector function" -msgstr "" +msgstr "Szürke elÅ‘lapi csatlakozó funkciója" #: sys/oss4/oss4-mixer.c:786 msgid "White connector function" -msgstr "" +msgstr "Fehér csatlakozó funkciója" #: sys/oss4/oss4-mixer.c:787 msgid "White front panel connector function" -msgstr "" +msgstr "Fehér elÅ‘lapi csatlakozó funkciója" #: sys/oss4/oss4-mixer.c:788 msgid "Red connector function" -msgstr "" +msgstr "Vörös csatlakozó funkciója" #: sys/oss4/oss4-mixer.c:789 msgid "Red front panel connector function" -msgstr "" +msgstr "Vörös elÅ‘lapi csatlakozó funkciója" #: sys/oss4/oss4-mixer.c:790 msgid "Yellow connector function" -msgstr "" +msgstr "Sárga csatlakozó funkciója" #: sys/oss4/oss4-mixer.c:791 msgid "Yellow front panel connector function" -msgstr "" +msgstr "Sárga elÅ‘lapi csatlakozó funkciója" #: sys/oss4/oss4-mixer.c:797 msgid "Front panel line-in" -msgstr "" +msgstr "ElÅ‘lapi vonalbemenet" #: sys/oss4/oss4-mixer.c:798 msgid "Headphones" -msgstr "" +msgstr "Fülhallgatók" #: sys/oss4/oss4-mixer.c:799 msgid "Front panel headphones" -msgstr "" +msgstr "ElÅ‘lapi fülhallgató" #: sys/oss4/oss4-mixer.c:804 msgid "PCM" -msgstr "" +msgstr "PCM" #: sys/oss4/oss4-mixer.c:846 msgid "Virtual mixer input" -msgstr "" +msgstr "Virtuális keverÅ‘bemenet" #: sys/oss4/oss4-mixer.c:848 msgid "Virtual mixer output" -msgstr "" +msgstr "Virtuális keverÅ‘kimenet" #: sys/oss4/oss4-mixer.c:850 msgid "Virtual mixer channel configuration" -msgstr "" +msgstr "Virtuális keverÅ‘ csatornabeállításai" #: sys/oss4/oss4-sink.c:376 sys/oss4/oss4-source.c:367 msgid "" "Could not open audio device for playback. Device is being used by another " "application." msgstr "" +"Nem nyitható meg hangeszköz a lejátszáshoz. Az eszközt másik alkalmazás " +"használja." #: sys/oss4/oss4-sink.c:386 sys/oss4/oss4-source.c:377 msgid "" "Could not open audio device for playback. You don't have permission to open " "the device." msgstr "" +"Nem nyitható meg hangeszköz a lejátszáshoz. Nincs jogosultsága az eszköz " +"megnyitására." #: sys/oss4/oss4-sink.c:397 sys/oss4/oss4-source.c:388 -#, fuzzy msgid "Could not open audio device for playback." -msgstr "Nem nyitható meg az elÅ‘téteszköz („%sâ€)." +msgstr "Nem nyitható meg hangeszköz a lejátszáshoz." #: sys/oss4/oss4-sink.c:406 sys/oss4/oss4-source.c:398 msgid "" "Could not open audio device for playback. This version of the Open Sound " "System is not supported by this element." msgstr "" +"Nem nyitható meg hangeszköz a lejátszáshoz. A Nyílt hangrendszer ezen " +"verzióját nem támogatja az elem." #: sys/oss4/oss4-sink.c:522 msgid "Playback is not supported by this audio device." -msgstr "" +msgstr "A hangeszköz nem támogatja a lejátszást." #: sys/oss4/oss4-sink.c:529 msgid "Audio playback error." -msgstr "" +msgstr "Hanglejátszási hiba." #: sys/oss4/oss4-source.c:520 msgid "Recording is not supported by this audio device." -msgstr "" +msgstr "A hangeszköz nem támogatja a felvételt." #: sys/oss4/oss4-source.c:527 msgid "Error recording from audio device." -msgstr "" +msgstr "Hiba a hangeszközrÅ‘l való felvételkor." diff --git a/po/id.po b/po/id.po index e55213b8..35d56758 100644 --- a/po/id.po +++ b/po/id.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.10.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-03-20 23:36+0000\n" +"POT-Creation-Date: 2009-05-12 00:07+0100\n" "PO-Revision-Date: 2009-03-10 22:23+0700\n" "Last-Translator: Andhika Padmawan \n" "Language-Team: Indonesian \n" @@ -14,16 +14,16 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ext/resindvd/resindvdsrc.c:333 +#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "Tak dapat membaca informasi judul untuk DVD." -#: ext/resindvd/resindvdsrc.c:339 +#: ext/resindvd/resindvdsrc.c:358 #, c-format msgid "Failed to open DVD device '%s'." msgstr "Gagal membuka divais DVD '%s'." -#: ext/resindvd/resindvdsrc.c:345 +#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "Gagal mengatur pencarian berbasis PGC." @@ -54,22 +54,22 @@ msgstr "Galat arus data internal." msgid "Could not write to file \"%s\"." msgstr "Tak dapat menulis ke berkas \"%s\"." -#: sys/dvb/gstdvbsrc.c:699 sys/dvb/gstdvbsrc.c:792 +#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Divais \"%s\" tak ada." -#: sys/dvb/gstdvbsrc.c:703 +#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Tak dapat membuka divais ujung-depan \"%s\"." -#: sys/dvb/gstdvbsrc.c:715 +#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Tak dapat mendapatkan pengaturan dari divais ujung-depan \"%s\"." -#: sys/dvb/gstdvbsrc.c:796 +#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Tak dapat membuka berkas \"%s\" untuk dibaca." diff --git a/po/it.po b/po/it.po index 8c711362..70c580ea 100644 --- a/po/it.po +++ b/po/it.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.9.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-03-20 23:36+0000\n" +"POT-Creation-Date: 2009-05-12 00:07+0100\n" "PO-Revision-Date: 2009-01-14 10:51+0100\n" "Last-Translator: Luca Ferretti \n" "Language-Team: Italian \n" @@ -15,16 +15,16 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ext/resindvd/resindvdsrc.c:333 +#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "Impossibile leggere le informazioni sul titolo per il DVD." -#: ext/resindvd/resindvdsrc.c:339 +#: ext/resindvd/resindvdsrc.c:358 #, c-format msgid "Failed to open DVD device '%s'." msgstr "Apertura del device DVD «%s» non riuscita." -#: ext/resindvd/resindvdsrc.c:345 +#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "Impostazione del posizionamento basato su PGC non riuscita" @@ -55,22 +55,22 @@ msgstr "Errore interno nello stream di dati." msgid "Could not write to file \"%s\"." msgstr "Impossibile scrivere sul file «%s»." -#: sys/dvb/gstdvbsrc.c:699 sys/dvb/gstdvbsrc.c:792 +#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Il device «%s» non esiste." -#: sys/dvb/gstdvbsrc.c:703 +#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Impossibile aprire il device frontend «%s»." -#: sys/dvb/gstdvbsrc.c:715 +#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Impossibile ottenere le impostazioni dal device frontend «%s»." -#: sys/dvb/gstdvbsrc.c:796 +#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Impossibile aprire il file «%s» in lettura." diff --git a/po/ky.po b/po/ky.po index f4aa4f61..d16fc5d3 100644 --- a/po/ky.po +++ b/po/ky.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.5\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-03-20 23:36+0000\n" +"POT-Creation-Date: 2009-05-12 00:07+0100\n" "PO-Revision-Date: 2007-11-13 17:16+0600\n" "Last-Translator: Ilyas Bakirov \n" "Language-Team: Kirghiz \n" @@ -16,16 +16,16 @@ msgstr "" "X-Poedit-Language: Kyrgyz\n" "X-Poedit-Country: KYRGYZSTAN\n" -#: ext/resindvd/resindvdsrc.c:333 +#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "" -#: ext/resindvd/resindvdsrc.c:339 +#: ext/resindvd/resindvdsrc.c:358 #, fuzzy, c-format msgid "Failed to open DVD device '%s'." msgstr "Ðлдын \"%s\" жабдыкты ачалган жок." -#: ext/resindvd/resindvdsrc.c:345 +#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "" @@ -56,22 +56,22 @@ msgstr "" msgid "Could not write to file \"%s\"." msgstr "Ðлдын \"%s\" жабдыкты ачалган жок." -#: sys/dvb/gstdvbsrc.c:699 sys/dvb/gstdvbsrc.c:792 +#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "\"%s\" мындай жабдык жок." -#: sys/dvb/gstdvbsrc.c:703 +#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Ðлдын \"%s\" жабдыкты ачалган жок." -#: sys/dvb/gstdvbsrc.c:715 +#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Ðлдын \"%s\" жабдыктан ыраÑтоолор алынган жок." -#: sys/dvb/gstdvbsrc.c:796 +#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "\"%s\" файлы окууга ачылган жок." diff --git a/po/lt.po b/po/lt.po index 141e7649..dd4ce9f7 100644 --- a/po/lt.po +++ b/po/lt.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad-0.10.6.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-03-20 23:36+0000\n" +"POT-Creation-Date: 2009-05-12 00:07+0100\n" "PO-Revision-Date: 2008-05-14 02:13+0300\n" "Last-Translator: Gintautas Miliauskas \n" "Language-Team: Lithuanian \n" @@ -17,17 +17,17 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%" "100<10 || n%100>=20) ? 1 : 2);\n" -#: ext/resindvd/resindvdsrc.c:333 +#: ext/resindvd/resindvdsrc.c:352 #, fuzzy msgid "Could not read title information for DVD." msgstr "Nepavyko raÅ¡yti į failÄ… „%s“." -#: ext/resindvd/resindvdsrc.c:339 +#: ext/resindvd/resindvdsrc.c:358 #, fuzzy, c-format msgid "Failed to open DVD device '%s'." msgstr "Nepavyko atverti iÅ¡orinÄ—s pusÄ—s įrenginio „%s“." -#: ext/resindvd/resindvdsrc.c:345 +#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "" @@ -60,22 +60,22 @@ msgstr "VidinÄ— duomenų srauto klaida." msgid "Could not write to file \"%s\"." msgstr "Nepavyko raÅ¡yti į failÄ… „%s“." -#: sys/dvb/gstdvbsrc.c:699 sys/dvb/gstdvbsrc.c:792 +#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Ä®renginys „%s“ neegzistuoja." -#: sys/dvb/gstdvbsrc.c:703 +#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Nepavyko atverti iÅ¡orinÄ—s pusÄ—s įrenginio „%s“." -#: sys/dvb/gstdvbsrc.c:715 +#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Nepavyko gauti nustatymų iÅ¡ iÅ¡orinÄ—s pusÄ—s įrenginio „%s“." -#: sys/dvb/gstdvbsrc.c:796 +#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Nepavyko atverti failo „%s“ skaitymui." diff --git a/po/mt.po b/po/mt.po index 80b32cc0..2741ea9d 100644 --- a/po/mt.po +++ b/po/mt.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad-0.10.8.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-03-20 23:36+0000\n" +"POT-Creation-Date: 2009-05-12 00:07+0100\n" "PO-Revision-Date: 2008-10-26 20:27+0100\n" "Last-Translator: Michel Bugeja \n" "Language-Team: Maltese \n" @@ -17,16 +17,16 @@ msgstr "" "X-Poedit-SourceCharset: utf-8\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: ext/resindvd/resindvdsrc.c:333 +#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "Ma stajtx naqra informazzjoni fuq it-titlu tad-DVD." -#: ext/resindvd/resindvdsrc.c:339 +#: ext/resindvd/resindvdsrc.c:358 #, c-format msgid "Failed to open DVD device '%s'." msgstr "Problema biex niftaħ apparat tad-DVD '%s'." -#: ext/resindvd/resindvdsrc.c:345 +#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "" @@ -57,22 +57,22 @@ msgstr "Internal data stream error." msgid "Could not write to file \"%s\"." msgstr "Ma nistax nikteb fil-fajl \"%s\". " -#: sys/dvb/gstdvbsrc.c:699 sys/dvb/gstdvbsrc.c:792 +#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Apparat \"%s\" ma jeżistiex." -#: sys/dvb/gstdvbsrc.c:703 +#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Ma nistax niftaħ apparat frontend \"%s\"." -#: sys/dvb/gstdvbsrc.c:715 +#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Ma nistax inÄ¡ib is-settings mill-apparat frontend \"%s\"." -#: sys/dvb/gstdvbsrc.c:796 +#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Ma nistax naqra mill-fajl \"%s\"." diff --git a/po/nb.po b/po/nb.po index cef24f17..f310233a 100644 --- a/po/nb.po +++ b/po/nb.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.5\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-03-20 23:36+0000\n" +"POT-Creation-Date: 2009-05-12 00:07+0100\n" "PO-Revision-Date: 2007-11-03 14:46+0100\n" "Last-Translator: Kjartan Maraas \n" "Language-Team: Norwegian Bokmaal \n" @@ -14,17 +14,17 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ext/resindvd/resindvdsrc.c:333 +#: ext/resindvd/resindvdsrc.c:352 #, fuzzy msgid "Could not read title information for DVD." msgstr "Kunne ikke skrive til fil «%s»." -#: ext/resindvd/resindvdsrc.c:339 +#: ext/resindvd/resindvdsrc.c:358 #, fuzzy, c-format msgid "Failed to open DVD device '%s'." msgstr "Kunne ikke Ã¥pne frontenhet «%s»." -#: ext/resindvd/resindvdsrc.c:345 +#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "" @@ -57,22 +57,22 @@ msgstr "Intern feil i datastrøm." msgid "Could not write to file \"%s\"." msgstr "Kunne ikke skrive til fil «%s»." -#: sys/dvb/gstdvbsrc.c:699 sys/dvb/gstdvbsrc.c:792 +#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Enhet «%s» eksisterer ikke." -#: sys/dvb/gstdvbsrc.c:703 +#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Kunne ikke Ã¥pne frontenhet «%s»." -#: sys/dvb/gstdvbsrc.c:715 +#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Kunne ikke hente innstillinger fra frontenhet «%s»." -#: sys/dvb/gstdvbsrc.c:796 +#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Kunne ikke Ã¥pne filen «%s» for lesing." diff --git a/po/nl.po b/po/nl.po index 7239d70b..79f82399 100644 --- a/po/nl.po +++ b/po/nl.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.9.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-03-20 23:36+0000\n" +"POT-Creation-Date: 2009-05-12 00:07+0100\n" "PO-Revision-Date: 2009-01-23 18:06+0100\n" "Last-Translator: Freek de Kruijf \n" "Language-Team: Dutch \n" @@ -18,16 +18,16 @@ msgstr "" "X-Generator: KBabel 1.11.4\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -#: ext/resindvd/resindvdsrc.c:333 +#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "Kan de titelinformatie voor de DVD niet lezen." -#: ext/resindvd/resindvdsrc.c:339 +#: ext/resindvd/resindvdsrc.c:358 #, c-format msgid "Failed to open DVD device '%s'." msgstr "Kan het DVD-apparaat '%s' niet openen." -#: ext/resindvd/resindvdsrc.c:345 +#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "Het instellen van het zoeken op basis van PGC is mislukt." @@ -58,22 +58,22 @@ msgstr "Interne fout in gegevensstroom." msgid "Could not write to file \"%s\"." msgstr "Kan niet in bestand \"%s\" schrijven." -#: sys/dvb/gstdvbsrc.c:699 sys/dvb/gstdvbsrc.c:792 +#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Apparaat \"%s\" bestaat niet." -#: sys/dvb/gstdvbsrc.c:703 +#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Kan het frontend-apparaat \"%s\" niet openen." -#: sys/dvb/gstdvbsrc.c:715 +#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Kan de instellingen van het frontend-apparaat \"%s\" niet verkrijgen." -#: sys/dvb/gstdvbsrc.c:796 +#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Kan bestand \"%s\" niet openen om te lezen." diff --git a/po/or.po b/po/or.po index a210198d..d9a97c4d 100644 --- a/po/or.po +++ b/po/or.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-0.8.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-03-20 23:36+0000\n" +"POT-Creation-Date: 2009-05-12 00:07+0100\n" "PO-Revision-Date: 2004-09-27 13:32+0530\n" "Last-Translator: Gora Mohanty \n" "Language-Team: Oriya \n" @@ -16,17 +16,17 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ext/resindvd/resindvdsrc.c:333 +#: ext/resindvd/resindvdsrc.c:352 #, fuzzy msgid "Could not read title information for DVD." msgstr "\"%s\" ଫାଇଲ ଲେଖିହେଲା ନାହିà¬." -#: ext/resindvd/resindvdsrc.c:339 +#: ext/resindvd/resindvdsrc.c:358 #, fuzzy, c-format msgid "Failed to open DVD device '%s'." msgstr "\"%s\" ନିୟନà­à¬¤à­à¬°à¬£ ଯନà­à¬¤à­à¬° ବନà­à¬¦ କରିହେଲା ନାହିà¬." -#: ext/resindvd/resindvdsrc.c:345 +#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "" @@ -58,22 +58,22 @@ msgstr "" msgid "Could not write to file \"%s\"." msgstr "\"%s\" ଫାଇଲ ଲେଖିହେଲା ନାହିà¬." -#: sys/dvb/gstdvbsrc.c:699 sys/dvb/gstdvbsrc.c:792 +#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "\"%s\" ଯନà­à¬¤à­à¬° ଅବସà­à¬¥à¬¿à¬¤ ନାହିà¬." -#: sys/dvb/gstdvbsrc.c:703 +#: sys/dvb/gstdvbsrc.c:710 #, fuzzy, c-format msgid "Could not open frontend device \"%s\"." msgstr "\"%s\" ନିୟନà­à¬¤à­à¬°à¬£ ଯନà­à¬¤à­à¬° ବନà­à¬¦ କରିହେଲା ନାହିà¬." -#: sys/dvb/gstdvbsrc.c:715 +#: sys/dvb/gstdvbsrc.c:722 #, fuzzy, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "\"%s\" ଯନà­à¬¤à­à¬°à¬°à­ ପରà­à¬¯à­à¬¯à¬¾à¬ªà­à¬¤ ଅସà­à¬¥à¬¾à­Ÿà­€ ସଞà­à¬šà­Ÿ ସà­à¬¥à¬¾à¬¨ ଆଣିହେଲା ନାହିà¬." -#: sys/dvb/gstdvbsrc.c:796 +#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "\"%s\" ଫାଇଲ ପଢ଼ିବା ପାଇଠଖୋଲିହେଲା ନାହିà¬." diff --git a/po/pl.po b/po/pl.po index 1fa28c45..648d7b05 100644 --- a/po/pl.po +++ b/po/pl.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.9.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-03-20 23:36+0000\n" +"POT-Creation-Date: 2009-05-12 00:07+0100\n" "PO-Revision-Date: 2009-01-12 20:15+0100\n" "Last-Translator: Jakub Bogusz \n" "Language-Team: Polish \n" @@ -14,16 +14,16 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ext/resindvd/resindvdsrc.c:333 +#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "Nie udaÅ‚o siÄ™ odczytać informacji o tytuÅ‚ach dla DVD." -#: ext/resindvd/resindvdsrc.c:339 +#: ext/resindvd/resindvdsrc.c:358 #, c-format msgid "Failed to open DVD device '%s'." msgstr "Nie udaÅ‚o siÄ™ otworzyć urzÄ…dzenia DVD '%s'." -#: ext/resindvd/resindvdsrc.c:345 +#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "Nie udaÅ‚o siÄ™ ustawić przewijania opartego na PGC." @@ -54,22 +54,22 @@ msgstr "BÅ‚Ä…d wewnÄ™trzny strumienia danych." msgid "Could not write to file \"%s\"." msgstr "Nie udaÅ‚o siÄ™ zapisać danych do pliku \"%s\"." -#: sys/dvb/gstdvbsrc.c:699 sys/dvb/gstdvbsrc.c:792 +#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "UrzÄ…dzenie \"%s\" nie istnieje." -#: sys/dvb/gstdvbsrc.c:703 +#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Nie udaÅ‚o siÄ™ otworzyć urzÄ…dzenia frontendu \"%s\"." -#: sys/dvb/gstdvbsrc.c:715 +#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Nie udaÅ‚o siÄ™ pobrać ustawieÅ„ z urzÄ…dzenia frontendu \"%s\"." -#: sys/dvb/gstdvbsrc.c:796 +#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Nie udaÅ‚o siÄ™ otworzyć pliku \"%s\" do odczytu." diff --git a/po/pt_BR.po b/po/pt_BR.po index 7d76a233..1262cc8d 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad-0.10.10.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-03-20 23:36+0000\n" +"POT-Creation-Date: 2009-05-12 00:07+0100\n" "PO-Revision-Date: 2009-03-11 02:31-0300\n" "Last-Translator: Fabrício Godoy \n" "Language-Team: Brazilian Portuguese \n" @@ -17,16 +17,16 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: ext/resindvd/resindvdsrc.c:333 +#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "Não foi possível ler as informações de título do DVD." -#: ext/resindvd/resindvdsrc.c:339 +#: ext/resindvd/resindvdsrc.c:358 #, c-format msgid "Failed to open DVD device '%s'." msgstr "Falha ao abrir o dispositivo de DVD \"%s\"." -#: ext/resindvd/resindvdsrc.c:345 +#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "Falha ao definir busca baseada em PGC." @@ -57,23 +57,23 @@ msgstr "Erro interno de fluxo de dados." msgid "Could not write to file \"%s\"." msgstr "Não foi possível gravar no arquivo \"%s\"." -#: sys/dvb/gstdvbsrc.c:699 sys/dvb/gstdvbsrc.c:792 +#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "O dispositivo \"%s\" não existe." -#: sys/dvb/gstdvbsrc.c:703 +#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Não foi possível abrir o dispositivo de interface \"%s\"." -#: sys/dvb/gstdvbsrc.c:715 +#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "" "Não foi possível obter as configurações do dispositivo de interface \"%s\"." -#: sys/dvb/gstdvbsrc.c:796 +#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Não foi possível abrir o arquivo \"%s\" para leitura." diff --git a/po/ru.po b/po/ru.po index 0a278012..978fb83e 100644 --- a/po/ru.po +++ b/po/ru.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.9.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-03-20 23:36+0000\n" +"POT-Creation-Date: 2009-05-12 00:07+0100\n" "PO-Revision-Date: 2009-02-12 15:00+0200\n" "Last-Translator: Pavel Maryanov \n" "Language-Team: Russian \n" @@ -15,16 +15,16 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ext/resindvd/resindvdsrc.c:333 +#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "Ðе удалоÑÑŒ прочеÑÑ‚ÑŒ информацию о Ñтруктуре DVD." -#: ext/resindvd/resindvdsrc.c:339 +#: ext/resindvd/resindvdsrc.c:358 #, c-format msgid "Failed to open DVD device '%s'." msgstr "Ðе удалоÑÑŒ открыть DVD-уÑтройÑтво «%s»." -#: ext/resindvd/resindvdsrc.c:345 +#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "Ðе удалоÑÑŒ включить PGC-позиционирование." @@ -55,22 +55,22 @@ msgstr "ВнутреннÑÑ Ð¾ÑˆÐ¸Ð±ÐºÐ° потока данных." msgid "Could not write to file \"%s\"." msgstr "Ðе удалоÑÑŒ оÑущеÑтвить запиÑÑŒ в файл «%s»." -#: sys/dvb/gstdvbsrc.c:699 sys/dvb/gstdvbsrc.c:792 +#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "УÑтройÑтво «%s» не ÑущеÑтвует." -#: sys/dvb/gstdvbsrc.c:703 +#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Ðе удалоÑÑŒ открыть DVB-декодер «%s»." -#: sys/dvb/gstdvbsrc.c:715 +#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Ðе удалоÑÑŒ получить параметры DVB-декодера «%s»." -#: sys/dvb/gstdvbsrc.c:796 +#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Ðе удалоÑÑŒ открыть Ð´Ð»Ñ Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ñ„Ð°Ð¹Ð» «%s»." diff --git a/po/sk.po b/po/sk.po index b5b5f441..0ff45d17 100644 --- a/po/sk.po +++ b/po/sk.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.8.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-03-20 23:36+0000\n" +"POT-Creation-Date: 2009-05-12 00:07+0100\n" "PO-Revision-Date: 2008-11-04 09:39+0100\n" "Last-Translator: Peter Tuhársky \n" "Language-Team: Slovak \n" @@ -20,16 +20,16 @@ msgstr "" "X-Poedit-Language: Slovak\n" "X-Poedit-Country: SLOVAKIA\n" -#: ext/resindvd/resindvdsrc.c:333 +#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "Nepodarilo sa preÄítaÅ¥ titulok DVD." -#: ext/resindvd/resindvdsrc.c:339 +#: ext/resindvd/resindvdsrc.c:358 #, c-format msgid "Failed to open DVD device '%s'." msgstr "Nepodarilo sa otvoriÅ¥ zariadenie DVD '%s'." -#: ext/resindvd/resindvdsrc.c:345 +#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "" @@ -60,22 +60,22 @@ msgstr "Vnútorná chyba prúdu údajov." msgid "Could not write to file \"%s\"." msgstr "Nepodarilo sa zapísaÅ¥ do súboru \"%s\"." -#: sys/dvb/gstdvbsrc.c:699 sys/dvb/gstdvbsrc.c:792 +#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Zariadenie \"%s\" neexistuje." -#: sys/dvb/gstdvbsrc.c:703 +#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Nepodarilo sa otvoriÅ¥ ovládacie zariadenie \"%s\"." -#: sys/dvb/gstdvbsrc.c:715 +#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Nepodarilo sa získaÅ¥ nastavenia od zariadenia \"%s\"." -#: sys/dvb/gstdvbsrc.c:796 +#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Nepodarilo sa otvoriÅ¥ súbor \"%s\" na Äítanie." diff --git a/po/sq.po b/po/sq.po index 98729359..24361e22 100644 --- a/po/sq.po +++ b/po/sq.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.7.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-03-20 23:36+0000\n" +"POT-Creation-Date: 2009-05-12 00:07+0100\n" "PO-Revision-Date: 2008-08-15 16:07+0200\n" "Last-Translator: Laurent Dhima \n" "Language-Team: Albanian \n" @@ -14,17 +14,17 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ext/resindvd/resindvdsrc.c:333 +#: ext/resindvd/resindvdsrc.c:352 #, fuzzy msgid "Could not read title information for DVD." msgstr "I pamundur shkrimi tek file \"%s\"." -#: ext/resindvd/resindvdsrc.c:339 +#: ext/resindvd/resindvdsrc.c:358 #, fuzzy, c-format msgid "Failed to open DVD device '%s'." msgstr "E pamundur hapja e dispozitivit frontend \"%s\"." -#: ext/resindvd/resindvdsrc.c:345 +#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "" @@ -57,22 +57,22 @@ msgstr "Gabim i brendshëm tek stream i të dhënave." msgid "Could not write to file \"%s\"." msgstr "I pamundur shkrimi tek file \"%s\"." -#: sys/dvb/gstdvbsrc.c:699 sys/dvb/gstdvbsrc.c:792 +#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Dispozitivi \"%s\" nuk ekziston." -#: sys/dvb/gstdvbsrc.c:703 +#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "E pamundur hapja e dispozitivit frontend \"%s\"." -#: sys/dvb/gstdvbsrc.c:715 +#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "E pamundur marrja e rregullimeve nga dispozitivi frontend \"%s\"." -#: sys/dvb/gstdvbsrc.c:796 +#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "E pamundur hapja e file \"%s\" për lexim." diff --git a/po/sr.po b/po/sr.po index 07e329fc..8af631fc 100644 --- a/po/sr.po +++ b/po/sr.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins 0.7.6\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-03-20 23:36+0000\n" +"POT-Creation-Date: 2009-05-12 00:07+0100\n" "PO-Revision-Date: 2004-03-13 00:18+0100\n" "Last-Translator: Danilo Segan \n" "Language-Team: Serbian \n" @@ -16,17 +16,17 @@ msgstr "" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : (n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" -#: ext/resindvd/resindvdsrc.c:333 +#: ext/resindvd/resindvdsrc.c:352 #, fuzzy msgid "Could not read title information for DVD." msgstr "Ðе могу да пишем у датотеку „%s“." -#: ext/resindvd/resindvdsrc.c:339 +#: ext/resindvd/resindvdsrc.c:358 #, fuzzy, c-format msgid "Failed to open DVD device '%s'." msgstr "Ðе могу да затворим управљачки уређај „%s“." -#: ext/resindvd/resindvdsrc.c:345 +#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "" @@ -58,22 +58,22 @@ msgstr "" msgid "Could not write to file \"%s\"." msgstr "Ðе могу да пишем у датотеку „%s“." -#: sys/dvb/gstdvbsrc.c:699 sys/dvb/gstdvbsrc.c:792 +#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Ðе поÑтоји уређај „%s“." -#: sys/dvb/gstdvbsrc.c:703 +#: sys/dvb/gstdvbsrc.c:710 #, fuzzy, c-format msgid "Could not open frontend device \"%s\"." msgstr "Ðе могу да затворим управљачки уређај „%s“." -#: sys/dvb/gstdvbsrc.c:715 +#: sys/dvb/gstdvbsrc.c:722 #, fuzzy, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Ðе могу да примим довољно бафера Ñа уређаја „%s“." -#: sys/dvb/gstdvbsrc.c:796 +#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Ðе могу да отворим датотеку „%s“ ради читања." diff --git a/po/sv.po b/po/sv.po index d447a17f..f286245b 100644 --- a/po/sv.po +++ b/po/sv.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.9.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-03-20 23:36+0000\n" +"POT-Creation-Date: 2009-05-12 00:07+0100\n" "PO-Revision-Date: 2009-01-23 00:44+0100\n" "Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \n" @@ -15,16 +15,16 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ext/resindvd/resindvdsrc.c:333 +#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "Kunde inte läsa titelinformation för dvd." -#: ext/resindvd/resindvdsrc.c:339 +#: ext/resindvd/resindvdsrc.c:358 #, c-format msgid "Failed to open DVD device '%s'." msgstr "Misslyckades med att öppna dvd-enheten \"%s\"." -#: ext/resindvd/resindvdsrc.c:345 +#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "Misslyckades med att ställa in PGC-baserad spolning." @@ -55,22 +55,22 @@ msgstr "Internt fel i dataström." msgid "Could not write to file \"%s\"." msgstr "Kunde inte skriva till filen \"%s\"." -#: sys/dvb/gstdvbsrc.c:699 sys/dvb/gstdvbsrc.c:792 +#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Enheten \"%s\" finns inte." -#: sys/dvb/gstdvbsrc.c:703 +#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Kunde inte öppna framändsenheten \"%s\"." -#: sys/dvb/gstdvbsrc.c:715 +#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Kunde inte fÃ¥ inställningar frÃ¥n framändsenheten \"%s\"." -#: sys/dvb/gstdvbsrc.c:796 +#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Kunde inte öppna filen \"%s\" för läsning." diff --git a/po/tr.po b/po/tr.po index 0830cfce..c8aea9f6 100644 --- a/po/tr.po +++ b/po/tr.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad-0.10.10.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-03-20 23:36+0000\n" +"POT-Creation-Date: 2009-05-12 00:07+0100\n" "PO-Revision-Date: 2009-03-11 08:01+0200\n" "Last-Translator: Server Acim \n" "Language-Team: Turkish \n" @@ -15,16 +15,16 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" -#: ext/resindvd/resindvdsrc.c:333 +#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "DVD'deki baÅŸlık bilgisi okunamıyor." -#: ext/resindvd/resindvdsrc.c:339 +#: ext/resindvd/resindvdsrc.c:358 #, c-format msgid "Failed to open DVD device '%s'." msgstr "DVD aygıtı açılamadı '%s'." -#: ext/resindvd/resindvdsrc.c:345 +#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "PGC temelli arama ayarı yapılamadı." @@ -55,22 +55,22 @@ msgstr "İç veri akım hatası." msgid "Could not write to file \"%s\"." msgstr "Dosya yazılamıyor \"%s\"." -#: sys/dvb/gstdvbsrc.c:699 sys/dvb/gstdvbsrc.c:792 +#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Aygıt \"%s\" bulunamadı." -#: sys/dvb/gstdvbsrc.c:703 +#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Aygıt açılamaz durumda \"%s\"." -#: sys/dvb/gstdvbsrc.c:715 +#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Aygıt ayarları bulunamadı \"%s\"." -#: sys/dvb/gstdvbsrc.c:796 +#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Dosyayı \"%s\" okumak için açamıyor." diff --git a/po/uk.po b/po/uk.po index 879845de..cdd57856 100644 --- a/po/uk.po +++ b/po/uk.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.5\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-03-20 23:36+0000\n" +"POT-Creation-Date: 2009-05-12 00:07+0100\n" "PO-Revision-Date: 2007-07-04 12:19+0200\n" "Last-Translator: Maxim V. Dziumanenko \n" "Language-Team: Ukrainian \n" @@ -17,16 +17,16 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" "10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" -#: ext/resindvd/resindvdsrc.c:333 +#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "" -#: ext/resindvd/resindvdsrc.c:339 +#: ext/resindvd/resindvdsrc.c:358 #, fuzzy, c-format msgid "Failed to open DVD device '%s'." msgstr "Ðе вдаєтьÑÑ Ð²Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ð¸ приÑтрій Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ \"%s\"." -#: ext/resindvd/resindvdsrc.c:345 +#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "" @@ -57,22 +57,22 @@ msgstr "" msgid "Could not write to file \"%s\"." msgstr "Ðе вдаєтьÑÑ Ð²Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ð¸ приÑтрій Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ \"%s\"." -#: sys/dvb/gstdvbsrc.c:699 sys/dvb/gstdvbsrc.c:792 +#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "ПриÑтрій \"%s\" не Ñ–Ñнує." -#: sys/dvb/gstdvbsrc.c:703 +#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Ðе вдаєтьÑÑ Ð²Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ð¸ приÑтрій Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ \"%s\"." -#: sys/dvb/gstdvbsrc.c:715 +#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Ðе вдаєтьÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ параметри приÑтрою Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ \"%s\"." -#: sys/dvb/gstdvbsrc.c:796 +#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Ðе вдаєтьÑÑ Ð²Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ð¸ файл \"%s\" Ð´Ð»Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ." diff --git a/po/vi.po b/po/vi.po index 8f02fecf..f5179e70 100644 --- a/po/vi.po +++ b/po/vi.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.9.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-03-20 23:36+0000\n" +"POT-Creation-Date: 2009-05-12 00:07+0100\n" "PO-Revision-Date: 2009-01-26 20:24+1030\n" "Last-Translator: Clytie Siddall \n" "Language-Team: Vietnamese \n" @@ -17,16 +17,16 @@ msgstr "" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: LocFactoryEditor 1.8\n" -#: ext/resindvd/resindvdsrc.c:333 +#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "Không thể Ä‘á»c thông tin tá»±a Ä‘á» vá» Ä‘Ä©a DVD." -#: ext/resindvd/resindvdsrc.c:339 +#: ext/resindvd/resindvdsrc.c:358 #, c-format msgid "Failed to open DVD device '%s'." msgstr "Không mở được thiết bị Ä‘Ä©a DVD « %s »." -#: ext/resindvd/resindvdsrc.c:345 +#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "Không đặt được chức năng tìm nÆ¡i dá»±a vào PGC." @@ -57,22 +57,22 @@ msgstr "Lá»—i luồng dữ liệu ná»™i bá»™." msgid "Could not write to file \"%s\"." msgstr "Không thể ghi vào tập tin « %s »." -#: sys/dvb/gstdvbsrc.c:699 sys/dvb/gstdvbsrc.c:792 +#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Thiết bị « %s » không tồn tại." -#: sys/dvb/gstdvbsrc.c:703 +#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Không thể mở thiết bị giao diện « %s »." -#: sys/dvb/gstdvbsrc.c:715 +#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Không thể lấy thiết lập từ thiết bị giao diện « %s »." -#: sys/dvb/gstdvbsrc.c:796 +#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Không thể mở tập tin « %s » để Ä‘á»c." diff --git a/po/zh_CN.po b/po/zh_CN.po index 1f90b71f..9791842a 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.9.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-03-20 23:36+0000\n" +"POT-Creation-Date: 2009-05-12 00:07+0100\n" "PO-Revision-Date: 2009-01-14 12:04+0800\n" "Last-Translator: Ji ZhengYu \n" "Language-Team: Chinese (simplified) Date: Tue, 12 May 2009 21:50:12 +0200 Subject: Moved 'flv' from -bad to -good --- configure.ac | 2 - docs/plugins/Makefile.am | 2 - docs/plugins/gst-plugins-bad-plugins-docs.sgml | 3 - docs/plugins/gst-plugins-bad-plugins-sections.txt | 30 - docs/plugins/inspect/plugin-flv.xml | 67 -- docs/plugins/inspect/plugin-flvdemux.xml | 40 - gst/flv/Makefile.am | 9 - gst/flv/gstflvdemux.c | 1323 --------------------- gst/flv/gstflvdemux.h | 130 -- gst/flv/gstflvmux.c | 1040 ---------------- gst/flv/gstflvmux.h | 89 -- gst/flv/gstflvparse.c | 1283 -------------------- gst/flv/gstflvparse.h | 42 - 13 files changed, 4060 deletions(-) delete mode 100644 docs/plugins/inspect/plugin-flv.xml delete mode 100644 docs/plugins/inspect/plugin-flvdemux.xml delete mode 100644 gst/flv/Makefile.am delete mode 100644 gst/flv/gstflvdemux.c delete mode 100644 gst/flv/gstflvdemux.h delete mode 100644 gst/flv/gstflvmux.c delete mode 100644 gst/flv/gstflvmux.h delete mode 100644 gst/flv/gstflvparse.c delete mode 100644 gst/flv/gstflvparse.h diff --git a/configure.ac b/configure.ac index 6f467cc0..cd70b2b0 100644 --- a/configure.ac +++ b/configure.ac @@ -272,7 +272,6 @@ AG_GST_CHECK_PLUGIN(deinterlace2) AG_GST_CHECK_PLUGIN(dtmf) AG_GST_CHECK_PLUGIN(dvdspu) AG_GST_CHECK_PLUGIN(festival) -AG_GST_CHECK_PLUGIN(flv) AG_GST_CHECK_PLUGIN(freeze) AG_GST_CHECK_PLUGIN(h264parse) AG_GST_CHECK_PLUGIN(librfb) @@ -1544,7 +1543,6 @@ gst/deinterlace2/Makefile gst/dtmf/Makefile gst/dvdspu/Makefile gst/festival/Makefile -gst/flv/Makefile gst/freeze/Makefile gst/h264parse/Makefile gst/librfb/Makefile diff --git a/docs/plugins/Makefile.am b/docs/plugins/Makefile.am index faa5e33c..08854e70 100644 --- a/docs/plugins/Makefile.am +++ b/docs/plugins/Makefile.am @@ -132,8 +132,6 @@ EXTRA_HFILES = \ $(top_srcdir)/gst/dtmf/gstrtpdtmfdepay.h \ $(top_srcdir)/gst/dvdspu/gstdvdspu.h \ $(top_srcdir)/gst/festival/gstfestival.h \ - $(top_srcdir)/gst/flv/gstflvdemux.h \ - $(top_srcdir)/gst/flv/gstflvmux.h \ $(top_srcdir)/gst/legacyresample/gstlegacyresample.h \ $(top_srcdir)/gst/liveadder/liveadder.h \ $(top_srcdir)/gst/mxf/mxfdemux.h \ diff --git a/docs/plugins/gst-plugins-bad-plugins-docs.sgml b/docs/plugins/gst-plugins-bad-plugins-docs.sgml index 2fc7166a..2618a541 100644 --- a/docs/plugins/gst-plugins-bad-plugins-docs.sgml +++ b/docs/plugins/gst-plugins-bad-plugins-docs.sgml @@ -40,8 +40,6 @@ - - @@ -119,7 +117,6 @@ - diff --git a/docs/plugins/gst-plugins-bad-plugins-sections.txt b/docs/plugins/gst-plugins-bad-plugins-sections.txt index 1523e264..382b9cc2 100644 --- a/docs/plugins/gst-plugins-bad-plugins-sections.txt +++ b/docs/plugins/gst-plugins-bad-plugins-sections.txt @@ -356,36 +356,6 @@ FESTIVAL_DEFAULT_SERVER_PORT FESTIVAL_DEFAULT_TEXT_MODE -
-element-flvdemux -flvdemux -GstFLVDemux - -GstFLVDemuxClass -GstFLVDemuxFlags -GST_FLV_DEMUX -GST_FLV_DEMUX_CLASS -GST_IS_FLV_DEMUX -GST_IS_FLV_DEMUX_CLASS -GST_TYPE_FLV_DEMUX -gst_flv_demux_get_type -
- -
-element-flvmux -flvmux -GstFlvMux - -GstFlvMuxClass -GstFlvMuxFlags -GST_FLV_MUX -GST_FLV_MUX_CLASS -GST_IS_FLV_MUX -GST_IS_FLV_MUX_CLASS -GST_TYPE_FLV_MUX -gst_flv_mux_get_type -
-
element-fpsdisplaysink fpsdisplaysink diff --git a/docs/plugins/inspect/plugin-flv.xml b/docs/plugins/inspect/plugin-flv.xml deleted file mode 100644 index 4007af6c..00000000 --- a/docs/plugins/inspect/plugin-flv.xml +++ /dev/null @@ -1,67 +0,0 @@ - - flv - FLV muxing and demuxing plugin - ../../gst/flv/.libs/libgstflv.so - libgstflv.so - 0.10.11.1 - LGPL - gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease - Unknown package origin - - - flvdemux - FLV Demuxer - Codec/Demuxer - Demux FLV feeds into digital streams - Julien Moutte <julien@moutte.net> - - - video - source - sometimes -
ANY
-
- - audio - source - sometimes -
ANY
-
- - sink - sink - always -
video/x-flv
-
-
-
- - flvmux - FLV muxer - Codec/Muxer - Muxes video/audio streams into a FLV stream - Sebastian Dröge <sebastian.droege@collabora.co.uk> - - - src - source - always -
video/x-flv
-
- - audio - sink - request -
audio/x-adpcm, layout=(string)swf, channels=(int){ 1, 2 }, rate=(int){ 5512, 11025, 22050, 44100 }; audio/mpeg, mpegversion=(int)1, layer=(int)3, channels=(int){ 1, 2 }, rate=(int){ 5512, 8000, 11025, 22050, 44100 }; audio/mpeg, mpegversion=(int)4; audio/x-nellymoser, channels=(int){ 1, 2 }, rate=(int){ 5512, 8000, 11025, 16000, 22050, 44100 }; audio/x-raw-int, endianness=(int)1234, channels=(int){ 1, 2 }, width=(int)8, depth=(int)8, rate=(int){ 5512, 11025, 22050, 44100 }, signed=(boolean)false; audio/x-raw-int, endianness=(int)1234, channels=(int){ 1, 2 }, width=(int)16, depth=(int)16, rate=(int){ 5512, 11025, 22050, 44100 }, signed=(boolean)true; audio/x-alaw, channels=(int){ 1, 2 }, rate=(int){ 5512, 11025, 22050, 44100 }; audio/x-mulaw, channels=(int){ 1, 2 }, rate=(int){ 5512, 11025, 22050, 44100 }; audio/x-speex, channels=(int){ 1, 2 }, rate=(int){ 5512, 11025, 22050, 44100 }
-
- - video - sink - request -
video/x-flash-video; video/x-flash-screen; video/x-vp6-flash; video/x-vp6-alpha; video/x-h264
-
-
-
-
-
\ No newline at end of file diff --git a/docs/plugins/inspect/plugin-flvdemux.xml b/docs/plugins/inspect/plugin-flvdemux.xml deleted file mode 100644 index 38efba36..00000000 --- a/docs/plugins/inspect/plugin-flvdemux.xml +++ /dev/null @@ -1,40 +0,0 @@ - - flvdemux - Element demuxing FLV stream - ../../gst/flv/.libs/libgstflvdemux.so - libgstflvdemux.so - 0.10.8 - LGPL - gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin - - - flvdemux - FLV Demuxer - Codec/Demuxer - Demux FLV feeds into digital streams - Julien Moutte <julien@moutte.net> - - - sink - sink - always -
video/x-flv
-
- - audio - source - sometimes -
ANY
-
- - video - source - sometimes -
ANY
-
-
-
-
-
\ No newline at end of file diff --git a/gst/flv/Makefile.am b/gst/flv/Makefile.am deleted file mode 100644 index 6e1a58b2..00000000 --- a/gst/flv/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -plugin_LTLIBRARIES = libgstflv.la - -libgstflv_la_CFLAGS = $(GST_BASE_CFLAGS) $(GST_CFLAGS) -libgstflv_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS) -libgstflv_la_LDFLAGS = ${GST_PLUGIN_LDFLAGS} -libgstflv_la_SOURCES = gstflvdemux.c gstflvparse.c gstflvmux.c -libgstflv_la_LIBTOOLFLAGS = --tag=disable-static - -noinst_HEADERS = gstflvdemux.h gstflvparse.h gstflvmux.h diff --git a/gst/flv/gstflvdemux.c b/gst/flv/gstflvdemux.c deleted file mode 100644 index 5856e7ac..00000000 --- a/gst/flv/gstflvdemux.c +++ /dev/null @@ -1,1323 +0,0 @@ -/* GStreamer - * Copyright (C) <2007> Julien Moutte - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/** - * SECTION:element-flvdemux - * - * flvdemux demuxes an FLV file into the different contained streams. - * - * - * Example launch line - * |[ - * gst-launch -v filesrc location=/path/to/flv ! flvdemux ! audioconvert ! autoaudiosink - * ]| This pipeline demuxes an FLV file and outputs the contained raw audio streams. - * - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "gstflvdemux.h" -#include "gstflvparse.h" -#include "gstflvmux.h" - -#include - -static GstStaticPadTemplate flv_sink_template = GST_STATIC_PAD_TEMPLATE ("sink", - GST_PAD_SINK, - GST_PAD_ALWAYS, - GST_STATIC_CAPS ("video/x-flv") - ); - -static GstStaticPadTemplate audio_src_template = -GST_STATIC_PAD_TEMPLATE ("audio", - GST_PAD_SRC, - GST_PAD_SOMETIMES, - GST_STATIC_CAPS_ANY); - -static GstStaticPadTemplate video_src_template = -GST_STATIC_PAD_TEMPLATE ("video", - GST_PAD_SRC, - GST_PAD_SOMETIMES, - GST_STATIC_CAPS_ANY); - -GST_DEBUG_CATEGORY (flvdemux_debug); -#define GST_CAT_DEFAULT flvdemux_debug - -GST_BOILERPLATE (GstFLVDemux, gst_flv_demux, GstElement, GST_TYPE_ELEMENT); - -/* 9 bytes of header + 4 bytes of first previous tag size */ -#define FLV_HEADER_SIZE 13 -/* 1 byte of tag type + 3 bytes of tag data size */ -#define FLV_TAG_TYPE_SIZE 4 - -static void -gst_flv_demux_flush (GstFLVDemux * demux, gboolean discont) -{ - GST_DEBUG_OBJECT (demux, "flushing queued data in the FLV demuxer"); - - gst_adapter_clear (demux->adapter); - - demux->audio_need_discont = TRUE; - demux->video_need_discont = TRUE; - - demux->flushing = FALSE; - - /* Only in push mode */ - if (!demux->random_access) { - /* After a flush we expect a tag_type */ - demux->state = FLV_STATE_TAG_TYPE; - /* We reset the offset and will get one from first push */ - demux->offset = 0; - } -} - -static void -gst_flv_demux_cleanup (GstFLVDemux * demux) -{ - GST_DEBUG_OBJECT (demux, "cleaning up FLV demuxer"); - - demux->state = FLV_STATE_HEADER; - - demux->flushing = FALSE; - demux->need_header = TRUE; - demux->audio_need_segment = TRUE; - demux->video_need_segment = TRUE; - demux->audio_need_discont = TRUE; - demux->video_need_discont = TRUE; - - /* By default we consider them as linked */ - demux->audio_linked = TRUE; - demux->video_linked = TRUE; - - demux->has_audio = FALSE; - demux->has_video = FALSE; - demux->push_tags = FALSE; - demux->got_par = FALSE; - - gst_segment_init (&demux->segment, GST_FORMAT_TIME); - - demux->w = demux->h = 0; - demux->par_x = demux->par_y = 1; - demux->video_offset = 0; - demux->audio_offset = 0; - demux->offset = demux->cur_tag_offset = 0; - demux->tag_size = demux->tag_data_size = 0; - demux->duration = GST_CLOCK_TIME_NONE; - - if (demux->new_seg_event) { - gst_event_unref (demux->new_seg_event); - demux->new_seg_event = NULL; - } - - if (demux->close_seg_event) { - gst_event_unref (demux->close_seg_event); - demux->close_seg_event = NULL; - } - - gst_adapter_clear (demux->adapter); - - if (demux->audio_codec_data) { - gst_buffer_unref (demux->audio_codec_data); - demux->audio_codec_data = NULL; - } - - if (demux->video_codec_data) { - gst_buffer_unref (demux->video_codec_data); - demux->video_codec_data = NULL; - } - - if (demux->audio_pad) { - gst_element_remove_pad (GST_ELEMENT (demux), demux->audio_pad); - gst_object_unref (demux->audio_pad); - demux->audio_pad = NULL; - } - - if (demux->video_pad) { - gst_element_remove_pad (GST_ELEMENT (demux), demux->video_pad); - gst_object_unref (demux->video_pad); - demux->video_pad = NULL; - } - - if (demux->times) { - g_array_free (demux->times, TRUE); - demux->times = NULL; - } - - if (demux->filepositions) { - g_array_free (demux->filepositions, TRUE); - demux->filepositions = NULL; - } -} - -static GstFlowReturn -gst_flv_demux_chain (GstPad * pad, GstBuffer * buffer) -{ - GstFlowReturn ret = GST_FLOW_OK; - GstFLVDemux *demux = NULL; - - demux = GST_FLV_DEMUX (gst_pad_get_parent (pad)); - - GST_LOG_OBJECT (demux, "received buffer of %d bytes at offset %" - G_GUINT64_FORMAT, GST_BUFFER_SIZE (buffer), GST_BUFFER_OFFSET (buffer)); - - if (G_UNLIKELY (GST_BUFFER_OFFSET (buffer) == 0)) { - GST_DEBUG_OBJECT (demux, "beginning of file, expect header"); - demux->state = FLV_STATE_HEADER; - demux->offset = 0; - } - - if (G_UNLIKELY (demux->offset == 0 && GST_BUFFER_OFFSET (buffer) != 0)) { - GST_DEBUG_OBJECT (demux, "offset was zero, synchronizing with buffer's"); - demux->offset = GST_BUFFER_OFFSET (buffer); - } - - gst_adapter_push (demux->adapter, buffer); - -parse: - if (G_UNLIKELY (ret != GST_FLOW_OK)) { - if (ret == GST_FLOW_NOT_LINKED && (demux->audio_linked - || demux->video_linked)) { - ret = GST_FLOW_OK; - } else { - GST_DEBUG_OBJECT (demux, "got flow return %s", gst_flow_get_name (ret)); - goto beach; - } - } - - if (G_UNLIKELY (demux->flushing)) { - GST_DEBUG_OBJECT (demux, "we are now flushing, exiting parser loop"); - ret = GST_FLOW_WRONG_STATE; - goto beach; - } - - switch (demux->state) { - case FLV_STATE_HEADER: - { - if (gst_adapter_available (demux->adapter) >= FLV_HEADER_SIZE) { - GstBuffer *buffer; - - buffer = gst_adapter_take_buffer (demux->adapter, FLV_HEADER_SIZE); - - ret = gst_flv_parse_header (demux, buffer); - - gst_buffer_unref (buffer); - demux->offset += FLV_HEADER_SIZE; - - demux->state = FLV_STATE_TAG_TYPE; - goto parse; - } else { - goto beach; - } - } - case FLV_STATE_TAG_TYPE: - { - if (gst_adapter_available (demux->adapter) >= FLV_TAG_TYPE_SIZE) { - GstBuffer *buffer; - - /* Remember the tag offset in bytes */ - demux->cur_tag_offset = demux->offset; - - buffer = gst_adapter_take_buffer (demux->adapter, FLV_TAG_TYPE_SIZE); - - ret = gst_flv_parse_tag_type (demux, buffer); - - gst_buffer_unref (buffer); - demux->offset += FLV_TAG_TYPE_SIZE; - - goto parse; - } else { - goto beach; - } - } - case FLV_STATE_TAG_VIDEO: - { - if (gst_adapter_available (demux->adapter) >= demux->tag_size) { - GstBuffer *buffer; - - buffer = gst_adapter_take_buffer (demux->adapter, demux->tag_size); - - ret = gst_flv_parse_tag_video (demux, buffer); - - gst_buffer_unref (buffer); - demux->offset += demux->tag_size; - - demux->state = FLV_STATE_TAG_TYPE; - goto parse; - } else { - goto beach; - } - } - case FLV_STATE_TAG_AUDIO: - { - if (gst_adapter_available (demux->adapter) >= demux->tag_size) { - GstBuffer *buffer; - - buffer = gst_adapter_take_buffer (demux->adapter, demux->tag_size); - - ret = gst_flv_parse_tag_audio (demux, buffer); - - gst_buffer_unref (buffer); - demux->offset += demux->tag_size; - - demux->state = FLV_STATE_TAG_TYPE; - goto parse; - } else { - goto beach; - } - } - case FLV_STATE_TAG_SCRIPT: - { - if (gst_adapter_available (demux->adapter) >= demux->tag_size) { - GstBuffer *buffer; - - buffer = gst_adapter_take_buffer (demux->adapter, demux->tag_size); - - ret = gst_flv_parse_tag_script (demux, buffer); - - gst_buffer_unref (buffer); - demux->offset += demux->tag_size; - - demux->state = FLV_STATE_TAG_TYPE; - goto parse; - } else { - goto beach; - } - } - default: - GST_DEBUG_OBJECT (demux, "unexpected demuxer state"); - } - -beach: - if (G_UNLIKELY (ret == GST_FLOW_NOT_LINKED)) { - /* If either audio or video is linked we return GST_FLOW_OK */ - if (demux->audio_linked || demux->video_linked) { - ret = GST_FLOW_OK; - } - } - - gst_object_unref (demux); - - return ret; -} - -static GstFlowReturn -gst_flv_demux_pull_range (GstFLVDemux * demux, GstPad * pad, guint64 offset, - guint size, GstBuffer ** buffer) -{ - GstFlowReturn ret; - - ret = gst_pad_pull_range (pad, offset, size, buffer); - if (G_UNLIKELY (ret != GST_FLOW_OK)) { - GST_WARNING_OBJECT (demux, - "failed when pulling %d bytes from offset %" G_GUINT64_FORMAT ": %s", - size, offset, gst_flow_get_name (ret)); - *buffer = NULL; - return ret; - } - - if (G_UNLIKELY (*buffer && GST_BUFFER_SIZE (*buffer) != size)) { - GST_WARNING_OBJECT (demux, - "partial pull got %d when expecting %d from offset %" G_GUINT64_FORMAT, - GST_BUFFER_SIZE (*buffer), size, offset); - gst_buffer_unref (*buffer); - ret = GST_FLOW_UNEXPECTED; - *buffer = NULL; - return ret; - } - - return ret; -} - -static GstFlowReturn -gst_flv_demux_pull_tag (GstPad * pad, GstFLVDemux * demux) -{ - GstBuffer *buffer = NULL; - GstFlowReturn ret = GST_FLOW_OK; - - /* Store tag offset */ - demux->cur_tag_offset = demux->offset; - - /* Get the first 4 bytes to identify tag type and size */ - if (G_UNLIKELY ((ret = gst_flv_demux_pull_range (demux, pad, demux->offset, - FLV_TAG_TYPE_SIZE, &buffer)) != GST_FLOW_OK)) - goto beach; - - /* Identify tag type */ - ret = gst_flv_parse_tag_type (demux, buffer); - - gst_buffer_unref (buffer); - - if (G_UNLIKELY (ret != GST_FLOW_OK)) - goto beach; - - /* Jump over tag type + size */ - demux->offset += FLV_TAG_TYPE_SIZE; - - /* Pull the whole tag */ - if (G_UNLIKELY ((ret = gst_flv_demux_pull_range (demux, pad, demux->offset, - demux->tag_size, &buffer)) != GST_FLOW_OK)) - goto beach; - - switch (demux->state) { - case FLV_STATE_TAG_VIDEO: - ret = gst_flv_parse_tag_video (demux, buffer); - break; - case FLV_STATE_TAG_AUDIO: - ret = gst_flv_parse_tag_audio (demux, buffer); - break; - case FLV_STATE_TAG_SCRIPT: - ret = gst_flv_parse_tag_script (demux, buffer); - break; - default: - GST_WARNING_OBJECT (demux, "unexpected state %d", demux->state); - } - - gst_buffer_unref (buffer); - - /* Jump over that part we've just parsed */ - demux->offset += demux->tag_size; - - /* Make sure we reinitialize the tag size */ - demux->tag_size = 0; - - /* Ready for the next tag */ - demux->state = FLV_STATE_TAG_TYPE; - - if (G_UNLIKELY (ret == GST_FLOW_NOT_LINKED)) { - /* If either audio or video is linked we return GST_FLOW_OK */ - if (demux->audio_linked || demux->video_linked) { - ret = GST_FLOW_OK; - } else { - GST_WARNING_OBJECT (demux, "parsing this tag returned not-linked and " - "neither video nor audio are linked"); - } - } - -beach: - return ret; -} - -static GstFlowReturn -gst_flv_demux_pull_header (GstPad * pad, GstFLVDemux * demux) -{ - GstBuffer *buffer = NULL; - GstFlowReturn ret = GST_FLOW_OK; - - /* Get the first 9 bytes */ - if (G_UNLIKELY ((ret = gst_flv_demux_pull_range (demux, pad, demux->offset, - FLV_HEADER_SIZE, &buffer)) != GST_FLOW_OK)) - goto beach; - - ret = gst_flv_parse_header (demux, buffer); - - gst_buffer_unref (buffer); - - /* Jump over the header now */ - demux->offset += FLV_HEADER_SIZE; - demux->state = FLV_STATE_TAG_TYPE; - -beach: - return ret; -} - -static GstFlowReturn -gst_flv_demux_seek_to_prev_keyframe (GstFLVDemux * demux) -{ - return GST_FLOW_OK; -} - -static gboolean -gst_flv_demux_push_src_event (GstFLVDemux * demux, GstEvent * event) -{ - gboolean ret = TRUE; - - if (demux->audio_pad) - ret |= gst_pad_push_event (demux->audio_pad, gst_event_ref (event)); - - if (demux->video_pad) - ret |= gst_pad_push_event (demux->video_pad, gst_event_ref (event)); - - gst_event_unref (event); - - return ret; -} - -static void -gst_flv_demux_create_index (GstFLVDemux * demux) -{ - gint64 size; - GstFormat fmt = GST_FORMAT_BYTES; - size_t tag_size; - guint64 old_offset; - GstBuffer *buffer; - GstFlowReturn ret; - - if (!gst_pad_query_peer_duration (demux->sinkpad, &fmt, &size) || - fmt != GST_FORMAT_BYTES) - return; - - old_offset = demux->offset; - - while ((ret = - gst_flv_demux_pull_range (demux, demux->sinkpad, demux->offset, 12, - &buffer)) == GST_FLOW_OK) { - if (gst_flv_parse_tag_timestamp (demux, buffer, - &tag_size) == GST_CLOCK_TIME_NONE) { - gst_buffer_unref (buffer); - break; - } - - gst_buffer_unref (buffer); - demux->offset += tag_size; - } - - demux->offset = old_offset; -} - -static void -gst_flv_demux_loop (GstPad * pad) -{ - GstFLVDemux *demux = NULL; - GstFlowReturn ret = GST_FLOW_OK; - - demux = GST_FLV_DEMUX (gst_pad_get_parent (pad)); - - if (demux->segment.rate >= 0) { - /* pull in data */ - switch (demux->state) { - case FLV_STATE_TAG_TYPE: - ret = gst_flv_demux_pull_tag (pad, demux); - break; - case FLV_STATE_DONE: - ret = GST_FLOW_UNEXPECTED; - break; - default: - ret = gst_flv_demux_pull_header (pad, demux); - if (ret == GST_FLOW_OK) - gst_flv_demux_create_index (demux); - - } - - /* pause if something went wrong */ - if (G_UNLIKELY (ret != GST_FLOW_OK)) - goto pause; - - /* check EOS condition */ - if ((demux->segment.flags & GST_SEEK_FLAG_SEGMENT) && - (demux->segment.stop != -1) && - (demux->segment.last_stop >= demux->segment.stop)) { - ret = GST_FLOW_UNEXPECTED; - goto pause; - } - } else { /* Reverse playback */ - /* pull in data */ - switch (demux->state) { - case FLV_STATE_TAG_TYPE: - ret = gst_flv_demux_pull_tag (pad, demux); - /* When packet parsing returns UNEXPECTED that means we ve reached the - point where we want to go to the previous keyframe. This is either - the last FLV tag or the keyframe we used last time */ - if (ret == GST_FLOW_UNEXPECTED) { - ret = gst_flv_demux_seek_to_prev_keyframe (demux); - demux->state = FLV_STATE_TAG_TYPE; - } - break; - default: - ret = gst_flv_demux_pull_header (pad, demux); - if (ret == GST_FLOW_OK) - gst_flv_demux_create_index (demux); - } - - /* pause if something went wrong */ - if (G_UNLIKELY (ret != GST_FLOW_OK)) - goto pause; - - /* check EOS condition */ - if (demux->segment.last_stop <= demux->segment.start) { - ret = GST_FLOW_UNEXPECTED; - goto pause; - } - } - - gst_object_unref (demux); - - return; - -pause: - { - const gchar *reason = gst_flow_get_name (ret); - - GST_LOG_OBJECT (demux, "pausing task, reason %s", reason); - gst_pad_pause_task (pad); - - if (GST_FLOW_IS_FATAL (ret) || ret == GST_FLOW_NOT_LINKED) { - if (ret == GST_FLOW_UNEXPECTED) { - /* perform EOS logic */ - gst_element_no_more_pads (GST_ELEMENT_CAST (demux)); - if (demux->segment.flags & GST_SEEK_FLAG_SEGMENT) { - gint64 stop; - - /* for segment playback we need to post when (in stream time) - * we stopped, this is either stop (when set) or the duration. */ - if ((stop = demux->segment.stop) == -1) - stop = demux->segment.duration; - - if (demux->segment.rate >= 0) { - GST_LOG_OBJECT (demux, "Sending segment done, at end of segment"); - gst_element_post_message (GST_ELEMENT_CAST (demux), - gst_message_new_segment_done (GST_OBJECT_CAST (demux), - GST_FORMAT_TIME, stop)); - } else { /* Reverse playback */ - GST_LOG_OBJECT (demux, "Sending segment done, at beginning of " - "segment"); - gst_element_post_message (GST_ELEMENT_CAST (demux), - gst_message_new_segment_done (GST_OBJECT_CAST (demux), - GST_FORMAT_TIME, demux->segment.start)); - } - } else { - /* normal playback, send EOS to all linked pads */ - gst_element_no_more_pads (GST_ELEMENT (demux)); - GST_LOG_OBJECT (demux, "Sending EOS, at end of stream"); - if (!gst_flv_demux_push_src_event (demux, gst_event_new_eos ())) - GST_WARNING_OBJECT (demux, "failed pushing EOS on streams"); - } - } else { - GST_ELEMENT_ERROR (demux, STREAM, FAILED, - ("Internal data stream error."), - ("stream stopped, reason %s", reason)); - gst_flv_demux_push_src_event (demux, gst_event_new_eos ()); - } - } - gst_object_unref (demux); - return; - } -} - -static guint64 -gst_flv_demux_find_offset (GstFLVDemux * demux, GstSegment * segment) -{ - gint64 bytes = 0; - gint64 time = 0; - GstIndexEntry *entry; - - g_return_val_if_fail (segment != NULL, 0); - - time = segment->start; - - if (demux->index) { - /* Let's check if we have an index entry for that seek time */ - entry = gst_index_get_assoc_entry (demux->index, demux->index_id, - GST_INDEX_LOOKUP_BEFORE, GST_ASSOCIATION_FLAG_KEY_UNIT, - GST_FORMAT_TIME, time); - - if (entry) { - gst_index_entry_assoc_map (entry, GST_FORMAT_BYTES, &bytes); - gst_index_entry_assoc_map (entry, GST_FORMAT_TIME, &time); - - GST_DEBUG_OBJECT (demux, "found index entry for %" GST_TIME_FORMAT - " at %" GST_TIME_FORMAT ", seeking to %" G_GINT64_FORMAT, - GST_TIME_ARGS (segment->start), GST_TIME_ARGS (time), bytes); - - /* Key frame seeking */ - if (segment->flags & GST_SEEK_FLAG_KEY_UNIT) { - /* Adjust the segment so that the keyframe fits in */ - if (time < segment->start) { - segment->start = segment->time = time; - } - segment->last_stop = time; - } - } else { - GST_DEBUG_OBJECT (demux, "no index entry found for %" GST_TIME_FORMAT, - GST_TIME_ARGS (segment->start)); - } - } - - return bytes; -} - -static gboolean -gst_flv_demux_handle_seek_push (GstFLVDemux * demux, GstEvent * event) -{ - GstFormat format; - GstSeekFlags flags; - GstSeekType start_type, stop_type; - gint64 start, stop; - gdouble rate; - gboolean update, flush, keyframe, ret; - GstSegment seeksegment; - - gst_event_parse_seek (event, &rate, &format, &flags, - &start_type, &start, &stop_type, &stop); - - if (format != GST_FORMAT_TIME) - goto wrong_format; - - flush = !!(flags & GST_SEEK_FLAG_FLUSH); - keyframe = !!(flags & GST_SEEK_FLAG_KEY_UNIT); - - /* Work on a copy until we are sure the seek succeeded. */ - memcpy (&seeksegment, &demux->segment, sizeof (GstSegment)); - - GST_DEBUG_OBJECT (demux, "segment before configure %" GST_SEGMENT_FORMAT, - &demux->segment); - - /* Apply the seek to our segment */ - gst_segment_set_seek (&seeksegment, rate, format, flags, - start_type, start, stop_type, stop, &update); - - GST_DEBUG_OBJECT (demux, "segment configured %" GST_SEGMENT_FORMAT, - &seeksegment); - - if (flush || seeksegment.last_stop != demux->segment.last_stop) { - /* Do the actual seeking */ - guint64 offset = gst_flv_demux_find_offset (demux, &seeksegment); - - GST_DEBUG_OBJECT (demux, "generating an upstream seek at position %" - G_GUINT64_FORMAT, offset); - ret = gst_pad_push_event (demux->sinkpad, - gst_event_new_seek (seeksegment.rate, GST_FORMAT_BYTES, - seeksegment.flags | GST_SEEK_FLAG_ACCURATE, GST_SEEK_TYPE_SET, - offset, GST_SEEK_TYPE_NONE, 0)); - if (G_UNLIKELY (!ret)) { - GST_WARNING_OBJECT (demux, "upstream seek failed"); - } - - /* Tell all the stream we moved to a different position (discont) */ - demux->audio_need_discont = TRUE; - demux->video_need_discont = TRUE; - } else { - ret = TRUE; - } - - if (ret) { - /* Ok seek succeeded, take the newly configured segment */ - memcpy (&demux->segment, &seeksegment, sizeof (GstSegment)); - - /* Tell all the stream a new segment is needed */ - demux->audio_need_segment = TRUE; - demux->video_need_segment = TRUE; - /* Clean any potential newsegment event kept for the streams. The first - * stream needing a new segment will create a new one. */ - if (G_UNLIKELY (demux->new_seg_event)) { - gst_event_unref (demux->new_seg_event); - demux->new_seg_event = NULL; - } - gst_event_unref (event); - } else { - ret = gst_pad_push_event (demux->sinkpad, event); - } - - return ret; - -/* ERRORS */ -wrong_format: - { - GST_WARNING_OBJECT (demux, "we only support seeking in TIME format"); - return gst_pad_push_event (demux->sinkpad, event); - } -} - -static gboolean -gst_flv_demux_handle_seek_pull (GstFLVDemux * demux, GstEvent * event) -{ - GstFormat format; - GstSeekFlags flags; - GstSeekType start_type, stop_type; - gint64 start, stop; - gdouble rate; - gboolean update, flush, keyframe, ret; - GstSegment seeksegment; - - gst_event_parse_seek (event, &rate, &format, &flags, - &start_type, &start, &stop_type, &stop); - - gst_event_unref (event); - - if (format != GST_FORMAT_TIME) - goto wrong_format; - - flush = !!(flags & GST_SEEK_FLAG_FLUSH); - keyframe = !!(flags & GST_SEEK_FLAG_KEY_UNIT); - - if (flush) { - /* Flush start up and downstream to make sure data flow and loops are - idle */ - gst_flv_demux_push_src_event (demux, gst_event_new_flush_start ()); - gst_pad_push_event (demux->sinkpad, gst_event_new_flush_start ()); - } else { - /* Pause the pulling task */ - gst_pad_pause_task (demux->sinkpad); - } - - /* Take the stream lock */ - GST_PAD_STREAM_LOCK (demux->sinkpad); - - if (flush) { - /* Stop flushing upstream we need to pull */ - gst_pad_push_event (demux->sinkpad, gst_event_new_flush_stop ()); - } - - /* Work on a copy until we are sure the seek succeeded. */ - memcpy (&seeksegment, &demux->segment, sizeof (GstSegment)); - - GST_DEBUG_OBJECT (demux, "segment before configure %" GST_SEGMENT_FORMAT, - &demux->segment); - - /* Apply the seek to our segment */ - gst_segment_set_seek (&seeksegment, rate, format, flags, - start_type, start, stop_type, stop, &update); - - GST_DEBUG_OBJECT (demux, "segment configured %" GST_SEGMENT_FORMAT, - &seeksegment); - - if (flush || seeksegment.last_stop != demux->segment.last_stop) { - /* Do the actual seeking */ - demux->offset = gst_flv_demux_find_offset (demux, &seeksegment); - - /* Tell all the stream we moved to a different position (discont) */ - demux->audio_need_discont = TRUE; - demux->video_need_discont = TRUE; - - /* If we seeked at the beginning of the file parse the header again */ - if (G_UNLIKELY (!demux->offset)) { - demux->state = FLV_STATE_HEADER; - } else { /* or parse a tag */ - demux->state = FLV_STATE_TAG_TYPE; - } - ret = TRUE; - } else { - ret = TRUE; - } - - if (G_UNLIKELY (demux->close_seg_event)) { - gst_event_unref (demux->close_seg_event); - demux->close_seg_event = NULL; - } - - if (flush) { - /* Stop flushing, the sinks are at time 0 now */ - gst_flv_demux_push_src_event (demux, gst_event_new_flush_stop ()); - } else { - GST_DEBUG_OBJECT (demux, "closing running segment %" GST_SEGMENT_FORMAT, - &demux->segment); - - /* Close the current segment for a linear playback */ - if (demux->segment.rate >= 0) { - /* for forward playback, we played from start to last_stop */ - demux->close_seg_event = gst_event_new_new_segment (TRUE, - demux->segment.rate, demux->segment.format, - demux->segment.start, demux->segment.last_stop, demux->segment.time); - } else { - gint64 stop; - - if ((stop = demux->segment.stop) == -1) - stop = demux->segment.duration; - - /* for reverse playback, we played from stop to last_stop. */ - demux->close_seg_event = gst_event_new_new_segment (TRUE, - demux->segment.rate, demux->segment.format, - demux->segment.last_stop, stop, demux->segment.last_stop); - } - } - - if (ret) { - /* Ok seek succeeded, take the newly configured segment */ - memcpy (&demux->segment, &seeksegment, sizeof (GstSegment)); - - /* Notify about the start of a new segment */ - if (demux->segment.flags & GST_SEEK_FLAG_SEGMENT) { - gst_element_post_message (GST_ELEMENT (demux), - gst_message_new_segment_start (GST_OBJECT (demux), - demux->segment.format, demux->segment.last_stop)); - } - - /* Tell all the stream a new segment is needed */ - demux->audio_need_segment = TRUE; - demux->video_need_segment = TRUE; - /* Clean any potential newsegment event kept for the streams. The first - * stream needing a new segment will create a new one. */ - if (G_UNLIKELY (demux->new_seg_event)) { - gst_event_unref (demux->new_seg_event); - demux->new_seg_event = NULL; - } - } - - gst_pad_start_task (demux->sinkpad, - (GstTaskFunction) gst_flv_demux_loop, demux->sinkpad); - - GST_PAD_STREAM_UNLOCK (demux->sinkpad); - - return ret; - - /* ERRORS */ -wrong_format: - { - GST_WARNING_OBJECT (demux, "we only support seeking in TIME format"); - return FALSE; - } -} - -/* If we can pull that's prefered */ -static gboolean -gst_flv_demux_sink_activate (GstPad * sinkpad) -{ - if (gst_pad_check_pull_range (sinkpad)) { - return gst_pad_activate_pull (sinkpad, TRUE); - } else { - return gst_pad_activate_push (sinkpad, TRUE); - } -} - -/* This function gets called when we activate ourselves in push mode. - * We cannot seek (ourselves) in the stream */ -static gboolean -gst_flv_demux_sink_activate_push (GstPad * sinkpad, gboolean active) -{ - GstFLVDemux *demux; - - demux = GST_FLV_DEMUX (gst_pad_get_parent (sinkpad)); - - demux->random_access = FALSE; - - gst_object_unref (demux); - - return TRUE; -} - -/* this function gets called when we activate ourselves in pull mode. - * We can perform random access to the resource and we start a task - * to start reading */ -static gboolean -gst_flv_demux_sink_activate_pull (GstPad * sinkpad, gboolean active) -{ - GstFLVDemux *demux; - - demux = GST_FLV_DEMUX (gst_pad_get_parent (sinkpad)); - - if (active) { - demux->random_access = TRUE; - gst_object_unref (demux); - return gst_pad_start_task (sinkpad, (GstTaskFunction) gst_flv_demux_loop, - sinkpad); - } else { - demux->random_access = FALSE; - gst_object_unref (demux); - return gst_pad_stop_task (sinkpad); - } -} - -static gboolean -gst_flv_demux_sink_event (GstPad * pad, GstEvent * event) -{ - GstFLVDemux *demux; - gboolean ret = FALSE; - - demux = GST_FLV_DEMUX (gst_pad_get_parent (pad)); - - GST_DEBUG_OBJECT (demux, "handling event %s", GST_EVENT_TYPE_NAME (event)); - - switch (GST_EVENT_TYPE (event)) { - case GST_EVENT_FLUSH_START: - GST_DEBUG_OBJECT (demux, "trying to force chain function to exit"); - demux->flushing = TRUE; - ret = gst_flv_demux_push_src_event (demux, event); - break; - case GST_EVENT_FLUSH_STOP: - GST_DEBUG_OBJECT (demux, "flushing FLV demuxer"); - gst_flv_demux_flush (demux, TRUE); - ret = gst_flv_demux_push_src_event (demux, event); - break; - case GST_EVENT_EOS: - GST_DEBUG_OBJECT (demux, "received EOS"); - if (demux->index) { - GST_DEBUG_OBJECT (demux, "committing index"); - gst_index_commit (demux->index, demux->index_id); - } - gst_element_no_more_pads (GST_ELEMENT (demux)); - if (!gst_flv_demux_push_src_event (demux, event)) - GST_WARNING_OBJECT (demux, "failed pushing EOS on streams"); - ret = TRUE; - break; - case GST_EVENT_NEWSEGMENT: - { - GstFormat format; - gdouble rate; - gint64 start, stop, time; - gboolean update; - - GST_DEBUG_OBJECT (demux, "received new segment"); - - gst_event_parse_new_segment (event, &update, &rate, &format, &start, - &stop, &time); - - if (format == GST_FORMAT_TIME) { - /* time segment, this is perfect, copy over the values. */ - gst_segment_set_newsegment (&demux->segment, update, rate, format, - start, stop, time); - - GST_DEBUG_OBJECT (demux, "NEWSEGMENT: %" GST_SEGMENT_FORMAT, - &demux->segment); - - /* and forward */ - ret = gst_flv_demux_push_src_event (demux, event); - } else { - /* non-time format */ - demux->audio_need_segment = TRUE; - demux->video_need_segment = TRUE; - ret = TRUE; - gst_event_unref (event); - } - break; - } - default: - ret = gst_flv_demux_push_src_event (demux, event); - break; - } - - gst_object_unref (demux); - - return ret; -} - -gboolean -gst_flv_demux_src_event (GstPad * pad, GstEvent * event) -{ - GstFLVDemux *demux; - gboolean ret = FALSE; - - demux = GST_FLV_DEMUX (gst_pad_get_parent (pad)); - - GST_DEBUG_OBJECT (demux, "handling event %s", GST_EVENT_TYPE_NAME (event)); - - switch (GST_EVENT_TYPE (event)) { - case GST_EVENT_SEEK: - if (demux->random_access) { - ret = gst_flv_demux_handle_seek_pull (demux, event); - } else { - ret = gst_flv_demux_handle_seek_push (demux, event); - } - break; - default: - ret = gst_pad_push_event (demux->sinkpad, event); - break; - } - - gst_object_unref (demux); - - return ret; -} - -gboolean -gst_flv_demux_query (GstPad * pad, GstQuery * query) -{ - gboolean res = TRUE; - GstFLVDemux *demux; - - demux = GST_FLV_DEMUX (gst_pad_get_parent (pad)); - - switch (GST_QUERY_TYPE (query)) { - case GST_QUERY_DURATION: - { - GstFormat format; - - gst_query_parse_duration (query, &format, NULL); - - /* duration is time only */ - if (format != GST_FORMAT_TIME) { - GST_DEBUG_OBJECT (demux, "duration query only supported for time " - "format"); - res = FALSE; - goto beach; - } - - GST_DEBUG_OBJECT (pad, "duration query, replying %" GST_TIME_FORMAT, - GST_TIME_ARGS (demux->duration)); - - gst_query_set_duration (query, GST_FORMAT_TIME, demux->duration); - - break; - } - case GST_QUERY_POSITION: - { - GstFormat format; - - gst_query_parse_position (query, &format, NULL); - - /* position is time only */ - if (format != GST_FORMAT_TIME) { - GST_DEBUG_OBJECT (demux, "position query only supported for time " - "format"); - res = FALSE; - goto beach; - } - - GST_DEBUG_OBJECT (pad, "position query, replying %" GST_TIME_FORMAT, - GST_TIME_ARGS (demux->segment.last_stop)); - - gst_query_set_duration (query, GST_FORMAT_TIME, demux->segment.last_stop); - - break; - } - - case GST_QUERY_LATENCY: - default: - { - GstPad *peer; - - if ((peer = gst_pad_get_peer (demux->sinkpad))) { - /* query latency on peer pad */ - res = gst_pad_query (peer, query); - gst_object_unref (peer); - } else { - /* no peer, we don't know */ - res = FALSE; - } - break; - } - } - -beach: - gst_object_unref (demux); - - return res; -} - -static GstStateChangeReturn -gst_flv_demux_change_state (GstElement * element, GstStateChange transition) -{ - GstFLVDemux *demux; - GstStateChangeReturn ret; - - demux = GST_FLV_DEMUX (element); - - switch (transition) { - case GST_STATE_CHANGE_READY_TO_PAUSED: - /* If this is our own index destroy it as the - * old entries might be wrong for the new stream */ - if (demux->own_index) { - gst_object_unref (demux->index); - demux->index = NULL; - demux->own_index = FALSE; - } - - /* If no index was created, generate one */ - if (G_UNLIKELY (!demux->index)) { - GST_DEBUG_OBJECT (demux, "no index provided creating our own"); - - demux->index = gst_index_factory_make ("memindex"); - - gst_index_get_writer_id (demux->index, GST_OBJECT (demux), - &demux->index_id); - demux->own_index = TRUE; - } - gst_flv_demux_cleanup (demux); - break; - default: - break; - } - - ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); - if (ret == GST_STATE_CHANGE_FAILURE) - return ret; - - switch (transition) { - case GST_STATE_CHANGE_PAUSED_TO_READY: - gst_flv_demux_cleanup (demux); - break; - default: - break; - } - - return ret; -} - -static void -gst_flv_demux_set_index (GstElement * element, GstIndex * index) -{ - GstFLVDemux *demux = GST_FLV_DEMUX (element); - - GST_OBJECT_LOCK (demux); - if (demux->index) - gst_object_unref (demux->index); - demux->index = gst_object_ref (index); - GST_OBJECT_UNLOCK (demux); - - gst_index_get_writer_id (index, GST_OBJECT (element), &demux->index_id); - demux->own_index = FALSE; -} - -static GstIndex * -gst_flv_demux_get_index (GstElement * element) -{ - GstIndex *result = NULL; - - GstFLVDemux *demux = GST_FLV_DEMUX (element); - - GST_OBJECT_LOCK (demux); - if (demux->index) - result = gst_object_ref (demux->index); - GST_OBJECT_UNLOCK (demux); - - return result; -} - -static void -gst_flv_demux_dispose (GObject * object) -{ - GstFLVDemux *demux = GST_FLV_DEMUX (object); - - GST_DEBUG_OBJECT (demux, "disposing FLV demuxer"); - - if (demux->adapter) { - gst_adapter_clear (demux->adapter); - g_object_unref (demux->adapter); - demux->adapter = NULL; - } - - if (demux->taglist) { - gst_tag_list_free (demux->taglist); - demux->taglist = NULL; - } - - if (demux->new_seg_event) { - gst_event_unref (demux->new_seg_event); - demux->new_seg_event = NULL; - } - - if (demux->close_seg_event) { - gst_event_unref (demux->close_seg_event); - demux->close_seg_event = NULL; - } - - if (demux->audio_codec_data) { - gst_buffer_unref (demux->audio_codec_data); - demux->audio_codec_data = NULL; - } - - if (demux->video_codec_data) { - gst_buffer_unref (demux->video_codec_data); - demux->video_codec_data = NULL; - } - - if (demux->audio_pad) { - gst_object_unref (demux->audio_pad); - demux->audio_pad = NULL; - } - - if (demux->video_pad) { - gst_object_unref (demux->video_pad); - demux->video_pad = NULL; - } - - if (demux->index) { - gst_object_unref (demux->index); - demux->index = NULL; - } - - if (demux->times) { - g_array_free (demux->times, TRUE); - demux->times = NULL; - } - - if (demux->filepositions) { - g_array_free (demux->filepositions, TRUE); - demux->filepositions = NULL; - } - - GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object)); -} - -static void -gst_flv_demux_base_init (gpointer g_class) -{ - GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&flv_sink_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&audio_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&video_src_template)); - gst_element_class_set_details_simple (element_class, "FLV Demuxer", - "Codec/Demuxer", - "Demux FLV feeds into digital streams", - "Julien Moutte "); -} - -static void -gst_flv_demux_class_init (GstFLVDemuxClass * klass) -{ - GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass); - GObjectClass *gobject_class = G_OBJECT_CLASS (klass); - - gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_flv_demux_dispose); - - gstelement_class->change_state = - GST_DEBUG_FUNCPTR (gst_flv_demux_change_state); - gstelement_class->set_index = GST_DEBUG_FUNCPTR (gst_flv_demux_set_index); - gstelement_class->get_index = GST_DEBUG_FUNCPTR (gst_flv_demux_get_index); -} - -static void -gst_flv_demux_init (GstFLVDemux * demux, GstFLVDemuxClass * g_class) -{ - demux->sinkpad = - gst_pad_new_from_static_template (&flv_sink_template, "sink"); - - gst_pad_set_event_function (demux->sinkpad, - GST_DEBUG_FUNCPTR (gst_flv_demux_sink_event)); - gst_pad_set_chain_function (demux->sinkpad, - GST_DEBUG_FUNCPTR (gst_flv_demux_chain)); - gst_pad_set_activate_function (demux->sinkpad, - GST_DEBUG_FUNCPTR (gst_flv_demux_sink_activate)); - gst_pad_set_activatepull_function (demux->sinkpad, - GST_DEBUG_FUNCPTR (gst_flv_demux_sink_activate_pull)); - gst_pad_set_activatepush_function (demux->sinkpad, - GST_DEBUG_FUNCPTR (gst_flv_demux_sink_activate_push)); - - gst_element_add_pad (GST_ELEMENT (demux), demux->sinkpad); - - demux->adapter = gst_adapter_new (); - demux->taglist = gst_tag_list_new (); - gst_segment_init (&demux->segment, GST_FORMAT_TIME); - - demux->own_index = FALSE; - - gst_flv_demux_cleanup (demux); -} - -static gboolean -plugin_init (GstPlugin * plugin) -{ - GST_DEBUG_CATEGORY_INIT (flvdemux_debug, "flvdemux", 0, "FLV demuxer"); - - if (!gst_element_register (plugin, "flvdemux", GST_RANK_PRIMARY, - gst_flv_demux_get_type ()) || - !gst_element_register (plugin, "flvmux", GST_RANK_PRIMARY, - gst_flv_mux_get_type ())) - return FALSE; - - return TRUE; -} - -GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, - "flv", "FLV muxing and demuxing plugin", - plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN) diff --git a/gst/flv/gstflvdemux.h b/gst/flv/gstflvdemux.h deleted file mode 100644 index 72c0bcd4..00000000 --- a/gst/flv/gstflvdemux.h +++ /dev/null @@ -1,130 +0,0 @@ -/* GStreamer - * Copyright (C) <2007> Julien Moutte - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __FLV_DEMUX_H__ -#define __FLV_DEMUX_H__ - -#include -#include - -G_BEGIN_DECLS -#define GST_TYPE_FLV_DEMUX \ - (gst_flv_demux_get_type()) -#define GST_FLV_DEMUX(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_FLV_DEMUX,GstFLVDemux)) -#define GST_FLV_DEMUX_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_FLV_DEMUX,GstFLVDemuxClass)) -#define GST_IS_FLV_DEMUX(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FLV_DEMUX)) -#define GST_IS_FLV_DEMUX_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FLV_DEMUX)) -typedef struct _GstFLVDemux GstFLVDemux; -typedef struct _GstFLVDemuxClass GstFLVDemuxClass; - -typedef enum -{ - FLV_STATE_HEADER, - FLV_STATE_TAG_TYPE, - FLV_STATE_TAG_VIDEO, - FLV_STATE_TAG_AUDIO, - FLV_STATE_TAG_SCRIPT, - FLV_STATE_DONE, - FLV_STATE_NONE -} GstFLVDemuxState; - -struct _GstFLVDemux -{ - GstElement element; - - GstPad *sinkpad; - - GstPad *audio_pad; - GstPad *video_pad; - - /* */ - - GstIndex *index; - gint index_id; - gboolean own_index; - - GArray * times; - GArray * filepositions; - - GstAdapter *adapter; - - GstSegment segment; - - GstEvent *close_seg_event; - GstEvent *new_seg_event; - - GstTagList *taglist; - - GstFLVDemuxState state; - - guint64 offset; - guint64 cur_tag_offset; - GstClockTime duration; - guint64 tag_size; - guint64 tag_data_size; - - /* Audio infos */ - guint16 rate; - guint16 channels; - guint16 width; - guint16 audio_codec_tag; - guint64 audio_offset; - gboolean audio_need_discont; - gboolean audio_need_segment; - gboolean audio_linked; - GstBuffer * audio_codec_data; - - /* Video infos */ - guint32 w; - guint32 h; - guint32 par_x; - guint32 par_y; - guint16 video_codec_tag; - guint64 video_offset; - gboolean video_need_discont; - gboolean video_need_segment; - gboolean video_linked; - gboolean got_par; - GstBuffer * video_codec_data; - - gboolean random_access; - gboolean need_header; - gboolean has_audio; - gboolean has_video; - gboolean push_tags; - gboolean strict; - gboolean flushing; -}; - -struct _GstFLVDemuxClass -{ - GstElementClass parent_class; -}; - -GType gst_flv_demux_get_type (void); - -gboolean gst_flv_demux_query (GstPad * pad, GstQuery * query); -gboolean gst_flv_demux_src_event (GstPad * pad, GstEvent * event); - -G_END_DECLS -#endif /* __FLV_DEMUX_H__ */ diff --git a/gst/flv/gstflvmux.c b/gst/flv/gstflvmux.c deleted file mode 100644 index dd27276a..00000000 --- a/gst/flv/gstflvmux.c +++ /dev/null @@ -1,1040 +0,0 @@ -/* GStreamer - * - * Copyright (c) 2008 Sebastian Dröge - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/** - * SECTION:element-flvmux - * - * flvmux muxes different streams into an FLV file. - * - * - * Example launch line - * |[ - * gst-launch -v filesrc location=/path/to/audio ! decodebin2 ! queue ! flvmux name=m ! filesink location=file.flv filesrc location=/path/to/video ! decodebin2 ! queue ! m. - * ]| This pipeline muxes an audio and video file into a single FLV file. - * - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -#include "gstflvmux.h" - -GST_DEBUG_CATEGORY_STATIC (flvmux_debug); -#define GST_CAT_DEFAULT flvmux_debug - -static GstStaticPadTemplate src_templ = GST_STATIC_PAD_TEMPLATE ("src", - GST_PAD_SRC, - GST_PAD_ALWAYS, - GST_STATIC_CAPS ("video/x-flv") - ); - -static GstStaticPadTemplate videosink_templ = GST_STATIC_PAD_TEMPLATE ("video", - GST_PAD_SINK, - GST_PAD_REQUEST, - GST_STATIC_CAPS ("video/x-flash-video; " - "video/x-flash-screen; " - "video/x-vp6-flash; " "video/x-vp6-alpha; " "video/x-h264;") - ); - -static GstStaticPadTemplate audiosink_templ = GST_STATIC_PAD_TEMPLATE ("audio", - GST_PAD_SINK, - GST_PAD_REQUEST, - GST_STATIC_CAPS - ("audio/x-adpcm, layout = (string) swf, channels = (int) { 1, 2 }, rate = (int) { 5512, 11025, 22050, 44100 }; " - "audio/mpeg, mpegversion = (int) 1, layer = (int) 3, channels = (int) { 1, 2 }, rate = (int) { 5512, 8000, 11025, 22050, 44100 }, parsed = (boolean) TRUE; " - "audio/mpeg, mpegversion = (int) 4, framed = (boolean) TRUE; " - "audio/x-nellymoser, channels = (int) { 1, 2 }, rate = (int) { 5512, 8000, 11025, 16000, 22050, 44100 }; " - "audio/x-raw-int, endianness = (int) LITTLE_ENDIAN, channels = (int) { 1, 2 }, width = (int) 8, depth = (int) 8, rate = (int) { 5512, 11025, 22050, 44100 }, signed = (boolean) FALSE; " - "audio/x-raw-int, endianness = (int) LITTLE_ENDIAN, channels = (int) { 1, 2 }, width = (int) 16, depth = (int) 16, rate = (int) { 5512, 11025, 22050, 44100 }, signed = (boolean) TRUE; " - "audio/x-alaw, channels = (int) { 1, 2 }, rate = (int) { 5512, 11025, 22050, 44100 }; " - "audio/x-mulaw, channels = (int) { 1, 2 }, rate = (int) { 5512, 11025, 22050, 44100 }; " - "audio/x-speex, channels = (int) { 1, 2 }, rate = (int) { 5512, 11025, 22050, 44100 };") - ); - -#define _do_init(type) \ - G_STMT_START{ \ - static const GInterfaceInfo tag_setter_info = { \ - NULL, \ - NULL, \ - NULL \ - }; \ - g_type_add_interface_static (type, GST_TYPE_TAG_SETTER, \ - &tag_setter_info); \ - }G_STMT_END - -GST_BOILERPLATE_FULL (GstFlvMux, gst_flv_mux, GstElement, GST_TYPE_ELEMENT, - _do_init); - -static void gst_flv_mux_finalize (GObject * object); -static GstFlowReturn -gst_flv_mux_collected (GstCollectPads * pads, gpointer user_data); - -static gboolean gst_flv_mux_handle_src_event (GstPad * pad, GstEvent * event); -static GstPad *gst_flv_mux_request_new_pad (GstElement * element, - GstPadTemplate * templ, const gchar * name); -static void gst_flv_mux_release_pad (GstElement * element, GstPad * pad); - -static GstStateChangeReturn -gst_flv_mux_change_state (GstElement * element, GstStateChange transition); - -static void gst_flv_mux_reset (GstElement * element); - -static void -gst_flv_mux_base_init (gpointer g_class) -{ - GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&videosink_templ)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&audiosink_templ)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_templ)); - gst_element_class_set_details_simple (element_class, "FLV muxer", - "Codec/Muxer", - "Muxes video/audio streams into a FLV stream", - "Sebastian Dröge "); - - GST_DEBUG_CATEGORY_INIT (flvmux_debug, "flvmux", 0, "FLV muxer"); -} - -static void -gst_flv_mux_class_init (GstFlvMuxClass * klass) -{ - GObjectClass *gobject_class; - GstElementClass *gstelement_class; - - GST_DEBUG_CATEGORY_INIT (flvmux_debug, "flvmux", 0, "FLV muxer"); - - gobject_class = (GObjectClass *) klass; - gstelement_class = (GstElementClass *) klass; - - gobject_class->finalize = gst_flv_mux_finalize; - - gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_flv_mux_change_state); - gstelement_class->request_new_pad = - GST_DEBUG_FUNCPTR (gst_flv_mux_request_new_pad); - gstelement_class->release_pad = GST_DEBUG_FUNCPTR (gst_flv_mux_release_pad); -} - -static void -gst_flv_mux_init (GstFlvMux * mux, GstFlvMuxClass * g_class) -{ - mux->srcpad = gst_pad_new_from_static_template (&src_templ, "src"); - gst_pad_set_event_function (mux->srcpad, gst_flv_mux_handle_src_event); - gst_element_add_pad (GST_ELEMENT (mux), mux->srcpad); - - mux->collect = gst_collect_pads_new (); - gst_collect_pads_set_function (mux->collect, - (GstCollectPadsFunction) GST_DEBUG_FUNCPTR (gst_flv_mux_collected), mux); - - gst_flv_mux_reset (GST_ELEMENT (mux)); -} - -static void -gst_flv_mux_finalize (GObject * object) -{ - GstFlvMux *mux = GST_FLV_MUX (object); - - gst_object_unref (mux->collect); - - G_OBJECT_CLASS (parent_class)->finalize (object); -} - -static void -gst_flv_mux_reset (GstElement * element) -{ - GstFlvMux *mux = GST_FLV_MUX (element); - GSList *sl; - - while ((sl = mux->collect->data) != NULL) { - GstFlvPad *cpad = (GstFlvPad *) sl->data; - - if (cpad->audio_codec_data) - gst_buffer_unref (cpad->audio_codec_data); - if (cpad->video_codec_data) - gst_buffer_unref (cpad->video_codec_data); - - gst_collect_pads_remove_pad (mux->collect, cpad->collect.pad); - } - - if (mux->tags) - gst_tag_list_free (mux->tags); - mux->tags = NULL; - - mux->state = GST_FLV_MUX_STATE_HEADER; -} - -static gboolean -gst_flv_mux_handle_src_event (GstPad * pad, GstEvent * event) -{ - GstEventType type; - - type = event ? GST_EVENT_TYPE (event) : GST_EVENT_UNKNOWN; - - switch (type) { - case GST_EVENT_SEEK: - /* disable seeking for now */ - return FALSE; - default: - break; - } - - return gst_pad_event_default (pad, event); -} - -static gboolean -gst_flv_mux_handle_sink_event (GstPad * pad, GstEvent * event) -{ - GstFlvMux *mux = GST_FLV_MUX (gst_pad_get_parent (pad)); - gboolean ret = TRUE; - - switch (GST_EVENT_TYPE (event)) { - case GST_EVENT_TAG:{ - GstTagList *tags; - - if (!mux->tags) - mux->tags = gst_tag_list_new (); - - gst_event_parse_tag (event, &tags); - if (tags) { - gst_tag_list_insert (mux->tags, tags, - gst_tag_setter_get_tag_merge_mode (GST_TAG_SETTER (mux))); - } - - break; - } - case GST_EVENT_NEWSEGMENT: - /* We don't support NEWSEGMENT events */ - ret = FALSE; - gst_event_unref (event); - break; - default: - break; - } - - /* now GstCollectPads can take care of the rest, e.g. EOS */ - if (ret) - ret = mux->collect_event (pad, event); - gst_object_unref (mux); - - return ret; -} - -static gboolean -gst_flv_mux_video_pad_setcaps (GstPad * pad, GstCaps * caps) -{ - GstFlvMux *mux = GST_FLV_MUX (gst_pad_get_parent (pad)); - GstFlvPad *cpad = (GstFlvPad *) gst_pad_get_element_private (pad); - gboolean ret = TRUE; - GstStructure *s; - - s = gst_caps_get_structure (caps, 0); - - if (strcmp (gst_structure_get_name (s), "video/x-flash-video") == 0) { - cpad->video_codec = 2; - } else if (strcmp (gst_structure_get_name (s), "video/x-flash-screen") == 0) { - cpad->video_codec = 3; - } else if (strcmp (gst_structure_get_name (s), "video/x-vp6-flash") == 0) { - cpad->video_codec = 4; - } else if (strcmp (gst_structure_get_name (s), "video/x-vp6-alpha") == 0) { - cpad->video_codec = 5; - } else if (strcmp (gst_structure_get_name (s), "video/x-h264") == 0) { - cpad->video_codec = 7; - } else { - ret = FALSE; - } - - if (ret && gst_structure_has_field (s, "codec_data")) { - const GValue *val = gst_structure_get_value (s, "codec_data"); - - if (val) { - cpad->video_codec_data = gst_buffer_ref (gst_value_get_buffer (val)); - cpad->sent_codec_data = FALSE; - } else { - cpad->sent_codec_data = TRUE; - } - } else { - cpad->sent_codec_data = TRUE; - } - - gst_object_unref (mux); - - return ret; -} - -static gboolean -gst_flv_mux_audio_pad_setcaps (GstPad * pad, GstCaps * caps) -{ - GstFlvMux *mux = GST_FLV_MUX (gst_pad_get_parent (pad)); - GstFlvPad *cpad = (GstFlvPad *) gst_pad_get_element_private (pad); - gboolean ret = TRUE; - GstStructure *s; - - s = gst_caps_get_structure (caps, 0); - - if (strcmp (gst_structure_get_name (s), "audio/x-adpcm") == 0) { - const gchar *layout = gst_structure_get_string (s, "layout"); - if (layout && strcmp (layout, "swf") == 0) { - cpad->audio_codec = 1; - } else { - ret = FALSE; - } - } else if (strcmp (gst_structure_get_name (s), "audio/mpeg") == 0) { - gint mpegversion; - - if (gst_structure_get_int (s, "mpegversion", &mpegversion)) { - if (mpegversion == 1) { - gint layer; - - if (gst_structure_get_int (s, "layer", &layer) && layer == 3) { - gint rate; - - if (gst_structure_get_int (s, "rate", &rate) && rate == 8000) - cpad->audio_codec = 14; - else - cpad->audio_codec = 2; - } else { - ret = FALSE; - } - } else if (mpegversion == 4) { - cpad->audio_codec = 10; - } else { - ret = FALSE; - } - } else { - ret = FALSE; - } - } else if (strcmp (gst_structure_get_name (s), "audio/x-nellymoser") == 0) { - gint rate, channels; - - if (gst_structure_get_int (s, "rate", &rate) - && gst_structure_get_int (s, "channels", &channels)) { - if (channels == 1 && rate == 16000) - cpad->audio_codec = 4; - else if (channels == 1 && rate == 8000) - cpad->audio_codec = 5; - } else { - cpad->audio_codec = 6; - } - } else if (strcmp (gst_structure_get_name (s), "audio/x-raw-int") == 0) { - gint endianness; - - if (gst_structure_get_int (s, "endianness", &endianness) - && endianness == G_LITTLE_ENDIAN) - cpad->audio_codec = 3; - else - ret = FALSE; - } else if (strcmp (gst_structure_get_name (s), "audio/x-alaw") == 0) { - cpad->audio_codec = 7; - } else if (strcmp (gst_structure_get_name (s), "audio/x-mulaw") == 0) { - cpad->audio_codec = 8; - } else if (strcmp (gst_structure_get_name (s), "audio/x-speex") == 0) { - cpad->audio_codec = 11; - } else { - ret = FALSE; - } - - if (ret) { - gint rate, channels, width; - - if (gst_structure_get_int (s, "rate", &rate)) { - if (cpad->audio_codec == 10) - cpad->rate = 3; - else if (rate == 5512) - cpad->rate = 0; - else if (rate == 11025) - cpad->rate = 1; - else if (rate == 22050) - cpad->rate = 2; - else if (rate == 44100) - cpad->rate = 3; - else if (rate == 8000 && (cpad->audio_codec == 5 - || cpad->audio_codec == 14)) - cpad->rate = 0; - else if (rate == 16000 && cpad->audio_codec == 4) - cpad->rate = 0; - else - ret = FALSE; - } else if (cpad->audio_codec == 10) { - cpad->rate = 3; - } else { - ret = FALSE; - } - - if (gst_structure_get_int (s, "channels", &channels)) { - if (cpad->audio_codec == 4 || cpad->audio_codec == 5 - || cpad->audio_codec == 6) - cpad->channels = 0; - else if (cpad->audio_codec == 10) - cpad->channels = 1; - else if (channels == 1) - cpad->channels = 0; - else if (channels == 2) - cpad->channels = 1; - else - ret = FALSE; - } else if (cpad->audio_codec == 4 || cpad->audio_codec == 5 - || cpad->audio_codec == 6) { - cpad->channels = 0; - } else if (cpad->audio_codec == 10) { - cpad->channels = 1; - } else { - ret = FALSE; - } - - if (gst_structure_get_int (s, "width", &width)) { - if (cpad->audio_codec != 3) - cpad->width = 1; - else if (width == 8) - cpad->width = 0; - else if (width == 16) - cpad->width = 1; - else - ret = FALSE; - } else if (cpad->audio_codec != 3) { - cpad->width = 1; - } else { - ret = FALSE; - } - } - - if (ret && gst_structure_has_field (s, "codec_data")) { - const GValue *val = gst_structure_get_value (s, "codec_data"); - - if (val) { - cpad->audio_codec_data = gst_buffer_ref (gst_value_get_buffer (val)); - cpad->sent_codec_data = FALSE; - } else { - cpad->sent_codec_data = TRUE; - } - } else { - cpad->sent_codec_data = TRUE; - } - - gst_object_unref (mux); - - return ret; -} - -static GstPad * -gst_flv_mux_request_new_pad (GstElement * element, - GstPadTemplate * templ, const gchar * pad_name) -{ - GstElementClass *klass = GST_ELEMENT_GET_CLASS (element); - GstFlvMux *mux = GST_FLV_MUX (element); - GstFlvPad *cpad; - GstPad *pad = NULL; - const gchar *name = NULL; - GstPadSetCapsFunction setcapsfunc = NULL; - gboolean video; - - if (mux->state != GST_FLV_MUX_STATE_HEADER) { - GST_WARNING_OBJECT (mux, "Can't request pads after writing header"); - return NULL; - } - - if (templ == gst_element_class_get_pad_template (klass, "audio")) { - if (mux->have_audio) { - GST_WARNING_OBJECT (mux, "Already have an audio pad"); - return NULL; - } - mux->have_audio = TRUE; - name = "audio"; - video = FALSE; - setcapsfunc = GST_DEBUG_FUNCPTR (gst_flv_mux_audio_pad_setcaps); - } else if (templ == gst_element_class_get_pad_template (klass, "video")) { - if (mux->have_video) { - GST_WARNING_OBJECT (mux, "Already have a video pad"); - return NULL; - } - mux->have_video = TRUE; - name = "video"; - video = TRUE; - setcapsfunc = GST_DEBUG_FUNCPTR (gst_flv_mux_video_pad_setcaps); - } else { - GST_WARNING_OBJECT (mux, "Invalid template"); - return NULL; - } - - pad = gst_pad_new_from_template (templ, name); - cpad = (GstFlvPad *) - gst_collect_pads_add_pad (mux->collect, pad, sizeof (GstFlvPad)); - - cpad->video = video; - - cpad->audio_codec = G_MAXUINT; - cpad->rate = G_MAXUINT; - cpad->width = G_MAXUINT; - cpad->channels = G_MAXUINT; - cpad->audio_codec_data = NULL; - - cpad->video_codec = G_MAXUINT; - cpad->video_codec_data = NULL; - - cpad->sent_codec_data = FALSE; - - cpad->last_timestamp = 0; - - /* FIXME: hacked way to override/extend the event function of - * GstCollectPads; because it sets its own event function giving the - * element no access to events. - */ - mux->collect_event = (GstPadEventFunction) GST_PAD_EVENTFUNC (pad); - gst_pad_set_event_function (pad, - GST_DEBUG_FUNCPTR (gst_flv_mux_handle_sink_event)); - - gst_pad_set_setcaps_function (pad, setcapsfunc); - gst_pad_set_active (pad, TRUE); - gst_element_add_pad (element, pad); - - return pad; -} - -static void -gst_flv_mux_release_pad (GstElement * element, GstPad * pad) -{ - GstFlvMux *mux = GST_FLV_MUX (GST_PAD_PARENT (pad)); - GstFlvPad *cpad = (GstFlvPad *) gst_pad_get_element_private (pad); - - if (cpad && cpad->audio_codec_data) - gst_buffer_unref (cpad->audio_codec_data); - if (cpad && cpad->video_codec_data) - gst_buffer_unref (cpad->video_codec_data); - - gst_collect_pads_remove_pad (mux->collect, pad); - gst_element_remove_pad (element, pad); -} - -static GstFlowReturn -gst_flv_mux_write_metadata (GstFlvMux * mux) -{ - GstTagList *merged_tags; - const GstTagList *user_tags; - GstFlowReturn ret = GST_FLOW_OK; - GstBuffer *script_tag, *tmp; - guint8 *data; - gint i, n_tags, tags_written = 0; - - user_tags = gst_tag_setter_get_tag_list (GST_TAG_SETTER (mux)); - GST_DEBUG_OBJECT (mux, "upstream tags = %" GST_PTR_FORMAT, mux->tags); - GST_DEBUG_OBJECT (mux, "user-set tags = %" GST_PTR_FORMAT, user_tags); - - merged_tags = gst_tag_list_merge (user_tags, mux->tags, - gst_tag_setter_get_tag_merge_mode (GST_TAG_SETTER (mux))); - - GST_DEBUG_OBJECT (mux, "merged tags = %" GST_PTR_FORMAT, merged_tags); - - script_tag = gst_buffer_new_and_alloc (11); - data = GST_BUFFER_DATA (script_tag); - - data[0] = 18; - - /* Data size, unknown for now */ - data[1] = 0; - data[2] = 0; - data[3] = 0; - - /* Timestamp */ - data[4] = data[5] = data[6] = data[7] = 0; - - /* Stream ID */ - data[8] = data[9] = data[10] = 0; - - tmp = gst_buffer_new_and_alloc (13); - data = GST_BUFFER_DATA (tmp); - data[0] = 2; /* string */ - data[1] = 0; - data[2] = 0x0a; /* length 10 */ - memcpy (&data[3], "onMetaData", sizeof ("onMetaData")); - - script_tag = gst_buffer_join (script_tag, tmp); - - n_tags = - (merged_tags) ? gst_structure_n_fields ((GstStructure *) merged_tags) : 0; - tmp = gst_buffer_new_and_alloc (5); - data = GST_BUFFER_DATA (tmp); - data[0] = 8; /* ECMA array */ - GST_WRITE_UINT32_BE (data + 1, n_tags); - script_tag = gst_buffer_join (script_tag, tmp); - - for (i = 0; merged_tags && i < n_tags; i++) { - const gchar *tag_name = - gst_structure_nth_field_name ((const GstStructure *) merged_tags, i); - if (!strcmp (tag_name, GST_TAG_DURATION)) { - gdouble d; - guint64 dur; - - if (!gst_tag_list_get_uint64 (merged_tags, GST_TAG_DURATION, &dur)) - continue; - - d = gst_guint64_to_gdouble (dur); - d /= (gdouble) GST_SECOND; - - tmp = gst_buffer_new_and_alloc (2 + 8 + 1 + 8); - data = GST_BUFFER_DATA (tmp); - data[0] = 0; /* 8 bytes name */ - data[1] = 8; - memcpy (&data[2], "duration", sizeof ("duration")); - data[10] = 0; /* double */ - GST_WRITE_DOUBLE_BE (data + 11, d); - script_tag = gst_buffer_join (script_tag, tmp); - tags_written++; - } else if (!strcmp (tag_name, GST_TAG_ARTIST) || - !strcmp (tag_name, GST_TAG_TITLE)) { - gchar *s; - const gchar *t; - - if (!strcmp (tag_name, GST_TAG_ARTIST)) - t = "creator"; - else if (!strcmp (tag_name, GST_TAG_TITLE)) - t = "title"; - - if (!gst_tag_list_get_string (merged_tags, tag_name, &s)) - continue; - - tmp = gst_buffer_new_and_alloc (2 + strlen (t) + 1 + 2 + strlen (s)); - data = GST_BUFFER_DATA (tmp); - data[0] = 0; /* tag name length */ - data[1] = strlen (t); - memcpy (&data[2], t, strlen (t)); - data[2 + strlen (t)] = 2; /* string */ - data[3 + strlen (t)] = (strlen (s) >> 8) & 0xff; - data[4 + strlen (t)] = (strlen (s)) & 0xff; - memcpy (&data[5 + strlen (t)], s, strlen (s)); - script_tag = gst_buffer_join (script_tag, tmp); - - g_free (s); - tags_written++; - } - } - - if (mux->have_video) { - GstPad *video_pad = NULL; - GSList *l = mux->collect->data; - - for (; l; l = l->next) { - GstFlvPad *cpad = l->data; - if (cpad && cpad->video) { - video_pad = cpad->collect.pad; - break; - } - } - - if (video_pad && GST_PAD_CAPS (video_pad)) { - GstStructure *s = gst_caps_get_structure (GST_PAD_CAPS (video_pad), 0); - gint par_x, par_y; - - if (gst_structure_get_fraction (s, "pixel-aspect-ratio", &par_x, &par_y)) { - gdouble d; - - d = par_x; - tmp = gst_buffer_new_and_alloc (2 + 12 + 1 + 8); - data = GST_BUFFER_DATA (tmp); - data[0] = 0; /* 12 bytes name */ - data[1] = 12; - memcpy (&data[2], "AspectRatioX", sizeof ("AspectRatioX")); - data[14] = 0; /* double */ - GST_WRITE_DOUBLE_BE (data + 15, d); - script_tag = gst_buffer_join (script_tag, tmp); - tags_written++; - - d = par_y; - tmp = gst_buffer_new_and_alloc (2 + 12 + 1 + 8); - data = GST_BUFFER_DATA (tmp); - data[0] = 0; /* 12 bytes name */ - data[1] = 12; - memcpy (&data[2], "AspectRatioY", sizeof ("AspectRatioY")); - data[14] = 0; /* double */ - GST_WRITE_DOUBLE_BE (data + 15, d); - script_tag = gst_buffer_join (script_tag, tmp); - tags_written++; - } - } - } - - { - const gchar *s = "GStreamer FLV muxer"; - - tmp = gst_buffer_new_and_alloc (2 + 15 + 1 + 2 + strlen (s)); - data = GST_BUFFER_DATA (tmp); - data[0] = 0; /* 15 bytes name */ - data[1] = 15; - memcpy (&data[2], "metadatacreator", sizeof ("metadatacreator")); - data[17] = 2; /* string */ - data[18] = (strlen (s) >> 8) & 0xff; - data[19] = (strlen (s)) & 0xff; - memcpy (&data[20], s, strlen (s)); - script_tag = gst_buffer_join (script_tag, tmp); - - tags_written++; - } - - { - GTimeVal tv = { 0, }; - time_t secs; - struct tm *tm; - gchar *s; - static const gchar *weekdays[] = { - "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" - }; - static const gchar *months[] = { - "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", - "Aug", "Sep", "Oct", "Nov", "Dec" - }; - - g_get_current_time (&tv); - secs = tv.tv_sec; - tm = gmtime (&secs); - - s = g_strdup_printf ("%s %s %d %d:%d:%d %d", weekdays[tm->tm_wday], - months[tm->tm_mon], tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, - tm->tm_year + 1900); - - tmp = gst_buffer_new_and_alloc (2 + 12 + 1 + 2 + strlen (s)); - data = GST_BUFFER_DATA (tmp); - data[0] = 0; /* 12 bytes name */ - data[1] = 12; - memcpy (&data[2], "creationdate", sizeof ("creationdate")); - data[14] = 2; /* string */ - data[15] = (strlen (s) >> 8) & 0xff; - data[16] = (strlen (s)) & 0xff; - memcpy (&data[17], s, strlen (s)); - script_tag = gst_buffer_join (script_tag, tmp); - - g_free (s); - tags_written++; - } - - tmp = gst_buffer_new_and_alloc (2 + 0 + 1); - data = GST_BUFFER_DATA (tmp); - data[0] = 0; /* 0 byte size */ - data[1] = 0; - data[2] = 9; /* end marker */ - script_tag = gst_buffer_join (script_tag, tmp); - tags_written++; - - - tmp = gst_buffer_new_and_alloc (4); - data = GST_BUFFER_DATA (tmp); - GST_WRITE_UINT32_BE (data, GST_BUFFER_SIZE (script_tag)); - script_tag = gst_buffer_join (script_tag, tmp); - - data = GST_BUFFER_DATA (script_tag); - data[1] = ((GST_BUFFER_SIZE (script_tag) - 11 - 4) >> 16) & 0xff; - data[2] = ((GST_BUFFER_SIZE (script_tag) - 11 - 4) >> 8) & 0xff; - data[3] = ((GST_BUFFER_SIZE (script_tag) - 11 - 4) >> 0) & 0xff; - - GST_WRITE_UINT32_BE (data + 11 + 13 + 1, tags_written); - - gst_buffer_set_caps (script_tag, GST_PAD_CAPS (mux->srcpad)); - ret = gst_pad_push (mux->srcpad, script_tag); - - if (merged_tags) - gst_tag_list_free (merged_tags); - - return ret; -} - -static GstFlowReturn -gst_flv_mux_write_header (GstFlvMux * mux) -{ - GstBuffer *header = gst_buffer_new_and_alloc (9 + 4); - guint8 *data = GST_BUFFER_DATA (header); - GstFlowReturn ret; - - if (GST_PAD_CAPS (mux->srcpad) == NULL) { - GstCaps *caps = gst_caps_new_simple ("video/x-flv", NULL); - - gst_pad_set_caps (mux->srcpad, caps); - gst_caps_unref (caps); - } - gst_buffer_set_caps (header, GST_PAD_CAPS (mux->srcpad)); - - data[0] = 'F'; - data[1] = 'L'; - data[2] = 'V'; - data[3] = 0x01; /* Version */ - - data[4] = (mux->have_audio << 2) | mux->have_video; /* flags */ - GST_WRITE_UINT32_BE (data + 5, 9); /* data offset */ - - GST_WRITE_UINT32_BE (data + 9, 0); /* previous tag size */ - - ret = gst_pad_push (mux->srcpad, header); - if (ret != GST_FLOW_OK) - return ret; - - return gst_flv_mux_write_metadata (mux); -} - -static GstFlowReturn -gst_flv_mux_write_buffer (GstFlvMux * mux, GstFlvPad * cpad) -{ - GstBuffer *tag; - guint8 *data; - guint size; - GstBuffer *buffer = - gst_collect_pads_pop (mux->collect, (GstCollectData *) cpad); - guint32 timestamp = - (GST_BUFFER_TIMESTAMP_IS_VALID (buffer)) ? GST_BUFFER_TIMESTAMP (buffer) / - GST_MSECOND : cpad->last_timestamp / GST_MSECOND; - gboolean second_run = FALSE; - GstFlowReturn ret; - -next: - size = 11; - if (cpad->video) { - size += 1; - if (cpad->video_codec == 7 && !cpad->sent_codec_data) - size += 4 + GST_BUFFER_SIZE (cpad->video_codec_data); - else if (cpad->video_codec == 7) - size += 4 + GST_BUFFER_SIZE (buffer); - else - size += GST_BUFFER_SIZE (buffer); - } else { - size += 1; - if (cpad->audio_codec == 10 && !cpad->sent_codec_data) - size += 1 + GST_BUFFER_SIZE (cpad->audio_codec_data); - else if (cpad->audio_codec == 10) - size += 1 + GST_BUFFER_SIZE (buffer); - else - size += GST_BUFFER_SIZE (buffer); - } - size += 4; - - tag = gst_buffer_new_and_alloc (size); - data = GST_BUFFER_DATA (tag); - memset (data, 0, size); - - data[0] = (cpad->video) ? 9 : 8; - - data[1] = ((size - 11 - 4) >> 16) & 0xff; - data[2] = ((size - 11 - 4) >> 8) & 0xff; - data[3] = ((size - 11 - 4) >> 0) & 0xff; - - data[4] = (timestamp >> 16) & 0xff; - data[5] = (timestamp >> 8) & 0xff; - data[6] = (timestamp >> 0) & 0xff; - data[7] = (timestamp >> 24) & 0xff; - - data[8] = data[9] = data[10] = 0; - - if (cpad->video) { - if (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DELTA_UNIT)) - data[11] |= 2 << 4; - else - data[11] |= 1 << 4; - - data[11] |= cpad->video_codec & 0x0f; - - if (cpad->video_codec == 7 && !cpad->sent_codec_data) { - data[12] = 0; - data[13] = data[14] = data[15] = 0; - - memcpy (data + 11 + 1 + 4, GST_BUFFER_DATA (cpad->video_codec_data), - GST_BUFFER_SIZE (cpad->video_codec_data)); - second_run = TRUE; - } else if (cpad->video_codec == 7) { - data[12] = 1; - - /* FIXME: what to do about composition time */ - data[13] = data[14] = data[15] = 0; - - memcpy (data + 11 + 1 + 4, GST_BUFFER_DATA (buffer), - GST_BUFFER_SIZE (buffer)); - } else { - memcpy (data + 11 + 1, GST_BUFFER_DATA (buffer), - GST_BUFFER_SIZE (buffer)); - } - } else { - data[11] |= (cpad->audio_codec << 4) & 0xf0; - data[11] |= (cpad->rate << 2) & 0x0c; - data[11] |= (cpad->width << 1) & 0x02; - data[11] |= (cpad->channels << 0) & 0x01; - - if (cpad->audio_codec == 10 && !cpad->sent_codec_data) { - data[12] = 0; - - memcpy (data + 11 + 1 + 1, GST_BUFFER_DATA (cpad->audio_codec_data), - GST_BUFFER_SIZE (cpad->audio_codec_data)); - second_run = TRUE; - } else if (cpad->audio_codec == 10) { - data[12] = 1; - - memcpy (data + 11 + 1 + 1, GST_BUFFER_DATA (buffer), - GST_BUFFER_SIZE (buffer)); - } else { - memcpy (data + 11 + 1, GST_BUFFER_DATA (buffer), - GST_BUFFER_SIZE (buffer)); - } - } - - GST_WRITE_UINT32_BE (data + size - 4, size - 4); - - gst_buffer_set_caps (tag, GST_PAD_CAPS (mux->srcpad)); - - if (second_run) { - second_run = FALSE; - cpad->sent_codec_data = TRUE; - - ret = gst_pad_push (mux->srcpad, tag); - if (ret != GST_FLOW_OK) { - gst_buffer_unref (buffer); - return ret; - } - - cpad->last_timestamp = timestamp; - - tag = NULL; - goto next; - } - - gst_buffer_copy_metadata (tag, buffer, GST_BUFFER_COPY_TIMESTAMPS); - GST_BUFFER_OFFSET (tag) = GST_BUFFER_OFFSET_END (tag) = - GST_BUFFER_OFFSET_NONE; - - gst_buffer_unref (buffer); - - ret = gst_pad_push (mux->srcpad, tag); - - if (ret == GST_FLOW_OK) - cpad->last_timestamp = timestamp; - - return ret; -} - -static GstFlowReturn -gst_flv_mux_collected (GstCollectPads * pads, gpointer user_data) -{ - GstFlvMux *mux = GST_FLV_MUX (user_data); - GstFlvPad *best; - GstClockTime best_time; - GstFlowReturn ret; - GSList *sl; - gboolean eos = TRUE; - - if (mux->state == GST_FLV_MUX_STATE_HEADER) { - if (mux->collect->data == NULL) { - GST_ELEMENT_ERROR (mux, STREAM, MUX, (NULL), - ("No input streams configured")); - return GST_FLOW_ERROR; - } - - if (gst_pad_push_event (mux->srcpad, - gst_event_new_new_segment (FALSE, 1.0, GST_FORMAT_BYTES, 0, -1, 0))) - ret = gst_flv_mux_write_header (mux); - else - ret = GST_FLOW_ERROR; - - if (ret != GST_FLOW_OK) - return ret; - mux->state = GST_FLV_MUX_STATE_DATA; - } - - best = NULL; - best_time = GST_CLOCK_TIME_NONE; - for (sl = mux->collect->data; sl; sl = sl->next) { - GstFlvPad *cpad = sl->data; - GstBuffer *buffer = gst_collect_pads_peek (pads, (GstCollectData *) cpad); - GstClockTime time; - - if (!buffer) - continue; - - eos = FALSE; - - time = GST_BUFFER_TIMESTAMP (buffer); - gst_buffer_unref (buffer); - - /* Use buffers without valid timestamp first */ - if (!GST_CLOCK_TIME_IS_VALID (time)) { - GST_WARNING_OBJECT (pads, "Buffer without valid timestamp"); - - best_time = cpad->last_timestamp; - best = cpad; - break; - } - - - if (best == NULL || (GST_CLOCK_TIME_IS_VALID (best_time) - && time < best_time)) { - best = cpad; - best_time = time; - } - } - - if (GST_CLOCK_TIME_IS_VALID (best_time) - && best_time / GST_MSECOND > G_MAXUINT32) { - GST_WARNING_OBJECT (mux, "Timestamp larger than FLV supports - EOS"); - eos = TRUE; - } - - if (!eos && best) { - return gst_flv_mux_write_buffer (mux, best); - } else if (eos) { - gst_pad_push_event (mux->srcpad, gst_event_new_eos ()); - return GST_FLOW_UNEXPECTED; - } else { - return GST_FLOW_OK; - } -} - -static GstStateChangeReturn -gst_flv_mux_change_state (GstElement * element, GstStateChange transition) -{ - GstStateChangeReturn ret; - GstFlvMux *mux = GST_FLV_MUX (element); - - switch (transition) { - case GST_STATE_CHANGE_NULL_TO_READY: - break; - case GST_STATE_CHANGE_READY_TO_PAUSED: - gst_collect_pads_start (mux->collect); - break; - case GST_STATE_CHANGE_PAUSED_TO_PLAYING: - break; - case GST_STATE_CHANGE_PAUSED_TO_READY: - gst_collect_pads_stop (mux->collect); - break; - default: - break; - } - - ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); - - switch (transition) { - case GST_STATE_CHANGE_PLAYING_TO_PAUSED: - break; - case GST_STATE_CHANGE_PAUSED_TO_READY: - gst_flv_mux_reset (GST_ELEMENT (mux)); - break; - case GST_STATE_CHANGE_READY_TO_NULL: - break; - default: - break; - } - - return ret; -} diff --git a/gst/flv/gstflvmux.h b/gst/flv/gstflvmux.h deleted file mode 100644 index 02df089d..00000000 --- a/gst/flv/gstflvmux.h +++ /dev/null @@ -1,89 +0,0 @@ -/* GStreamer - * - * Copyright (c) 2008 Sebastian Dröge - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __GST_FLV_MUX_H__ -#define __GST_FLV_MUX_H__ - -#include -#include - -G_BEGIN_DECLS - -#define GST_TYPE_FLV_MUX \ - (gst_flv_mux_get_type ()) -#define GST_FLV_MUX(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_FLV_MUX, GstFlvMux)) -#define GST_FLV_MUX_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_FLV_MUX, GstFlvMuxClass)) -#define GST_IS_FLV_MUX(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_FLV_MUX)) -#define GST_IS_FLV_MUX_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_FLV_MUX)) - -typedef struct -{ - GstCollectData collect; - - gboolean video; - - guint audio_codec; - guint rate; - guint width; - guint channels; - GstBuffer *audio_codec_data; - - guint video_codec; - GstBuffer *video_codec_data; - - gboolean sent_codec_data; - GstClockTime last_timestamp; -} GstFlvPad; - -typedef enum -{ - GST_FLV_MUX_STATE_HEADER, - GST_FLV_MUX_STATE_DATA -} GstFlvMuxState; - -typedef struct _GstFlvMux { - GstElement element; - - GstPad *srcpad; - GstCollectPads *collect; - - /* */ - GstPadEventFunction collect_event; - - GstFlvMuxState state; - gboolean have_audio; - gboolean have_video; - - GstTagList *tags; -} GstFlvMux; - -typedef struct _GstFlvMuxClass { - GstElementClass parent; -} GstFlvMuxClass; - -GType gst_flv_mux_get_type (void); - -G_END_DECLS - -#endif /* __GST_FLV_MUX_H__ */ diff --git a/gst/flv/gstflvparse.c b/gst/flv/gstflvparse.c deleted file mode 100644 index 59446512..00000000 --- a/gst/flv/gstflvparse.c +++ /dev/null @@ -1,1283 +0,0 @@ -/* GStreamer - * Copyright (C) <2007> Julien Moutte - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "gstflvparse.h" - -#include - -#include - -GST_DEBUG_CATEGORY_EXTERN (flvdemux_debug); -#define GST_CAT_DEFAULT flvdemux_debug - -static gchar * -FLV_GET_STRING (GstByteReader * reader) -{ - guint16 string_size = 0; - gchar *string = NULL; - const guint8 *str; - - g_return_val_if_fail (reader != NULL, NULL); - - if (G_UNLIKELY (!gst_byte_reader_get_uint16_be (reader, &string_size))) - return NULL; - - if (G_UNLIKELY (string_size > gst_byte_reader_get_remaining (reader))) - return NULL; - - string = g_try_malloc0 (string_size + 1); - if (G_UNLIKELY (!string)) { - return NULL; - } - - if (G_UNLIKELY (!gst_byte_reader_get_data (reader, string_size, &str))) { - g_free (string); - return NULL; - } - - memcpy (string, str, string_size); - if (!g_utf8_validate (string, string_size, NULL)) { - g_free (string); - return NULL; - } - - return string; -} - -static const GstQueryType * -gst_flv_demux_query_types (GstPad * pad) -{ - static const GstQueryType query_types[] = { - GST_QUERY_DURATION, - 0 - }; - - return query_types; -} - -static void -parse_flv_date_string (GDate * date, const gchar * s) -{ - g_date_set_parse (date, s); - if (g_date_valid (date)) - return; - - /* "Fri Oct 15 15:13:16 2004" needs to be parsed */ - { - static const gchar *months[] = { - "Jan", "Feb", "Mar", "Apr", - "May", "Jun", "Jul", "Aug", - "Sep", "Oct", "Nov", "Dec" - }; - gchar **tokens = g_strsplit (s, " ", -1); - guint64 d; - gchar *endptr; - gint i; - - if (g_strv_length (tokens) != 5) - goto out; - - if (strlen (tokens[1]) != 3) - goto out; - for (i = 0; i < 12; i++) { - if (!strcmp (tokens[1], months[i])) { - break; - } - } - if (i == 12) - goto out; - g_date_set_month (date, i + 1); - - d = g_ascii_strtoull (tokens[2], &endptr, 10); - if (d == 0 && *endptr != '\0') - goto out; - - g_date_set_day (date, d); - - d = g_ascii_strtoull (tokens[4], &endptr, 10); - if (d == 0 && *endptr != '\0') - goto out; - - g_date_set_year (date, d); - - out: - if (tokens) - g_strfreev (tokens); - } -} - -static gboolean -gst_flv_parse_metadata_item (GstFLVDemux * demux, GstByteReader * reader, - gboolean * end_marker) -{ - gchar *tag_name = NULL; - guint8 tag_type = 0; - - /* Initialize the end_marker flag to FALSE */ - *end_marker = FALSE; - - /* Name of the tag */ - tag_name = FLV_GET_STRING (reader); - if (G_UNLIKELY (!tag_name)) { - GST_WARNING_OBJECT (demux, "failed reading tag name"); - return FALSE; - } - - /* What kind of object is that */ - if (!gst_byte_reader_get_uint8 (reader, &tag_type)) - goto error; - - GST_DEBUG_OBJECT (demux, "tag name %s, tag type %d", tag_name, tag_type); - - switch (tag_type) { - case 0: // Double - { /* Use a union to read the uint64 and then as a double */ - gdouble d; - - if (!gst_byte_reader_get_float64_be (reader, &d)) - goto error; - - GST_DEBUG_OBJECT (demux, "%s => (double) %f", tag_name, d); - - if (!strcmp (tag_name, "duration")) { - demux->duration = d * GST_SECOND; - - gst_tag_list_add (demux->taglist, GST_TAG_MERGE_REPLACE, - GST_TAG_DURATION, demux->duration, NULL); - } else if (!strcmp (tag_name, "AspectRatioX")) { - demux->par_x = d; - demux->got_par = TRUE; - } else if (!strcmp (tag_name, "AspectRatioY")) { - demux->par_y = d; - demux->got_par = TRUE; - } else { - GST_INFO_OBJECT (demux, "Tag \'%s\' not handled", tag_name); - } - - break; - } - case 1: // Boolean - { - guint8 b; - - if (!gst_byte_reader_get_uint8 (reader, &b)) - goto error; - - GST_DEBUG_OBJECT (demux, "%s => (boolean) %d", tag_name, b); - - GST_INFO_OBJECT (demux, "Tag \'%s\' not handled", tag_name); - - break; - } - case 2: // String - { - gchar *s = NULL; - - s = FLV_GET_STRING (reader); - if (s == NULL) - goto error; - - GST_DEBUG_OBJECT (demux, "%s => (string) %s", tag_name, s); - - if (!strcmp (tag_name, "creationdate")) { - GDate *date = g_date_new (); - - parse_flv_date_string (date, s); - if (!g_date_valid (date)) { - GST_DEBUG_OBJECT (demux, "Failed to parse string as date"); - } else { - gst_tag_list_add (demux->taglist, GST_TAG_MERGE_REPLACE, - GST_TAG_DATE, date, NULL); - } - g_date_free (date); - } else if (!strcmp (tag_name, "creator")) { - gst_tag_list_add (demux->taglist, GST_TAG_MERGE_REPLACE, - GST_TAG_ARTIST, s, NULL); - } else if (!strcmp (tag_name, "title")) { - gst_tag_list_add (demux->taglist, GST_TAG_MERGE_REPLACE, - GST_TAG_TITLE, s, NULL); - } else if (!strcmp (tag_name, "metadatacreator")) { - gst_tag_list_add (demux->taglist, GST_TAG_MERGE_REPLACE, - GST_TAG_ENCODER, s, NULL); - } else { - GST_INFO_OBJECT (demux, "Tag \'%s\' not handled", tag_name); - } - - g_free (s); - - break; - } - case 3: // Object - { - gboolean end_of_object_marker = FALSE; - - while (!end_of_object_marker) { - gboolean ok = - gst_flv_parse_metadata_item (demux, reader, &end_of_object_marker); - - if (G_UNLIKELY (!ok)) { - GST_WARNING_OBJECT (demux, "failed reading a tag, skipping"); - goto error; - } - } - - break; - } - case 8: // ECMA array - { - guint32 nb_elems; - gboolean end_of_object_marker = FALSE; - - if (!gst_byte_reader_get_uint32_be (reader, &nb_elems)) - goto error; - - GST_DEBUG_OBJECT (demux, "there are approx. %d elements in the array", - nb_elems); - - while (!end_of_object_marker) { - gboolean ok = - gst_flv_parse_metadata_item (demux, reader, &end_of_object_marker); - - if (G_UNLIKELY (!ok)) { - GST_WARNING_OBJECT (demux, "failed reading a tag, skipping"); - goto error; - } - } - - break; - } - case 9: // End marker - { - GST_DEBUG_OBJECT (demux, "end marker ?"); - if (tag_name[0] == '\0') { - - GST_DEBUG_OBJECT (demux, "end marker detected"); - - *end_marker = TRUE; - } - - break; - } - case 10: // Array - { - guint32 nb_elems; - - if (!gst_byte_reader_get_uint32_be (reader, &nb_elems)) - goto error; - - GST_DEBUG_OBJECT (demux, "array has %d elements", nb_elems); - - if (!strcmp (tag_name, "times")) { - if (demux->times) { - g_array_free (demux->times, TRUE); - } - demux->times = g_array_new (FALSE, TRUE, sizeof (gdouble)); - } else if (!strcmp (tag_name, "filepositions")) { - if (demux->filepositions) { - g_array_free (demux->filepositions, TRUE); - } - demux->filepositions = g_array_new (FALSE, TRUE, sizeof (gdouble)); - } - - while (nb_elems--) { - guint8 elem_type; - - if (!gst_byte_reader_get_uint8 (reader, &elem_type)) - goto error; - - switch (elem_type) { - case 0: - { - gdouble d; - - if (!gst_byte_reader_get_float64_be (reader, &d)) - goto error; - - GST_DEBUG_OBJECT (demux, "element is a double %f", d); - - if (!strcmp (tag_name, "times") && demux->times) { - g_array_append_val (demux->times, d); - } else if (!strcmp (tag_name, "filepositions") && - demux->filepositions) { - g_array_append_val (demux->filepositions, d); - } - break; - } - default: - GST_WARNING_OBJECT (demux, "unsupported array element type %d", - elem_type); - } - } - - break; - } - case 11: // Date - { - gdouble d; - gint16 i; - - if (!gst_byte_reader_get_float64_be (reader, &d)) - goto error; - - if (!gst_byte_reader_get_int16_be (reader, &i)) - goto error; - - GST_DEBUG_OBJECT (demux, - "%s => (date as a double) %f, timezone offset %d", tag_name, d, i); - - GST_INFO_OBJECT (demux, "Tag \'%s\' not handled", tag_name); - - break; - } - default: - GST_WARNING_OBJECT (demux, "unsupported tag type %d", tag_type); - } - - g_free (tag_name); - - return TRUE; - -error: - g_free (tag_name); - - return FALSE; -} - -GstFlowReturn -gst_flv_parse_tag_script (GstFLVDemux * demux, GstBuffer * buffer) -{ - GstFlowReturn ret = GST_FLOW_OK; - GstByteReader reader = GST_BYTE_READER_INIT_FROM_BUFFER (buffer); - guint8 type; - - g_return_val_if_fail (GST_BUFFER_SIZE (buffer) >= 7, GST_FLOW_ERROR); - - gst_byte_reader_skip (&reader, 7); - - GST_LOG_OBJECT (demux, "parsing a script tag"); - - if (!gst_byte_reader_get_uint8 (&reader, &type)) - return GST_FLOW_OK; - - /* Must be string */ - if (type == 2) { - gchar *function_name; - guint i; - - function_name = FLV_GET_STRING (&reader); - - GST_LOG_OBJECT (demux, "function name is %s", GST_STR_NULL (function_name)); - - if (function_name != NULL && strcmp (function_name, "onMetaData") == 0) { - guint32 nb_elems = 0; - gboolean end_marker = FALSE; - - GST_DEBUG_OBJECT (demux, "we have a metadata script object"); - - /* Next type must be a ECMA array */ - if (!gst_byte_reader_get_uint8 (&reader, &type) || type != 8) { - g_free (function_name); - return GST_FLOW_OK; - } - - if (!gst_byte_reader_get_uint32_be (&reader, &nb_elems)) { - g_free (function_name); - return GST_FLOW_OK; - } - - GST_DEBUG_OBJECT (demux, "there are approx. %d elements in the array", - nb_elems); - - while (nb_elems-- && !end_marker) { - gboolean ok = gst_flv_parse_metadata_item (demux, &reader, &end_marker); - - if (G_UNLIKELY (!ok)) { - GST_WARNING_OBJECT (demux, "failed reading a tag, skipping"); - break; - } - } - - demux->push_tags = TRUE; - } - - g_free (function_name); - - if (demux->index && demux->times && demux->filepositions - && !demux->random_access) { - /* If an index was found and we're in push mode, insert associations */ - for (i = 0; i < MIN (demux->times->len, demux->filepositions->len); i++) { - guint64 time, fileposition; - - time = g_array_index (demux->times, gdouble, i) * GST_SECOND; - fileposition = g_array_index (demux->filepositions, gdouble, i); - GST_LOG_OBJECT (demux, "adding association %" GST_TIME_FORMAT "-> %" - G_GUINT64_FORMAT, GST_TIME_ARGS (time), fileposition); - gst_index_add_association (demux->index, demux->index_id, - GST_ASSOCIATION_FLAG_KEY_UNIT, GST_FORMAT_TIME, time, - GST_FORMAT_BYTES, fileposition, NULL); - } - } - } - - return ret; -} - -static gboolean -gst_flv_parse_audio_negotiate (GstFLVDemux * demux, guint32 codec_tag, - guint32 rate, guint32 channels, guint32 width) -{ - GstCaps *caps = NULL; - gchar *codec_name = NULL; - gboolean ret = FALSE; - - switch (codec_tag) { - case 1: - caps = gst_caps_new_simple ("audio/x-adpcm", "layout", G_TYPE_STRING, - "swf", NULL); - codec_name = "Shockwave ADPCM"; - break; - case 2: - case 14: - caps = gst_caps_new_simple ("audio/mpeg", - "mpegversion", G_TYPE_INT, 1, "layer", G_TYPE_INT, 3, - "parsed", G_TYPE_BOOLEAN, TRUE, NULL); - codec_name = "MPEG 1 Audio, Layer 3 (MP3)"; - break; - case 0: - case 3: - /* Assuming little endian for 0 (aka endianness of the - * system on which the file was created) as most people - * are probably using little endian machines */ - caps = gst_caps_new_simple ("audio/x-raw-int", - "endianness", G_TYPE_INT, G_LITTLE_ENDIAN, - "signed", G_TYPE_BOOLEAN, (width == 8) ? FALSE : TRUE, - "width", G_TYPE_INT, width, "depth", G_TYPE_INT, width, NULL); - codec_name = "Raw Audio"; - break; - case 4: - case 5: - case 6: - caps = gst_caps_new_simple ("audio/x-nellymoser", NULL); - codec_name = "Nellymoser ASAO"; - break; - case 10: - caps = gst_caps_new_simple ("audio/mpeg", - "mpegversion", G_TYPE_INT, 4, "framed", G_TYPE_BOOLEAN, TRUE, NULL); - codec_name = "AAC"; - break; - case 7: - caps = gst_caps_new_simple ("audio/x-alaw", NULL); - codec_name = "A-Law"; - break; - case 8: - caps = gst_caps_new_simple ("audio/x-mulaw", NULL); - codec_name = "Mu-Law"; - break; - case 11: - caps = gst_caps_new_simple ("audio/x-speex", NULL); - codec_name = "Speex"; - break; - default: - GST_WARNING_OBJECT (demux, "unsupported audio codec tag %u", codec_tag); - } - - if (G_UNLIKELY (!caps)) { - GST_WARNING_OBJECT (demux, "failed creating caps for audio pad"); - goto beach; - } - - gst_caps_set_simple (caps, - "rate", G_TYPE_INT, rate, "channels", G_TYPE_INT, channels, NULL); - - if (demux->audio_codec_data) { - gst_caps_set_simple (caps, "codec_data", GST_TYPE_BUFFER, - demux->audio_codec_data, NULL); - } - - ret = gst_pad_set_caps (demux->audio_pad, caps); - - if (G_LIKELY (ret)) { - /* Store the caps we have set */ - demux->audio_codec_tag = codec_tag; - demux->rate = rate; - demux->channels = channels; - demux->width = width; - - if (codec_name) { - if (demux->taglist == NULL) - demux->taglist = gst_tag_list_new (); - gst_tag_list_add (demux->taglist, GST_TAG_MERGE_REPLACE, - GST_TAG_AUDIO_CODEC, codec_name, NULL); - } - - GST_DEBUG_OBJECT (demux->audio_pad, "successfully negotiated caps %" - GST_PTR_FORMAT, caps); - } else { - GST_WARNING_OBJECT (demux->audio_pad, "failed negotiating caps %" - GST_PTR_FORMAT, caps); - } - - gst_caps_unref (caps); - -beach: - return ret; -} - -GstFlowReturn -gst_flv_parse_tag_audio (GstFLVDemux * demux, GstBuffer * buffer) -{ - GstFlowReturn ret = GST_FLOW_OK; - guint32 pts = 0, codec_tag = 0, rate = 5512, width = 8, channels = 1; - guint32 codec_data = 0, pts_ext = 0; - guint8 flags = 0; - guint8 *data = GST_BUFFER_DATA (buffer); - GstBuffer *outbuf; - - GST_LOG_OBJECT (demux, "parsing an audio tag"); - - g_return_val_if_fail (GST_BUFFER_SIZE (buffer) == demux->tag_size, - GST_FLOW_ERROR); - - GST_LOG_OBJECT (demux, "pts bytes %02X %02X %02X %02X", data[0], data[1], - data[2], data[3]); - - /* Grab information about audio tag */ - pts = GST_READ_UINT24_BE (data); - /* read the pts extension to 32 bits integer */ - pts_ext = GST_READ_UINT8 (data + 3); - /* Combine them */ - pts |= pts_ext << 24; - - if (GST_BUFFER_SIZE (buffer) < 12) { - GST_ERROR_OBJECT (demux, "Too small tag size"); - return GST_FLOW_ERROR; - } - - /* Skip the stream id and go directly to the flags */ - flags = GST_READ_UINT8 (data + 7); - - /* Channels */ - if (flags & 0x01) { - channels = 2; - } - /* Width */ - if (flags & 0x02) { - width = 16; - } - /* Sampling rate */ - if ((flags & 0x0C) == 0x0C) { - rate = 44100; - } else if ((flags & 0x0C) == 0x08) { - rate = 22050; - } else if ((flags & 0x0C) == 0x04) { - rate = 11025; - } - /* Codec tag */ - codec_tag = flags >> 4; - if (codec_tag == 10) { /* AAC has an extra byte for packet type */ - codec_data = 2; - } else { - codec_data = 1; - } - - /* codec tags with special rates */ - if (codec_tag == 5 || codec_tag == 14) - rate = 8000; - else if (codec_tag == 4) - rate = 16000; - - GST_LOG_OBJECT (demux, "audio tag with %d channels, %dHz sampling rate, " - "%d bits width, codec tag %u (flags %02X)", channels, rate, width, - codec_tag, flags); - - /* If we don't have our audio pad created, then create it. */ - if (G_UNLIKELY (!demux->audio_pad)) { - - demux->audio_pad = - gst_pad_new_from_template (gst_element_class_get_pad_template - (GST_ELEMENT_GET_CLASS (demux), "audio"), "audio"); - if (G_UNLIKELY (!demux->audio_pad)) { - GST_WARNING_OBJECT (demux, "failed creating audio pad"); - ret = GST_FLOW_ERROR; - goto beach; - } - - /* Negotiate caps */ - if (!gst_flv_parse_audio_negotiate (demux, codec_tag, rate, channels, - width)) { - gst_object_unref (demux->audio_pad); - demux->audio_pad = NULL; - ret = GST_FLOW_ERROR; - goto beach; - } - - GST_DEBUG_OBJECT (demux, "created audio pad with caps %" GST_PTR_FORMAT, - GST_PAD_CAPS (demux->audio_pad)); - - /* Set functions on the pad */ - gst_pad_set_query_type_function (demux->audio_pad, - GST_DEBUG_FUNCPTR (gst_flv_demux_query_types)); - gst_pad_set_query_function (demux->audio_pad, - GST_DEBUG_FUNCPTR (gst_flv_demux_query)); - gst_pad_set_event_function (demux->audio_pad, - GST_DEBUG_FUNCPTR (gst_flv_demux_src_event)); - - gst_pad_use_fixed_caps (demux->audio_pad); - - /* Make it active */ - gst_pad_set_active (demux->audio_pad, TRUE); - - /* We need to set caps before adding */ - gst_element_add_pad (GST_ELEMENT (demux), - gst_object_ref (demux->audio_pad)); - - /* We only emit no more pads when we have audio and video. Indeed we can - * not trust the FLV header to tell us if there will be only audio or - * only video and we would just break discovery of some files */ - if (demux->audio_pad && demux->video_pad) { - GST_DEBUG_OBJECT (demux, "emitting no more pads"); - gst_element_no_more_pads (GST_ELEMENT (demux)); - } - } - - /* Check if caps have changed */ - if (G_UNLIKELY (rate != demux->rate || channels != demux->channels || - codec_tag != demux->audio_codec_tag || width != demux->width)) { - GST_DEBUG_OBJECT (demux, "audio settings have changed, changing caps"); - - /* Negotiate caps */ - if (!gst_flv_parse_audio_negotiate (demux, codec_tag, rate, channels, - width)) { - ret = GST_FLOW_ERROR; - goto beach; - } - } - - /* Push taglist if present */ - if ((demux->has_audio && !demux->audio_pad) && - (demux->has_video && !demux->video_pad)) { - GST_DEBUG_OBJECT (demux, "we are still waiting for a stream to come up " - "before we can push tags"); - } else { - if (demux->taglist && demux->push_tags) { - GST_DEBUG_OBJECT (demux, "pushing tags out"); - gst_element_found_tags (GST_ELEMENT (demux), demux->taglist); - demux->taglist = gst_tag_list_new (); - demux->push_tags = FALSE; - } - } - - /* Check if we have anything to push */ - if (demux->tag_data_size <= codec_data) { - GST_LOG_OBJECT (demux, "Nothing left in this tag, returning"); - goto beach; - } - - /* Create buffer from pad */ - outbuf = - gst_buffer_create_sub (buffer, 7 + codec_data, - demux->tag_data_size - codec_data); - - if (demux->audio_codec_tag == 10) { - guint8 aac_packet_type = GST_READ_UINT8 (data + 8); - - switch (aac_packet_type) { - case 0: - { - /* AudioSpecificConfic data */ - GST_LOG_OBJECT (demux, "got an AAC codec data packet"); - if (demux->audio_codec_data) { - gst_buffer_unref (demux->audio_codec_data); - } - demux->audio_codec_data = outbuf; - /* Use that buffer data in the caps */ - gst_flv_parse_audio_negotiate (demux, codec_tag, rate, channels, width); - goto beach; - break; - } - case 1: - /* AAC raw packet */ - GST_LOG_OBJECT (demux, "got a raw AAC audio packet"); - break; - default: - GST_WARNING_OBJECT (demux, "invalid AAC packet type %u", - aac_packet_type); - } - } - - /* Fill buffer with data */ - GST_BUFFER_TIMESTAMP (outbuf) = pts * GST_MSECOND; - GST_BUFFER_DURATION (outbuf) = GST_CLOCK_TIME_NONE; - GST_BUFFER_OFFSET (outbuf) = demux->audio_offset++; - GST_BUFFER_OFFSET_END (outbuf) = demux->audio_offset; - gst_buffer_set_caps (outbuf, GST_PAD_CAPS (demux->audio_pad)); - - if (demux->duration == GST_CLOCK_TIME_NONE || - demux->duration < GST_BUFFER_TIMESTAMP (outbuf)) - demux->duration = GST_BUFFER_TIMESTAMP (outbuf); - - /* Only add audio frames to the index if we have no video - * and if we don't have random access */ - if (!demux->has_video && demux->index && !demux->random_access) { - GST_LOG_OBJECT (demux, "adding association %" GST_TIME_FORMAT "-> %" - G_GUINT64_FORMAT, GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)), - demux->cur_tag_offset); - gst_index_add_association (demux->index, demux->index_id, - GST_ASSOCIATION_FLAG_KEY_UNIT, - GST_FORMAT_TIME, GST_BUFFER_TIMESTAMP (outbuf), - GST_FORMAT_BYTES, demux->cur_tag_offset, NULL); - } - - if (G_UNLIKELY (demux->audio_need_discont)) { - GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT); - demux->audio_need_discont = FALSE; - } - - gst_segment_set_last_stop (&demux->segment, GST_FORMAT_TIME, - GST_BUFFER_TIMESTAMP (outbuf)); - - /* Do we need a newsegment event ? */ - if (G_UNLIKELY (demux->audio_need_segment)) { - if (demux->close_seg_event) - gst_pad_push_event (demux->audio_pad, - gst_event_ref (demux->close_seg_event)); - - if (!demux->new_seg_event) { - GST_DEBUG_OBJECT (demux, "pushing newsegment from %" - GST_TIME_FORMAT " to %" GST_TIME_FORMAT, - GST_TIME_ARGS (demux->segment.last_stop), - GST_TIME_ARGS (demux->segment.stop)); - demux->new_seg_event = - gst_event_new_new_segment (FALSE, demux->segment.rate, - demux->segment.format, demux->segment.last_stop, - demux->segment.stop, demux->segment.last_stop); - } else { - GST_DEBUG_OBJECT (demux, "pushing pre-generated newsegment event"); - } - - gst_pad_push_event (demux->audio_pad, gst_event_ref (demux->new_seg_event)); - - demux->audio_need_segment = FALSE; - } - - GST_LOG_OBJECT (demux, "pushing %d bytes buffer at pts %" GST_TIME_FORMAT - " with duration %" GST_TIME_FORMAT ", offset %" G_GUINT64_FORMAT, - GST_BUFFER_SIZE (outbuf), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)), - GST_TIME_ARGS (GST_BUFFER_DURATION (outbuf)), GST_BUFFER_OFFSET (outbuf)); - - /* Push downstream */ - ret = gst_pad_push (demux->audio_pad, outbuf); - if (G_UNLIKELY (ret != GST_FLOW_OK)) { - GST_WARNING_OBJECT (demux, "failed pushing a %" G_GUINT64_FORMAT - " bytes audio buffer: %s", demux->tag_data_size, - gst_flow_get_name (ret)); - if (ret == GST_FLOW_NOT_LINKED) { - demux->audio_linked = FALSE; - } - goto beach; - } - - demux->audio_linked = TRUE; - -beach: - return ret; -} - -static gboolean -gst_flv_parse_video_negotiate (GstFLVDemux * demux, guint32 codec_tag) -{ - gboolean ret = FALSE; - GstCaps *caps = NULL; - gchar *codec_name = NULL; - - /* Generate caps for that pad */ - switch (codec_tag) { - case 2: - caps = gst_caps_new_simple ("video/x-flash-video", NULL); - codec_name = "Sorenson Video"; - break; - case 3: - caps = gst_caps_new_simple ("video/x-flash-screen", NULL); - codec_name = "Flash Screen Video"; - case 4: - caps = gst_caps_new_simple ("video/x-vp6-flash", NULL); - codec_name = "On2 VP6 Video"; - break; - case 5: - caps = gst_caps_new_simple ("video/x-vp6-alpha", NULL); - codec_name = "On2 VP6 Video with alpha channel"; - break; - case 7: - caps = gst_caps_new_simple ("video/x-h264", NULL); - codec_name = "H.264/AVC Video"; - break; - default: - GST_WARNING_OBJECT (demux, "unsupported video codec tag %u", codec_tag); - } - - if (G_UNLIKELY (!caps)) { - GST_WARNING_OBJECT (demux, "failed creating caps for video pad"); - goto beach; - } - - gst_caps_set_simple (caps, "pixel-aspect-ratio", GST_TYPE_FRACTION, - demux->par_x, demux->par_y, NULL); - - if (demux->video_codec_data) { - gst_caps_set_simple (caps, "codec_data", GST_TYPE_BUFFER, - demux->video_codec_data, NULL); - } - - ret = gst_pad_set_caps (demux->video_pad, caps); - - if (G_LIKELY (ret)) { - /* Store the caps we have set */ - demux->video_codec_tag = codec_tag; - - if (codec_name) { - if (demux->taglist == NULL) - demux->taglist = gst_tag_list_new (); - gst_tag_list_add (demux->taglist, GST_TAG_MERGE_REPLACE, - GST_TAG_VIDEO_CODEC, codec_name, NULL); - } - - GST_DEBUG_OBJECT (demux->video_pad, "successfully negotiated caps %" - GST_PTR_FORMAT, caps); - } else { - GST_WARNING_OBJECT (demux->video_pad, "failed negotiating caps %" - GST_PTR_FORMAT, caps); - } - - gst_caps_unref (caps); - -beach: - return ret; -} - -GstFlowReturn -gst_flv_parse_tag_video (GstFLVDemux * demux, GstBuffer * buffer) -{ - GstFlowReturn ret = GST_FLOW_OK; - guint32 pts = 0, codec_data = 1, pts_ext = 0; - gboolean keyframe = FALSE; - guint8 flags = 0, codec_tag = 0; - guint8 *data = GST_BUFFER_DATA (buffer); - GstBuffer *outbuf; - - g_return_val_if_fail (GST_BUFFER_SIZE (buffer) == demux->tag_size, - GST_FLOW_ERROR); - - GST_LOG_OBJECT (demux, "parsing a video tag"); - - GST_LOG_OBJECT (demux, "pts bytes %02X %02X %02X %02X", data[0], data[1], - data[2], data[3]); - - /* Grab information about video tag */ - pts = GST_READ_UINT24_BE (data); - /* read the pts extension to 32 bits integer */ - pts_ext = GST_READ_UINT8 (data + 3); - /* Combine them */ - pts |= pts_ext << 24; - - if (GST_BUFFER_SIZE (buffer) < 12) { - GST_ERROR_OBJECT (demux, "Too small tag size"); - return GST_FLOW_ERROR; - } - - /* Skip the stream id and go directly to the flags */ - flags = GST_READ_UINT8 (data + 7); - - /* Keyframe */ - if ((flags >> 4) == 1) { - keyframe = TRUE; - } - /* Codec tag */ - codec_tag = flags & 0x0F; - if (codec_tag == 4 || codec_tag == 5) { - codec_data = 2; - } else if (codec_tag == 7) { - codec_data = 5; - } - - GST_LOG_OBJECT (demux, "video tag with codec tag %u, keyframe (%d) " - "(flags %02X)", codec_tag, keyframe, flags); - - /* If we don't have our video pad created, then create it. */ - if (G_UNLIKELY (!demux->video_pad)) { - demux->video_pad = - gst_pad_new_from_template (gst_element_class_get_pad_template - (GST_ELEMENT_GET_CLASS (demux), "video"), "video"); - if (G_UNLIKELY (!demux->video_pad)) { - GST_WARNING_OBJECT (demux, "failed creating video pad"); - ret = GST_FLOW_ERROR; - goto beach; - } - - if (!gst_flv_parse_video_negotiate (demux, codec_tag)) { - gst_object_unref (demux->video_pad); - demux->video_pad = NULL; - ret = GST_FLOW_ERROR; - goto beach; - } - - /* When we ve set pixel-aspect-ratio we use that boolean to detect a - * metadata tag that would come later and trigger a caps change */ - demux->got_par = FALSE; - - GST_DEBUG_OBJECT (demux, "created video pad with caps %" GST_PTR_FORMAT, - GST_PAD_CAPS (demux->video_pad)); - - /* Set functions on the pad */ - gst_pad_set_query_type_function (demux->video_pad, - GST_DEBUG_FUNCPTR (gst_flv_demux_query_types)); - gst_pad_set_query_function (demux->video_pad, - GST_DEBUG_FUNCPTR (gst_flv_demux_query)); - gst_pad_set_event_function (demux->video_pad, - GST_DEBUG_FUNCPTR (gst_flv_demux_src_event)); - - gst_pad_use_fixed_caps (demux->video_pad); - - /* Make it active */ - gst_pad_set_active (demux->video_pad, TRUE); - - /* We need to set caps before adding */ - gst_element_add_pad (GST_ELEMENT (demux), - gst_object_ref (demux->video_pad)); - - /* We only emit no more pads when we have audio and video. Indeed we can - * not trust the FLV header to tell us if there will be only audio or - * only video and we would just break discovery of some files */ - if (demux->audio_pad && demux->video_pad) { - GST_DEBUG_OBJECT (demux, "emitting no more pads"); - gst_element_no_more_pads (GST_ELEMENT (demux)); - } - } - - /* Check if caps have changed */ - if (G_UNLIKELY (codec_tag != demux->video_codec_tag || demux->got_par)) { - - GST_DEBUG_OBJECT (demux, "video settings have changed, changing caps"); - - if (!gst_flv_parse_video_negotiate (demux, codec_tag)) { - ret = GST_FLOW_ERROR; - goto beach; - } - - /* When we ve set pixel-aspect-ratio we use that boolean to detect a - * metadata tag that would come later and trigger a caps change */ - demux->got_par = FALSE; - } - - /* Push taglist if present */ - if ((demux->has_audio && !demux->audio_pad) && - (demux->has_video && !demux->video_pad)) { - GST_DEBUG_OBJECT (demux, "we are still waiting for a stream to come up " - "before we can push tags"); - } else { - if (demux->taglist && demux->push_tags) { - GST_DEBUG_OBJECT (demux, "pushing tags out"); - gst_element_found_tags (GST_ELEMENT (demux), demux->taglist); - demux->taglist = gst_tag_list_new (); - demux->push_tags = FALSE; - } - } - - /* Check if we have anything to push */ - if (demux->tag_data_size <= codec_data) { - GST_LOG_OBJECT (demux, "Nothing left in this tag, returning"); - goto beach; - } - - /* Create buffer from pad */ - outbuf = - gst_buffer_create_sub (buffer, 7 + codec_data, - demux->tag_data_size - codec_data); - - if (demux->video_codec_tag == 7) { - guint8 avc_packet_type = GST_READ_UINT8 (data + 8); - - switch (avc_packet_type) { - case 0: - { - /* AVCDecoderConfigurationRecord data */ - GST_LOG_OBJECT (demux, "got an H.264 codec data packet"); - if (demux->video_codec_data) { - gst_buffer_unref (demux->video_codec_data); - } - demux->video_codec_data = outbuf; - /* Use that buffer data in the caps */ - gst_flv_parse_video_negotiate (demux, codec_tag); - goto beach; - break; - } - case 1: - /* H.264 NALU packet */ - GST_LOG_OBJECT (demux, "got a H.264 NALU audio packet"); - break; - default: - GST_WARNING_OBJECT (demux, "invalid AAC packet type %u", - avc_packet_type); - } - } - - /* Fill buffer with data */ - GST_BUFFER_TIMESTAMP (outbuf) = pts * GST_MSECOND; - GST_BUFFER_DURATION (outbuf) = GST_CLOCK_TIME_NONE; - GST_BUFFER_OFFSET (outbuf) = demux->video_offset++; - GST_BUFFER_OFFSET_END (outbuf) = demux->video_offset; - gst_buffer_set_caps (outbuf, GST_PAD_CAPS (demux->video_pad)); - - if (demux->duration == GST_CLOCK_TIME_NONE || - demux->duration < GST_BUFFER_TIMESTAMP (outbuf)) - demux->duration = GST_BUFFER_TIMESTAMP (outbuf); - - if (!keyframe) { - GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DELTA_UNIT); - if (demux->index && !demux->random_access) { - GST_LOG_OBJECT (demux, "adding association %" GST_TIME_FORMAT "-> %" - G_GUINT64_FORMAT, GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)), - demux->cur_tag_offset); - gst_index_add_association (demux->index, demux->index_id, - GST_ASSOCIATION_FLAG_NONE, - GST_FORMAT_TIME, GST_BUFFER_TIMESTAMP (outbuf), - GST_FORMAT_BYTES, demux->cur_tag_offset, NULL); - } - } else { - if (demux->index && !demux->random_access) { - GST_LOG_OBJECT (demux, "adding association %" GST_TIME_FORMAT "-> %" - G_GUINT64_FORMAT, GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)), - demux->cur_tag_offset); - gst_index_add_association (demux->index, demux->index_id, - GST_ASSOCIATION_FLAG_KEY_UNIT, - GST_FORMAT_TIME, GST_BUFFER_TIMESTAMP (outbuf), - GST_FORMAT_BYTES, demux->cur_tag_offset, NULL); - } - } - - if (G_UNLIKELY (demux->video_need_discont)) { - GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT); - demux->video_need_discont = FALSE; - } - - gst_segment_set_last_stop (&demux->segment, GST_FORMAT_TIME, - GST_BUFFER_TIMESTAMP (outbuf)); - - /* Do we need a newsegment event ? */ - if (G_UNLIKELY (demux->video_need_segment)) { - if (demux->close_seg_event) - gst_pad_push_event (demux->video_pad, - gst_event_ref (demux->close_seg_event)); - - if (!demux->new_seg_event) { - GST_DEBUG_OBJECT (demux, "pushing newsegment from %" - GST_TIME_FORMAT " to %" GST_TIME_FORMAT, - GST_TIME_ARGS (demux->segment.last_stop), - GST_TIME_ARGS (demux->segment.stop)); - demux->new_seg_event = - gst_event_new_new_segment (FALSE, demux->segment.rate, - demux->segment.format, demux->segment.last_stop, - demux->segment.stop, demux->segment.last_stop); - } else { - GST_DEBUG_OBJECT (demux, "pushing pre-generated newsegment event"); - } - - gst_pad_push_event (demux->video_pad, gst_event_ref (demux->new_seg_event)); - - demux->video_need_segment = FALSE; - } - - GST_LOG_OBJECT (demux, "pushing %d bytes buffer at pts %" GST_TIME_FORMAT - " with duration %" GST_TIME_FORMAT ", offset %" G_GUINT64_FORMAT - ", keyframe (%d)", GST_BUFFER_SIZE (outbuf), - GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)), - GST_TIME_ARGS (GST_BUFFER_DURATION (outbuf)), GST_BUFFER_OFFSET (outbuf), - keyframe); - - /* Push downstream */ - ret = gst_pad_push (demux->video_pad, outbuf); - - if (G_UNLIKELY (ret != GST_FLOW_OK)) { - GST_WARNING_OBJECT (demux, "failed pushing a %" G_GUINT64_FORMAT - " bytes video buffer: %s", demux->tag_data_size, - gst_flow_get_name (ret)); - if (ret == GST_FLOW_NOT_LINKED) { - demux->video_linked = FALSE; - } - goto beach; - } - - demux->video_linked = TRUE; - -beach: - return ret; -} - -GstClockTime -gst_flv_parse_tag_timestamp (GstFLVDemux * demux, GstBuffer * buffer, - size_t * tag_size) -{ - guint32 pts = 0, pts_ext = 0; - guint32 tag_data_size; - guint8 type; - gboolean keyframe = TRUE; - GstClockTime ret; - guint8 *data = GST_BUFFER_DATA (buffer); - - g_return_val_if_fail (GST_BUFFER_SIZE (buffer) >= 12, GST_CLOCK_TIME_NONE); - - type = data[0]; - - if (type != 9 && type != 8 && type != 18) { - GST_WARNING_OBJECT (demux, "Unsupported tag type %u", data[0]); - return GST_CLOCK_TIME_NONE; - } - - if (type == 9) - demux->has_video = TRUE; - else if (type == 8) - demux->has_audio = TRUE; - - tag_data_size = GST_READ_UINT24_BE (data + 1); - - if (GST_BUFFER_SIZE (buffer) >= tag_data_size + 11 + 4) { - if (GST_READ_UINT32_BE (data + tag_data_size + 11) != tag_data_size + 11) { - GST_WARNING_OBJECT (demux, "Invalid tag size"); - return GST_CLOCK_TIME_NONE; - } - } - - if (tag_size) - *tag_size = tag_data_size + 11 + 4; - - data += 4; - - GST_LOG_OBJECT (demux, "pts bytes %02X %02X %02X %02X", data[0], data[1], - data[2], data[3]); - - /* Grab timestamp of tag tag */ - pts = GST_READ_UINT24_BE (data); - /* read the pts extension to 32 bits integer */ - pts_ext = GST_READ_UINT8 (data + 3); - /* Combine them */ - pts |= pts_ext << 24; - - if (type == 9) { - data += 7; - - keyframe = ((data[0] >> 4) == 1); - } - - ret = pts * GST_MSECOND; - - if (demux->index && (type == 9 || (type == 8 && !demux->has_video))) { - GST_LOG_OBJECT (demux, "adding association %" GST_TIME_FORMAT "-> %" - G_GUINT64_FORMAT, GST_TIME_ARGS (ret), demux->offset); - gst_index_add_association (demux->index, demux->index_id, - (keyframe) ? GST_ASSOCIATION_FLAG_KEY_UNIT : GST_ASSOCIATION_FLAG_NONE, - GST_FORMAT_TIME, ret, GST_FORMAT_BYTES, demux->offset, NULL); - } - - if (demux->duration == GST_CLOCK_TIME_NONE || demux->duration < ret) - demux->duration = ret; - - return ret; -} - -GstFlowReturn -gst_flv_parse_tag_type (GstFLVDemux * demux, GstBuffer * buffer) -{ - GstFlowReturn ret = GST_FLOW_OK; - guint8 tag_type = 0; - guint8 *data = GST_BUFFER_DATA (buffer); - - g_return_val_if_fail (GST_BUFFER_SIZE (buffer) >= 4, GST_FLOW_ERROR); - - tag_type = data[0]; - - switch (tag_type) { - case 9: - demux->state = FLV_STATE_TAG_VIDEO; - demux->has_video = TRUE; - break; - case 8: - demux->state = FLV_STATE_TAG_AUDIO; - demux->has_audio = TRUE; - break; - case 18: - demux->state = FLV_STATE_TAG_SCRIPT; - break; - default: - GST_WARNING_OBJECT (demux, "unsupported tag type %u", tag_type); - } - - /* Tag size is 1 byte of type + 3 bytes of size + 7 bytes + tag data size + - * 4 bytes of previous tag size */ - demux->tag_data_size = GST_READ_UINT24_BE (data + 1); - demux->tag_size = demux->tag_data_size + 11; - - GST_LOG_OBJECT (demux, "tag data size is %" G_GUINT64_FORMAT, - demux->tag_data_size); - - return ret; -} - -GstFlowReturn -gst_flv_parse_header (GstFLVDemux * demux, GstBuffer * buffer) -{ - GstFlowReturn ret = GST_FLOW_OK; - guint8 *data = GST_BUFFER_DATA (buffer); - - g_return_val_if_fail (GST_BUFFER_SIZE (buffer) >= 9, GST_FLOW_ERROR); - - /* Check for the FLV tag */ - if (data[0] == 'F' && data[1] == 'L' && data[2] == 'V') { - GST_DEBUG_OBJECT (demux, "FLV header detected"); - } else { - if (G_UNLIKELY (demux->strict)) { - GST_WARNING_OBJECT (demux, "invalid header tag detected"); - ret = GST_FLOW_UNEXPECTED; - goto beach; - } - } - - /* Jump over the 4 first bytes */ - data += 4; - - /* Now look at audio/video flags */ - { - guint8 flags = data[0]; - - demux->has_video = demux->has_audio = FALSE; - - if (flags & 1) { - GST_DEBUG_OBJECT (demux, "there is a video stream"); - demux->has_video = TRUE; - } - if (flags & 4) { - GST_DEBUG_OBJECT (demux, "there is an audio stream"); - demux->has_audio = TRUE; - } - } - - /* We don't care about the rest */ - demux->need_header = FALSE; - -beach: - return ret; -} diff --git a/gst/flv/gstflvparse.h b/gst/flv/gstflvparse.h deleted file mode 100644 index 203d30de..00000000 --- a/gst/flv/gstflvparse.h +++ /dev/null @@ -1,42 +0,0 @@ -/* GStreamer - * Copyright (C) <2007> Julien Moutte - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __FLV_PARSE_H__ -#define __FLV_PARSE_H__ - -#include "gstflvdemux.h" - -G_BEGIN_DECLS - - -GstFlowReturn gst_flv_parse_tag_script (GstFLVDemux * demux, - GstBuffer *buffer); - -GstFlowReturn gst_flv_parse_tag_audio (GstFLVDemux * demux, GstBuffer *buffer); - -GstFlowReturn gst_flv_parse_tag_video (GstFLVDemux * demux, GstBuffer *buffer); - -GstFlowReturn gst_flv_parse_tag_type (GstFLVDemux * demux, GstBuffer *buffer); - -GstFlowReturn gst_flv_parse_header (GstFLVDemux * demux, GstBuffer *buffer); - -GstClockTime gst_flv_parse_tag_timestamp (GstFLVDemux *demux, GstBuffer *buffer, size_t *tag_data_size); - -G_END_DECLS -#endif /* __FLV_PARSE_H__ */ -- cgit v1.2.1 From 453794d38315c2491ddc2ced3cc867bdafb910d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 13 May 2009 10:47:23 +0200 Subject: Moved 'deinterlace2' from -bad to -good And remove old deinterlace plugin as deinterlace2 will be called deinterlace in -good. --- configure.ac | 11 - docs/plugins/Makefile.am | 2 - docs/plugins/gst-plugins-bad-plugins-docs.sgml | 4 - docs/plugins/gst-plugins-bad-plugins-sections.txt | 28 - docs/plugins/inspect/plugin-deinterlace2.xml | 34 - docs/plugins/inspect/plugin-gstinterlace.xml | 34 - gst/deinterlace/.gitignore | 7 - gst/deinterlace/Makefile.am | 12 - gst/deinterlace/deinterlace.vcproj | 148 -- gst/deinterlace/gstdeinterlace.c | 514 ------- gst/deinterlace/gstdeinterlace.h | 74 - gst/deinterlace2/Makefile.am | 48 - gst/deinterlace2/gstdeinterlace2.c | 1517 -------------------- gst/deinterlace2/gstdeinterlace2.h | 259 ---- gst/deinterlace2/tvtime/greedy.c | 488 ------- gst/deinterlace2/tvtime/greedyh.asm | 250 ---- gst/deinterlace2/tvtime/greedyh.c | 420 ------ gst/deinterlace2/tvtime/greedyhmacros.h | 75 - gst/deinterlace2/tvtime/linear.c | 214 --- gst/deinterlace2/tvtime/linearblend.c | 231 --- gst/deinterlace2/tvtime/mmx.h | 723 ---------- gst/deinterlace2/tvtime/plugins.h | 54 - gst/deinterlace2/tvtime/scalerbob.c | 74 - gst/deinterlace2/tvtime/sse.h | 992 ------------- gst/deinterlace2/tvtime/tomsmocomp.c | 211 --- .../tvtime/tomsmocomp/SearchLoop0A.inc | 15 - .../tvtime/tomsmocomp/SearchLoopBottom.inc | 174 --- .../tvtime/tomsmocomp/SearchLoopEdgeA.inc | 11 - .../tvtime/tomsmocomp/SearchLoopEdgeA8.inc | 12 - .../tvtime/tomsmocomp/SearchLoopOddA.inc | 10 - .../tvtime/tomsmocomp/SearchLoopOddA2.inc | 5 - .../tvtime/tomsmocomp/SearchLoopOddA6.inc | 11 - .../tvtime/tomsmocomp/SearchLoopOddAH.inc | 10 - .../tvtime/tomsmocomp/SearchLoopOddAH2.inc | 5 - .../tvtime/tomsmocomp/SearchLoopTop.inc | 254 ---- .../tvtime/tomsmocomp/SearchLoopVA.inc | 6 - .../tvtime/tomsmocomp/SearchLoopVAH.inc | 6 - gst/deinterlace2/tvtime/tomsmocomp/StrangeBob.inc | 435 ------ .../tvtime/tomsmocomp/TomsMoCompAll.inc | 241 ---- .../tvtime/tomsmocomp/TomsMoCompAll2.inc | 243 ---- gst/deinterlace2/tvtime/tomsmocomp/WierdBob.inc | 286 ---- .../tvtime/tomsmocomp/tomsmocompmacros.h | 164 --- gst/deinterlace2/tvtime/vfir.c | 187 --- gst/deinterlace2/tvtime/weave.c | 82 -- gst/deinterlace2/tvtime/weavebff.c | 88 -- gst/deinterlace2/tvtime/weavetff.c | 88 -- gst/deinterlace2/tvtime/x86-64_macros.inc | 82 -- 47 files changed, 8839 deletions(-) delete mode 100644 docs/plugins/inspect/plugin-deinterlace2.xml delete mode 100644 docs/plugins/inspect/plugin-gstinterlace.xml delete mode 100644 gst/deinterlace/.gitignore delete mode 100644 gst/deinterlace/Makefile.am delete mode 100644 gst/deinterlace/deinterlace.vcproj delete mode 100644 gst/deinterlace/gstdeinterlace.c delete mode 100644 gst/deinterlace/gstdeinterlace.h delete mode 100644 gst/deinterlace2/Makefile.am delete mode 100644 gst/deinterlace2/gstdeinterlace2.c delete mode 100644 gst/deinterlace2/gstdeinterlace2.h delete mode 100644 gst/deinterlace2/tvtime/greedy.c delete mode 100644 gst/deinterlace2/tvtime/greedyh.asm delete mode 100644 gst/deinterlace2/tvtime/greedyh.c delete mode 100644 gst/deinterlace2/tvtime/greedyhmacros.h delete mode 100644 gst/deinterlace2/tvtime/linear.c delete mode 100644 gst/deinterlace2/tvtime/linearblend.c delete mode 100644 gst/deinterlace2/tvtime/mmx.h delete mode 100644 gst/deinterlace2/tvtime/plugins.h delete mode 100644 gst/deinterlace2/tvtime/scalerbob.c delete mode 100644 gst/deinterlace2/tvtime/sse.h delete mode 100644 gst/deinterlace2/tvtime/tomsmocomp.c delete mode 100644 gst/deinterlace2/tvtime/tomsmocomp/SearchLoop0A.inc delete mode 100644 gst/deinterlace2/tvtime/tomsmocomp/SearchLoopBottom.inc delete mode 100644 gst/deinterlace2/tvtime/tomsmocomp/SearchLoopEdgeA.inc delete mode 100644 gst/deinterlace2/tvtime/tomsmocomp/SearchLoopEdgeA8.inc delete mode 100644 gst/deinterlace2/tvtime/tomsmocomp/SearchLoopOddA.inc delete mode 100644 gst/deinterlace2/tvtime/tomsmocomp/SearchLoopOddA2.inc delete mode 100644 gst/deinterlace2/tvtime/tomsmocomp/SearchLoopOddA6.inc delete mode 100644 gst/deinterlace2/tvtime/tomsmocomp/SearchLoopOddAH.inc delete mode 100644 gst/deinterlace2/tvtime/tomsmocomp/SearchLoopOddAH2.inc delete mode 100644 gst/deinterlace2/tvtime/tomsmocomp/SearchLoopTop.inc delete mode 100644 gst/deinterlace2/tvtime/tomsmocomp/SearchLoopVA.inc delete mode 100644 gst/deinterlace2/tvtime/tomsmocomp/SearchLoopVAH.inc delete mode 100644 gst/deinterlace2/tvtime/tomsmocomp/StrangeBob.inc delete mode 100644 gst/deinterlace2/tvtime/tomsmocomp/TomsMoCompAll.inc delete mode 100644 gst/deinterlace2/tvtime/tomsmocomp/TomsMoCompAll2.inc delete mode 100644 gst/deinterlace2/tvtime/tomsmocomp/WierdBob.inc delete mode 100644 gst/deinterlace2/tvtime/tomsmocomp/tomsmocompmacros.h delete mode 100644 gst/deinterlace2/tvtime/vfir.c delete mode 100644 gst/deinterlace2/tvtime/weave.c delete mode 100644 gst/deinterlace2/tvtime/weavebff.c delete mode 100644 gst/deinterlace2/tvtime/weavetff.c delete mode 100644 gst/deinterlace2/tvtime/x86-64_macros.inc diff --git a/configure.ac b/configure.ac index cd70b2b0..d97d0fba 100644 --- a/configure.ac +++ b/configure.ac @@ -158,13 +158,6 @@ GST_CHECK_FIONREAD dnl *** checks for structures *** dnl *** checks for compiler characteristics *** -dnl check if we have GCC inline-asm -AS_GCC_INLINE_ASSEMBLY([HAVE_GCC_ASM=yes], [HAVE_GCC_ASM=no]) -if test x$HAVE_GCC_ASM = xyes ; then - AC_DEFINE(HAVE_GCC_ASM, 1, - [Define if compiler supports gcc inline assembly]) -fi -AM_CONDITIONAL(HAVE_GCC_ASM, test "x$HAVE_GCC_ASM" = "xyes") dnl *** checks for library functions *** AC_CHECK_FUNCS([gmtime_r]) @@ -267,8 +260,6 @@ AG_GST_CHECK_PLUGIN(bayer) AG_GST_CHECK_PLUGIN(cdxaparse) AG_GST_CHECK_PLUGIN(dccp) AG_GST_CHECK_PLUGIN(debugutils) -AG_GST_CHECK_PLUGIN(deinterlace) -AG_GST_CHECK_PLUGIN(deinterlace2) AG_GST_CHECK_PLUGIN(dtmf) AG_GST_CHECK_PLUGIN(dvdspu) AG_GST_CHECK_PLUGIN(festival) @@ -1538,8 +1529,6 @@ gst/camerabin/Makefile gst/cdxaparse/Makefile gst/dccp/Makefile gst/debugutils/Makefile -gst/deinterlace/Makefile -gst/deinterlace2/Makefile gst/dtmf/Makefile gst/dvdspu/Makefile gst/festival/Makefile diff --git a/docs/plugins/Makefile.am b/docs/plugins/Makefile.am index 08854e70..2bc11e09 100644 --- a/docs/plugins/Makefile.am +++ b/docs/plugins/Makefile.am @@ -120,8 +120,6 @@ EXTRA_HFILES = \ $(top_srcdir)/gst/amrparse/gstamrparse.h \ $(top_srcdir)/gst/autoconvert/gstautoconvert.h \ $(top_srcdir)/gst/camerabin/gstcamerabin.h \ - $(top_srcdir)/gst/deinterlace/gstdeinterlace.h \ - $(top_srcdir)/gst/deinterlace2/gstdeinterlace2.h \ $(top_srcdir)/gst/dccp/gstdccpclientsink.h \ $(top_srcdir)/gst/dccp/gstdccpclientsrc.h \ $(top_srcdir)/gst/dccp/gstdccpserversink.h \ diff --git a/docs/plugins/gst-plugins-bad-plugins-docs.sgml b/docs/plugins/gst-plugins-bad-plugins-docs.sgml index 2618a541..322ea414 100644 --- a/docs/plugins/gst-plugins-bad-plugins-docs.sgml +++ b/docs/plugins/gst-plugins-bad-plugins-docs.sgml @@ -32,8 +32,6 @@ - - @@ -104,7 +102,6 @@ - @@ -119,7 +116,6 @@ - diff --git a/docs/plugins/gst-plugins-bad-plugins-sections.txt b/docs/plugins/gst-plugins-bad-plugins-sections.txt index 382b9cc2..1b534ebe 100644 --- a/docs/plugins/gst-plugins-bad-plugins-sections.txt +++ b/docs/plugins/gst-plugins-bad-plugins-sections.txt @@ -209,34 +209,6 @@ GST_TYPE_DCCP_SERVER_SRC gst_dccp_server_src_get_type
-
-element-deinterlace -deinterlace -GstDeinterlace - -GstDeinterlaceClass -GST_DEINTERLACE -GST_DEINTERLACE_CLASS -GST_IS_DEINTERLACE -GST_IS_DEINTERLACE_CLASS -GST_TYPE_DEINTERLACE -gst_deinterlace_get_type -
- -
-element-deinterlace2 -deinterlace2 -GstDeinterlace2 - -GstDeinterlace2Class -GST_IS_DEINTERLACE2 -GST_IS_DEINTERLACE2_CLASS -GST_DEINTERLACE2 -GST_DEINTERLACE2_CLASS -GST_TYPE_DEINTERLACE2 -gst_deinterlace2_get_type -
-
element-dfbvideosink dfbvideosink diff --git a/docs/plugins/inspect/plugin-deinterlace2.xml b/docs/plugins/inspect/plugin-deinterlace2.xml deleted file mode 100644 index 59e419a1..00000000 --- a/docs/plugins/inspect/plugin-deinterlace2.xml +++ /dev/null @@ -1,34 +0,0 @@ - - deinterlace2 - Deinterlacer - ../../gst/deinterlace2/.libs/libgstdeinterlace2.so - libgstdeinterlace2.so - 0.10.11.1 - LGPL - gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease - Unknown package origin - - - deinterlace2 - Deinterlacer - Filter/Video - Deinterlace Methods ported from DScaler/TvTime - Martin Eikermann <meiker@upb.de>, Sebastian Dröge <slomo@circular-chaos.org> - - - sink - sink - always -
video/x-raw-yuv, format=(fourcc)YUY2, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)YVYU, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
-
- - src - source - always -
video/x-raw-yuv, format=(fourcc)YUY2, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)YVYU, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
-
-
-
-
-
\ No newline at end of file diff --git a/docs/plugins/inspect/plugin-gstinterlace.xml b/docs/plugins/inspect/plugin-gstinterlace.xml deleted file mode 100644 index 14e0b2a0..00000000 --- a/docs/plugins/inspect/plugin-gstinterlace.xml +++ /dev/null @@ -1,34 +0,0 @@ - - gstinterlace - Deinterlace video - ../../gst/deinterlace/.libs/libgstdeinterlace.so - libgstdeinterlace.so - 0.10.11.1 - LGPL - gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease - Unknown package origin - - - deinterlace - Deinterlace - Filter/Effect/Video - Deinterlace video - Wim Taymans <wim.taymans@gmail.com> - - - sink - sink - always -
video/x-raw-yuv, format=(fourcc){ I420, Y42B }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
-
- - src - source - always -
video/x-raw-yuv, format=(fourcc){ I420, Y42B }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
-
-
-
-
-
\ No newline at end of file diff --git a/gst/deinterlace/.gitignore b/gst/deinterlace/.gitignore deleted file mode 100644 index 08f5ed37..00000000 --- a/gst/deinterlace/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -Makefile -Makefile.in -*.o -*.lo -*.la -.deps -.libs diff --git a/gst/deinterlace/Makefile.am b/gst/deinterlace/Makefile.am deleted file mode 100644 index 3d842d01..00000000 --- a/gst/deinterlace/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ -plugin_LTLIBRARIES = libgstdeinterlace.la - -libgstdeinterlace_la_SOURCES = gstdeinterlace.c -libgstdeinterlace_la_CFLAGS = \ - $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) -libgstdeinterlace_la_LIBADD = \ - $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) $(GST_BASE_LIBS) -libgstdeinterlace_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) -libgstdeinterlace_la_LIBTOOLFLAGS = --tag=disable-static - -noinst_HEADERS = gstdeinterlace.h - diff --git a/gst/deinterlace/deinterlace.vcproj b/gst/deinterlace/deinterlace.vcproj deleted file mode 100644 index 200d88ee..00000000 --- a/gst/deinterlace/deinterlace.vcproj +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/gst/deinterlace/gstdeinterlace.c b/gst/deinterlace/gstdeinterlace.c deleted file mode 100644 index b2a25afe..00000000 --- a/gst/deinterlace/gstdeinterlace.c +++ /dev/null @@ -1,514 +0,0 @@ -/* GStreamer simple deinterlacing plugin - * Copyright (C) 1999 Erik Walthinsen - * Copyright (C) 2006-2008 Tim-Philipp Müller - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -/* based on the Area Based Deinterlacer (for RGB frames) */ -/* (a VirtualDub filter) from Gunnar Thalin */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include "gstdeinterlace.h" -#include - -/** - * SECTION:element-deinterlace - * - * Adaptively deinterlaces video frames by detecting interlacing artifacts. - * An edge detection matrix is used, with a threshold value. Pixels detected - * as 'interlaced' are replaced with pixels blended from the pixels above and - * below. - * - * - * Example launch line - * |[ - * gst-launch -v videotestsrc ! deinterlace ! ffmpegcolorspace ! xvimagesink - * ]| - * - */ - -GST_DEBUG_CATEGORY_STATIC (deinterlace_debug); -#define GST_CAT_DEFAULT deinterlace_debug - -#define DEFAULT_DI_AREA_ONLY FALSE -#define DEFAULT_NI_AREA_ONLY FALSE -#define DEFAULT_BLEND FALSE -#define DEFAULT_DEINTERLACE TRUE -#define DEFAULT_THRESHOLD 20 -#define DEFAULT_EDGE_DETECT 25 - -enum -{ - ARG_0, - ARG_DI_ONLY, - ARG_NI_ONLY, - ARG_BLEND, - ARG_THRESHOLD, - ARG_EDGE_DETECT, - ARG_DEINTERLACE -}; - -static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", - GST_PAD_SRC, - GST_PAD_ALWAYS, - GST_STATIC_CAPS (GST_VIDEO_CAPS_YUV ("{ I420, Y42B }")) - ); - -static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", - GST_PAD_SINK, - GST_PAD_ALWAYS, - GST_STATIC_CAPS (GST_VIDEO_CAPS_YUV ("{ I420, Y42B }")) - ); - -GST_BOILERPLATE (GstDeinterlace, gst_deinterlace, GstBaseTransform, - GST_TYPE_BASE_TRANSFORM); - -static void gst_deinterlace_set_property (GObject * object, guint prop_id, - const GValue * value, GParamSpec * pspec); -static void gst_deinterlace_get_property (GObject * object, guint prop_id, - GValue * value, GParamSpec * pspec); -static GstFlowReturn gst_deinterlace_transform_ip (GstBaseTransform * trans, - GstBuffer * buf); -static gboolean gst_deinterlace_stop (GstBaseTransform * trans); -static gboolean gst_deinterlace_set_caps (GstBaseTransform * trans, - GstCaps * incaps, GstCaps * outcaps); -static GstCaps *gst_deinterlace_transform_caps (GstBaseTransform * trans, - GstPadDirection direction, GstCaps * incaps); - -static void -gst_deinterlace_base_init (gpointer g_class) -{ - GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); - - gst_element_class_set_details_simple (element_class, "Deinterlace", - "Filter/Effect/Video", "Deinterlace video", - "Wim Taymans "); -} - -static void -gst_deinterlace_class_init (GstDeinterlaceClass * klass) -{ - GObjectClass *gobject_class; - GstBaseTransformClass *basetransform_class; - - gobject_class = (GObjectClass *) klass; - basetransform_class = (GstBaseTransformClass *) klass; - - gobject_class->set_property = gst_deinterlace_set_property; - gobject_class->get_property = gst_deinterlace_get_property; - - /** - * GstDeinterlace:deinterlace: - * - * Turn processing on/off. When false, no modification of the - * video frames occurs and they pass through intact. - */ - g_object_class_install_property (gobject_class, ARG_DEINTERLACE, - g_param_spec_boolean ("deinterlace", "deinterlace", - "turn deinterlacing on/off", DEFAULT_DEINTERLACE, G_PARAM_READWRITE)); - /** - * GstDeinterlace:di-area-only: - * - * When set to true, only areas affected by the deinterlacing are output, - * making it easy to see which regions are being modified. - * - * See Also: #GstDeinterlace:ni-area-only - */ - g_object_class_install_property (gobject_class, ARG_DI_ONLY, - g_param_spec_boolean ("di-area-only", "di-area-only", - "displays deinterlaced areas only", DEFAULT_DI_AREA_ONLY, - G_PARAM_READWRITE)); - /** - * GstDeinterlace:ni-area-only: - * - * When set to true, only areas unaffected by the deinterlacing are output, - * making it easy to see which regions are being preserved intact. - * - * See Also: #GstDeinterlace:di-area-only - */ - g_object_class_install_property (gobject_class, ARG_NI_ONLY, - g_param_spec_boolean ("ni-area-only", "ni-area-only", - "displays non-interlaced areas only", DEFAULT_DI_AREA_ONLY, - G_PARAM_READWRITE)); - /** - * GstDeinterlace:blend: - * - * Change the blending for pixels which are detected as - * 'interlacing artifacts'. When true, the output pixel is a weighted - * average (1,2,1) of the pixel and the pixels above and below it. - * When false, the odd field lines are preserved, and the even field lines - * are averaged from the surrounding pixels above and below (the odd field). - */ - g_object_class_install_property (gobject_class, ARG_BLEND, - g_param_spec_boolean ("blend", "blend", "blend", DEFAULT_BLEND, - G_PARAM_READWRITE)); - /** - * GstDeinterlace:threshold: - * - * Affects the threshold of the edge-detection function used for detecting - * interlacing artifacts. - */ - g_object_class_install_property (gobject_class, ARG_THRESHOLD, - g_param_spec_int ("threshold", "Edge-detection threshold", - "Threshold value for the interlacing artifacts in the output " - "of the edge detection", G_MININT, G_MAXINT, 0, G_PARAM_READWRITE)); - /** - * GstDeinterlace:edge-detect: - * - * Affects the weighting of the edge-detection function used for detecting - * interlacing artifacts. - */ - g_object_class_install_property (gobject_class, ARG_EDGE_DETECT, - g_param_spec_int ("edge-detect", "edge detection weighting", - "Weighting value used for calculating the edge detection matrix", - G_MININT, G_MAXINT, 0, G_PARAM_READWRITE)); - - basetransform_class->transform_ip = - GST_DEBUG_FUNCPTR (gst_deinterlace_transform_ip); - basetransform_class->transform_caps = - GST_DEBUG_FUNCPTR (gst_deinterlace_transform_caps); - basetransform_class->stop = GST_DEBUG_FUNCPTR (gst_deinterlace_stop); - basetransform_class->set_caps = GST_DEBUG_FUNCPTR (gst_deinterlace_set_caps); -} - -static void -gst_deinterlace_init (GstDeinterlace * filter, GstDeinterlaceClass * klass) -{ - filter->show_deinterlaced_area_only = DEFAULT_DI_AREA_ONLY; - filter->show_noninterlaced_area_only = DEFAULT_NI_AREA_ONLY; - filter->blend = DEFAULT_BLEND; - filter->deinterlace = DEFAULT_DEINTERLACE; - filter->threshold = DEFAULT_THRESHOLD; - filter->edge_detect = DEFAULT_EDGE_DETECT; - /*filter->threshold_blend = 0; */ - - filter->src = NULL; - filter->picsize = 0; -} - -static gboolean -gst_deinterlace_stop (GstBaseTransform * trans) -{ - GstDeinterlace *filter; - - filter = GST_DEINTERLACE (trans); - - g_free (filter->src); - filter->src = NULL; - filter->picsize = 0; - filter->width = 0; - filter->height = 0; - - return TRUE; -} - -static GstCaps * -gst_deinterlace_transform_caps (GstBaseTransform * trans, - GstPadDirection direction, GstCaps * incaps) -{ - return gst_caps_ref (incaps); -} - -static gboolean -gst_deinterlace_set_caps (GstBaseTransform * trans, GstCaps * incaps, - GstCaps * outcaps) -{ - GstDeinterlace *filter; - GstVideoFormat fmt; - GstStructure *s; - guint32 fourcc; - gint picsize, w, h; - - filter = GST_DEINTERLACE (trans); - - g_assert (gst_caps_is_equal_fixed (incaps, outcaps)); - - s = gst_caps_get_structure (incaps, 0); - if (!gst_structure_get_int (s, "width", &w) || - !gst_structure_get_int (s, "height", &h) || - !gst_structure_get_fourcc (s, "format", &fourcc)) { - return FALSE; - } - - filter->width = w; - filter->height = h; - filter->fourcc = fourcc; - - GST_DEBUG_OBJECT (filter, "width x height = %d x %d, fourcc: %" - GST_FOURCC_FORMAT, w, h, GST_FOURCC_ARGS (fourcc)); - - fmt = gst_video_format_from_fourcc (fourcc); - - filter->y_stride = gst_video_format_get_row_stride (fmt, 0, w); - filter->u_stride = gst_video_format_get_row_stride (fmt, 1, w); - filter->v_stride = gst_video_format_get_row_stride (fmt, 2, w); - - filter->uv_height = gst_video_format_get_component_height (fmt, 1, h); - - filter->y_off = gst_video_format_get_component_offset (fmt, 0, w, h); - filter->u_off = gst_video_format_get_component_offset (fmt, 1, w, h); - filter->v_off = gst_video_format_get_component_offset (fmt, 2, w, h); - - picsize = gst_video_format_get_size (fmt, w, h); - - if (filter->picsize != picsize) { - filter->picsize = picsize; - g_free (filter->src); /* free + alloc avoids memcpy */ - filter->src = g_malloc0 (filter->picsize); - GST_LOG_OBJECT (filter, "temp buffer size %d", filter->picsize); - } - - return TRUE; -} - -static GstFlowReturn -gst_deinterlace_transform_ip (GstBaseTransform * trans, GstBuffer * buf) -{ - GstDeinterlace *filter; - gboolean bShowDeinterlacedAreaOnly; - gboolean bShowNoninterlacedAreaOnly; - gint y0, y1, y2, y3; - guchar *psrc1, *pdst1, *yuvptr, *src; - gint iInterlaceValue0, iInterlaceValue1, iInterlaceValue2; - gint x, y, p; - gint y_line; - guchar *y_dst, *y_src; - guchar fill_value; - gboolean bBlend; - gboolean bDeinterlace; - gint iThreshold; - gint iEdgeDetect; - gint width, height; - - /* g_assert (gst_buffer_is_writable (buf)); */ - - filter = GST_DEINTERLACE (trans); - - GST_OBJECT_LOCK (filter); - bBlend = filter->blend; - bDeinterlace = filter->deinterlace; - iThreshold = filter->threshold; - iEdgeDetect = filter->edge_detect; - bShowDeinterlacedAreaOnly = filter->show_deinterlaced_area_only; - bShowNoninterlacedAreaOnly = filter->show_noninterlaced_area_only; - GST_OBJECT_UNLOCK (filter); - - src = filter->src; - yuvptr = GST_BUFFER_DATA (buf); - - memcpy (filter->src, yuvptr, filter->picsize); - - - iThreshold = iThreshold * iThreshold * 4; - /* We don't want an integer overflow in the interlace calculation. */ - if (iEdgeDetect > 180) - iEdgeDetect = 180; - iEdgeDetect = iEdgeDetect * iEdgeDetect; - - for (p = 0; p < 3; p++) { - switch (p) { - case 0: - y_dst = yuvptr + filter->y_off; /* dst y pointer */ - y_line = filter->y_stride; - y_src = src + filter->y_off; - width = filter->width; - height = filter->height; - fill_value = 0; - break; - case 1: - y_dst = yuvptr + filter->u_off; /* dst U pointer */ - y_line = filter->u_stride; - y_src = src + filter->u_off; - width = filter->width / 2; - height = filter->uv_height; - fill_value = 128; - break; - case 2: - y_dst = yuvptr + filter->v_off; /* dst V pointer */ - y_line = filter->v_stride; - y_src = src + filter->v_off; - width = filter->width / 2; - height = filter->uv_height; - fill_value = 128; - break; - default: - g_assert_not_reached (); - break; - } - - for (x = 0; x < width; x++) { - pdst1 = y_dst + x; - psrc1 = y_src + x; - iInterlaceValue1 = iInterlaceValue2 = 0; - - for (y = 0; y < height; y++, psrc1 += y_line, pdst1 += y_line) { - /* current line is 1 */ - y0 = y1 = y2 = y3 = *psrc1; - if (y > 0) - y0 = *(psrc1 - y_line); - if (y < (height - 1)) - y2 = *(psrc1 + y_line); - if (y < (height - 2)) - y3 = *(psrc1 + 2 * y_line); - - iInterlaceValue0 = iInterlaceValue1; - iInterlaceValue1 = iInterlaceValue2; - - if (y < height - 1) - iInterlaceValue2 = - (ABS (y1 - y2) * ABS (y3 - y2) - ((iEdgeDetect * (y1 - y3) * (y1 - - y3)) >> 12)) * 10; - else - iInterlaceValue2 = 0; - - if ((iInterlaceValue0 + 2 * iInterlaceValue1 + iInterlaceValue2 > - iThreshold) && (y > 0)) { - if (bShowNoninterlacedAreaOnly) { - *pdst1 = fill_value; /* blank the point and so the interlac area */ - } else { - if (bDeinterlace) { - if (bBlend) { - *pdst1 = (unsigned char) ((y0 + 2 * y1 + y2) >> 2); - } else { - /* this method seems to work better than blending if the */ - /* quality is pretty bad and the half pics don't fit together */ - if ((y % 2) == 1) { /* if odd simply copy the value */ - *pdst1 = *psrc1; - } else { /* if even interpolate the line (upper + lower)/2 */ - *pdst1 = (unsigned char) ((y0 + y2) >> 1); - } - } - } else { - *pdst1 = *psrc1; - } - } - - } else { - /* so we went below the treshold and therefore we don't have to */ - /* change anything */ - if (bShowDeinterlacedAreaOnly) { - /* this is for testing to see how we should tune the treshhold */ - /* and shows as the things that haven't change because the */ - /* threshold was to low?? (or shows that everything is ok :-) */ - *pdst1 = fill_value; /* blank the point and so the non-interlac area */ - } else { - *pdst1 = *psrc1; - } - } - } - } - } - - return GST_FLOW_OK; -} - -static void -gst_deinterlace_set_property (GObject * object, guint prop_id, - const GValue * value, GParamSpec * pspec) -{ - GstDeinterlace *filter; - - filter = GST_DEINTERLACE (object); - - GST_OBJECT_LOCK (filter); - switch (prop_id) { - case ARG_DEINTERLACE: - filter->deinterlace = g_value_get_boolean (value); - break; - case ARG_DI_ONLY: - filter->show_deinterlaced_area_only = g_value_get_boolean (value); - break; - case ARG_NI_ONLY: - filter->show_noninterlaced_area_only = g_value_get_boolean (value); - break; - case ARG_BLEND: - filter->blend = g_value_get_boolean (value); - break; - case ARG_THRESHOLD: - filter->threshold = g_value_get_int (value); - break; - case ARG_EDGE_DETECT: - filter->edge_detect = g_value_get_int (value); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } - GST_OBJECT_UNLOCK (filter); -} - -static void -gst_deinterlace_get_property (GObject * object, guint prop_id, GValue * value, - GParamSpec * pspec) -{ - GstDeinterlace *filter; - - filter = GST_DEINTERLACE (object); - - GST_OBJECT_LOCK (filter); - switch (prop_id) { - case ARG_DEINTERLACE: - g_value_set_boolean (value, filter->deinterlace); - break; - case ARG_DI_ONLY: - g_value_set_boolean (value, filter->show_deinterlaced_area_only); - break; - case ARG_NI_ONLY: - g_value_set_boolean (value, filter->show_noninterlaced_area_only); - break; - case ARG_BLEND: - g_value_set_boolean (value, filter->blend); - break; - case ARG_THRESHOLD: - g_value_set_int (value, filter->threshold); - break; - case ARG_EDGE_DETECT: - g_value_set_int (value, filter->edge_detect); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } - GST_OBJECT_UNLOCK (filter); -} - -static gboolean -plugin_init (GstPlugin * plugin) -{ - GST_DEBUG_CATEGORY_INIT (deinterlace_debug, "deinterlace", 0, - "deinterlace element"); - - if (!gst_element_register (plugin, "deinterlace", GST_RANK_NONE, - gst_deinterlace_get_type ())) - return FALSE; - - return TRUE; -} - -GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, - GST_VERSION_MINOR, - "gstinterlace", - "Deinterlace video", plugin_init, PACKAGE_VERSION, "LGPL", GST_PACKAGE_NAME, - GST_PACKAGE_ORIGIN); diff --git a/gst/deinterlace/gstdeinterlace.h b/gst/deinterlace/gstdeinterlace.h deleted file mode 100644 index faa8e811..00000000 --- a/gst/deinterlace/gstdeinterlace.h +++ /dev/null @@ -1,74 +0,0 @@ -/* GStreamer simple deinterlacing plugin - * Copyright (C) 1999 Erik Walthinsen - * Copyright (C) 2006 Tim-Philipp Müller - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __GST_DEINTERLACE_H__ -#define __GST_DEINTERLACE_H__ - -#include -#include - -G_BEGIN_DECLS - -#define GST_TYPE_DEINTERLACE (gst_deinterlace_get_type()) -#define GST_DEINTERLACE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DEINTERLACE,GstDeinterlace)) -#define GST_DEINTERLACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DEINTERLACE,GstDeinterlaceClass)) -#define GST_IS_DEINTERLACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DEINTERLACE)) -#define GST_IS_DEINTERLACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DEINTERLACE)) - -typedef struct _GstDeinterlace GstDeinterlace; -typedef struct _GstDeinterlaceClass GstDeinterlaceClass; - -struct _GstDeinterlace { - GstBaseTransform basetransform; - - /*< private >*/ - gint width; - gint height; - gint uv_height; - guint32 fourcc; - - gboolean show_deinterlaced_area_only; - gboolean show_noninterlaced_area_only; - gboolean blend; - gboolean deinterlace; - gint threshold_blend; /* here we start blending */ - gint threshold; /* here we start interpolating TODO FIXME */ - gint edge_detect; - - gint picsize; - gint y_stride; - gint u_stride; - gint v_stride; - gint y_off; - gint u_off; - gint v_off; - - guchar *src; -}; - -struct _GstDeinterlaceClass { - GstBaseTransformClass basetransformclass; -}; - -GType gst_deinterlace_get_type (void); - -G_END_DECLS - -#endif /* __GST_DEINTERLACE_H__ */ diff --git a/gst/deinterlace2/Makefile.am b/gst/deinterlace2/Makefile.am deleted file mode 100644 index 1de59919..00000000 --- a/gst/deinterlace2/Makefile.am +++ /dev/null @@ -1,48 +0,0 @@ -plugin_LTLIBRARIES = libgstdeinterlace2.la - -libgstdeinterlace2_la_SOURCES = \ - gstdeinterlace2.c \ - tvtime/greedy.c \ - tvtime/greedyh.c \ - tvtime/vfir.c \ - tvtime/tomsmocomp.c \ - tvtime/weavetff.c \ - tvtime/weavebff.c \ - tvtime/weave.c \ - tvtime/linear.c \ - tvtime/linearblend.c \ - tvtime/scalerbob.c - -libgstdeinterlace2_la_CFLAGS = $(GST_CFLAGS) \ - $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(LIBOIL_CFLAGS) -libgstdeinterlace2_la_LIBADD = $(GST_LIBS) \ - $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) $(GST_BASE_LIBS) $(LIBOIL_LIBS) -libgstdeinterlace2_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) -libgstdeinterlace2_la_LIBTOOLFLAGS = --tag=disable-static - -noinst_HEADERS = \ - gstdeinterlace2.h \ - tvtime/mmx.h \ - tvtime/sse.h \ - tvtime/greedyh.asm \ - tvtime/greedyhmacros.h \ - tvtime/plugins.h \ - tvtime/x86-64_macros.inc \ - tvtime/tomsmocomp/SearchLoop0A.inc \ - tvtime/tomsmocomp/SearchLoopBottom.inc \ - tvtime/tomsmocomp/SearchLoopEdgeA8.inc \ - tvtime/tomsmocomp/SearchLoopEdgeA.inc \ - tvtime/tomsmocomp/SearchLoopOddA2.inc \ - tvtime/tomsmocomp/SearchLoopOddA6.inc \ - tvtime/tomsmocomp/SearchLoopOddAH2.inc \ - tvtime/tomsmocomp/SearchLoopOddAH.inc \ - tvtime/tomsmocomp/SearchLoopOddA.inc \ - tvtime/tomsmocomp/SearchLoopTop.inc \ - tvtime/tomsmocomp/SearchLoopVAH.inc \ - tvtime/tomsmocomp/SearchLoopVA.inc \ - tvtime/tomsmocomp/StrangeBob.inc \ - tvtime/tomsmocomp/TomsMoCompAll2.inc \ - tvtime/tomsmocomp/TomsMoCompAll.inc \ - tvtime/tomsmocomp/tomsmocompmacros.h \ - tvtime/tomsmocomp/WierdBob.inc - diff --git a/gst/deinterlace2/gstdeinterlace2.c b/gst/deinterlace2/gstdeinterlace2.c deleted file mode 100644 index 42a69240..00000000 --- a/gst/deinterlace2/gstdeinterlace2.c +++ /dev/null @@ -1,1517 +0,0 @@ -/* - * GStreamer - * Copyright (C) 2005 Martin Eikermann - * Copyright (C) 2008-2009 Sebastian Dröge - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/** - * SECTION:element-deinterlace2 - * - * deinterlace2 deinterlaces interlaced video frames to progressive video frames. - * For this different algorithms can be selected which will be described later. - * - * - * Example launch line - * |[ - * gst-launch -v filesrc location=/path/to/file ! decodebin2 ! ffmpegcolorspace ! deinterlace2 ! ffmpegcolorspace ! autovideosink - * ]| This pipeline deinterlaces a video file with the default deinterlacing options. - * - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include - -#include "gstdeinterlace2.h" -#include "tvtime/plugins.h" - -#include - -GST_DEBUG_CATEGORY_STATIC (deinterlace2_debug); -#define GST_CAT_DEFAULT (deinterlace2_debug) - -/* Object signals and args */ -enum -{ - LAST_SIGNAL -}; - -/* Properties */ - -#define DEFAULT_MODE GST_DEINTERLACE2_MODE_INTERLACED -#define DEFAULT_METHOD GST_DEINTERLACE2_GREEDY_H -#define DEFAULT_FIELDS GST_DEINTERLACE2_ALL -#define DEFAULT_FIELD_LAYOUT GST_DEINTERLACE2_LAYOUT_AUTO - -enum -{ - PROP_0, - PROP_MODE, - PROP_METHOD, - PROP_FIELDS, - PROP_FIELD_LAYOUT, - PROP_LAST -}; - -G_DEFINE_TYPE (GstDeinterlaceMethod, gst_deinterlace_method, GST_TYPE_OBJECT); - -static void -gst_deinterlace_method_class_init (GstDeinterlaceMethodClass * klass) -{ - -} - -static void -gst_deinterlace_method_init (GstDeinterlaceMethod * self) -{ - -} - -static void -gst_deinterlace_method_deinterlace_frame (GstDeinterlaceMethod * self, - GstDeinterlace2 * parent, GstBuffer * outbuf) -{ - GstDeinterlaceMethodClass *klass = GST_DEINTERLACE_METHOD_GET_CLASS (self); - - klass->deinterlace_frame (self, parent, outbuf); -} - -static gint -gst_deinterlace_method_get_fields_required (GstDeinterlaceMethod * self) -{ - GstDeinterlaceMethodClass *klass = GST_DEINTERLACE_METHOD_GET_CLASS (self); - - return klass->fields_required; -} - -static gint -gst_deinterlace_method_get_latency (GstDeinterlaceMethod * self) -{ - GstDeinterlaceMethodClass *klass = GST_DEINTERLACE_METHOD_GET_CLASS (self); - - return klass->latency; -} - - -G_DEFINE_TYPE (GstDeinterlaceSimpleMethod, gst_deinterlace_simple_method, - GST_TYPE_DEINTERLACE_METHOD); - -static void -gst_deinterlace_simple_method_interpolate_scanline (GstDeinterlaceMethod * self, - GstDeinterlace2 * parent, guint8 * out, - GstDeinterlaceScanlineData * scanlines, gint width) -{ - oil_memcpy (out, scanlines->m1, parent->row_stride); -} - -static void -gst_deinterlace_simple_method_copy_scanline (GstDeinterlaceMethod * self, - GstDeinterlace2 * parent, guint8 * out, - GstDeinterlaceScanlineData * scanlines, gint width) -{ - oil_memcpy (out, scanlines->m0, parent->row_stride); -} - -static void -gst_deinterlace_simple_method_deinterlace_frame (GstDeinterlaceMethod * self, - GstDeinterlace2 * parent, GstBuffer * outbuf) -{ - GstDeinterlaceSimpleMethodClass *dsm_class = - GST_DEINTERLACE_SIMPLE_METHOD_GET_CLASS (self); - GstDeinterlaceMethodClass *dm_class = GST_DEINTERLACE_METHOD_GET_CLASS (self); - GstDeinterlaceScanlineData scanlines; - guint8 *out = GST_BUFFER_DATA (outbuf); - guint8 *field0 = NULL, *field1 = NULL, *field2 = NULL, *field3 = NULL; - gint cur_field_idx = parent->history_count - dm_class->fields_required; - guint cur_field_flags = parent->field_history[cur_field_idx].flags; - gint line; - - field0 = GST_BUFFER_DATA (parent->field_history[cur_field_idx].buf); - - g_assert (dm_class->fields_required <= 4); - - if (dm_class->fields_required >= 2) - field1 = GST_BUFFER_DATA (parent->field_history[cur_field_idx + 1].buf); - if (dm_class->fields_required >= 3) - field2 = GST_BUFFER_DATA (parent->field_history[cur_field_idx + 2].buf); - if (dm_class->fields_required >= 4) - field3 = GST_BUFFER_DATA (parent->field_history[cur_field_idx + 3].buf); - - - if (cur_field_flags == PICTURE_INTERLACED_BOTTOM) { - /* double the first scanline of the bottom field */ - oil_memcpy (out, field0, parent->row_stride); - out += parent->row_stride; - } - - oil_memcpy (out, field0, parent->row_stride); - out += parent->row_stride; - - for (line = 2; line <= parent->field_height; line++) { - - memset (&scanlines, 0, sizeof (scanlines)); - scanlines.bottom_field = (cur_field_flags == PICTURE_INTERLACED_BOTTOM); - - /* interp. scanline */ - scanlines.t0 = field0; - scanlines.b0 = field0 + parent->field_stride; - - if (field1 != NULL) { - scanlines.tt1 = field1; - scanlines.m1 = field1 + parent->field_stride; - scanlines.bb1 = field1 + parent->field_stride * 2; - field1 += parent->field_stride; - } - - if (field2 != NULL) { - scanlines.t2 = field2; - scanlines.b2 = field2 + parent->field_stride; - } - - if (field3 != NULL) { - scanlines.tt3 = field3; - scanlines.m3 = field3 + parent->field_stride; - scanlines.bb3 = field3 + parent->field_stride * 2; - field3 += parent->field_stride; - } - - /* set valid data for corner cases */ - if (line == 2) { - scanlines.tt1 = scanlines.bb1; - scanlines.tt3 = scanlines.bb3; - } else if (line == parent->field_height) { - scanlines.bb1 = scanlines.tt1; - scanlines.bb3 = scanlines.tt3; - } - - dsm_class->interpolate_scanline (self, parent, out, &scanlines, - parent->frame_width); - out += parent->row_stride; - - memset (&scanlines, 0, sizeof (scanlines)); - scanlines.bottom_field = (cur_field_flags == PICTURE_INTERLACED_BOTTOM); - - /* copy a scanline */ - scanlines.tt0 = field0; - scanlines.m0 = field0 + parent->field_stride; - scanlines.bb0 = field0 + parent->field_stride * 2; - field0 += parent->field_stride; - - if (field1 != NULL) { - scanlines.t1 = field1; - scanlines.b1 = field1 + parent->field_stride; - } - - if (field2 != NULL) { - scanlines.tt2 = field2; - scanlines.m2 = field2 + parent->field_stride; - scanlines.bb2 = field2 + parent->field_stride * 2; - field2 += parent->field_stride; - } - - if (field3 != NULL) { - scanlines.t3 = field3; - scanlines.b3 = field3 + parent->field_stride; - } - - /* set valid data for corner cases */ - if (line == parent->field_height) { - scanlines.bb0 = scanlines.tt0; - scanlines.b1 = scanlines.t1; - scanlines.bb2 = scanlines.tt2; - scanlines.b3 = scanlines.t3; - } - - dsm_class->copy_scanline (self, parent, out, &scanlines, - parent->frame_width); - out += parent->row_stride; - } - - if (cur_field_flags == PICTURE_INTERLACED_TOP) { - /* double the last scanline of the top field */ - oil_memcpy (out, field0, parent->row_stride); - } -} - -static void -gst_deinterlace_simple_method_class_init (GstDeinterlaceSimpleMethodClass * - klass) -{ - GstDeinterlaceMethodClass *dm_class = (GstDeinterlaceMethodClass *) klass; - - dm_class->deinterlace_frame = gst_deinterlace_simple_method_deinterlace_frame; - dm_class->fields_required = 2; - - klass->interpolate_scanline = - gst_deinterlace_simple_method_interpolate_scanline; - klass->copy_scanline = gst_deinterlace_simple_method_copy_scanline; -} - -static void -gst_deinterlace_simple_method_init (GstDeinterlaceSimpleMethod * self) -{ -} - -#define GST_TYPE_DEINTERLACE2_METHODS (gst_deinterlace2_methods_get_type ()) -static GType -gst_deinterlace2_methods_get_type (void) -{ - static GType deinterlace2_methods_type = 0; - - static const GEnumValue methods_types[] = { - {GST_DEINTERLACE2_TOMSMOCOMP, "Motion Adaptive: Motion Search", - "tomsmocomp"}, - {GST_DEINTERLACE2_GREEDY_H, "Motion Adaptive: Advanced Detection", - "greedyh"}, - {GST_DEINTERLACE2_GREEDY_L, "Motion Adaptive: Simple Detection", "greedyl"}, - {GST_DEINTERLACE2_VFIR, "Blur Vertical", "vfir"}, - {GST_DEINTERLACE2_LINEAR, "Television: Full resolution", "linear"}, - {GST_DEINTERLACE2_LINEAR_BLEND, "Blur: Temporal", "linearblend"}, - {GST_DEINTERLACE2_SCALER_BOB, "Double lines", "scalerbob"}, - {GST_DEINTERLACE2_WEAVE, "Weave", "weave"}, - {GST_DEINTERLACE2_WEAVE_TFF, "Progressive: Top Field First", "weavetff"}, - {GST_DEINTERLACE2_WEAVE_BFF, "Progressive: Bottom Field First", "weavebff"}, - {0, NULL, NULL}, - }; - - if (!deinterlace2_methods_type) { - deinterlace2_methods_type = - g_enum_register_static ("GstDeinterlace2Methods", methods_types); - } - return deinterlace2_methods_type; -} - -#define GST_TYPE_DEINTERLACE2_FIELDS (gst_deinterlace2_fields_get_type ()) -static GType -gst_deinterlace2_fields_get_type (void) -{ - static GType deinterlace2_fields_type = 0; - - static const GEnumValue fields_types[] = { - {GST_DEINTERLACE2_ALL, "All fields", "all"}, - {GST_DEINTERLACE2_TF, "Top fields only", "top"}, - {GST_DEINTERLACE2_BF, "Bottom fields only", "bottom"}, - {0, NULL, NULL}, - }; - - if (!deinterlace2_fields_type) { - deinterlace2_fields_type = - g_enum_register_static ("GstDeinterlace2Fields", fields_types); - } - return deinterlace2_fields_type; -} - -#define GST_TYPE_DEINTERLACE2_FIELD_LAYOUT (gst_deinterlace2_field_layout_get_type ()) -static GType -gst_deinterlace2_field_layout_get_type (void) -{ - static GType deinterlace2_field_layout_type = 0; - - static const GEnumValue field_layout_types[] = { - {GST_DEINTERLACE2_LAYOUT_AUTO, "Auto detection", "auto"}, - {GST_DEINTERLACE2_LAYOUT_TFF, "Top field first", "tff"}, - {GST_DEINTERLACE2_LAYOUT_BFF, "Bottom field first", "bff"}, - {0, NULL, NULL}, - }; - - if (!deinterlace2_field_layout_type) { - deinterlace2_field_layout_type = - g_enum_register_static ("GstDeinterlace2FieldLayout", - field_layout_types); - } - return deinterlace2_field_layout_type; -} - -#define GST_TYPE_DEINTERLACE2_MODES (gst_deinterlace2_modes_get_type ()) -static GType -gst_deinterlace2_modes_get_type (void) -{ - static GType deinterlace2_modes_type = 0; - - static const GEnumValue modes_types[] = { - {GST_DEINTERLACE2_MODE_AUTO, "Auto detection", "auto"}, - {GST_DEINTERLACE2_MODE_INTERLACED, "Enfore deinterlacing", "interlaced"}, - {GST_DEINTERLACE2_MODE_DISABLED, "Run in passthrough mode", "disabled"}, - {0, NULL, NULL}, - }; - - if (!deinterlace2_modes_type) { - deinterlace2_modes_type = - g_enum_register_static ("GstDeinterlace2Modes", modes_types); - } - return deinterlace2_modes_type; -} - -static GstStaticPadTemplate src_templ = GST_STATIC_PAD_TEMPLATE ("src", - GST_PAD_SRC, - GST_PAD_ALWAYS, - GST_STATIC_CAPS (GST_VIDEO_CAPS_YUV ("YUY2") ";" - GST_VIDEO_CAPS_YUV ("YVYU")) - ); - -static GstStaticPadTemplate sink_templ = GST_STATIC_PAD_TEMPLATE ("sink", - GST_PAD_SINK, - GST_PAD_ALWAYS, - GST_STATIC_CAPS (GST_VIDEO_CAPS_YUV ("YUY2") ";" - GST_VIDEO_CAPS_YUV ("YVYU")) - ); - -static void gst_deinterlace2_finalize (GObject * self); -static void gst_deinterlace2_set_property (GObject * self, guint prop_id, - const GValue * value, GParamSpec * pspec); -static void gst_deinterlace2_get_property (GObject * self, guint prop_id, - GValue * value, GParamSpec * pspec); - -static GstCaps *gst_deinterlace2_getcaps (GstPad * pad); -static gboolean gst_deinterlace2_setcaps (GstPad * pad, GstCaps * caps); -static gboolean gst_deinterlace2_sink_event (GstPad * pad, GstEvent * event); -static GstFlowReturn gst_deinterlace2_chain (GstPad * pad, GstBuffer * buffer); -static GstStateChangeReturn gst_deinterlace2_change_state (GstElement * element, - GstStateChange transition); - -static gboolean gst_deinterlace2_src_event (GstPad * pad, GstEvent * event); -static gboolean gst_deinterlace2_src_query (GstPad * pad, GstQuery * query); -static const GstQueryType *gst_deinterlace2_src_query_types (GstPad * pad); - -static void gst_deinterlace2_reset (GstDeinterlace2 * self); - -static void gst_deinterlace2_child_proxy_interface_init (gpointer g_iface, - gpointer iface_data); - -static void -_do_init (GType object_type) -{ - const GInterfaceInfo child_proxy_interface_info = { - (GInterfaceInitFunc) gst_deinterlace2_child_proxy_interface_init, - NULL, /* interface_finalize */ - NULL /* interface_data */ - }; - - g_type_add_interface_static (object_type, GST_TYPE_CHILD_PROXY, - &child_proxy_interface_info); -} - -GST_BOILERPLATE_FULL (GstDeinterlace2, gst_deinterlace2, GstElement, - GST_TYPE_ELEMENT, _do_init); - -static void -gst_deinterlace2_set_method (GstDeinterlace2 * self, - GstDeinterlace2Methods method) -{ - - if (self->method) { - gst_child_proxy_child_removed (GST_OBJECT (self), - GST_OBJECT (self->method)); - gst_object_unparent (GST_OBJECT (self->method)); - self->method = NULL; - } - - switch (method) { - case GST_DEINTERLACE2_TOMSMOCOMP: - self->method = g_object_new (GST_TYPE_DEINTERLACE_TOMSMOCOMP, NULL); - break; - case GST_DEINTERLACE2_GREEDY_H: - self->method = g_object_new (GST_TYPE_DEINTERLACE_GREEDY_H, NULL); - break; - case GST_DEINTERLACE2_GREEDY_L: - self->method = g_object_new (GST_TYPE_DEINTERLACE_GREEDY_L, NULL); - break; - case GST_DEINTERLACE2_VFIR: - self->method = g_object_new (GST_TYPE_DEINTERLACE_VFIR, NULL); - break; - case GST_DEINTERLACE2_LINEAR: - self->method = g_object_new (GST_TYPE_DEINTERLACE_LINEAR, NULL); - break; - case GST_DEINTERLACE2_LINEAR_BLEND: - self->method = g_object_new (GST_TYPE_DEINTERLACE_LINEAR_BLEND, NULL); - break; - case GST_DEINTERLACE2_SCALER_BOB: - self->method = g_object_new (GST_TYPE_DEINTERLACE_SCALER_BOB, NULL); - break; - case GST_DEINTERLACE2_WEAVE: - self->method = g_object_new (GST_TYPE_DEINTERLACE_WEAVE, NULL); - break; - case GST_DEINTERLACE2_WEAVE_TFF: - self->method = g_object_new (GST_TYPE_DEINTERLACE_WEAVE_TFF, NULL); - break; - case GST_DEINTERLACE2_WEAVE_BFF: - self->method = g_object_new (GST_TYPE_DEINTERLACE_WEAVE_BFF, NULL); - break; - default: - GST_WARNING_OBJECT (self, "Invalid Deinterlacer Method"); - return; - } - - self->method_id = method; - - gst_object_set_name (GST_OBJECT (self->method), "method"); - gst_object_set_parent (GST_OBJECT (self->method), GST_OBJECT (self)); - gst_child_proxy_child_added (GST_OBJECT (self), GST_OBJECT (self->method)); -} - -static void -gst_deinterlace2_base_init (gpointer klass) -{ - GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_templ)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_templ)); - - gst_element_class_set_details_simple (element_class, - "Deinterlacer", - "Filter/Video", - "Deinterlace Methods ported from DScaler/TvTime", - "Martin Eikermann , " - "Sebastian Dröge "); -} - -static void -gst_deinterlace2_class_init (GstDeinterlace2Class * klass) -{ - GObjectClass *gobject_class = (GObjectClass *) klass; - - GstElementClass *element_class = (GstElementClass *) klass; - - gobject_class->set_property = gst_deinterlace2_set_property; - gobject_class->get_property = gst_deinterlace2_get_property; - gobject_class->finalize = gst_deinterlace2_finalize; - - /** - * GstDeinterlace2:mode - * - * This selects whether the deinterlacing methods should - * always be applied or if they should only be applied - * on content that has the "interlaced" flag on the caps. - * - */ - g_object_class_install_property (gobject_class, PROP_MODE, - g_param_spec_enum ("mode", - "Mode", - "Deinterlace Mode", - GST_TYPE_DEINTERLACE2_MODES, - DEFAULT_MODE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS) - ); - - /** - * GstDeinterlace2:method - * - * Selects the different deinterlacing algorithms that can be used. - * These provide different quality and CPU usage. - * - * Some methods provide parameters which can be set by getting - * the "method" child via the #GstChildProxy interface and - * setting the appropiate properties on it. - * - * - * - * - * tomsmocomp - * Motion Adaptive: Motion Search - * - * - * - * - * greedyh - * Motion Adaptive: Advanced Detection - * - * - * - * - * greedyl - * Motion Adaptive: Simple Detection - * - * - * - * - * vfir - * Blur vertical - * - * - * - * - * linear - * Linear interpolation - * - * - * - * - * linearblend - * Linear interpolation in time domain - * - * - * - * - * scalerbob - * Double lines - * - * - * - * - * weave - * Weave - * - * - * - * - * weavetff - * Progressive: Top Field First - * - * - * - * - * weavebff - * Progressive: Bottom Field First - * - * - * - */ - g_object_class_install_property (gobject_class, PROP_METHOD, - g_param_spec_enum ("method", - "Method", - "Deinterlace Method", - GST_TYPE_DEINTERLACE2_METHODS, - DEFAULT_METHOD, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS) - ); - - /** - * GstDeinterlace2:fields - * - * This selects which fields should be output. If "all" is selected - * the output framerate will be double. - * - */ - g_object_class_install_property (gobject_class, PROP_FIELDS, - g_param_spec_enum ("fields", - "fields", - "Fields to use for deinterlacing", - GST_TYPE_DEINTERLACE2_FIELDS, - DEFAULT_FIELDS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS) - ); - - /** - * GstDeinterlace2:layout - * - * This selects which fields is the first in time. - * - */ - g_object_class_install_property (gobject_class, PROP_FIELD_LAYOUT, - g_param_spec_enum ("tff", - "tff", - "Deinterlace top field first", - GST_TYPE_DEINTERLACE2_FIELD_LAYOUT, - DEFAULT_FIELD_LAYOUT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS) - ); - - element_class->change_state = - GST_DEBUG_FUNCPTR (gst_deinterlace2_change_state); -} - -static GstObject * -gst_deinterlace2_child_proxy_get_child_by_index (GstChildProxy * child_proxy, - guint index) -{ - GstDeinterlace2 *self = GST_DEINTERLACE2 (child_proxy); - - g_return_val_if_fail (index == 0, NULL); - - return gst_object_ref (self->method); -} - -static guint -gst_deinterlace2_child_proxy_get_children_count (GstChildProxy * child_proxy) -{ - return 1; -} - -static void -gst_deinterlace2_child_proxy_interface_init (gpointer g_iface, - gpointer iface_data) -{ - GstChildProxyInterface *iface = g_iface; - - iface->get_child_by_index = gst_deinterlace2_child_proxy_get_child_by_index; - iface->get_children_count = gst_deinterlace2_child_proxy_get_children_count; -} - -static void -gst_deinterlace2_init (GstDeinterlace2 * self, GstDeinterlace2Class * klass) -{ - self->sinkpad = gst_pad_new_from_static_template (&sink_templ, "sink"); - gst_pad_set_chain_function (self->sinkpad, - GST_DEBUG_FUNCPTR (gst_deinterlace2_chain)); - gst_pad_set_event_function (self->sinkpad, - GST_DEBUG_FUNCPTR (gst_deinterlace2_sink_event)); - gst_pad_set_setcaps_function (self->sinkpad, - GST_DEBUG_FUNCPTR (gst_deinterlace2_setcaps)); - gst_pad_set_getcaps_function (self->sinkpad, - GST_DEBUG_FUNCPTR (gst_deinterlace2_getcaps)); - gst_element_add_pad (GST_ELEMENT (self), self->sinkpad); - - self->srcpad = gst_pad_new_from_static_template (&src_templ, "src"); - gst_pad_set_event_function (self->srcpad, - GST_DEBUG_FUNCPTR (gst_deinterlace2_src_event)); - gst_pad_set_query_type_function (self->srcpad, - GST_DEBUG_FUNCPTR (gst_deinterlace2_src_query_types)); - gst_pad_set_query_function (self->srcpad, - GST_DEBUG_FUNCPTR (gst_deinterlace2_src_query)); - gst_pad_set_setcaps_function (self->srcpad, - GST_DEBUG_FUNCPTR (gst_deinterlace2_setcaps)); - gst_pad_set_getcaps_function (self->srcpad, - GST_DEBUG_FUNCPTR (gst_deinterlace2_getcaps)); - gst_element_add_pad (GST_ELEMENT (self), self->srcpad); - - gst_element_no_more_pads (GST_ELEMENT (self)); - - self->mode = DEFAULT_MODE; - gst_deinterlace2_set_method (self, DEFAULT_METHOD); - self->fields = DEFAULT_FIELDS; - self->field_layout = DEFAULT_FIELD_LAYOUT; - - gst_deinterlace2_reset (self); -} - -static void -gst_deinterlace2_reset_history (GstDeinterlace2 * self) -{ - gint i; - - for (i = 0; i < self->history_count; i++) { - if (self->field_history[i].buf) { - gst_buffer_unref (self->field_history[i].buf); - self->field_history[i].buf = NULL; - } - } - memset (self->field_history, 0, MAX_FIELD_HISTORY * sizeof (GstPicture)); - self->history_count = 0; -} - -static void -gst_deinterlace2_reset (GstDeinterlace2 * self) -{ - self->row_stride = 0; - self->frame_width = 0; - self->frame_height = 0; - self->frame_rate_n = 0; - self->frame_rate_d = 0; - self->field_height = 0; - self->field_stride = 0; - - gst_deinterlace2_reset_history (self); -} - -static void -gst_deinterlace2_set_property (GObject * object, guint prop_id, - const GValue * value, GParamSpec * pspec) -{ - GstDeinterlace2 *self; - - g_return_if_fail (GST_IS_DEINTERLACE2 (object)); - self = GST_DEINTERLACE2 (object); - - switch (prop_id) { - case PROP_MODE:{ - gint oldmode; - - GST_OBJECT_LOCK (self); - oldmode = self->mode; - self->mode = g_value_get_enum (value); - if (self->mode != oldmode && GST_PAD_CAPS (self->srcpad)) - gst_deinterlace2_setcaps (self->sinkpad, GST_PAD_CAPS (self->sinkpad)); - GST_OBJECT_UNLOCK (self); - break; - } - case PROP_METHOD: - gst_deinterlace2_set_method (self, g_value_get_enum (value)); - break; - case PROP_FIELDS:{ - gint oldfields; - - GST_OBJECT_LOCK (self); - oldfields = self->fields; - self->fields = g_value_get_enum (value); - if (self->fields != oldfields && GST_PAD_CAPS (self->srcpad)) - gst_deinterlace2_setcaps (self->sinkpad, GST_PAD_CAPS (self->sinkpad)); - GST_OBJECT_UNLOCK (self); - break; - } - case PROP_FIELD_LAYOUT: - self->field_layout = g_value_get_enum (value); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec); - } - -} - -static void -gst_deinterlace2_get_property (GObject * object, guint prop_id, - GValue * value, GParamSpec * pspec) -{ - GstDeinterlace2 *self; - - g_return_if_fail (GST_IS_DEINTERLACE2 (object)); - self = GST_DEINTERLACE2 (object); - - switch (prop_id) { - case PROP_MODE: - g_value_set_enum (value, self->mode); - break; - case PROP_METHOD: - g_value_set_enum (value, self->method_id); - break; - case PROP_FIELDS: - g_value_set_enum (value, self->fields); - break; - case PROP_FIELD_LAYOUT: - g_value_set_enum (value, self->field_layout); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec); - } -} - -static void -gst_deinterlace2_finalize (GObject * object) -{ - GstDeinterlace2 *self = GST_DEINTERLACE2 (object); - - gst_deinterlace2_reset (self); - - if (self->method) { - gst_object_unparent (GST_OBJECT (self->method)); - self->method = NULL; - } - - G_OBJECT_CLASS (parent_class)->finalize (object); -} - -static GstBuffer * -gst_deinterlace2_pop_history (GstDeinterlace2 * self) -{ - GstBuffer *buffer = NULL; - - g_assert (self->history_count > 0); - - buffer = self->field_history[self->history_count - 1].buf; - - self->history_count--; - GST_DEBUG_OBJECT (self, "pop, size(history): %d", self->history_count); - - return buffer; -} - -#if 0 -static GstBuffer * -gst_deinterlace2_head_history (GstDeinterlace2 * self) -{ - return self->field_history[self->history_count - 1].buf; -} -#endif - - -/* invariant: field with smallest timestamp is self->field_history[self->history_count-1] - -*/ - -static void -gst_deinterlace2_push_history (GstDeinterlace2 * self, GstBuffer * buffer) -{ - int i = 1; - GstClockTime timestamp; - GstDeinterlace2FieldLayout field_layout = self->field_layout; - gboolean repeated = GST_BUFFER_FLAG_IS_SET (buffer, GST_VIDEO_BUFFER_RFF); - gboolean tff = GST_BUFFER_FLAG_IS_SET (buffer, GST_VIDEO_BUFFER_TFF); - gboolean onefield = - GST_BUFFER_FLAG_IS_SET (buffer, GST_VIDEO_BUFFER_ONEFIELD); - GstBuffer *field1, *field2; - guint fields_to_push = (onefield) ? 1 : (!repeated) ? 2 : 3; - gint field1_flags, field2_flags; - - g_assert (self->history_count < MAX_FIELD_HISTORY - fields_to_push); - - for (i = MAX_FIELD_HISTORY - 1; i >= fields_to_push; i--) { - self->field_history[i].buf = self->field_history[i - fields_to_push].buf; - self->field_history[i].flags = - self->field_history[i - fields_to_push].flags; - } - - if (field_layout == GST_DEINTERLACE2_LAYOUT_AUTO) { - if (!self->interlaced) { - GST_WARNING_OBJECT (self, "Can't detect field layout -- assuming TFF"); - field_layout = GST_DEINTERLACE2_LAYOUT_TFF; - } else if (tff) { - field_layout = GST_DEINTERLACE2_LAYOUT_TFF; - } else { - field_layout = GST_DEINTERLACE2_LAYOUT_BFF; - } - } - - if (field_layout == GST_DEINTERLACE2_LAYOUT_TFF) { - GST_DEBUG_OBJECT (self, "Top field first"); - field1 = gst_buffer_ref (buffer); - field1_flags = PICTURE_INTERLACED_TOP; - field2 = gst_buffer_create_sub (buffer, self->row_stride, - GST_BUFFER_SIZE (buffer) - self->row_stride); - field2_flags = PICTURE_INTERLACED_BOTTOM; - } else { - GST_DEBUG_OBJECT (self, "Bottom field first"); - field1 = gst_buffer_create_sub (buffer, self->row_stride, - GST_BUFFER_SIZE (buffer) - self->row_stride); - field1_flags = PICTURE_INTERLACED_BOTTOM; - field2 = gst_buffer_ref (buffer); - field2_flags = PICTURE_INTERLACED_TOP; - } - - /* Timestamps are assigned to the field buffers under the assumption that - the timestamp of the buffer equals the first fields timestamp */ - - timestamp = GST_BUFFER_TIMESTAMP (buffer); - GST_BUFFER_TIMESTAMP (field1) = timestamp; - GST_BUFFER_TIMESTAMP (field2) = timestamp + self->field_duration; - if (repeated) - GST_BUFFER_TIMESTAMP (field2) += self->field_duration; - - if (repeated) { - self->field_history[0].buf = field2; - self->field_history[0].flags = field2_flags; - self->field_history[1].buf = gst_buffer_ref (field1); - GST_BUFFER_TIMESTAMP (self->field_history[1].buf) += self->field_duration; - self->field_history[1].flags = field1_flags; - self->field_history[2].buf = field1; - self->field_history[2].flags = field1_flags; - } else if (!onefield) { - self->field_history[0].buf = field2; - self->field_history[0].flags = field2_flags; - self->field_history[1].buf = field1; - self->field_history[1].flags = field1_flags; - } else { /* onefield */ - self->field_history[0].buf = field1; - self->field_history[0].flags = field1_flags; - gst_buffer_unref (field2); - } - - self->history_count += fields_to_push; - GST_DEBUG_OBJECT (self, "push, size(history): %d", self->history_count); - - gst_buffer_unref (buffer); -} - -static GstFlowReturn -gst_deinterlace2_chain (GstPad * pad, GstBuffer * buf) -{ - GstDeinterlace2 *self = NULL; - GstClockTime timestamp; - GstFlowReturn ret = GST_FLOW_OK; - gint fields_required = 0; - gint cur_field_idx = 0; - GstBuffer *outbuf; - - self = GST_DEINTERLACE2 (GST_PAD_PARENT (pad)); - - if (self->mode == GST_DEINTERLACE2_MODE_DISABLED || (!self->interlaced - && self->mode != GST_DEINTERLACE2_MODE_INTERLACED)) - return gst_pad_push (self->srcpad, buf); - - if (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DISCONT)) { - GST_DEBUG_OBJECT (self, "DISCONT buffer, resetting history"); - gst_deinterlace2_reset_history (self); - } - - gst_deinterlace2_push_history (self, buf); - buf = NULL; - - fields_required = gst_deinterlace_method_get_fields_required (self->method); - - /* Not enough fields in the history */ - if (self->history_count < fields_required + 1) { - /* TODO: do bob or just forward frame */ - GST_DEBUG_OBJECT (self, "HistoryCount=%d", self->history_count); - return GST_FLOW_OK; - } - - while (self->history_count >= fields_required) { - if (self->fields == GST_DEINTERLACE2_ALL) - GST_DEBUG_OBJECT (self, "All fields"); - if (self->fields == GST_DEINTERLACE2_TF) - GST_DEBUG_OBJECT (self, "Top fields"); - if (self->fields == GST_DEINTERLACE2_BF) - GST_DEBUG_OBJECT (self, "Bottom fields"); - - cur_field_idx = self->history_count - fields_required; - - if ((self->field_history[cur_field_idx].flags == PICTURE_INTERLACED_TOP - && self->fields == GST_DEINTERLACE2_TF) || - self->fields == GST_DEINTERLACE2_ALL) { - GST_DEBUG_OBJECT (self, "deinterlacing top field"); - - /* create new buffer */ - ret = gst_pad_alloc_buffer_and_set_caps (self->srcpad, - GST_BUFFER_OFFSET_NONE, self->frame_size, - GST_PAD_CAPS (self->srcpad), &outbuf); - if (ret != GST_FLOW_OK) - return ret; - - /* do magic calculus */ - gst_deinterlace_method_deinterlace_frame (self->method, self, outbuf); - - g_assert (self->history_count - 1 - - gst_deinterlace_method_get_latency (self->method) >= 0); - buf = - self->field_history[self->history_count - 1 - - gst_deinterlace_method_get_latency (self->method)].buf; - timestamp = GST_BUFFER_TIMESTAMP (buf); - - gst_buffer_unref (gst_deinterlace2_pop_history (self)); - - GST_BUFFER_TIMESTAMP (outbuf) = timestamp; - if (self->fields == GST_DEINTERLACE2_ALL) - GST_BUFFER_DURATION (outbuf) = self->field_duration; - else - GST_BUFFER_DURATION (outbuf) = 2 * self->field_duration; - - ret = gst_pad_push (self->srcpad, outbuf); - outbuf = NULL; - if (ret != GST_FLOW_OK) - return ret; - } - /* no calculation done: remove excess field */ - else if (self->field_history[cur_field_idx].flags == - PICTURE_INTERLACED_TOP && self->fields == GST_DEINTERLACE2_BF) { - GST_DEBUG_OBJECT (self, "Removing unused top field"); - gst_buffer_unref (gst_deinterlace2_pop_history (self)); - } - - cur_field_idx = self->history_count - fields_required; - if (self->history_count < fields_required) - break; - - /* deinterlace bottom_field */ - if ((self->field_history[cur_field_idx].flags == PICTURE_INTERLACED_BOTTOM - && self->fields == GST_DEINTERLACE2_BF) || - self->fields == GST_DEINTERLACE2_ALL) { - GST_DEBUG_OBJECT (self, "deinterlacing bottom field"); - - /* create new buffer */ - ret = gst_pad_alloc_buffer_and_set_caps (self->srcpad, - GST_BUFFER_OFFSET_NONE, self->frame_size, - GST_PAD_CAPS (self->srcpad), &outbuf); - if (ret != GST_FLOW_OK) - return ret; - - /* do magic calculus */ - gst_deinterlace_method_deinterlace_frame (self->method, self, outbuf); - - g_assert (self->history_count - 1 - - gst_deinterlace_method_get_latency (self->method) >= 0); - buf = - self->field_history[self->history_count - 1 - - gst_deinterlace_method_get_latency (self->method)].buf; - timestamp = GST_BUFFER_TIMESTAMP (buf); - - gst_buffer_unref (gst_deinterlace2_pop_history (self)); - - GST_BUFFER_TIMESTAMP (outbuf) = timestamp; - if (self->fields == GST_DEINTERLACE2_ALL) - GST_BUFFER_DURATION (outbuf) = self->field_duration; - else - GST_BUFFER_DURATION (outbuf) = 2 * self->field_duration; - - ret = gst_pad_push (self->srcpad, outbuf); - outbuf = NULL; - - if (ret != GST_FLOW_OK) - return ret; - } - /* no calculation done: remove excess field */ - else if (self->field_history[cur_field_idx].flags == - PICTURE_INTERLACED_BOTTOM && self->fields == GST_DEINTERLACE2_TF) { - GST_DEBUG_OBJECT (self, "Removing unused bottom field"); - gst_buffer_unref (gst_deinterlace2_pop_history (self)); - } - } - - GST_DEBUG_OBJECT (self, "----chain end ----\n\n"); - - return ret; -} - -static gint -gst_greatest_common_divisor (gint a, gint b) -{ - while (b != 0) { - int temp = a; - - a = b; - b = temp % b; - } - - return ABS (a); -} - -static gboolean -gst_fraction_double (gint * n_out, gint * d_out, gboolean half) -{ - gint n, d, gcd; - - n = *n_out; - d = *d_out; - - if (d == 0) - return FALSE; - - if (n == 0 || (n == G_MAXINT && d == 1)) - return TRUE; - - gcd = gst_greatest_common_divisor (n, d); - n /= gcd; - d /= gcd; - - if (!half) { - if (G_MAXINT / 2 >= ABS (n)) { - n *= 2; - } else if (d >= 2) { - d /= 2; - } else { - return FALSE; - } - } else { - if (G_MAXINT / 2 >= ABS (d)) { - d *= 2; - } else if (n >= 2) { - n /= 2; - } else { - return FALSE; - } - } - - *n_out = n; - *d_out = d; - - return TRUE; -} - -static GstCaps * -gst_deinterlace2_getcaps (GstPad * pad) -{ - GstCaps *ret; - GstDeinterlace2 *self = GST_DEINTERLACE2 (gst_pad_get_parent (pad)); - GstPad *otherpad; - gint len; - const GstCaps *ourcaps; - GstCaps *peercaps; - - GST_OBJECT_LOCK (self); - - otherpad = (pad == self->srcpad) ? self->sinkpad : self->srcpad; - - ourcaps = gst_pad_get_pad_template_caps (pad); - peercaps = gst_pad_peer_get_caps (otherpad); - - if (peercaps) { - ret = gst_caps_intersect (ourcaps, peercaps); - gst_caps_unref (peercaps); - } else { - ret = gst_caps_copy (ourcaps); - } - - GST_OBJECT_UNLOCK (self); - - if ((self->interlaced || self->mode == GST_DEINTERLACE2_MODE_INTERLACED) && - self->fields == GST_DEINTERLACE2_ALL - && self->mode != GST_DEINTERLACE2_MODE_DISABLED) { - for (len = gst_caps_get_size (ret); len > 0; len--) { - GstStructure *s = gst_caps_get_structure (ret, len - 1); - const GValue *val; - - val = gst_structure_get_value (s, "framerate"); - if (!val) - continue; - - if (G_VALUE_TYPE (val) == GST_TYPE_FRACTION) { - gint n, d; - - n = gst_value_get_fraction_numerator (val); - d = gst_value_get_fraction_denominator (val); - - if (!gst_fraction_double (&n, &d, pad != self->srcpad)) { - goto error; - } - - gst_structure_set (s, "framerate", GST_TYPE_FRACTION, n, d, NULL); - } else if (G_VALUE_TYPE (val) == GST_TYPE_FRACTION_RANGE) { - const GValue *min, *max; - GValue nrange = { 0, }, nmin = { - 0,}, nmax = { - 0,}; - gint n, d; - - g_value_init (&nrange, GST_TYPE_FRACTION_RANGE); - g_value_init (&nmin, GST_TYPE_FRACTION); - g_value_init (&nmax, GST_TYPE_FRACTION); - - min = gst_value_get_fraction_range_min (val); - max = gst_value_get_fraction_range_max (val); - - n = gst_value_get_fraction_numerator (min); - d = gst_value_get_fraction_denominator (min); - - if (!gst_fraction_double (&n, &d, pad != self->srcpad)) { - g_value_unset (&nrange); - g_value_unset (&nmax); - g_value_unset (&nmin); - goto error; - } - - gst_value_set_fraction (&nmin, n, d); - - n = gst_value_get_fraction_numerator (max); - d = gst_value_get_fraction_denominator (max); - - if (!gst_fraction_double (&n, &d, pad != self->srcpad)) { - g_value_unset (&nrange); - g_value_unset (&nmax); - g_value_unset (&nmin); - goto error; - } - - gst_value_set_fraction (&nmax, n, d); - gst_value_set_fraction_range (&nrange, &nmin, &nmax); - - gst_structure_set_value (s, "framerate", &nrange); - - g_value_unset (&nmin); - g_value_unset (&nmax); - g_value_unset (&nrange); - } else if (G_VALUE_TYPE (val) == GST_TYPE_LIST) { - const GValue *lval; - GValue nlist = { 0, }; - GValue nval = { 0, }; - gint i; - - g_value_init (&nlist, GST_TYPE_LIST); - for (i = gst_value_list_get_size (val); i > 0; i--) { - gint n, d; - - lval = gst_value_list_get_value (val, i); - - if (G_VALUE_TYPE (lval) != GST_TYPE_FRACTION) - continue; - - n = gst_value_get_fraction_numerator (lval); - d = gst_value_get_fraction_denominator (lval); - - /* Double/Half the framerate but if this fails simply - * skip this value from the list */ - if (!gst_fraction_double (&n, &d, pad != self->srcpad)) { - continue; - } - - g_value_init (&nval, GST_TYPE_FRACTION); - - gst_value_set_fraction (&nval, n, d); - gst_value_list_append_value (&nlist, &nval); - g_value_unset (&nval); - } - gst_structure_set_value (s, "framerate", &nlist); - g_value_unset (&nlist); - } - } - } - - GST_DEBUG_OBJECT (pad, "Returning caps %" GST_PTR_FORMAT, ret); - - return ret; - -error: - GST_ERROR_OBJECT (pad, "Unable to transform peer caps"); - gst_caps_unref (ret); - return NULL; -} - -static gboolean -gst_deinterlace2_setcaps (GstPad * pad, GstCaps * caps) -{ - gboolean res = TRUE; - GstDeinterlace2 *self = GST_DEINTERLACE2 (gst_pad_get_parent (pad)); - GstPad *otherpad; - GstStructure *structure; - GstVideoFormat fmt; - guint32 fourcc; - GstCaps *othercaps; - - otherpad = (pad == self->srcpad) ? self->sinkpad : self->srcpad; - - structure = gst_caps_get_structure (caps, 0); - - res = gst_structure_get_int (structure, "width", &self->frame_width); - res &= gst_structure_get_int (structure, "height", &self->frame_height); - res &= - gst_structure_get_fraction (structure, "framerate", &self->frame_rate_n, - &self->frame_rate_d); - res &= gst_structure_get_fourcc (structure, "format", &fourcc); - res &= gst_video_format_parse_caps_interlaced (caps, &self->interlaced); - if (!res) - goto invalid_caps; - - if ((self->interlaced || self->mode == GST_DEINTERLACE2_MODE_INTERLACED) && - self->fields == GST_DEINTERLACE2_ALL - && self->mode != GST_DEINTERLACE2_MODE_DISABLED) { - gint fps_n = self->frame_rate_n, fps_d = self->frame_rate_d; - - if (!gst_fraction_double (&fps_n, &fps_d, otherpad != self->srcpad)) - goto invalid_caps; - - othercaps = gst_caps_copy (caps); - - gst_caps_set_simple (othercaps, "framerate", GST_TYPE_FRACTION, fps_n, - fps_d, NULL); - } else { - othercaps = gst_caps_ref (caps); - } - - if (!gst_pad_set_caps (otherpad, othercaps)) - goto caps_not_accepted; - gst_caps_unref (othercaps); - - self->field_height = self->frame_height / 2; - - fmt = gst_video_format_from_fourcc (fourcc); - - /* TODO: only true if fields are subbuffers of interlaced frames, - change when the buffer-fields concept has landed */ - self->field_stride = - gst_video_format_get_row_stride (fmt, 0, self->frame_width) * 2; - - /* in bytes */ - self->row_stride = - gst_video_format_get_row_stride (fmt, 0, self->frame_width); - self->frame_size = - gst_video_format_get_size (fmt, self->frame_width, self->frame_height); - - if (self->fields == GST_DEINTERLACE2_ALL && otherpad == self->srcpad) - self->field_duration = - gst_util_uint64_scale (GST_SECOND, self->frame_rate_d, - self->frame_rate_n); - else - self->field_duration = - gst_util_uint64_scale (GST_SECOND, self->frame_rate_d, - 2 * self->frame_rate_n); - - GST_DEBUG_OBJECT (self, "Set caps: %" GST_PTR_FORMAT, caps); - -done: - - gst_object_unref (self); - return res; - -invalid_caps: - res = FALSE; - GST_ERROR_OBJECT (pad, "Invalid caps: %" GST_PTR_FORMAT, caps); - goto done; - -caps_not_accepted: - res = FALSE; - GST_ERROR_OBJECT (pad, "Caps not accepted: %" GST_PTR_FORMAT, othercaps); - gst_caps_unref (othercaps); - goto done; -} - -static gboolean -gst_deinterlace2_sink_event (GstPad * pad, GstEvent * event) -{ - gboolean res = TRUE; - GstDeinterlace2 *self = GST_DEINTERLACE2 (gst_pad_get_parent (pad)); - - GST_LOG_OBJECT (pad, "received %s event", GST_EVENT_TYPE_NAME (event)); - - switch (GST_EVENT_TYPE (event)) { - case GST_EVENT_FLUSH_STOP: - case GST_EVENT_EOS: - case GST_EVENT_NEWSEGMENT: - gst_deinterlace2_reset_history (self); - - /* fall through */ - default: - res = gst_pad_event_default (pad, event); - break; - } - - gst_object_unref (self); - return res; -} - -static GstStateChangeReturn -gst_deinterlace2_change_state (GstElement * element, GstStateChange transition) -{ - GstStateChangeReturn ret; - GstDeinterlace2 *self = GST_DEINTERLACE2 (element); - - switch (transition) { - case GST_STATE_CHANGE_NULL_TO_READY: - break; - case GST_STATE_CHANGE_READY_TO_PAUSED: - break; - case GST_STATE_CHANGE_PAUSED_TO_PLAYING: - break; - default: - break; - } - - ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); - if (ret != GST_STATE_CHANGE_SUCCESS) - return ret; - - switch (transition) { - case GST_STATE_CHANGE_PLAYING_TO_PAUSED: - break; - case GST_STATE_CHANGE_PAUSED_TO_READY: - gst_deinterlace2_reset (self); - break; - case GST_STATE_CHANGE_READY_TO_NULL: - default: - break; - } - - return ret; -} - -static gboolean -gst_deinterlace2_src_event (GstPad * pad, GstEvent * event) -{ - GstDeinterlace2 *self = GST_DEINTERLACE2 (gst_pad_get_parent (pad)); - gboolean res; - - GST_DEBUG_OBJECT (pad, "received %s event", GST_EVENT_TYPE_NAME (event)); - - switch (GST_EVENT_TYPE (event)) { - default: - res = gst_pad_event_default (pad, event); - break; - } - - gst_object_unref (self); - - return res; -} - -static gboolean -gst_deinterlace2_src_query (GstPad * pad, GstQuery * query) -{ - GstDeinterlace2 *self = GST_DEINTERLACE2 (gst_pad_get_parent (pad)); - gboolean res = FALSE; - - GST_LOG_OBJECT (self, "%s query", GST_QUERY_TYPE_NAME (query)); - - switch (GST_QUERY_TYPE (query)) { - case GST_QUERY_LATENCY: - if ((self->interlaced || self->mode == GST_DEINTERLACE2_MODE_INTERLACED) - && self->mode != GST_DEINTERLACE2_MODE_DISABLED) { - GstClockTime min, max; - gboolean live; - GstPad *peer; - - if ((peer = gst_pad_get_peer (self->sinkpad))) { - if ((res = gst_pad_query (peer, query))) { - GstClockTime latency; - gint fields_required = 0; - gint method_latency = 0; - - if (self->method) { - fields_required = - gst_deinterlace_method_get_fields_required (self->method); - method_latency = - gst_deinterlace_method_get_latency (self->method); - } - - gst_query_parse_latency (query, &live, &min, &max); - - GST_DEBUG_OBJECT (self, "Peer latency: min %" - GST_TIME_FORMAT " max %" GST_TIME_FORMAT, - GST_TIME_ARGS (min), GST_TIME_ARGS (max)); - - /* add our own latency */ - latency = (fields_required + method_latency) * self->field_duration; - - GST_DEBUG_OBJECT (self, "Our latency: min %" GST_TIME_FORMAT - ", max %" GST_TIME_FORMAT, - GST_TIME_ARGS (latency), GST_TIME_ARGS (latency)); - - min += latency; - if (max != GST_CLOCK_TIME_NONE) - max += latency; - else - max = latency; - - GST_DEBUG_OBJECT (self, "Calculated total latency : min %" - GST_TIME_FORMAT " max %" GST_TIME_FORMAT, - GST_TIME_ARGS (min), GST_TIME_ARGS (max)); - - gst_query_set_latency (query, live, min, max); - } - gst_object_unref (peer); - } else { - res = gst_pad_query_default (pad, query); - } - break; - } - default: - res = gst_pad_query_default (pad, query); - break; - } - - gst_object_unref (self); - return res; -} - -static const GstQueryType * -gst_deinterlace2_src_query_types (GstPad * pad) -{ - static const GstQueryType types[] = { - GST_QUERY_LATENCY, - GST_QUERY_NONE - }; - return types; -} - -static gboolean -plugin_init (GstPlugin * plugin) -{ - GST_DEBUG_CATEGORY_INIT (deinterlace2_debug, "deinterlace2", 0, - "Deinterlacer"); - - oil_init (); - - if (!gst_element_register (plugin, "deinterlace2", GST_RANK_NONE, - GST_TYPE_DEINTERLACE2)) { - return FALSE; - } - - return TRUE; -} - -GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, - GST_VERSION_MINOR, - "deinterlace2", - "Deinterlacer", plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, - GST_PACKAGE_ORIGIN); diff --git a/gst/deinterlace2/gstdeinterlace2.h b/gst/deinterlace2/gstdeinterlace2.h deleted file mode 100644 index 7a08d411..00000000 --- a/gst/deinterlace2/gstdeinterlace2.h +++ /dev/null @@ -1,259 +0,0 @@ -/* - * GStreamer - * Copyright (C) 2005 Martin Eikermann - * Copyright (C) 2008-2009 Sebastian Dröge - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __GST_DEINTERLACE_2_H__ -#define __GST_DEINTERLACE_2_H__ - -#include -#include -#include -#include -#include - -#ifdef HAVE_GCC_ASM -#if defined(HAVE_CPU_I386) || defined(HAVE_CPU_X86_64) -#define BUILD_X86_ASM -#endif -#endif - -G_BEGIN_DECLS - -#define GST_TYPE_DEINTERLACE2 \ - (gst_deinterlace2_get_type()) -#define GST_DEINTERLACE2(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DEINTERLACE2,GstDeinterlace2)) -#define GST_DEINTERLACE2_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DEINTERLACE2,GstDeinterlace2)) -#define GST_IS_DEINTERLACE2(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DEINTERLACE2)) -#define GST_IS_DEINTERLACE2_CLASS(obj) \ - (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DEINTERLACE2)) - -typedef struct _GstDeinterlace2 GstDeinterlace2; -typedef struct _GstDeinterlace2Class GstDeinterlace2Class; - -#define GST_TYPE_DEINTERLACE_METHOD (gst_deinterlace_method_get_type ()) -#define GST_IS_DEINTERLACE_METHOD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DEINTERLACE_METHOD)) -#define GST_IS_DEINTERLACE_METHOD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_DEINTERLACE_METHOD)) -#define GST_DEINTERLACE_METHOD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_DEINTERLACE_METHOD, GstDeinterlaceMethodClass)) -#define GST_DEINTERLACE_METHOD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_DEINTERLACE_METHOD, GstDeinterlaceMethod)) -#define GST_DEINTERLACE_METHOD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEINTERLACE_METHOD, GstDeinterlaceMethodClass)) -#define GST_DEINTERLACE_METHOD_CAST(obj) ((GstDeinterlaceMethod*)(obj)) - -typedef struct _GstDeinterlaceMethod GstDeinterlaceMethod; -typedef struct _GstDeinterlaceMethodClass GstDeinterlaceMethodClass; - -/* - * This structure defines the deinterlacer plugin. - */ - -struct _GstDeinterlaceMethod { - GstObject parent; -}; - -struct _GstDeinterlaceMethodClass { - GstObjectClass parent_class; - guint fields_required; - guint latency; - - void (*deinterlace_frame) (GstDeinterlaceMethod *self, GstDeinterlace2 * parent, GstBuffer *outbuf); - - const gchar *name; - const gchar *nick; -}; - -GType gst_deinterlace_method_get_type (void); - -#define GST_TYPE_DEINTERLACE_SIMPLE_METHOD (gst_deinterlace_simple_method_get_type ()) -#define GST_IS_DEINTERLACE_SIMPLE_METHOD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DEINTERLACE_SIMPLE_METHOD)) -#define GST_IS_DEINTERLACE_SIMPLE_METHOD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_DEINTERLACE_SIMPLE_METHOD)) -#define GST_DEINTERLACE_SIMPLE_METHOD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_DEINTERLACE_SIMPLE_METHOD, GstDeinterlaceSimpleMethodClass)) -#define GST_DEINTERLACE_SIMPLE_METHOD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_DEINTERLACE_SIMPLE_METHOD, GstDeinterlaceSimpleMethod)) -#define GST_DEINTERLACE_SIMPLE_METHOD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEINTERLACE_SIMPLE_METHOD, GstDeinterlaceSimpleMethodClass)) -#define GST_DEINTERLACE_SIMPLE_METHOD_CAST(obj) ((GstDeinterlaceSimpleMethod*)(obj)) - -typedef struct _GstDeinterlaceSimpleMethod GstDeinterlaceSimpleMethod; -typedef struct _GstDeinterlaceSimpleMethodClass GstDeinterlaceSimpleMethodClass; -typedef struct _GstDeinterlaceScanlineData GstDeinterlaceScanlineData; - -/* - * This structure defines the simple deinterlacer plugin. - */ - -struct _GstDeinterlaceScanlineData { - guint8 *tt0, *t0, *m0, *b0, *bb0; - guint8 *tt1, *t1, *m1, *b1, *bb1; - guint8 *tt2, *t2, *m2, *b2, *bb2; - guint8 *tt3, *t3, *m3, *b3, *bb3; - gboolean bottom_field; -}; - -/** - * For interpolate_scanline the input is: - * - * | t-3 t-2 t-1 t - * | Field 3 | Field 2 | Field 1 | Field 0 | - * | TT3 | | TT1 | | - * | | T2 | | T0 | - * | M3 | | M1 | | - * | | B2 | | B0 | - * | BB3 | | BB1 | | - * - * For copy_scanline the input is: - * - * | t-3 t-2 t-1 t - * | Field 3 | Field 2 | Field 1 | Field 0 | - * | | TT2 | | TT0 | - * | T3 | | T1 | | - * | | M2 | | M0 | - * | B3 | | B1 | | - * | | BB2 | | BB0 | - * - * All other values are NULL. - */ - -struct _GstDeinterlaceSimpleMethod { - GstDeinterlaceMethod parent; -}; - -struct _GstDeinterlaceSimpleMethodClass { - GstDeinterlaceMethodClass parent_class; - - void (*interpolate_scanline) (GstDeinterlaceMethod *self, GstDeinterlace2 * parent, guint8 *out, GstDeinterlaceScanlineData *scanlines, gint width); - void (*copy_scanline) (GstDeinterlaceMethod *self, GstDeinterlace2 * parent, guint8 *out, GstDeinterlaceScanlineData *scanlines, gint width); -}; - -GType gst_deinterlace_simple_method_get_type (void); - - -#define MAX_FIELD_HISTORY 10 - -#define PICTURE_PROGRESSIVE 0 -#define PICTURE_INTERLACED_BOTTOM 1 -#define PICTURE_INTERLACED_TOP 2 -#define PICTURE_INTERLACED_MASK (PICTURE_INTERLACED_BOTTOM | PICTURE_INTERLACED_TOP) - -typedef struct -{ - /* pointer to the start of data for this field */ - GstBuffer *buf; - /* see PICTURE_ flags */ - guint flags; -} GstPicture; - -typedef enum -{ - GST_DEINTERLACE2_TOMSMOCOMP, - GST_DEINTERLACE2_GREEDY_H, - GST_DEINTERLACE2_GREEDY_L, - GST_DEINTERLACE2_VFIR, - GST_DEINTERLACE2_LINEAR, - GST_DEINTERLACE2_LINEAR_BLEND, - GST_DEINTERLACE2_SCALER_BOB, - GST_DEINTERLACE2_WEAVE, - GST_DEINTERLACE2_WEAVE_TFF, - GST_DEINTERLACE2_WEAVE_BFF -} GstDeinterlace2Methods; - -typedef enum -{ - GST_DEINTERLACE2_ALL, /* All (missing data is interp.) */ - GST_DEINTERLACE2_TF, /* Top Fields Only */ - GST_DEINTERLACE2_BF /* Bottom Fields Only */ -} GstDeinterlace2Fields; - -typedef enum -{ - GST_DEINTERLACE2_LAYOUT_AUTO, - GST_DEINTERLACE2_LAYOUT_TFF, - GST_DEINTERLACE2_LAYOUT_BFF -} GstDeinterlace2FieldLayout; - -typedef enum { - GST_DEINTERLACE2_MODE_AUTO, - GST_DEINTERLACE2_MODE_INTERLACED, - GST_DEINTERLACE2_MODE_DISABLED -} GstDeinterlace2Mode; - -struct _GstDeinterlace2 -{ - GstElement parent; - - GstPad *srcpad, *sinkpad; - - /* */ - - GstDeinterlace2Mode mode; - - GstDeinterlace2FieldLayout field_layout; - - guint frame_size; - gint frame_rate_n, frame_rate_d; - gboolean interlaced; - - /* Duration of one field */ - GstClockTime field_duration; - - GstDeinterlace2Fields fields; - - GstDeinterlace2Methods method_id; - GstDeinterlaceMethod *method; - - /* The most recent pictures - PictureHistory[0] is always the most recent. - Pointers are NULL if the picture in question isn't valid, e.g. because - the program just started or a picture was skipped. - */ - GstPicture field_history[MAX_FIELD_HISTORY]; - guint history_count; - - /* Number of bytes of actual data in each scanline. May be less than - OverlayPitch since the overlay's scanlines might have alignment - requirements. Generally equal to FrameWidth * 2. - */ - guint row_stride; - - /* Number of pixels in each scanline. */ - gint frame_width; - - /* Number of scanlines per frame. */ - gint frame_height; - - /* Number of scanlines per field. FrameHeight / 2, mostly for - cleanliness so we don't have to keep dividing FrameHeight by 2. - */ - gint field_height; - - /* distance between lines in image - need not match the pixel width - */ - guint field_stride; -}; - -struct _GstDeinterlace2Class -{ - GstElementClass parent_class; -}; - -GType gst_deinterlace2_get_type (void); - -G_END_DECLS -#endif /* __GST_DEINTERLACE_2_H__ */ diff --git a/gst/deinterlace2/tvtime/greedy.c b/gst/deinterlace2/tvtime/greedy.c deleted file mode 100644 index 7d4e4b3a..00000000 --- a/gst/deinterlace2/tvtime/greedy.c +++ /dev/null @@ -1,488 +0,0 @@ -/* - * - * GStreamer - * Copyright (c) 2000 Tom Barry All rights reserved. - * mmx.h port copyright (c) 2002 Billy Biggs . - * - * Copyright (C) 2008 Sebastian Dröge - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Relicensed for GStreamer from GPL to LGPL with permit from Tom Barry - * and Billy Biggs. - * See: http://bugzilla.gnome.org/show_bug.cgi?id=163578 - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include "_stdint.h" - -#include "gstdeinterlace2.h" -#include - -#define GST_TYPE_DEINTERLACE_METHOD_GREEDY_L (gst_deinterlace_method_greedy_l_get_type ()) -#define GST_IS_DEINTERLACE_METHOD_GREEDY_L(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DEINTERLACE_METHOD_GREEDY_L)) -#define GST_IS_DEINTERLACE_METHOD_GREEDY_L_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_DEINTERLACE_METHOD_GREEDY_L)) -#define GST_DEINTERLACE_METHOD_GREEDY_L_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_DEINTERLACE_METHOD_GREEDY_L, GstDeinterlaceMethodGreedyLClass)) -#define GST_DEINTERLACE_METHOD_GREEDY_L(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_DEINTERLACE_METHOD_GREEDY_L, GstDeinterlaceMethodGreedyL)) -#define GST_DEINTERLACE_METHOD_GREEDY_L_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEINTERLACE_METHOD_GREEDY_L, GstDeinterlaceMethodGreedyLClass)) -#define GST_DEINTERLACE_METHOD_GREEDY_L_CAST(obj) ((GstDeinterlaceMethodGreedyL*)(obj)) - -GType gst_deinterlace_method_greedy_l_get_type (void); - -typedef struct -{ - GstDeinterlaceMethod parent; - - guint max_comb; -} GstDeinterlaceMethodGreedyL; - -typedef struct -{ - GstDeinterlaceMethodClass parent_class; - void (*scanline) (GstDeinterlaceMethodGreedyL * self, uint8_t * L2, - uint8_t * L1, uint8_t * L3, uint8_t * L2P, uint8_t * Dest, int size); -} GstDeinterlaceMethodGreedyLClass; - -// This is a simple lightweight DeInterlace method that uses little CPU time -// but gives very good results for low or intermedite motion. -// It defers frames by one field, but that does not seem to produce noticeable -// lip sync problems. -// -// The method used is to take either the older or newer weave pixel depending -// upon which give the smaller comb factor, and then clip to avoid large damage -// when wrong. -// -// I'd intended this to be part of a larger more elaborate method added to -// Blended Clip but this give too good results for the CPU to ignore here. - -static inline void -deinterlace_greedy_packed422_scanline_c (GstDeinterlaceMethodGreedyL * self, - uint8_t * m0, uint8_t * t1, - uint8_t * b1, uint8_t * m2, uint8_t * output, int width) -{ - int avg, l2_diff, lp2_diff, max, min, best; - guint max_comb = self->max_comb; - - // L2 == m0 - // L1 == t1 - // L3 == b1 - // LP2 == m2 - - while (width--) { - avg = (*t1 + *b1) / 2; - - l2_diff = ABS (*m0 - avg); - lp2_diff = ABS (*m2 - avg); - - if (l2_diff > lp2_diff) - best = *m2; - else - best = *m0; - - max = MAX (*t1, *b1); - min = MIN (*t1, *b1); - - if (max < 256 - max_comb) - max += max_comb; - else - max = 255; - - if (min > max_comb) - min -= max_comb; - else - min = 0; - - *output = CLAMP (best, min, max); - - // Advance to the next set of pixels. - output += 1; - m0 += 1; - t1 += 1; - b1 += 1; - m2 += 1; - } -} - -#ifdef BUILD_X86_ASM -#include "mmx.h" -static void -deinterlace_greedy_packed422_scanline_mmx (GstDeinterlaceMethodGreedyL * self, - uint8_t * m0, uint8_t * t1, - uint8_t * b1, uint8_t * m2, uint8_t * output, int width) -{ - mmx_t MaxComb; - mmx_t ShiftMask; - - // How badly do we let it weave? 0-255 - MaxComb.ub[0] = self->max_comb; - MaxComb.ub[1] = self->max_comb; - MaxComb.ub[2] = self->max_comb; - MaxComb.ub[3] = self->max_comb; - MaxComb.ub[4] = self->max_comb; - MaxComb.ub[5] = self->max_comb; - MaxComb.ub[6] = self->max_comb; - MaxComb.ub[7] = self->max_comb; - - ShiftMask.ub[0] = 0x7f; - ShiftMask.ub[1] = 0x7f; - ShiftMask.ub[2] = 0x7f; - ShiftMask.ub[3] = 0x7f; - ShiftMask.ub[4] = 0x7f; - ShiftMask.ub[5] = 0x7f; - ShiftMask.ub[6] = 0x7f; - ShiftMask.ub[7] = 0x7f; - - // L2 == m0 - // L1 == t1 - // L3 == b1 - // LP2 == m2 - - movq_m2r (MaxComb, mm6); - - for (; width > 7; width -= 8) { - movq_m2r (*t1, mm1); // L1 - movq_m2r (*m0, mm2); // L2 - movq_m2r (*b1, mm3); // L3 - movq_m2r (*m2, mm0); // LP2 - - // average L1 and L3 leave result in mm4 - movq_r2r (mm1, mm4); // L1 - movq_r2r (mm3, mm5); // L3 - psrlw_i2r (1, mm4); // L1/2 - pand_m2r (ShiftMask, mm4); - psrlw_i2r (1, mm5); // L3/2 - pand_m2r (ShiftMask, mm5); - paddusb_r2r (mm5, mm4); // (L1 + L3) / 2 - - // get abs value of possible L2 comb - movq_r2r (mm2, mm7); // L2 - psubusb_r2r (mm4, mm7); // L2 - avg - movq_r2r (mm4, mm5); // avg - psubusb_r2r (mm2, mm5); // avg - L2 - por_r2r (mm7, mm5); // abs(avg-L2) - - // get abs value of possible LP2 comb - movq_r2r (mm0, mm7); // LP2 - psubusb_r2r (mm4, mm7); // LP2 - avg - psubusb_r2r (mm0, mm4); // avg - LP2 - por_r2r (mm7, mm4); // abs(avg-LP2) - - // use L2 or LP2 depending upon which makes smaller comb - psubusb_r2r (mm5, mm4); // see if it goes to zero - psubusb_r2r (mm5, mm5); // 0 - pcmpeqb_r2r (mm5, mm4); // if (mm4=0) then FF else 0 - pcmpeqb_r2r (mm4, mm5); // opposite of mm4 - - // if Comb(LP2) <= Comb(L2) then mm4=ff, mm5=0 else mm4=0, mm5 = 55 - pand_r2r (mm2, mm5); // use L2 if mm5 == ff, else 0 - pand_r2r (mm0, mm4); // use LP2 if mm4 = ff, else 0 - por_r2r (mm5, mm4); // may the best win - - // Now lets clip our chosen value to be not outside of the range - // of the high/low range L1-L3 by more than abs(L1-L3) - // This allows some comb but limits the damages and also allows more - // detail than a boring oversmoothed clip. - - movq_r2r (mm1, mm2); // copy L1 - psubusb_r2r (mm3, mm2); // - L3, with saturation - paddusb_r2r (mm3, mm2); // now = Max(L1,L3) - - pcmpeqb_r2r (mm7, mm7); // all ffffffff - psubusb_r2r (mm1, mm7); // - L1 - paddusb_r2r (mm7, mm3); // add, may sat at fff.. - psubusb_r2r (mm7, mm3); // now = Min(L1,L3) - - // allow the value to be above the high or below the low by amt of MaxComb - paddusb_r2r (mm6, mm2); // increase max by diff - psubusb_r2r (mm6, mm3); // lower min by diff - - psubusb_r2r (mm3, mm4); // best - Min - paddusb_r2r (mm3, mm4); // now = Max(best,Min(L1,L3) - - pcmpeqb_r2r (mm7, mm7); // all ffffffff - psubusb_r2r (mm4, mm7); // - Max(best,Min(best,L3) - paddusb_r2r (mm7, mm2); // add may sat at FFF.. - psubusb_r2r (mm7, mm2); // now = Min( Max(best, Min(L1,L3), L2 )=L2 clipped - - movq_r2m (mm2, *output); // move in our clipped best - - // Advance to the next set of pixels. - output += 8; - m0 += 8; - t1 += 8; - b1 += 8; - m2 += 8; - } - emms (); - if (width > 0) - deinterlace_greedy_packed422_scanline_c (self, m0, t1, b1, m2, output, - width); -} - -#include "sse.h" - -static void -deinterlace_greedy_packed422_scanline_mmxext (GstDeinterlaceMethodGreedyL * - self, uint8_t * m0, uint8_t * t1, uint8_t * b1, uint8_t * m2, - uint8_t * output, int width) -{ - mmx_t MaxComb; - - // How badly do we let it weave? 0-255 - MaxComb.ub[0] = self->max_comb; - MaxComb.ub[1] = self->max_comb; - MaxComb.ub[2] = self->max_comb; - MaxComb.ub[3] = self->max_comb; - MaxComb.ub[4] = self->max_comb; - MaxComb.ub[5] = self->max_comb; - MaxComb.ub[6] = self->max_comb; - MaxComb.ub[7] = self->max_comb; - - // L2 == m0 - // L1 == t1 - // L3 == b1 - // LP2 == m2 - - movq_m2r (MaxComb, mm6); - - for (; width > 7; width -= 8) { - movq_m2r (*t1, mm1); // L1 - movq_m2r (*m0, mm2); // L2 - movq_m2r (*b1, mm3); // L3 - movq_m2r (*m2, mm0); // LP2 - - // average L1 and L3 leave result in mm4 - movq_r2r (mm1, mm4); // L1 - pavgb_r2r (mm3, mm4); // (L1 + L3)/2 - - // get abs value of possible L2 comb - movq_r2r (mm2, mm7); // L2 - psubusb_r2r (mm4, mm7); // L2 - avg - movq_r2r (mm4, mm5); // avg - psubusb_r2r (mm2, mm5); // avg - L2 - por_r2r (mm7, mm5); // abs(avg-L2) - - // get abs value of possible LP2 comb - movq_r2r (mm0, mm7); // LP2 - psubusb_r2r (mm4, mm7); // LP2 - avg - psubusb_r2r (mm0, mm4); // avg - LP2 - por_r2r (mm7, mm4); // abs(avg-LP2) - - // use L2 or LP2 depending upon which makes smaller comb - psubusb_r2r (mm5, mm4); // see if it goes to zero - pxor_r2r (mm5, mm5); // 0 - pcmpeqb_r2r (mm5, mm4); // if (mm4=0) then FF else 0 - pcmpeqb_r2r (mm4, mm5); // opposite of mm4 - - // if Comb(LP2) <= Comb(L2) then mm4=ff, mm5=0 else mm4=0, mm5 = 55 - pand_r2r (mm2, mm5); // use L2 if mm5 == ff, else 0 - pand_r2r (mm0, mm4); // use LP2 if mm4 = ff, else 0 - por_r2r (mm5, mm4); // may the best win - - // Now lets clip our chosen value to be not outside of the range - // of the high/low range L1-L3 by more than abs(L1-L3) - // This allows some comb but limits the damages and also allows more - // detail than a boring oversmoothed clip. - - movq_r2r (mm1, mm2); // copy L1 - pmaxub_r2r (mm3, mm2); // now = Max(L1,L3) - - pminub_r2r (mm1, mm3); // now = Min(L1,L3) - - // allow the value to be above the high or below the low by amt of MaxComb - paddusb_r2r (mm6, mm2); // increase max by diff - psubusb_r2r (mm6, mm3); // lower min by diff - - - pmaxub_r2r (mm3, mm4); // now = Max(best,Min(L1,L3) - pminub_r2r (mm4, mm2); // now = Min( Max(best, Min(L1,L3)), L2 )=L2 clipped - - movq_r2m (mm2, *output); // move in our clipped best - - // Advance to the next set of pixels. - output += 8; - m0 += 8; - t1 += 8; - b1 += 8; - m2 += 8; - } - emms (); - - if (width > 0) - deinterlace_greedy_packed422_scanline_c (self, m0, t1, b1, m2, output, - width); -} - -#endif - -static void -deinterlace_frame_di_greedy (GstDeinterlaceMethod * d_method, - GstDeinterlace2 * object, GstBuffer * outbuf) -{ - GstDeinterlaceMethodGreedyL *self = - GST_DEINTERLACE_METHOD_GREEDY_L (d_method); - GstDeinterlaceMethodGreedyLClass *klass = - GST_DEINTERLACE_METHOD_GREEDY_L_GET_CLASS (self); - int InfoIsOdd = 0; - int Line; - unsigned int Pitch = object->field_stride; - unsigned char *L1; // ptr to Line1, of 3 - unsigned char *L2; // ptr to Line2, the weave line - unsigned char *L3; // ptr to Line3 - - unsigned char *L2P; // ptr to prev Line2 - unsigned char *Dest = GST_BUFFER_DATA (outbuf); - - // copy first even line no matter what, and the first odd line if we're - // processing an EVEN field. (note diff from other deint rtns.) - - if (object->field_history[object->history_count - 1].flags == - PICTURE_INTERLACED_BOTTOM) { - InfoIsOdd = 1; - - L1 = GST_BUFFER_DATA (object->field_history[object->history_count - 2].buf); - L2 = GST_BUFFER_DATA (object->field_history[object->history_count - 1].buf); - L3 = L1 + Pitch; - L2P = - GST_BUFFER_DATA (object->field_history[object->history_count - 3].buf); - - // copy first even line - oil_memcpy (Dest, L1, object->row_stride); - Dest += object->row_stride; - } else { - InfoIsOdd = 0; - L1 = GST_BUFFER_DATA (object->field_history[object->history_count - 2].buf); - L2 = GST_BUFFER_DATA (object->field_history[object->history_count - - 1].buf) + Pitch; - L3 = L1 + Pitch; - L2P = - GST_BUFFER_DATA (object->field_history[object->history_count - 3].buf) + - Pitch; - - // copy first even line - oil_memcpy (Dest, GST_BUFFER_DATA (object->field_history[0].buf), - object->row_stride); - Dest += object->row_stride; - // then first odd line - oil_memcpy (Dest, L1, object->row_stride); - Dest += object->row_stride; - } - - for (Line = 0; Line < (object->field_height - 1); ++Line) { - klass->scanline (self, L2, L1, L3, L2P, Dest, object->row_stride); - Dest += object->row_stride; - oil_memcpy (Dest, L3, object->row_stride); - Dest += object->row_stride; - - L1 += Pitch; - L2 += Pitch; - L3 += Pitch; - L2P += Pitch; - } - - if (InfoIsOdd) { - oil_memcpy (Dest, L2, object->row_stride); - } -} - - -G_DEFINE_TYPE (GstDeinterlaceMethodGreedyL, gst_deinterlace_method_greedy_l, - GST_TYPE_DEINTERLACE_METHOD); - -enum -{ - ARG_0, - ARG_MAX_COMB -}; - -static void -gst_deinterlace_method_greedy_l_set_property (GObject * object, guint prop_id, - const GValue * value, GParamSpec * pspec) -{ - GstDeinterlaceMethodGreedyL *self = GST_DEINTERLACE_METHOD_GREEDY_L (object); - - switch (prop_id) { - case ARG_MAX_COMB: - self->max_comb = g_value_get_uint (value); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - } -} - -static void -gst_deinterlace_method_greedy_l_get_property (GObject * object, guint prop_id, - GValue * value, GParamSpec * pspec) -{ - GstDeinterlaceMethodGreedyL *self = GST_DEINTERLACE_METHOD_GREEDY_L (object); - - switch (prop_id) { - case ARG_MAX_COMB: - g_value_set_uint (value, self->max_comb); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - } -} - -static void -gst_deinterlace_method_greedy_l_class_init (GstDeinterlaceMethodGreedyLClass * - klass) -{ - GstDeinterlaceMethodClass *dim_class = (GstDeinterlaceMethodClass *) klass; - GObjectClass *gobject_class = (GObjectClass *) klass; -#ifdef BUILD_X86_ASM - guint cpu_flags = oil_cpu_get_flags (); -#endif - - gobject_class->set_property = gst_deinterlace_method_greedy_l_set_property; - gobject_class->get_property = gst_deinterlace_method_greedy_l_get_property; - - g_object_class_install_property (gobject_class, ARG_MAX_COMB, - g_param_spec_uint ("max-comb", - "Max comb", - "Max Comb", 0, 255, 15, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS) - ); - - dim_class->fields_required = 4; - dim_class->deinterlace_frame = deinterlace_frame_di_greedy; - dim_class->name = "Motion Adaptive: Simple Detection"; - dim_class->nick = "greedyl"; - dim_class->latency = 1; - -#ifdef BUILD_X86_ASM - if (cpu_flags & OIL_IMPL_FLAG_MMXEXT) { - klass->scanline = deinterlace_greedy_packed422_scanline_mmxext; - } else if (cpu_flags & OIL_IMPL_FLAG_MMX) { - klass->scanline = deinterlace_greedy_packed422_scanline_mmx; - } else { - klass->scanline = deinterlace_greedy_packed422_scanline_c; - } -#else - klass->scanline = deinterlace_greedy_packed422_scanline_c; -#endif -} - -static void -gst_deinterlace_method_greedy_l_init (GstDeinterlaceMethodGreedyL * self) -{ - self->max_comb = 15; -} diff --git a/gst/deinterlace2/tvtime/greedyh.asm b/gst/deinterlace2/tvtime/greedyh.asm deleted file mode 100644 index 86e97c58..00000000 --- a/gst/deinterlace2/tvtime/greedyh.asm +++ /dev/null @@ -1,250 +0,0 @@ -/* - * - * GStreamer - * Copyright (c) 2001 Tom Barry. All rights reserved. - * Copyright (C) 2008 Sebastian Dröge - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - - -/* - * Relicensed for GStreamer from GPL to LGPL with permit from Tom Barry. - * See: http://bugzilla.gnome.org/show_bug.cgi?id=163578 - */ - - -#include "x86-64_macros.inc" - -void -FUNCT_NAME (GstDeinterlaceMethodGreedyH *self, uint8_t * L1, uint8_t * L2, uint8_t * L3, uint8_t * L2P, - uint8_t * Dest, int size) -{ - - // in tight loop some vars are accessed faster in local storage - int64_t YMask = 0x00ff00ff00ff00ffull; // to keep only luma - int64_t UVMask = 0xff00ff00ff00ff00ull; // to keep only chroma - int64_t ShiftMask = 0xfefefefefefefefeull; // to avoid shifting chroma to luma - int64_t QW256 = 0x0100010001000100ull; // 4 256's - int64_t MaxComb; - int64_t MotionThreshold; - int64_t MotionSense; - int64_t i; - long LoopCtr; - long oldbx; - - int64_t QW256B; - int64_t LastAvg = 0; //interp value from left qword - - // FIXME: Use C implementation if the width is not a multiple of 4 - // Do something more optimal later - if (size % 8 != 0) - greedyDScaler_C (self, L1, L2, L3, L2P, Dest, size); - - // Set up our two parms that are actually evaluated for each pixel - i = self->max_comb; - MaxComb = - i << 56 | i << 48 | i << 40 | i << 32 | i << 24 | i << 16 | i << 8 | i; - - i = self->motion_threshold; // scale to range of 0-257 - MotionThreshold = i << 48 | i << 32 | i << 16 | i | UVMask; - - i = self->motion_sense; // scale to range of 0-257 - MotionSense = i << 48 | i << 32 | i << 16 | i; - - i = 0xffffffff - 256; - QW256B = i << 48 | i << 32 | i << 16 | i; // save a couple instr on PMINSW instruct. - - LoopCtr = size / 8 - 1; // there are LineLength / 8 qwords per line but do 1 less, adj at end of loop - - // For ease of reading, the comments below assume that we're operating on an odd - // field (i.e., that InfoIsOdd is true). Assume the obvious for even lines.. - __asm__ __volatile__ ( - // save ebx (-fPIC) - MOVX " %%" XBX ", %[oldbx]\n\t" - MOVX " %[L1], %%" XAX "\n\t" - LEAX " 8(%%" XAX "), %%" XBX "\n\t" // next qword needed by DJR - MOVX " %[L3], %%" XCX "\n\t" - SUBX " %%" XAX ", %%" XCX "\n\t" // carry L3 addr as an offset - MOVX " %[L2P], %%" XDX "\n\t" - MOVX " %[L2], %%" XSI "\n\t" - MOVX " %[Dest], %%" XDI "\n\t" // DL1 if Odd or DL2 if Even - - ".align 8\n\t" - "1:\n\t" - "movq (%%" XSI "), %%mm0\n\t" // L2 - the newest weave pixel value - "movq (%%" XAX "), %%mm1\n\t" // L1 - the top pixel - "movq (%%" XDX "), %%mm2\n\t" // L2P - the prev weave pixel - "movq (%%" XAX ", %%" XCX "), %%mm3\n\t" // L3, next odd row - "movq %%mm1, %%mm6\n\t" // L1 - get simple single pixel interp - - // pavgb mm6, mm3 // use macro below - V_PAVGB ("%%mm6", "%%mm3", "%%mm4", "%[ShiftMask]") - - // DJR - Diagonal Jaggie Reduction - // In the event that we are going to use an average (Bob) pixel we do not want a jagged - // stair step effect. To combat this we avg in the 2 horizontally adjacen pixels into the - // interpolated Bob mix. This will do horizontal smoothing for only the Bob'd pixels. - - "movq %[LastAvg], %%mm4\n\t" // the bob value from prev qword in row - "movq %%mm6, %[LastAvg]\n\t" // save for next pass - "psrlq $48, %%mm4\n\t" // right justify 1 pixel - "movq %%mm6, %%mm7\n\t" // copy of simple bob pixel - "psllq $16, %%mm7\n\t" // left justify 3 pixels - "por %%mm7, %%mm4\n\t" // and combine - "movq (%%" XBX "), %%mm5\n\t" // next horiz qword from L1 - // pavgb mm5, qword ptr[ebx+ecx] // next horiz qword from L3, use macro below - - V_PAVGB ("%%mm5", "(%%" XBX ",%%" XCX ")", "%%mm7", "%[ShiftMask]") - "psllq $48, %%mm5\n\t" // left just 1 pixel - "movq %%mm6, %%mm7\n\t" // another copy of simple bob pixel - "psrlq $16, %%mm7\n\t" // right just 3 pixels - "por %%mm7, %%mm5\n\t" // combine - // pavgb mm4, mm5 // avg of forward and prev by 1 pixel, use macro - V_PAVGB ("%%mm4", "%%mm5", "%%mm5", "%[ShiftMask]") // mm5 gets modified if MMX - // pavgb mm6, mm4 // avg of center and surround interp vals, use macro - V_PAVGB ("%%mm6", "%%mm4", "%%mm7", "%[ShiftMask]") - - // Don't do any more averaging than needed for mmx. It hurts performance and causes rounding errors. -#ifndef IS_MMX - // pavgb mm4, mm6 // 1/4 center, 3/4 adjacent - V_PAVGB ("%%mm4", "%%mm6", "%%mm7", "%[ShiftMask]") - // pavgb mm6, mm4 // 3/8 center, 5/8 adjacent - V_PAVGB ("%%mm6", "%%mm4", "%%mm7", "%[ShiftMask]") -#endif - - // get abs value of possible L2 comb - "movq %%mm6, %%mm4\n\t" // work copy of interp val - "movq %%mm2, %%mm7\n\t" // L2 - "psubusb %%mm4, %%mm7\n\t" // L2 - avg - "movq %%mm4, %%mm5\n\t" // avg - "psubusb %%mm2, %%mm5\n\t" // avg - L2 - "por %%mm7, %%mm5\n\t" // abs(avg-L2) - - // get abs value of possible L2P comb - "movq %%mm0, %%mm7\n\t" // L2P - "psubusb %%mm4, %%mm7\n\t" // L2P - avg - "psubusb %%mm0, %%mm4\n\t" // avg - L2P - "por %%mm7, %%mm4\n\t" // abs(avg-L2P) - - // use L2 or L2P depending upon which makes smaller comb - "psubusb %%mm5, %%mm4\n\t" // see if it goes to zero - "psubusb %%mm5, %%mm5\n\t" // 0 - "pcmpeqb %%mm5, %%mm4\n\t" // if (mm4=0) then FF else 0 - "pcmpeqb %%mm4, %%mm5\n\t" // opposite of mm4 - - // if Comb(L2P) <= Comb(L2) then mm4=ff, mm5=0 else mm4=0, mm5 = 55 - "pand %%mm2, %%mm5\n\t" // use L2 if mm5 == ff, else 0 - "pand %%mm0, %%mm4\n\t" // use L2P if mm4 = ff, else 0 - "por %%mm5, %%mm4\n\t" // may the best win - - // Inventory: at this point we have the following values: - // mm0 = L2P (or L2) - // mm1 = L1 - // mm2 = L2 (or L2P) - // mm3 = L3 - // mm4 = the best of L2,L2P weave pixel, base upon comb - // mm6 = the avg interpolated value, if we need to use it - // Let's measure movement, as how much the weave pixel has changed - - "movq %%mm2, %%mm7\n\t" - "psubusb %%mm0, %%mm2\n\t" - "psubusb %%mm7, %%mm0\n\t" - "por %%mm2, %%mm0\n\t" // abs value of change, used later - - // Now lets clip our chosen value to be not outside of the range - // of the high/low range L1-L3 by more than MaxComb. - // This allows some comb but limits the damages and also allows more - // detail than a boring oversmoothed clip. - - "movq %%mm1, %%mm2\n\t" // copy L1 - // pmaxub mm2, mm3 // use macro - V_PMAXUB ("%%mm2", "%%mm3") // now = Max(L1,L3) - "movq %%mm1, %%mm5\n\t" // copy L1 - // pminub mm5, mm3 // now = Min(L1,L3), use macro - V_PMINUB ("%%mm5", "%%mm3", "%%mm7") - - // allow the value to be above the high or below the low by amt of MaxComb - "psubusb %[MaxComb], %%mm5\n\t" // lower min by diff - "paddusb %[MaxComb], %%mm2\n\t" // increase max by diff - // pmaxub mm4, mm5 // now = Max(best,Min(L1,L3) use macro - V_PMAXUB ("%%mm4", "%%mm5") - // pminub mm4, mm2 // now = Min( Max(best, Min(L1,L3), L2 )=L2 clipped - V_PMINUB ("%%mm4", "%%mm2", "%%mm7") - - // Blend weave pixel with bob pixel, depending on motion val in mm0 - "psubusb %[MotionThreshold], %%mm0\n\t" // test Threshold, clear chroma change >>>?? - "pmullw %[MotionSense], %%mm0\n\t" // mul by user factor, keep low 16 bits - "movq %[QW256], %%mm7\n\t" -#ifdef IS_MMXEXT - "pminsw %%mm7, %%mm0\n\t" // max = 256 -#else - "paddusw %[QW256B], %%mm0\n\t" // add, may sat at fff.. - "psubusw %[QW256B], %%mm0\n\t" // now = Min(L1,256) -#endif - "psubusw %%mm0, %%mm7\n\t" // so the 2 sum to 256, weighted avg - "movq %%mm4, %%mm2\n\t" // save weave chroma info before trashing - "pand %[YMask], %%mm4\n\t" // keep only luma from calc'd value - "pmullw %%mm7, %%mm4\n\t" // use more weave for less motion - "pand %[YMask], %%mm6\n\t" // keep only luma from calc'd value - "pmullw %%mm0, %%mm6\n\t" // use more bob for large motion - "paddusw %%mm6, %%mm4\n\t" // combine - "psrlw $8, %%mm4\n\t" // div by 256 to get weighted avg - // chroma comes from weave pixel - "pand %[UVMask], %%mm2\n\t" // keep chroma - "por %%mm4, %%mm2\n\t" // and combine - V_MOVNTQ ("(%%" XDI ")", "%%mm2") // move in our clipped best, use macro - // bump ptrs and loop - LEAX " 8(%%" XAX "), %%" XAX "\n\t" - LEAX " 8(%%" XBX "), %%" XBX "\n\t" - LEAX " 8(%%" XDX "), %%" XDX "\n\t" - LEAX " 8(%%" XDI "), %%" XDI "\n\t" - LEAX " 8(%%" XSI "), %%" XSI "\n\t" - DECX " %[LoopCtr]\n\t" - - "jg 1b\n\t" // loop if not to last line - // note P-III default assumes backward branches taken - "jl 1f\n\t" // done - MOVX " %%" XAX ", %%" XBX "\n\t" // sharpness lookahead 1 byte only, be wrong on 1 - "jmp 1b\n\t" - - "1:\n\t" - MOVX " %[oldbx], %%" XBX "\n\t" - "emms\n\t": /* no outputs */ - - :[LastAvg] "m" (LastAvg), - [L1] "m" (L1), - [L3] "m" (L3), - [L2P] "m" (L2P), - [L2] "m" (L2), - [Dest] "m" (Dest), - [ShiftMask] "m" (ShiftMask), - [MaxComb] "m" (MaxComb), - [MotionThreshold] "m" (MotionThreshold), - [MotionSense] "m" (MotionSense), - [QW256B] "m" (QW256B), - [YMask] "m" (YMask), - [UVMask] "m" (UVMask), - [LoopCtr] "m" (LoopCtr), - [QW256] "m" (QW256), - [oldbx] "m" (oldbx) - : XAX, XCX, XDX, XSI, XDI, - "st", "st(1)", "st(2)", "st(3)", "st(4)", "st(5)", "st(6)", "st(7)", -#ifdef __MMX__ - "mm0", "mm1", "mm2", "mm3", "mm4", "mm5", "mm6", "mm7", -#endif - "memory", "cc"); -} diff --git a/gst/deinterlace2/tvtime/greedyh.c b/gst/deinterlace2/tvtime/greedyh.c deleted file mode 100644 index a5aafd18..00000000 --- a/gst/deinterlace2/tvtime/greedyh.c +++ /dev/null @@ -1,420 +0,0 @@ -/* - * - * GStreamer - * Copyright (C) 2004 Billy Biggs - * Copyright (C) 2008 Sebastian Dröge - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Relicensed for GStreamer from GPL to LGPL with permit from Billy Biggs. - * See: http://bugzilla.gnome.org/show_bug.cgi?id=163578 - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include "greedyhmacros.h" - -#include -#include "_stdint.h" -#include - -#include "gst/gst.h" -#include "plugins.h" -#include "gstdeinterlace2.h" - -#define GST_TYPE_DEINTERLACE_METHOD_GREEDY_H (gst_deinterlace_method_greedy_h_get_type ()) -#define GST_IS_DEINTERLACE_METHOD_GREEDY_H(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DEINTERLACE_METHOD_GREEDY_H)) -#define GST_IS_DEINTERLACE_METHOD_GREEDY_H_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_DEINTERLACE_METHOD_GREEDY_H)) -#define GST_DEINTERLACE_METHOD_GREEDY_H_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_DEINTERLACE_METHOD_GREEDY_H, GstDeinterlaceMethodGreedyHClass)) -#define GST_DEINTERLACE_METHOD_GREEDY_H(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_DEINTERLACE_METHOD_GREEDY_H, GstDeinterlaceMethodGreedyH)) -#define GST_DEINTERLACE_METHOD_GREEDY_H_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEINTERLACE_METHOD_GREEDY_H, GstDeinterlaceMethodGreedyHClass)) -#define GST_DEINTERLACE_METHOD_GREEDY_H_CAST(obj) ((GstDeinterlaceMethodGreedyH*)(obj)) - -GType gst_deinterlace_method_greedy_h_get_type (void); - -typedef struct -{ - GstDeinterlaceMethod parent; - - guint max_comb, motion_threshold, motion_sense; -} GstDeinterlaceMethodGreedyH; - -typedef struct -{ - GstDeinterlaceMethodClass parent_class; - void (*scanline) (GstDeinterlaceMethodGreedyH * self, uint8_t * L2, - uint8_t * L1, uint8_t * L3, uint8_t * L2P, uint8_t * Dest, int size); -} GstDeinterlaceMethodGreedyHClass; - -void -greedyDScaler_C (GstDeinterlaceMethodGreedyH * self, uint8_t * L1, uint8_t * L2, - uint8_t * L3, uint8_t * L2P, uint8_t * Dest, int size) -{ - int Pos; - uint8_t l1_l, l1_1_l, l3_l, l3_1_l; - uint8_t l1_c, l1_1_c, l3_c, l3_1_c; - uint8_t avg_l, avg_c, avg_l_1, avg_c_1; - uint8_t avg_l__1 = 0, avg_c__1 = 0; - uint8_t avg_s_l, avg_s_c; - uint8_t avg_sc_l, avg_sc_c; - uint8_t best_l, best_c; - uint16_t mov_l; - uint8_t out_l, out_c; - uint8_t l2_l, l2_c, lp2_l, lp2_c; - uint8_t l2_l_diff, l2_c_diff, lp2_l_diff, lp2_c_diff; - uint8_t min_l, min_c, max_l, max_c; - guint max_comb = self->max_comb; - guint motion_sense = self->motion_sense; - guint motion_threshold = self->motion_threshold; - - for (Pos = 0; Pos < size; Pos += 2) { - l1_l = L1[0]; - l1_c = L1[1]; - l3_l = L3[0]; - l3_c = L3[1]; - - if (Pos == size - 1) { - l1_1_l = l1_l; - l1_1_c = l1_c; - l3_1_l = l3_l; - l3_1_c = l3_c; - } else { - l1_1_l = L1[2]; - l1_1_c = L1[3]; - l3_1_l = L3[2]; - l3_1_c = L3[3]; - } - - /* Average of L1 and L3 */ - avg_l = (l1_l + l3_l) / 2; - avg_c = (l1_c + l3_c) / 2; - - if (Pos == 0) { - avg_l__1 = avg_l; - avg_c__1 = avg_c; - } - - /* Average of next L1 and next L3 */ - avg_l_1 = (l1_1_l + l3_1_l) / 2; - avg_c_1 = (l1_1_c + l3_1_c) / 2; - - /* Calculate average of one pixel forward and previous */ - avg_s_l = (avg_l__1 + avg_l_1) / 2; - avg_s_c = (avg_c__1 + avg_c_1) / 2; - - /* Calculate average of center and surrounding pixels */ - avg_sc_l = (avg_l + avg_s_l) / 2; - avg_sc_c = (avg_c + avg_s_c) / 2; - - /* move forward */ - avg_l__1 = avg_l; - avg_c__1 = avg_c; - - /* Get best L2/L2P, i.e. least diff from above average */ - l2_l = L2[0]; - l2_c = L2[1]; - lp2_l = L2P[0]; - lp2_c = L2P[1]; - - l2_l_diff = ABS (l2_l - avg_sc_l); - l2_c_diff = ABS (l2_c - avg_sc_c); - - lp2_l_diff = ABS (lp2_l - avg_sc_l); - lp2_c_diff = ABS (lp2_c - avg_sc_c); - - if (l2_l_diff > lp2_l_diff) - best_l = lp2_l; - else - best_l = l2_l; - - if (l2_c_diff > lp2_c_diff) - best_c = lp2_c; - else - best_c = l2_c; - - /* Clip this best L2/L2P by L1/L3 and allow to differ by GreedyMaxComb */ - max_l = MAX (l1_l, l3_l); - min_l = MIN (l1_l, l3_l); - - if (max_l < 256 - max_comb) - max_l += max_comb; - else - max_l = 255; - - if (min_l > max_comb) - min_l -= max_comb; - else - min_l = 0; - - max_c = MAX (l1_c, l3_c); - min_c = MIN (l1_c, l3_c); - - if (max_c < 256 - max_comb) - max_c += max_comb; - else - max_c = 255; - - if (min_c > max_comb) - min_c -= max_comb; - else - min_c = 0; - - out_l = CLAMP (best_l, min_l, max_l); - out_c = CLAMP (best_c, min_c, max_c); - - /* Do motion compensation for luma, i.e. how much - * the weave pixel differs */ - mov_l = ABS (l2_l - lp2_l); - if (mov_l > motion_threshold) - mov_l -= motion_threshold; - else - mov_l = 0; - - mov_l = mov_l * motion_sense; - if (mov_l > 256) - mov_l = 256; - - /* Weighted sum on clipped weave pixel and average */ - out_l = (out_l * (256 - mov_l) + avg_sc_l * mov_l) / 256; - - Dest[0] = out_l; - Dest[1] = out_c; - - Dest += 2; - L1 += 2; - L2 += 2; - L3 += 2; - L2P += 2; - } -} - -#ifdef BUILD_X86_ASM - -#define IS_MMXEXT -#define SIMD_TYPE MMXEXT -#define FUNCT_NAME greedyDScaler_MMXEXT -#include "greedyh.asm" -#undef SIMD_TYPE -#undef IS_MMXEXT -#undef FUNCT_NAME - -#define IS_3DNOW -#define SIMD_TYPE 3DNOW -#define FUNCT_NAME greedyDScaler_3DNOW -#include "greedyh.asm" -#undef SIMD_TYPE -#undef IS_3DNOW -#undef FUNCT_NAME - -#define IS_MMX -#define SIMD_TYPE MMX -#define FUNCT_NAME greedyDScaler_MMX -#include "greedyh.asm" -#undef SIMD_TYPE -#undef IS_MMX -#undef FUNCT_NAME - -#endif - -static void -deinterlace_frame_di_greedyh (GstDeinterlaceMethod * d_method, - GstDeinterlace2 * object, GstBuffer * outbuf) -{ - GstDeinterlaceMethodGreedyH *self = - GST_DEINTERLACE_METHOD_GREEDY_H (d_method); - GstDeinterlaceMethodGreedyHClass *klass = - GST_DEINTERLACE_METHOD_GREEDY_H_GET_CLASS (self); - int InfoIsOdd = 0; - int Line; - unsigned int Pitch = object->field_stride; - - unsigned char *L1; // ptr to Line1, of 3 - unsigned char *L2; // ptr to Line2, the weave line - unsigned char *L3; // ptr to Line3 - - unsigned char *L2P; // ptr to prev Line2 - unsigned char *Dest = GST_BUFFER_DATA (outbuf); - - // copy first even line no matter what, and the first odd line if we're - // processing an EVEN field. (note diff from other deint rtns.) - - if (object->field_history[object->history_count - 1].flags == - PICTURE_INTERLACED_BOTTOM) { - InfoIsOdd = 1; - - L1 = GST_BUFFER_DATA (object->field_history[object->history_count - 2].buf); - L2 = GST_BUFFER_DATA (object->field_history[object->history_count - 1].buf); - L3 = L1 + Pitch; - L2P = - GST_BUFFER_DATA (object->field_history[object->history_count - 3].buf); - - // copy first even line - oil_memcpy (Dest, L1, object->row_stride); - Dest += object->row_stride; - } else { - InfoIsOdd = 0; - L1 = GST_BUFFER_DATA (object->field_history[object->history_count - 2].buf); - L2 = GST_BUFFER_DATA (object->field_history[object->history_count - - 1].buf) + Pitch; - L3 = L1 + Pitch; - L2P = - GST_BUFFER_DATA (object->field_history[object->history_count - 3].buf) + - Pitch; - - // copy first even line - oil_memcpy (Dest, GST_BUFFER_DATA (object->field_history[0].buf), - object->row_stride); - Dest += object->row_stride; - // then first odd line - oil_memcpy (Dest, L1, object->row_stride); - Dest += object->row_stride; - } - - for (Line = 0; Line < (object->field_height - 1); ++Line) { - klass->scanline (self, L1, L2, L3, L2P, Dest, object->row_stride); - Dest += object->row_stride; - oil_memcpy (Dest, L3, object->row_stride); - Dest += object->row_stride; - - L1 += Pitch; - L2 += Pitch; - L3 += Pitch; - L2P += Pitch; - } - - if (InfoIsOdd) { - oil_memcpy (Dest, L2, object->row_stride); - } -} - -G_DEFINE_TYPE (GstDeinterlaceMethodGreedyH, gst_deinterlace_method_greedy_h, - GST_TYPE_DEINTERLACE_METHOD); - -enum -{ - ARG_0, - ARG_MAX_COMB, - ARG_MOTION_THRESHOLD, - ARG_MOTION_SENSE -}; - -static void -gst_deinterlace_method_greedy_h_set_property (GObject * object, guint prop_id, - const GValue * value, GParamSpec * pspec) -{ - GstDeinterlaceMethodGreedyH *self = GST_DEINTERLACE_METHOD_GREEDY_H (object); - - switch (prop_id) { - case ARG_MAX_COMB: - self->max_comb = g_value_get_uint (value); - break; - case ARG_MOTION_THRESHOLD: - self->motion_threshold = g_value_get_uint (value); - break; - case ARG_MOTION_SENSE: - self->motion_sense = g_value_get_uint (value); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - } -} - -static void -gst_deinterlace_method_greedy_h_get_property (GObject * object, guint prop_id, - GValue * value, GParamSpec * pspec) -{ - GstDeinterlaceMethodGreedyH *self = GST_DEINTERLACE_METHOD_GREEDY_H (object); - - switch (prop_id) { - case ARG_MAX_COMB: - g_value_set_uint (value, self->max_comb); - break; - case ARG_MOTION_THRESHOLD: - g_value_set_uint (value, self->motion_threshold); - break; - case ARG_MOTION_SENSE: - g_value_set_uint (value, self->motion_sense); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - } -} - -static void -gst_deinterlace_method_greedy_h_class_init (GstDeinterlaceMethodGreedyHClass * - klass) -{ - GstDeinterlaceMethodClass *dim_class = (GstDeinterlaceMethodClass *) klass; - GObjectClass *gobject_class = (GObjectClass *) klass; -#ifdef BUILD_X86_ASM - guint cpu_flags = oil_cpu_get_flags (); -#endif - - gobject_class->set_property = gst_deinterlace_method_greedy_h_set_property; - gobject_class->get_property = gst_deinterlace_method_greedy_h_get_property; - - g_object_class_install_property (gobject_class, ARG_MAX_COMB, - g_param_spec_uint ("max-comb", - "Max comb", - "Max Comb", 0, 255, 5, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS) - ); - - g_object_class_install_property (gobject_class, ARG_MOTION_THRESHOLD, - g_param_spec_uint ("motion-threshold", - "Motion Threshold", - "Motion Threshold", - 0, 255, 25, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS) - ); - - g_object_class_install_property (gobject_class, ARG_MOTION_SENSE, - g_param_spec_uint ("motion-sense", - "Motion Sense", - "Motion Sense", - 0, 255, 30, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS) - ); - - dim_class->fields_required = 4; - dim_class->deinterlace_frame = deinterlace_frame_di_greedyh; - dim_class->name = "Motion Adaptive: Advanced Detection"; - dim_class->nick = "greedyh"; - dim_class->latency = 1; - -#ifdef BUILD_X86_ASM - if (cpu_flags & OIL_IMPL_FLAG_MMXEXT) { - klass->scanline = greedyDScaler_MMXEXT; - } else if (cpu_flags & OIL_IMPL_FLAG_3DNOW) { - klass->scanline = greedyDScaler_3DNOW; - } else if (cpu_flags & OIL_IMPL_FLAG_MMX) { - klass->scanline = greedyDScaler_MMX; - } else { - klass->scanline = greedyDScaler_C; - } -#else - klass->scanline = greedyDScaler_C; -#endif -} - -static void -gst_deinterlace_method_greedy_h_init (GstDeinterlaceMethodGreedyH * self) -{ - self->max_comb = 5; - self->motion_threshold = 25; - self->motion_sense = 30; -} diff --git a/gst/deinterlace2/tvtime/greedyhmacros.h b/gst/deinterlace2/tvtime/greedyhmacros.h deleted file mode 100644 index 0386c28e..00000000 --- a/gst/deinterlace2/tvtime/greedyhmacros.h +++ /dev/null @@ -1,75 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2001 Tom Barry. All rights reserved. -///////////////////////////////////////////////////////////////////////////// -// -// This file is subject to the terms of the GNU General Public License as -// published by the Free Software Foundation. A copy of this license is -// included with this software distribution in the file COPYING. If you -// do not have a copy, you may obtain a copy by writing to the Free -// Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -// -// This software 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 General Public License for more details -// -///////////////////////////////////////////////////////////////////////////// - -// Define a few macros for CPU dependent instructions. -// I suspect I don't really understand how the C macro preprocessor works but -// this seems to get the job done. // TRB 7/01 - -// BEFORE USING THESE YOU MUST SET: - -// #define SIMD_TYPE MMXEXT (or MMX or 3DNOW) - -// some macros for pavgb instruction -// V_PAVGB(mmr1, mmr2, mmr work register, smask) mmr2 may = mmrw if you can trash it - -#define V_PAVGB_MMX(mmr1, mmr2, mmrw, smask) \ - "movq "mmr2", "mmrw"\n\t" \ - "pand "smask", "mmrw"\n\t" \ - "psrlw $1, "mmrw"\n\t" \ - "pand "smask", "mmr1"\n\t" \ - "psrlw $1, "mmr1"\n\t" \ - "paddusb "mmrw", "mmr1"\n\t" -#define V_PAVGB_MMXEXT(mmr1, mmr2, mmrw, smask) "pavgb "mmr2", "mmr1"\n\t" -#define V_PAVGB_3DNOW(mmr1, mmr2, mmrw, smask) "pavgusb "mmr2", "mmr1"\n\t" -#define V_PAVGB(mmr1, mmr2, mmrw, smask) V_PAVGB2(mmr1, mmr2, mmrw, smask, SIMD_TYPE) -#define V_PAVGB2(mmr1, mmr2, mmrw, smask, simd_type) V_PAVGB3(mmr1, mmr2, mmrw, smask, simd_type) -#define V_PAVGB3(mmr1, mmr2, mmrw, smask, simd_type) V_PAVGB_##simd_type(mmr1, mmr2, mmrw, smask) - -// some macros for pmaxub instruction -#define V_PMAXUB_MMX(mmr1, mmr2) \ - "psubusb "mmr2", "mmr1"\n\t" \ - "paddusb "mmr2", "mmr1"\n\t" -#define V_PMAXUB_MMXEXT(mmr1, mmr2) "pmaxub "mmr2", "mmr1"\n\t" -#define V_PMAXUB_3DNOW(mmr1, mmr2) V_PMAXUB_MMX(mmr1, mmr2) // use MMX version -#define V_PMAXUB(mmr1, mmr2) V_PMAXUB2(mmr1, mmr2, SIMD_TYPE) -#define V_PMAXUB2(mmr1, mmr2, simd_type) V_PMAXUB3(mmr1, mmr2, simd_type) -#define V_PMAXUB3(mmr1, mmr2, simd_type) V_PMAXUB_##simd_type(mmr1, mmr2) - -// some macros for pminub instruction -// V_PMINUB(mmr1, mmr2, mmr work register) mmr2 may NOT = mmrw -#define V_PMINUB_MMX(mmr1, mmr2, mmrw) \ - "pcmpeqb "mmrw", "mmrw"\n\t" \ - "psubusb "mmr2", "mmrw"\n\t" \ - "paddusb "mmrw", "mmr1"\n\t" \ - "psubusb "mmrw", "mmr1"\n\t" -#define V_PMINUB_MMXEXT(mmr1, mmr2, mmrw) "pminub "mmr2", "mmr1"\n\t" -#define V_PMINUB_3DNOW(mmr1, mmr2, mmrw) V_PMINUB_MMX(mmr1, mmr2, mmrw) // use MMX version -#define V_PMINUB(mmr1, mmr2, mmrw) V_PMINUB2(mmr1, mmr2, mmrw, SIMD_TYPE) -#define V_PMINUB2(mmr1, mmr2, mmrw, simd_type) V_PMINUB3(mmr1, mmr2, mmrw, simd_type) -#define V_PMINUB3(mmr1, mmr2, mmrw, simd_type) V_PMINUB_##simd_type(mmr1, mmr2, mmrw) - -// some macros for movntq instruction -// V_MOVNTQ(mmr1, mmr2) -#define V_MOVNTQ_MMX(mmr1, mmr2) "movq "mmr2", "mmr1"\n\t" -#define V_MOVNTQ_3DNOW(mmr1, mmr2) "movq "mmr2", "mmr1"\n\t" -#define V_MOVNTQ_MMXEXT(mmr1, mmr2) "movntq "mmr2", "mmr1"\n\t" -#define V_MOVNTQ(mmr1, mmr2) V_MOVNTQ2(mmr1, mmr2, SIMD_TYPE) -#define V_MOVNTQ2(mmr1, mmr2, simd_type) V_MOVNTQ3(mmr1, mmr2, simd_type) -#define V_MOVNTQ3(mmr1, mmr2, simd_type) V_MOVNTQ_##simd_type(mmr1, mmr2) - -// end of macros - diff --git a/gst/deinterlace2/tvtime/linear.c b/gst/deinterlace2/tvtime/linear.c deleted file mode 100644 index 42403e49..00000000 --- a/gst/deinterlace2/tvtime/linear.c +++ /dev/null @@ -1,214 +0,0 @@ -/** - * Copyright (C) 2002 Billy Biggs . - * Copyright (C) 2008 Sebastian Dröge - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include "_stdint.h" -#include "gstdeinterlace2.h" -#include - -#define GST_TYPE_DEINTERLACE_METHOD_LINEAR (gst_deinterlace_method_linear_get_type ()) -#define GST_IS_DEINTERLACE_METHOD_LINEAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DEINTERLACE_METHOD_LINEAR)) -#define GST_IS_DEINTERLACE_METHOD_LINEAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_DEINTERLACE_METHOD_LINEAR)) -#define GST_DEINTERLACE_METHOD_LINEAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_DEINTERLACE_METHOD_LINEAR, GstDeinterlaceMethodLinearClass)) -#define GST_DEINTERLACE_METHOD_LINEAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_DEINTERLACE_METHOD_LINEAR, GstDeinterlaceMethodLinear)) -#define GST_DEINTERLACE_METHOD_LINEAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEINTERLACE_METHOD_LINEAR, GstDeinterlaceMethodLinearClass)) -#define GST_DEINTERLACE_METHOD_LINEAR_CAST(obj) ((GstDeinterlaceMethodLinear*)(obj)) - -GType gst_deinterlace_method_linear_get_type (void); - -typedef GstDeinterlaceSimpleMethod GstDeinterlaceMethodLinear; - -typedef GstDeinterlaceSimpleMethodClass GstDeinterlaceMethodLinearClass; - -static void -deinterlace_scanline_linear_c (GstDeinterlaceMethod * self, - GstDeinterlace2 * parent, guint8 * out, - GstDeinterlaceScanlineData * scanlines, gint width) -{ - gint i; - - width *= 2; - for (i = 0; i < width; i++) - out[i] = (scanlines->t0[i] + scanlines->b0[i]) / 2; -} - -#ifdef BUILD_X86_ASM -#include "mmx.h" -static void -deinterlace_scanline_linear_mmx (GstDeinterlaceMethod * self, - GstDeinterlace2 * parent, guint8 * out, - GstDeinterlaceScanlineData * scanlines, gint width) -{ - const mmx_t shiftmask = { 0xfefffefffefffeffULL }; /* To avoid shifting chroma to luma. */ - int i; - guint8 *bot = scanlines->b0, *top = scanlines->t0; - - for (i = width / 16; i; --i) { - movq_m2r (*bot, mm0); - movq_m2r (*top, mm1); - movq_m2r (*(bot + 8), mm2); - movq_m2r (*(top + 8), mm3); - movq_m2r (*(bot + 16), mm4); - movq_m2r (*(top + 16), mm5); - movq_m2r (*(bot + 24), mm6); - movq_m2r (*(top + 24), mm7); - pand_m2r (shiftmask, mm0); - pand_m2r (shiftmask, mm1); - pand_m2r (shiftmask, mm2); - pand_m2r (shiftmask, mm3); - pand_m2r (shiftmask, mm4); - pand_m2r (shiftmask, mm5); - pand_m2r (shiftmask, mm6); - pand_m2r (shiftmask, mm7); - psrlw_i2r (1, mm0); - psrlw_i2r (1, mm1); - psrlw_i2r (1, mm2); - psrlw_i2r (1, mm3); - psrlw_i2r (1, mm4); - psrlw_i2r (1, mm5); - psrlw_i2r (1, mm6); - psrlw_i2r (1, mm7); - paddb_r2r (mm1, mm0); - paddb_r2r (mm3, mm2); - paddb_r2r (mm5, mm4); - paddb_r2r (mm7, mm6); - movq_r2m (mm0, *out); - movq_r2m (mm2, *(out + 8)); - movq_r2m (mm4, *(out + 16)); - movq_r2m (mm6, *(out + 24)); - out += 32; - top += 32; - bot += 32; - } - width = (width & 0xf); - - for (i = width / 4; i; --i) { - movq_m2r (*bot, mm0); - movq_m2r (*top, mm1); - pand_m2r (shiftmask, mm0); - pand_m2r (shiftmask, mm1); - psrlw_i2r (1, mm0); - psrlw_i2r (1, mm1); - paddb_r2r (mm1, mm0); - movq_r2m (mm0, *out); - out += 8; - top += 8; - bot += 8; - } - width = width & 0x7; - - /* Handle last few pixels. */ - for (i = width * 2; i; --i) { - *out++ = ((*top++) + (*bot++)) >> 1; - } - - emms (); -} - -#include "sse.h" -static void -deinterlace_scanline_linear_mmxext (GstDeinterlaceMethod * self, - GstDeinterlace2 * parent, guint8 * out, - GstDeinterlaceScanlineData * scanlines, gint width) -{ - gint i; - guint8 *bot = scanlines->b0, *top = scanlines->t0; - - for (i = width / 16; i; --i) { - movq_m2r (*bot, mm0); - movq_m2r (*top, mm1); - movq_m2r (*(bot + 8), mm2); - movq_m2r (*(top + 8), mm3); - movq_m2r (*(bot + 16), mm4); - movq_m2r (*(top + 16), mm5); - movq_m2r (*(bot + 24), mm6); - movq_m2r (*(top + 24), mm7); - pavgb_r2r (mm1, mm0); - pavgb_r2r (mm3, mm2); - pavgb_r2r (mm5, mm4); - pavgb_r2r (mm7, mm6); - movntq_r2m (mm0, *out); - movntq_r2m (mm2, *(out + 8)); - movntq_r2m (mm4, *(out + 16)); - movntq_r2m (mm6, *(out + 24)); - out += 32; - top += 32; - bot += 32; - } - width = (width & 0xf); - - for (i = width / 4; i; --i) { - movq_m2r (*bot, mm0); - movq_m2r (*top, mm1); - pavgb_r2r (mm1, mm0); - movntq_r2m (mm0, *out); - out += 8; - top += 8; - bot += 8; - } - width = width & 0x7; - - /* Handle last few pixels. */ - for (i = width * 2; i; --i) { - *out++ = ((*top++) + (*bot++)) >> 1; - } - - emms (); -} - -#endif - -G_DEFINE_TYPE (GstDeinterlaceMethodLinear, gst_deinterlace_method_linear, - GST_TYPE_DEINTERLACE_SIMPLE_METHOD); - -static void -gst_deinterlace_method_linear_class_init (GstDeinterlaceMethodLinearClass * - klass) -{ - GstDeinterlaceMethodClass *dim_class = (GstDeinterlaceMethodClass *) klass; - GstDeinterlaceSimpleMethodClass *dism_class = - (GstDeinterlaceSimpleMethodClass *) klass; -#ifdef BUILD_X86_ASM - guint cpu_flags = oil_cpu_get_flags (); -#endif - - dim_class->fields_required = 1; - dim_class->name = "Television: Full resolution"; - dim_class->nick = "linear"; - dim_class->latency = 0; - - dism_class->interpolate_scanline = deinterlace_scanline_linear_c; - -#ifdef BUILD_X86_ASM - if (cpu_flags & OIL_IMPL_FLAG_MMXEXT) { - dism_class->interpolate_scanline = deinterlace_scanline_linear_mmxext; - } else if (cpu_flags & OIL_IMPL_FLAG_MMXEXT) { - dism_class->interpolate_scanline = deinterlace_scanline_linear_mmx; - } -#endif -} - -static void -gst_deinterlace_method_linear_init (GstDeinterlaceMethodLinear * self) -{ -} diff --git a/gst/deinterlace2/tvtime/linearblend.c b/gst/deinterlace2/tvtime/linearblend.c deleted file mode 100644 index c25c4d0e..00000000 --- a/gst/deinterlace2/tvtime/linearblend.c +++ /dev/null @@ -1,231 +0,0 @@ -/** - * Linear blend deinterlacing plugin. The idea for this algorithm came - * from the linear blend deinterlacer which originated in the mplayer - * sources. - * - * Copyright (C) 2002 Billy Biggs . - * Copyright (C) 2008 Sebastian Dröge - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include "_stdint.h" -#include "gstdeinterlace2.h" -#include - -#define GST_TYPE_DEINTERLACE_METHOD_LINEAR_BLEND (gst_deinterlace_method_linear_blend_get_type ()) -#define GST_IS_DEINTERLACE_METHOD_LINEAR_BLEND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DEINTERLACE_METHOD_LINEAR_BLEND)) -#define GST_IS_DEINTERLACE_METHOD_LINEAR_BLEND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_DEINTERLACE_METHOD_LINEAR_BLEND)) -#define GST_DEINTERLACE_METHOD_LINEAR_BLEND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_DEINTERLACE_METHOD_LINEAR_BLEND, GstDeinterlaceMethodLinearBlendClass)) -#define GST_DEINTERLACE_METHOD_LINEAR_BLEND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_DEINTERLACE_METHOD_LINEAR_BLEND, GstDeinterlaceMethodLinearBlend)) -#define GST_DEINTERLACE_METHOD_LINEAR_BLEND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEINTERLACE_METHOD_LINEAR_BLEND, GstDeinterlaceMethodLinearBlendClass)) -#define GST_DEINTERLACE_METHOD_LINEAR_BLEND_CAST(obj) ((GstDeinterlaceMethodLinearBlend*)(obj)) - -GType gst_deinterlace_method_linear_blend_get_type (void); - -typedef GstDeinterlaceSimpleMethod GstDeinterlaceMethodLinearBlend; - -typedef GstDeinterlaceSimpleMethodClass GstDeinterlaceMethodLinearBlendClass; - - -static inline void -deinterlace_scanline_linear_blend_c (GstDeinterlaceMethod * self, - GstDeinterlace2 * parent, guint8 * out, - GstDeinterlaceScanlineData * scanlines, gint width) -{ - guint8 *t0 = scanlines->t0; - guint8 *b0 = scanlines->b0; - guint8 *m1 = scanlines->m1; - - width *= 2; - - while (width--) { - *out++ = (*t0++ + *b0++ + (*m1++ << 1)) >> 2; - } -} - -static inline void -deinterlace_scanline_linear_blend2_c (GstDeinterlaceMethod * self, - GstDeinterlace2 * parent, guint8 * out, - GstDeinterlaceScanlineData * scanlines, gint width) -{ - guint8 *m0 = scanlines->m0; - guint8 *t1 = scanlines->t1; - guint8 *b1 = scanlines->b1; - - width *= 2; - while (width--) { - *out++ = (*t1++ + *b1++ + (*m0++ << 1)) >> 2; - } -} - -#ifdef BUILD_X86_ASM -#include "mmx.h" -static inline void -deinterlace_scanline_linear_blend_mmx (GstDeinterlaceMethod * self, - GstDeinterlace2 * parent, guint8 * out, - GstDeinterlaceScanlineData * scanlines, gint width) -{ - guint8 *t0 = scanlines->t0; - guint8 *b0 = scanlines->b0; - guint8 *m1 = scanlines->m1; - gint i; - - // Get width in bytes. - width *= 2; - i = width / 8; - width -= i * 8; - - pxor_r2r (mm7, mm7); - while (i--) { - movd_m2r (*t0, mm0); - movd_m2r (*b0, mm1); - movd_m2r (*m1, mm2); - - movd_m2r (*(t0 + 4), mm3); - movd_m2r (*(b0 + 4), mm4); - movd_m2r (*(m1 + 4), mm5); - - punpcklbw_r2r (mm7, mm0); - punpcklbw_r2r (mm7, mm1); - punpcklbw_r2r (mm7, mm2); - - punpcklbw_r2r (mm7, mm3); - punpcklbw_r2r (mm7, mm4); - punpcklbw_r2r (mm7, mm5); - - psllw_i2r (1, mm2); - psllw_i2r (1, mm5); - paddw_r2r (mm0, mm2); - paddw_r2r (mm3, mm5); - paddw_r2r (mm1, mm2); - paddw_r2r (mm4, mm5); - psrlw_i2r (2, mm2); - psrlw_i2r (2, mm5); - packuswb_r2r (mm2, mm2); - packuswb_r2r (mm5, mm5); - - movd_r2m (mm2, *out); - movd_r2m (mm5, *(out + 4)); - out += 8; - t0 += 8; - b0 += 8; - m1 += 8; - } - while (width--) { - *out++ = (*t0++ + *b0++ + (*m1++ << 1)) >> 2; - } - emms (); -} - -static inline void -deinterlace_scanline_linear_blend2_mmx (GstDeinterlaceMethod * self, - GstDeinterlace2 * parent, guint8 * out, - GstDeinterlaceScanlineData * scanlines, gint width) -{ - guint8 *m0 = scanlines->m0; - guint8 *t1 = scanlines->t1; - guint8 *b1 = scanlines->b1; - gint i; - - // Get width in bytes. - width *= 2; - i = width / 8; - width -= i * 8; - - pxor_r2r (mm7, mm7); - while (i--) { - movd_m2r (*t1, mm0); - movd_m2r (*b1, mm1); - movd_m2r (*m0, mm2); - - movd_m2r (*(t1 + 4), mm3); - movd_m2r (*(b1 + 4), mm4); - movd_m2r (*(m0 + 4), mm5); - - punpcklbw_r2r (mm7, mm0); - punpcklbw_r2r (mm7, mm1); - punpcklbw_r2r (mm7, mm2); - - punpcklbw_r2r (mm7, mm3); - punpcklbw_r2r (mm7, mm4); - punpcklbw_r2r (mm7, mm5); - - psllw_i2r (1, mm2); - psllw_i2r (1, mm5); - paddw_r2r (mm0, mm2); - paddw_r2r (mm3, mm5); - paddw_r2r (mm1, mm2); - paddw_r2r (mm4, mm5); - psrlw_i2r (2, mm2); - psrlw_i2r (2, mm5); - packuswb_r2r (mm2, mm2); - packuswb_r2r (mm5, mm5); - - movd_r2m (mm2, *out); - movd_r2m (mm5, *(out + 4)); - out += 8; - t1 += 8; - b1 += 8; - m0 += 8; - } - while (width--) { - *out++ = (*t1++ + *b1++ + (*m0++ << 1)) >> 2; - } - emms (); -} - -#endif - -G_DEFINE_TYPE (GstDeinterlaceMethodLinearBlend, - gst_deinterlace_method_linear_blend, GST_TYPE_DEINTERLACE_SIMPLE_METHOD); - -static void - gst_deinterlace_method_linear_blend_class_init - (GstDeinterlaceMethodLinearBlendClass * klass) -{ - GstDeinterlaceMethodClass *dim_class = (GstDeinterlaceMethodClass *) klass; - GstDeinterlaceSimpleMethodClass *dism_class = - (GstDeinterlaceSimpleMethodClass *) klass; -#ifdef BUILD_X86_ASM - guint cpu_flags = oil_cpu_get_flags (); -#endif - - dim_class->fields_required = 2; - dim_class->name = "Blur: Temporal"; - dim_class->nick = "linearblend"; - dim_class->latency = 0; - - dism_class->interpolate_scanline = deinterlace_scanline_linear_blend_c; - dism_class->copy_scanline = deinterlace_scanline_linear_blend2_c; - -#ifdef BUILD_X86_ASM - if (cpu_flags & OIL_IMPL_FLAG_MMX) { - dism_class->interpolate_scanline = deinterlace_scanline_linear_blend_mmx; - dism_class->copy_scanline = deinterlace_scanline_linear_blend2_mmx; - } -#endif -} - -static void -gst_deinterlace_method_linear_blend_init (GstDeinterlaceMethodLinearBlend * - self) -{ -} diff --git a/gst/deinterlace2/tvtime/mmx.h b/gst/deinterlace2/tvtime/mmx.h deleted file mode 100644 index 3627e61b..00000000 --- a/gst/deinterlace2/tvtime/mmx.h +++ /dev/null @@ -1,723 +0,0 @@ -/* mmx.h - - MultiMedia eXtensions GCC interface library for IA32. - - To use this library, simply include this header file - and compile with GCC. You MUST have inlining enabled - in order for mmx_ok() to work; this can be done by - simply using -O on the GCC command line. - - Compiling with -DMMX_TRACE will cause detailed trace - output to be sent to stderr for each mmx operation. - This adds lots of code, and obviously slows execution to - a crawl, but can be very useful for debugging. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT - LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS FOR ANY PARTICULAR PURPOSE. - - 1997-98 by H. Dietz and R. Fisher - - History: - 97-98* R.Fisher Early versions - 980501 R.Fisher Original Release - 980611* H.Dietz Rewrite, correctly implementing inlines, and - R.Fisher including direct register accesses. - 980616 R.Fisher Release of 980611 as 980616. - 980714 R.Fisher Minor corrections to Makefile, etc. - 980715 R.Fisher mmx_ok() now prevents optimizer from using - clobbered values. - mmx_ok() now checks if cpuid instruction is - available before trying to use it. - 980726* R.Fisher mm_support() searches for AMD 3DNow, Cyrix - Extended MMX, and standard MMX. It returns a - value which is positive if any of these are - supported, and can be masked with constants to - see which. mmx_ok() is now a call to this - 980726* R.Fisher Added i2r support for shift functions - 980919 R.Fisher Fixed AMD extended feature recognition bug. - 980921 R.Fisher Added definition/check for _MMX_H. - Added "float s[2]" to mmx_t for use with - 3DNow and EMMX. So same mmx_t can be used. - 981013 R.Fisher Fixed cpuid function 1 bug (looked at wrong reg) - Fixed psllq_i2r error in mmxtest.c - - * Unreleased (internal or interim) versions - - Notes: - It appears that the latest gas has the pand problem fixed, therefore - I'll undefine BROKEN_PAND by default. - String compares may be quicker than the multiple test/jumps in vendor - test sequence in mmx_ok(), but I'm not concerned with that right now. - - Acknowledgments: - Jussi Laako for pointing out the errors ultimately found to be - connected to the failure to notify the optimizer of clobbered values. - Roger Hardiman for reminding us that CPUID isn't everywhere, and that - someone may actually try to use this on a machine without CPUID. - Also for suggesting code for checking this. - Robert Dale for pointing out the AMD recognition bug. - Jimmy Mayfield and Carl Witty for pointing out the Intel recognition - bug. - Carl Witty for pointing out the psllq_i2r test bug. -*/ - -#ifndef _MMX_H -#define _MMX_H - -/*#define MMX_TRACE */ - -/* Warning: at this writing, the version of GAS packaged - with most Linux distributions does not handle the - parallel AND operation mnemonic correctly. If the - symbol BROKEN_PAND is defined, a slower alternative - coding will be used. If execution of mmxtest results - in an illegal instruction fault, define this symbol. -*/ -#undef BROKEN_PAND - - -/* The type of an value that fits in an MMX register - (note that long long constant values MUST be suffixed - by LL and unsigned long long values by ULL, lest - they be truncated by the compiler) -*/ -typedef union { - long long q; /* Quadword (64-bit) value */ - unsigned long long uq; /* Unsigned Quadword */ - int d[2]; /* 2 Doubleword (32-bit) values */ - unsigned int ud[2]; /* 2 Unsigned Doubleword */ - short w[4]; /* 4 Word (16-bit) values */ - unsigned short uw[4]; /* 4 Unsigned Word */ - char b[8]; /* 8 Byte (8-bit) values */ - unsigned char ub[8]; /* 8 Unsigned Byte */ - float s[2]; /* Single-precision (32-bit) value */ -} mmx_t; - - -/* Function to test if multimedia instructions are supported... -*/ -inline extern int -mm_support(void) -{ - /* Returns 1 if MMX instructions are supported, - 3 if Cyrix MMX and Extended MMX instructions are supported - 5 if AMD MMX and 3DNow! instructions are supported - 0 if hardware does not support any of these - */ - register int rval = 0; - - __asm__ __volatile__ ( - /* See if CPUID instruction is supported ... */ - /* ... Get copies of EFLAGS into eax and ecx */ - "pushf\n\t" - "popl %%eax\n\t" - "movl %%eax, %%ecx\n\t" - - /* ... Toggle the ID bit in one copy and store */ - /* to the EFLAGS reg */ - "xorl $0x200000, %%eax\n\t" - "push %%eax\n\t" - "popf\n\t" - - /* ... Get the (hopefully modified) EFLAGS */ - "pushf\n\t" - "popl %%eax\n\t" - - /* ... Compare and test result */ - "xorl %%eax, %%ecx\n\t" - "testl $0x200000, %%ecx\n\t" - "jz NotSupported1\n\t" /* Nothing supported */ - - - /* Get standard CPUID information, and - go to a specific vendor section */ - "movl $0, %%eax\n\t" - "cpuid\n\t" - - /* Check for Intel */ - "cmpl $0x756e6547, %%ebx\n\t" - "jne TryAMD\n\t" - "cmpl $0x49656e69, %%edx\n\t" - "jne TryAMD\n\t" - "cmpl $0x6c65746e, %%ecx\n" - "jne TryAMD\n\t" - "jmp Intel\n\t" - - /* Check for AMD */ - "\nTryAMD:\n\t" - "cmpl $0x68747541, %%ebx\n\t" - "jne TryCyrix\n\t" - "cmpl $0x69746e65, %%edx\n\t" - "jne TryCyrix\n\t" - "cmpl $0x444d4163, %%ecx\n" - "jne TryCyrix\n\t" - "jmp AMD\n\t" - - /* Check for Cyrix */ - "\nTryCyrix:\n\t" - "cmpl $0x69727943, %%ebx\n\t" - "jne NotSupported2\n\t" - "cmpl $0x736e4978, %%edx\n\t" - "jne NotSupported3\n\t" - "cmpl $0x64616574, %%ecx\n\t" - "jne NotSupported4\n\t" - /* Drop through to Cyrix... */ - - - /* Cyrix Section */ - /* See if extended CPUID is supported */ - "movl $0x80000000, %%eax\n\t" - "cpuid\n\t" - "cmpl $0x80000000, %%eax\n\t" - "jl MMXtest\n\t" /* Try standard CPUID instead */ - - /* Extended CPUID supported, so get extended features */ - "movl $0x80000001, %%eax\n\t" - "cpuid\n\t" - "testl $0x00800000, %%eax\n\t" /* Test for MMX */ - "jz NotSupported5\n\t" /* MMX not supported */ - "testl $0x01000000, %%eax\n\t" /* Test for Ext'd MMX */ - "jnz EMMXSupported\n\t" - "movl $1, %0:\n\n\t" /* MMX Supported */ - "jmp Return\n\n" - "EMMXSupported:\n\t" - "movl $3, %0:\n\n\t" /* EMMX and MMX Supported */ - "jmp Return\n\t" - - - /* AMD Section */ - "AMD:\n\t" - - /* See if extended CPUID is supported */ - "movl $0x80000000, %%eax\n\t" - "cpuid\n\t" - "cmpl $0x80000000, %%eax\n\t" - "jl MMXtest\n\t" /* Try standard CPUID instead */ - - /* Extended CPUID supported, so get extended features */ - "movl $0x80000001, %%eax\n\t" - "cpuid\n\t" - "testl $0x00800000, %%edx\n\t" /* Test for MMX */ - "jz NotSupported6\n\t" /* MMX not supported */ - "testl $0x80000000, %%edx\n\t" /* Test for 3DNow! */ - "jnz ThreeDNowSupported\n\t" - "movl $1, %0:\n\n\t" /* MMX Supported */ - "jmp Return\n\n" - "ThreeDNowSupported:\n\t" - "movl $5, %0:\n\n\t" /* 3DNow! and MMX Supported */ - "jmp Return\n\t" - - - /* Intel Section */ - "Intel:\n\t" - - /* Check for MMX */ - "MMXtest:\n\t" - "movl $1, %%eax\n\t" - "cpuid\n\t" - "testl $0x00800000, %%edx\n\t" /* Test for MMX */ - "jz NotSupported7\n\t" /* MMX Not supported */ - "movl $1, %0:\n\n\t" /* MMX Supported */ - "jmp Return\n\t" - - /* Nothing supported */ - "\nNotSupported1:\n\t" - "#movl $101, %0:\n\n\t" - "\nNotSupported2:\n\t" - "#movl $102, %0:\n\n\t" - "\nNotSupported3:\n\t" - "#movl $103, %0:\n\n\t" - "\nNotSupported4:\n\t" - "#movl $104, %0:\n\n\t" - "\nNotSupported5:\n\t" - "#movl $105, %0:\n\n\t" - "\nNotSupported6:\n\t" - "#movl $106, %0:\n\n\t" - "\nNotSupported7:\n\t" - "#movl $107, %0:\n\n\t" - "movl $0, %0:\n\n\t" - - "Return:\n\t" - : "=a" (rval) - : /* no input */ - : "eax", "ebx", "ecx", "edx" - ); - - /* Return */ - return(rval); -} - -/* Function to test if mmx instructions are supported... -*/ -inline extern int -mmx_ok(void) -{ - /* Returns 1 if MMX instructions are supported, 0 otherwise */ - return ( mm_support() & 0x1 ); -} - - -/* Helper functions for the instruction macros that follow... - (note that memory-to-register, m2r, instructions are nearly - as efficient as register-to-register, r2r, instructions; - however, memory-to-memory instructions are really simulated - as a convenience, and are only 1/3 as efficient) -*/ -#ifdef MMX_TRACE - -/* Include the stuff for printing a trace to stderr... -*/ - -#include - -#define mmx_i2r(op, imm, reg) \ - { \ - mmx_t mmx_trace; \ - mmx_trace = (imm); \ - fprintf(stderr, #op "_i2r(" #imm "=0x%016llx, ", mmx_trace.q); \ - __asm__ __volatile__ ("movq %%" #reg ", %0" \ - : "=X" (mmx_trace) \ - : /* nothing */ ); \ - fprintf(stderr, #reg "=0x%016llx) => ", mmx_trace.q); \ - __asm__ __volatile__ (#op " %0, %%" #reg \ - : /* nothing */ \ - : "X" (imm)); \ - __asm__ __volatile__ ("movq %%" #reg ", %0" \ - : "=X" (mmx_trace) \ - : /* nothing */ ); \ - fprintf(stderr, #reg "=0x%016llx\n", mmx_trace.q); \ - } - -#define mmx_m2r(op, mem, reg) \ - { \ - mmx_t mmx_trace; \ - mmx_trace = (mem); \ - fprintf(stderr, #op "_m2r(" #mem "=0x%016llx, ", mmx_trace.q); \ - __asm__ __volatile__ ("movq %%" #reg ", %0" \ - : "=X" (mmx_trace) \ - : /* nothing */ ); \ - fprintf(stderr, #reg "=0x%016llx) => ", mmx_trace.q); \ - __asm__ __volatile__ (#op " %0, %%" #reg \ - : /* nothing */ \ - : "X" (mem)); \ - __asm__ __volatile__ ("movq %%" #reg ", %0" \ - : "=X" (mmx_trace) \ - : /* nothing */ ); \ - fprintf(stderr, #reg "=0x%016llx\n", mmx_trace.q); \ - } - -#define mmx_r2m(op, reg, mem) \ - { \ - mmx_t mmx_trace; \ - __asm__ __volatile__ ("movq %%" #reg ", %0" \ - : "=X" (mmx_trace) \ - : /* nothing */ ); \ - fprintf(stderr, #op "_r2m(" #reg "=0x%016llx, ", mmx_trace.q); \ - mmx_trace = (mem); \ - fprintf(stderr, #mem "=0x%016llx) => ", mmx_trace.q); \ - __asm__ __volatile__ (#op " %%" #reg ", %0" \ - : "=X" (mem) \ - : /* nothing */ ); \ - mmx_trace = (mem); \ - fprintf(stderr, #mem "=0x%016llx\n", mmx_trace.q); \ - } - -#define mmx_r2r(op, regs, regd) \ - { \ - mmx_t mmx_trace; \ - __asm__ __volatile__ ("movq %%" #regs ", %0" \ - : "=X" (mmx_trace) \ - : /* nothing */ ); \ - fprintf(stderr, #op "_r2r(" #regs "=0x%016llx, ", mmx_trace.q); \ - __asm__ __volatile__ ("movq %%" #regd ", %0" \ - : "=X" (mmx_trace) \ - : /* nothing */ ); \ - fprintf(stderr, #regd "=0x%016llx) => ", mmx_trace.q); \ - __asm__ __volatile__ (#op " %" #regs ", %" #regd); \ - __asm__ __volatile__ ("movq %%" #regd ", %0" \ - : "=X" (mmx_trace) \ - : /* nothing */ ); \ - fprintf(stderr, #regd "=0x%016llx\n", mmx_trace.q); \ - } - -#define mmx_m2m(op, mems, memd) \ - { \ - mmx_t mmx_trace; \ - mmx_trace = (mems); \ - fprintf(stderr, #op "_m2m(" #mems "=0x%016llx, ", mmx_trace.q); \ - mmx_trace = (memd); \ - fprintf(stderr, #memd "=0x%016llx) => ", mmx_trace.q); \ - __asm__ __volatile__ ("movq %0, %%mm0\n\t" \ - #op " %1, %%mm0\n\t" \ - "movq %%mm0, %0" \ - : "=X" (memd) \ - : "X" (mems)); \ - mmx_trace = (memd); \ - fprintf(stderr, #memd "=0x%016llx\n", mmx_trace.q); \ - } - -#else - -/* These macros are a lot simpler without the tracing... -*/ - -#define mmx_i2r(op, imm, reg) \ - __asm__ __volatile__ (#op " $" #imm ", %%" #reg \ - : /* nothing */ \ - : /* nothing */); - -#define mmx_m2r(op, mem, reg) \ - __asm__ __volatile__ (#op " %0, %%" #reg \ - : /* nothing */ \ - : "m" (mem)) - -#define mmx_r2m(op, reg, mem) \ - __asm__ __volatile__ (#op " %%" #reg ", %0" \ - : "=m" (mem) \ - : /* nothing */ ) - -#define mmx_r2r(op, regs, regd) \ - __asm__ __volatile__ (#op " %" #regs ", %" #regd) - -#define mmx_m2m(op, mems, memd) \ - __asm__ __volatile__ ("movq %0, %%mm0\n\t" \ - #op " %1, %%mm0\n\t" \ - "movq %%mm0, %0" \ - : "=m" (memd) \ - : "m" (mems)) - -#endif - - -/* 1x64 MOVe Quadword - (this is both a load and a store... - in fact, it is the only way to store) -*/ -#define movq_m2r(var, reg) mmx_m2r(movq, var, reg) -#define movq_r2m(reg, var) mmx_r2m(movq, reg, var) -#define movq_r2r(regs, regd) mmx_r2r(movq, regs, regd) -#define movq(vars, vard) \ - __asm__ __volatile__ ("movq %1, %%mm0\n\t" \ - "movq %%mm0, %0" \ - : "=X" (vard) \ - : "X" (vars)) - - -/* 1x32 MOVe Doubleword - (like movq, this is both load and store... - but is most useful for moving things between - mmx registers and ordinary registers) -*/ -#define movd_m2r(var, reg) mmx_m2r(movd, var, reg) -#define movd_r2m(reg, var) mmx_r2m(movd, reg, var) -#define movd_r2r(regs, regd) mmx_r2r(movd, regs, regd) -#define movd(vars, vard) \ - __asm__ __volatile__ ("movd %1, %%mm0\n\t" \ - "movd %%mm0, %0" \ - : "=X" (vard) \ - : "X" (vars)) - - -/* 2x32, 4x16, and 8x8 Parallel ADDs -*/ -#define paddd_m2r(var, reg) mmx_m2r(paddd, var, reg) -#define paddd_r2r(regs, regd) mmx_r2r(paddd, regs, regd) -#define paddd(vars, vard) mmx_m2m(paddd, vars, vard) - -#define paddw_m2r(var, reg) mmx_m2r(paddw, var, reg) -#define paddw_r2r(regs, regd) mmx_r2r(paddw, regs, regd) -#define paddw(vars, vard) mmx_m2m(paddw, vars, vard) - -#define paddb_m2r(var, reg) mmx_m2r(paddb, var, reg) -#define paddb_r2r(regs, regd) mmx_r2r(paddb, regs, regd) -#define paddb(vars, vard) mmx_m2m(paddb, vars, vard) - - -/* 4x16 and 8x8 Parallel ADDs using Saturation arithmetic -*/ -#define paddsw_m2r(var, reg) mmx_m2r(paddsw, var, reg) -#define paddsw_r2r(regs, regd) mmx_r2r(paddsw, regs, regd) -#define paddsw(vars, vard) mmx_m2m(paddsw, vars, vard) - -#define paddsb_m2r(var, reg) mmx_m2r(paddsb, var, reg) -#define paddsb_r2r(regs, regd) mmx_r2r(paddsb, regs, regd) -#define paddsb(vars, vard) mmx_m2m(paddsb, vars, vard) - - -/* 4x16 and 8x8 Parallel ADDs using Unsigned Saturation arithmetic -*/ -#define paddusw_m2r(var, reg) mmx_m2r(paddusw, var, reg) -#define paddusw_r2r(regs, regd) mmx_r2r(paddusw, regs, regd) -#define paddusw(vars, vard) mmx_m2m(paddusw, vars, vard) - -#define paddusb_m2r(var, reg) mmx_m2r(paddusb, var, reg) -#define paddusb_r2r(regs, regd) mmx_r2r(paddusb, regs, regd) -#define paddusb(vars, vard) mmx_m2m(paddusb, vars, vard) - - -/* 2x32, 4x16, and 8x8 Parallel SUBs -*/ -#define psubd_m2r(var, reg) mmx_m2r(psubd, var, reg) -#define psubd_r2r(regs, regd) mmx_r2r(psubd, regs, regd) -#define psubd(vars, vard) mmx_m2m(psubd, vars, vard) - -#define psubw_m2r(var, reg) mmx_m2r(psubw, var, reg) -#define psubw_r2r(regs, regd) mmx_r2r(psubw, regs, regd) -#define psubw(vars, vard) mmx_m2m(psubw, vars, vard) - -#define psubb_m2r(var, reg) mmx_m2r(psubb, var, reg) -#define psubb_r2r(regs, regd) mmx_r2r(psubb, regs, regd) -#define psubb(vars, vard) mmx_m2m(psubb, vars, vard) - - -/* 4x16 and 8x8 Parallel SUBs using Saturation arithmetic -*/ -#define psubsw_m2r(var, reg) mmx_m2r(psubsw, var, reg) -#define psubsw_r2r(regs, regd) mmx_r2r(psubsw, regs, regd) -#define psubsw(vars, vard) mmx_m2m(psubsw, vars, vard) - -#define psubsb_m2r(var, reg) mmx_m2r(psubsb, var, reg) -#define psubsb_r2r(regs, regd) mmx_r2r(psubsb, regs, regd) -#define psubsb(vars, vard) mmx_m2m(psubsb, vars, vard) - - -/* 4x16 and 8x8 Parallel SUBs using Unsigned Saturation arithmetic -*/ -#define psubusw_m2r(var, reg) mmx_m2r(psubusw, var, reg) -#define psubusw_r2r(regs, regd) mmx_r2r(psubusw, regs, regd) -#define psubusw(vars, vard) mmx_m2m(psubusw, vars, vard) - -#define psubusb_m2r(var, reg) mmx_m2r(psubusb, var, reg) -#define psubusb_r2r(regs, regd) mmx_r2r(psubusb, regs, regd) -#define psubusb(vars, vard) mmx_m2m(psubusb, vars, vard) - - -/* 4x16 Parallel MULs giving Low 4x16 portions of results -*/ -#define pmullw_m2r(var, reg) mmx_m2r(pmullw, var, reg) -#define pmullw_r2r(regs, regd) mmx_r2r(pmullw, regs, regd) -#define pmullw(vars, vard) mmx_m2m(pmullw, vars, vard) - - -/* 4x16 Parallel MULs giving High 4x16 portions of results -*/ -#define pmulhw_m2r(var, reg) mmx_m2r(pmulhw, var, reg) -#define pmulhw_r2r(regs, regd) mmx_r2r(pmulhw, regs, regd) -#define pmulhw(vars, vard) mmx_m2m(pmulhw, vars, vard) - - -/* 4x16->2x32 Parallel Mul-ADD - (muls like pmullw, then adds adjacent 16-bit fields - in the multiply result to make the final 2x32 result) -*/ -#define pmaddwd_m2r(var, reg) mmx_m2r(pmaddwd, var, reg) -#define pmaddwd_r2r(regs, regd) mmx_r2r(pmaddwd, regs, regd) -#define pmaddwd(vars, vard) mmx_m2m(pmaddwd, vars, vard) - - -/* 1x64 bitwise AND -*/ -#ifdef BROKEN_PAND -#define pand_m2r(var, reg) \ - { \ - mmx_m2r(pandn, (mmx_t) -1LL, reg); \ - mmx_m2r(pandn, var, reg); \ - } -#define pand_r2r(regs, regd) \ - { \ - mmx_m2r(pandn, (mmx_t) -1LL, regd); \ - mmx_r2r(pandn, regs, regd); \ - } -#define pand(vars, vard) \ - { \ - movq_m2r(vard, mm0); \ - mmx_m2r(pandn, (mmx_t) -1LL, mm0); \ - mmx_m2r(pandn, vars, mm0); \ - movq_r2m(mm0, vard); \ - } -#else -#define pand_m2r(var, reg) mmx_m2r(pand, var, reg) -#define pand_r2r(regs, regd) mmx_r2r(pand, regs, regd) -#define pand(vars, vard) mmx_m2m(pand, vars, vard) -#endif - - -/* 1x64 bitwise AND with Not the destination -*/ -#define pandn_m2r(var, reg) mmx_m2r(pandn, var, reg) -#define pandn_r2r(regs, regd) mmx_r2r(pandn, regs, regd) -#define pandn(vars, vard) mmx_m2m(pandn, vars, vard) - - -/* 1x64 bitwise OR -*/ -#define por_m2r(var, reg) mmx_m2r(por, var, reg) -#define por_r2r(regs, regd) mmx_r2r(por, regs, regd) -#define por(vars, vard) mmx_m2m(por, vars, vard) - - -/* 1x64 bitwise eXclusive OR -*/ -#define pxor_m2r(var, reg) mmx_m2r(pxor, var, reg) -#define pxor_r2r(regs, regd) mmx_r2r(pxor, regs, regd) -#define pxor(vars, vard) mmx_m2m(pxor, vars, vard) - - -/* 2x32, 4x16, and 8x8 Parallel CoMPare for EQuality - (resulting fields are either 0 or -1) -*/ -#define pcmpeqd_m2r(var, reg) mmx_m2r(pcmpeqd, var, reg) -#define pcmpeqd_r2r(regs, regd) mmx_r2r(pcmpeqd, regs, regd) -#define pcmpeqd(vars, vard) mmx_m2m(pcmpeqd, vars, vard) - -#define pcmpeqw_m2r(var, reg) mmx_m2r(pcmpeqw, var, reg) -#define pcmpeqw_r2r(regs, regd) mmx_r2r(pcmpeqw, regs, regd) -#define pcmpeqw(vars, vard) mmx_m2m(pcmpeqw, vars, vard) - -#define pcmpeqb_m2r(var, reg) mmx_m2r(pcmpeqb, var, reg) -#define pcmpeqb_r2r(regs, regd) mmx_r2r(pcmpeqb, regs, regd) -#define pcmpeqb(vars, vard) mmx_m2m(pcmpeqb, vars, vard) - - -/* 2x32, 4x16, and 8x8 Parallel CoMPare for Greater Than - (resulting fields are either 0 or -1) -*/ -#define pcmpgtd_m2r(var, reg) mmx_m2r(pcmpgtd, var, reg) -#define pcmpgtd_r2r(regs, regd) mmx_r2r(pcmpgtd, regs, regd) -#define pcmpgtd(vars, vard) mmx_m2m(pcmpgtd, vars, vard) - -#define pcmpgtw_m2r(var, reg) mmx_m2r(pcmpgtw, var, reg) -#define pcmpgtw_r2r(regs, regd) mmx_r2r(pcmpgtw, regs, regd) -#define pcmpgtw(vars, vard) mmx_m2m(pcmpgtw, vars, vard) - -#define pcmpgtb_m2r(var, reg) mmx_m2r(pcmpgtb, var, reg) -#define pcmpgtb_r2r(regs, regd) mmx_r2r(pcmpgtb, regs, regd) -#define pcmpgtb(vars, vard) mmx_m2m(pcmpgtb, vars, vard) - - -/* 1x64, 2x32, and 4x16 Parallel Shift Left Logical -*/ -#define psllq_i2r(imm, reg) mmx_i2r(psllq, imm, reg) -#define psllq_m2r(var, reg) mmx_m2r(psllq, var, reg) -#define psllq_r2r(regs, regd) mmx_r2r(psllq, regs, regd) -#define psllq(vars, vard) mmx_m2m(psllq, vars, vard) - -#define pslld_i2r(imm, reg) mmx_i2r(pslld, imm, reg) -#define pslld_m2r(var, reg) mmx_m2r(pslld, var, reg) -#define pslld_r2r(regs, regd) mmx_r2r(pslld, regs, regd) -#define pslld(vars, vard) mmx_m2m(pslld, vars, vard) - -#define psllw_i2r(imm, reg) mmx_i2r(psllw, imm, reg) -#define psllw_m2r(var, reg) mmx_m2r(psllw, var, reg) -#define psllw_r2r(regs, regd) mmx_r2r(psllw, regs, regd) -#define psllw(vars, vard) mmx_m2m(psllw, vars, vard) - - -/* 1x64, 2x32, and 4x16 Parallel Shift Right Logical -*/ -#define psrlq_i2r(imm, reg) mmx_i2r(psrlq, imm, reg) -#define psrlq_m2r(var, reg) mmx_m2r(psrlq, var, reg) -#define psrlq_r2r(regs, regd) mmx_r2r(psrlq, regs, regd) -#define psrlq(vars, vard) mmx_m2m(psrlq, vars, vard) - -#define psrld_i2r(imm, reg) mmx_i2r(psrld, imm, reg) -#define psrld_m2r(var, reg) mmx_m2r(psrld, var, reg) -#define psrld_r2r(regs, regd) mmx_r2r(psrld, regs, regd) -#define psrld(vars, vard) mmx_m2m(psrld, vars, vard) - -#define psrlw_i2r(imm, reg) mmx_i2r(psrlw, imm, reg) -#define psrlw_m2r(var, reg) mmx_m2r(psrlw, var, reg) -#define psrlw_r2r(regs, regd) mmx_r2r(psrlw, regs, regd) -#define psrlw(vars, vard) mmx_m2m(psrlw, vars, vard) - - -/* 2x32 and 4x16 Parallel Shift Right Arithmetic -*/ -#define psrad_i2r(imm, reg) mmx_i2r(psrad, imm, reg) -#define psrad_m2r(var, reg) mmx_m2r(psrad, var, reg) -#define psrad_r2r(regs, regd) mmx_r2r(psrad, regs, regd) -#define psrad(vars, vard) mmx_m2m(psrad, vars, vard) - -#define psraw_i2r(imm, reg) mmx_i2r(psraw, imm, reg) -#define psraw_m2r(var, reg) mmx_m2r(psraw, var, reg) -#define psraw_r2r(regs, regd) mmx_r2r(psraw, regs, regd) -#define psraw(vars, vard) mmx_m2m(psraw, vars, vard) - - -/* 2x32->4x16 and 4x16->8x8 PACK and Signed Saturate - (packs source and dest fields into dest in that order) -*/ -#define packssdw_m2r(var, reg) mmx_m2r(packssdw, var, reg) -#define packssdw_r2r(regs, regd) mmx_r2r(packssdw, regs, regd) -#define packssdw(vars, vard) mmx_m2m(packssdw, vars, vard) - -#define packsswb_m2r(var, reg) mmx_m2r(packsswb, var, reg) -#define packsswb_r2r(regs, regd) mmx_r2r(packsswb, regs, regd) -#define packsswb(vars, vard) mmx_m2m(packsswb, vars, vard) - - -/* 4x16->8x8 PACK and Unsigned Saturate - (packs source and dest fields into dest in that order) -*/ -#define packuswb_m2r(var, reg) mmx_m2r(packuswb, var, reg) -#define packuswb_r2r(regs, regd) mmx_r2r(packuswb, regs, regd) -#define packuswb(vars, vard) mmx_m2m(packuswb, vars, vard) - - -/* 2x32->1x64, 4x16->2x32, and 8x8->4x16 UNPaCK Low - (interleaves low half of dest with low half of source - as padding in each result field) -*/ -#define punpckldq_m2r(var, reg) mmx_m2r(punpckldq, var, reg) -#define punpckldq_r2r(regs, regd) mmx_r2r(punpckldq, regs, regd) -#define punpckldq(vars, vard) mmx_m2m(punpckldq, vars, vard) - -#define punpcklwd_m2r(var, reg) mmx_m2r(punpcklwd, var, reg) -#define punpcklwd_r2r(regs, regd) mmx_r2r(punpcklwd, regs, regd) -#define punpcklwd(vars, vard) mmx_m2m(punpcklwd, vars, vard) - -#define punpcklbw_m2r(var, reg) mmx_m2r(punpcklbw, var, reg) -#define punpcklbw_r2r(regs, regd) mmx_r2r(punpcklbw, regs, regd) -#define punpcklbw(vars, vard) mmx_m2m(punpcklbw, vars, vard) - - -/* 2x32->1x64, 4x16->2x32, and 8x8->4x16 UNPaCK High - (interleaves high half of dest with high half of source - as padding in each result field) -*/ -#define punpckhdq_m2r(var, reg) mmx_m2r(punpckhdq, var, reg) -#define punpckhdq_r2r(regs, regd) mmx_r2r(punpckhdq, regs, regd) -#define punpckhdq(vars, vard) mmx_m2m(punpckhdq, vars, vard) - -#define punpckhwd_m2r(var, reg) mmx_m2r(punpckhwd, var, reg) -#define punpckhwd_r2r(regs, regd) mmx_r2r(punpckhwd, regs, regd) -#define punpckhwd(vars, vard) mmx_m2m(punpckhwd, vars, vard) - -#define punpckhbw_m2r(var, reg) mmx_m2r(punpckhbw, var, reg) -#define punpckhbw_r2r(regs, regd) mmx_r2r(punpckhbw, regs, regd) -#define punpckhbw(vars, vard) mmx_m2m(punpckhbw, vars, vard) - - -/* Empty MMx State - (used to clean-up when going from mmx to float use - of the registers that are shared by both; note that - there is no float-to-mmx operation needed, because - only the float tag word info is corruptible) -*/ -#ifdef MMX_TRACE - -#define emms() \ - { \ - fprintf(stderr, "emms()\n"); \ - __asm__ __volatile__ ("emms"); \ - } - -#else - -#define emms() __asm__ __volatile__ ("emms") - -#endif - -#endif diff --git a/gst/deinterlace2/tvtime/plugins.h b/gst/deinterlace2/tvtime/plugins.h deleted file mode 100644 index 8fb01af5..00000000 --- a/gst/deinterlace2/tvtime/plugins.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * - * GStreamer - * Copyright (C) 2004 Billy Biggs - * Copyright (C) 2008 Sebastian Dröge - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Relicensed for GStreamer from GPL to LGPL with permit from Billy Biggs. - * See: http://bugzilla.gnome.org/show_bug.cgi?id=163578 - */ - -#ifndef TVTIME_PLUGINS_H_INCLUDED -#define TVTIME_PLUGINS_H_INCLUDED - -#define GST_TYPE_DEINTERLACE_TOMSMOCOMP (gst_deinterlace_method_tomsmocomp_get_type ()) -#define GST_TYPE_DEINTERLACE_GREEDY_H (gst_deinterlace_method_greedy_h_get_type ()) -#define GST_TYPE_DEINTERLACE_GREEDY_L (gst_deinterlace_method_greedy_l_get_type ()) -#define GST_TYPE_DEINTERLACE_VFIR (gst_deinterlace_method_vfir_get_type ()) -#define GST_TYPE_DEINTERLACE_LINEAR (gst_deinterlace_method_linear_get_type ()) -#define GST_TYPE_DEINTERLACE_LINEAR_BLEND (gst_deinterlace_method_linear_blend_get_type ()) -#define GST_TYPE_DEINTERLACE_SCALER_BOB (gst_deinterlace_method_scaler_bob_get_type ()) -#define GST_TYPE_DEINTERLACE_WEAVE (gst_deinterlace_method_weave_get_type ()) -#define GST_TYPE_DEINTERLACE_WEAVE_TFF (gst_deinterlace_method_weave_tff_get_type ()) -#define GST_TYPE_DEINTERLACE_WEAVE_BFF (gst_deinterlace_method_weave_bff_get_type ()) - -GType gst_deinterlace_method_tomsmocomp_get_type (void); -GType gst_deinterlace_method_greedy_h_get_type (void); -GType gst_deinterlace_method_greedy_l_get_type (void); -GType gst_deinterlace_method_vfir_get_type (void); - -GType gst_deinterlace_method_linear_get_type (void); -GType gst_deinterlace_method_linear_blend_get_type (void); -GType gst_deinterlace_method_scaler_bob_get_type (void); -GType gst_deinterlace_method_weave_get_type (void); -GType gst_deinterlace_method_weave_tff_get_type (void); -GType gst_deinterlace_method_weave_bff_get_type (void); - -#endif /* TVTIME_PLUGINS_H_INCLUDED */ diff --git a/gst/deinterlace2/tvtime/scalerbob.c b/gst/deinterlace2/tvtime/scalerbob.c deleted file mode 100644 index a37792ab..00000000 --- a/gst/deinterlace2/tvtime/scalerbob.c +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Double lines - * Copyright (C) 2008 Sebastian Dröge - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include "_stdint.h" -#include "gstdeinterlace2.h" -#include - -#define GST_TYPE_DEINTERLACE_METHOD_SCALER_BOB (gst_deinterlace_method_scaler_bob_get_type ()) -#define GST_IS_DEINTERLACE_METHOD_SCALER_BOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DEINTERLACE_METHOD_SCALER_BOB)) -#define GST_IS_DEINTERLACE_METHOD_SCALER_BOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_DEINTERLACE_METHOD_SCALER_BOB)) -#define GST_DEINTERLACE_METHOD_SCALER_BOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_DEINTERLACE_METHOD_SCALER_BOB, GstDeinterlaceMethodScalerBobClass)) -#define GST_DEINTERLACE_METHOD_SCALER_BOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_DEINTERLACE_METHOD_SCALER_BOB, GstDeinterlaceMethodScalerBob)) -#define GST_DEINTERLACE_METHOD_SCALER_BOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEINTERLACE_METHOD_SCALER_BOB, GstDeinterlaceMethodScalerBobClass)) -#define GST_DEINTERLACE_METHOD_SCALER_BOB_CAST(obj) ((GstDeinterlaceMethodScalerBob*)(obj)) - -GType gst_deinterlace_method_scaler_bob_get_type (void); - -typedef GstDeinterlaceSimpleMethod GstDeinterlaceMethodScalerBob; - -typedef GstDeinterlaceSimpleMethodClass GstDeinterlaceMethodScalerBobClass; - - -static void -deinterlace_scanline_scaler_bob (GstDeinterlaceMethod * self, - GstDeinterlace2 * parent, guint8 * out, - GstDeinterlaceScanlineData * scanlines, gint width) -{ - oil_memcpy (out, scanlines->t0, parent->row_stride); -} - -G_DEFINE_TYPE (GstDeinterlaceMethodScalerBob, gst_deinterlace_method_scaler_bob, - GST_TYPE_DEINTERLACE_SIMPLE_METHOD); - -static void -gst_deinterlace_method_scaler_bob_class_init (GstDeinterlaceMethodScalerBobClass - * klass) -{ - GstDeinterlaceMethodClass *dim_class = (GstDeinterlaceMethodClass *) klass; - GstDeinterlaceSimpleMethodClass *dism_class = - (GstDeinterlaceSimpleMethodClass *) klass; - - dim_class->fields_required = 1; - dim_class->name = "Double lines"; - dim_class->nick = "scalerbob"; - dim_class->latency = 0; - - dism_class->interpolate_scanline = deinterlace_scanline_scaler_bob; -} - -static void -gst_deinterlace_method_scaler_bob_init (GstDeinterlaceMethodScalerBob * self) -{ -} diff --git a/gst/deinterlace2/tvtime/sse.h b/gst/deinterlace2/tvtime/sse.h deleted file mode 100644 index 2e00ee0c..00000000 --- a/gst/deinterlace2/tvtime/sse.h +++ /dev/null @@ -1,992 +0,0 @@ -/* sse.h - - Streaming SIMD Extenstions (a.k.a. Katmai New Instructions) - GCC interface library for IA32. - - To use this library, simply include this header file - and compile with GCC. You MUST have inlining enabled - in order for sse_ok() to work; this can be done by - simply using -O on the GCC command line. - - Compiling with -DSSE_TRACE will cause detailed trace - output to be sent to stderr for each sse operation. - This adds lots of code, and obviously slows execution to - a crawl, but can be very useful for debugging. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT - LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS FOR ANY PARTICULAR PURPOSE. - - 1999 by R. Fisher - Based on libmmx by H. Dietz and R. Fisher - - Notes: - This is still extremely alpha. - Because this library depends on an assembler which understands the - SSE opcodes, you probably won't be able to use this yet. - For now, do not use TRACE versions. These both make use - of the MMX registers, not the SSE registers. This will be resolved - at a later date. - ToDo: - Rewrite TRACE macros - Major Debugging Work -*/ - -#ifndef _SSE_H -#define _SSE_H - - - -/* The type of an value that fits in an SSE register - (note that long long constant values MUST be suffixed - by LL and unsigned long long values by ULL, lest - they be truncated by the compiler) -*/ -typedef union { - float sf[4]; /* Single-precision (32-bit) value */ -} __attribute__ ((aligned (16))) sse_t; /* On a 16 byte (128-bit) boundary */ - - -#if 0 -/* Function to test if multimedia instructions are supported... -*/ -inline extern int -mm_support(void) -{ - /* Returns 1 if MMX instructions are supported, - 3 if Cyrix MMX and Extended MMX instructions are supported - 5 if AMD MMX and 3DNow! instructions are supported - 9 if MMX and SSE instructions are supported - 0 if hardware does not support any of these - */ - register int rval = 0; - - __asm__ __volatile__ ( - /* See if CPUID instruction is supported ... */ - /* ... Get copies of EFLAGS into eax and ecx */ - "pushf\n\t" - "popl %%eax\n\t" - "movl %%eax, %%ecx\n\t" - - /* ... Toggle the ID bit in one copy and store */ - /* to the EFLAGS reg */ - "xorl $0x200000, %%eax\n\t" - "push %%eax\n\t" - "popf\n\t" - - /* ... Get the (hopefully modified) EFLAGS */ - "pushf\n\t" - "popl %%eax\n\t" - - /* ... Compare and test result */ - "xorl %%eax, %%ecx\n\t" - "testl $0x200000, %%ecx\n\t" - "jz NotSupported1\n\t" /* CPUID not supported */ - - - /* Get standard CPUID information, and - go to a specific vendor section */ - "movl $0, %%eax\n\t" - "cpuid\n\t" - - /* Check for Intel */ - "cmpl $0x756e6547, %%ebx\n\t" - "jne TryAMD\n\t" - "cmpl $0x49656e69, %%edx\n\t" - "jne TryAMD\n\t" - "cmpl $0x6c65746e, %%ecx\n" - "jne TryAMD\n\t" - "jmp Intel\n\t" - - /* Check for AMD */ - "\nTryAMD:\n\t" - "cmpl $0x68747541, %%ebx\n\t" - "jne TryCyrix\n\t" - "cmpl $0x69746e65, %%edx\n\t" - "jne TryCyrix\n\t" - "cmpl $0x444d4163, %%ecx\n" - "jne TryCyrix\n\t" - "jmp AMD\n\t" - - /* Check for Cyrix */ - "\nTryCyrix:\n\t" - "cmpl $0x69727943, %%ebx\n\t" - "jne NotSupported2\n\t" - "cmpl $0x736e4978, %%edx\n\t" - "jne NotSupported3\n\t" - "cmpl $0x64616574, %%ecx\n\t" - "jne NotSupported4\n\t" - /* Drop through to Cyrix... */ - - - /* Cyrix Section */ - /* See if extended CPUID level 80000001 is supported */ - /* The value of CPUID/80000001 for the 6x86MX is undefined - according to the Cyrix CPU Detection Guide (Preliminary - Rev. 1.01 table 1), so we'll check the value of eax for - CPUID/0 to see if standard CPUID level 2 is supported. - According to the table, the only CPU which supports level - 2 is also the only one which supports extended CPUID levels. - */ - "cmpl $0x2, %%eax\n\t" - "jne MMXtest\n\t" /* Use standard CPUID instead */ - - /* Extended CPUID supported (in theory), so get extended - features */ - "movl $0x80000001, %%eax\n\t" - "cpuid\n\t" - "testl $0x00800000, %%eax\n\t" /* Test for MMX */ - "jz NotSupported5\n\t" /* MMX not supported */ - "testl $0x01000000, %%eax\n\t" /* Test for Ext'd MMX */ - "jnz EMMXSupported\n\t" - "movl $1, %0:\n\n\t" /* MMX Supported */ - "jmp Return\n\n" - "EMMXSupported:\n\t" - "movl $3, %0:\n\n\t" /* EMMX and MMX Supported */ - "jmp Return\n\t" - - - /* AMD Section */ - "AMD:\n\t" - - /* See if extended CPUID is supported */ - "movl $0x80000000, %%eax\n\t" - "cpuid\n\t" - "cmpl $0x80000000, %%eax\n\t" - "jl MMXtest\n\t" /* Use standard CPUID instead */ - - /* Extended CPUID supported, so get extended features */ - "movl $0x80000001, %%eax\n\t" - "cpuid\n\t" - "testl $0x00800000, %%edx\n\t" /* Test for MMX */ - "jz NotSupported6\n\t" /* MMX not supported */ - "testl $0x80000000, %%edx\n\t" /* Test for 3DNow! */ - "jnz ThreeDNowSupported\n\t" - "movl $1, %0:\n\n\t" /* MMX Supported */ - "jmp Return\n\n" - "ThreeDNowSupported:\n\t" - "movl $5, %0:\n\n\t" /* 3DNow! and MMX Supported */ - "jmp Return\n\t" - - - /* Intel Section */ - "Intel:\n\t" - - /* Check for SSE */ - "SSEtest:\n\t" - "movl $1, %%eax\n\t" - "cpuid\n\t" - "testl $0x02000000, %%edx\n\t" /* Test for SSE */ - "jz MMXtest\n\t" /* SSE Not supported */ - "movl $9, %0:\n\n\t" /* SSE Supported */ - "jmp Return\n\t" - - /* Check for MMX */ - "MMXtest:\n\t" - "movl $1, %%eax\n\t" - "cpuid\n\t" - "testl $0x00800000, %%edx\n\t" /* Test for MMX */ - "jz NotSupported7\n\t" /* MMX Not supported */ - "movl $1, %0:\n\n\t" /* MMX Supported */ - "jmp Return\n\t" - - /* Nothing supported */ - "\nNotSupported1:\n\t" - "#movl $101, %0:\n\n\t" - "\nNotSupported2:\n\t" - "#movl $102, %0:\n\n\t" - "\nNotSupported3:\n\t" - "#movl $103, %0:\n\n\t" - "\nNotSupported4:\n\t" - "#movl $104, %0:\n\n\t" - "\nNotSupported5:\n\t" - "#movl $105, %0:\n\n\t" - "\nNotSupported6:\n\t" - "#movl $106, %0:\n\n\t" - "\nNotSupported7:\n\t" - "#movl $107, %0:\n\n\t" - "movl $0, %0:\n\n\t" - - "Return:\n\t" - : "=a" (rval) - : /* no input */ - : "eax", "ebx", "ecx", "edx" - ); - - /* Return */ - return(rval); -} - -/* Function to test if sse instructions are supported... -*/ -inline extern int -sse_ok(void) -{ - /* Returns 1 if SSE instructions are supported, 0 otherwise */ - return ( (mm_support() & 0x8) >> 3 ); -} -#endif - - - -/* Helper functions for the instruction macros that follow... - (note that memory-to-register, m2r, instructions are nearly - as efficient as register-to-register, r2r, instructions; - however, memory-to-memory instructions are really simulated - as a convenience, and are only 1/3 as efficient) -*/ -#ifdef SSE_TRACE - -/* Include the stuff for printing a trace to stderr... -*/ - -#include - -#define sse_i2r(op, imm, reg) \ - { \ - sse_t sse_trace; \ - sse_trace.uq = (imm); \ - fprintf(stderr, #op "_i2r(" #imm "=0x%08x%08x, ", \ - sse_trace.d[1], sse_trace.d[0]); \ - __asm__ __volatile__ ("movq %%" #reg ", %0" \ - : "=X" (sse_trace) \ - : /* nothing */ ); \ - fprintf(stderr, #reg "=0x%08x%08x) => ", \ - sse_trace.d[1], sse_trace.d[0]); \ - __asm__ __volatile__ (#op " %0, %%" #reg \ - : /* nothing */ \ - : "X" (imm)); \ - __asm__ __volatile__ ("movq %%" #reg ", %0" \ - : "=X" (sse_trace) \ - : /* nothing */ ); \ - fprintf(stderr, #reg "=0x%08x%08x\n", \ - sse_trace.d[1], sse_trace.d[0]); \ - } - -#define sse_m2r(op, mem, reg) \ - { \ - sse_t sse_trace; \ - sse_trace = (mem); \ - fprintf(stderr, #op "_m2r(" #mem "=0x%08x%08x, ", \ - sse_trace.d[1], sse_trace.d[0]); \ - __asm__ __volatile__ ("movq %%" #reg ", %0" \ - : "=X" (sse_trace) \ - : /* nothing */ ); \ - fprintf(stderr, #reg "=0x%08x%08x) => ", \ - sse_trace.d[1], sse_trace.d[0]); \ - __asm__ __volatile__ (#op " %0, %%" #reg \ - : /* nothing */ \ - : "X" (mem)); \ - __asm__ __volatile__ ("movq %%" #reg ", %0" \ - : "=X" (sse_trace) \ - : /* nothing */ ); \ - fprintf(stderr, #reg "=0x%08x%08x\n", \ - sse_trace.d[1], sse_trace.d[0]); \ - } - -#define sse_r2m(op, reg, mem) \ - { \ - sse_t sse_trace; \ - __asm__ __volatile__ ("movq %%" #reg ", %0" \ - : "=X" (sse_trace) \ - : /* nothing */ ); \ - fprintf(stderr, #op "_r2m(" #reg "=0x%08x%08x, ", \ - sse_trace.d[1], sse_trace.d[0]); \ - sse_trace = (mem); \ - fprintf(stderr, #mem "=0x%08x%08x) => ", \ - sse_trace.d[1], sse_trace.d[0]); \ - __asm__ __volatile__ (#op " %%" #reg ", %0" \ - : "=X" (mem) \ - : /* nothing */ ); \ - sse_trace = (mem); \ - fprintf(stderr, #mem "=0x%08x%08x\n", \ - sse_trace.d[1], sse_trace.d[0]); \ - } - -#define sse_r2r(op, regs, regd) \ - { \ - sse_t sse_trace; \ - __asm__ __volatile__ ("movq %%" #regs ", %0" \ - : "=X" (sse_trace) \ - : /* nothing */ ); \ - fprintf(stderr, #op "_r2r(" #regs "=0x%08x%08x, ", \ - sse_trace.d[1], sse_trace.d[0]); \ - __asm__ __volatile__ ("movq %%" #regd ", %0" \ - : "=X" (sse_trace) \ - : /* nothing */ ); \ - fprintf(stderr, #regd "=0x%08x%08x) => ", \ - sse_trace.d[1], sse_trace.d[0]); \ - __asm__ __volatile__ (#op " %" #regs ", %" #regd); \ - __asm__ __volatile__ ("movq %%" #regd ", %0" \ - : "=X" (sse_trace) \ - : /* nothing */ ); \ - fprintf(stderr, #regd "=0x%08x%08x\n", \ - sse_trace.d[1], sse_trace.d[0]); \ - } - -#define sse_m2m(op, mems, memd) \ - { \ - sse_t sse_trace; \ - sse_trace = (mems); \ - fprintf(stderr, #op "_m2m(" #mems "=0x%08x%08x, ", \ - sse_trace.d[1], sse_trace.d[0]); \ - sse_trace = (memd); \ - fprintf(stderr, #memd "=0x%08x%08x) => ", \ - sse_trace.d[1], sse_trace.d[0]); \ - __asm__ __volatile__ ("movq %0, %%mm0\n\t" \ - #op " %1, %%mm0\n\t" \ - "movq %%mm0, %0" \ - : "=X" (memd) \ - : "X" (mems)); \ - sse_trace = (memd); \ - fprintf(stderr, #memd "=0x%08x%08x\n", \ - sse_trace.d[1], sse_trace.d[0]); \ - } - -#else - -/* These macros are a lot simpler without the tracing... -*/ - -#define sse_i2r(op, imm, reg) \ - __asm__ __volatile__ (#op " %0, %%" #reg \ - : /* nothing */ \ - : "X" (imm) ) - -#define sse_m2r(op, mem, reg) \ - __asm__ __volatile__ (#op " %0, %%" #reg \ - : /* nothing */ \ - : "X" (mem)) - -#define sse_r2m(op, reg, mem) \ - __asm__ __volatile__ (#op " %%" #reg ", %0" \ - : "=X" (mem) \ - : /* nothing */ ) - -#define sse_r2r(op, regs, regd) \ - __asm__ __volatile__ (#op " %" #regs ", %" #regd) - -#define sse_r2ri(op, regs, regd, imm) \ - __asm__ __volatile__ (#op " %0, %%" #regs ", %%" #regd \ - : /* nothing */ \ - : "X" (imm) ) - -/* Load data from mems to xmmreg, operate on xmmreg, and store data to memd */ -#define sse_m2m(op, mems, memd, xmmreg) \ - __asm__ __volatile__ ("movups %0, %%xmm0\n\t" \ - #op " %1, %%xmm0\n\t" \ - "movups %%mm0, %0" \ - : "=X" (memd) \ - : "X" (mems)) - -#define sse_m2ri(op, mem, reg, subop) \ - __asm__ __volatile__ (#op " %0, %%" #reg ", " #subop \ - : /* nothing */ \ - : "X" (mem)) - -#define sse_m2mi(op, mems, memd, xmmreg, subop) \ - __asm__ __volatile__ ("movups %0, %%xmm0\n\t" \ - #op " %1, %%xmm0, " #subop "\n\t" \ - "movups %%mm0, %0" \ - : "=X" (memd) \ - : "X" (mems)) -#endif - - - - -/* 1x128 MOVe Aligned four Packed Single-fp -*/ -#define movaps_m2r(var, reg) sse_m2r(movaps, var, reg) -#define movaps_r2m(reg, var) sse_r2m(movaps, reg, var) -#define movaps_r2r(regs, regd) sse_r2r(movaps, regs, regd) -#define movaps(vars, vard) \ - __asm__ __volatile__ ("movaps %1, %%mm0\n\t" \ - "movaps %%mm0, %0" \ - : "=X" (vard) \ - : "X" (vars)) - - -/* 1x128 MOVe aligned Non-Temporal four Packed Single-fp -*/ -#define movntps_r2m(xmmreg, var) sse_r2m(movntps, xmmreg, var) - - -/* 1x64 MOVe Non-Temporal Quadword -*/ -#define movntq_r2m(mmreg, var) sse_r2m(movntq, mmreg, var) - - -/* 1x128 MOVe Unaligned four Packed Single-fp -*/ -#define movups_m2r(var, reg) sse_m2r(movups, var, reg) -#define movups_r2m(reg, var) sse_r2m(movups, reg, var) -#define movups_r2r(regs, regd) sse_r2r(movups, regs, regd) -#define movups(vars, vard) \ - __asm__ __volatile__ ("movups %1, %%mm0\n\t" \ - "movups %%mm0, %0" \ - : "=X" (vard) \ - : "X" (vars)) - - -/* MOVe High to Low Packed Single-fp - high half of 4x32f (x) -> low half of 4x32f (y) -*/ -#define movhlps_r2r(regs, regd) sse_r2r(movhlps, regs, regd) - - -/* MOVe Low to High Packed Single-fp - low half of 4x32f (x) -> high half of 4x32f (y) -*/ -#define movlhps_r2r(regs, regd) sse_r2r(movlhps, regs, regd) - - -/* MOVe High Packed Single-fp - 2x32f -> high half of 4x32f -*/ -#define movhps_m2r(var, reg) sse_m2r(movhps, var, reg) -#define movhps_r2m(reg, var) sse_r2m(movhps, reg, var) -#define movhps(vars, vard) \ - __asm__ __volatile__ ("movhps %1, %%mm0\n\t" \ - "movhps %%mm0, %0" \ - : "=X" (vard) \ - : "X" (vars)) - - -/* MOVe Low Packed Single-fp - 2x32f -> low half of 4x32f -*/ -#define movlps_m2r(var, reg) sse_m2r(movlps, var, reg) -#define movlps_r2m(reg, var) sse_r2m(movlps, reg, var) -#define movlps(vars, vard) \ - __asm__ __volatile__ ("movlps %1, %%mm0\n\t" \ - "movlps %%mm0, %0" \ - : "=X" (vard) \ - : "X" (vars)) - - -/* MOVe Scalar Single-fp - lowest field of 4x32f (x) -> lowest field of 4x32f (y) -*/ -#define movss_m2r(var, reg) sse_m2r(movss, var, reg) -#define movss_r2m(reg, var) sse_r2m(movss, reg, var) -#define movss_r2r(regs, regd) sse_r2r(movss, regs, regd) -#define movss(vars, vard) \ - __asm__ __volatile__ ("movss %1, %%mm0\n\t" \ - "movss %%mm0, %0" \ - : "=X" (vard) \ - : "X" (vars)) - - -/* 4x16 Packed SHUFfle Word -*/ -#define pshufw_m2r(var, reg, index) sse_m2ri(pshufw, var, reg, index) -#define pshufw_r2r(regs, regd, index) sse_r2ri(pshufw, regs, regd, index) - - -/* 1x128 SHUFfle Packed Single-fp -*/ -#define shufps_m2r(var, reg, index) sse_m2ri(shufps, var, reg, index) -#define shufps_r2r(regs, regd, index) sse_r2ri(shufps, regs, regd, index) - - -/* ConVerT Packed signed Int32 to(2) Packed Single-fp -*/ -#define cvtpi2ps_m2r(var, xmmreg) sse_m2r(cvtpi2ps, var, xmmreg) -#define cvtpi2ps_r2r(mmreg, xmmreg) sse_r2r(cvtpi2ps, mmreg, xmmreg) - - -/* ConVerT Packed Single-fp to(2) Packed signed Int32 -*/ -#define cvtps2pi_m2r(var, mmreg) sse_m2r(cvtps2pi, var, mmreg) -#define cvtps2pi_r2r(xmmreg, mmreg) sse_r2r(cvtps2pi, mmreg, xmmreg) - - -/* ConVerT with Truncate Packed Single-fp to(2) Packed Int32 -*/ -#define cvttps2pi_m2r(var, mmreg) sse_m2r(cvttps2pi, var, mmreg) -#define cvttps2pi_r2r(xmmreg, mmreg) sse_r2r(cvttps2pi, mmreg, xmmreg) - - -/* ConVerT Signed Int32 to(2) Single-fp (Scalar) -*/ -#define cvtsi2ss_m2r(var, xmmreg) sse_m2r(cvtsi2ss, var, xmmreg) -#define cvtsi2ss_r2r(reg, xmmreg) sse_r2r(cvtsi2ss, reg, xmmreg) - - -/* ConVerT Scalar Single-fp to(2) Signed Int32 -*/ -#define cvtss2si_m2r(var, reg) sse_m2r(cvtss2si, var, reg) -#define cvtss2si_r2r(xmmreg, reg) sse_r2r(cvtss2si, xmmreg, reg) - - -/* ConVerT with Truncate Scalar Single-fp to(2) Signed Int32 -*/ -#define cvttss2si_m2r(var, reg) sse_m2r(cvtss2si, var, reg) -#define cvttss2si_r2r(xmmreg, reg) sse_r2r(cvtss2si, xmmreg, reg) - - -/* Parallel EXTRact Word from 4x16 -*/ -#define pextrw_r2r(mmreg, reg, field) sse_r2ri(pextrw, mmreg, reg, field) - - -/* Parallel INSeRt Word from 4x16 -*/ -#define pinsrw_r2r(reg, mmreg, field) sse_r2ri(pinsrw, reg, mmreg, field) - - - -/* MOVe MaSK from Packed Single-fp -*/ -#ifdef SSE_TRACE - #define movmskps(xmmreg, reg) \ - { \ - fprintf(stderr, "movmskps()\n"); \ - __asm__ __volatile__ ("movmskps %" #xmmreg ", %" #reg) \ - } -#else - #define movmskps(xmmreg, reg) \ - __asm__ __volatile__ ("movmskps %" #xmmreg ", %" #reg) -#endif - - -/* Parallel MOVe MaSK from mmx reg to 32-bit reg -*/ -#ifdef SSE_TRACE - #define pmovmskb(mmreg, reg) \ - { \ - fprintf(stderr, "movmskps()\n"); \ - __asm__ __volatile__ ("movmskps %" #mmreg ", %" #reg) \ - } -#else - #define pmovmskb(mmreg, reg) \ - __asm__ __volatile__ ("movmskps %" #mmreg ", %" #reg) -#endif - - -/* MASKed MOVe from 8x8 to memory pointed to by (e)di register -*/ -#define maskmovq(mmregs, fieldreg) sse_r2ri(maskmovq, mmregs, fieldreg) - - - - -/* 4x32f Parallel ADDs -*/ -#define addps_m2r(var, reg) sse_m2r(addps, var, reg) -#define addps_r2r(regs, regd) sse_r2r(addps, regs, regd) -#define addps(vars, vard, xmmreg) sse_m2m(addps, vars, vard, xmmreg) - - -/* Lowest Field of 4x32f Parallel ADDs -*/ -#define addss_m2r(var, reg) sse_m2r(addss, var, reg) -#define addss_r2r(regs, regd) sse_r2r(addss, regs, regd) -#define addss(vars, vard, xmmreg) sse_m2m(addss, vars, vard, xmmreg) - - -/* 4x32f Parallel SUBs -*/ -#define subps_m2r(var, reg) sse_m2r(subps, var, reg) -#define subps_r2r(regs, regd) sse_r2r(subps, regs, regd) -#define subps(vars, vard, xmmreg) sse_m2m(subps, vars, vard, xmmreg) - - -/* Lowest Field of 4x32f Parallel SUBs -*/ -#define subss_m2r(var, reg) sse_m2r(subss, var, reg) -#define subss_r2r(regs, regd) sse_r2r(subss, regs, regd) -#define subss(vars, vard, xmmreg) sse_m2m(subss, vars, vard, xmmreg) - - -/* 8x8u -> 4x16u Packed Sum of Absolute Differences -*/ -#define psadbw_m2r(var, reg) sse_m2r(psadbw, var, reg) -#define psadbw_r2r(regs, regd) sse_r2r(psadbw, regs, regd) -#define psadbw(vars, vard, mmreg) sse_m2m(psadbw, vars, vard, mmreg) - - -/* 4x16u Parallel MUL High Unsigned -*/ -#define pmulhuw_m2r(var, reg) sse_m2r(pmulhuw, var, reg) -#define pmulhuw_r2r(regs, regd) sse_r2r(pmulhuw, regs, regd) -#define pmulhuw(vars, vard, mmreg) sse_m2m(pmulhuw, vars, vard, mmreg) - - -/* 4x32f Parallel MULs -*/ -#define mulps_m2r(var, reg) sse_m2r(mulps, var, reg) -#define mulps_r2r(regs, regd) sse_r2r(mulps, regs, regd) -#define mulps(vars, vard, xmmreg) sse_m2m(mulps, vars, vard, xmmreg) - - -/* Lowest Field of 4x32f Parallel MULs -*/ -#define mulss_m2r(var, reg) sse_m2r(mulss, var, reg) -#define mulss_r2r(regs, regd) sse_r2r(mulss, regs, regd) -#define mulss(vars, vard, xmmreg) sse_m2m(mulss, vars, vard, xmmreg) - - -/* 4x32f Parallel DIVs -*/ -#define divps_m2r(var, reg) sse_m2r(divps, var, reg) -#define divps_r2r(regs, regd) sse_r2r(divps, regs, regd) -#define divps(vars, vard, xmmreg) sse_m2m(divps, vars, vard, xmmreg) - - -/* Lowest Field of 4x32f Parallel DIVs -*/ -#define divss_m2r(var, reg) sse_m2r(divss, var, reg) -#define divss_r2r(regs, regd) sse_r2r(divss, regs, regd) -#define divss(vars, vard, xmmreg) sse_m2m(divss, vars, vard, xmmreg) - - -/* 4x32f Parallel Reciprocals -*/ -#define rcpps_m2r(var, reg) sse_m2r(rcpps, var, reg) -#define rcpps_r2r(regs, regd) sse_r2r(rcpps, regs, regd) -#define rcpps(vars, vard, xmmreg) sse_m2m(rcpps, vars, vard, xmmreg) - - -/* Lowest Field of 4x32f Parallel Reciprocals -*/ -#define rcpss_m2r(var, reg) sse_m2r(rcpss, var, reg) -#define rcpss_r2r(regs, regd) sse_r2r(rcpss, regs, regd) -#define rcpss(vars, vard, xmmreg) sse_m2m(rcpss, vars, vard, xmmreg) - - -/* 4x32f Parallel Square Root of Reciprocals -*/ -#define rsqrtps_m2r(var, reg) sse_m2r(rsqrtps, var, reg) -#define rsqrtps_r2r(regs, regd) sse_r2r(rsqrtps, regs, regd) -#define rsqrtps(vars, vard, xmmreg) sse_m2m(rsqrtps, vars, vard, xmmreg) - - -/* Lowest Field of 4x32f Parallel Square Root of Reciprocals -*/ -#define rsqrtss_m2r(var, reg) sse_m2r(rsqrtss, var, reg) -#define rsqrtss_r2r(regs, regd) sse_r2r(rsqrtss, regs, regd) -#define rsqrtss(vars, vard, xmmreg) sse_m2m(rsqrtss, vars, vard, xmmreg) - - -/* 4x32f Parallel Square Roots -*/ -#define sqrtps_m2r(var, reg) sse_m2r(sqrtps, var, reg) -#define sqrtps_r2r(regs, regd) sse_r2r(sqrtps, regs, regd) -#define sqrtps(vars, vard, xmmreg) sse_m2m(sqrtps, vars, vard, xmmreg) - - -/* Lowest Field of 4x32f Parallel Square Roots -*/ -#define sqrtss_m2r(var, reg) sse_m2r(sqrtss, var, reg) -#define sqrtss_r2r(regs, regd) sse_r2r(sqrtss, regs, regd) -#define sqrtss(vars, vard, xmmreg) sse_m2m(sqrtss, vars, vard, xmmreg) - - -/* 8x8u and 4x16u Parallel AVeraGe -*/ -#define pavgb_m2r(var, reg) sse_m2r(pavgb, var, reg) -#define pavgb_r2r(regs, regd) sse_r2r(pavgb, regs, regd) -#define pavgb(vars, vard, mmreg) sse_m2m(pavgb, vars, vard, mmreg) - -#define pavgw_m2r(var, reg) sse_m2r(pavgw, var, reg) -#define pavgw_r2r(regs, regd) sse_r2r(pavgw, regs, regd) -#define pavgw(vars, vard, mmreg) sse_m2m(pavgw, vars, vard, mmreg) - - -/* 1x128 bitwise AND -*/ -#define andps_m2r(var, reg) sse_m2r(andps, var, reg) -#define andps_r2r(regs, regd) sse_r2r(andps, regs, regd) -#define andps(vars, vard, xmmreg) sse_m2m(andps, vars, vard, xmmreg) - - -/* 1x128 bitwise AND with Not the destination -*/ -#define andnps_m2r(var, reg) sse_m2r(andnps, var, reg) -#define andnps_r2r(regs, regd) sse_r2r(andnps, regs, regd) -#define andnps(vars, vard, xmmreg) sse_m2m(andnps, vars, vard, xmmreg) - - -/* 1x128 bitwise OR -*/ -#define orps_m2r(var, reg) sse_m2r(orps, var, reg) -#define orps_r2r(regs, regd) sse_r2r(orps, regs, regd) -#define orps(vars, vard, xmmreg) sse_m2m(orps, vars, vard, xmmreg) - - -/* 1x128 bitwise eXclusive OR -*/ -#define xorps_m2r(var, reg) sse_m2r(xorps, var, reg) -#define xorps_r2r(regs, regd) sse_r2r(xorps, regs, regd) -#define xorps(vars, vard, xmmreg) sse_m2m(xorps, vars, vard, xmmreg) - - -/* 8x8u, 4x16, and 4x32f Parallel Maximum -*/ -#define pmaxub_m2r(var, reg) sse_m2r(pmaxub, var, reg) -#define pmaxub_r2r(regs, regd) sse_r2r(pmaxub, regs, regd) -#define pmaxub(vars, vard, mmreg) sse_m2m(pmaxub, vars, vard, mmreg) - -#define pmaxsw_m2r(var, reg) sse_m2r(pmaxsw, var, reg) -#define pmaxsw_r2r(regs, regd) sse_r2r(pmaxsw, regs, regd) -#define pmaxsw(vars, vard, mmreg) sse_m2m(pmaxsw, vars, vard, mmreg) - -#define maxps_m2r(var, reg) sse_m2r(maxps, var, reg) -#define maxps_r2r(regs, regd) sse_r2r(maxps, regs, regd) -#define maxps(vars, vard, xmmreg) sse_m2m(maxps, vars, vard, xmmreg) - - -/* Lowest Field of 4x32f Parallel Maximum -*/ -#define maxss_m2r(var, reg) sse_m2r(maxss, var, reg) -#define maxss_r2r(regs, regd) sse_r2r(maxss, regs, regd) -#define maxss(vars, vard, xmmreg) sse_m2m(maxss, vars, vard, xmmreg) - - -/* 8x8u, 4x16, and 4x32f Parallel Minimum -*/ -#define pminub_m2r(var, reg) sse_m2r(pminub, var, reg) -#define pminub_r2r(regs, regd) sse_r2r(pminub, regs, regd) -#define pminub(vars, vard, mmreg) sse_m2m(pminub, vars, vard, mmreg) - -#define pminsw_m2r(var, reg) sse_m2r(pminsw, var, reg) -#define pminsw_r2r(regs, regd) sse_r2r(pminsw, regs, regd) -#define pminsw(vars, vard, mmreg) sse_m2m(pminsw, vars, vard, mmreg) - -#define minps_m2r(var, reg) sse_m2r(minps, var, reg) -#define minps_r2r(regs, regd) sse_r2r(minps, regs, regd) -#define minps(vars, vard, xmmreg) sse_m2m(minps, vars, vard, xmmreg) - - -/* Lowest Field of 4x32f Parallel Minimum -*/ -#define minss_m2r(var, reg) sse_m2r(minss, var, reg) -#define minss_r2r(regs, regd) sse_r2r(minss, regs, regd) -#define minss(vars, vard, xmmreg) sse_m2m(minss, vars, vard, xmmreg) - - -/* 4x32f Parallel CoMPares - (resulting fields are either 0 or -1) -*/ -#define cmpps_m2r(var, reg, op) sse_m2ri(cmpps, var, reg, op) -#define cmpps_r2r(regs, regd, op) sse_r2ri(cmpps, regs, regd, op) -#define cmpps(vars, vard, op, xmmreg) sse_m2mi(cmpps, vars, vard, xmmreg, op) - -#define cmpeqps_m2r(var, reg) sse_m2ri(cmpps, var, reg, 0) -#define cmpeqps_r2r(regs, regd) sse_r2ri(cmpps, regs, regd, 0) -#define cmpeqps(vars, vard, xmmreg) sse_m2mi(cmpps, vars, vard, xmmreg, 0) - -#define cmpltps_m2r(var, reg) sse_m2ri(cmpps, var, reg, 1) -#define cmpltps_r2r(regs, regd) sse_r2ri(cmpps, regs, regd, 1) -#define cmpltps(vars, vard, xmmreg) sse_m2mi(cmpps, vars, vard, xmmreg, 1) - -#define cmpleps_m2r(var, reg) sse_m2ri(cmpps, var, reg, 2) -#define cmpleps_r2r(regs, regd) sse_r2ri(cmpps, regs, regd, 2) -#define cmpleps(vars, vard, xmmreg) sse_m2mi(cmpps, vars, vard, xmmreg, 2) - -#define cmpunordps_m2r(var, reg) sse_m2ri(cmpps, var, reg, 3) -#define cmpunordps_r2r(regs, regd) sse_r2ri(cmpps, regs, regd, 3) -#define cmpunordps(vars, vard, xmmreg) sse_m2mi(cmpps, vars, vard, xmmreg, 3) - -#define cmpneqps_m2r(var, reg) sse_m2ri(cmpps, var, reg, 4) -#define cmpneqps_r2r(regs, regd) sse_r2ri(cmpps, regs, regd, 4) -#define cmpneqps(vars, vard, xmmreg) sse_m2mi(cmpps, vars, vard, xmmreg, 4) - -#define cmpnltps_m2r(var, reg) sse_m2ri(cmpps, var, reg, 5) -#define cmpnltps_r2r(regs, regd) sse_r2ri(cmpps, regs, regd, 5) -#define cmpnltps(vars, vard, xmmreg) sse_m2mi(cmpps, vars, vard, xmmreg, 5) - -#define cmpnleps_m2r(var, reg) sse_m2ri(cmpps, var, reg, 6) -#define cmpnleps_r2r(regs, regd) sse_r2ri(cmpps, regs, regd, 6) -#define cmpnleps(vars, vard, xmmreg) sse_m2mi(cmpps, vars, vard, xmmreg, 6) - -#define cmpordps_m2r(var, reg) sse_m2ri(cmpps, var, reg, 7) -#define cmpordps_r2r(regs, regd) sse_r2ri(cmpps, regs, regd, 7) -#define cmpordps(vars, vard, xmmreg) sse_m2mi(cmpps, vars, vard, xmmreg, 7) - - -/* Lowest Field of 4x32f Parallel CoMPares - (resulting fields are either 0 or -1) -*/ -#define cmpss_m2r(var, reg, op) sse_m2ri(cmpss, var, reg, op) -#define cmpss_r2r(regs, regd, op) sse_r2ri(cmpss, regs, regd, op) -#define cmpss(vars, vard, op, xmmreg) sse_m2mi(cmpss, vars, vard, xmmreg, op) - -#define cmpeqss_m2r(var, reg) sse_m2ri(cmpss, var, reg, 0) -#define cmpeqss_r2r(regs, regd) sse_r2ri(cmpss, regs, regd, 0) -#define cmpeqss(vars, vard, xmmreg) sse_m2mi(cmpss, vars, vard, xmmreg, 0) - -#define cmpltss_m2r(var, reg) sse_m2ri(cmpss, var, reg, 1) -#define cmpltss_r2r(regs, regd) sse_r2ri(cmpss, regs, regd, 1) -#define cmpltss(vars, vard, xmmreg) sse_m2mi(cmpss, vars, vard, xmmreg, 1) - -#define cmpless_m2r(var, reg) sse_m2ri(cmpss, var, reg, 2) -#define cmpless_r2r(regs, regd) sse_r2ri(cmpss, regs, regd, 2) -#define cmpless(vars, vard, xmmreg) sse_m2mi(cmpss, vars, vard, xmmreg, 2) - -#define cmpunordss_m2r(var, reg) sse_m2ri(cmpss, var, reg, 3) -#define cmpunordss_r2r(regs, regd) sse_r2ri(cmpss, regs, regd, 3) -#define cmpunordss(vars, vard, xmmreg) sse_m2mi(cmpss, vars, vard, xmmreg, 3) - -#define cmpneqss_m2r(var, reg) sse_m2ri(cmpss, var, reg, 4) -#define cmpneqss_r2r(regs, regd) sse_r2ri(cmpss, regs, regd, 4) -#define cmpneqss(vars, vard, xmmreg) sse_m2mi(cmpss, vars, vard, xmmreg, 4) - -#define cmpnltss_m2r(var, reg) sse_m2ri(cmpss, var, reg, 5) -#define cmpnltss_r2r(regs, regd) sse_r2ri(cmpss, regs, regd, 5) -#define cmpnltss(vars, vard, xmmreg) sse_m2mi(cmpss, vars, vard, xmmreg, 5) - -#define cmpnless_m2r(var, reg) sse_m2ri(cmpss, var, reg, 6) -#define cmpnless_r2r(regs, regd) sse_r2ri(cmpss, regs, regd, 6) -#define cmpnless(vars, vard, xmmreg) sse_m2mi(cmpss, vars, vard, xmmreg, 6) - -#define cmpordss_m2r(var, reg) sse_m2ri(cmpss, var, reg, 7) -#define cmpordss_r2r(regs, regd) sse_r2ri(cmpss, regs, regd, 7) -#define cmpordss(vars, vard, xmmreg) sse_m2mi(cmpss, vars, vard, xmmreg, 7) - - -/* Lowest Field of 4x32f Parallel CoMPares to set EFLAGS - (resulting fields are either 0 or -1) -*/ -#define comiss_m2r(var, reg) sse_m2r(comiss, var, reg) -#define comiss_r2r(regs, regd) sse_r2r(comiss, regs, regd) -#define comiss(vars, vard, xmmreg) sse_m2m(comiss, vars, vard, xmmreg) - - -/* Lowest Field of 4x32f Unordered Parallel CoMPares to set EFLAGS - (resulting fields are either 0 or -1) -*/ -#define ucomiss_m2r(var, reg) sse_m2r(ucomiss, var, reg) -#define ucomiss_r2r(regs, regd) sse_r2r(ucomiss, regs, regd) -#define ucomiss(vars, vard, xmmreg) sse_m2m(ucomiss, vars, vard, xmmreg) - - -/* 2-(4x32f) -> 4x32f UNPaCK Low Packed Single-fp - (interleaves low half of dest with low half of source - as padding in each result field) -*/ -#define unpcklps_m2r(var, reg) sse_m2r(unpcklps, var, reg) -#define unpcklps_r2r(regs, regd) sse_r2r(unpcklps, regs, regd) - - -/* 2-(4x32f) -> 4x32f UNPaCK High Packed Single-fp - (interleaves high half of dest with high half of source - as padding in each result field) -*/ -#define unpckhps_m2r(var, reg) sse_m2r(unpckhps, var, reg) -#define unpckhps_r2r(regs, regd) sse_r2r(unpckhps, regs, regd) - - - -/* Fp and mmX ReSTORe state -*/ -#ifdef SSE_TRACE - #define fxrstor(mem) \ - { \ - fprintf(stderr, "fxrstor()\n"); \ - __asm__ __volatile__ ("fxrstor %0" \ - : /* nothing */ \ - : "X" (mem)) \ - } -#else - #define fxrstor(mem) \ - __asm__ __volatile__ ("fxrstor %0" \ - : /* nothing */ \ - : "X" (mem)) -#endif - - -/* Fp and mmX SAVE state -*/ -#ifdef SSE_TRACE - #define fxsave(mem) \ - { \ - fprintf(stderr, "fxsave()\n"); \ - __asm__ __volatile__ ("fxsave %0" \ - : /* nothing */ \ - : "X" (mem)) \ - } -#else - #define fxsave(mem) \ - __asm__ __volatile__ ("fxsave %0" \ - : /* nothing */ \ - : "X" (mem)) -#endif - - -/* STore streaMing simd eXtensions Control/Status Register -*/ -#ifdef SSE_TRACE - #define stmxcsr(mem) \ - { \ - fprintf(stderr, "stmxcsr()\n"); \ - __asm__ __volatile__ ("stmxcsr %0" \ - : /* nothing */ \ - : "X" (mem)) \ - } -#else - #define stmxcsr(mem) \ - __asm__ __volatile__ ("stmxcsr %0" \ - : /* nothing */ \ - : "X" (mem)) -#endif - - -/* LoaD streaMing simd eXtensions Control/Status Register -*/ -#ifdef SSE_TRACE - #define ldmxcsr(mem) \ - { \ - fprintf(stderr, "ldmxcsr()\n"); \ - __asm__ __volatile__ ("ldmxcsr %0" \ - : /* nothing */ \ - : "X" (mem)) \ - } -#else - #define ldmxcsr(mem) \ - __asm__ __volatile__ ("ldmxcsr %0" \ - : /* nothing */ \ - : "X" (mem)) -#endif - - -/* Store FENCE - enforce ordering of stores before fence vs. stores - occuring after fence in source code. -*/ -#ifdef SSE_TRACE - #define sfence() \ - { \ - fprintf(stderr, "sfence()\n"); \ - __asm__ __volatile__ ("sfence\n\t") \ - } -#else - #define sfence() \ - __asm__ __volatile__ ("sfence\n\t") -#endif - - -/* PREFETCH data using T0, T1, T2, or NTA hint - T0 = Prefetch into all cache levels - T1 = Prefetch into all cache levels except 0th level - T2 = Prefetch into all cache levels except 0th and 1st levels - NTA = Prefetch data into non-temporal cache structure -*/ -#ifdef SSE_TRACE -#else - #define prefetch(mem, hint) \ - __asm__ __volatile__ ("prefetch" #hint " %0" \ - : /* nothing */ \ - : "X" (mem)) - - #define prefetcht0(mem) prefetch(mem, t0) - #define prefetcht1(mem) prefetch(mem, t1) - #define prefetcht2(mem) prefetch(mem, t2) - #define prefetchnta(mem) prefetch(mem, nta) -#endif - - - -#endif diff --git a/gst/deinterlace2/tvtime/tomsmocomp.c b/gst/deinterlace2/tvtime/tomsmocomp.c deleted file mode 100644 index 64e78c5b..00000000 --- a/gst/deinterlace2/tvtime/tomsmocomp.c +++ /dev/null @@ -1,211 +0,0 @@ -/** - * Copyright (C) 2004 Billy Biggs - * Copyright (C) 2008 Sebastian Dröge - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include "_stdint.h" -#include - -#include "gst/gst.h" -#include "gstdeinterlace2.h" -#include "plugins.h" - -#define GST_TYPE_DEINTERLACE_METHOD_TOMSMOCOMP (gst_deinterlace_method_tomsmocomp_get_type ()) -#define GST_IS_DEINTERLACE_METHOD_TOMSMOCOMP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DEINTERLACE_METHOD_TOMSMOCOMP)) -#define GST_IS_DEINTERLACE_METHOD_TOMSMOCOMP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_DEINTERLACE_METHOD_TOMSMOCOMP)) -#define GST_DEINTERLACE_METHOD_TOMSMOCOMP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_DEINTERLACE_METHOD_TOMSMOCOMP, GstDeinterlaceMethodTomsMoCompClass)) -#define GST_DEINTERLACE_METHOD_TOMSMOCOMP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_DEINTERLACE_METHOD_TOMSMOCOMP, GstDeinterlaceMethodTomsMoComp)) -#define GST_DEINTERLACE_METHOD_TOMSMOCOMP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEINTERLACE_METHOD_TOMSMOCOMP, GstDeinterlaceMethodTomsMoCompClass)) -#define GST_DEINTERLACE_METHOD_TOMSMOCOMP_CAST(obj) ((GstDeinterlaceMethodTomsMoComp*)(obj)) - -GType gst_deinterlace_method_tomsmocomp_get_type (void); - -typedef struct -{ - GstDeinterlaceMethod parent; - - guint search_effort; - gboolean strange_bob; -} GstDeinterlaceMethodTomsMoComp; - -typedef struct -{ - GstDeinterlaceMethodClass parent_class; -} GstDeinterlaceMethodTomsMoCompClass; - -static int -Fieldcopy (void *dest, const void *src, size_t count, - int rows, int dst_pitch, int src_pitch) -{ - unsigned char *pDest = (unsigned char *) dest; - unsigned char *pSrc = (unsigned char *) src; - - int i; - - for (i = 0; i < rows; i++) { - oil_memcpy (pDest, pSrc, count); - pSrc += src_pitch; - pDest += dst_pitch; - } - return 0; -} - -#define USE_FOR_DSCALER - -#define IS_C -#define SIMD_TYPE C -#define FUNCT_NAME tomsmocompDScaler_C -#include "tomsmocomp/TomsMoCompAll.inc" -#undef IS_C -#undef SIMD_TYPE -#undef FUNCT_NAME - -#ifdef BUILD_X86_ASM - -#include "tomsmocomp/tomsmocompmacros.h" -#include "x86-64_macros.inc" - -#define IS_MMX -#define SIMD_TYPE MMX -#define FUNCT_NAME tomsmocompDScaler_MMX -#include "tomsmocomp/TomsMoCompAll.inc" -#undef IS_MMX -#undef SIMD_TYPE -#undef FUNCT_NAME - -#define IS_3DNOW -#define SIMD_TYPE 3DNOW -#define FUNCT_NAME tomsmocompDScaler_3DNOW -#include "tomsmocomp/TomsMoCompAll.inc" -#undef IS_3DNOW -#undef SIMD_TYPE -#undef FUNCT_NAME - -#define IS_MMXEXT -#define SIMD_TYPE MMXEXT -#define FUNCT_NAME tomsmocompDScaler_MMXEXT -#include "tomsmocomp/TomsMoCompAll.inc" -#undef IS_MMXEXT -#undef SIMD_TYPE -#undef FUNCT_NAME - -#endif - -G_DEFINE_TYPE (GstDeinterlaceMethodTomsMoComp, - gst_deinterlace_method_tomsmocomp, GST_TYPE_DEINTERLACE_METHOD); - -enum -{ - ARG_0, - ARG_SEARCH_EFFORT, - ARG_STRANGE_BOB -}; - -static void -gst_deinterlace_method_tomsmocomp_set_property (GObject * object, guint prop_id, - const GValue * value, GParamSpec * pspec) -{ - GstDeinterlaceMethodTomsMoComp *self = - GST_DEINTERLACE_METHOD_TOMSMOCOMP (object); - - switch (prop_id) { - case ARG_SEARCH_EFFORT: - self->search_effort = g_value_get_uint (value); - break; - case ARG_STRANGE_BOB: - self->strange_bob = g_value_get_boolean (value); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - } -} - -static void -gst_deinterlace_method_tomsmocomp_get_property (GObject * object, guint prop_id, - GValue * value, GParamSpec * pspec) -{ - GstDeinterlaceMethodTomsMoComp *self = - GST_DEINTERLACE_METHOD_TOMSMOCOMP (object); - - switch (prop_id) { - case ARG_SEARCH_EFFORT: - g_value_set_uint (value, self->search_effort); - break; - case ARG_STRANGE_BOB: - g_value_set_boolean (value, self->strange_bob); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - } -} - -static void - gst_deinterlace_method_tomsmocomp_class_init - (GstDeinterlaceMethodTomsMoCompClass * klass) -{ - GstDeinterlaceMethodClass *dim_class = (GstDeinterlaceMethodClass *) klass; - GObjectClass *gobject_class = (GObjectClass *) klass; -#ifdef BUILD_X86_ASM - guint cpu_flags = oil_cpu_get_flags (); -#endif - - gobject_class->set_property = gst_deinterlace_method_tomsmocomp_set_property; - gobject_class->get_property = gst_deinterlace_method_tomsmocomp_get_property; - - g_object_class_install_property (gobject_class, ARG_SEARCH_EFFORT, - g_param_spec_uint ("search-effort", - "Search Effort", - "Search Effort", 0, 27, 5, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS) - ); - - g_object_class_install_property (gobject_class, ARG_STRANGE_BOB, - g_param_spec_boolean ("strange-bob", - "Strange Bob", - "Use strange bob", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS) - ); - - dim_class->fields_required = 4; - dim_class->name = "Motion Adaptive: Motion Search"; - dim_class->nick = "tomsmocomp"; - dim_class->latency = 1; - -#ifdef BUILD_X86_ASM - if (cpu_flags & OIL_IMPL_FLAG_MMXEXT) { - dim_class->deinterlace_frame = tomsmocompDScaler_MMXEXT; - } else if (cpu_flags & OIL_IMPL_FLAG_3DNOW) { - dim_class->deinterlace_frame = tomsmocompDScaler_3DNOW; - } else if (cpu_flags & OIL_IMPL_FLAG_MMX) { - dim_class->deinterlace_frame = tomsmocompDScaler_MMX; - } else { - dim_class->deinterlace_frame = tomsmocompDScaler_C; - } -#else - dim_class->deinterlace_frame = tomsmocompDScaler_C; -#endif -} - -static void -gst_deinterlace_method_tomsmocomp_init (GstDeinterlaceMethodTomsMoComp * self) -{ - self->search_effort = 5; - self->strange_bob = FALSE; -} diff --git a/gst/deinterlace2/tvtime/tomsmocomp/SearchLoop0A.inc b/gst/deinterlace2/tvtime/tomsmocomp/SearchLoop0A.inc deleted file mode 100644 index b1d9aeca..00000000 --- a/gst/deinterlace2/tvtime/tomsmocomp/SearchLoop0A.inc +++ /dev/null @@ -1,15 +0,0 @@ -// -*- c++ -*- - -// Searches just the center pixel, in both the old -// and new fields, but takes averages. This is an even -// pixel address. Any chroma match will be used. (YUY2) -// We best like finding 0 motion so we will bias everything we found previously -// up by a little, and adjust later - -#ifdef IS_SSE2 - "paddusb "_ONES", %%xmm7\n\t" // bias toward no motion -#else - "paddusb "_ONES", %%mm7\n\t" // bias toward no motion -#endif - - MERGE4PIXavg("(%%"XDI", %%"XCX")", "(%%"XSI", %%"XCX")") // center, in old and new diff --git a/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopBottom.inc b/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopBottom.inc deleted file mode 100644 index e1560353..00000000 --- a/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopBottom.inc +++ /dev/null @@ -1,174 +0,0 @@ -// -*- c++ -*- - -// Version for non-SSE2 - -#ifndef IS_C - -#ifdef SKIP_SEARCH - "movq %%mm6, %%mm0\n\t" // just use the results of our wierd bob -#else - - - // JA 9/Dec/2002 - // failed experiment - // but leave in placeholder for me to play about -#ifdef DONT_USE_STRANGE_BOB - // Use the best weave if diffs less than 10 as that - // means the image is still or moving cleanly - // if there is motion we will clip which will catch anything - "psubusb "_FOURS", %%mm7\n\t" // sets bits to zero if weave diff < 4 - "pxor %%mm0, %%mm0\n\t" - "pcmpeqb %%mm0, %%mm7\n\t" // all ff where weave better, else 00 - "pcmpeqb %%mm7, %%mm0\n\t" // all ff where bob better, else 00 - "pand %%mm6, %%mm0\n\t" // use bob for these pixel values - "pand %%mm5, %%mm7\n\t" // use weave for these - "por %%mm7, %%mm0\n\t" // combine both -#else - // Use the better of bob or weave - // pminub mm4, TENS // the most we care about - V_PMINUB ("%%mm4", _TENS, "%%mm0") // the most we care about - - "psubusb %%mm4, %%mm7\n\t" // foregive that much from weave est? - "psubusb "_FOURS", %%mm7\n\t" // bias it a bit toward weave - "pxor %%mm0, %%mm0\n\t" - "pcmpeqb %%mm0, %%mm7\n\t" // all ff where weave better, else 00 - "pcmpeqb %%mm7, %%mm0\n\t" // all ff where bob better, else 00 - "pand %%mm6, %%mm0\n\t" // use bob for these pixel values - "pand %%mm5, %%mm7\n\t" // use weave for these - "por %%mm7, %%mm0\n\t" // combine both -#endif - - - // pminub mm0, Max_Vals // but clip to catch the stray error - V_PMINUB ("%%mm0", _Max_Vals, "%%mm1") // but clip to catch the stray error - // pmaxub mm0, Min_Vals - V_PMAXUB ("%%mm0", _Min_Vals) - -#endif - - - MOVX" "_pDest", %%"XAX"\n\t" - -#ifdef USE_VERTICAL_FILTER - "movq %%mm0, %%mm1\n\t" - // pavgb mm0, qword ptr["XBX"] - V_PAVGB ("%%mm0", "(%%"XBX")", "%%mm2", _ShiftMask) - // movntq qword ptr["XAX"+"XDX"], mm0 - V_MOVNTQ ("(%"XAX", %%"XDX")", "%%mm0") - // pavgb mm1, qword ptr["XBX"+"XCX"] - V_PAVGB ("%%mm1", "(%%"XBX", %%"XCX")", "%%mm2", _ShiftMask) - //FIXME: XDX or XAX!! - "addq "_dst_pitchw", %%"XBX - // movntq qword ptr["XAX"+"XDX"], mm1 - V_MOVNTQ ("(%%"XAX", %%"XDX")", "%%mm1") -#else - - // movntq qword ptr["XAX"+"XDX"], mm0 - V_MOVNTQ ("(%%"XAX", %%"XDX")", "%%mm0") -#endif - - LEAX" 8(%%"XDX"), %%"XDX"\n\t" // bump offset pointer - CMPX" "_Last8", %%"XDX"\n\t" // done with line? - "jb 1b\n\t" // y - - MOVX" "_oldbx", %%"XBX"\n\t" - - : /* no outputs */ - - : "m"(pBob), - "m"(src_pitch2), - "m"(ShiftMask), - "m"(pDest), - "m"(dst_pitchw), - "m"(Last8), - "m"(pSrc), - "m"(pSrcP), - "m"(pBobP), - "m"(DiffThres), - "m"(Min_Vals), - "m"(Max_Vals), - "m"(FOURS), - "m"(TENS), - "m"(ONES), - "m"(UVMask), - "m"(Max_Mov), - "m"(YMask), - "m"(oldbx) - - : XAX, XCX, XDX, XSI, XDI, - "st", "st(1)", "st(2)", "st(3)", "st(4)", "st(5)", "st(6)", "st(7)", -#ifdef __MMX__ - "mm0", "mm1", "mm2", "mm3", "mm4", "mm5", "mm6", "mm7", -#endif - "memory", "cc" - ); - - // adjust for next line - pSrc += src_pitch2; - pSrcP += src_pitch2; - pDest += dst_pitch2; - pBob += src_pitch2; - pBobP += src_pitch2; - } - - return 0; -#else -#ifdef SKIP_SEARCH - out[0] = best[0]; // just use the results of our wierd bob - out[1] = best[1]; -#else - diff[0] = diff[0] - MIN (diff[0], 10) - 4; - diff[1] = diff[1] - MIN (diff[1] - 10) - 4; - if (diff[0] < 0) - out[0] = weave[0]; - else - out[0] = best[0]; - - if (diff[1] < 0) - out[1] = weave[1]; - else - out[1] = best[1]; - - - out[0] = CLAMP (out[0], MinVals[0], MaxVals[0]); - out[1] = CLAMP (out[1], MinVals[1], MaxVals[1]); -#endif - -#ifdef USE_VERTICAL_FILTER - pDest[x] = (out[0] + pBob[0]) / 2; - pDest[x + dst_pitchw] = (pBob[src_pitch2] + out[0]) / 2; - pDest[x + 1] = (out[1] + pBob[1]) / 2; - pDest[x + 1 + dst_pitchw] = (pBob[src_pitch2 + 1] + out[1]) / 2; -#else - pDest[x] = out[0]; - pDest[x+1] = out[1]; -#endif - pBob += 2; - pBobP += 2; - pSrc += 2; - pSrcP += 2; - } - // adjust for next line - pSrc = src_pitch2 * (y+1) + pWeaveSrc; - pSrcP = src_pitch2 * (y+1) + pWeaveSrcP; - pDest = dst_pitch2 * (y+1) + pWeaveDest + dst_pitch2; - - - if (TopFirst) - { - pBob = pCopySrc + src_pitch2; - pBobP = pCopySrcP + src_pitch2; - } - else - { - pBob = pCopySrc; - pBobP = pCopySrcP; - } - - pBob += src_pitch2 * (y+1); - pBobP += src_pitch2 * (y+1); - } - - return 0; - -#endif diff --git a/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopEdgeA.inc b/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopEdgeA.inc deleted file mode 100644 index 6208fe8c..00000000 --- a/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopEdgeA.inc +++ /dev/null @@ -1,11 +0,0 @@ -// -*- c++ -*- - -// Searches 2 pixel to the left and right, in both the old -// and new fields, but takes averages. These are even -// pixel addresses. Chroma match will be used. (YUY2) - MERGE4PIXavg("-4(%%"XDI")", "4(%%"XSI", %%"XCX", 2)") // up left, down right - MERGE4PIXavg("4(%%"XDI")", "-4(%%"XSI", %%"XCX", 2)") // up right, down left - MERGE4PIXavg("-4(%%"XDI", %%"XCX")", "4(%%"XSI", %%"XCX")") // left, right - MERGE4PIXavg("4(%%"XDI", %%"XCX")", "-4(%%"XSI", %%"XCX")") // right, left - MERGE4PIXavg("-4(%%"XDI", %%"XCX", 2)", "4(%%"XSI")") // down left, up right - MERGE4PIXavg("4(%%"XDI", %%"XCX", 2)", "-4(%%"XSI")") // down right, up left diff --git a/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopEdgeA8.inc b/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopEdgeA8.inc deleted file mode 100644 index 2841c3f6..00000000 --- a/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopEdgeA8.inc +++ /dev/null @@ -1,12 +0,0 @@ -// -*- c++ -*- - -// Searches 4 pixel to the left and right, in both the old -// and new fields, but takes averages. These are even -// pixel addresses. Chroma match will be used. (YUY2) - MERGE4PIXavg("-8(%%"XDI")", "8(%%"XSI", %%"XCX", 2)") // up left, down right - MERGE4PIXavg("8(%%"XDI")", "-8(%%"XSI", %%"XCX", 2)") // up right, down left - MERGE4PIXavg("-8(%%"XDI", %%"XCX")", "8(%%"XSI", %%"XCX")") // left, right - MERGE4PIXavg("8(%%"XDI", %%"XCX")", "-8(%%"XSI", %%"XCX")") // right, left - MERGE4PIXavg("-8(%%"XDI", %%"XCX", 2)", "8(%%"XSI")") // down left, up right - MERGE4PIXavg("8(%%"XDI", %%"XCX", 2)", "-8(%%"XSI")") // down right, up left - diff --git a/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopOddA.inc b/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopOddA.inc deleted file mode 100644 index ab5375f4..00000000 --- a/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopOddA.inc +++ /dev/null @@ -1,10 +0,0 @@ -// -*- c++ -*- - -// Searches 1 pixel to the left and right, in both the old -// and new fields, but takes averages. These are odd -// pixel addresses. Any chroma match will not be used. (YUY2) - MERGE4PIXavg("-2(%%"XDI")", "2(%%"XSI", %%"XCX", 2)") // up left, down right - MERGE4PIXavg("2(%%"XDI")", "-2(%%"XSI", %%"XCX", 2)") // up right, down left - MERGE4PIXavg("-2(%%"XDI", %%"XCX", 2)", "2(%%"XSI")") // down left, up right - MERGE4PIXavg("2(%%"XDI", %%"XCX", 2)", "-2(%%"XSI")") // down right, up left -#include "SearchLoopOddA2.inc" diff --git a/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopOddA2.inc b/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopOddA2.inc deleted file mode 100644 index fd3f6fb0..00000000 --- a/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopOddA2.inc +++ /dev/null @@ -1,5 +0,0 @@ -// Searches 1 pixel to the left and right, in both the old -// and new fields, but takes averages. These are odd -// pixel addresses. Any chroma match will not be used. (YUY2) - MERGE4PIXavg("-2(%%"XDI", %%"XCX")", "2(%%"XSI", %%"XCX")") // left, right - MERGE4PIXavg("2(%%"XDI", %%"XCX")", "-2(%%"XSI", %%"XCX")") // right, left diff --git a/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopOddA6.inc b/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopOddA6.inc deleted file mode 100644 index cbae014e..00000000 --- a/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopOddA6.inc +++ /dev/null @@ -1,11 +0,0 @@ -// -*- c++ -*- - -// Searches 3 pixels to the left and right, in both the old -// and new fields, but takes averages. These are odd -// pixel addresses. Any chroma match will not be used. (YUY2) - MERGE4PIXavg("-6(%%"XDI")", "6(%%"XSI", %%"XCX", 2)") // up left, down right - MERGE4PIXavg("6(%%"XDI")", "-6(%%"XSI", %%"XCX", 2)") // up right, down left - MERGE4PIXavg("-6(%%"XDI", %%"XCX")", "6(%%"XSI", %%"XCX")") // left, right - MERGE4PIXavg("6(%%"XDI", %%"XCX")", "-6(%%"XSI", %%"XCX")") // right, left - MERGE4PIXavg("-6(%%"XDI", %%"XCX", 2)", "6(%%"XSI")") // down left, up right - MERGE4PIXavg("6(%%"XDI", %%"XCX", 2)", "-6(%%"XSI")") // down right, up left diff --git a/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopOddAH.inc b/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopOddAH.inc deleted file mode 100644 index e59e3c7e..00000000 --- a/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopOddAH.inc +++ /dev/null @@ -1,10 +0,0 @@ -// Searches 1 pixel to the left and right, in both the old -// and new fields, but takes v-half pel averages. These are odd -// pixel addresses. Any chroma match will not be used. (YUY2) - __asm - { - MERGE4PIXavgH("XDI"-2, "XDI"+"XCX"-2, "XSI"+"XCX"+2, "XSI"+2*"XCX"+2) // up left, down right - MERGE4PIXavgH("XDI"+2, "XDI"+"XCX"+2, "XSI"+"XCX"-2, "XSI"+2*"XCX"-2) // up right, down left - MERGE4PIXavgH("XDI"+2*"XCX"-2, "XDI"+"XCX"-2, "XSI"+"XCX"+2, "XSI"+2) // down left, up right - MERGE4PIXavgH("XDI"+2*"XCX"+2, "XDI"+"XCX"+2, "XSI"+"XCX"-2, "XSI"-2) // down right, up left - } diff --git a/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopOddAH2.inc b/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopOddAH2.inc deleted file mode 100644 index cd7d812a..00000000 --- a/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopOddAH2.inc +++ /dev/null @@ -1,5 +0,0 @@ -// Searches 1 pixel to the left and right, in both the old -// and new fields, but takes vertical averages. These are odd -// pixel addresses. Any chroma match will not be used. (YUY2) - MERGE4PIXavgH("-2(%%"XDI", %%"XCX")", "(%%"XDI", %%"XCX")", "(%%"XSI", %%"XCX")", "2(%%"XSI", %%"XCX")") // left, right - MERGE4PIXavgH("2(%%"XDI", %%"XCX")", "(%%"XDI", %%"XCX")", "(%%"XSI", %%"XCX")", "-2(%%"XSI", %%"XCX")") // right, left diff --git a/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopTop.inc b/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopTop.inc deleted file mode 100644 index 9d6a490f..00000000 --- a/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopTop.inc +++ /dev/null @@ -1,254 +0,0 @@ -// -*- c++ -*- - -unsigned char* pDest; -const unsigned char* pSrcP; -const unsigned char* pSrc; -const unsigned char* pBob; -const unsigned char* pBobP; - -// long is int32 on ARCH_368, int64 on ARCH_AMD64. Declaring it this way -// saves a lot of xor's to delete 64bit garbage. - -#if defined(DBL_RESIZE) || defined(USE_FOR_DSCALER) -long src_pitch2 = src_pitch; // even & odd lines are not interleaved in DScaler -#else -long src_pitch2 = 2 * src_pitch; // even & odd lines are interleaved in Avisynth -#endif - - -long dst_pitch2 = 2 * dst_pitch; -long y; - -long Last8; - - pSrc = pWeaveSrc; // points 1 weave line above - pSrcP = pWeaveSrcP; // " - -#ifdef DBL_RESIZE - -#ifdef USE_VERTICAL_FILTER - pDest = pWeaveDest + dst_pitch2; -#else - pDest = pWeaveDest + 3*dst_pitch; -#endif - -#else - -#ifdef USE_VERTICAL_FILTER - pDest = pWeaveDest + dst_pitch; -#else - pDest = pWeaveDest + dst_pitch2; -#endif - -#endif - - if (TopFirst) - { - pBob = pCopySrc + src_pitch2; // remember one weave line just copied previously - pBobP = pCopySrcP + src_pitch2; - } - else - { - pBob = pCopySrc; - pBobP = pCopySrcP; - } - -#ifndef IS_C - -#ifndef _pBob -#define _pBob "%0" -#define _src_pitch2 "%1" -#define _ShiftMask "%2" -#define _pDest "%3" -#define _dst_pitchw "%4" -#define _Last8 "%5" -#define _pSrc "%6" -#define _pSrcP "%7" -#define _pBobP "%8" -#define _DiffThres "%9" -#define _Min_Vals "%10" -#define _Max_Vals "%11" -#define _FOURS "%12" -#define _TENS "%13" -#define _ONES "%14" -#define _UVMask "%15" -#define _Max_Mov "%16" -#define _YMask "%17" -#define _oldbx "%18" -#endif - Last8 = (rowsize-8); - - for (y=1; y < FldHeight-1; y++) - { - long dst_pitchw = dst_pitch; // local stor so asm can ref - int64_t Max_Mov = 0x0404040404040404ull; - int64_t DiffThres = 0x0f0f0f0f0f0f0f0full; - int64_t YMask = 0x00ff00ff00ff00ffull; // keeps only luma - int64_t UVMask = 0xff00ff00ff00ff00ull; // keeps only chroma - int64_t TENS = 0x0a0a0a0a0a0a0a0aull; - int64_t FOURS = 0x0404040404040404ull; - int64_t ONES = 0x0101010101010101ull; - int64_t Min_Vals = 0x0000000000000000ull; - int64_t Max_Vals = 0x0000000000000000ull; - int64_t ShiftMask = 0xfefffefffefffeffull; - - long oldbx; - - // pretend it's indented -->> - __asm__ __volatile__ - ( - // Loop general reg usage - // - // XAX - pBobP, then pDest - // XBX - pBob - // XCX - src_pitch2 - // XDX - current offset - // XDI - prev weave pixels, 1 line up - // XSI - next weave pixels, 1 line up - - // Save "XBX" (-fPIC) - MOVX" %%"XBX", "_oldbx"\n\t" - - // simple bob first 8 bytes - MOVX" "_pBob", %%"XBX"\n\t" - MOVX" "_src_pitch2", %%"XCX"\n\t" - -#ifdef USE_VERTICAL_FILTER - "movq (%%"XBX"), %%mm0\n\t" - "movq (%%"XBX", %%"XCX"), %%mm1\n\t" //, qword ptr["XBX"+"XCX"] - "movq %%mm0, %%mm2\n\t" - V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // halfway between - V_PAVGB ("%%mm0", "%%mm2", "%%mm3", _ShiftMask) // 1/4 way - V_PAVGB ("%%mm1", "%%mm2", "%%mm3", _ShiftMask) // 3/4 way - MOVX" "_pDest", %%"XDI"\n\t" - MOVX" "_dst_pitchw", %%"XAX"\n\t" - V_MOVNTQ ("(%%"XDI")", "%%mm0") - V_MOVNTQ ("(%%"XDI", %%"XAX")", "%%mm1") // qword ptr["XDI"+"XAX"], mm1 - - // simple bob last 8 bytes - MOVX" "_Last8", %%"XDX"\n\t" - LEAX" (%%"XBX", %%"XDX"), %%"XSI"\n\t" // ["XBX"+"XDX"] - "movq (%%"XSI"), %%mm0\n\t" - "movq (%%"XSI", %%"XCX"), %%mm1\n\t" // qword ptr["XSI"+"XCX"] - "movq %%mm0, %%mm2\n\t" - V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // halfway between - V_PAVGB ("%%mm0", "%%mm2", "%%mm3", _ShiftMask) // 1/4 way - V_PAVGB ("%%mm1", "%%mm2", "%%mm3", _ShiftMask) // 3/4 way - ADDX" %%"XDX", %%"XDI"\n\t" // last 8 bytes of dest - V_MOVNTQ ("%%"XDI"", "%%mm0") - V_MOVNTQ ("(%%"XDI", %%"XAX")", "%%mm1") // qword ptr["XDI"+"XAX"], mm1) - -#else - "movq (%%"XBX"), %%mm0\n\t" - // pavgb mm0, qword ptr["XBX"+"XCX"] - V_PAVGB ("%%mm0", "(%%"XBX", %%"XCX")", "%%mm2", _ShiftMask) // qword ptr["XBX"+"XCX"], mm2, ShiftMask) - MOVX" "_pDest", %%"XDI"\n\t" - V_MOVNTQ ("(%%"XDI")", "%%mm0") - - // simple bob last 8 bytes - MOVX" "_Last8", %%"XDX"\n\t" - LEAX" (%%"XBX", %%"XDX"), %%"XSI"\n\t" //"XSI", ["XBX"+"XDX"] - "movq (%%"XSI"), %%mm0\n\t" - // pavgb mm0, qword ptr["XSI"+"XCX"] - V_PAVGB ("%%mm0", "(%%"XSI", %%"XCX")", "%%mm2", _ShiftMask) // qword ptr["XSI"+"XCX"], mm2, ShiftMask) - V_MOVNTQ ("(%%"XDI", %%"XDX")", "%%mm0") // qword ptr["XDI"+"XDX"], mm0) -#endif - // now loop and get the middle qwords - MOVX" "_pSrc", %%"XSI"\n\t" - MOVX" "_pSrcP", %%"XDI"\n\t" - MOVX" $8, %%"XDX"\n\t" // curr offset longo all lines - - "1:\n\t" - MOVX" "_pBobP", %%"XAX"\n\t" - ADDX" $8, %%"XDI"\n\t" - ADDX" $8, %%"XSI"\n\t" - ADDX" $8, %%"XBX"\n\t" - ADDX" %%"XDX", %%"XAX"\n\t" - -#ifdef USE_STRANGE_BOB -#include "StrangeBob.inc" -#else -#include "WierdBob.inc" -#endif - - // For non-SSE2: - // through out most of the rest of this loop we will maintain - // mm4 our min bob value - // mm5 best weave pixels so far - // mm6 our max Bob value - // mm7 best weighted pixel ratings so far - - // We will keep a slight bias to using the weave pixels - // from the current location, by rating them by the min distance - // from the Bob value instead of the avg distance from that value. - // our best and only rating so far - "pcmpeqb %%mm7, %%mm7\n\t" // ffff, say we didn't find anything good yet - -#else - Last8 = (rowsize - 4); - - for (y=1; y < FldHeight-1; y++) - { - #ifdef USE_STRANGE_BOB - long DiffThres = 0x0f; - #endif - - #ifndef SKIP_SEARCH - long weave[2], MaxVals[2], MinVals[2]; - #endif - - long diff[2], best[2], avg[2], diff2[2], out[2], x; - -#ifdef USE_VERTICAL_FILTER - pDest[0] = (3 * pBob[0] + pBob[src_pitch2]) / 4; - pDest[1] = (3 * pBob[1] + pBob[src_pitch2 + 1]) / 4; - pDest[2] = (3 * pBob[2] + pBob[src_pitch2 + 2]) / 4; - pDest[3] = (3 * pBob[3] + pBob[src_pitch2 + 3]) / 4; - pDest[dst_pitchw] = (pBob[0] + 3 * pBob[src_pitch2]) / 4; - pDest[dst_pitchw + 1] = (pBob[1] + 3 * pBob[src_pitch2 + 1]) / 4; - pDest[dst_pitchw + 2] = (pBob[2] + 3 * pBob[src_pitch2 + 2]) / 4; - pDest[dst_pitchw + 3] = (pBob[3] + 3 * pBob[src_pitch2 + 3]) / 4; - - // simple bob last byte - pDest[Last8] = (3 * pBob[Last8] + pBob[Last8 + src_pitch2]) / 4; - pDest[Last8 + 1] = (3 * pBob[Last8 + 1] + pBob[Last8 + src_pitch2 + 1]) / 4; - pDest[Last8 + 2] = (3 * pBob[Last8 + 2] + pBob[Last8 + src_pitch2 + 2]) / 4; - pDest[Last8 + 3] = (3 * pBob[Last8 + 3] + pBob[Last8 + src_pitch2 + 3]) / 4; - pDest[Last8 + src_pitch2] = (pBob[Last8] + 3 * pBob[Last8 + src_pitch2]) / 4; - pDest[Last8 + src_pitch2 + 1] = (pBob[Last8 + 1] + 3 * pBob[Last8 + src_pitch2 + 1]) / 4; - pDest[Last8 + src_pitch2 + 2] = (pBob[Last8 + 2] + 3 * pBob[Last8 + src_pitch2 + 2]) / 4; - pDest[Last8 + src_pitch2 + 3] = (pBob[Last8 + 3] + 3 * pBob[Last8 + src_pitch2 + 3]) / 4; -#else - pDest[0] = (pBob[0] + pBob[src_pitch2 + 1]) / 2; - pDest[1] = (pBob[1] + pBob[src_pitch2 + 1]) / 2; - pDest[2] = (pBob[2] + pBob[src_pitch2 + 2]) / 2; - pDest[3] = (pBob[3] + pBob[src_pitch2 + 3]) / 2; - - // simple bob last byte - pDest[Last8] = (pBob[Last8] + pBob[Last8 + src_pitch2]) / 2; - pDest[Last8 + 1] = (pBob[Last8 + 1] + pBob[Last8 + src_pitch2 + 1]) / 2; - pDest[Last8 + 2] = (pBob[Last8 + 2] + pBob[Last8 + src_pitch2 + 2]) / 2; - pDest[Last8 + 3] = (pBob[Last8 + 3] + pBob[Last8 + src_pitch2 + 3]) / 2; -#endif - - pBob += 4; - pBobP += 4; - pSrc += 4; - pSrcP += 4; - - for (x=4; x < Last8; x += 2) { - -#ifdef USE_STRANGE_BOB -#include "StrangeBob.inc" -#else -#include "WierdBob.inc" -#endif - - // We will keep a slight bias to using the weave pixels - // from the current location, by rating them by the min distance - // from the Bob value instead of the avg distance from that value. - // our best and only rating so far - diff[0] = diff[1] = 255; - - -#endif diff --git a/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopVA.inc b/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopVA.inc deleted file mode 100644 index 3e3d19b5..00000000 --- a/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopVA.inc +++ /dev/null @@ -1,6 +0,0 @@ -// -*- c++ -*- - -// Searches the center vertical line above center and below, in both the old -// and new fields, but takes averages. These are even pixel addresses. - MERGE4PIXavg("(%%"XDI", %%"XCX", 2)", "(%%"XSI")") // down, up - MERGE4PIXavg("(%%"XDI")", "(%%"XSI", %%"XCX", 2)") // up, down diff --git a/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopVAH.inc b/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopVAH.inc deleted file mode 100644 index 33155bc1..00000000 --- a/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopVAH.inc +++ /dev/null @@ -1,6 +0,0 @@ -// -*- c++ -*- - -// Searches the center vertical line above center and below, in both the old -// and new fields, but takes averages. These are even pixel addresses. - MERGE4PIXavgH("(%%"XDI", %%"XCX", 2)", "(%%"XDI", %%"XCX")", "(%%"XSI", %%"XCX")", "(%%"XSI")") // down, up - MERGE4PIXavgH("(%%"XDI")", "(%%"XDI", %%"XCX")", "(%%"XSI", %%"XCX")", "(%%"XSI", %%"XCX", 2)") // up, down diff --git a/gst/deinterlace2/tvtime/tomsmocomp/StrangeBob.inc b/gst/deinterlace2/tvtime/tomsmocomp/StrangeBob.inc deleted file mode 100644 index 45b4c865..00000000 --- a/gst/deinterlace2/tvtime/tomsmocomp/StrangeBob.inc +++ /dev/null @@ -1,435 +0,0 @@ -// -*- c++ -*- - - // First, get and save our possible Bob values - // Assume our pixels are layed out as follows with x the calc'd bob value - // and the other pixels are from the current field - // - // j a b c k current field - // x calculated line - // m d e f n current field - // - // we calc the bob value luma value as: - // if |j - n| < Thres && |a - m| > Thres - // avg(j,n) - // end if - // if |k - m| < Thres && |c - n| > Thres - // avg(k,m) - // end if - // if |c - d| < Thres && |b - f| > Thres - // avg(c,d) - // end if - // if |a - f| < Thres && |b - d| > Thres - // avg(a,f) - // end if - // if |b - e| < Thres - // avg(b,e) - // end if - // pickup any thing not yet set with avg(b,e) - -#ifndef IS_C - - // j, n - "pxor %%mm5, %%mm5\n\t" - "pxor %%mm6, %%mm6\n\t" - "pxor %%mm7, %%mm7\n\t" - - "movq -2(%%"XBX"), %%mm0\n\t" // value a from top left - "movq -4(%%"XBX", %%"XCX"), %%mm1\n\t" // value m from bottom right - - "movq %%mm0, %%mm3\n\t" - "psubusb %%mm1, %%mm3\n\t" - "psubusb %%mm0, %%mm1\n\t" - "por %%mm1, %%mm3\n\t" // abs(a,m) - - "psubusb "_DiffThres", %%mm3\n\t" // nonzero where abs(a,m) > Thres else 0 - "pxor %%mm4, %%mm4\n\t" - "pcmpeqb %%mm4, %%mm3\n\t" // now ff where abs(a,m) < Thres, else 00 - "pcmpeqb %%mm3, %%mm4\n\t" // here ff where abs(a,m) > Thres, else 00 - - - "movq -4(%%"XBX"), %%mm0\n\t" // value j - "movq 4(%%"XBX", %%"XCX"), %%mm1\n\t" // value n - "movq %%mm0, %%mm2\n\t" - V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // avg(j,n) - "movq %%mm0, %%mm3\n\t" - "psubusb %%mm1, %%mm0\n\t" - "psubusb %%mm3, %%mm1\n\t" - "por %%mm1, %%mm0\n\t" // abs(j,n) - - "movq %%mm0, %%mm1\n\t" - "psubusb "_DiffThres", %%mm1\n\t" // nonzero where abs(j,n) > Thres else 0 - "pxor %%mm3, %%mm3\n\t" - "pcmpeqb %%mm3, %%mm1\n\t" // now ff where abs(j,n) < Thres, else 00 - - "pand %%mm4, %%mm1\n\t" - "pand %%mm1, %%mm2\n\t" - "pand %%mm1, %%mm0\n\t" - - "movq %%mm1, %%mm3\n\t" - "pxor %%mm5, %%mm3\n\t" - "pand %%mm3, %%mm6\n\t" - "pand %%mm3, %%mm7\n\t" - "pand %%mm3, %%mm5\n\t" - - "por %%mm1, %%mm5\n\t" - "por %%mm2, %%mm6\n\t" - "por %%mm0, %%mm7\n\t" - - // k & m - "movq 2(%%"XBX"), %%mm0\n\t" // value c from top left - "movq 4(%%"XBX", %%"XCX"), %%mm1\n\t" // value n from bottom right - - "movq %%mm0, %%mm3\n\t" - "psubusb %%mm1, %%mm3\n\t" - "psubusb %%mm0, %%mm1\n\t" - "por %%mm1, %%mm3\n\t" // abs(c,n) - - "psubusb "_DiffThres", %%mm3\n\t" // nonzero where abs(c,n) > Thres else 0 - "pxor %%mm4, %%mm4\n\t" - "pcmpeqb %%mm4, %%mm3\n\t" // now ff where abs(c,n) < Thres, else 00 - "pcmpeqb %%mm3, %%mm4\n\t" // here ff where abs(c,n) > Thres, else 00 - - - "movq 4(%%"XBX"), %%mm0\n\t" // value k - "movq -4(%%"XBX", %%"XCX"), %%mm1\n\t" // value m - "movq %%mm0, %%mm2\n\t" - V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // avg(k,m) - "movq %%mm0, %%mm3\n\t" - "psubusb %%mm1, %%mm0\n\t" - "psubusb %%mm3, %%mm1\n\t" - "por %%mm1, %%mm0\n\t" // abs(k,m) - - "movq %%mm0, %%mm1\n\t" - "psubusb "_DiffThres", %%mm1\n\t" // nonzero where abs(k,m) > Thres else 0 - "pxor %%mm3, %%mm3\n\t" - "pcmpeqb %%mm3, %%mm1\n\t" // now ff where abs(k,m) < Thres, else 00 - - "pand %%mm4, %%mm1\n\t" - - "pand %%mm1, %%mm2\n\t" - "pand %%mm1, %%mm0\n\t" - - "movq %%mm1, %%mm3\n\t" - "pxor %%mm5, %%mm3\n\t" - "pand %%mm3, %%mm6\n\t" - "pand %%mm3, %%mm7\n\t" - "pand %%mm3, %%mm5\n\t" - - "por %%mm1, %%mm5\n\t" - "por %%mm2, %%mm6\n\t" - "por %%mm0, %%mm7\n\t" - - - // c & d - "movq (%%"XBX"), %%mm0\n\t" // value b from top left - "movq 2(%%"XBX", %%"XCX"), %%mm1\n\t" // value f from bottom right - - "movq %%mm0, %%mm3\n\t" - "psubusb %%mm1, %%mm3\n\t" - "psubusb %%mm0, %%mm1\n\t" - "por %%mm1, %%mm3\n\t" // abs(b,f) - - "psubusb "_DiffThres", %%mm3\n\t" // nonzero where abs(b,f) > Thres else 0 - "pxor %%mm4, %%mm4\n\t" - "pcmpeqb %%mm4, %%mm3\n\t" // now ff where abs(b,f) < Thres, else 00 - "pcmpeqb %%mm3, %%mm4\n\t" // here ff where abs(b,f) > Thres, else 00 - - "movq 2(%%"XBX"), %%mm0\n\t" // value c - "movq -2(%%"XBX", %%"XCX"), %%mm1\n\t" // value d - "movq %%mm0, %%mm2\n\t" - V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // avg(c,d) - "movq %%mm0, %%mm3\n\t" - "psubusb %%mm1, %%mm0\n\t" - "psubusb %%mm3, %%mm1\n\t" - "por %%mm1, %%mm0\n\t" // abs(c,d) - - "movq %%mm0, %%mm1\n\t" - "psubusb "_DiffThres", %%mm1\n\t" // nonzero where abs(c,d) > Thres else 0 - "pxor %%mm3, %%mm3\n\t" - "pcmpeqb %%mm3, %%mm1\n\t" // now ff where abs(c,d) < Thres, else 00 - - "pand %%mm4, %%mm1\n\t" - - "pand %%mm1, %%mm2\n\t" - "pand %%mm1, %%mm0\n\t" - - "movq %%mm1, %%mm3\n\t" - "pxor %%mm5, %%mm3\n\t" - "pand %%mm3, %%mm6\n\t" - "pand %%mm3, %%mm7\n\t" - "pand %%mm3, %%mm5\n\t" - - "por %%mm1, %%mm5\n\t" - "por %%mm2, %%mm6\n\t" - "por %%mm0, %%mm7\n\t" - - // a & f - "movq (%%"XBX"), %%mm0\n\t" // value b from top left - "movq -2(%%"XBX", %%"XCX"), %%mm1\n\t" // value d from bottom right - - "movq %%mm0, %%mm3\n\t" - "psubusb %%mm1, %%mm3\n\t" - "psubusb %%mm0, %%mm1\n\t" - "por %%mm1, %%mm3\n\t" // abs(b,d) - - "psubusb "_DiffThres", %%mm3\n\t" // nonzero where abs(b,d) > Thres else 0 - "pxor %%mm4, %%mm4\n\t" - "pcmpeqb %%mm4, %%mm3\n\t" // now ff where abs(b,d) < Thres, else 00 - "pcmpeqb %%mm3, %%mm4\n\t" // here ff where abs(b,d) > Thres, else 00 - - "movq -2(%%"XBX"), %%mm0\n\t" // value a - "movq 2(%%"XBX", %%"XCX"), %%mm1\n\t" // value f - "movq %%mm0, %%mm2\n\t" - V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // avg(a,f) - "movq %%mm0, %%mm3\n\t" - "psubusb %%mm1, %%mm0\n\t" - "psubusb %%mm3, %%mm1\n\t" - "por %%mm1, %%mm0\n\t" // abs(a,f) - - "movq %%mm0, %%mm1\n\t" - "psubusb "_DiffThres", %%mm1\n\t" // nonzero where abs(a,f) > Thres else 0 - "pxor %%mm3, %%mm3\n\t" - "pcmpeqb %%mm3, %%mm1\n\t" // now ff where abs(a,f) < Thres, else 00 - - "pand %%mm4, %%mm1\n\t" - - "pand %%mm1, %%mm2\n\t" - "pand %%mm1, %%mm0\n\t" - - "movq %%mm1, %%mm3\n\t" - "pxor %%mm5, %%mm3\n\t" - "pand %%mm3, %%mm6\n\t" - "pand %%mm3, %%mm7\n\t" - "pand %%mm3, %%mm5\n\t" - - "por %%mm1, %%mm5\n\t" - "por %%mm2, %%mm6\n\t" - "por %%mm0, %%mm7\n\t" - - "pand "_YMask", %%mm5\n\t" // mask out chroma from here - "pand "_YMask", %%mm6\n\t" // mask out chroma from here - "pand "_YMask", %%mm7\n\t" // mask out chroma from here - - // b,e - "movq (%%"XBX"), %%mm0\n\t" // value b from top - "movq (%%"XBX", %%"XCX"), %%mm1\n\t" // value e from bottom - "movq %%mm0, %%mm2\n\t" - V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // avg(b,e) - "movq %%mm0, %%mm3\n\t" - "psubusb %%mm1, %%mm0\n\t" - "psubusb %%mm3, %%mm1\n\t" - "por %%mm1, %%mm0\n\t" // abs(b,e) - - "movq %%mm0, %%mm1\n\t" - "psubusb "_DiffThres", %%mm1\n\t" // nonzero where abs(b,e) > Thres else 0 - "pxor %%mm3, %%mm3\n\t" - "pcmpeqb %%mm3, %%mm1\n\t" // now ff where abs(b,e) < Thres, else 00 - - "pand %%mm1, %%mm2\n\t" - "pand %%mm1, %%mm0\n\t" - - "movq %%mm1, %%mm3\n\t" - "pxor %%mm5, %%mm3\n\t" - "pand %%mm3, %%mm6\n\t" - "pand %%mm3, %%mm7\n\t" - "pand %%mm3, %%mm5\n\t" - - "por %%mm1, %%mm5\n\t" - "por %%mm2, %%mm6\n\t" - "por %%mm0, %%mm7\n\t" - - // bob in any leftovers - "movq (%%"XBX"), %%mm0\n\t" // value b from top - "movq (%%"XBX", %%"XCX"), %%mm1\n\t" // value e from bottom - - -// We will also calc here the max/min values to later limit comb -// so the max excursion will not exceed the Max_Comb constant - -#ifdef SKIP_SEARCH - "movq %%mm0, %%mm2\n\t" -// pminub %%mm2, %%mm1 - V_PMINUB ("%%mm2", "%%mm1", "%%mm4") - -// pmaxub %%mm6, %%mm2 // clip our current results so far to be above this - V_PMAXUB ("%%mm6", "%%mm2") - "movq %%mm0, %%mm2\n\t" - V_PMAXUB ("%%mm2", "%%mm1") -// pminub %%mm6, %%mm2 // clip our current results so far to be below this - V_PMINUB ("%%mm6", "%%mm2", "%%mm4") - -#else - "movq %%mm0, %%mm2\n\t" - "movq (%%"XAX"), %%mm4\n\t" - "psubusb %%mm4, %%mm2\n\t" - "psubusb %%mm0, %%mm4\n\t" - "por %%mm2, %%mm4\n\t" // abs diff - - "movq %%mm1, %%mm2\n\t" - "movq (%%"XAX", %%"XCX"), %%mm3\n\t" - "psubusb %%mm3, %%mm2\n\t" - "psubusb %%mm1, %%mm3\n\t" - "por %%mm2, %%mm3\n\t" // abs diff -// pmaxub %%mm3, %%mm4 // top or bottom pixel moved most - V_PMAXUB ("%%mm3", "%%mm4") // top or bottom pixel moved most - "psubusb "_DiffThres", %%mm3\n\t" // moved more than allowed? or goes to 0? - "pxor %%mm4, %%mm4\n\t" - "pcmpeqb %%mm4, %%mm3\n\t" // now ff where low motion, else high motion - - "movq %%mm0, %%mm2\n\t" -// pminub %%mm2, %%mm1 - V_PMINUB ("%%mm2", "%%mm1", "%%mm4") - -// pmaxub %%mm6, %%mm2 // clip our current results so far to be above this - V_PMAXUB ("%%mm6", "%%mm2") - - "psubusb %%mm3, %%mm2\n\t" // maybe decrease it to 0000.. if no surround motion - "movq %%mm2, "_Min_Vals"\n\t" - - "movq %%mm0, %%mm2\n\t" - V_PMAXUB ("%%mm2", "%%mm1") -// pminub %%mm6, %%mm2 // clip our current results so far to be below this - V_PMINUB ("%%mm6", "%%mm2", "%%mm4") - "paddusb %%mm3, %%mm2\n\t" // maybe increase it to ffffff if no surround motion - "movq %%mm2, "_Max_Vals"\n\t" -#endif - - "movq %%mm0, %%mm2\n\t" -// pavgb %%mm2, %%mm1 // avg(b,e) - V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // avg(b,e) - - "movq %%mm0, %%mm3\n\t" - "psubusb %%mm1, %%mm3\n\t" - "psubusb %%mm0, %%mm1\n\t" - "por %%mm1, %%mm3\n\t" // abs(b,e) - "movq %%mm3, %%mm1\n\t" // keep copy of diffs - - "pxor %%mm4, %%mm4\n\t" - "psubusb %%mm7, %%mm3\n\t" // nonzero where new weights bigger, else 0 - "pcmpeqb %%mm4, %%mm3\n\t" // now ff where new better, else 00 - "pcmpeqb %%mm0, %%mm0\n\t" - "pandn %%mm0, %%mm5\n\t" - "por %%mm5, %%mm3\n\t" - "pcmpeqb %%mm3, %%mm4\n\t" // here ff where old better, else 00 - - "pand %%mm3, %%mm1\n\t" - "pand %%mm3, %%mm2\n\t" - - "pand %%mm4, %%mm6\n\t" - "pand %%mm4, %%mm7\n\t" - - "por %%mm2, %%mm6\n\t" // our x2 value - "por %%mm1, %%mm7\n\t" // our x2 diffs - "movq %%mm7, %%mm4\n\t" // save as bob uncertainty indicator - -#else - - diff[0] = -1; - diff[1] = -1; - best[0] = 0; - best[1] = 0; - // j, n - if (ABS (pBob[-2] - pBob[src_pitch2 - 4]) < DiffThres && - ABS (pBob[-4] - pBob[src_pitch2 + 4]) > DiffThres) { - best[0] = (pBob[-2] + pBob[src_pitch2 - 4]) / 2; - diff[0] = ABS (pBob[-2] - pBob[src_pitch2 - 4]); - } - if (ABS (pBob[-1] - pBob[src_pitch2 - 3]) < DiffThres && - ABS (pBob[-3] - pBob[src_pitch2 + 5]) > DiffThres) { - best[1] = (pBob[-1] + pBob[src_pitch2 - 3]) / 2; - diff[1] = ABS (pBob[-1] - pBob[src_pitch2 - 3]); - } - - // k & m - if (ABS (pBob[2] - pBob[src_pitch2 + 4]) < DiffThres && - ABS (pBob[4] - pBob[src_pitch2 - 4]) > DiffThres) { - best[0] = (pBob[4] + pBob[src_pitch2 - 4]) / 2; - diff[0] = ABS (pBob[4] - pBob[src_pitch2 - 4]); - } - - if (ABS (pBob[3] - pBob[src_pitch2 + 5]) < DiffThres && - ABS (pBob[5] - pBob[src_pitch2 - 3]) > DiffThres) { - best[1] = (pBob[5] + pBob[src_pitch2 - 3]) / 2; - diff[1] = ABS (pBob[5] - pBob[src_pitch2 - 3]); - } - - // c & d - if (ABS (pBob[0] - pBob[src_pitch2 + 2]) < DiffThres && - ABS (pBob[2] - pBob[src_pitch2 - 2]) > DiffThres) { - best[0] = (pBob[2] + pBob[src_pitch2 - 2]) / 2; - diff[0] = ABS (pBob[2] - pBob[src_pitch2 - 2]); - } - - if (ABS (pBob[1] - pBob[src_pitch2 + 3]) < DiffThres && - ABS (pBob[3] - pBob[src_pitch2 - 1]) > DiffThres) { - best[1] = (pBob[3] + pBob[src_pitch2 - 1]) / 2; - diff[1] = ABS (pBob[3] - pBob[src_pitch2 - 1]); - } - - // a & f - if (ABS (pBob[0] - pBob[src_pitch2 - 2]) < DiffThres && - ABS (pBob[-2] - pBob[src_pitch2 + 2]) > DiffThres) { - best[0] = (pBob[-2] + pBob[src_pitch2 + 2]) / 2; - diff[0] = ABS (pBob[-2] - pBob[src_pitch2 + 2]); - } - - if (ABS (pBob[1] - pBob[src_pitch2 - 1]) < DiffThres && - ABS (pBob[-1] - pBob[src_pitch2 + 3]) > DiffThres) { - best[1] = (pBob[-1] + pBob[src_pitch2 + 3]) / 2; - diff[1] = ABS (pBob[-1] - pBob[src_pitch2 + 3]); - } - - // b,e - if (ABS (pBob[0] - pBob[src_pitch2]) < DiffThres) { - best[0] = (pBob[0] + pBob[src_pitch2]) / 2; - diff[0] = ABS (pBob[0] - pBob[src_pitch2]); - } - - if (ABS (pBob[1] - pBob[src_pitch2 + 1]) < DiffThres) { - best[1] = (pBob[1] + pBob[src_pitch2 + 1]) / 2; - diff[1] = ABS (pBob[1] - pBob[src_pitch2 + 1]); - } - - -// We will also calc here the max/min values to later limit comb -// so the max excursion will not exceed the Max_Comb constant - -#ifdef SKIP_SEARCH - best[0] = CLAMP (best[0], MIN (pBob[src_pitch2], pBob[0]), MAX (pBob[src_pitch2], pBob[0])); - best[1] = CLAMP (best[1], MIN (pBob[src_pitch2 + 1], pBob[1]), MAX (pBob[src_pitch2 + 1], pBob[1])); -#else - mov[0] = MAX (ABS (pBob[0] - pBobP[0]), ABS (pBob[src_pitch2] - pBobP[src_pitch2])); - mov[1] = MAX (ABS (pBob[1] - pBobP[1]), ABS (pBob[src_pitch2 + 1] - pBobP[src_pitch2 + 1])); - - MinVals[0] = 0; - MinVals[1] = 0; - MaxVals[0] = 255; - MaxVals[1] = 255; - if (mov[0] > DiffThres) { - MinVals[0] = MAX (MIN (pBob[0], pBob[src_pitch2]), best[0]); - MaxVals[0] = MIN (MAX (pBob[0], pBob[src_pitch2]), best[0]); - } - - if (mov[1] > DiffThres) { - MinVals[1] = MAX (MIN (pBob[1], pBob[src_pitch2+1]), best[1]); - MaxVals[1] = MIN (MAX (pBob[1], pBob[src_pitch2+1]), best[1]); - } - - best[0] = CLAMP (best[0], MIN (pBob[src_pitch2], pBob[0]), MAX (pBob[src_pitch2], pBob[0])); - best[1] = CLAMP (best[1], MIN (pBob[src_pitch2 + 1], pBob[1]), MAX (pBob[src_pitch2 + 1], pBob[1])); -#endif - avg[0] = (pBob[src_pitch2] + pBob[0]) / 2; - avg[1] = (pBob[src_pitch2 + 1] + pBob[1]) / 2; - diff2[0] = ABS (pBob[src_pitch2 + 1] - pBob[1]); - diff2[1] = ABS (pBob[src_pitch2 + 1] - pBob[1]); - - if (diff[0] == -1 || diff2[0] < diff[0]) { - best[0] = avg[0]; - diff[0] = diff2[0]; - } - - if (diff[1] == -1 || diff2[1] < diff[1]) { - best[1] = avg[1]; - diff[1] = diff2[1]; - } -#endif diff --git a/gst/deinterlace2/tvtime/tomsmocomp/TomsMoCompAll.inc b/gst/deinterlace2/tvtime/tomsmocomp/TomsMoCompAll.inc deleted file mode 100644 index 89ed39e4..00000000 --- a/gst/deinterlace2/tvtime/tomsmocomp/TomsMoCompAll.inc +++ /dev/null @@ -1,241 +0,0 @@ -/* - * GStreamer - * Copyright (c) 2002 Tom Barry All rights reserved. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Relicensed for GStreamer from GPL to LGPL with permit from Tom Barry. - * See: http://bugzilla.gnome.org/show_bug.cgi?id=163578 - */ - - -#ifndef TopFirst -#define TopFirst IsOdd -#endif - -#ifdef SEFUNC -#undef SEFUNC -#endif - -#if defined(IS_MMXEXT) -#define SEFUNC(x) Search_Effort_MMXEXT_##x(int src_pitch, int dst_pitch, int rowsize, const unsigned char *pWeaveSrc, const unsigned char *pWeaveSrcP, unsigned char *pWeaveDest, int IsOdd, const unsigned char *pCopySrc, const unsigned char *pCopySrcP, int FldHeight) -#elif defined(IS_3DNOW) -#define SEFUNC(x) Search_Effort_3DNOW_##x(int src_pitch, int dst_pitch, int rowsize, const unsigned char *pWeaveSrc, const unsigned char *pWeaveSrcP, unsigned char *pWeaveDest, int IsOdd, const unsigned char *pCopySrc, const unsigned char *pCopySrcP, int FldHeight) -#elif defined(IS_MMX) -#define SEFUNC(x) Search_Effort_MMX_##x(int src_pitch, int dst_pitch, int rowsize, const unsigned char *pWeaveSrc, const unsigned char *pWeaveSrcP, unsigned char *pWeaveDest, int IsOdd, const unsigned char *pCopySrc, const unsigned char *pCopySrcP, int FldHeight) -#else -#define SEFUNC(x) Search_Effort_C_##x(int src_pitch, int dst_pitch, int rowsize, const unsigned char *pWeaveSrc, const unsigned char *pWeaveSrcP, unsigned char *pWeaveDest, int IsOdd, const unsigned char *pCopySrc, const unsigned char *pCopySrcP, int FldHeight) -#endif - -#include "TomsMoCompAll2.inc" - -#define USE_STRANGE_BOB - -#include "TomsMoCompAll2.inc" - -#undef USE_STRANGE_BOB - -#undef SEFUNC -#if defined(IS_MMXEXT) -#define SEFUNC(x) Search_Effort_MMXEXT_##x(src_pitch, dst_pitch, rowsize, pWeaveSrc, pWeaveSrcP, pWeaveDest, IsOdd, pCopySrc, pCopySrcP, FldHeight) -#elif defined(IS_3DNOW) -#define SEFUNC(x) Search_Effort_3DNOW_##x(src_pitch, dst_pitch, rowsize, pWeaveSrc, pWeaveSrcP, pWeaveDest, IsOdd, pCopySrc, pCopySrcP, FldHeight) -#elif defined(IS_MMX) -#define SEFUNC(x) Search_Effort_MMX_##x(src_pitch, dst_pitch, rowsize, pWeaveSrc, pWeaveSrcP, pWeaveDest, IsOdd, pCopySrc, pCopySrcP, FldHeight) -#else -#define SEFUNC(x) Search_Effort_C_##x(src_pitch, dst_pitch, rowsize, pWeaveSrc, pWeaveSrcP, pWeaveDest, IsOdd, pCopySrc, pCopySrcP, FldHeight) -#endif - -void FUNCT_NAME(GstDeinterlaceMethod *d_method, GstDeinterlace2* object, GstBuffer *outbuf) -{ - GstDeinterlaceMethodTomsMoComp *self = GST_DEINTERLACE_METHOD_TOMSMOCOMP (d_method); - long SearchEffort = self->search_effort; - int UseStrangeBob = self->strange_bob; - int IsOdd; - const unsigned char *pWeaveSrc; - const unsigned char *pWeaveSrcP; - unsigned char *pWeaveDest; - const unsigned char *pCopySrc; - const unsigned char *pCopySrcP; - unsigned char *pCopyDest; - int src_pitch; - int dst_pitch; - int rowsize; - int FldHeight; - - /* double stride do address just every odd/even scanline */ - src_pitch = object->field_stride; - dst_pitch = object->row_stride; - rowsize = object->row_stride; - FldHeight = object->field_height; - - pCopySrc = GST_BUFFER_DATA(object->field_history[object->history_count-1].buf); - pCopySrcP = GST_BUFFER_DATA(object->field_history[object->history_count-3].buf); - pWeaveSrc = GST_BUFFER_DATA(object->field_history[object->history_count-2].buf); - pWeaveSrcP = GST_BUFFER_DATA(object->field_history[object->history_count-4].buf); - - /* use bottom field and interlace top field */ - if (object->field_history[object->history_count-2].flags == PICTURE_INTERLACED_BOTTOM) { - IsOdd = 1; - - // if we have an odd field we copy an even field and weave an odd field - pCopyDest = GST_BUFFER_DATA(outbuf); - pWeaveDest = pCopyDest + dst_pitch; - } - /* do it vice verca */ - else { - - IsOdd = 0; - // if we have an even field we copy an odd field and weave an even field - pCopyDest = GST_BUFFER_DATA(outbuf) + dst_pitch; - pWeaveDest = GST_BUFFER_DATA(outbuf); - } - - - // copy 1st and last weave lines - Fieldcopy(pWeaveDest, pCopySrc, rowsize, - 1, dst_pitch*2, src_pitch); - Fieldcopy(pWeaveDest+(FldHeight-1)*dst_pitch*2, - pCopySrc+(FldHeight-1)*src_pitch, rowsize, - 1, dst_pitch*2, src_pitch); - -#ifdef USE_VERTICAL_FILTER - // Vertical Filter currently not implemented for DScaler !! - // copy 1st and last lines the copy field - Fieldcopy(pCopyDest, pCopySrc, rowsize, - 1, dst_pitch*2, src_pitch); - Fieldcopy(pCopyDest+(FldHeight-1)*dst_pitch*2, - pCopySrc+(FldHeight-1)*src_pitch, rowsize, - 1, dst_pitch*2, src_pitch); -#else - - // copy all of the copy field - Fieldcopy(pCopyDest, pCopySrc, rowsize, - FldHeight, dst_pitch*2, src_pitch); -#endif - // then go fill in the hard part, being variously lazy depending upon - // SearchEffort - - if(!UseStrangeBob) { - if (SearchEffort == 0) - { - SEFUNC(0); - } - else if (SearchEffort <= 1) - { - SEFUNC(1); - } - /* else if (SearchEffort <= 2) - { - SEFUNC(2); - } - */ - else if (SearchEffort <= 3) - { - SEFUNC(3); - } - else if (SearchEffort <= 5) - { - SEFUNC(5); - } - else if (SearchEffort <= 9) - { - SEFUNC(9); - } - else if (SearchEffort <= 11) - { - SEFUNC(11); - } - else if (SearchEffort <= 13) - { - SEFUNC(13); - } - else if (SearchEffort <= 15) - { - SEFUNC(15); - } - else if (SearchEffort <= 19) - { - SEFUNC(19); - } - else if (SearchEffort <= 21) - { - SEFUNC(21); - } - else - { - SEFUNC(Max); - } - } - else - { - if (SearchEffort == 0) - { - SEFUNC(0SB); - } - else if (SearchEffort <= 1) - { - SEFUNC(1SB); - } - /* else if (SearchEffort <= 2) - { - SEFUNC(2SB); - } - */ - else if (SearchEffort <= 3) - { - SEFUNC(3SB); - } - else if (SearchEffort <= 5) - { - SEFUNC(5SB); - } - else if (SearchEffort <= 9) - { - SEFUNC(9SB); - } - else if (SearchEffort <= 11) - { - SEFUNC(11SB); - } - else if (SearchEffort <= 13) - { - SEFUNC(13SB); - } - else if (SearchEffort <= 15) - { - SEFUNC(15SB); - } - else if (SearchEffort <= 19) - { - SEFUNC(19SB); - } - else if (SearchEffort <= 21) - { - SEFUNC(21SB); - } - else - { - SEFUNC(MaxSB); - } - } - -#if defined(BUILD_X86_ASM) && !defined(IS_C) - __asm__ __volatile__("emms"); -#endif -} diff --git a/gst/deinterlace2/tvtime/tomsmocomp/TomsMoCompAll2.inc b/gst/deinterlace2/tvtime/tomsmocomp/TomsMoCompAll2.inc deleted file mode 100644 index f6344eab..00000000 --- a/gst/deinterlace2/tvtime/tomsmocomp/TomsMoCompAll2.inc +++ /dev/null @@ -1,243 +0,0 @@ -// -*- c++ -*- - -#ifdef SEARCH_EFFORT_FUNC -#undef SEARCH_EFFORT_FUNC -#endif - -#ifdef USE_STRANGE_BOB -#define SEARCH_EFFORT_FUNC(n) SEFUNC(n##SB) -#else -#define SEARCH_EFFORT_FUNC(n) SEFUNC(n) -#endif - -static inline int SEARCH_EFFORT_FUNC(0) // we don't try at all ;-) -{ - //see Search_Effort_Max() for comments -#define SKIP_SEARCH -#include "SearchLoopTop.inc" -#include "SearchLoopBottom.inc" -#undef SKIP_SEARCH -} - -static inline int SEARCH_EFFORT_FUNC(1) -{ -#ifdef IS_C -#define SKIP_SEARCH -#include "SearchLoopTop.inc" -#include "SearchLoopBottom.inc" -#undef SKIP_SEARCH -#else - //see Search_Effort_Max() for comments -#include "SearchLoopTop.inc" - RESET_CHROMA // pretend chroma diffs was 255 each -#include "SearchLoop0A.inc" -#include "SearchLoopBottom.inc" -#endif -} - -static inline int SEARCH_EFFORT_FUNC(3) -{ -#ifdef IS_C -#define SKIP_SEARCH -#include "SearchLoopTop.inc" -#include "SearchLoopBottom.inc" -#undef SKIP_SEARCH -#else - //see Search_Effort_Max() for comments -#include "SearchLoopTop.inc" -#include "SearchLoopOddA2.inc" - RESET_CHROMA // pretend chroma diffs was 255 each -#include "SearchLoop0A.inc" -#include "SearchLoopBottom.inc" -#endif -} - -static inline int SEARCH_EFFORT_FUNC(5) -{ -#ifdef IS_C -#define SKIP_SEARCH -#include "SearchLoopTop.inc" -#include "SearchLoopBottom.inc" -#undef SKIP_SEARCH -#else - //see Search_Effort_Max() for comments -#include "SearchLoopTop.inc" -#include "SearchLoopOddA2.inc" -#include "SearchLoopOddAH2.inc" - RESET_CHROMA // pretend chroma diffs was 255 each -#include "SearchLoop0A.inc" -#include "SearchLoopBottom.inc" -#endif -} - -// 3x3 search -static inline int SEARCH_EFFORT_FUNC(9) -{ -#ifdef IS_C -#define SKIP_SEARCH -#include "SearchLoopTop.inc" -#include "SearchLoopBottom.inc" -#undef SKIP_SEARCH -#else - //see SearchEffortMax() for comments -#include "SearchLoopTop.inc" -#include "SearchLoopOddA.inc" - RESET_CHROMA // pretend chroma diffs was 255 each -#include "SearchLoopVA.inc" -#include "SearchLoop0A.inc" -#include "SearchLoopBottom.inc" -#endif -} - -// Search 9 with 2 H-half pels added -static inline int SEARCH_EFFORT_FUNC(11) -{ -#ifdef IS_C -#define SKIP_SEARCH -#include "SearchLoopTop.inc" -#include "SearchLoopBottom.inc" -#undef SKIP_SEARCH -#else - //see SearchEffortMax() for comments -#include "SearchLoopTop.inc" -#include "SearchLoopOddA.inc" -#include "SearchLoopOddAH2.inc" - RESET_CHROMA // pretend chroma diffs was 255 each -#include "SearchLoopVA.inc" -#include "SearchLoop0A.inc" -#include "SearchLoopBottom.inc" -#endif -} - -// Search 11 with 2 V-half pels added -static inline int SEARCH_EFFORT_FUNC(13) -{ -#ifdef IS_C -#define SKIP_SEARCH -#include "SearchLoopTop.inc" -#include "SearchLoopBottom.inc" -#undef SKIP_SEARCH -#else - //see SearchEffortMax() for comments -#include "SearchLoopTop.inc" -#include "SearchLoopOddA.inc" -#include "SearchLoopOddAH2.inc" - RESET_CHROMA // pretend chroma diffs was 255 each -#include "SearchLoopVAH.inc" -#include "SearchLoopVA.inc" -#include "SearchLoop0A.inc" -#include "SearchLoopBottom.inc" -#endif -} - -// 5x3 -static inline int SEARCH_EFFORT_FUNC(15) -{ -#ifdef IS_C -#define SKIP_SEARCH -#include "SearchLoopTop.inc" -#include "SearchLoopBottom.inc" -#undef SKIP_SEARCH -#else - //see SearchEffortMax() for comments -#include "SearchLoopTop.inc" -#include "SearchLoopOddA.inc" - RESET_CHROMA // pretend chroma diffs was 255 each -#include "SearchLoopEdgeA.inc" -#include "SearchLoopVA.inc" -#include "SearchLoop0A.inc" -#include "SearchLoopBottom.inc" -#endif -} - -// 5x3 + 4 half pels -static inline int SEARCH_EFFORT_FUNC(19) -{ -#ifdef IS_C -#define SKIP_SEARCH -#include "SearchLoopTop.inc" -#include "SearchLoopBottom.inc" -#undef SKIP_SEARCH -#else - //see SearchEffortMax() for comments -#include "SearchLoopTop.inc" -#include "SearchLoopOddA.inc" -#include "SearchLoopOddAH2.inc" - RESET_CHROMA // pretend chroma diffs was 255 each -#include "SearchLoopEdgeA.inc" -#include "SearchLoopVAH.inc" -#include "SearchLoopVA.inc" -#include "SearchLoop0A.inc" -#include "SearchLoopBottom.inc" -#endif -} - -// Handle one 4x1 block of pixels -// Search a 7x3 area, no half pels - -static inline int SEARCH_EFFORT_FUNC(21) -{ -#ifdef IS_C -#define SKIP_SEARCH -#include "SearchLoopTop.inc" -#include "SearchLoopBottom.inc" -#undef SKIP_SEARCH -#else - //see SearchLoopTop.inc for comments -#include "SearchLoopTop.inc" - - // odd addresses -- the pixels at odd address wouldn't generate - // good luma values but we will mask those off - -#include "SearchLoopOddA6.inc" // 4 odd v half pels, 3 to left & right -#include "SearchLoopOddA.inc" // 6 odd pels, 1 to left & right - - RESET_CHROMA // pretend chroma diffs was 255 each - - // even addresses -- use both luma and chroma from these - // search averages of 2 pixels left and right -#include "SearchLoopEdgeA.inc" - // search vertical line and averages, -1,0,+1 -#include "SearchLoopVA.inc" - // blend our results and loop -#include "SearchLoop0A.inc" -#include "SearchLoopBottom.inc" -#endif -} - -// Handle one 4x1 block of pixels -// Search a 9x3 area, no half pels -static inline int SEARCH_EFFORT_FUNC(Max) -{ -#ifdef IS_C -#define SKIP_SEARCH -#include "SearchLoopTop.inc" -#include "SearchLoopBottom.inc" -#undef SKIP_SEARCH -#else - //see SearchLoopTop.inc for comments -#include "SearchLoopTop.inc" - - // odd addresses -- the pixels at odd address wouldn't generate - // good luma values but we will mask those off - -#include "SearchLoopOddA6.inc" // 4 odd v half pels, 3 to left & right -#include "SearchLoopOddA.inc" // 6 odd pels, 1 to left & right - - RESET_CHROMA // pretend chroma diffs was 255 each - - // even addresses -- use both luma and chroma from these - // search averages of 4 pixels left and right -#include "SearchLoopEdgeA8.inc" - // search averages of 2 pixels left and right -#include "SearchLoopEdgeA.inc" - // search vertical line and averages, -1,0,+1 -#include "SearchLoopVA.inc" - // blend our results and loop -#include "SearchLoop0A.inc" -#include "SearchLoopBottom.inc" -#endif -} - -#undef SEARCH_EFFORT_FUNC - diff --git a/gst/deinterlace2/tvtime/tomsmocomp/WierdBob.inc b/gst/deinterlace2/tvtime/tomsmocomp/WierdBob.inc deleted file mode 100644 index f4bbb830..00000000 --- a/gst/deinterlace2/tvtime/tomsmocomp/WierdBob.inc +++ /dev/null @@ -1,286 +0,0 @@ -// -*- c++ -*- - - // First, get and save our possible Bob values - // Assume our pixels are layed out as follows with x the calc'd bob value - // and the other pixels are from the current field - // - // j a b c k current field - // x calculated line - // m d e f n current field - // - // we calc the bob value as: - // x2 = either avg(a,f), avg(c,d), avg(b,e), avg(j,n), or avg(k,m) - - // selected for the smallest of abs(a,f), abs(c,d), or abs(b,e), etc. - -#ifndef IS_C - // a,f - "movq -2(%%"XBX"), %%mm0\n\t" // value a from top left - "movq 2(%%"XBX", %%"XCX"), %%mm1\n\t" // value f from bottom right - "movq %%mm0, %%mm6\n\t" -// pavgb %%mm6, %%mm1 // avg(a,f), also best so far - V_PAVGB ("%%mm6", "%%mm1", "%%mm7", _ShiftMask) // avg(a,f), also best so far - "movq %%mm0, %%mm7\n\t" - "psubusb %%mm1, %%mm7\n\t" - "psubusb %%mm0, %%mm1\n\t" - "por %%mm1, %%mm7\n\t" // abs diff, also best so far - - // c,d - "movq 2(%%"XBX"), %%mm0\n\t" // value a from top left - "movq -2(%%"XBX", %%"XCX"), %%mm1\n\t" // value f from bottom right - "movq %%mm0, %%mm2\n\t" -// pavgb %%mm2, %%mm1 // avg(c,d) - V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // avg(c,d) - "movq %%mm0, %%mm3\n\t" - "psubusb %%mm1, %%mm3\n\t" - "psubusb %%mm0, %%mm1\n\t" - "por %%mm1, %%mm3\n\t" // abs(c,d) - "movq %%mm3, %%mm1\n\t" // keep copy - - "psubusb %%mm7, %%mm3\n\t" // nonzero where new weights bigger, else 0 - "pxor %%mm4, %%mm4\n\t" - "pcmpeqb %%mm4, %%mm3\n\t" // now ff where new better, else 00 - "pcmpeqb %%mm3, %%mm4\n\t" // here ff where old better, else 00 - - "pand %%mm3, %%mm1\n\t" // keep only better new avg and abs - "pand %%mm3, %%mm2\n\t" - - "pand %%mm4, %%mm6\n\t" - "pand %%mm4, %%mm7\n\t" - - "por %%mm2, %%mm6\n\t" // and merge new & old vals keeping best - "por %%mm1, %%mm7\n\t" - "por "_UVMask", %%mm7\n\t" // but we know chroma is worthless so far - "pand "_YMask", %%mm5\n\t" // mask out chroma from here also - - // j,n - "movq -4(%%"XBX"), %%mm0\n\t" // value j from top left - "movq 4(%%"XBX", %%"XCX"), %%mm1\n\t" // value n from bottom right - "movq %%mm0, %%mm2\n\t" -// pavgb %%mm2, %%mm1 // avg(j,n) - V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // avg(j,n) - "movq %%mm0, %%mm3\n\t" - "psubusb %%mm1, %%mm3\n\t" - "psubusb %%mm0, %%mm1\n\t" - "por %%mm1, %%mm3\n\t" // abs(j-n) - "movq %%mm3, %%mm1\n\t" // keep copy - - "psubusb %%mm7, %%mm3\n\t" // nonzero where new weights bigger, else 0 - "pxor %%mm4, %%mm4\n\t" - "pcmpeqb %%mm4, %%mm3\n\t" // now ff where new better, else 00 - "pcmpeqb %%mm3, %%mm4\n\t" // here ff where old better, else 00 - - "pand %%mm3, %%mm1\n\t" // keep only better new avg and abs - "pand %%mm2, %%mm3\n\t" - - "pand %%mm4, %%mm6\n\t" - "pand %%mm4, %%mm7\n\t" - - "por %%mm3, %%mm6\n\t" // and merge new & old vals keeping best - "por %%mm1, %%mm7\n\t" // " - - // k, m - "movq 4(%%"XBX"), %%mm0\n\t" // value k from top right - "movq -4(%%"XBX", %%"XCX"), %%mm1\n\t" // value n from bottom left - "movq %%mm0, %%mm4\n\t" -// pavgb %%mm4, %%mm1 // avg(k,m) - V_PAVGB ("%%mm4", "%%mm1", "%%mm3", _ShiftMask) // avg(k,m) - - "movq %%mm0, %%mm3\n\t" - "psubusb %%mm1, %%mm3\n\t" - "psubusb %%mm0, %%mm1\n\t" - "por %%mm1, %%mm3\n\t" // abs(k,m) - "movq %%mm3, %%mm1\n\t" // keep copy - - "movq %%mm4, %%mm2\n\t" // avg(k,m) - - "psubusb %%mm7, %%mm3\n\t" // nonzero where new weights bigger, else 0 - "pxor %%mm4, %%mm4\n\t" - "pcmpeqb %%mm4, %%mm3\n\t" // now ff where new better, else 00 - "pcmpeqb %%mm3, %%mm4\n\t" // here ff where old better, else 00 - - "pand %%mm3, %%mm1\n\t" // keep only better new avg and abs - "pand %%mm2, %%mm3\n\t" - - "pand %%mm4, %%mm6\n\t" - "pand %%mm4, %%mm7\n\t" - - "por %%mm3, %%mm6\n\t" // and merge new & old vals keeping best - "por %%mm1, %%mm7\n\t" // " - - // b,e - "movq (%%"XBX"), %%mm0\n\t" // value b from top - "movq (%%"XBX", %%"XCX"), %%mm1\n\t" // value e from bottom - -// We will also calc here the max/min values to later limit comb -// so the max excursion will not exceed the Max_Comb constant - -#ifdef SKIP_SEARCH - "movq %%mm0, %%mm2\n\t" -// pminub %%mm2, %%mm1 - V_PMINUB ("%%mm2", "%%mm1", "%%mm4") - -// pmaxub %%mm6, %%mm2 // clip our current results so far to be above this - V_PMAXUB ("%%mm6", "%%mm2") - "movq %%mm0, %%mm2\n\t" - V_PMAXUB ("%%mm2", "%%mm1") -// pminub %%mm6, %%mm2 // clip our current results so far to be below this - V_PMINUB ("%%mm6", "%%mm2", "%%mm4") - -#else - "movq %%mm0, %%mm2\n\t" - "movq (%%"XAX"), %%mm4\n\t" - "psubusb %%mm4, %%mm2\n\t" - "psubusb %%mm0, %%mm4\n\t" - "por %%mm2, %%mm4\n\t" // abs diff - - "movq %%mm1, %%mm2\n\t" - "movq (%%"XAX", %%"XCX"), %%mm3\n\t" - "psubusb %%mm3, %%mm2\n\t" - "psubusb %%mm1, %%mm3\n\t" - "por %%mm2, %%mm3\n\t" // abs diff -// pmaxub %%mm3, %%mm4 // top or bottom pixel moved most - V_PMAXUB ("%%mm3", "%%mm4") // top or bottom pixel moved most - "psubusb "_Max_Mov", %%mm3\n\t" // moved more than allowed? or goes to 0? - "pxor %%mm4, %%mm4\n\t" - "pcmpeqb %%mm4, %%mm3\n\t" // now ff where low motion, else high motion - - "movq %%mm0, %%mm2\n\t" -// pminub %%mm2, %%mm1 - V_PMINUB ("%%mm2", "%%mm1", "%%mm4") - -// pmaxub %%mm6, %%mm2 // clip our current results so far to be above this - V_PMAXUB ("%%mm6", "%%mm2") - - "psubusb %%mm3, %%mm2\n\t" // maybe decrease it to 0000.. if no surround motion - "movq %%mm2, "_Min_Vals"\n\t" - - "movq %%mm0, %%mm2\n\t" - V_PMAXUB ("%%mm2", "%%mm1") -// pminub %%mm6, %%mm2 // clip our current results so far to be below this - V_PMINUB ("%%mm6", "%%mm2", "%%mm4") - "paddusb %%mm3, %%mm2\n\t" // maybe increase it to ffffff if no surround motion - "movq %%mm2, "_Max_Vals"\n\t" -#endif - - "movq %%mm0, %%mm2\n\t" -// pavgb %%mm2, %%mm1 // avg(b,e) - V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // avg(b,e) - - "movq %%mm0, %%mm3\n\t" - "psubusb %%mm1, %%mm3\n\t" - "psubusb %%mm0, %%mm1\n\t" - "por %%mm1, %%mm3\n\t" // abs(c,d) - "movq %%mm3, %%mm1\n\t" // keep copy of diffs - - "pxor %%mm4, %%mm4\n\t" - "psubusb %%mm7, %%mm3\n\t" // nonzero where new weights bigger, else 0 - "pcmpeqb %%mm4, %%mm3\n\t" // now ff where new better, else 00 - - "pcmpeqb %%mm3, %%mm4\n\t" // here ff where old better, else 00 - - "pand %%mm3, %%mm1\n\t" - "pand %%mm3, %%mm2\n\t" - - "pand %%mm4, %%mm6\n\t" - "pand %%mm4, %%mm7\n\t" - - "por %%mm2, %%mm6\n\t" // our x2 value - "por %%mm1, %%mm7\n\t" // our x2 diffs - "movq %%mm7, %%mm4\n\t" // save as bob uncertainty indicator - -#else - - // a,f - best[0] = (pBob[-2] + pBob[src_pitch2 + 2]) / 2; - diff[0] = ABS (pBob[-2] - pBob[src_pitch2 + 2]); - best[1] = (pBob[-1] + pBob[src_pitch2 + 3]) / 2; - diff[1] = ABS (pBob[-1] - pBob[src_pitch2 + 3]); - - // c,d - if (ABS (pBob[2] - pBob[src_pitch2 - 2]) < diff[0]) { - best[0] = (pBob[2] + pBob[src_pitch2 - 2]) / 2; - diff[0] = ABS (pBob[2] - pBob[src_pitch2 - 2]); - } - - if (ABS (pBob[3] - pBob[src_pitch2 - 1]) < diff[1]) { - best[1] = (pBob[3] + pBob[src_pitch2 - 1]) / 2; - diff[1] = ABS (pBob[3] - pBob[src_pitch2 - 1]); - } - - // j,n - if (ABS (pBob[-4] - pBob[src_pitch2 + 4]) < diff[0]) { - best[0] = (pBob[-4] + pBob[src_pitch2 + 4]) / 2; - diff[0] = ABS (pBob[-4] - pBob[src_pitch2 + 4]); - } - - if (ABS (pBob[-3] - pBob[src_pitch2 + 5]) < diff[1]) { - best[1] = (pBob[-3] + pBob[src_pitch2 + 5]) / 2; - diff[1] = ABS (pBob[-3] - pBob[src_pitch2 + 5]); - } - - // k,m - if (ABS (pBob[4] - pBob[src_pitch2 - 4]) < diff[0]) { - best[0] = (pBob[4] + pBob[src_pitch2 - 4]) / 2; - diff[0] = ABS (pBob[-4] - pBob[src_pitch2 - 4]); - } - - if (ABS (pBob[5] - pBob[src_pitch2 - 3]) < diff[1]) { - best[1] = (pBob[5] + pBob[src_pitch2 - 3]) / 2; - diff[1] = ABS (pBob[-3] - pBob[src_pitch2 - 3]); - } - // k,m - if (ABS (pBob[4] - pBob[src_pitch2 - 4]) < diff[0]) { - best[0] = (pBob[4] + pBob[src_pitch2 - 4]) / 2; - diff[0] = ABS (pBob[-4] - pBob[src_pitch2 - 4]); - } - - if (ABS (pBob[5] - pBob[src_pitch2 - 3]) < diff[1]) { - best[1] = (pBob[5] + pBob[src_pitch2 - 3]) / 2; - diff[1] = ABS (pBob[-3] - pBob[src_pitch2 - 3]); - } - -// We will also calc here the max/min values to later limit comb -// so the max excursion will not exceed the Max_Comb constant - -#ifdef SKIP_SEARCH - best[0] = CLAMP (best[0], MIN (pBob[src_pitch2], pBob[0]), MAX (pBob[src_pitch2], pBob[0])); - best[1] = CLAMP (best[1], MIN (pBob[src_pitch2 + 1], pBob[1]), MAX (pBob[src_pitch2 + 1], pBob[1])); -#else - mov[0] = MAX (ABS (pBob[0] - pBobP[0]), ABS (pBob[src_pitch2] - pBobP[src_pitch2])); - mov[1] = MAX (ABS (pBob[1] - pBobP[1]), ABS (pBob[src_pitch2 + 1] - pBobP[src_pitch2 + 1])); - - MinVals[0] = 0; - MinVals[1] = 0; - MaxVals[0] = 255; - MaxVals[1] = 255; - - if (mov[0] > Max_Mov[0]) { - MinVals[0] = MAX (MIN (pBob[0], pBob[src_pitch2]), best[0]); - MaxVals[0] = MIN (MAX (pBob[0], pBob[src_pitch2]), best[0]); - } - - if (mov[1] > Max_Mov[1]) { - MinVals[1] = MAX (MIN (pBob[1], pBob[src_pitch2 + 1]), best[1]); - MaxVals[1] = MIN (MAX (pBob[1], pBob[src_pitch2 + 1]), best[1]); - } - - best[0] = CLAMP (best[0], MIN (pBob[src_pitch2], pBob[0]), MAX (pBob[src_pitch2], pBob[0])); - best[1] = CLAMP (best[1], MIN (pBob[src_pitch2 + 1], pBob[1]), MAX (pBob[src_pitch2 + 1], pBob[1])); -#endif - - avg[0] = (pBob[src_pitch2] + pBob[0]) / 2; - avg[1] = (pBob[src_pitch2 + 1] + pBob[1]) / 2; - diff2[0] = ABS (pBob[src_pitch2] - pBob[0]); - diff2[1] = ABS (pBob[src_pitch2 + 1] - pBob[1]); - - if (diff2[0] < diff[0]) { - best[0] = avg[0]; - diff[0] = diff2[0]; - } - - if (diff2[1] < diff[1]) { - best[1] = avg[1]; - diff[1] = diff2[1]; - } -#endif diff --git a/gst/deinterlace2/tvtime/tomsmocomp/tomsmocompmacros.h b/gst/deinterlace2/tvtime/tomsmocomp/tomsmocompmacros.h deleted file mode 100644 index 7e8147ec..00000000 --- a/gst/deinterlace2/tvtime/tomsmocomp/tomsmocompmacros.h +++ /dev/null @@ -1,164 +0,0 @@ -#include -#include - -// Define a few macros for CPU dependent instructions. -// I suspect I don't really understand how the C macro preprocessor works but -// this seems to get the job done. // TRB 7/01 - -// BEFORE USING THESE YOU MUST SET: - -// #define SIMD_TYPE MMXEXT (or MMX or 3DNOW) - -// some macros for pavgb instruction -// V_PAVGB(mmr1, mmr2, mmr work register, smask) mmr2 may = mmrw if you can trash it - -#define V_PAVGB_MMX(mmr1, mmr2, mmrw, smask) \ - "movq "mmr2", "mmrw"\n\t" \ - "pand "smask", "mmrw"\n\t" \ - "psrlw $1, "mmrw"\n\t" \ - "pand "smask", "mmr1"\n\t" \ - "psrlw $1, "mmr1"\n\t" \ - "paddusb "mmrw", "mmr1"\n\t" -#define V_PAVGB_MMXEXT(mmr1, mmr2, mmrw, smask) "pavgb "mmr2", "mmr1"\n\t" -#define V_PAVGB_3DNOW(mmr1, mmr2, mmrw, smask) "pavgusb "mmr2", "mmr1"\n\t" -#define V_PAVGB(mmr1, mmr2, mmrw, smask) V_PAVGB2(mmr1, mmr2, mmrw, smask, SIMD_TYPE) -#define V_PAVGB2(mmr1, mmr2, mmrw, smask, simd_type) V_PAVGB3(mmr1, mmr2, mmrw, smask, simd_type) -#define V_PAVGB3(mmr1, mmr2, mmrw, smask, simd_type) V_PAVGB_##simd_type(mmr1, mmr2, mmrw, smask) - -// some macros for pmaxub instruction -#define V_PMAXUB_MMX(mmr1, mmr2) \ - "psubusb "mmr2", "mmr1"\n\t" \ - "paddusb "mmr2", "mmr1"\n\t" -#define V_PMAXUB_MMXEXT(mmr1, mmr2) "pmaxub "mmr2", "mmr1"\n\t" -#define V_PMAXUB_3DNOW(mmr1, mmr2) V_PMAXUB_MMX(mmr1, mmr2) // use MMX version -#define V_PMAXUB(mmr1, mmr2) V_PMAXUB2(mmr1, mmr2, SIMD_TYPE) -#define V_PMAXUB2(mmr1, mmr2, simd_type) V_PMAXUB3(mmr1, mmr2, simd_type) -#define V_PMAXUB3(mmr1, mmr2, simd_type) V_PMAXUB_##simd_type(mmr1, mmr2) - -// some macros for pminub instruction -// V_PMINUB(mmr1, mmr2, mmr work register) mmr2 may NOT = mmrw -#define V_PMINUB_MMX(mmr1, mmr2, mmrw) \ - "pcmpeqb "mmrw", "mmrw"\n\t" \ - "psubusb "mmr2", "mmrw"\n\t" \ - "paddusb "mmrw", "mmr1"\n\t" \ - "psubusb "mmrw", "mmr1"\n\t" -#define V_PMINUB_MMXEXT(mmr1, mmr2, mmrw) "pminub "mmr2", "mmr1"\n\t" -#define V_PMINUB_3DNOW(mmr1, mmr2, mmrw) V_PMINUB_MMX(mmr1, mmr2, mmrw) // use MMX version -#define V_PMINUB(mmr1, mmr2, mmrw) V_PMINUB2(mmr1, mmr2, mmrw, SIMD_TYPE) -#define V_PMINUB2(mmr1, mmr2, mmrw, simd_type) V_PMINUB3(mmr1, mmr2, mmrw, simd_type) -#define V_PMINUB3(mmr1, mmr2, mmrw, simd_type) V_PMINUB_##simd_type(mmr1, mmr2, mmrw) - -// some macros for movntq instruction -// V_MOVNTQ(mmr1, mmr2) -#define V_MOVNTQ_MMX(mmr1, mmr2) "movq "mmr2", "mmr1"\n\t" -#define V_MOVNTQ_3DNOW(mmr1, mmr2) "movq "mmr2", "mmr1"\n\t" -#define V_MOVNTQ_MMXEXT(mmr1, mmr2) "movntq "mmr2", "mmr1"\n\t" -#define V_MOVNTQ(mmr1, mmr2) V_MOVNTQ2(mmr1, mmr2, SIMD_TYPE) -#define V_MOVNTQ2(mmr1, mmr2, simd_type) V_MOVNTQ3(mmr1, mmr2, simd_type) -#define V_MOVNTQ3(mmr1, mmr2, simd_type) V_MOVNTQ_##simd_type(mmr1, mmr2) - -// end of macros - -#ifdef IS_SSE2 - -#define MERGE4PIXavg(PADDR1, PADDR2) \ - "movdqu "PADDR1", %%xmm0\n\t" /* our 4 pixels */ \ - "movdqu "PADDR2", %%xmm1\n\t" /* our pixel2 value */ \ - "movdqa %%xmm0, %%xmm2\n\t" /* another copy of our pixel1 value */ \ - "movdqa %%xmm1, %%xmm3\n\t" /* another copy of our pixel1 value */ \ - "psubusb %%xmm1, %%xmm2\n\t" \ - "psubusb %%xmm0, %%xmm3\n\t" \ - "por %%xmm3, %%xmm2\n\t" \ - "pavgb %%xmm1, %%xmm0\n\t" /* avg of 2 pixels */ \ - "movdqa %%xmm2, %%xmm3\n\t" /* another copy of our our weights */ \ - "pxor %%xmm1, %%xmm1\n\t" \ - "psubusb %%xmm7, %%xmm3\n\t" /* nonzero where old weights lower, else 0 */ \ - "pcmpeqb %%xmm1, %%xmm3\n\t" /* now ff where new better, else 00 */ \ - "pcmpeqb %%xmm3, %%xmm1\n\t" /* here ff where old better, else 00 */ \ - "pand %%xmm3, %%xmm0\n\t" /* keep only better new pixels */ \ - "pand %%xmm3, %%xmm2\n\t" /* and weights */ \ - "pand %%xmm1, %%xmm5\n\t" /* keep only better old pixels */ \ - "pand %%xmm1, %%xmm7\n\t" \ - "por %%xmm0, %%xmm5\n\t" /* and merge new & old vals */ \ - "por %%xmm2, %%xmm7\n\t" - -#define MERGE4PIXavgH(PADDR1A, PADDR1B, PADDR2A, PADDR2B) \ - "movdqu "PADDR1A", %%xmm0\n\t" /* our 4 pixels */ \ - "movdqu "PADDR2A", %%xmm1\n\t" /* our pixel2 value */ \ - "movdqu "PADDR1B", %%xmm2\n\t" /* our 4 pixels */ \ - "movdqu "PADDR2B", %%xmm3\n\t" /* our pixel2 value */ \ - "pavgb %%xmm2, %%xmm0\n\t" \ - "pavgb %%xmm3, %%xmm1\n\t" \ - "movdqa %%xmm0, %%xmm2\n\t" /* another copy of our pixel1 value */ \ - "movdqa %%xmm1, %%xmm3\n\t" /* another copy of our pixel1 value */ \ - "psubusb %%xmm1, %%xmm2\n\t" \ - "psubusb %%xmm0, %%xmm3\n\t" \ - "por %%xmm3, %%xmm2\n\t" \ - "pavgb %%xmm1, %%xmm0\n\t" /* avg of 2 pixels */ \ - "movdqa %%xmm2, %%xmm3\n\t" /* another copy of our our weights */ \ - "pxor %%xmm1, %%xmm1\n\t" \ - "psubusb %%xmm7, %%xmm3\n\t" /* nonzero where old weights lower, else 0 */ \ - "pcmpeqb %%xmm1, %%xmm3\n\t" /* now ff where new better, else 00 */ \ - "pcmpeqb %%xmm3, %%xmm1\n\t" /* here ff where old better, else 00 */ \ - "pand %%xmm3, %%xmm0\n\t" /* keep only better new pixels */ \ - "pand %%xmm3, %%xmm2\n\t" /* and weights */ \ - "pand %%xmm1, %%xmm5\n\t" /* keep only better old pixels */ \ - "pand %%xmm1, %%xmm7\n\t" \ - "por %%xmm0, %%xmm5\n\t" /* and merge new & old vals */ \ - "por %%xmm2, %%xmm7\n\t" - -#define RESET_CHROMA "por "_UVMask", %%xmm7\n\t" - -#else // ifdef IS_SSE2 - -#define MERGE4PIXavg(PADDR1, PADDR2) \ - "movq "PADDR1", %%mm0\n\t" /* our 4 pixels */ \ - "movq "PADDR2", %%mm1\n\t" /* our pixel2 value */ \ - "movq %%mm0, %%mm2\n\t" /* another copy of our pixel1 value */ \ - "movq %%mm1, %%mm3\n\t" /* another copy of our pixel1 value */ \ - "psubusb %%mm1, %%mm2\n\t" \ - "psubusb %%mm0, %%mm3\n\t" \ - "por %%mm3, %%mm2\n\t" \ - V_PAVGB ("%%mm0", "%%mm1", "%%mm3", _ShiftMask) /* avg of 2 pixels */ \ - "movq %%mm2, %%mm3\n\t" /* another copy of our our weights */ \ - "pxor %%mm1, %%mm1\n\t" \ - "psubusb %%mm7, %%mm3\n\t" /* nonzero where old weights lower, else 0 */ \ - "pcmpeqb %%mm1, %%mm3\n\t" /* now ff where new better, else 00 */ \ - "pcmpeqb %%mm3, %%mm1\n\t" /* here ff where old better, else 00 */ \ - "pand %%mm3, %%mm0\n\t" /* keep only better new pixels */ \ - "pand %%mm3, %%mm2\n\t" /* and weights */ \ - "pand %%mm1, %%mm5\n\t" /* keep only better old pixels */ \ - "pand %%mm1, %%mm7\n\t" \ - "por %%mm0, %%mm5\n\t" /* and merge new & old vals */ \ - "por %%mm2, %%mm7\n\t" - -#define MERGE4PIXavgH(PADDR1A, PADDR1B, PADDR2A, PADDR2B) \ - "movq "PADDR1A", %%mm0\n\t" /* our 4 pixels */ \ - "movq "PADDR2A", %%mm1\n\t" /* our pixel2 value */ \ - "movq "PADDR1B", %%mm2\n\t" /* our 4 pixels */ \ - "movq "PADDR2B", %%mm3\n\t" /* our pixel2 value */ \ - V_PAVGB("%%mm0", "%%mm2", "%%mm2", _ShiftMask) \ - V_PAVGB("%%mm1", "%%mm3", "%%mm3", _ShiftMask) \ - "movq %%mm0, %%mm2\n\t" /* another copy of our pixel1 value */ \ - "movq %%mm1, %%mm3\n\t" /* another copy of our pixel1 value */ \ - "psubusb %%mm1, %%mm2\n\t" \ - "psubusb %%mm0, %%mm3\n\t" \ - "por %%mm3, %%mm2\n\t" \ - V_PAVGB("%%mm0", "%%mm1", "%%mm3", _ShiftMask) /* avg of 2 pixels */ \ - "movq %%mm2, %%mm3\n\t" /* another copy of our our weights */ \ - "pxor %%mm1, %%mm1\n\t" \ - "psubusb %%mm7, %%mm3\n\t" /* nonzero where old weights lower, else 0 */ \ - "pcmpeqb %%mm1, %%mm3\n\t" /* now ff where new better, else 00 */ \ - "pcmpeqb %%mm3, %%mm1\n\t" /* here ff where old better, else 00 */ \ - "pand %%mm3, %%mm0\n\t" /* keep only better new pixels */ \ - "pand %%mm3, %%mm2\n\t" /* and weights */ \ - "pand %%mm1, %%mm5\n\t" /* keep only better old pixels */ \ - "pand %%mm1, %%mm7\n\t" \ - "por %%mm0, %%mm5\n\t" /* and merge new & old vals */ \ - "por %%mm2, %%mm7\n\t" - -#define RESET_CHROMA "por "_UVMask", %%mm7\n\t" - -#endif - - diff --git a/gst/deinterlace2/tvtime/vfir.c b/gst/deinterlace2/tvtime/vfir.c deleted file mode 100644 index 56950459..00000000 --- a/gst/deinterlace2/tvtime/vfir.c +++ /dev/null @@ -1,187 +0,0 @@ -/* - * - * GStreamer - * Copyright (C) 2004 Billy Biggs - * Copyright (c) 2001, 2002, 2003 Fabrice Bellard. - * Copyright (C) 2008 Sebastian Dröge - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * This file contains code from ffmpeg, see http://ffmpeg.org/ (LGPL) - * and modifications by Billy Biggs. - * - * Relicensed for GStreamer from GPL to LGPL with permit from Billy Biggs. - * See: http://bugzilla.gnome.org/show_bug.cgi?id=163578 - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include "_stdint.h" -#include "gstdeinterlace2.h" -#include - -#define GST_TYPE_DEINTERLACE_METHOD_VFIR (gst_deinterlace_method_vfir_get_type ()) -#define GST_IS_DEINTERLACE_METHOD_VFIR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DEINTERLACE_METHOD_VFIR)) -#define GST_IS_DEINTERLACE_METHOD_VFIR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_DEINTERLACE_METHOD_VFIR)) -#define GST_DEINTERLACE_METHOD_VFIR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_DEINTERLACE_METHOD_VFIR, GstDeinterlaceMethodVFIRClass)) -#define GST_DEINTERLACE_METHOD_VFIR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_DEINTERLACE_METHOD_VFIR, GstDeinterlaceMethodVFIR)) -#define GST_DEINTERLACE_METHOD_VFIR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEINTERLACE_METHOD_VFIR, GstDeinterlaceMethodVFIRClass)) -#define GST_DEINTERLACE_METHOD_VFIR_CAST(obj) ((GstDeinterlaceMethodVFIR*)(obj)) - -GType gst_deinterlace_method_vfir_get_type (void); - -typedef GstDeinterlaceSimpleMethod GstDeinterlaceMethodVFIR; - -typedef GstDeinterlaceSimpleMethodClass GstDeinterlaceMethodVFIRClass; - -/* - * The MPEG2 spec uses a slightly harsher filter, they specify - * [-1 8 2 8 -1]. ffmpeg uses a similar filter but with more of - * a tendancy to blur than to use the local information. The - * filter taps here are: [-1 4 2 4 -1]. - */ - -/** - * C implementation. - */ -static inline void -deinterlace_line_c (GstDeinterlaceMethod * self, GstDeinterlace2 * parent, - guint8 * dst, GstDeinterlaceScanlineData * scanlines, gint width) -{ - gint sum; - guint8 *lum_m4 = scanlines->tt1; - guint8 *lum_m3 = scanlines->t0; - guint8 *lum_m2 = scanlines->m1; - guint8 *lum_m1 = scanlines->b0; - guint8 *lum = scanlines->bb1; - gint size = width * 2; - - for (; size >= 0; size--) { - sum = -lum_m4[0]; - sum += lum_m3[0] << 2; - sum += lum_m2[0] << 1; - sum += lum_m1[0] << 2; - sum += -lum[0]; - dst[0] = (sum + 4) >> 3; // This needs to be clipped at 0 and 255: cm[(sum + 4) >> 3]; - lum_m4++; - lum_m3++; - lum_m2++; - lum_m1++; - lum++; - dst++; - } -} - -#ifdef BUILD_X86_ASM -#include "mmx.h" -static void -deinterlace_line_mmx (GstDeinterlaceMethod * self, GstDeinterlace2 * parent, - guint8 * dst, GstDeinterlaceScanlineData * scanlines, gint width) -{ - mmx_t rounder; - guint8 *lum_m4 = scanlines->tt1; - guint8 *lum_m3 = scanlines->t0; - guint8 *lum_m2 = scanlines->m1; - guint8 *lum_m1 = scanlines->b0; - guint8 *lum = scanlines->bb1; - - rounder.uw[0] = 4; - rounder.uw[1] = 4; - rounder.uw[2] = 4; - rounder.uw[3] = 4; - pxor_r2r (mm7, mm7); - movq_m2r (rounder, mm6); - - for (; width > 1; width -= 2) { - movd_m2r (*lum_m4, mm0); - movd_m2r (*lum_m3, mm1); - movd_m2r (*lum_m2, mm2); - movd_m2r (*lum_m1, mm3); - movd_m2r (*lum, mm4); - punpcklbw_r2r (mm7, mm0); - punpcklbw_r2r (mm7, mm1); - punpcklbw_r2r (mm7, mm2); - punpcklbw_r2r (mm7, mm3); - punpcklbw_r2r (mm7, mm4); - paddw_r2r (mm3, mm1); - psllw_i2r (1, mm2); - paddw_r2r (mm4, mm0); - psllw_i2r (2, mm1); // 2 - paddw_r2r (mm6, mm2); - paddw_r2r (mm2, mm1); - psubusw_r2r (mm0, mm1); - psrlw_i2r (3, mm1); // 3 - packuswb_r2r (mm7, mm1); - movd_r2m (mm1, *dst); - lum_m4 += 4; - lum_m3 += 4; - lum_m2 += 4; - lum_m1 += 4; - lum += 4; - dst += 4; - } - emms (); - - /* Handle odd widths */ - if (width > 0) { - scanlines->tt1 = lum_m4; - scanlines->t0 = lum_m3; - scanlines->m1 = lum_m2; - scanlines->b0 = lum_m1; - scanlines->bb1 = lum; - - deinterlace_line_c (self, parent, dst, scanlines, width); - } -} -#endif - -G_DEFINE_TYPE (GstDeinterlaceMethodVFIR, gst_deinterlace_method_vfir, - GST_TYPE_DEINTERLACE_SIMPLE_METHOD); - -static void -gst_deinterlace_method_vfir_class_init (GstDeinterlaceMethodVFIRClass * klass) -{ - GstDeinterlaceMethodClass *dim_class = (GstDeinterlaceMethodClass *) klass; - GstDeinterlaceSimpleMethodClass *dism_class = - (GstDeinterlaceSimpleMethodClass *) klass; -#ifdef BUILD_X86_ASM - guint cpu_flags = oil_cpu_get_flags (); -#endif - - dim_class->fields_required = 2; - dim_class->name = "Blur Vertical"; - dim_class->nick = "vfir"; - dim_class->latency = 0; - -#ifdef BUILD_X86_ASM - if (cpu_flags & OIL_IMPL_FLAG_MMX) { - dism_class->interpolate_scanline = deinterlace_line_mmx; - } else { - dism_class->interpolate_scanline = deinterlace_line_c; - } -#else - dism_class->interpolate_scanline = deinterlace_line_c; -#endif -} - -static void -gst_deinterlace_method_vfir_init (GstDeinterlaceMethodVFIR * self) -{ -} diff --git a/gst/deinterlace2/tvtime/weave.c b/gst/deinterlace2/tvtime/weave.c deleted file mode 100644 index 09732a3a..00000000 --- a/gst/deinterlace2/tvtime/weave.c +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Weave frames - * Copyright (C) 2002 Billy Biggs . - * Copyright (C) 2008 Sebastian Dröge - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include "_stdint.h" -#include "gstdeinterlace2.h" -#include - -#define GST_TYPE_DEINTERLACE_METHOD_WEAVE (gst_deinterlace_method_weave_get_type ()) -#define GST_IS_DEINTERLACE_METHOD_WEAVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DEINTERLACE_METHOD_WEAVE)) -#define GST_IS_DEINTERLACE_METHOD_WEAVE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_DEINTERLACE_METHOD_WEAVE)) -#define GST_DEINTERLACE_METHOD_WEAVE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_DEINTERLACE_METHOD_WEAVE, GstDeinterlaceMethodWeaveClass)) -#define GST_DEINTERLACE_METHOD_WEAVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_DEINTERLACE_METHOD_WEAVE, GstDeinterlaceMethodWeave)) -#define GST_DEINTERLACE_METHOD_WEAVE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEINTERLACE_METHOD_WEAVE, GstDeinterlaceMethodWeaveClass)) -#define GST_DEINTERLACE_METHOD_WEAVE_CAST(obj) ((GstDeinterlaceMethodWeave*)(obj)) - -GType gst_deinterlace_method_weave_get_type (void); - -typedef GstDeinterlaceSimpleMethod GstDeinterlaceMethodWeave; - -typedef GstDeinterlaceSimpleMethodClass GstDeinterlaceMethodWeaveClass; - - -static void -deinterlace_scanline_weave (GstDeinterlaceMethod * self, - GstDeinterlace2 * parent, guint8 * out, - GstDeinterlaceScanlineData * scanlines, gint width) -{ - oil_memcpy (out, scanlines->m1, parent->row_stride); -} - -static void -copy_scanline (GstDeinterlaceMethod * self, GstDeinterlace2 * parent, - guint8 * out, GstDeinterlaceScanlineData * scanlines, gint width) -{ - oil_memcpy (out, scanlines->m0, parent->row_stride); -} - -G_DEFINE_TYPE (GstDeinterlaceMethodWeave, gst_deinterlace_method_weave, - GST_TYPE_DEINTERLACE_SIMPLE_METHOD); - -static void -gst_deinterlace_method_weave_class_init (GstDeinterlaceMethodWeaveClass * klass) -{ - GstDeinterlaceMethodClass *dim_class = (GstDeinterlaceMethodClass *) klass; - GstDeinterlaceSimpleMethodClass *dism_class = - (GstDeinterlaceSimpleMethodClass *) klass; - - dim_class->fields_required = 2; - dim_class->name = "Weave"; - dim_class->nick = "weave"; - dim_class->latency = 0; - - dism_class->interpolate_scanline = deinterlace_scanline_weave; - dism_class->copy_scanline = copy_scanline; -} - -static void -gst_deinterlace_method_weave_init (GstDeinterlaceMethodWeave * self) -{ -} diff --git a/gst/deinterlace2/tvtime/weavebff.c b/gst/deinterlace2/tvtime/weavebff.c deleted file mode 100644 index 4ddf5a51..00000000 --- a/gst/deinterlace2/tvtime/weavebff.c +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Weave frames, bottom-field-first. - * Copyright (C) 2003 Billy Biggs . - * Copyright (C) 2008 Sebastian Dröge - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include "_stdint.h" -#include "gstdeinterlace2.h" -#include - -#define GST_TYPE_DEINTERLACE_METHOD_WEAVE_BFF (gst_deinterlace_method_weave_bff_get_type ()) -#define GST_IS_DEINTERLACE_METHOD_WEAVE_BFF(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DEINTERLACE_METHOD_WEAVE_BFF)) -#define GST_IS_DEINTERLACE_METHOD_WEAVE_BFF_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_DEINTERLACE_METHOD_WEAVE_BFF)) -#define GST_DEINTERLACE_METHOD_WEAVE_BFF_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_DEINTERLACE_METHOD_WEAVE_BFF, GstDeinterlaceMethodWeaveBFFClass)) -#define GST_DEINTERLACE_METHOD_WEAVE_BFF(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_DEINTERLACE_METHOD_WEAVE_BFF, GstDeinterlaceMethodWeaveBFF)) -#define GST_DEINTERLACE_METHOD_WEAVE_BFF_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEINTERLACE_METHOD_WEAVE_BFF, GstDeinterlaceMethodWeaveBFFClass)) -#define GST_DEINTERLACE_METHOD_WEAVE_BFF_CAST(obj) ((GstDeinterlaceMethodWeaveBFF*)(obj)) - -GType gst_deinterlace_method_weave_bff_get_type (void); - -typedef GstDeinterlaceSimpleMethod GstDeinterlaceMethodWeaveBFF; - -typedef GstDeinterlaceSimpleMethodClass GstDeinterlaceMethodWeaveBFFClass; - - -static void -deinterlace_scanline_weave (GstDeinterlaceMethod * self, - GstDeinterlace2 * parent, guint8 * out, - GstDeinterlaceScanlineData * scanlines, gint width) -{ - oil_memcpy (out, scanlines->m1, parent->row_stride); -} - -static void -copy_scanline (GstDeinterlaceMethod * self, GstDeinterlace2 * parent, - guint8 * out, GstDeinterlaceScanlineData * scanlines, gint width) -{ - /* FIXME: original code used m2 and m0 but this looks really bad */ - if (scanlines->bottom_field) { - oil_memcpy (out, scanlines->bb2, parent->row_stride); - } else { - oil_memcpy (out, scanlines->bb0, parent->row_stride); - } -} - -G_DEFINE_TYPE (GstDeinterlaceMethodWeaveBFF, gst_deinterlace_method_weave_bff, - GST_TYPE_DEINTERLACE_SIMPLE_METHOD); - -static void -gst_deinterlace_method_weave_bff_class_init (GstDeinterlaceMethodWeaveBFFClass * - klass) -{ - GstDeinterlaceMethodClass *dim_class = (GstDeinterlaceMethodClass *) klass; - GstDeinterlaceSimpleMethodClass *dism_class = - (GstDeinterlaceSimpleMethodClass *) klass; - - dim_class->fields_required = 3; - dim_class->name = "Progressive: Bottom Field First"; - dim_class->nick = "weavebff"; - dim_class->latency = 0; - - dism_class->interpolate_scanline = deinterlace_scanline_weave; - dism_class->copy_scanline = copy_scanline; -} - -static void -gst_deinterlace_method_weave_bff_init (GstDeinterlaceMethodWeaveBFF * self) -{ -} diff --git a/gst/deinterlace2/tvtime/weavetff.c b/gst/deinterlace2/tvtime/weavetff.c deleted file mode 100644 index 9411f51b..00000000 --- a/gst/deinterlace2/tvtime/weavetff.c +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Weave frames, top-field-first. - * Copyright (C) 2003 Billy Biggs . - * Copyright (C) 2008 Sebastian Dröge - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include "_stdint.h" -#include "gstdeinterlace2.h" -#include - -#define GST_TYPE_DEINTERLACE_METHOD_WEAVE_TFF (gst_deinterlace_method_weave_tff_get_type ()) -#define GST_IS_DEINTERLACE_METHOD_WEAVE_TFF(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DEINTERLACE_METHOD_WEAVE_TFF)) -#define GST_IS_DEINTERLACE_METHOD_WEAVE_TFF_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_DEINTERLACE_METHOD_WEAVE_TFF)) -#define GST_DEINTERLACE_METHOD_WEAVE_TFF_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_DEINTERLACE_METHOD_WEAVE_TFF, GstDeinterlaceMethodWeaveTFFClass)) -#define GST_DEINTERLACE_METHOD_WEAVE_TFF(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_DEINTERLACE_METHOD_WEAVE_TFF, GstDeinterlaceMethodWeaveTFF)) -#define GST_DEINTERLACE_METHOD_WEAVE_TFF_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEINTERLACE_METHOD_WEAVE_TFF, GstDeinterlaceMethodWeaveTFFClass)) -#define GST_DEINTERLACE_METHOD_WEAVE_TFF_CAST(obj) ((GstDeinterlaceMethodWeaveTFF*)(obj)) - -GType gst_deinterlace_method_weave_tff_get_type (void); - -typedef GstDeinterlaceSimpleMethod GstDeinterlaceMethodWeaveTFF; - -typedef GstDeinterlaceSimpleMethodClass GstDeinterlaceMethodWeaveTFFClass; - - -static void -deinterlace_scanline_weave (GstDeinterlaceMethod * self, - GstDeinterlace2 * parent, guint8 * out, - GstDeinterlaceScanlineData * scanlines, gint width) -{ - oil_memcpy (out, scanlines->m1, parent->row_stride); -} - -static void -copy_scanline (GstDeinterlaceMethod * self, GstDeinterlace2 * parent, - guint8 * out, GstDeinterlaceScanlineData * scanlines, gint width) -{ - /* FIXME: original code used m2 and m0 but this looks really bad */ - if (scanlines->bottom_field) { - oil_memcpy (out, scanlines->bb0, parent->row_stride); - } else { - oil_memcpy (out, scanlines->bb2, parent->row_stride); - } -} - -G_DEFINE_TYPE (GstDeinterlaceMethodWeaveTFF, gst_deinterlace_method_weave_tff, - GST_TYPE_DEINTERLACE_SIMPLE_METHOD); - -static void -gst_deinterlace_method_weave_tff_class_init (GstDeinterlaceMethodWeaveTFFClass * - klass) -{ - GstDeinterlaceMethodClass *dim_class = (GstDeinterlaceMethodClass *) klass; - GstDeinterlaceSimpleMethodClass *dism_class = - (GstDeinterlaceSimpleMethodClass *) klass; - - dim_class->fields_required = 3; - dim_class->name = "Progressive: Top Field First"; - dim_class->nick = "weavetff"; - dim_class->latency = 0; - - dism_class->interpolate_scanline = deinterlace_scanline_weave; - dism_class->copy_scanline = copy_scanline; -} - -static void -gst_deinterlace_method_weave_tff_init (GstDeinterlaceMethodWeaveTFF * self) -{ -} diff --git a/gst/deinterlace2/tvtime/x86-64_macros.inc b/gst/deinterlace2/tvtime/x86-64_macros.inc deleted file mode 100644 index 2e9df758..00000000 --- a/gst/deinterlace2/tvtime/x86-64_macros.inc +++ /dev/null @@ -1,82 +0,0 @@ -/* - * - * GStreamer - * Copyright (C) 2004 Dirk Ziegelmeier - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * - * See: http://bugzilla.gnome.org/show_bug.cgi?id=163578 - */ - -/* - * This file is copied from TVTIME's sources. - * Original author: Achim Schneider - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#ifndef XAX - -#if defined (HAVE_CPU_I386) && !defined(HAVE_CPU_X86_64) - -#define XAX "eax" -#define XBX "ebx" -#define XCX "ecx" -#define XDX "edx" -#define XSI "esi" -#define XDI "edi" -#define XSP "esp" -#define MOVX "movl" -#define LEAX "leal" -#define DECX "decl" -#define PUSHX "pushl" -#define POPX "popl" -#define CMPX "cmpl" -#define ADDX "addl" -#define SHLX "shll" -#define SHRX "shrl" -#define SUBX "subl" - -#elif defined (HAVE_CPU_X86_64) - -#define XAX "rax" -#define XBX "rbx" -#define XCX "rcx" -#define XDX "rdx" -#define XSI "rsi" -#define XDI "rdi" -#define XSP "rsp" -#define MOVX "movq" -#define LEAX "leaq" -#define DECX "decq" -#define PUSHX "pushq" -#define POPX "popq" -#define CMPX "cmpq" -#define ADDX "addq" -#define SHLX "shlq" -#define SHRX "shrq" -#define SUBX "subq" - -#else -#error Undefined architecture. Define either ARCH_X86 or ARCH_X86_64. -#endif - -#endif -- cgit v1.2.1 From 60f46ec99ce543a6342b2ec12a2ff26043f98e38 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 13 May 2009 17:54:47 +0200 Subject: y4menc: don't strip timestamps Fixes #582483 --- gst/y4m/gsty4mencode.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gst/y4m/gsty4mencode.c b/gst/y4m/gsty4mencode.c index dc218643..cc9352ab 100644 --- a/gst/y4m/gsty4mencode.c +++ b/gst/y4m/gsty4mencode.c @@ -231,6 +231,7 @@ gst_y4m_encode_chain (GstPad * pad, GstBuffer * buf) { GstY4mEncode *filter = GST_Y4M_ENCODE (GST_PAD_PARENT (pad)); GstBuffer *outbuf; + GstClockTime timestamp; /* check we got some decent info from caps */ if (filter->width < 0) { @@ -240,6 +241,8 @@ gst_y4m_encode_chain (GstPad * pad, GstBuffer * buf) return GST_FLOW_NOT_NEGOTIATED; } + timestamp = GST_BUFFER_TIMESTAMP (buf); + if (G_UNLIKELY (!filter->header)) { outbuf = gst_y4m_encode_get_stream_header (filter); filter->header = TRUE; @@ -252,8 +255,9 @@ gst_y4m_encode_chain (GstPad * pad, GstBuffer * buf) /* decorate */ gst_buffer_make_metadata_writable (outbuf); gst_buffer_set_caps (outbuf, GST_PAD_CAPS (filter->srcpad)); - /* strip to avoid sink dropping on time-base, decorate and send */ - GST_BUFFER_TIMESTAMP (outbuf) = GST_CLOCK_TIME_NONE; + + GST_BUFFER_TIMESTAMP (outbuf) = timestamp; + return gst_pad_push (filter->srcpad, outbuf); } -- cgit v1.2.1 From b20a88702d2fb88886575cbeca24ae5684851ca4 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 13 May 2009 17:55:46 +0200 Subject: y4menc: change my email change my email to something more current See #580783 --- gst/y4m/gsty4mencode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/y4m/gsty4mencode.c b/gst/y4m/gsty4mencode.c index cc9352ab..3b82f5c1 100644 --- a/gst/y4m/gsty4mencode.c +++ b/gst/y4m/gsty4mencode.c @@ -51,7 +51,7 @@ static const GstElementDetails y4mencode_details = GST_ELEMENT_DETAILS ("YUV4MPEG video encoder", "Codec/Encoder/Video", "Encodes a YUV frame into the yuv4mpeg format (mjpegtools)", - "Wim Taymans "); + "Wim Taymans "); /* Filter signals and args */ -- cgit v1.2.1 From b769f22404ca1d566b38b50854f184b5eda628fd Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Wed, 13 May 2009 10:29:36 +0100 Subject: resindvd: Fix raciness in rsndvdbin when initially creating pads Protect pad exposure with a preroll lock to avoid situations where no-more-pads is fired more than once, or fired just before the last pad is actually added. --- ext/resindvd/resindvdbin.c | 28 ++++++++++++++++------------ ext/resindvd/resindvdbin.h | 1 + 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/ext/resindvd/resindvdbin.c b/ext/resindvd/resindvdbin.c index 310fac7f..e5f28288 100644 --- a/ext/resindvd/resindvdbin.c +++ b/ext/resindvd/resindvdbin.c @@ -44,6 +44,9 @@ GST_DEBUG_CATEGORY_EXTERN (resindvd_debug); #define DVDBIN_LOCK(d) g_mutex_lock((d)->dvd_lock) #define DVDBIN_UNLOCK(d) g_mutex_unlock((d)->dvd_lock) +#define DVDBIN_PREROLL_LOCK(d) g_mutex_lock((d)->preroll_lock) +#define DVDBIN_PREROLL_UNLOCK(d) g_mutex_unlock((d)->preroll_lock) + #define DEFAULT_DEVICE "/dev/dvd" enum { @@ -159,6 +162,7 @@ static void rsn_dvdbin_init (RsnDvdBin * dvdbin, RsnDvdBinClass * gclass) { dvdbin->dvd_lock = g_mutex_new (); + dvdbin->preroll_lock = g_mutex_new (); } static void @@ -167,6 +171,7 @@ rsn_dvdbin_finalize (GObject * object) RsnDvdBin *dvdbin = RESINDVDBIN (object); g_mutex_free (dvdbin->dvd_lock); + g_mutex_free (dvdbin->preroll_lock); g_free (dvdbin->last_uri); g_free (dvdbin->device); @@ -741,58 +746,57 @@ failed: static void dvdbin_pad_blocked_cb (GstPad * pad, gboolean blocked, RsnDvdBin * dvdbin) { - gboolean changed = FALSE; + gboolean added_last_pad = FALSE; gboolean added = FALSE; if (!blocked) return; if (pad == dvdbin->subpicture_pad) { GST_DEBUG_OBJECT (dvdbin, "Pad block -> subpicture pad"); - GST_OBJECT_LOCK (dvdbin); + DVDBIN_PREROLL_LOCK (dvdbin); added = dvdbin->subpicture_added; dvdbin->subpicture_added = TRUE; - GST_OBJECT_UNLOCK (dvdbin); if (!added) { gst_element_add_pad (GST_ELEMENT (dvdbin), dvdbin->subpicture_pad); - changed = TRUE; + added_last_pad = (dvdbin->audio_added && dvdbin->video_added); } + DVDBIN_PREROLL_UNLOCK (dvdbin); gst_pad_set_blocked_async (pad, FALSE, (GstPadBlockCallback) dvdbin_pad_blocked_cb, dvdbin); } else if (pad == dvdbin->audio_pad) { GST_DEBUG_OBJECT (dvdbin, "Pad block -> audio pad"); - GST_OBJECT_LOCK (dvdbin); + DVDBIN_PREROLL_LOCK (dvdbin); added = dvdbin->audio_added; dvdbin->audio_added = TRUE; - GST_OBJECT_UNLOCK (dvdbin); if (!added) { gst_element_add_pad (GST_ELEMENT (dvdbin), dvdbin->audio_pad); - changed = TRUE; + added_last_pad = (dvdbin->subpicture_added && dvdbin->video_added); } + DVDBIN_PREROLL_UNLOCK (dvdbin); gst_pad_set_blocked_async (pad, FALSE, (GstPadBlockCallback) dvdbin_pad_blocked_cb, dvdbin); } else if (pad == dvdbin->video_pad) { GST_DEBUG_OBJECT (dvdbin, "Pad block -> video pad"); - GST_OBJECT_LOCK (dvdbin); + DVDBIN_PREROLL_LOCK (dvdbin); added = dvdbin->video_added; dvdbin->video_added = TRUE; - GST_OBJECT_UNLOCK (dvdbin); if (!added) { gst_element_add_pad (GST_ELEMENT (dvdbin), dvdbin->video_pad); - changed = TRUE; + added_last_pad = (dvdbin->subpicture_added && dvdbin->audio_added); } + DVDBIN_PREROLL_UNLOCK (dvdbin); gst_pad_set_blocked_async (pad, FALSE, (GstPadBlockCallback) dvdbin_pad_blocked_cb, dvdbin); } - if (changed && - dvdbin->video_added && dvdbin->audio_added && dvdbin->subpicture_added) { + if (added_last_pad) { GST_DEBUG_OBJECT (dvdbin, "Firing no more pads from pad-blocked cb"); gst_element_no_more_pads (GST_ELEMENT (dvdbin)); } diff --git a/ext/resindvd/resindvdbin.h b/ext/resindvd/resindvdbin.h index 5a063f4f..d9aa1078 100644 --- a/ext/resindvd/resindvdbin.h +++ b/ext/resindvd/resindvdbin.h @@ -58,6 +58,7 @@ struct _RsnDvdBin /* Protects pieces list and properties */ GMutex *dvd_lock; + GMutex *preroll_lock; gchar *device; gchar *last_uri; -- cgit v1.2.1 From 29b44a5e2f058689ba7ecec00b5355c8cf0dc642 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Thu, 14 May 2009 10:55:38 +0100 Subject: dvdspu: Push update frame, if any, when entering stills. When entering a still frame generates an updated buffer, make sure to push it out, otherwise we may not put a frame onscreen with a rendered button, causing raciness as to whether buttons get drawn or not when jumping back to the menu on some discs. --- gst/dvdspu/gstdvdspu.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gst/dvdspu/gstdvdspu.c b/gst/dvdspu/gstdvdspu.c index 82048529..703c405b 100644 --- a/gst/dvdspu/gstdvdspu.c +++ b/gst/dvdspu/gstdvdspu.c @@ -417,6 +417,8 @@ gst_dvd_spu_video_event (GstPad * pad, GstEvent * event) gboolean in_still; if (gst_structure_get_boolean (structure, "still-state", &in_still)) { + GstBuffer *to_push = NULL; + GST_DEBUG_OBJECT (dvdspu, "DVD event of type %s on video pad: in-still = %d", event_type, in_still); @@ -431,10 +433,15 @@ gst_dvd_spu_video_event (GstPad * pad, GstEvent * event) * screen, otherwise the last frame might have been discarded * by QoS */ gst_dvd_spu_redraw_still (dvdspu, TRUE); + to_push = dvdspu->pending_frame; + dvdspu->pending_frame = NULL; + } else { state->flags &= ~(SPU_STATE_STILL_FRAME); } DVD_SPU_UNLOCK (dvdspu); + if (to_push) + gst_pad_push (dvdspu->srcpad, to_push); } gst_event_unref (event); res = TRUE; -- cgit v1.2.1 From d9fef92ea03961f2bf7a1fc75c99223ecf35f168 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Thu, 14 May 2009 08:42:24 +0100 Subject: resindvd: Fix a leak of the DVD title string --- ext/resindvd/resindvdsrc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/resindvd/resindvdsrc.c b/ext/resindvd/resindvdsrc.c index 15a2408d..37fc9da9 100644 --- a/ext/resindvd/resindvdsrc.c +++ b/ext/resindvd/resindvdsrc.c @@ -842,6 +842,7 @@ update_title_info (resinDvdSrc * src) GstTagList *tags = gst_tag_list_new (); gst_tag_list_add (tags, GST_TAG_MERGE_REPLACE, GST_TAG_TITLE, title_str, NULL); + g_free (title_str); gst_element_found_tags (GST_ELEMENT_CAST (src), tags); } } -- cgit v1.2.1 From 73f77c04aacd5e6ad97e34546a7a9517b430a901 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Tue, 12 May 2009 23:42:00 +0100 Subject: resindvd: Send commands-changed on button change and handle commands query Send the commands-changed navigation message when the set of available DVD menu button actions changes, and handle the commands navigation query so that (e.g.) Totem can know about the available navigation commands. --- ext/resindvd/resindvdsrc.c | 95 +++++++++++++++++++++++++++++++++++++++++++--- ext/resindvd/resindvdsrc.h | 2 + 2 files changed, 92 insertions(+), 5 deletions(-) diff --git a/ext/resindvd/resindvdsrc.c b/ext/resindvd/resindvdsrc.c index 37fc9da9..3b635abc 100644 --- a/ext/resindvd/resindvdsrc.c +++ b/ext/resindvd/resindvdsrc.c @@ -53,6 +53,15 @@ typedef enum RSN_NAV_RESULT_BRANCH_AND_HIGHLIGHT } RsnNavResult; +typedef enum +{ + RSN_BTN_NONE = 0x00, + RSN_BTN_LEFT = 0x01, + RSN_BTN_RIGHT = 0x02, + RSN_BTN_UP = 0x04, + RSN_BTN_DOWN = 0x04 +} RsnBtnMask; + enum { /* FILL ME */ @@ -395,6 +404,7 @@ rsn_dvdsrc_start (RsnBaseSrc * bsrc) src->part_n = -1; src->active_button = -1; + src->cur_btn_mask = RSN_BTN_NONE; src->angles_changed = FALSE; src->n_angles = 0; @@ -583,6 +593,7 @@ rsn_dvdsrc_do_still (resinDvdSrc * src, int duration) { GstEvent *still_event; GstEvent *hl_event; + gboolean cmds_changed; GstStructure *s; GstEvent *seg_event; GstSegment *segment = &(GST_BASE_SRC (src)->segment); @@ -612,6 +623,8 @@ rsn_dvdsrc_do_still (resinDvdSrc * src, int duration) /* Grab any pending highlight event to send too */ hl_event = src->highlight_event; src->highlight_event = NULL; + cmds_changed = src->commands_changed; + src->commands_changed = FALSE; /* Now, send the events. We need to drop the dvd lock while doing so, * and then check after if we got flushed */ @@ -622,6 +635,9 @@ rsn_dvdsrc_do_still (resinDvdSrc * src, int duration) GST_LOG_OBJECT (src, "Sending highlight event before still"); gst_pad_push_event (GST_BASE_SRC_PAD (src), hl_event); } + if (cmds_changed) + rsn_dvdsrc_send_commands_changed (src); + g_mutex_lock (src->dvd_lock); g_mutex_lock (src->branch_lock); @@ -1106,7 +1122,46 @@ rsn_dvdsrc_send_commands_changed (resinDvdSrc * src) static gboolean rsn_dvdsrc_handle_cmds_query (resinDvdSrc * src, GstQuery * query) { - return FALSE; + /* Expand this array if we have more commands in the future: */ + GstNavigationCommand cmds[16]; + gint n_cmds = 0; + + /* Fill out the standard set of commands we support */ + cmds[n_cmds++] = GST_NAVIGATION_COMMAND_DVD_MENU; + cmds[n_cmds++] = GST_NAVIGATION_COMMAND_DVD_TITLE_MENU; + cmds[n_cmds++] = GST_NAVIGATION_COMMAND_DVD_ROOT_MENU; + cmds[n_cmds++] = GST_NAVIGATION_COMMAND_DVD_SUBPICTURE_MENU; + cmds[n_cmds++] = GST_NAVIGATION_COMMAND_DVD_AUDIO_MENU; + cmds[n_cmds++] = GST_NAVIGATION_COMMAND_DVD_ANGLE_MENU; + cmds[n_cmds++] = GST_NAVIGATION_COMMAND_DVD_CHAPTER_MENU; + + g_mutex_lock (src->dvd_lock); + + /* Multiple angles available? */ + if (src->n_angles > 1) { + cmds[n_cmds++] = GST_NAVIGATION_COMMAND_PREV_ANGLE; + cmds[n_cmds++] = GST_NAVIGATION_COMMAND_NEXT_ANGLE; + } + + /* Add button selection commands if we have them */ + if (src->active_button > 0) { + /* We have a valid current button */ + cmds[n_cmds++] = GST_NAVIGATION_COMMAND_ACTIVATE; + } + /* Check for buttons in each direction */ + if (src->cur_btn_mask & RSN_BTN_LEFT) + cmds[n_cmds++] = GST_NAVIGATION_COMMAND_LEFT; + if (src->cur_btn_mask & RSN_BTN_RIGHT) + cmds[n_cmds++] = GST_NAVIGATION_COMMAND_RIGHT; + if (src->cur_btn_mask & RSN_BTN_UP) + cmds[n_cmds++] = GST_NAVIGATION_COMMAND_UP; + if (src->cur_btn_mask & RSN_BTN_DOWN) + cmds[n_cmds++] = GST_NAVIGATION_COMMAND_DOWN; + g_mutex_unlock (src->dvd_lock); + + gst_navigation_query_set_commandsv (query, n_cmds, cmds); + + return TRUE; } static gboolean @@ -1131,6 +1186,9 @@ rsn_dvdsrc_handle_navigation_query (resinDvdSrc * src, GstNavigationQueryType nq_type, GstQuery * query) { gboolean res; + + GST_LOG_OBJECT (src, "Have Navigation query of type %d", nq_type); + switch (nq_type) { case GST_NAVIGATION_QUERY_COMMANDS: res = rsn_dvdsrc_handle_cmds_query (src, query); @@ -1211,10 +1269,8 @@ rsn_dvdsrc_create (RsnPushSrc * psrc, GstBuffer ** outbuf) src->angles_changed = FALSE; } - if (src->commands_changed) { - cmds_changed = TRUE; - src->commands_changed = FALSE; - } + cmds_changed = src->commands_changed; + src->commands_changed = FALSE; g_mutex_unlock (src->dvd_lock); @@ -1600,6 +1656,7 @@ rsn_dvdsrc_handle_navigation_event (resinDvdSrc * src, GstEvent * event) if (have_lock) { gboolean channel_hop = FALSE; + gboolean cmds_changed; if (nav_res != RSN_NAV_RESULT_NONE) { if (nav_res == RSN_NAV_RESULT_BRANCH) { @@ -1660,6 +1717,9 @@ rsn_dvdsrc_handle_navigation_event (resinDvdSrc * src, GstEvent * event) update_title_info (src); } + cmds_changed = src->commands_changed; + src->commands_changed = FALSE; + g_mutex_unlock (src->dvd_lock); if (hl_event) { @@ -1667,6 +1727,9 @@ rsn_dvdsrc_handle_navigation_event (resinDvdSrc * src, GstEvent * event) src->active_button); gst_pad_push_event (GST_BASE_SRC_PAD (src), hl_event); } + + if (cmds_changed) + rsn_dvdsrc_send_commands_changed (src); } if (mouse_over_msg) { @@ -1978,6 +2041,10 @@ rsn_dvdsrc_update_highlight (resinDvdSrc * src) if (src->highlight_event) gst_event_unref (src->highlight_event); src->highlight_event = event; + if (src->cur_btn_mask != RSN_BTN_NONE) { + src->cur_btn_mask = RSN_BTN_NONE; + src->commands_changed = TRUE; + } } return; } @@ -1996,6 +2063,8 @@ rsn_dvdsrc_update_highlight (resinDvdSrc * src) area.sx != src->area.sx || area.sy != src->area.sy || area.ex != src->area.ex || area.ey != src->area.ey || area.palette != src->area.palette) { + btni_t *btn_info = pci->hli.btnit + button - 1; + guint32 btn_mask; GST_DEBUG_OBJECT (src, "Setting highlight. Button %d @ %d,%d " "active %d palette 0x%x (from button %d @ %d,%d palette 0x%x)", @@ -2026,6 +2095,22 @@ rsn_dvdsrc_update_highlight (resinDvdSrc * src) if (src->highlight_event) gst_event_unref (src->highlight_event); src->highlight_event = event; + + /* Calculate whether the available set of button motions is changed */ + btn_mask = 0; + if (btn_info->left && btn_info->left != button) + btn_mask |= RSN_BTN_LEFT; + if (btn_info->right && btn_info->right != button) + btn_mask |= RSN_BTN_RIGHT; + if (btn_info->up && btn_info->up != button) + btn_mask |= RSN_BTN_UP; + if (btn_info->down && btn_info->down != button) + btn_mask |= RSN_BTN_DOWN; + + if (btn_mask != src->cur_btn_mask) { + src->cur_btn_mask = btn_mask; + src->commands_changed = TRUE; + } } } diff --git a/ext/resindvd/resindvdsrc.h b/ext/resindvd/resindvdsrc.h index d30140ea..263c7afb 100644 --- a/ext/resindvd/resindvdsrc.h +++ b/ext/resindvd/resindvdsrc.h @@ -141,6 +141,8 @@ struct _resinDvdSrc gint8 cur_spu_phys_stream; gboolean cur_spu_forced_only; guint32 cur_clut[16]; + + guint32 cur_btn_mask; }; struct _resinDvdSrcClass -- cgit v1.2.1 From cae9db0d8c4c3ff939ac6ac1d4d574b2c030b536 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Wed, 13 May 2009 12:47:43 +0100 Subject: resindvd: Rework button highlight calculation slightly When the current button number is higher than the number of available buttons, switch to the highest numbered button rather than the lowest. Also, don't throw errors when we fail to retrieve some button info from libdvdnav, just reset the highlight. --- ext/resindvd/resindvdsrc.c | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/ext/resindvd/resindvdsrc.c b/ext/resindvd/resindvdsrc.c index 3b635abc..bdf74ced 100644 --- a/ext/resindvd/resindvdsrc.c +++ b/ext/resindvd/resindvdsrc.c @@ -1069,6 +1069,9 @@ rsn_dvdsrc_step (resinDvdSrc * src, gboolean have_dvd_lock) break; } case DVDNAV_HIGHLIGHT:{ + dvdnav_highlight_event_t *event = (dvdnav_highlight_event_t *) data; + GST_DEBUG_OBJECT (src, "highlight change event, button %d", + event->buttonN); rsn_dvdsrc_update_highlight (src); break; } @@ -2011,21 +2014,26 @@ rsn_dvdsrc_update_highlight (resinDvdSrc * src) int button = 0; pci_t *pci = &src->cur_pci; dvdnav_highlight_area_t area; - int mode = 0; + int mode = src->active_highlight ? 1 : 0; GstEvent *event = NULL; GstStructure *s; if (src->have_pci) { - if (dvdnav_get_current_highlight (src->dvdnav, &button) != DVDNAV_STATUS_OK) { - GST_ELEMENT_ERROR (src, LIBRARY, FAILED, (NULL), - ("dvdnav_get_current_highlight: %s", - dvdnav_err_to_string (src->dvdnav))); - return; + if (dvdnav_get_current_highlight (src->dvdnav, &button) == DVDNAV_STATUS_OK) { + GST_LOG_OBJECT (src, "current dvdnav button is %d, we have %d", + button, src->active_button); } - if (pci->hli.hl_gi.hli_ss == 0 || (button > pci->hli.hl_gi.btn_ns) || - (button < 1)) { + if (pci->hli.hl_gi.hli_ss == 0 || button < 0) { + button = 0; + } else if (button > pci->hli.hl_gi.btn_ns) { /* button is out of the range of possible buttons. */ + button = pci->hli.hl_gi.btn_ns; + dvdnav_button_select (src->dvdnav, &src->cur_pci, button); + } + + if (button > 0 && dvdnav_get_highlight_area (pci, button, mode, + &area) != DVDNAV_STATUS_OK) { button = 0; } } @@ -2049,15 +2057,6 @@ rsn_dvdsrc_update_highlight (resinDvdSrc * src) return; } - if (src->active_highlight) - mode = 1; - - if (dvdnav_get_highlight_area (pci, button, mode, &area) != DVDNAV_STATUS_OK) { - GST_ELEMENT_ERROR (src, LIBRARY, FAILED, (NULL), - ("dvdnav_get_highlight_area: %s", dvdnav_err_to_string (src->dvdnav))); - return; - } - /* Check if we have a new button number, or a new highlight region. */ if (button != src->active_button || area.sx != src->area.sx || area.sy != src->area.sy || @@ -2149,12 +2148,14 @@ rsn_dvdsrc_activate_nav_block (resinDvdSrc * src, GstBuffer * nav_buf) src->have_pci = TRUE; forced_button = src->cur_pci.hli.hl_gi.fosl_btnn & 0x3f; - - if (forced_button != 0) + if (forced_button != 0) { + GST_DEBUG_OBJECT (src, "Selecting button %d based on nav packet command", + forced_button); dvdnav_button_select (src->dvdnav, &src->cur_pci, forced_button); - + } /* highlight might change, let's check */ rsn_dvdsrc_update_highlight (src); + if (src->highlight_event && src->in_still_state) { GST_LOG_OBJECT (src, "Signalling still condition due to highlight change"); g_cond_broadcast (src->still_cond); -- cgit v1.2.1 From 13694cd654cef130bd97d2498f5e65e8da525722 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Thu, 14 May 2009 09:53:25 +0100 Subject: resindvd: Make segment updates less aggressive. When updating a pad, send the update to half a second behind the SCR, which avoids ever updating the start time for a pad to beyond the end of the cell. Also, remember the last actual new-segment start time for each pad, and use it when closing the segment. --- ext/resindvd/gstmpegdemux.c | 38 +++++++++++++++++++++++++------------- ext/resindvd/gstmpegdemux.h | 1 + 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/ext/resindvd/gstmpegdemux.c b/ext/resindvd/gstmpegdemux.c index ed4b3d93..b360bdcc 100644 --- a/ext/resindvd/gstmpegdemux.c +++ b/ext/resindvd/gstmpegdemux.c @@ -469,7 +469,7 @@ gst_flups_demux_clear_times (GstFluPSDemux * demux) GstFluPSStream *stream = demux->streams[id]; if (stream) { - stream->last_ts = GST_CLOCK_TIME_NONE; + stream->last_seg_start = stream->last_ts = GST_CLOCK_TIME_NONE; } } } @@ -494,8 +494,9 @@ gst_flups_demux_send_segment_updates (GstFluPSDemux * demux, stream->last_ts = demux->src_segment.start; if (stream->last_ts + stream->segment_thresh < new_time) { #if 0 - g_print ("Segment update to pad %s time %" GST_TIME_FORMAT "\n", - GST_PAD_NAME (stream->pad), GST_TIME_ARGS (new_time)); + g_print ("Segment update to pad %s time %" GST_TIME_FORMAT " stop now %" + GST_TIME_FORMAT "\n", GST_PAD_NAME (stream->pad), + GST_TIME_ARGS (new_time), GST_TIME_ARGS (demux->src_segment.stop)); #endif GST_DEBUG_OBJECT (demux, "Segment update to pad %s time %" GST_TIME_FORMAT, @@ -509,7 +510,7 @@ gst_flups_demux_send_segment_updates (GstFluPSDemux * demux, } gst_event_ref (event); gst_pad_push_event (stream->pad, event); - stream->last_ts = new_time; + stream->last_seg_start = stream->last_ts = new_time; } } } @@ -528,23 +529,30 @@ gst_flups_demux_send_segment_close (GstFluPSDemux * demux) GstFluPSStream *stream = demux->streams[id]; if (stream) { - if (stream->last_ts == GST_CLOCK_TIME_NONE || - stream->last_ts < demux->src_segment.start) - stream->last_ts = demux->src_segment.start; + GstClockTime start = demux->src_segment.start; + if (stream->last_seg_start != GST_CLOCK_TIME_NONE && + stream->last_seg_start > start) + start = stream->last_seg_start; #if 0 - g_print ("Segment update to pad %s start %" GST_TIME_FORMAT + g_print ("Segment close to pad %s start %" GST_TIME_FORMAT " stop %" GST_TIME_FORMAT "\n", - GST_PAD_NAME (stream->pad), GST_TIME_ARGS (stream->last_ts), + GST_PAD_NAME (stream->pad), GST_TIME_ARGS (start), GST_TIME_ARGS (demux->src_segment.stop)); #endif + if (start > demux->src_segment.stop) { + g_print ("Problem on pad %s with start %" GST_TIME_FORMAT " > stop %" + GST_TIME_FORMAT "\n", + gst_object_get_name (GST_OBJECT (stream->pad)), + GST_TIME_ARGS (start), GST_TIME_ARGS (demux->src_segment.stop)); + } event = gst_event_new_new_segment_full (TRUE, demux->src_segment.rate, demux->src_segment.applied_rate, - GST_FORMAT_TIME, stream->last_ts, + GST_FORMAT_TIME, start, demux->src_segment.stop, - demux->src_segment.time + - (stream->last_ts - demux->src_segment.start)); - gst_pad_push_event (stream->pad, event); + demux->src_segment.time + (start - demux->src_segment.start)); + if (event) + gst_pad_push_event (stream->pad, event); } } } @@ -1354,6 +1362,10 @@ gst_flups_demux_parse_pack_start (GstFluPSDemux * demux) new_time = MPEGTIME_TO_GSTTIME (scr_adjusted); if (new_time != GST_CLOCK_TIME_NONE) { // g_print ("SCR now %" GST_TIME_FORMAT "\n", GST_TIME_ARGS (new_time)); + if (new_time > GST_SECOND / 2) + new_time -= GST_SECOND / 2; + else + new_time = 0; gst_flups_demux_send_segment_updates (demux, new_time); demux->src_segment.last_stop = new_time; } diff --git a/ext/resindvd/gstmpegdemux.h b/ext/resindvd/gstmpegdemux.h index b7b2d9fc..683b7cde 100644 --- a/ext/resindvd/gstmpegdemux.h +++ b/ext/resindvd/gstmpegdemux.h @@ -63,6 +63,7 @@ struct _GstFluPSStream { gboolean notlinked; gboolean need_segment; + GstClockTime last_seg_start; GstClockTime last_ts; GstClockTime segment_thresh; }; -- cgit v1.2.1 From e62b64f1d34ec402f8fce4f91f174d40315576c9 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Thu, 14 May 2009 10:34:08 +0100 Subject: resindvd: Fix the argument order in a debug statement Make the debug statement correctly show the 'old' and 'new' button coordinates, instead of the wrong way around. --- ext/resindvd/resindvdsrc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ext/resindvd/resindvdsrc.c b/ext/resindvd/resindvdsrc.c index bdf74ced..f24e45aa 100644 --- a/ext/resindvd/resindvdsrc.c +++ b/ext/resindvd/resindvdsrc.c @@ -2065,10 +2065,12 @@ rsn_dvdsrc_update_highlight (resinDvdSrc * src) btni_t *btn_info = pci->hli.btnit + button - 1; guint32 btn_mask; - GST_DEBUG_OBJECT (src, "Setting highlight. Button %d @ %d,%d " - "active %d palette 0x%x (from button %d @ %d,%d palette 0x%x)", - button, src->area.sx, src->area.sy, mode, src->area.palette, - src->active_button, area.sx, area.sy, area.palette); + GST_DEBUG_OBJECT (src, "Setting highlight. Button %d @ %d,%d,%d,%d " + "active %d palette 0x%x (from button %d @ %d,%d,%d,%d palette 0x%x)", + button, area.sx, area.sy, area.ex, area.ey, + mode, area.palette, + src->active_button, src->area.sx, src->area.sy, src->area.ex, + src->area.ey, src->area.palette); memcpy (&(src->area), &area, sizeof (dvdnav_highlight_area_t)); -- cgit v1.2.1 From f5ba4904f794a107bc5d1e56f824789bca295383 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 14 May 2009 21:20:47 +0200 Subject: mxfdemux: Use a RW lock to protect metadata and add all pads at once without a lock held This makes it possible, among other things, to do a query in the pad-added callback. Fixes bug #582656. --- gst/mxf/mxfdemux.c | 161 ++++++++++++++++++++++++++++++----------------------- gst/mxf/mxfdemux.h | 2 +- 2 files changed, 93 insertions(+), 70 deletions(-) diff --git a/gst/mxf/mxfdemux.c b/gst/mxf/mxfdemux.c index 6d7ca034..c33650b5 100644 --- a/gst/mxf/mxfdemux.c +++ b/gst/mxf/mxfdemux.c @@ -203,7 +203,7 @@ gst_mxf_demux_reset_metadata (GstMXFDemux * demux) { GST_DEBUG_OBJECT (demux, "Resetting metadata"); - g_mutex_lock (demux->metadata_lock); + g_static_rw_lock_writer_lock (&demux->metadata_lock); demux->update_metadata = TRUE; demux->metadata_resolved = FALSE; @@ -217,7 +217,7 @@ gst_mxf_demux_reset_metadata (GstMXFDemux * demux) } demux->metadata = mxf_metadata_hash_table_new (); - g_mutex_unlock (demux->metadata_lock); + g_static_rw_lock_writer_unlock (&demux->metadata_lock); } static void @@ -513,11 +513,14 @@ gst_mxf_demux_resolve_references (GstMXFDemux * demux) GstStructure *structure; GstTagList *taglist; + g_static_rw_lock_writer_lock (&demux->metadata_lock); + GST_DEBUG_OBJECT (demux, "Resolve metadata references"); demux->update_metadata = FALSE; if (!demux->metadata) { GST_ERROR_OBJECT (demux, "No metadata yet"); + g_static_rw_lock_writer_unlock (&demux->metadata_lock); return GST_FLOW_ERROR; } #if GLIB_CHECK_VERSION (2, 16, 0) @@ -565,6 +568,8 @@ gst_mxf_demux_resolve_references (GstMXFDemux * demux) g_list_free (values); #endif + g_static_rw_lock_writer_unlock (&demux->metadata_lock); + return ret; error: @@ -573,6 +578,7 @@ error: #endif demux->metadata_resolved = FALSE; + g_static_rw_lock_writer_unlock (&demux->metadata_lock); return ret; } @@ -913,24 +919,29 @@ gst_mxf_demux_update_tracks (GstMXFDemux * demux) gboolean first_run; guint component_index; GstFlowReturn ret; + GList *pads = NULL, *l; + g_static_rw_lock_writer_lock (&demux->metadata_lock); GST_DEBUG_OBJECT (demux, "Updating tracks"); if ((ret = gst_mxf_demux_update_essence_tracks (demux)) != GST_FLOW_OK) { - return ret; + goto error; } current_package = gst_mxf_demux_choose_package (demux); if (!current_package) { GST_ERROR_OBJECT (demux, "Unable to find current package"); - return GST_FLOW_ERROR; + ret = GST_FLOW_ERROR; + goto error; } else if (!current_package->tracks) { GST_ERROR_OBJECT (demux, "Current package has no (resolved) tracks"); - return GST_FLOW_ERROR; + ret = GST_FLOW_ERROR; + goto error; } else if (!current_package->n_essence_tracks) { GST_ERROR_OBJECT (demux, "Current package has no essence tracks"); - return GST_FLOW_ERROR; + ret = GST_FLOW_ERROR; + goto error; } first_run = (demux->src->len == 0); @@ -977,10 +988,12 @@ gst_mxf_demux_update_tracks (GstMXFDemux * demux) if (!track->parent.sequence) { GST_WARNING_OBJECT (demux, "Track with no sequence"); - if (!pad) + if (!pad) { continue; - else - return GST_FLOW_ERROR; + } else { + ret = GST_FLOW_ERROR; + goto error; + } } sequence = track->parent.sequence; @@ -1021,20 +1034,24 @@ gst_mxf_demux_update_tracks (GstMXFDemux * demux) if (track->parent.type && (track->parent.type & 0xf0) != 0x30) { GST_DEBUG_OBJECT (demux, "No essence track"); - if (!pad) + if (!pad) { continue; - else - return GST_FLOW_ERROR; + } else { + ret = GST_FLOW_ERROR; + goto error; + } } if (!source_package || track->parent.type == MXF_METADATA_TRACK_UNKNOWN || !source_track) { GST_WARNING_OBJECT (demux, "No source package or track type for track found"); - if (!pad) + if (!pad) { continue; - else - return GST_FLOW_ERROR; + } else { + ret = GST_FLOW_ERROR; + goto error; + } } for (k = 0; k < demux->essence_tracks->len; k++) { @@ -1050,44 +1067,54 @@ gst_mxf_demux_update_tracks (GstMXFDemux * demux) if (!etrack) { GST_WARNING_OBJECT (demux, "No essence track for this track found"); - if (!pad) + if (!pad) { continue; - else - return GST_FLOW_ERROR; + } else { + ret = GST_FLOW_ERROR; + goto error; + } } if (track->edit_rate.n <= 0 || track->edit_rate.d <= 0 || source_track->edit_rate.n <= 0 || source_track->edit_rate.d <= 0) { GST_WARNING_OBJECT (demux, "Track has an invalid edit rate"); - if (!pad) + if (!pad) { continue; - else - return GST_FLOW_ERROR; + } else { + ret = GST_FLOW_ERROR; + goto error; + } } if (MXF_IS_METADATA_MATERIAL_PACKAGE (current_package) && !component) { GST_WARNING_OBJECT (demux, "Playing material package but found no component for track"); - if (!pad) + if (!pad) { continue; - else - return GST_FLOW_ERROR; + } else { + ret = GST_FLOW_ERROR; + goto error; + } } if (!source_package->descriptor) { GST_WARNING_OBJECT (demux, "Source package has no descriptors"); - if (!pad) + if (!pad) { continue; - else - return GST_FLOW_ERROR; + } else { + ret = GST_FLOW_ERROR; + goto error; + } } if (!source_track->parent.descriptor) { GST_WARNING_OBJECT (demux, "No descriptor found for track"); - if (!pad) + if (!pad) { continue; - else - return GST_FLOW_ERROR; + } else { + ret = GST_FLOW_ERROR; + goto error; + } } if (!pad && first_run) { @@ -1178,31 +1205,43 @@ gst_mxf_demux_update_tracks (GstMXFDemux * demux) gst_pad_use_fixed_caps (GST_PAD_CAST (pad)); gst_pad_set_active (GST_PAD_CAST (pad), TRUE); - gst_element_add_pad (GST_ELEMENT_CAST (demux), gst_object_ref (pad)); + pads = g_list_prepend (pads, gst_object_ref (pad)); g_ptr_array_add (demux->src, pad); pad->discont = TRUE; } } - if (first_run) - gst_element_no_more_pads (GST_ELEMENT_CAST (demux)); - if (demux->src->len > 0) { for (i = 0; i < demux->src->len; i++) { GstMXFDemuxPad *pad = g_ptr_array_index (demux->src, i); if (!pad->material_track || !pad->material_package) { GST_ERROR_OBJECT (demux, "Unable to update existing pad"); - return GST_FLOW_ERROR; + ret = GST_FLOW_ERROR; + goto error; } } } else { GST_ERROR_OBJECT (demux, "Couldn't create any streams"); - return GST_FLOW_ERROR; + ret = GST_FLOW_ERROR; + goto error; } + g_static_rw_lock_writer_unlock (&demux->metadata_lock); + + for (l = pads; l; l = l->next) + gst_element_add_pad (GST_ELEMENT_CAST (demux), l->data); + g_list_free (pads); + + if (first_run) + gst_element_no_more_pads (GST_ELEMENT_CAST (demux)); + return GST_FLOW_OK; + +error: + g_static_rw_lock_writer_unlock (&demux->metadata_lock); + return ret; } static GstFlowReturn @@ -1276,7 +1315,7 @@ gst_mxf_demux_handle_metadata (GstMXFDemux * demux, const MXFUL * key, return GST_FLOW_OK; } - g_mutex_lock (demux->metadata_lock); + g_static_rw_lock_writer_lock (&demux->metadata_lock); demux->update_metadata = TRUE; if (MXF_IS_METADATA_PREFACE (metadata)) { @@ -1287,7 +1326,7 @@ gst_mxf_demux_handle_metadata (GstMXFDemux * demux, const MXFUL * key, g_hash_table_replace (demux->metadata, &MXF_METADATA_BASE (metadata)->instance_uid, metadata); - g_mutex_unlock (demux->metadata_lock); + g_static_rw_lock_writer_unlock (&demux->metadata_lock); return ret; } @@ -1365,7 +1404,7 @@ gst_mxf_demux_handle_descriptive_metadata (GstMXFDemux * demux, return GST_FLOW_OK; } - g_mutex_lock (demux->metadata_lock); + g_static_rw_lock_writer_lock (&demux->metadata_lock); demux->update_metadata = TRUE; gst_mxf_demux_reset_linked_metadata (demux); @@ -1373,7 +1412,7 @@ gst_mxf_demux_handle_descriptive_metadata (GstMXFDemux * demux, g_hash_table_replace (demux->metadata, &MXF_METADATA_BASE (m)->instance_uid, m); - g_mutex_unlock (demux->metadata_lock); + g_static_rw_lock_writer_unlock (&demux->metadata_lock); return ret; } @@ -2224,17 +2263,14 @@ next_try: /* resolve references etc */ - g_mutex_lock (demux->metadata_lock); if (gst_mxf_demux_resolve_references (demux) != GST_FLOW_OK || gst_mxf_demux_update_tracks (demux) != GST_FLOW_OK) { demux->current_partition->parsed_metadata = TRUE; demux->offset = demux->run_in + demux->current_partition->partition.this_partition - demux->current_partition->partition.prev_partition; - g_mutex_unlock (demux->metadata_lock); goto next_try; } - g_mutex_unlock (demux->metadata_lock); out: if (buffer) @@ -2253,7 +2289,6 @@ gst_mxf_demux_handle_klv_packet (GstMXFDemux * demux, const MXFUL * key, #endif GstFlowReturn ret = GST_FLOW_OK; - g_mutex_lock (demux->metadata_lock); if (demux->update_metadata && demux->preface && (demux->offset >= @@ -2265,16 +2300,13 @@ gst_mxf_demux_handle_klv_packet (GstMXFDemux * demux, const MXFUL * key, demux->current_partition->parsed_metadata = TRUE; if ((ret = gst_mxf_demux_resolve_references (demux)) != GST_FLOW_OK || (ret = gst_mxf_demux_update_tracks (demux)) != GST_FLOW_OK) { - g_mutex_unlock (demux->metadata_lock); goto beach; } } else if (demux->metadata_resolved && demux->requested_package_string) { if ((ret = gst_mxf_demux_update_tracks (demux)) != GST_FLOW_OK) { - g_mutex_unlock (demux->metadata_lock); goto beach; } } - g_mutex_unlock (demux->metadata_lock); if (!mxf_is_mxf_packet (key)) { GST_WARNING_OBJECT (demux, @@ -3106,15 +3138,12 @@ gst_mxf_demux_seek_push (GstMXFDemux * demux, GstEvent * event) guint64 new_offset = -1; GstEvent *e; - g_mutex_lock (demux->metadata_lock); if (!demux->metadata_resolved || demux->update_metadata) { if (gst_mxf_demux_resolve_references (demux) != GST_FLOW_OK || gst_mxf_demux_update_tracks (demux) != GST_FLOW_OK) { - g_mutex_unlock (demux->metadata_lock); goto unresolved_metadata; } } - g_mutex_unlock (demux->metadata_lock); /* Do the actual seeking */ for (i = 0; i < demux->src->len; i++) { @@ -3266,15 +3295,12 @@ gst_mxf_demux_seek_pull (GstMXFDemux * demux, GstEvent * event) if (flush || seeksegment.last_stop != demux->segment.last_stop) { guint64 new_offset = -1; - g_mutex_lock (demux->metadata_lock); if (!demux->metadata_resolved || demux->update_metadata) { if (gst_mxf_demux_resolve_references (demux) != GST_FLOW_OK || gst_mxf_demux_update_tracks (demux) != GST_FLOW_OK) { - g_mutex_unlock (demux->metadata_lock); goto unresolved_metadata; } } - g_mutex_unlock (demux->metadata_lock); /* Do the actual seeking */ for (i = 0; i < demux->src->len; i++) { @@ -3455,11 +3481,11 @@ gst_mxf_demux_src_query (GstPad * pad, GstQuery * query) pos = mxfpad->last_stop; - g_mutex_lock (demux->metadata_lock); + g_static_rw_lock_reader_lock (&demux->metadata_lock); if (format == GST_FORMAT_DEFAULT && pos != GST_CLOCK_TIME_NONE) { if (!mxfpad->material_track || mxfpad->material_track->edit_rate.n == 0 || mxfpad->material_track->edit_rate.d == 0) { - g_mutex_unlock (demux->metadata_lock); + g_static_rw_lock_reader_unlock (&demux->metadata_lock); goto error; } @@ -3468,7 +3494,7 @@ gst_mxf_demux_src_query (GstPad * pad, GstQuery * query) mxfpad->material_track->edit_rate.n, mxfpad->material_track->edit_rate.d * GST_SECOND); } - g_mutex_unlock (demux->metadata_lock); + g_static_rw_lock_reader_unlock (&demux->metadata_lock); GST_DEBUG_OBJECT (pad, "Returning position %" G_GINT64_FORMAT " in format %s", pos, @@ -3487,9 +3513,9 @@ gst_mxf_demux_src_query (GstPad * pad, GstQuery * query) if (format != GST_FORMAT_TIME && format != GST_FORMAT_DEFAULT) goto error; - g_mutex_lock (demux->metadata_lock); + g_static_rw_lock_reader_lock (&demux->metadata_lock); if (!mxfpad->material_track || !mxfpad->material_track->parent.sequence) { - g_mutex_unlock (demux->metadata_lock); + g_static_rw_lock_reader_unlock (&demux->metadata_lock); goto error; } @@ -3500,7 +3526,7 @@ gst_mxf_demux_src_query (GstPad * pad, GstQuery * query) if (duration != -1 && format == GST_FORMAT_TIME) { if (mxfpad->material_track->edit_rate.n == 0 || mxfpad->material_track->edit_rate.d == 0) { - g_mutex_unlock (demux->metadata_lock); + g_static_rw_lock_reader_unlock (&demux->metadata_lock); goto error; } @@ -3509,7 +3535,7 @@ gst_mxf_demux_src_query (GstPad * pad, GstQuery * query) GST_SECOND * mxfpad->material_track->edit_rate.d, mxfpad->material_track->edit_rate.n); } - g_mutex_unlock (demux->metadata_lock); + g_static_rw_lock_reader_unlock (&demux->metadata_lock); GST_DEBUG_OBJECT (pad, "Returning duration %" G_GINT64_FORMAT " in format %s", duration, @@ -3746,7 +3772,7 @@ gst_mxf_demux_query (GstElement * element, GstQuery * query) if (demux->src->len == 0) goto done; - g_mutex_lock (demux->metadata_lock); + g_static_rw_lock_reader_lock (&demux->metadata_lock); for (i = 0; i < demux->src->len; i++) { GstMXFDemuxPad *pad = g_ptr_array_index (demux->src, i); gint64 pdur = -1; @@ -3765,7 +3791,7 @@ gst_mxf_demux_query (GstElement * element, GstQuery * query) pad->material_track->edit_rate.n); duration = MAX (duration, pdur); } - g_mutex_unlock (demux->metadata_lock); + g_static_rw_lock_reader_unlock (&demux->metadata_lock); if (duration == -1) { GST_DEBUG_OBJECT (demux, "No duration known (yet)"); @@ -3862,7 +3888,7 @@ gst_mxf_demux_get_property (GObject * object, guint prop_id, case PROP_STRUCTURE:{ GstStructure *s; - g_mutex_lock (demux->metadata_lock); + g_static_rw_lock_reader_lock (&demux->metadata_lock); if (demux->preface) s = mxf_metadata_base_to_structure (MXF_METADATA_BASE (demux->preface)); else @@ -3873,7 +3899,7 @@ gst_mxf_demux_get_property (GObject * object, guint prop_id, if (s) gst_structure_free (s); - g_mutex_unlock (demux->metadata_lock); + g_static_rw_lock_reader_unlock (&demux->metadata_lock); break; } default: @@ -3911,10 +3937,7 @@ gst_mxf_demux_finalize (GObject * object) g_hash_table_destroy (demux->metadata); - if (demux->metadata_lock) { - g_mutex_free (demux->metadata_lock); - demux->metadata_lock = NULL; - } + g_static_rw_lock_free (&demux->metadata_lock); G_OBJECT_CLASS (parent_class)->finalize (object); } @@ -3990,7 +4013,7 @@ gst_mxf_demux_init (GstMXFDemux * demux, GstMXFDemuxClass * g_class) demux->max_drift = 500 * GST_MSECOND; demux->adapter = gst_adapter_new (); - demux->metadata_lock = g_mutex_new (); + g_static_rw_lock_init (&demux->metadata_lock); demux->src = g_ptr_array_new (); demux->essence_tracks = diff --git a/gst/mxf/mxfdemux.h b/gst/mxf/mxfdemux.h index c8439cf6..e8b90261 100644 --- a/gst/mxf/mxfdemux.h +++ b/gst/mxf/mxfdemux.h @@ -154,7 +154,7 @@ struct _GstMXFDemux GArray *random_index_pack; /* Metadata */ - GMutex *metadata_lock; + GStaticRWLock metadata_lock; gboolean update_metadata; gboolean pull_footer_metadata; -- cgit v1.2.1 From 405f80dec487103dfe52e6ce6aa3fb05db74e495 Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Fri, 15 May 2009 01:54:44 -0300 Subject: [qtmux] Fixes segfault when adding a blob as first tag. Moves tags data initialization to the function that actually appends the tags to the list. Fixes #582702 Also fixes some style caught by the pre-commit hook. --- gst/qtmux/atoms.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/gst/qtmux/atoms.c b/gst/qtmux/atoms.c index df6958e0..a5d8fe38 100644 --- a/gst/qtmux/atoms.c +++ b/gst/qtmux/atoms.c @@ -1855,13 +1855,11 @@ atom_stsd_copy_data (AtomSTSD * stsd, guint8 ** buffer, guint64 * size, break; default: if (se->kind == VIDEO) { - size += - sample_entry_mp4v_copy_data ((SampleTableEntryMP4V *) walker-> - data, buffer, size, offset); + size += sample_entry_mp4v_copy_data ((SampleTableEntryMP4V *) + walker->data, buffer, size, offset); } else if (se->kind == AUDIO) { - size += - sample_entry_mp4a_copy_data ((SampleTableEntryMP4A *) walker-> - data, buffer, size, offset); + size += sample_entry_mp4a_copy_data ((SampleTableEntryMP4A *) + walker->data, buffer, size, offset); } else { if (!atom_hint_sample_entry_copy_data ( (AtomHintSampleEntry *) walker->data, buffer, size, offset)) { @@ -2547,6 +2545,7 @@ atom_moov_append_tag (AtomMOOV * moov, AtomInfo * tag) { AtomILST *ilst; + atom_moov_init_metatags (moov); ilst = moov->udta->meta->ilst; ilst->entries = g_list_append (ilst->entries, tag); } @@ -2563,7 +2562,6 @@ atom_moov_add_tag (AtomMOOV * moov, guint32 fourcc, guint32 flags, atom_tag_data_alloc_data (tdata, size); g_memmove (tdata->data, data, size); - atom_moov_init_metatags (moov); atom_moov_append_tag (moov, build_atom_info_wrapper ((Atom *) tag, atom_tag_copy_data, atom_tag_free)); -- cgit v1.2.1 From 2ba0996c64a6f94b443a5f2a5287e1bb7dd89dcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Fri, 15 May 2009 18:24:41 +0100 Subject: po: add Makevars magic so we don't get line numbers in *.po files This avoids the number one reason for local modifications in *.po files and and makes things less annoying when working with git (or any other VCS for that matter). --- po/Makevars | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/po/Makevars b/po/Makevars index 61559233..a6bdc7fa 100644 --- a/po/Makevars +++ b/po/Makevars @@ -39,3 +39,8 @@ MSGID_BUGS_ADDRESS = http://bugzilla.gnome.org/ # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = + +# Avoid line numbers in *.po, but keep them in *.pot. +MSGMERGE = msgmerge --no-location +MSGMERGE_UPDATE = msgmerge --no-location --update +MSGFILTER = msgfilter --no-location -- cgit v1.2.1 From 48e32a0890ecb089806768eec4c5ac30cf7333d6 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Sat, 16 May 2009 00:17:00 +0100 Subject: Moved 'y4menc' from -bad to -good --- configure.ac | 2 - docs/plugins/Makefile.am | 1 - docs/plugins/gst-plugins-bad-plugins-docs.sgml | 2 - docs/plugins/gst-plugins-bad-plugins-sections.txt | 15 - docs/plugins/inspect/plugin-y4menc.xml | 34 --- gst/y4m/Makefile.am | 10 - gst/y4m/gsty4mencode.c | 336 ---------------------- gst/y4m/gsty4mencode.h | 67 ----- gst/y4m/y4menc.vcproj | 148 ---------- tests/check/Makefile.am | 1 - tests/check/elements/.gitignore | 1 - tests/check/elements/y4menc.c | 165 ----------- 12 files changed, 782 deletions(-) delete mode 100644 docs/plugins/inspect/plugin-y4menc.xml delete mode 100644 gst/y4m/Makefile.am delete mode 100644 gst/y4m/gsty4mencode.c delete mode 100644 gst/y4m/gsty4mencode.h delete mode 100644 gst/y4m/y4menc.vcproj delete mode 100644 tests/check/elements/y4menc.c diff --git a/configure.ac b/configure.ac index d97d0fba..bae6c23b 100644 --- a/configure.ac +++ b/configure.ac @@ -293,7 +293,6 @@ AG_GST_CHECK_PLUGIN(valve) AG_GST_CHECK_PLUGIN(videosignal) AG_GST_CHECK_PLUGIN(vmnc) AG_GST_CHECK_PLUGIN(xdgmime) -AG_GST_CHECK_PLUGIN(y4m) dnl *** plug-ins to exclude *** @@ -1562,7 +1561,6 @@ gst/videosignal/Makefile gst/vmnc/Makefile gst/real/Makefile gst/xdgmime/Makefile -gst/y4m/Makefile gst-libs/Makefile gst-libs/gst/Makefile gst-libs/gst/dshow/Makefile diff --git a/docs/plugins/Makefile.am b/docs/plugins/Makefile.am index 2bc11e09..87d5f9eb 100644 --- a/docs/plugins/Makefile.am +++ b/docs/plugins/Makefile.am @@ -155,7 +155,6 @@ EXTRA_HFILES = \ $(top_srcdir)/gst/videosignal/gstvideodetect.h \ $(top_srcdir)/gst/videosignal/gstvideomark.h \ $(top_srcdir)/gst/valve/gstvalve.h \ - $(top_srcdir)/gst/y4m/gsty4mencode.h \ $(top_srcdir)/sys/dvb/gstdvbsrc.h # Images to copy into HTML directory. diff --git a/docs/plugins/gst-plugins-bad-plugins-docs.sgml b/docs/plugins/gst-plugins-bad-plugins-docs.sgml index 322ea414..5a996c03 100644 --- a/docs/plugins/gst-plugins-bad-plugins-docs.sgml +++ b/docs/plugins/gst-plugins-bad-plugins-docs.sgml @@ -83,7 +83,6 @@ - @@ -162,7 +161,6 @@ - diff --git a/docs/plugins/gst-plugins-bad-plugins-sections.txt b/docs/plugins/gst-plugins-bad-plugins-sections.txt index 1b534ebe..8f9ff75d 100644 --- a/docs/plugins/gst-plugins-bad-plugins-sections.txt +++ b/docs/plugins/gst-plugins-bad-plugins-sections.txt @@ -1005,21 +1005,6 @@ GST_IS_X264_ENC_CLASS GST_TYPE_X264_ENC
-
-element-y4menc -y4menc -GstY4mEncode - -GstY4mEncodeClass -GST_Y4M_ENCODE -GST_Y4M_ENCODE_CLASS -GST_IS_Y4M_ENCODE -GST_IS_Y4M_ENCODE_CLASS -GST_Y4M_ENCODE_GET_CLASS -GST_TYPE_Y4M_ENCODE -gst_y4m_encode_get_type -
-
element-mimdec mimdec diff --git a/docs/plugins/inspect/plugin-y4menc.xml b/docs/plugins/inspect/plugin-y4menc.xml deleted file mode 100644 index 6aaf4738..00000000 --- a/docs/plugins/inspect/plugin-y4menc.xml +++ /dev/null @@ -1,34 +0,0 @@ - - y4menc - Encodes a YUV frame into the yuv4mpeg format (mjpegtools) - ../../gst/y4m/.libs/libgsty4menc.so - libgsty4menc.so - 0.10.11.1 - LGPL - gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease - Unknown package origin - - - y4menc - YUV4MPEG video encoder - Codec/Encoder/Video - Encodes a YUV frame into the yuv4mpeg format (mjpegtools) - Wim Taymans <wim.taymans@chello.be> - - - sink - sink - always -
video/x-raw-yuv, format=(fourcc){ IYUV, I420 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
-
- - src - source - always -
application/x-yuv4mpeg, y4mversion=(int)2
-
-
-
-
-
\ No newline at end of file diff --git a/gst/y4m/Makefile.am b/gst/y4m/Makefile.am deleted file mode 100644 index 4415e9e2..00000000 --- a/gst/y4m/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ - -plugin_LTLIBRARIES = libgsty4menc.la - -libgsty4menc_la_SOURCES = gsty4mencode.c -libgsty4menc_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) -libgsty4menc_la_LIBADD = $(GST_LIBS) -libgsty4menc_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) -libgsty4menc_la_LIBTOOLFLAGS = --tag=disable-static - -noinst_HEADERS = gsty4mencode.h diff --git a/gst/y4m/gsty4mencode.c b/gst/y4m/gsty4mencode.c deleted file mode 100644 index 3b82f5c1..00000000 --- a/gst/y4m/gsty4mencode.c +++ /dev/null @@ -1,336 +0,0 @@ -/* GStreamer - * Copyright (C) <1999> Erik Walthinsen - * Copyright (C) <2006> Mark Nauwelaerts - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -/** - * SECTION:element-y4menc - * - * - * - * Creates a YU4MPEG2 raw video stream as defined by the mjpegtools project. - * - * Example launch line - * - * (write everything in one line, without the backslash characters) - * - * gst-launch-0.10 videotestsrc num-buffers=250 \ - * ! 'video/x-raw-yuv,format=(fourcc)I420,width=320,height=240,framerate=(fraction)25/1' \ - * ! y4menc ! filesink location=test.yuv - * - * - * - * - */ - -/* see mjpegtools/yuv4mpeg.h for yuv4mpeg format */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include -#include -#include -#include "gsty4mencode.h" - -static const GstElementDetails y4mencode_details = -GST_ELEMENT_DETAILS ("YUV4MPEG video encoder", - "Codec/Encoder/Video", - "Encodes a YUV frame into the yuv4mpeg format (mjpegtools)", - "Wim Taymans "); - - -/* Filter signals and args */ -enum -{ - /* FILL ME */ - LAST_SIGNAL -}; - -enum -{ - ARG_0 -}; - -static GstStaticPadTemplate y4mencode_src_factory = -GST_STATIC_PAD_TEMPLATE ("src", - GST_PAD_SRC, - GST_PAD_ALWAYS, - GST_STATIC_CAPS ("application/x-yuv4mpeg, " "y4mversion = (int) 2") - ); - -static GstStaticPadTemplate y4mencode_sink_factory = -GST_STATIC_PAD_TEMPLATE ("sink", - GST_PAD_SINK, - GST_PAD_ALWAYS, - GST_STATIC_CAPS (GST_VIDEO_CAPS_YUV ("{ IYUV, I420 }")) - ); - - -static void gst_y4m_encode_set_property (GObject * object, - guint prop_id, const GValue * value, GParamSpec * pspec); -static void gst_y4m_encode_get_property (GObject * object, - guint prop_id, GValue * value, GParamSpec * pspec); - -static void gst_y4m_encode_reset (GstY4mEncode * filter); - -static gboolean gst_y4m_encode_setcaps (GstPad * pad, GstCaps * vscaps); -static GstFlowReturn gst_y4m_encode_chain (GstPad * pad, GstBuffer * buf); -static GstStateChangeReturn gst_y4m_encode_change_state (GstElement * element, - GstStateChange transition); - -GST_BOILERPLATE (GstY4mEncode, gst_y4m_encode, GstElement, GST_TYPE_ELEMENT); - - -static void -gst_y4m_encode_base_init (gpointer g_class) -{ - GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&y4mencode_src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&y4mencode_sink_factory)); - gst_element_class_set_details (element_class, &y4mencode_details); -} - -static void -gst_y4m_encode_class_init (GstY4mEncodeClass * klass) -{ - GObjectClass *gobject_class; - GstElementClass *gstelement_class; - - gobject_class = (GObjectClass *) klass; - gstelement_class = (GstElementClass *) klass; - - gstelement_class->change_state = - GST_DEBUG_FUNCPTR (gst_y4m_encode_change_state); - - gobject_class->set_property = gst_y4m_encode_set_property; - gobject_class->get_property = gst_y4m_encode_get_property; -} - -static void -gst_y4m_encode_init (GstY4mEncode * filter, GstY4mEncodeClass * klass) -{ - filter->sinkpad = - gst_pad_new_from_static_template (&y4mencode_sink_factory, "sink"); - gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad); - gst_pad_set_chain_function (filter->sinkpad, - GST_DEBUG_FUNCPTR (gst_y4m_encode_chain)); - gst_pad_set_setcaps_function (filter->sinkpad, - GST_DEBUG_FUNCPTR (gst_y4m_encode_setcaps)); - - filter->srcpad = - gst_pad_new_from_static_template (&y4mencode_src_factory, "src"); - gst_element_add_pad (GST_ELEMENT (filter), filter->srcpad); - gst_pad_use_fixed_caps (filter->srcpad); - - /* init properties */ - gst_y4m_encode_reset (filter); -} - -static void -gst_y4m_encode_reset (GstY4mEncode * filter) -{ - filter->width = filter->height = -1; - filter->fps_num = filter->fps_den = 1; - filter->par_num = filter->par_den = 1; -} - -static gboolean -gst_y4m_encode_setcaps (GstPad * pad, GstCaps * vscaps) -{ - GstY4mEncode *filter; - GstStructure *structure; - gboolean res; - gint w, h; - const GValue *fps, *par; - - filter = GST_Y4M_ENCODE (GST_PAD_PARENT (pad)); - - structure = gst_caps_get_structure (vscaps, 0); - - res = gst_structure_get_int (structure, "width", &w); - res &= gst_structure_get_int (structure, "height", &h); - res &= ((fps = gst_structure_get_value (structure, "framerate")) != NULL); - - if (!res || w <= 0 || h <= 0 || !GST_VALUE_HOLDS_FRACTION (fps)) - return FALSE; - - /* optional par info */ - par = gst_structure_get_value (structure, "pixel-aspect-ratio"); - - filter->width = w; - filter->height = h; - filter->fps_num = gst_value_get_fraction_numerator (fps); - filter->fps_den = gst_value_get_fraction_denominator (fps); - if ((par != NULL) && GST_VALUE_HOLDS_FRACTION (par)) { - filter->par_num = gst_value_get_fraction_numerator (par); - filter->par_den = gst_value_get_fraction_denominator (par); - } else { /* indicates unknown */ - filter->par_num = 0; - filter->par_den = 0; - } - - /* the template caps will do for the src pad, should always accept */ - return gst_pad_set_caps (filter->srcpad, - gst_static_pad_template_get_caps (&y4mencode_src_factory)); -} - -static inline GstBuffer * -gst_y4m_encode_get_stream_header (GstY4mEncode * filter) -{ - gpointer header; - GstBuffer *buf; - - header = g_strdup_printf ("YUV4MPEG2 W%d H%d I? F%d:%d A%d:%d\n", - filter->width, filter->height, - filter->fps_num, filter->fps_den, filter->par_num, filter->par_den); - - buf = gst_buffer_new (); - gst_buffer_set_data (buf, header, strlen (header)); - /* so it gets free'd when needed */ - GST_BUFFER_MALLOCDATA (buf) = header; - - return buf; -} - -static inline GstBuffer * -gst_y4m_encode_get_frame_header (GstY4mEncode * filter) -{ - gpointer header; - GstBuffer *buf; - - header = g_strdup_printf ("FRAME\n"); - - buf = gst_buffer_new (); - gst_buffer_set_data (buf, header, strlen (header)); - /* so it gets free'd when needed */ - GST_BUFFER_MALLOCDATA (buf) = header; - - return buf; -} - -static GstFlowReturn -gst_y4m_encode_chain (GstPad * pad, GstBuffer * buf) -{ - GstY4mEncode *filter = GST_Y4M_ENCODE (GST_PAD_PARENT (pad)); - GstBuffer *outbuf; - GstClockTime timestamp; - - /* check we got some decent info from caps */ - if (filter->width < 0) { - GST_ELEMENT_ERROR ("filter", CORE, NEGOTIATION, (NULL), - ("format wasn't negotiated before chain function")); - gst_buffer_unref (buf); - return GST_FLOW_NOT_NEGOTIATED; - } - - timestamp = GST_BUFFER_TIMESTAMP (buf); - - if (G_UNLIKELY (!filter->header)) { - outbuf = gst_y4m_encode_get_stream_header (filter); - filter->header = TRUE; - outbuf = gst_buffer_join (outbuf, gst_y4m_encode_get_frame_header (filter)); - } else { - outbuf = gst_y4m_encode_get_frame_header (filter); - } - /* join with data */ - outbuf = gst_buffer_join (outbuf, buf); - /* decorate */ - gst_buffer_make_metadata_writable (outbuf); - gst_buffer_set_caps (outbuf, GST_PAD_CAPS (filter->srcpad)); - - GST_BUFFER_TIMESTAMP (outbuf) = timestamp; - - return gst_pad_push (filter->srcpad, outbuf); -} - -static void -gst_y4m_encode_set_property (GObject * object, guint prop_id, - const GValue * value, GParamSpec * pspec) -{ - GstY4mEncode *filter; - - g_return_if_fail (GST_IS_Y4M_ENCODE (object)); - filter = GST_Y4M_ENCODE (object); - - switch (prop_id) { - default: - break; - } -} - -static void -gst_y4m_encode_get_property (GObject * object, guint prop_id, GValue * value, - GParamSpec * pspec) -{ - GstY4mEncode *filter; - - g_return_if_fail (GST_IS_Y4M_ENCODE (object)); - filter = GST_Y4M_ENCODE (object); - - switch (prop_id) { - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -static GstStateChangeReturn -gst_y4m_encode_change_state (GstElement * element, GstStateChange transition) -{ - GstY4mEncode *filter = GST_Y4M_ENCODE (element); - GstStateChangeReturn ret; - - switch (transition) { - case GST_STATE_CHANGE_NULL_TO_READY: - case GST_STATE_CHANGE_READY_TO_PAUSED: - break; - default: - break; - } - - ret = GST_CALL_PARENT_WITH_DEFAULT (GST_ELEMENT_CLASS, change_state, - (element, transition), GST_STATE_CHANGE_SUCCESS); - if (ret != GST_STATE_CHANGE_SUCCESS) - return ret; - - switch (transition) { - case GST_STATE_CHANGE_PAUSED_TO_READY: - gst_y4m_encode_reset (filter); - break; - default: - break; - } - - return GST_STATE_CHANGE_SUCCESS; -} - -static gboolean -plugin_init (GstPlugin * plugin) -{ - return gst_element_register (plugin, "y4menc", GST_RANK_NONE, - GST_TYPE_Y4M_ENCODE); -} - -GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, - GST_VERSION_MINOR, - "y4menc", - "Encodes a YUV frame into the yuv4mpeg format (mjpegtools)", - plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN) diff --git a/gst/y4m/gsty4mencode.h b/gst/y4m/gsty4mencode.h deleted file mode 100644 index 1ca8105a..00000000 --- a/gst/y4m/gsty4mencode.h +++ /dev/null @@ -1,67 +0,0 @@ -/* GStreamer - * Copyright (C) <1999> Erik Walthinsen - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - - -#ifndef __GST_Y4MENCODE_H__ -#define __GST_Y4MENCODE_H__ - - -#include - -G_BEGIN_DECLS - -#define GST_TYPE_Y4M_ENCODE \ - (gst_y4m_encode_get_type()) -#define GST_Y4M_ENCODE(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_Y4M_ENCODE, GstY4mEncode)) -#define GST_Y4M_ENCODE_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_Y4M_ENCODE, GstY4mEncodeClass)) -#define GST_Y4M_ENCODE_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS((obj), GST_TYPE_Y4M_ENCODE, GstY4mEncodeClass)) -#define GST_IS_Y4M_ENCODE(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_Y4M_ENCODE)) -#define GST_IS_Y4M_ENCODE_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_Y4M_ENCODE)) - -typedef struct _GstY4mEncode GstY4mEncode; -typedef struct _GstY4mEncodeClass GstY4mEncodeClass; - -struct _GstY4mEncode { - GstElement element; - - GstPad *sinkpad,*srcpad; - - /* caps information */ - gint width, height; - gint fps_num, fps_den; - gint par_num, par_den; - - /* state information */ - gboolean header; -}; - -struct _GstY4mEncodeClass { - GstElementClass parent_class; -}; - -GType gst_y4m_encode_get_type(void); - -G_END_DECLS - -#endif /* __GST_Y4MENCODE_H__ */ diff --git a/gst/y4m/y4menc.vcproj b/gst/y4m/y4menc.vcproj deleted file mode 100644 index 7251140e..00000000 --- a/gst/y4m/y4menc.vcproj +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am index cc2d61e4..8d3e3839 100644 --- a/tests/check/Makefile.am +++ b/tests/check/Makefile.am @@ -96,7 +96,6 @@ check_PROGRAMS = \ elements/mxfdemux \ elements/mxfmux \ pipelines/mxf \ - elements/y4menc \ $(check_metadata) noinst_HEADERS = elements/mxfdemux.h elements/amrparse_data.h elements/aacparse_data.h diff --git a/tests/check/elements/.gitignore b/tests/check/elements/.gitignore index 3e9d29bf..8b69efb6 100644 --- a/tests/check/elements/.gitignore +++ b/tests/check/elements/.gitignore @@ -26,4 +26,3 @@ wavpackdec wavpackenc wavpackparse x264enc -y4menc diff --git a/tests/check/elements/y4menc.c b/tests/check/elements/y4menc.c deleted file mode 100644 index b5c5fcc4..00000000 --- a/tests/check/elements/y4menc.c +++ /dev/null @@ -1,165 +0,0 @@ -/* GStreamer - * - * unit test for y4menc - * - * Copyright (C) <2006> Mark Nauwelaerts - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include - -#include - -/* For ease of programming we use globals to keep refs for our floating - * src and sink pads we create; otherwise we always have to do get_pad, - * get_peer, and then remove references in every test function */ -static GstPad *mysrcpad, *mysinkpad; - -#define VIDEO_CAPS_STRING "video/x-raw-yuv, " \ - "width = (int) 384, " \ - "height = (int) 288, " \ - "framerate = (fraction) 25/1, " \ - "pixel-aspect-ratio = (fraction) 1/1" - -#define Y4M_CAPS_STRING "application/x-yuv4mpeg, " \ - "y4mversion = (int) 2" - -static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink", - GST_PAD_SINK, - GST_PAD_ALWAYS, - GST_STATIC_CAPS (Y4M_CAPS_STRING)); - -static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src", - GST_PAD_SRC, - GST_PAD_ALWAYS, - GST_STATIC_CAPS (VIDEO_CAPS_STRING)); - - -GstElement * -setup_y4menc () -{ - GstElement *y4menc; - - GST_DEBUG ("setup_y4menc"); - y4menc = gst_check_setup_element ("y4menc"); - mysrcpad = gst_check_setup_src_pad (y4menc, &srctemplate, NULL); - mysinkpad = gst_check_setup_sink_pad (y4menc, &sinktemplate, NULL); - gst_pad_set_active (mysrcpad, TRUE); - gst_pad_set_active (mysinkpad, TRUE); - - return y4menc; -} - -void -cleanup_y4menc (GstElement * y4menc) -{ - GST_DEBUG ("cleanup_y4menc"); - gst_element_set_state (y4menc, GST_STATE_NULL); - - gst_pad_set_active (mysrcpad, FALSE); - gst_pad_set_active (mysinkpad, FALSE); - gst_check_teardown_src_pad (y4menc); - gst_check_teardown_sink_pad (y4menc); - gst_check_teardown_element (y4menc); -} - -GST_START_TEST (test_y4m) -{ - GstElement *y4menc; - GstBuffer *inbuffer, *outbuffer; - GstCaps *caps; - int i, num_buffers, size; - const gchar *data0 = "YUV4MPEG2 W384 H288 I? F25:1 A1:1\nFRAME\n"; - - - y4menc = setup_y4menc (); - fail_unless (gst_element_set_state (y4menc, - GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS, - "could not set to playing"); - - /* corresponds to I420 buffer for the size mentioned in the caps */ - size = 384 * 288 * 3 / 2; - inbuffer = gst_buffer_new_and_alloc (size); - /* makes valgrind's memcheck happier */ - memset (GST_BUFFER_DATA (inbuffer), 0, GST_BUFFER_SIZE (inbuffer)); - caps = gst_caps_from_string (VIDEO_CAPS_STRING); - gst_buffer_set_caps (inbuffer, caps); - gst_caps_unref (caps); - GST_BUFFER_TIMESTAMP (inbuffer) = 0; - ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1); - fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK); - - num_buffers = g_list_length (buffers); - fail_unless (num_buffers == 1); - - /* clean up buffers */ - for (i = 0; i < num_buffers; ++i) { - outbuffer = GST_BUFFER (buffers->data); - fail_if (outbuffer == NULL); - - switch (i) { - case 0: - fail_unless (strlen (data0) == 40); - fail_unless (GST_BUFFER_SIZE (outbuffer) == size + 40); - fail_unless (memcmp (data0, GST_BUFFER_DATA (outbuffer), - strlen (data0)) == 0); - break; - default: - break; - } - buffers = g_list_remove (buffers, outbuffer); - - ASSERT_BUFFER_REFCOUNT (outbuffer, "outbuffer", 1); - gst_buffer_unref (outbuffer); - outbuffer = NULL; - } - - cleanup_y4menc (y4menc); - g_list_free (buffers); - buffers = NULL; -} - -GST_END_TEST; - -Suite * -y4menc_suite (void) -{ - Suite *s = suite_create ("y4menc"); - TCase *tc_chain = tcase_create ("general"); - - suite_add_tcase (s, tc_chain); - tcase_add_test (tc_chain, test_y4m); - - return s; -} - -int -main (int argc, char **argv) -{ - int nf; - - Suite *s = y4menc_suite (); - SRunner *sr = srunner_create (s); - - gst_check_init (&argc, &argv); - - srunner_run_all (sr, CK_NORMAL); - nf = srunner_ntests_failed (sr); - srunner_free (sr); - - return nf; -} -- cgit v1.2.1 From 90aa8eff4c553a9be1e644b424116c0280e0abfa Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 15 May 2009 10:45:45 +0100 Subject: fpsdisplaysink: Fix resetting of the sink in NULL Reset the fpsdisplaysink in NULL by removing the textoverlay if we created it. Fixes: #582633 --- gst/debugutils/fpsdisplaysink.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/gst/debugutils/fpsdisplaysink.c b/gst/debugutils/fpsdisplaysink.c index b37ab112..54f5cc54 100644 --- a/gst/debugutils/fpsdisplaysink.c +++ b/gst/debugutils/fpsdisplaysink.c @@ -267,11 +267,11 @@ fps_display_sink_start (GstFPSDisplaySink * self) gst_object_ref (self->text_overlay); g_object_set (self->text_overlay, "font-desc", DEFAULT_FONT, "silent", FALSE, NULL); - } - gst_bin_add (GST_BIN (self), self->text_overlay); + gst_bin_add (GST_BIN (self), self->text_overlay); - if (!gst_element_link (self->text_overlay, self->video_sink)) { - GST_ERROR_OBJECT (self, "Could not link elements"); + if (!gst_element_link (self->text_overlay, self->video_sink)) { + GST_ERROR_OBJECT (self, "Could not link elements"); + } } target_pad = gst_element_get_static_pad (self->text_overlay, "video_sink"); } @@ -280,6 +280,7 @@ no_text_overlay: if (self->text_overlay) { gst_element_unlink (self->text_overlay, self->video_sink); gst_bin_remove (GST_BIN (self), self->text_overlay); + self->text_overlay = NULL; } target_pad = gst_element_get_static_pad (self->video_sink, "sink"); } @@ -300,6 +301,13 @@ fps_display_sink_stop (GstFPSDisplaySink * self) g_source_remove (self->timeout_id); self->timeout_id = 0; } + + if (self->text_overlay) { + gst_element_unlink (self->text_overlay, self->video_sink); + gst_bin_remove (GST_BIN (self), self->text_overlay); + gst_object_unref (self->text_overlay); + self->text_overlay = NULL; + } } static void -- cgit v1.2.1 From 4b4b81c3e5eca940776492e0908b82c642fd3eb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Moutte?= Date: Thu, 5 Jan 2006 23:17:44 +0000 Subject: [MOVED FROM GOOD] added sys/directdraw added sys/directsound added win32/vs6/gst_plugins_bad.dsw added win32/vs6/libgstdirectsound.dsp ... Original commit message from CVS: 2006-01-05 Sebastien Moutte * added sys/directdraw * added sys/directsound * added win32/vs6/gst_plugins_bad.dsw * added win32/vs6/libgstdirectsound.dsp * added win32/vs6/libgstdirectdraw.dsp * added win32/common/config.h --- sys/directdraw/gstdirectdrawplugin.c | 42 + sys/directdraw/gstdirectdrawsink.c | 1733 ++++++++++++++++++++++++++++++++++ sys/directdraw/gstdirectdrawsink.h | 132 +++ 3 files changed, 1907 insertions(+) create mode 100644 sys/directdraw/gstdirectdrawplugin.c create mode 100644 sys/directdraw/gstdirectdrawsink.c create mode 100644 sys/directdraw/gstdirectdrawsink.h diff --git a/sys/directdraw/gstdirectdrawplugin.c b/sys/directdraw/gstdirectdrawplugin.c new file mode 100644 index 00000000..69d79507 --- /dev/null +++ b/sys/directdraw/gstdirectdrawplugin.c @@ -0,0 +1,42 @@ +/* GStreamer +* Copyright (C) 2005 Sebastien Moutte +* +* gstdirectdrawplugin.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., 59 Temple Place - Suite 330, +* Boston, MA 02111-1307, USA. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "gstdirectdrawsink.h" + +static gboolean +plugin_init (GstPlugin * plugin) +{ + if (!gst_element_register (plugin, "directdrawsink", GST_RANK_NONE, + GST_TYPE_DIRECTDRAW_SINK)) + return FALSE; + + return TRUE; +} + +GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, + GST_VERSION_MINOR, + "directdraw", + "DIRECTDRAW plugin library", + plugin_init, VERSION, "LGPL", GST_PACKAGE, GST_ORIGIN) diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c new file mode 100644 index 00000000..55a0d54a --- /dev/null +++ b/sys/directdraw/gstdirectdrawsink.c @@ -0,0 +1,1733 @@ +/* GStreamer +* Copyright (C) 2005 Sebastien Moutte +* +* Based on directfb video sink +* gstdirectdrawsink.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., 59 Temple Place - Suite 330, +* Boston, MA 02111-1307, USA. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "gstdirectdrawsink.h" + +#include +#include +#include +#include + +GST_DEBUG_CATEGORY_STATIC (directdrawsink_debug); +#define GST_CAT_DEFAULT directdrawsink_debug + +/* elementfactory information */ +static GstElementDetails gst_directdrawsink_details = +GST_ELEMENT_DETAILS ("Video Sink (DIRECTDRAW)", + "Sink/Video", + "Output to a video card via DIRECTDRAW", + "Sebastien Moutte "); + +static void +_do_init (GType directdrawsink_type) +{ + GST_DEBUG_CATEGORY_INIT (directdrawsink_debug, "directdrawsink", 0, + "Direct draw sink"); +} + +GST_BOILERPLATE_FULL (GstDirectDrawSink, gst_directdrawsink, GstVideoSink, + GST_TYPE_VIDEO_SINK, _do_init); + +static void gst_directdrawsink_finalize (GObject * object); + +static void gst_directdrawsink_set_property (GObject * object, + guint prop_id, const GValue * value, GParamSpec * pspec); +static void gst_directdrawsink_get_property (GObject * object, + guint prop_id, GValue * value, GParamSpec * pspec); + +static GstCaps *gst_directdrawsink_get_caps (GstBaseSink * bsink); +static gboolean gst_directdrawsink_set_caps (GstBaseSink * bsink, + GstCaps * caps); + +static GstStateChangeReturn +gst_directdrawsink_change_state (GstElement * element, + GstStateChange transition); + +static GstFlowReturn +gst_directdrawsink_buffer_alloc (GstBaseSink * bsink, guint64 offset, + guint size, GstCaps * caps, GstBuffer ** buf); + +static void +gst_directdrawsink_get_times (GstBaseSink * bsink, GstBuffer * buf, + GstClockTime * start, GstClockTime * end); + +static GstFlowReturn +gst_directdrawsink_show_frame (GstBaseSink * bsink, GstBuffer * buf); + +static gboolean gst_directdrawsink_setup_ddraw (GstDirectDrawSink * ddrawsink); +static gboolean gst_directdrawsink_create_default_window (GstDirectDrawSink * + ddrawsink); +static gboolean gst_directdrawsink_create_ddraw_surfaces (GstDirectDrawSink * + ddrawsink); + +static GstCaps *gst_directdrawsink_get_ddrawcaps (GstDirectDrawSink * + ddrawsink); + +static void gst_directdrawsink_cleanup (GstDirectDrawSink * ddrawsink); +static void gst_directdrawsink_bufferpool_clear (GstDirectDrawSink * ddrawsink); + + +/*surfaces management functions*/ +static void +gst_directdrawsink_surface_destroy (GstDirectDrawSink * ddrawsink, + GstDDrawSurface * surface); + +static GstDDrawSurface *gst_directdrawsink_surface_create (GstDirectDrawSink * + ddrawsink, GstCaps * caps, size_t size); + +static GstStaticPadTemplate directdrawsink_sink_factory = + GST_STATIC_PAD_TEMPLATE ("sink", + GST_PAD_SINK, + GST_PAD_ALWAYS, + GST_STATIC_CAPS ("video/x-raw-rgb, " + "bpp = (int) { 8, 16, 24, 32 }, " + "depth = (int) { 0, 8, 16, 24, 32 }, " + "endianness = (int) LITTLE_ENDIAN, " + "framerate = (fraction) [ 0, MAX ], " + "width = (int) [ 1, MAX ], " + "height = (int) [ 1, MAX ]" + "; " + "video/x-raw-yuv, " + "framerate = (fraction) [ 0, MAX ], " + "width = (int) [ 1, MAX ], " + "height = (int) [ 1, MAX ], " + "format = (fourcc) { YUY2, UYVY, YVU9, YV12, AYUV }") + ); + +enum +{ + PROP_0, + PROP_SURFACE, + PROP_WINDOW, + PROP_FULLSCREEN +}; + +/* Utility functions */ +static gboolean +gst_ddrawvideosink_get_format_from_caps (GstCaps * caps, + DDPIXELFORMAT * pPixelFormat) +{ + GstStructure *structure = NULL; + gboolean ret = TRUE; + + /*check params */ + g_return_val_if_fail (pPixelFormat, FALSE); + g_return_val_if_fail (caps, FALSE); + + /*init structure */ + memset (pPixelFormat, 0, sizeof (DDPIXELFORMAT)); + pPixelFormat->dwSize = sizeof (DDPIXELFORMAT); + + if (!(structure = gst_caps_get_structure (caps, 0))) + return FALSE; + + if (gst_structure_has_name (structure, "video/x-raw-rgb")) { + gint depth, bitcount, bitmask; + + pPixelFormat->dwFlags = DDPF_RGB; + ret &= gst_structure_get_int (structure, "bpp", &bitcount); + pPixelFormat->dwRGBBitCount = bitcount; + ret &= gst_structure_get_int (structure, "depth", &depth); + ret &= gst_structure_get_int (structure, "red_mask", &bitmask); + pPixelFormat->dwRBitMask = bitmask; + ret &= gst_structure_get_int (structure, "green_mask", &bitmask); + pPixelFormat->dwGBitMask = bitmask; + ret &= gst_structure_get_int (structure, "blue_mask", &bitmask); + pPixelFormat->dwBBitMask = bitmask; + } else if (gst_structure_has_name (structure, "video/x-raw-yuv")) { + gint fourcc; + + pPixelFormat->dwFlags = DDPF_FOURCC; + ret &= gst_structure_get_fourcc (structure, "format", &fourcc); + pPixelFormat->dwFourCC = fourcc; + } else { + GST_WARNING ("unknown caps name received %" GST_PTR_FORMAT, caps); + ret = FALSE; + } + + return ret; +} + +static GstCaps * +gst_ddrawvideosink_get_caps_from_format (DDPIXELFORMAT pixel_format) +{ + GstCaps *caps = NULL; + gint bpp, depth; + guint32 fourcc; + + if ((pixel_format.dwFlags & DDPF_RGB) == DDPF_RGB) { + bpp = pixel_format.dwRGBBitCount; + if (bpp != 32) + depth = bpp; + else { + if ((pixel_format.dwFlags & DDPF_ALPHAPREMULT) == DDPF_ALPHAPREMULT) + depth = 32; + else + depth = 24; + } + caps = gst_caps_new_simple ("video/x-raw-rgb", + "bpp", G_TYPE_INT, bpp, + "depth", G_TYPE_INT, depth, + "endianness", G_TYPE_INT, G_LITTLE_ENDIAN, NULL); + } + + if ((pixel_format.dwFlags & DDPF_YUV) == DDPF_YUV) { + fourcc = pixel_format.dwFourCC; + caps = gst_caps_new_simple ("video/x-raw-yuv", + "format", GST_TYPE_FOURCC, fourcc, NULL); + } + + g_assert (caps != NULL); + + return caps; +} + +static void +gst_directdrawsink_center_rect (RECT src, RECT dst, RECT * result) +{ + gdouble src_ratio, dst_ratio; + long src_width = src.right; + long src_height = src.bottom; + long dst_width = dst.right - dst.left; + long dst_heigth = dst.bottom - dst.top; + long result_width = 0, result_height = 0; + + g_return_if_fail (result != NULL); + + src_ratio = (gdouble) src_width / src_height; + dst_ratio = (gdouble) dst_width / dst_heigth; + + if (src_ratio > dst_ratio) { + /*new height */ + result_height = (long) (dst_width / src_ratio); + + result->left = dst.left; + result->right = dst.right; + result->top = dst.top + (dst_heigth - result_height) / 2; + result->bottom = result->top + result_height; + + } else if (src_ratio < dst_ratio) { + /*new width */ + result_width = (long) (dst_heigth * src_ratio); + + result->top = dst.top; + result->bottom = dst.bottom; + result->left = dst.left + (dst_width - result_width) / 2; + result->right = result->left + result_width; + + } else { + /*same ratio */ + memcpy (result, &dst, sizeof (RECT)); + } + + GST_DEBUG ("source is %dx%d dest is %dx%d, result is %dx%d with x,y %dx%d", + src_width, src_height, dst_width, dst_heigth, result_width, result_height, + result->left, result->right); +} + +/*subclass of GstBuffer which manages surfaces lifetime*/ +static void +gst_ddrawsurface_finalize (GstDDrawSurface * surface) +{ + GstDirectDrawSink *ddrawsink = NULL; + + g_return_if_fail (surface != NULL); + + ddrawsink = surface->ddrawsink; + if (!ddrawsink) + goto no_sink; + + /* If our geometry changed we can't reuse that image. */ + if ((surface->width != ddrawsink->video_width) || + (surface->height != ddrawsink->video_height) || + (memcmp (&surface->dd_pixel_format, &ddrawsink->dd_pixel_format, + sizeof (DDPIXELFORMAT)) != 0) + ) { + GST_DEBUG ("destroy image as its size changed %dx%d vs current %dx%d", + surface->width, surface->height, + ddrawsink->video_width, ddrawsink->video_height); + gst_directdrawsink_surface_destroy (ddrawsink, surface); + + } else { + /* In that case we can reuse the image and add it to our image pool. */ + GST_DEBUG ("recycling image in pool"); + + /* need to increment the refcount again to recycle */ + gst_buffer_ref (GST_BUFFER (surface)); + + g_mutex_lock (ddrawsink->pool_lock); + ddrawsink->buffer_pool = g_slist_prepend (ddrawsink->buffer_pool, surface); + g_mutex_unlock (ddrawsink->pool_lock); + } + return; + +no_sink: + GST_WARNING ("no sink found"); + return; +} + +static void +gst_ddrawsurface_init (GstDDrawSurface * surface, gpointer g_class) +{ + surface->surface = NULL; + surface->width = 0; + surface->height = 0; + surface->ddrawsink = NULL; + memset (&surface->dd_pixel_format, 0, sizeof (DDPIXELFORMAT)); +} + +static void +gst_ddrawsurface_class_init (gpointer g_class, gpointer class_data) +{ + GstMiniObjectClass *mini_object_class = GST_MINI_OBJECT_CLASS (g_class); + + mini_object_class->finalize = (GstMiniObjectFinalizeFunction) + gst_ddrawsurface_finalize; +} + +GType +gst_ddrawsurface_get_type (void) +{ + static GType _gst_ddrawsurface_type; + + if (G_UNLIKELY (_gst_ddrawsurface_type == 0)) { + static const GTypeInfo ddrawsurface_info = { + sizeof (GstBufferClass), + NULL, + NULL, + gst_ddrawsurface_class_init, + NULL, + NULL, + sizeof (GstDDrawSurface), + 0, + (GInstanceInitFunc) gst_ddrawsurface_init, + NULL + }; + _gst_ddrawsurface_type = g_type_register_static (GST_TYPE_BUFFER, + "GstDDrawSurface", &ddrawsurface_info, 0); + } + return _gst_ddrawsurface_type; +} + +static GstDirectDrawSink *global_ddrawsink = NULL; + +/*GType +gst_directdrawsink_get_type (void) +{ + static GType directdrawsink_type = 0; + + if (!directdrawsink_type) { + static const GTypeInfo directdrawsink_info = { + sizeof (GstDirectDrawSinkClass), + gst_directdrawsink_base_init, + NULL, + (GClassInitFunc) gst_directdrawsink_class_init, + NULL, + NULL, + sizeof (GstDirectDrawSink), + 0, + (GInstanceInitFunc) gst_directdrawsink_init, + }; + + directdrawsink_type = + g_type_register_static (GST_TYPE_VIDEO_SINK, "GstDirectDrawSink", + &directdrawsink_info, 0); + } + + return directdrawsink_type; +} +*/ +static void +gst_directdrawsink_base_init (gpointer g_class) +{ + GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); + + gst_element_class_set_details (element_class, &gst_directdrawsink_details); + + gst_element_class_add_pad_template (element_class, + gst_static_pad_template_get (&directdrawsink_sink_factory)); +} + +static void +gst_directdrawsink_class_init (GstDirectDrawSinkClass * klass) +{ + GObjectClass *gobject_class; + GstElementClass *gstelement_class; + GstBaseSinkClass *gstbasesink_class; + + gobject_class = (GObjectClass *) klass; + gstbasesink_class = (GstBaseSinkClass *) klass; + gstelement_class = (GstElementClass *) klass; + + gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_directdrawsink_finalize); + + gobject_class->get_property = + GST_DEBUG_FUNCPTR (gst_directdrawsink_get_property); + gobject_class->set_property = + GST_DEBUG_FUNCPTR (gst_directdrawsink_set_property); + + gstelement_class->change_state = + GST_DEBUG_FUNCPTR (gst_directdrawsink_change_state); + gstbasesink_class->get_caps = GST_DEBUG_FUNCPTR (gst_directdrawsink_get_caps); + gstbasesink_class->set_caps = GST_DEBUG_FUNCPTR (gst_directdrawsink_set_caps); + gstbasesink_class->preroll = + GST_DEBUG_FUNCPTR (gst_directdrawsink_show_frame); + gstbasesink_class->render = GST_DEBUG_FUNCPTR (gst_directdrawsink_show_frame); + + gstbasesink_class->get_times = + GST_DEBUG_FUNCPTR (gst_directdrawsink_get_times); + gstbasesink_class->buffer_alloc = + GST_DEBUG_FUNCPTR (gst_directdrawsink_buffer_alloc); + + /*install properties */ + g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_FULLSCREEN, + g_param_spec_boolean ("fullscreen", "fullscreen", + "boolean to activate fullscreen", FALSE, G_PARAM_READWRITE)); + + /*extern window where we will display the video */ + g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_WINDOW, + g_param_spec_long ("window", "Window", + "The target window for video", G_MINLONG, G_MAXLONG, 0, + G_PARAM_WRITABLE)); + + /*extern surface where we will blit the video */ + g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_SURFACE, + g_param_spec_pointer ("surface", "Surface", + "The target surface for video", G_PARAM_WRITABLE)); + + /*should add a color_key property to permit applications to define the color used for overlays */ +} + +static void +gst_directdrawsink_set_property (GObject * object, guint prop_id, + const GValue * value, GParamSpec * pspec) +{ + GstDirectDrawSink *ddrawsink; + + ddrawsink = GST_DIRECTDRAW_SINK (object); + + switch (prop_id) { + case PROP_SURFACE: + ddrawsink->extern_surface = g_value_get_pointer (value); + break; + case PROP_WINDOW: + ddrawsink->video_window = (HWND) g_value_get_long (value); + ddrawsink->resize_window = FALSE; + break; + case PROP_FULLSCREEN: + if (g_value_get_boolean (value)) + ddrawsink->bFullScreen = TRUE; + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +gst_directdrawsink_get_property (GObject * object, guint prop_id, + GValue * value, GParamSpec * pspec) +{ + GstDirectDrawSink *ddrawsink; + + ddrawsink = GST_DIRECTDRAW_SINK (object); + + switch (prop_id) { + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +gst_directdrawsink_finalize (GObject * object) +{ + GstDirectDrawSink *ddrawsink; + + ddrawsink = GST_DIRECTDRAW_SINK (object); + + if (ddrawsink->pool_lock) { + g_mutex_free (ddrawsink->pool_lock); + ddrawsink->pool_lock = NULL; + } + if (ddrawsink->setup) { + gst_directdrawsink_cleanup (ddrawsink); + } +} + +static void +gst_directdrawsink_init (GstDirectDrawSink * ddrawsink, + GstDirectDrawSinkClass * g_class) +{ + /*init members variables */ + ddrawsink->ddraw_object = NULL; + ddrawsink->primary_surface = NULL; + ddrawsink->overlays = NULL; + ddrawsink->clipper = NULL; + ddrawsink->extern_surface = NULL; + + /*video default values */ + ddrawsink->video_height = 0; + ddrawsink->video_width = 0; + ddrawsink->fps_n = 0; + ddrawsink->fps_d = 0; + + memset (&ddrawsink->dd_pixel_format, 0, sizeof (DDPIXELFORMAT)); + + ddrawsink->caps = NULL; + + ddrawsink->window_thread = NULL; + + ddrawsink->bUseOverlay = TRUE; + ddrawsink->color_key = 0; /*need to be a public property and may be we can enable overlays when this property is set ... */ + + ddrawsink->bFullScreen = FALSE; + ddrawsink->setup = FALSE; + + ddrawsink->display_modes = NULL; + ddrawsink->buffer_pool = NULL; + + ddrawsink->resize_window = TRUE; /*resize only our internal window to the video size */ + global_ddrawsink = ddrawsink; + + ddrawsink->pool_lock = g_mutex_new (); +} + +static GstCaps * +gst_directdrawsink_get_caps (GstBaseSink * bsink) +{ + GstDirectDrawSink *ddrawsink; + GstCaps *caps = NULL; + + ddrawsink = GST_DIRECTDRAW_SINK (bsink); + + if (!ddrawsink->setup) { + caps = gst_caps_copy (gst_pad_get_pad_template_caps (GST_VIDEO_SINK_PAD + (ddrawsink))); + + GST_DEBUG ("getcaps called and we are not setup yet, " + "returning template %" GST_PTR_FORMAT, caps); + } else { + /*if (ddrawsink->extern_surface) { + * We are not rendering to our own surface, returning this surface's + * pixel format * + GST_WARNING ("using extern surface"); + caps = gst_ddrawvideosink_get_caps_from_format (ddrawsink->dd_pixel_format); + } else */ + + /* i think we can't really use the format of the extern surface as the application owning the surface doesn't know + the format we will render. But we need to use overlays to overlay any format on the extern surface */ + caps = gst_caps_ref (ddrawsink->caps); + } + + return caps; +} + +static gboolean +gst_directdrawsink_set_caps (GstBaseSink * bsink, GstCaps * caps) +{ + GstDirectDrawSink *ddrawsink; + GstStructure *structure = NULL; + gboolean ret; + const GValue *fps; + + ddrawsink = GST_DIRECTDRAW_SINK (bsink); + + structure = gst_caps_get_structure (caps, 0); + if (!structure) + return FALSE; + + ret = gst_structure_get_int (structure, "width", &ddrawsink->video_width); + ret &= gst_structure_get_int (structure, "height", &ddrawsink->video_height); + + fps = gst_structure_get_value (structure, "framerate"); + ret &= (fps != NULL); + + ret &= + gst_ddrawvideosink_get_format_from_caps (caps, + &ddrawsink->dd_pixel_format); + + if (!ret) + return FALSE; + + ddrawsink->fps_n = gst_value_get_fraction_numerator (fps); + ddrawsink->fps_d = gst_value_get_fraction_denominator (fps); + + if (ddrawsink->video_window && ddrawsink->resize_window) { + SetWindowPos (ddrawsink->video_window, NULL, + 0, 0, ddrawsink->video_width + (GetSystemMetrics (SM_CXSIZEFRAME) * 2), + ddrawsink->video_height + GetSystemMetrics (SM_CYCAPTION) + + (GetSystemMetrics (SM_CYSIZEFRAME) * 2), SWP_SHOWWINDOW | SWP_NOMOVE); + } + + /*create overlays flipping chain and an offscreen surface */ + gst_directdrawsink_create_ddraw_surfaces (ddrawsink); + + return TRUE; +} + +static GstStateChangeReturn +gst_directdrawsink_change_state (GstElement * element, + GstStateChange transition) +{ + GstDirectDrawSink *ddrawsink; + + ddrawsink = GST_DIRECTDRAW_SINK (element); + + switch (transition) { + case GST_STATE_CHANGE_NULL_TO_READY: + GST_DEBUG ("GST_STATE_CHANGE_NULL_TO_READY\n"); + + if (ddrawsink->video_window == NULL && ddrawsink->extern_surface == NULL) + if (!gst_directdrawsink_create_default_window (ddrawsink)) + return GST_STATE_CHANGE_FAILURE; + + if (!gst_directdrawsink_setup_ddraw (ddrawsink)) + return GST_STATE_CHANGE_FAILURE; + + if (!(ddrawsink->caps = gst_directdrawsink_get_ddrawcaps (ddrawsink))) + return GST_STATE_CHANGE_FAILURE; + + break; + case GST_STATE_CHANGE_READY_TO_PAUSED: + GST_DEBUG ("GST_STATE_CHANGE_READY_TO_PAUSED\n"); + break; + case GST_STATE_CHANGE_PAUSED_TO_PLAYING: + GST_DEBUG ("GST_STATE_CHANGE_PAUSED_TO_PLAYING\n"); + break; + case GST_STATE_CHANGE_PLAYING_TO_PAUSED: + GST_DEBUG ("GST_STATE_CHANGE_PLAYING_TO_PAUSED\n"); + break; + case GST_STATE_CHANGE_PAUSED_TO_READY: + GST_DEBUG ("GST_STATE_CHANGE_PAUSED_TO_READY\n"); + + ddrawsink->fps_n = 0; + ddrawsink->fps_d = 1; + ddrawsink->video_width = 0; + ddrawsink->video_height = 0; + + if (ddrawsink->buffer_pool) + gst_directdrawsink_bufferpool_clear (ddrawsink); + + break; + case GST_STATE_CHANGE_READY_TO_NULL: + GST_DEBUG ("GST_STATE_CHANGE_READY_TO_NULL\n"); + + if (ddrawsink->setup) + gst_directdrawsink_cleanup (ddrawsink); + + break; + } + + return GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); +} + +/** + * Get DirectDraw error message. + * @hr: HRESULT code + * Returns: Text representation of the error. + */ +char * +DDErrorString (HRESULT hr) +{ + switch (hr) { + case DDERR_ALREADYINITIALIZED: + return "DDERR_ALREADYINITIALIZED"; + case DDERR_CANNOTATTACHSURFACE: + return "DDERR_CANNOTATTACHSURFACE"; + case DDERR_CANNOTDETACHSURFACE: + return "DDERR_CANNOTDETACHSURFACE"; + case DDERR_CURRENTLYNOTAVAIL: + return "DDERR_CURRENTLYNOTAVAIL"; + case DDERR_EXCEPTION: + return "DDERR_EXCEPTION"; + case DDERR_GENERIC: + return "DDERR_GENERIC"; + case DDERR_HEIGHTALIGN: + return "DDERR_HEIGHTALIGN"; + case DDERR_INCOMPATIBLEPRIMARY: + return "DDERR_INCOMPATIBLEPRIMARY"; + case DDERR_INVALIDCAPS: + return "DDERR_INVALIDCAPS"; + case DDERR_INVALIDCLIPLIST: + return "DDERR_INVALIDCLIPLIST"; + case DDERR_INVALIDMODE: + return "DDERR_INVALIDMODE"; + case DDERR_INVALIDOBJECT: + return "DDERR_INVALIDOBJECT"; + case DDERR_INVALIDPARAMS: + return "DDERR_INVALIDPARAMS"; + case DDERR_INVALIDPIXELFORMAT: + return "DDERR_INVALIDPIXELFORMAT"; + case DDERR_INVALIDRECT: + return "DDERR_INVALIDRECT"; + case DDERR_LOCKEDSURFACES: + return "DDERR_LOCKEDSURFACES"; + case DDERR_NO3D: + return "DDERR_NO3D"; + case DDERR_NOALPHAHW: + return "DDERR_NOALPHAHW"; + case DDERR_NOCLIPLIST: + return "DDERR_NOCLIPLIST"; + case DDERR_NOCOLORCONVHW: + return "DDERR_NOCOLORCONVHW"; + case DDERR_NOCOOPERATIVELEVELSET: + return "DDERR_NOCOOPERATIVELEVELSET"; + case DDERR_NOCOLORKEY: + return "DDERR_NOCOLORKEY"; + case DDERR_NOCOLORKEYHW: + return "DDERR_NOCOLORKEYHW"; + case DDERR_NODIRECTDRAWSUPPORT: + return "DDERR_NODIRECTDRAWSUPPORT"; + case DDERR_NOEXCLUSIVEMODE: + return "DDERR_NOEXCLUSIVEMODE"; + case DDERR_NOFLIPHW: + return "DDERR_NOFLIPHW"; + case DDERR_NOGDI: + return "DDERR_NOGDI"; + case DDERR_NOMIRRORHW: + return "DDERR_NOMIRRORHW"; + case DDERR_NOTFOUND: + return "DDERR_NOTFOUND"; + case DDERR_NOOVERLAYHW: + return "DDERR_NOOVERLAYHW"; + case DDERR_NORASTEROPHW: + return "DDERR_NORASTEROPHW"; + case DDERR_NOROTATIONHW: + return "DDERR_NOROTATIONHW"; + case DDERR_NOSTRETCHHW: + return "DDERR_NOSTRETCHHW"; + case DDERR_NOT4BITCOLOR: + return "DDERR_NOT4BITCOLOR"; + case DDERR_NOT4BITCOLORINDEX: + return "DDERR_NOT4BITCOLORINDEX"; + case DDERR_NOT8BITCOLOR: + return "DDERR_NOT8BITCOLOR"; + case DDERR_NOTEXTUREHW: + return "DDERR_NOTEXTUREHW"; + case DDERR_NOVSYNCHW: + return "DDERR_NOVSYNCHW"; + case DDERR_NOZBUFFERHW: + return "DDERR_NOZBUFFERHW"; + case DDERR_NOZOVERLAYHW: + return "DDERR_NOZOVERLAYHW"; + case DDERR_OUTOFCAPS: + return "DDERR_OUTOFCAPS"; + case DDERR_OUTOFMEMORY: + return "DDERR_OUTOFMEMORY"; + case DDERR_OUTOFVIDEOMEMORY: + return "DDERR_OUTOFVIDEOMEMORY"; + case DDERR_OVERLAYCANTCLIP: + return "DDERR_OVERLAYCANTCLIP"; + case DDERR_OVERLAYCOLORKEYONLYONEACTIVE: + return "DDERR_OVERLAYCOLORKEYONLYONEACTIVE"; + case DDERR_PALETTEBUSY: + return "DDERR_PALETTEBUSY"; + case DDERR_COLORKEYNOTSET: + return "DDERR_COLORKEYNOTSET"; + case DDERR_SURFACEALREADYATTACHED: + return "DDERR_SURFACEALREADYATTACHED"; + case DDERR_SURFACEALREADYDEPENDENT: + return "DDERR_SURFACEALREADYDEPENDENT"; + case DDERR_SURFACEBUSY: + return "DDERR_SURFACEBUSY"; + case DDERR_CANTLOCKSURFACE: + return "DDERR_CANTLOCKSURFACE"; + case DDERR_SURFACEISOBSCURED: + return "DDERR_SURFACEISOBSCURED"; + case DDERR_SURFACELOST: + return "DDERR_SURFACELOST"; + case DDERR_SURFACENOTATTACHED: + return "DDERR_SURFACENOTATTACHED"; + case DDERR_TOOBIGHEIGHT: + return "DDERR_TOOBIGHEIGHT"; + case DDERR_TOOBIGSIZE: + return "DDERR_TOOBIGSIZE"; + case DDERR_TOOBIGWIDTH: + return "DDERR_TOOBIGWIDTH"; + case DDERR_UNSUPPORTED: + return "DDERR_UNSUPPORTED"; + case DDERR_UNSUPPORTEDFORMAT: + return "DDERR_UNSUPPORTEDFORMAT"; + case DDERR_UNSUPPORTEDMASK: + return "DDERR_UNSUPPORTEDMASK"; + case DDERR_VERTICALBLANKINPROGRESS: + return "DDERR_VERTICALBLANKINPROGRESS"; + case DDERR_WASSTILLDRAWING: + return "DDERR_WASSTILLDRAWING"; + case DDERR_XALIGN: + return "DDERR_XALIGN"; + case DDERR_INVALIDDIRECTDRAWGUID: + return "DDERR_INVALIDDIRECTDRAWGUID"; + case DDERR_DIRECTDRAWALREADYCREATED: + return "DDERR_DIRECTDRAWALREADYCREATED"; + case DDERR_NODIRECTDRAWHW: + return "DDERR_NODIRECTDRAWHW"; + case DDERR_PRIMARYSURFACEALREADYEXISTS: + return "DDERR_PRIMARYSURFACEALREADYEXISTS"; + case DDERR_NOEMULATION: + return "DDERR_NOEMULATION"; + case DDERR_REGIONTOOSMALL: + return "DDERR_REGIONTOOSMALL"; + case DDERR_CLIPPERISUSINGHWND: + return "DDERR_CLIPPERISUSINGHWND"; + case DDERR_NOCLIPPERATTACHED: + return "DDERR_NOCLIPPERATTACHED"; + case DDERR_NOHWND: + return "DDERR_NOHWND"; + case DDERR_HWNDSUBCLASSED: + return "DDERR_HWNDSUBCLASSED"; + case DDERR_HWNDALREADYSET: + return "DDERR_HWNDALREADYSET"; + case DDERR_NOPALETTEATTACHED: + return "DDERR_NOPALETTEATTACHED"; + case DDERR_NOPALETTEHW: + return "DDERR_NOPALETTEHW"; + case DDERR_BLTFASTCANTCLIP: + return "DDERR_BLTFASTCANTCLIP"; + case DDERR_NOBLTHW: + return "DDERR_NOBLTHW"; + case DDERR_NODDROPSHW: + return "DDERR_NODDROPSHW"; + case DDERR_OVERLAYNOTVISIBLE: + return "DDERR_OVERLAYNOTVISIBLE"; + case DDERR_NOOVERLAYDEST: + return "DDERR_NOOVERLAYDEST"; + case DDERR_INVALIDPOSITION: + return "DDERR_INVALIDPOSITION"; + case DDERR_NOTAOVERLAYSURFACE: + return "DDERR_NOTAOVERLAYSURFACE"; + case DDERR_EXCLUSIVEMODEALREADYSET: + return "DDERR_EXCLUSIVEMODEALREADYSET"; + case DDERR_NOTFLIPPABLE: + return "DDERR_NOTFLIPPABLE"; + case DDERR_CANTDUPLICATE: + return "DDERR_CANTDUPLICATE"; + case DDERR_NOTLOCKED: + return "DDERR_NOTLOCKED"; + case DDERR_CANTCREATEDC: + return "DDERR_CANTCREATEDC"; + case DDERR_NODC: + return "DDERR_NODC"; + case DDERR_WRONGMODE: + return "DDERR_WRONGMODE"; + case DDERR_IMPLICITLYCREATED: + return "DDERR_IMPLICITLYCREATED"; + case DDERR_NOTPALETTIZED: + return "DDERR_NOTPALETTIZED"; + case DDERR_UNSUPPORTEDMODE: + return "DDERR_UNSUPPORTEDMODE"; + case DDERR_NOMIPMAPHW: + return "DDERR_NOMIPMAPHW"; + case DDERR_INVALIDSURFACETYPE: + return "DDERR_INVALIDSURFACETYPE"; + case DDERR_DCALREADYCREATED: + return "DDERR_DCALREADYCREATED"; + case DDERR_CANTPAGELOCK: + return "DDERR_CANTPAGELOCK"; + case DDERR_CANTPAGEUNLOCK: + return "DDERR_CANTPAGEUNLOCK"; + case DDERR_NOTPAGELOCKED: + return "DDERR_NOTPAGELOCKED"; + case DDERR_NOTINITIALIZED: + return "DDERR_NOTINITIALIZED"; + } + return "Unknown Error"; +} + + +static gint gtempcpt = 0; +static GstFlowReturn +gst_directdrawsink_buffer_alloc (GstBaseSink * bsink, guint64 offset, + guint size, GstCaps * caps, GstBuffer ** buf) +{ + GstDirectDrawSink *ddrawsink = NULL; + GstDDrawSurface *surface = NULL; + GstStructure *structure = NULL; + GstFlowReturn ret = GST_FLOW_OK; + + ddrawsink = GST_DIRECTDRAW_SINK (bsink); + GST_DEBUG ("a buffer of %d bytes was requested", size); + + structure = gst_caps_get_structure (caps, 0); + + g_mutex_lock (ddrawsink->pool_lock); + + /* Inspect our buffer pool */ + while (ddrawsink->buffer_pool) { + surface = (GstDDrawSurface *) ddrawsink->buffer_pool->data; + + if (surface) { + /* Removing from the pool */ + ddrawsink->buffer_pool = g_slist_delete_link (ddrawsink->buffer_pool, + ddrawsink->buffer_pool); + + /* If the surface is invalid for our need, destroy */ + if ((surface->width != ddrawsink->video_width) || + (surface->height != ddrawsink->video_height) || + (memcmp (&surface->dd_pixel_format, &ddrawsink->dd_pixel_format, + sizeof (DDPIXELFORMAT))) + ) { + gst_directdrawsink_surface_destroy (ddrawsink, surface); + surface = NULL; + } else { + /* We found a suitable surface */ + break; + } + } + } + + /* We haven't found anything, creating a new one */ + if (!surface) { + surface = gst_directdrawsink_surface_create (ddrawsink, caps, size); + gtempcpt++; + } + + /* Now we should have a surface, set appropriate caps on it */ + if (surface) { + gst_buffer_set_caps (GST_BUFFER (surface), caps); + } + + g_mutex_unlock (ddrawsink->pool_lock); + + *buf = GST_BUFFER (surface); + + return ret; +} + +static gboolean +gst_directdrawsink_fill_colorkey (LPDIRECTDRAWSURFACE surface, DWORD dwColorKey) +{ + DDBLTFX ddbfx; + + if (!surface) + return FALSE; + + ddbfx.dwSize = sizeof (DDBLTFX); + ddbfx.dwFillColor = dwColorKey; + + if (IDirectDrawSurface_Blt (surface, + NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &ddbfx) == DD_OK) + return TRUE; + else + return FALSE; +} + + +static void +gst_directdrawsink_show_overlay (GstDirectDrawSink * ddrawsink) +{ + HRESULT hRes; + RECT destsurf_rect, src_rect; + POINT dest_surf_point; + DDOVERLAYFX ddofx; + LPDIRECTDRAWSURFACE surface = NULL; + + if (!ddrawsink || !ddrawsink->overlays) + return; + + if (ddrawsink->extern_surface) + surface = ddrawsink->extern_surface; + else + surface = ddrawsink->primary_surface; + + if (ddrawsink->extern_surface) { + destsurf_rect.left = 0; + destsurf_rect.top = 0; + destsurf_rect.right = ddrawsink->out_width; + destsurf_rect.bottom = ddrawsink->out_height; + } else { + dest_surf_point.x = 0; + dest_surf_point.y = 0; + ClientToScreen (ddrawsink->video_window, &dest_surf_point); + GetClientRect (ddrawsink->video_window, &destsurf_rect); + OffsetRect (&destsurf_rect, dest_surf_point.x, dest_surf_point.y); + } + + src_rect.top = 0; + src_rect.left = 0; + src_rect.bottom = ddrawsink->video_height; + src_rect.right = ddrawsink->video_width; + gst_directdrawsink_center_rect (src_rect, destsurf_rect, &destsurf_rect); + + gst_directdrawsink_fill_colorkey (surface, ddrawsink->color_key); + + ddofx.dwSize = sizeof (DDOVERLAYFX); + ddofx.dckDestColorkey.dwColorSpaceLowValue = ddrawsink->color_key; + ddofx.dckDestColorkey.dwColorSpaceHighValue = ddrawsink->color_key; + + hRes = IDirectDrawSurface_UpdateOverlay (ddrawsink->overlays, + NULL, surface, &destsurf_rect, DDOVER_KEYDESTOVERRIDE | DDOVER_SHOW, + &ddofx); +} + +static GstFlowReturn +gst_directdrawsink_show_frame (GstBaseSink * bsink, GstBuffer * buf) +{ + GstDirectDrawSink *ddrawsink; + HRESULT hRes; + + DDSURFACEDESC surf_desc; + RECT destsurf_rect, src_rect; + POINT dest_surf_point; + LPDIRECTDRAWSURFACE lpSurface = NULL; + + ddrawsink = GST_DIRECTDRAW_SINK (bsink); + + if (ddrawsink->extern_surface) { + destsurf_rect.left = 0; + destsurf_rect.top = 0; + destsurf_rect.right = ddrawsink->out_width; + destsurf_rect.bottom = ddrawsink->out_height; + } else { + dest_surf_point.x = 0; + dest_surf_point.y = 0; + ClientToScreen (ddrawsink->video_window, &dest_surf_point); + GetClientRect (ddrawsink->video_window, &destsurf_rect); + OffsetRect (&destsurf_rect, dest_surf_point.x, dest_surf_point.y); + } + + src_rect.top = 0; + src_rect.left = 0; + src_rect.bottom = ddrawsink->video_height; + src_rect.right = ddrawsink->video_width; + gst_directdrawsink_center_rect (src_rect, destsurf_rect, &destsurf_rect); + + if (ddrawsink->bUseOverlay) { + /*get the back buffer of the overlays flipping chain */ + DDSCAPS ddbackcaps; + + ddbackcaps.dwCaps = DDSCAPS_BACKBUFFER; + IDirectDrawSurface_GetAttachedSurface (ddrawsink->overlays, &ddbackcaps, + &lpSurface); + } else { + /*use our offscreen surface */ + lpSurface = ddrawsink->offscreen_surface; + } + + if (lpSurface == NULL) + return GST_FLOW_ERROR; + + if (!GST_IS_DDRAWSURFACE (buf) || + ((GST_IS_DDRAWSURFACE (buf)) && (GST_BUFFER (buf)->malloc_data))) { + + LPBYTE data = NULL; + guint src_pitch, line; + + /* Check for lost surface */ + if (IDirectDrawSurface_IsLost (lpSurface) == DDERR_SURFACELOST) { + IDirectDrawSurface_Restore (lpSurface); + } + + ZeroMemory (&surf_desc, sizeof (surf_desc)); + surf_desc.dwSize = sizeof (surf_desc); + + /* Lock the surface */ + hRes = + IDirectDrawSurface_Lock (lpSurface, NULL, &surf_desc, DDLOCK_WAIT, + NULL); + if (hRes != DD_OK) { + GST_DEBUG ("gst_directdrawsink_show_frame failed locking surface %s", + DDErrorString (hRes)); + return GST_FLOW_ERROR; + } + + /* Write data */ + data = surf_desc.lpSurface; + + /* Source video rowbytes */ + src_pitch = GST_BUFFER_SIZE (buf) / ddrawsink->video_height; + + /* Write each line respecting dest surface pitch */ + for (line = 0; line < surf_desc.dwHeight; line++) { + memcpy (data, GST_BUFFER_DATA (buf) + (line * src_pitch), src_pitch); + data += surf_desc.lPitch; + } + + /* Unlock the surface */ + hRes = IDirectDrawSurface_Unlock (lpSurface, NULL); + if (hRes != DD_OK) { + GST_DEBUG ("gst_directdrawsink_show_frame failed unlocking surface %s", + DDErrorString (hRes)); + return GST_FLOW_ERROR; + } + + if (ddrawsink->bUseOverlay) { + /*Flip to front overlay */ + hRes = + IDirectDrawSurface_Flip (ddrawsink->overlays, lpSurface, DDFLIP_WAIT); + IDirectDrawSurface_Release (lpSurface); + lpSurface = NULL; + } else { + if (ddrawsink->extern_surface) { + if (ddrawsink->out_height == ddrawsink->video_height && + ddrawsink->out_width == ddrawsink->video_width) { + /*Fast blit to extern surface */ + hRes = IDirectDrawSurface_BltFast (ddrawsink->extern_surface, 0, 0, + lpSurface, NULL, DDBLTFAST_WAIT); + + } else { + /*blit to extern surface (Blt will scale the video the dest rect surface if needed) */ + hRes = + IDirectDrawSurface_Blt (ddrawsink->extern_surface, &destsurf_rect, + lpSurface, NULL, DDBLT_WAIT, NULL); + } + } else { + /*blit to primary surface ( Blt will scale the video the dest rect surface if needed */ + hRes = + IDirectDrawSurface_Blt (ddrawsink->primary_surface, &destsurf_rect, + lpSurface, NULL, DDBLT_WAIT, NULL); + } + } + } else { + + GstDDrawSurface *surface = NULL; + + surface = GST_DDRAWSURFACE (buf); + + /* Unlocking surface before blit */ + IDirectDrawSurface_Unlock (surface->surface, NULL); + surface->locked = FALSE; + + /* Check for lost surfaces */ + if (IDirectDrawSurface_IsLost (surface->surface) == DDERR_SURFACELOST) { + IDirectDrawSurface_Restore (surface->surface); + } + + if (ddrawsink->bUseOverlay) { + /* blit to the overlays back buffer */ + hRes = IDirectDrawSurface_Blt (lpSurface, NULL, + surface->surface, NULL, DDBLT_WAIT, NULL); + + hRes = IDirectDrawSurface_Flip (ddrawsink->overlays, NULL, DDFLIP_WAIT); + if (hRes != DD_OK) + GST_WARNING ("error flipping"); + + } else { + if (ddrawsink->extern_surface) { + /*blit to the extern surface */ + if (ddrawsink->out_height == ddrawsink->video_height && + ddrawsink->out_width == ddrawsink->video_width) { + /*Fast blit to extern surface */ + hRes = IDirectDrawSurface_BltFast (ddrawsink->extern_surface, 0, 0, + surface->surface, NULL, DDBLTFAST_WAIT); + + } else { + /*blit to extern surface (Blt will scale the video the dest rect surface if needed) */ + hRes = + IDirectDrawSurface_Blt (ddrawsink->extern_surface, &destsurf_rect, + surface->surface, NULL, DDBLT_WAIT, NULL); + } + } else { + /*blit to our primary surface */ + hRes = + IDirectDrawSurface_Blt (ddrawsink->primary_surface, &destsurf_rect, + surface->surface, NULL, DDBLT_WAIT, NULL); + if (hRes != DD_OK) + GST_WARNING ("IDirectDrawSurface_Blt returned %s", + DDErrorString (hRes)); + } + } + } + + if (ddrawsink->bUseOverlay) + gst_directdrawsink_show_overlay (ddrawsink); + + return GST_FLOW_OK; +} + +static gboolean +gst_directdrawsink_setup_ddraw (GstDirectDrawSink * ddrawsink) +{ + gboolean bRet = TRUE; + HRESULT hRes; + DWORD dwCooperativeLevel; + DDSURFACEDESC dd_surface_desc; + + /*create an instance of the ddraw object */ + hRes = DirectDrawCreate (NULL, &ddrawsink->ddraw_object, NULL); + if (hRes != DD_OK || ddrawsink->ddraw_object == NULL) + return FALSE; + + /*set cooperative level */ + if (ddrawsink->bFullScreen) + dwCooperativeLevel = DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN; + else + dwCooperativeLevel = DDSCL_NORMAL; + + hRes = IDirectDraw_SetCooperativeLevel (ddrawsink->ddraw_object, + ddrawsink->video_window, dwCooperativeLevel); + if (hRes != DD_OK) + bRet = FALSE; + + /*for fullscreen mode, setup display mode */ + if (ddrawsink->bFullScreen) { + hRes = IDirectDraw_SetDisplayMode (ddrawsink->ddraw_object, 640, 480, 32); + } + + if (!ddrawsink->extern_surface) { + /*create our primary surface */ + memset (&dd_surface_desc, 0, sizeof (dd_surface_desc)); + dd_surface_desc.dwSize = sizeof (dd_surface_desc); + dd_surface_desc.dwFlags = DDSD_CAPS; + dd_surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; + + hRes = IDirectDraw_CreateSurface (ddrawsink->ddraw_object, &dd_surface_desc, + &ddrawsink->primary_surface, NULL); + if (hRes != DD_OK) + bRet = FALSE; + + if (bRet == FALSE) { + if (ddrawsink->ddraw_object) { + IDirectDraw_Release (ddrawsink->ddraw_object); + GST_DEBUG ("CreateSurface failed with: %s", DDErrorString (hRes)); + return FALSE; + } + } + + hRes = IDirectDraw_CreateClipper (ddrawsink->ddraw_object, 0, + &ddrawsink->clipper, NULL); + if (hRes == DD_OK) { + hRes = IDirectDrawClipper_SetHWnd (ddrawsink->clipper, 0, + ddrawsink->video_window); + hRes = IDirectDrawSurface_SetClipper (ddrawsink->primary_surface, + ddrawsink->clipper); + } + } else { + DDSURFACEDESC desc_surface; + + desc_surface.dwSize = sizeof (DDSURFACEDESC); + + /*get extern surface size */ + hRes = IDirectDrawSurface_GetSurfaceDesc (ddrawsink->extern_surface, + &desc_surface); + if (hRes != DD_OK) { + /*error while retrieving ext surface description */ + return FALSE; + } + + ddrawsink->out_width = desc_surface.dwWidth; + ddrawsink->out_height = desc_surface.dwHeight; + + /*get extern surface pixel format (FIXME not needed if we are using overlays) */ + ddrawsink->dd_pixel_format.dwSize = sizeof (DDPIXELFORMAT); + hRes = IDirectDrawSurface_GetPixelFormat (ddrawsink->extern_surface, + &ddrawsink->dd_pixel_format); + if (hRes != DD_OK) { + /*error while retrieving ext surface pixel format */ + return FALSE; + } + + /*get specific caps if needed ... */ + } + + ddrawsink->setup = TRUE; + + return bRet; +} + +long FAR PASCAL +WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + switch (message) { + case WM_ERASEBKGND: + return TRUE; +/* case WM_WINDOWPOSCHANGED: + case WM_MOVE: + case WM_SIZE: + if(global_ddrawsink && global_ddrawsink->bUseOverlay) + gst_directdrawsink_show_overlay(global_ddrawsink); + break; + case WM_PAINT: + if(global_ddrawsink && global_ddrawsink->bUseOverlay) + { + if(global_ddrawsink->extern_surface) + gst_directdrawsink_fill_colorkey(global_ddrawsink->extern_surface, + global_ddrawsink->color_key); + else + gst_directdrawsink_fill_colorkey(global_ddrawsink->primary_surface, + global_ddrawsink->color_key); + } + break; +*/ + case WM_DESTROY: + PostQuitMessage (0); + break; + case WM_CLOSE: + DestroyWindow (hWnd); + return 0; + } + return DefWindowProc (hWnd, message, wParam, lParam); +} + +static gpointer +gst_directdrawsink_window_thread (GstDirectDrawSink * ddrawsink) +{ + WNDCLASS WndClass; + + memset (&WndClass, 0, sizeof (WNDCLASS)); + + WndClass.style = CS_HREDRAW | CS_VREDRAW; + WndClass.hInstance = GetModuleHandle (NULL); + WndClass.lpszClassName = "GStreamer-DirectDraw"; + WndClass.hbrBackground = (HBRUSH) GetStockObject (BLACK_BRUSH); + WndClass.cbClsExtra = 0; + WndClass.cbWndExtra = 0; + WndClass.lpfnWndProc = WndProc; + WndClass.hCursor = LoadCursor (NULL, IDC_ARROW); + + RegisterClass (&WndClass); + + ddrawsink->video_window = CreateWindowEx (0, "GStreamer-DirectDraw", + "GStreamer-DirectDraw sink default window", + WS_OVERLAPPEDWINDOW | WS_SIZEBOX, 0, 0, 640, 480, NULL, NULL, + WndClass.hInstance, NULL); + + if (ddrawsink->video_window == NULL) + return FALSE; + + ShowWindow (ddrawsink->video_window, SW_SHOW); + + /*start message loop processing our default window messages */ + while (1) { + MSG msg; + + if (!GetMessage (&msg, ddrawsink->video_window, 0, 0)) + break; + DispatchMessage (&msg); + } + + return NULL; +} + +static gboolean +gst_directdrawsink_create_default_window (GstDirectDrawSink * ddrawsink) +{ + ddrawsink->window_thread = g_thread_create ( + (GThreadFunc) gst_directdrawsink_window_thread, ddrawsink, TRUE, NULL); + + if (ddrawsink->window_thread == NULL) + return FALSE; + + /*TODO:wait for the window to be created with timeout */ + + return TRUE; +} + +static gboolean +gst_directdrawsink_create_ddraw_surfaces (GstDirectDrawSink * ddrawsink) +{ + DDSURFACEDESC dd_surface_desc; + HRESULT hRes; + + memset (&dd_surface_desc, 0, sizeof (dd_surface_desc)); + dd_surface_desc.dwSize = sizeof (dd_surface_desc); + + dd_surface_desc.dwFlags = + DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT; + dd_surface_desc.dwHeight = ddrawsink->video_height; + dd_surface_desc.dwWidth = ddrawsink->video_width; + memcpy (&(dd_surface_desc.ddpfPixelFormat), &ddrawsink->dd_pixel_format, + sizeof (DDPIXELFORMAT)); + + if (ddrawsink->bUseOverlay) { + /*create overlays flipping chain */ + dd_surface_desc.ddsCaps.dwCaps = + DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_FLIP | DDSCAPS_COMPLEX; + dd_surface_desc.dwFlags |= DDSD_BACKBUFFERCOUNT; + dd_surface_desc.dwBackBufferCount = 1; + + hRes = IDirectDraw_CreateSurface (ddrawsink->ddraw_object, &dd_surface_desc, + &ddrawsink->overlays, NULL); + + if (hRes != DD_OK) { + GST_DEBUG ("create_ddraw_surfaces:CreateSurface(overlays) failed %s", + DDErrorString (hRes)); + return FALSE; + } + } else { + dd_surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; + + hRes = IDirectDraw_CreateSurface (ddrawsink->ddraw_object, &dd_surface_desc, + &ddrawsink->offscreen_surface, NULL); + + if (hRes != DD_OK) { + GST_DEBUG ("create_ddraw_surfaces:CreateSurface(offscreen) failed %s", + DDErrorString (hRes)); + return FALSE; + } + } + + return TRUE; +} + +static void +gst_directdrawsink_get_times (GstBaseSink * bsink, GstBuffer * buf, + GstClockTime * start, GstClockTime * end) +{ + GstDirectDrawSink *ddrawsink; + + ddrawsink = GST_DIRECTDRAW_SINK (bsink); + + if (GST_BUFFER_TIMESTAMP_IS_VALID (buf)) { + *start = GST_BUFFER_TIMESTAMP (buf); + if (GST_BUFFER_DURATION_IS_VALID (buf)) { + *end = *start + GST_BUFFER_DURATION (buf); + } else { + if (ddrawsink->fps_n > 0) { + *end = *start + (GST_SECOND * ddrawsink->fps_d) / ddrawsink->fps_n; + } + } + } +} + +static int +gst_directdrawsink_get_depth (LPDDPIXELFORMAT lpddpfPixelFormat) +{ + gint order = 0, binary; + + binary = + lpddpfPixelFormat->dwRBitMask | lpddpfPixelFormat-> + dwGBitMask | lpddpfPixelFormat->dwBBitMask | lpddpfPixelFormat-> + dwRGBAlphaBitMask; + while (binary != 0) { + if ((binary % 2) == 1) + order++; + binary = binary >> 1; + } + return order; +} + +HRESULT WINAPI +EnumModesCallback2 (LPDDSURFACEDESC2 lpDDSurfaceDesc, LPVOID lpContext) +{ + GstDirectDrawSink *ddrawsink = (GstDirectDrawSink *) lpContext; + GstCaps *format_caps = NULL; + + if (!ddrawsink || !lpDDSurfaceDesc) + return DDENUMRET_CANCEL; + + if ((lpDDSurfaceDesc->dwFlags & DDSD_PIXELFORMAT) != DDSD_PIXELFORMAT) { + GST_DEBUG ("Display mode found with DDSD_PIXELFORMAT not set"); + return DDENUMRET_OK; + } + + if ((lpDDSurfaceDesc->ddpfPixelFormat.dwFlags & DDPF_RGB) != DDPF_RGB) + return DDENUMRET_OK; + + format_caps = gst_caps_new_simple ("video/x-raw-rgb", + "width", GST_TYPE_INT_RANGE, 1, G_MAXINT, + "height", GST_TYPE_INT_RANGE, 1, G_MAXINT, + "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, + "bpp", G_TYPE_INT, lpDDSurfaceDesc->ddpfPixelFormat.dwRGBBitCount, + "depth", G_TYPE_INT, + gst_directdrawsink_get_depth (&lpDDSurfaceDesc->ddpfPixelFormat), + "endianness", G_TYPE_INT, G_LITTLE_ENDIAN, "red_mask", G_TYPE_INT, + lpDDSurfaceDesc->ddpfPixelFormat.dwRBitMask, "green_mask", G_TYPE_INT, + lpDDSurfaceDesc->ddpfPixelFormat.dwGBitMask, "blue_mask", G_TYPE_INT, + lpDDSurfaceDesc->ddpfPixelFormat.dwBBitMask, NULL); + + if (format_caps) { + gst_caps_append (ddrawsink->caps, format_caps); + } + + return DDENUMRET_OK; +} + +static GstCaps * +gst_directdrawsink_get_ddrawcaps (GstDirectDrawSink * ddrawsink) +{ + HRESULT hRes = S_OK; + DWORD dwFourccCodeIndex = 0; + LPDWORD pdwFourccCodes = NULL; + DWORD dwNbFourccCodes = 0; + GstCaps *format_caps = NULL; + + ddrawsink->caps = gst_caps_new_empty (); + if (!ddrawsink->caps) + return FALSE; + + /*enumerate display modes exposed by directdraw object */ + hRes = + IDirectDraw_EnumDisplayModes (ddrawsink->ddraw_object, DDEDM_REFRESHRATES, + NULL, ddrawsink, EnumModesCallback2); + if (hRes != DD_OK) { + GST_DEBUG ("EnumDisplayModes returns: %s", DDErrorString (hRes)); + return FALSE; + } + + /* enumerate non-rgb modes exposed by directdraw object */ + IDirectDraw_GetFourCCCodes (ddrawsink->ddraw_object, &dwNbFourccCodes, NULL); + if (dwNbFourccCodes != 0) { + pdwFourccCodes = g_new0 (DWORD, dwNbFourccCodes); + if (!pdwFourccCodes) + return FALSE; + + if (FAILED (IDirectDraw_GetFourCCCodes (ddrawsink->ddraw_object, + &dwNbFourccCodes, pdwFourccCodes))) { + g_free (pdwFourccCodes); + return FALSE; + } + + for (dwFourccCodeIndex = 0; dwFourccCodeIndex < dwNbFourccCodes; + dwFourccCodeIndex++) { + /*support only yuv formats YUY2, UYVY, YVU9, YV12, AYUV */ + if (pdwFourccCodes[dwFourccCodeIndex] == mmioFOURCC ('Y', 'U', 'Y', '2') + || pdwFourccCodes[dwFourccCodeIndex] == mmioFOURCC ('U', 'Y', 'V', + 'Y') + || pdwFourccCodes[dwFourccCodeIndex] == mmioFOURCC ('Y', 'V', 'U', + '9') + || pdwFourccCodes[dwFourccCodeIndex] == mmioFOURCC ('Y', 'V', '1', + '2') + || pdwFourccCodes[dwFourccCodeIndex] == mmioFOURCC ('A', 'Y', 'U', + 'V') + ) { + format_caps = gst_caps_new_simple ("video/x-raw-yuv", + "format", GST_TYPE_FOURCC, pdwFourccCodes[dwFourccCodeIndex], + "width", GST_TYPE_INT_RANGE, 1, G_MAXINT, + "height", GST_TYPE_INT_RANGE, 1, G_MAXINT, + "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL); + + if (format_caps) + gst_caps_append (ddrawsink->caps, format_caps); + } + } + + g_free (pdwFourccCodes); + } + + if (gst_caps_is_empty (ddrawsink->caps)) { + gst_caps_unref (ddrawsink->caps); + + GST_ELEMENT_ERROR (ddrawsink, STREAM, WRONG_TYPE, (NULL), + ("No supported format found")); + return NULL; + } + + return ddrawsink->caps; +} + +/* Creates miniobject and our internal surface */ +static GstDDrawSurface * +gst_directdrawsink_surface_create (GstDirectDrawSink * ddrawsink, + GstCaps * caps, size_t size) +{ + GstDDrawSurface *surface = NULL; + GstStructure *structure = NULL; + + HRESULT hRes; + DDSURFACEDESC surf_desc, surf_lock_desc; + + g_return_val_if_fail (GST_IS_DIRECTDRAW_SINK (ddrawsink), NULL); + + /*init structures */ + memset (&surf_desc, 0, sizeof (surf_desc)); + memset (&surf_lock_desc, 0, sizeof (surf_desc)); + surf_desc.dwSize = sizeof (surf_desc); + surf_lock_desc.dwSize = sizeof (surf_lock_desc); + + /*create miniobject and initialize it */ + surface = (GstDDrawSurface *) gst_mini_object_new (GST_TYPE_DDRAWSURFACE); + surface->locked = FALSE; + + structure = gst_caps_get_structure (caps, 0); + if (!gst_structure_get_int (structure, "width", &surface->width) || + !gst_structure_get_int (structure, "height", &surface->height)) { + GST_WARNING ("failed getting geometry from caps %" GST_PTR_FORMAT, caps); + } + + if (!gst_ddrawvideosink_get_format_from_caps (caps, + &surface->dd_pixel_format)) { + GST_WARNING ("failed getting pixel format from caps %" GST_PTR_FORMAT, + caps); + } + + if (ddrawsink->ddraw_object) { + /* Creating an internal surface which will be used as GstBuffer, we used + the detected pixel format and video dimensions */ + gint pitch = GST_ROUND_UP_8 (size / surface->height); + + surf_desc.lPitch = pitch; + + surf_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; + surf_desc.dwFlags = + DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT | DDSD_PITCH; + surf_desc.dwHeight = surface->height; + surf_desc.dwWidth = surface->width; + + memcpy (&(surf_desc.ddpfPixelFormat), &surface->dd_pixel_format, + sizeof (DDPIXELFORMAT)); + + hRes = IDirectDraw_CreateSurface (ddrawsink->ddraw_object, &surf_desc, + &surface->surface, NULL); + if (hRes != DD_OK) { + gst_object_unref (surface); + surface = NULL; + goto beach; + } + + /* Locking the surface to acquire the memory pointer. + Use DDLOCK_NOSYSLOCK to disable syslock which can cause a deadlock + if directdraw api is used while a buffer is lock */ + hRes = IDirectDrawSurface_Lock (surface->surface, NULL, &surf_lock_desc, + DDLOCK_WAIT | DDLOCK_NOSYSLOCK, NULL); + surface->locked = TRUE; + + if (surf_lock_desc.lPitch != pitch) { + GST_DEBUG + ("DDraw stride/pitch %d isn't as expected value %d, let's continue allocating buffer.", + surf_lock_desc.lPitch, pitch); + IDirectDrawSurface_Release (surface->surface); + goto surface_pitch_bad; + } + + GST_DEBUG ("allocating a surface of %d bytes (stride=%d)\n", size, + surf_lock_desc.lPitch); + GST_BUFFER_DATA (surface) = surf_lock_desc.lpSurface; + GST_BUFFER_SIZE (surface) = surf_lock_desc.lPitch * surface->height; + } else { + + surface_pitch_bad: + GST_BUFFER (surface)->malloc_data = g_malloc (size); + GST_BUFFER_DATA (surface) = GST_BUFFER (surface)->malloc_data; + GST_BUFFER_SIZE (surface) = size; + surface->surface = NULL; + printf ("allocating a buffer of %d bytes\n", size); + } + + /* Keep a ref to our sink */ + surface->ddrawsink = gst_object_ref (ddrawsink); + +beach: + return surface; +} + +/* We are called from the finalize method of miniobject, the object will be + * destroyed so we just have to clean our internal stuff */ +static void +gst_directdrawsink_surface_destroy (GstDirectDrawSink * ddrawsink, + GstDDrawSurface * surface) +{ + g_return_if_fail (GST_IS_DIRECTDRAW_SINK (ddrawsink)); + + /* Release our internal surface */ + if (surface->surface) { + if (surface->locked) { + IDirectDrawSurface_Unlock (surface->surface, NULL); + surface->locked = FALSE; + } + IDirectDrawSurface_Release (surface->surface); + surface->surface = NULL; + } + + if (GST_BUFFER (surface)->malloc_data) { + g_free (GST_BUFFER (surface)->malloc_data); + GST_BUFFER (surface)->malloc_data = NULL; + } + + if (!surface->ddrawsink) { + goto no_sink; + } + + /* Release the ref to our sink */ + surface->ddrawsink = NULL; + gst_object_unref (ddrawsink); + + return; + +no_sink: + GST_WARNING ("no sink found in surface"); + return; +} + +static void +gst_directdrawsink_bufferpool_clear (GstDirectDrawSink * ddrawsink) +{ + g_mutex_lock (ddrawsink->pool_lock); + while (ddrawsink->buffer_pool) { + GstDDrawSurface *surface = ddrawsink->buffer_pool->data; + + ddrawsink->buffer_pool = g_slist_delete_link (ddrawsink->buffer_pool, + ddrawsink->buffer_pool); + gst_directdrawsink_surface_destroy (ddrawsink, surface); + } + g_mutex_unlock (ddrawsink->pool_lock); +} + +static void +gst_directdrawsink_cleanup (GstDirectDrawSink * ddrawsink) +{ + /* Post quit message and wait for our event window thread */ + if (ddrawsink->video_window) + PostMessage (ddrawsink->video_window, WM_QUIT, 0, 0); + if (ddrawsink->window_thread) { + g_thread_join (ddrawsink->window_thread); + ddrawsink->window_thread = NULL; + } + + if (ddrawsink->buffer_pool) { + gst_directdrawsink_bufferpool_clear (ddrawsink); + ddrawsink->buffer_pool = NULL; + } + + if (ddrawsink->display_modes) { + GSList *walk = ddrawsink->display_modes; + + while (walk) { + g_free (walk->data); + walk = g_slist_next (walk); + } + g_slist_free (ddrawsink->display_modes); + ddrawsink->display_modes = NULL; + } + + if (ddrawsink->overlays) { + IDirectDrawSurface_Release (ddrawsink->overlays); + ddrawsink->overlays = NULL; + } + + if (ddrawsink->offscreen_surface) { + IDirectDrawSurface_Release (ddrawsink->offscreen_surface); + ddrawsink->offscreen_surface = NULL; + } + + if (ddrawsink->clipper) { + IDirectDrawClipper_Release (ddrawsink->clipper); + ddrawsink->clipper = NULL; + } + + if (ddrawsink->primary_surface) { + IDirectDrawSurface_Release (ddrawsink->primary_surface); + ddrawsink->primary_surface = NULL; + } + + if (ddrawsink->ddraw_object) { + IDirectDraw_Release (ddrawsink->ddraw_object); + ddrawsink->ddraw_object = NULL; + } + + ddrawsink->setup = FALSE; +} diff --git a/sys/directdraw/gstdirectdrawsink.h b/sys/directdraw/gstdirectdrawsink.h new file mode 100644 index 00000000..7476eaac --- /dev/null +++ b/sys/directdraw/gstdirectdrawsink.h @@ -0,0 +1,132 @@ +/* GStreamer + * Copyright (C) 2005 Sebastien Moutte + * + * gstdirectdrawsink.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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + + +#ifndef __GST_DIRECTDRAWSINK_H__ +#define __GST_DIRECTDRAWSINK_H__ + +#define DIRECTDRAW_VERSION 0x0700 + +#include +#include +#include + +#include + +G_BEGIN_DECLS +#define GST_TYPE_DIRECTDRAW_SINK (gst_directdrawsink_get_type()) +#define GST_DIRECTDRAW_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DIRECTDRAW_SINK,GstDirectDrawSink)) +#define GST_DIRECTDRAW_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DIRECTDRAW_SINK,GstDirectDrawSinkClass)) +#define GST_IS_DIRECTDRAW_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DIRECTDRAW_SINK)) +#define GST_IS_DIRECTDRAW_SINK_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DIRECTDRAW_SINK)) +typedef struct _GstDirectDrawSink GstDirectDrawSink; +typedef struct _GstDirectDrawSinkClass GstDirectDrawSinkClass; + +#define GST_TYPE_DDRAWSURFACE (gst_ddrawsurface_get_type()) +#define GST_IS_DDRAWSURFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DDRAWSURFACE)) +#define GST_DDRAWSURFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_DDRAWSURFACE, GstDDrawSurface)) + +typedef struct _GstDDrawSurface GstDDrawSurface; + +struct _GstDDrawSurface +{ + /* Extension of GstBuffer to store directdraw surfaces */ + GstBuffer buffer; + + /*directdraw surface */ + LPDIRECTDRAWSURFACE surface; + + gint width; + gint height; + gboolean locked; + + DDPIXELFORMAT dd_pixel_format; + + GstDirectDrawSink *ddrawsink; +}; + + +typedef struct _GstDDDDisplayMode GstDDDisplayMode; + +struct _GstDDDDisplayMode +{ + gint width; + gint height; + gint bpp; +}; + +struct _GstDirectDrawSink +{ + GstVideoSink videosink; + + /*directdraw offscreen surfaces pool */ + GSList *buffer_pool; + + GSList *display_modes; + //GstDDDisplayMode display_mode; + + /*directdraw objects */ + LPDIRECTDRAW ddraw_object; + LPDIRECTDRAWSURFACE primary_surface; + LPDIRECTDRAWSURFACE offscreen_surface; + LPDIRECTDRAWSURFACE overlays; + LPDIRECTDRAWCLIPPER clipper; + LPDIRECTDRAWSURFACE extern_surface; + + /*Directdraw caps */ + GstCaps *caps; + + /*handle of the video window */ + HWND video_window; + gboolean resize_window; + + /*video properties */ + gint video_width, video_height; + gint out_width, out_height; + //gdouble framerate; + gint fps_n; + gint fps_d; + + /*pixel format */ + DDPIXELFORMAT dd_pixel_format; + + GThread *window_thread; + + gboolean bUseOverlay; + gboolean bIsOverlayVisible; + gboolean bFullScreen; + gboolean setup; + + GMutex *pool_lock; + + guint color_key; + /*LPDIRECTDRAWSURFACE extern_surface; */ +}; + +struct _GstDirectDrawSinkClass +{ + GstVideoSinkClass parent_class; +}; + +GType gst_directdrawsink_get_type (void); + +G_END_DECLS +#endif /* __GST_DIRECTDRAWSINK_H__ */ -- cgit v1.2.1 From c7c875e85b1bf997b942907069295f7bbe49296f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Moutte?= Date: Fri, 3 Mar 2006 23:45:23 +0000 Subject: [MOVED FROM GOOD] sys/: sinks are now using GST_RANK_PRIMARY to be used with autodectection Original commit message from CVS: * sys/directdraw: * sys/directsound: sinks are now using GST_RANK_PRIMARY to be used with autodectection * win32/vs6: project files updated to fix some bugs * win32/vs7: * win32/vs8: vs7 and vs8 project files added --- sys/directdraw/gstdirectdrawplugin.c | 2 +- sys/directdraw/gstdirectdrawsink.c | 32 ++++++++++++++++++++++++-------- sys/directdraw/gstdirectdrawsink.h | 5 +++++ 3 files changed, 30 insertions(+), 9 deletions(-) diff --git a/sys/directdraw/gstdirectdrawplugin.c b/sys/directdraw/gstdirectdrawplugin.c index 69d79507..de5452f3 100644 --- a/sys/directdraw/gstdirectdrawplugin.c +++ b/sys/directdraw/gstdirectdrawplugin.c @@ -28,7 +28,7 @@ static gboolean plugin_init (GstPlugin * plugin) { - if (!gst_element_register (plugin, "directdrawsink", GST_RANK_NONE, + if (!gst_element_register (plugin, "directdrawsink", GST_RANK_PRIMARY, GST_TYPE_DIRECTDRAW_SINK)) return FALSE; diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index 55a0d54a..2f837496 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -296,6 +296,8 @@ gst_ddrawsurface_init (GstDDrawSurface * surface, gpointer g_class) surface->width = 0; surface->height = 0; surface->ddrawsink = NULL; + surface->locked = FALSE; + surface->system_memory = FALSE; memset (&surface->dd_pixel_format, 0, sizeof (DDPIXELFORMAT)); } @@ -1184,9 +1186,10 @@ gst_directdrawsink_setup_ddraw (GstDirectDrawSink * ddrawsink) bRet = FALSE; /*for fullscreen mode, setup display mode */ - if (ddrawsink->bFullScreen) { +/* if (ddrawsink->bFullScreen) { hRes = IDirectDraw_SetDisplayMode (ddrawsink->ddraw_object, 640, 480, 32); } + */ if (!ddrawsink->extern_surface) { /*create our primary surface */ @@ -1309,8 +1312,6 @@ gst_directdrawsink_window_thread (GstDirectDrawSink * ddrawsink) if (ddrawsink->video_window == NULL) return FALSE; - ShowWindow (ddrawsink->video_window, SW_SHOW); - /*start message loop processing our default window messages */ while (1) { MSG msg; @@ -1422,7 +1423,7 @@ gst_directdrawsink_get_depth (LPDDPIXELFORMAT lpddpfPixelFormat) } HRESULT WINAPI -EnumModesCallback2 (LPDDSURFACEDESC2 lpDDSurfaceDesc, LPVOID lpContext) +EnumModesCallback2 (LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext) { GstDirectDrawSink *ddrawsink = (GstDirectDrawSink *) lpContext; GstCaps *format_caps = NULL; @@ -1537,6 +1538,7 @@ gst_directdrawsink_surface_create (GstDirectDrawSink * ddrawsink, { GstDDrawSurface *surface = NULL; GstStructure *structure = NULL; + gint pitch; HRESULT hRes; DDSURFACEDESC surf_desc, surf_lock_desc; @@ -1559,6 +1561,8 @@ gst_directdrawsink_surface_create (GstDirectDrawSink * ddrawsink, GST_WARNING ("failed getting geometry from caps %" GST_PTR_FORMAT, caps); } + pitch = GST_ROUND_UP_8 (size / surface->height); + if (!gst_ddrawvideosink_get_format_from_caps (caps, &surface->dd_pixel_format)) { GST_WARNING ("failed getting pixel format from caps %" GST_PTR_FORMAT, @@ -1568,9 +1572,6 @@ gst_directdrawsink_surface_create (GstDirectDrawSink * ddrawsink, if (ddrawsink->ddraw_object) { /* Creating an internal surface which will be used as GstBuffer, we used the detected pixel format and video dimensions */ - gint pitch = GST_ROUND_UP_8 (size / surface->height); - - surf_desc.lPitch = pitch; surf_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; surf_desc.dwFlags = @@ -1600,7 +1601,9 @@ gst_directdrawsink_surface_create (GstDirectDrawSink * ddrawsink, GST_DEBUG ("DDraw stride/pitch %d isn't as expected value %d, let's continue allocating buffer.", surf_lock_desc.lPitch, pitch); - IDirectDrawSurface_Release (surface->surface); + + /*Unlock the surface as we will change it to use system memory with a GStreamer compatible pitch */ + hRes = IDirectDrawSurface_Unlock (surface->surface, NULL); goto surface_pitch_bad; } @@ -1614,6 +1617,19 @@ gst_directdrawsink_surface_create (GstDirectDrawSink * ddrawsink, GST_BUFFER (surface)->malloc_data = g_malloc (size); GST_BUFFER_DATA (surface) = GST_BUFFER (surface)->malloc_data; GST_BUFFER_SIZE (surface) = size; + +/* surf_desc.dwSize = sizeof(DDSURFACEDESC); + surf_desc.dwFlags = DDSD_PITCH | DDSD_LPSURFACE | DDSD_HEIGHT | DDSD_WIDTH ||DDSD_PIXELFORMAT; + surf_desc.lpSurface = GST_BUFFER (surface)->malloc_data; + surf_desc.lPitch = pitch; + //surf_desc.dwHeight = surface->height; + surf_desc.dwWidth = surface->width; + hRes = IDirectDrawSurface7_SetSurfaceDesc(surface->surface, &surf_desc, 0); + printf("%\n", DDErrorString(hRes)); + + hRes = IDirectDrawSurface7_Lock (surface->surface, NULL, &surf_lock_desc, + DDLOCK_WAIT | DDLOCK_NOSYSLOCK, NULL); +*/ surface->surface = NULL; printf ("allocating a buffer of %d bytes\n", size); } diff --git a/sys/directdraw/gstdirectdrawsink.h b/sys/directdraw/gstdirectdrawsink.h index 7476eaac..c144f646 100644 --- a/sys/directdraw/gstdirectdrawsink.h +++ b/sys/directdraw/gstdirectdrawsink.h @@ -56,7 +56,12 @@ struct _GstDDrawSurface gint width; gint height; + + /*TRUE when surface is locked*/ gboolean locked; + /*TRUE when surface is using a system memory buffer + (i'm using system memory when directdraw optimized pitch is not the same as the GStreamer one)*/ + gboolean system_memory; DDPIXELFORMAT dd_pixel_format; -- cgit v1.2.1 From e291df2299862f81495def5c187ba8885396b0ff Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Sat, 1 Apr 2006 10:09:11 +0000 Subject: [MOVED FROM GOOD] rework build; add translations for v4l2 Original commit message from CVS: rework build; add translations for v4l2 --- sys/directdraw/gstdirectdrawplugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/directdraw/gstdirectdrawplugin.c b/sys/directdraw/gstdirectdrawplugin.c index de5452f3..728551e0 100644 --- a/sys/directdraw/gstdirectdrawplugin.c +++ b/sys/directdraw/gstdirectdrawplugin.c @@ -39,4 +39,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, "directdraw", "DIRECTDRAW plugin library", - plugin_init, VERSION, "LGPL", GST_PACKAGE, GST_ORIGIN) + plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN) -- cgit v1.2.1 From 3ab843a4c9b2637d20cf9b2d1ece4733dbd8832c Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Tue, 25 Apr 2006 21:56:38 +0000 Subject: [MOVED FROM GOOD] Define GstElementDetails as const and also static (when defined as global) Original commit message from CVS: * ext/amrwb/gstamrwbdec.c: * ext/amrwb/gstamrwbenc.c: * ext/amrwb/gstamrwbparse.c: * ext/arts/gst_arts.c: * ext/artsd/gstartsdsink.c: * ext/audiofile/gstafparse.c: * ext/audiofile/gstafsink.c: * ext/audiofile/gstafsrc.c: * ext/audioresample/gstaudioresample.c: * ext/bz2/gstbz2dec.c: * ext/bz2/gstbz2enc.c: * ext/cdaudio/gstcdaudio.c: * ext/directfb/dfbvideosink.c: * ext/divx/gstdivxdec.c: * ext/divx/gstdivxenc.c: * ext/dts/gstdtsdec.c: (gst_dtsdec_base_init): * ext/faac/gstfaac.c: (gst_faac_base_init): * ext/faad/gstfaad.c: * ext/gsm/gstgsmdec.c: * ext/gsm/gstgsmenc.c: * ext/hermes/gsthermescolorspace.c: * ext/ivorbis/vorbisfile.c: * ext/lcs/gstcolorspace.c: * ext/libfame/gstlibfame.c: * ext/libmms/gstmms.c: (gst_mms_base_init): * ext/musepack/gstmusepackdec.c: (gst_musepackdec_base_init): * ext/musicbrainz/gsttrm.c: (gst_musicbrainz_base_init): * ext/nas/nassink.c: (gst_nassink_base_init): * ext/neon/gstneonhttpsrc.c: * ext/sdl/sdlaudiosink.c: * ext/sdl/sdlvideosink.c: * ext/shout/gstshout.c: * ext/snapshot/gstsnapshot.c: * ext/sndfile/gstsf.c: * ext/swfdec/gstswfdec.c: * ext/tarkin/gsttarkindec.c: * ext/tarkin/gsttarkinenc.c: * ext/theora/theoradec.c: * ext/wavpack/gstwavpackdec.c: (gst_wavpack_dec_base_init): * ext/wavpack/gstwavpackparse.c: (gst_wavpack_parse_base_init): * ext/xvid/gstxviddec.c: * ext/xvid/gstxvidenc.c: * gst/cdxaparse/gstcdxaparse.c: (gst_cdxa_parse_base_init): * gst/cdxaparse/gstcdxastrip.c: (gst_cdxastrip_base_init): * gst/chart/gstchart.c: * gst/colorspace/gstcolorspace.c: * gst/deinterlace/gstdeinterlace.c: * gst/equalizer/gstiirequalizer.c: (gst_iir_equalizer_base_init): * gst/festival/gstfestival.c: * gst/filter/gstbpwsinc.c: * gst/filter/gstiir.c: * gst/filter/gstlpwsinc.c: * gst/freeze/gstfreeze.c: * gst/games/gstpuzzle.c: (gst_puzzle_base_init): * gst/librfb/gstrfbsrc.c: * gst/mixmatrix/mixmatrix.c: * gst/mpeg1sys/gstmpeg1systemencode.c: * gst/mpeg1videoparse/gstmp1videoparse.c: * gst/mpeg2sub/gstmpeg2subt.c: * gst/mpegaudioparse/gstmpegaudioparse.c: * gst/multifilesink/gstmultifilesink.c: * gst/overlay/gstoverlay.c: * gst/passthrough/gstpassthrough.c: * gst/playondemand/gstplayondemand.c: * gst/qtdemux/qtdemux.c: * gst/rtjpeg/gstrtjpegdec.c: * gst/rtjpeg/gstrtjpegenc.c: * gst/smooth/gstsmooth.c: * gst/smoothwave/gstsmoothwave.c: * gst/spectrum/gstspectrum.c: * gst/speed/gstspeed.c: * gst/stereo/gststereo.c: * gst/switch/gstswitch.c: * gst/tta/gstttadec.c: (gst_tta_dec_base_init): * gst/tta/gstttaparse.c: (gst_tta_parse_base_init): * gst/vbidec/gstvbidec.c: * gst/videocrop/gstvideocrop.c: * gst/videodrop/gstvideodrop.c: * gst/virtualdub/gstxsharpen.c: * gst/xingheader/gstxingmux.c: (gst_xing_mux_base_init): * gst/y4m/gsty4mencode.c: * sys/cdrom/gstcdplayer.c: * sys/directdraw/gstdirectdrawsink.c: * sys/directsound/gstdirectsoundsink.c: * sys/glsink/glimagesink.c: * sys/qcam/gstqcamsrc.c: * sys/v4l2/gstv4l2src.c: * sys/vcd/vcdsrc.c: (gst_vcdsrc_base_init): * sys/ximagesrc/ximagesrc.c: Define GstElementDetails as const and also static (when defined as global) --- sys/directdraw/gstdirectdrawsink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index 2f837496..237ebb9b 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -35,7 +35,7 @@ GST_DEBUG_CATEGORY_STATIC (directdrawsink_debug); #define GST_CAT_DEFAULT directdrawsink_debug /* elementfactory information */ -static GstElementDetails gst_directdrawsink_details = +static const GstElementDetails gst_directdrawsink_details = GST_ELEMENT_DETAILS ("Video Sink (DIRECTDRAW)", "Sink/Video", "Output to a video card via DIRECTDRAW", -- cgit v1.2.1 From e191ec4eb4590ca37bf7a9bad7ead6e4b29855a9 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Thu, 1 Jun 2006 22:00:26 +0000 Subject: [MOVED FROM GOOD] Fix more gobject macros: obj<->klass, GstXXX<->GstXXXClass Original commit message from CVS: * ext/alsaspdif/alsaspdifsink.h: * ext/amrwb/gstamrwbdec.h: * ext/amrwb/gstamrwbenc.h: * ext/amrwb/gstamrwbparse.h: * ext/arts/gst_arts.h: * ext/artsd/gstartsdsink.h: * ext/audiofile/gstafparse.h: * ext/audiofile/gstafsink.h: * ext/audiofile/gstafsrc.h: * ext/audioresample/gstaudioresample.h: * ext/bz2/gstbz2dec.h: * ext/bz2/gstbz2enc.h: * ext/dirac/gstdiracdec.h: * ext/directfb/dfbvideosink.h: * ext/divx/gstdivxdec.h: * ext/divx/gstdivxenc.h: * ext/dts/gstdtsdec.h: * ext/faac/gstfaac.h: * ext/gsm/gstgsmdec.h: * ext/gsm/gstgsmenc.h: * ext/ivorbis/vorbisenc.h: * ext/libfame/gstlibfame.h: * ext/nas/nassink.h: * ext/neon/gstneonhttpsrc.h: * ext/polyp/polypsink.h: * ext/sdl/sdlaudiosink.h: * ext/sdl/sdlvideosink.h: * ext/shout/gstshout.h: * ext/snapshot/gstsnapshot.h: * ext/sndfile/gstsf.h: * ext/swfdec/gstswfdec.h: * ext/tarkin/gsttarkindec.h: * ext/tarkin/gsttarkinenc.h: * ext/theora/theoradec.h: * ext/wavpack/gstwavpackdec.h: * ext/wavpack/gstwavpackparse.h: * ext/xine/gstxine.h: * ext/xvid/gstxviddec.h: * ext/xvid/gstxvidenc.h: * gst/cdxaparse/gstcdxaparse.h: * gst/cdxaparse/gstcdxastrip.h: * gst/colorspace/gstcolorspace.h: * gst/festival/gstfestival.h: * gst/freeze/gstfreeze.h: * gst/gdp/gstgdpdepay.h: * gst/gdp/gstgdppay.h: * gst/modplug/gstmodplug.h: * gst/mpeg1sys/gstmpeg1systemencode.h: * gst/mpeg1videoparse/gstmp1videoparse.h: * gst/mpeg2sub/gstmpeg2subt.h: * gst/mpegaudioparse/gstmpegaudioparse.h: * gst/multifilesink/gstmultifilesink.h: * gst/overlay/gstoverlay.h: * gst/playondemand/gstplayondemand.h: * gst/qtdemux/qtdemux.h: * gst/rtjpeg/gstrtjpegdec.h: * gst/rtjpeg/gstrtjpegenc.h: * gst/smooth/gstsmooth.h: * gst/smoothwave/gstsmoothwave.h: * gst/spectrum/gstspectrum.h: * gst/speed/gstspeed.h: * gst/stereo/gststereo.h: * gst/switch/gstswitch.h: * gst/tta/gstttadec.h: * gst/tta/gstttaparse.h: * gst/videodrop/gstvideodrop.h: * gst/xingheader/gstxingmux.h: * sys/directdraw/gstdirectdrawsink.h: * sys/directsound/gstdirectsoundsink.h: * sys/dxr3/dxr3audiosink.h: * sys/dxr3/dxr3spusink.h: * sys/dxr3/dxr3videosink.h: * sys/qcam/gstqcamsrc.h: * sys/vcd/vcdsrc.h: Fix more gobject macros: obj<->klass, GstXXX<->GstXXXClass --- sys/directdraw/gstdirectdrawsink.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/directdraw/gstdirectdrawsink.h b/sys/directdraw/gstdirectdrawsink.h index c144f646..39d879eb 100644 --- a/sys/directdraw/gstdirectdrawsink.h +++ b/sys/directdraw/gstdirectdrawsink.h @@ -32,11 +32,11 @@ #include G_BEGIN_DECLS -#define GST_TYPE_DIRECTDRAW_SINK (gst_directdrawsink_get_type()) -#define GST_DIRECTDRAW_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DIRECTDRAW_SINK,GstDirectDrawSink)) -#define GST_DIRECTDRAW_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DIRECTDRAW_SINK,GstDirectDrawSinkClass)) -#define GST_IS_DIRECTDRAW_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DIRECTDRAW_SINK)) -#define GST_IS_DIRECTDRAW_SINK_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DIRECTDRAW_SINK)) +#define GST_TYPE_DIRECTDRAW_SINK (gst_directdrawsink_get_type()) +#define GST_DIRECTDRAW_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DIRECTDRAW_SINK,GstDirectDrawSink)) +#define GST_DIRECTDRAW_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DIRECTDRAW_SINK,GstDirectDrawSinkClass)) +#define GST_IS_DIRECTDRAW_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DIRECTDRAW_SINK)) +#define GST_IS_DIRECTDRAW_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DIRECTDRAW_SINK)) typedef struct _GstDirectDrawSink GstDirectDrawSink; typedef struct _GstDirectDrawSinkClass GstDirectDrawSinkClass; -- cgit v1.2.1 From 21c22dffd96ad9fe6fd62d44cfc91235932b6234 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Mon, 12 Jun 2006 10:53:26 +0000 Subject: [MOVED FROM GOOD] ext/libmms/gstmms.c: Set caps on outgoing buffers. Original commit message from CVS: * ext/libmms/gstmms.c: (gst_mms_create): Set caps on outgoing buffers. * sys/directdraw/gstdirectdrawsink.c: (gst_directdrawsink_init): Comment out unused global instance variable. --- sys/directdraw/gstdirectdrawsink.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index 237ebb9b..58a04c1b 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -334,7 +334,9 @@ gst_ddrawsurface_get_type (void) return _gst_ddrawsurface_type; } -static GstDirectDrawSink *global_ddrawsink = NULL; +/* FIXME: this is problematic if there is more than one sink instance at the + * same time, surely there exists a better solution than this? */ +/* static GstDirectDrawSink *global_ddrawsink = NULL; */ /*GType gst_directdrawsink_get_type (void) @@ -513,7 +515,7 @@ gst_directdrawsink_init (GstDirectDrawSink * ddrawsink, ddrawsink->buffer_pool = NULL; ddrawsink->resize_window = TRUE; /*resize only our internal window to the video size */ - global_ddrawsink = ddrawsink; + /* global_ddrawsink = ddrawsink; */ ddrawsink->pool_lock = g_mutex_new (); } -- cgit v1.2.1 From 622a56c9372c52835c3ebcaae8f939d9a87f3a5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Moutte?= Date: Mon, 24 Jul 2006 21:43:06 +0000 Subject: [MOVED FROM GOOD] sys/directsound/gstdirectsoundsink.*: Add an attenuation property that will directly attenuate the directsound buffer. Original commit message from CVS: * sys/directsound/gstdirectsoundsink.h: * sys/directsound/gstdirectsoundsink.c: Add an attenuation property that will directly attenuate the directsound buffer. Change the size of the directsound secondary buffer to a half second. Add more debug logs. Add a lock to protect dsound buffer write access. Fix a bad implementation of reset. * sys/directsound/gstdirectdrawsink.c: * sys/directsound/gstdirectdrawsink.h: Add a keep_aspect_ratio property. Do not use overlay if not supported. Add more debug logs. Remove overwrite of WM_ERASEBKGND message handling. It was not redrawing border when keep_aspect_ratio was enabled. * win32/common/config.h: update version waiting an auto-generated config.h --- sys/directdraw/gstdirectdrawsink.c | 231 +++++++++++++++++++++++-------------- sys/directdraw/gstdirectdrawsink.h | 13 ++- 2 files changed, 157 insertions(+), 87 deletions(-) diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index 58a04c1b..fbccb80d 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -41,15 +41,8 @@ GST_ELEMENT_DETAILS ("Video Sink (DIRECTDRAW)", "Output to a video card via DIRECTDRAW", "Sebastien Moutte "); -static void -_do_init (GType directdrawsink_type) -{ - GST_DEBUG_CATEGORY_INIT (directdrawsink_debug, "directdrawsink", 0, - "Direct draw sink"); -} - -GST_BOILERPLATE_FULL (GstDirectDrawSink, gst_directdrawsink, GstVideoSink, - GST_TYPE_VIDEO_SINK, _do_init); +GST_BOILERPLATE (GstDirectDrawSink, gst_directdrawsink, GstVideoSink, + GST_TYPE_VIDEO_SINK); static void gst_directdrawsink_finalize (GObject * object); @@ -122,7 +115,8 @@ enum PROP_0, PROP_SURFACE, PROP_WINDOW, - PROP_FULLSCREEN + PROP_FULLSCREEN, + PROP_KEEP_ASPECT_RATIO }; /* Utility functions */ @@ -164,7 +158,8 @@ gst_ddrawvideosink_get_format_from_caps (GstCaps * caps, ret &= gst_structure_get_fourcc (structure, "format", &fourcc); pPixelFormat->dwFourCC = fourcc; } else { - GST_WARNING ("unknown caps name received %" GST_PTR_FORMAT, caps); + GST_CAT_WARNING (directdrawsink_debug, + "unknown caps name received %" GST_PTR_FORMAT, caps); ret = FALSE; } @@ -243,9 +238,11 @@ gst_directdrawsink_center_rect (RECT src, RECT dst, RECT * result) memcpy (result, &dst, sizeof (RECT)); } - GST_DEBUG ("source is %dx%d dest is %dx%d, result is %dx%d with x,y %dx%d", - src_width, src_height, dst_width, dst_heigth, result_width, result_height, - result->left, result->right); + GST_CAT_INFO (directdrawsink_debug, + "source is %dx%d dest is %dx%d, result is %dx%d with x,y %dx%d", + src_width, src_height, dst_width, dst_heigth, + result->right - result->left, result->bottom - result->top, result->left, + result->right); } /*subclass of GstBuffer which manages surfaces lifetime*/ @@ -266,14 +263,15 @@ gst_ddrawsurface_finalize (GstDDrawSurface * surface) (memcmp (&surface->dd_pixel_format, &ddrawsink->dd_pixel_format, sizeof (DDPIXELFORMAT)) != 0) ) { - GST_DEBUG ("destroy image as its size changed %dx%d vs current %dx%d", - surface->width, surface->height, - ddrawsink->video_width, ddrawsink->video_height); + GST_CAT_INFO (directdrawsink_debug, + "destroy image as its size changed %dx%d vs current %dx%d", + surface->width, surface->height, ddrawsink->video_width, + ddrawsink->video_height); gst_directdrawsink_surface_destroy (ddrawsink, surface); } else { /* In that case we can reuse the image and add it to our image pool. */ - GST_DEBUG ("recycling image in pool"); + GST_CAT_INFO (directdrawsink_debug, "recycling image in pool"); /* need to increment the refcount again to recycle */ gst_buffer_ref (GST_BUFFER (surface)); @@ -285,7 +283,7 @@ gst_ddrawsurface_finalize (GstDDrawSurface * surface) return; no_sink: - GST_WARNING ("no sink found"); + GST_CAT_WARNING (directdrawsink_debug, "no sink found"); return; } @@ -386,6 +384,9 @@ gst_directdrawsink_class_init (GstDirectDrawSinkClass * klass) gstbasesink_class = (GstBaseSinkClass *) klass; gstelement_class = (GstElementClass *) klass; + GST_DEBUG_CATEGORY_INIT (directdrawsink_debug, "directdrawsink", 0, + "Direct draw sink"); + gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_directdrawsink_finalize); gobject_class->get_property = @@ -422,6 +423,12 @@ gst_directdrawsink_class_init (GstDirectDrawSinkClass * klass) g_param_spec_pointer ("surface", "Surface", "The target surface for video", G_PARAM_WRITABLE)); + /*setup aspect ratio mode */ + g_object_class_install_property (G_OBJECT_CLASS (klass), + PROP_KEEP_ASPECT_RATIO, g_param_spec_boolean ("keep-aspect-ratio", + "keep-aspect-ratio", "boolean to video keep aspect ratio", FALSE, + G_PARAM_READWRITE)); + /*should add a color_key property to permit applications to define the color used for overlays */ } @@ -442,8 +449,10 @@ gst_directdrawsink_set_property (GObject * object, guint prop_id, ddrawsink->resize_window = FALSE; break; case PROP_FULLSCREEN: - if (g_value_get_boolean (value)) - ddrawsink->bFullScreen = TRUE; + /*ddrawsink->fullscreen = g_value_get_boolean (value); not working .... */ + break; + case PROP_KEEP_ASPECT_RATIO: + ddrawsink->keep_aspect_ratio = g_value_get_boolean (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); @@ -460,6 +469,12 @@ gst_directdrawsink_get_property (GObject * object, guint prop_id, ddrawsink = GST_DIRECTDRAW_SINK (object); switch (prop_id) { + case PROP_FULLSCREEN: + g_value_set_boolean (value, ddrawsink->fullscreen); + break; + case PROP_KEEP_ASPECT_RATIO: + g_value_set_boolean (value, ddrawsink->keep_aspect_ratio); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -505,19 +520,21 @@ gst_directdrawsink_init (GstDirectDrawSink * ddrawsink, ddrawsink->window_thread = NULL; - ddrawsink->bUseOverlay = TRUE; + ddrawsink->bUseOverlay = FALSE; ddrawsink->color_key = 0; /*need to be a public property and may be we can enable overlays when this property is set ... */ - ddrawsink->bFullScreen = FALSE; + ddrawsink->fullscreen = FALSE; ddrawsink->setup = FALSE; ddrawsink->display_modes = NULL; ddrawsink->buffer_pool = NULL; ddrawsink->resize_window = TRUE; /*resize only our internal window to the video size */ - /* global_ddrawsink = ddrawsink; */ ddrawsink->pool_lock = g_mutex_new (); + + ddrawsink->keep_aspect_ratio = TRUE; +/* ddrawsink->can_blit = TRUE;*/ } static GstCaps * @@ -532,8 +549,9 @@ gst_directdrawsink_get_caps (GstBaseSink * bsink) caps = gst_caps_copy (gst_pad_get_pad_template_caps (GST_VIDEO_SINK_PAD (ddrawsink))); - GST_DEBUG ("getcaps called and we are not setup yet, " - "returning template %" GST_PTR_FORMAT, caps); + GST_CAT_INFO (directdrawsink_debug, + "getcaps called and we are not setup yet, " "returning template %" + GST_PTR_FORMAT, caps); } else { /*if (ddrawsink->extern_surface) { * We are not rendering to our own surface, returning this surface's @@ -587,10 +605,25 @@ gst_directdrawsink_set_caps (GstBaseSink * bsink, GstCaps * caps) (GetSystemMetrics (SM_CYSIZEFRAME) * 2), SWP_SHOWWINDOW | SWP_NOMOVE); } - /*create overlays flipping chain and an offscreen surface */ - gst_directdrawsink_create_ddraw_surfaces (ddrawsink); + /*create overlays flipping chain */ + ret = gst_directdrawsink_create_ddraw_surfaces (ddrawsink); + if (!ret && ddrawsink->bUseOverlay) { + GST_CAT_WARNING (directdrawsink_debug, + "Can not create overlay surface, reverting to no overlay display"); + ddrawsink->bUseOverlay = FALSE; + ret = gst_directdrawsink_create_ddraw_surfaces (ddrawsink); + if (ret) { + return TRUE; + } - return TRUE; + /*could not create draw surfaces even with fallback, so leave + everything as is */ + ddrawsink->bUseOverlay = TRUE; + } + if (!ret) { + GST_CAT_ERROR (directdrawsink_debug, "Can not create ddraw surface"); + } + return ret; } static GstStateChangeReturn @@ -603,8 +636,6 @@ gst_directdrawsink_change_state (GstElement * element, switch (transition) { case GST_STATE_CHANGE_NULL_TO_READY: - GST_DEBUG ("GST_STATE_CHANGE_NULL_TO_READY\n"); - if (ddrawsink->video_window == NULL && ddrawsink->extern_surface == NULL) if (!gst_directdrawsink_create_default_window (ddrawsink)) return GST_STATE_CHANGE_FAILURE; @@ -617,16 +648,12 @@ gst_directdrawsink_change_state (GstElement * element, break; case GST_STATE_CHANGE_READY_TO_PAUSED: - GST_DEBUG ("GST_STATE_CHANGE_READY_TO_PAUSED\n"); break; case GST_STATE_CHANGE_PAUSED_TO_PLAYING: - GST_DEBUG ("GST_STATE_CHANGE_PAUSED_TO_PLAYING\n"); break; case GST_STATE_CHANGE_PLAYING_TO_PAUSED: - GST_DEBUG ("GST_STATE_CHANGE_PLAYING_TO_PAUSED\n"); break; case GST_STATE_CHANGE_PAUSED_TO_READY: - GST_DEBUG ("GST_STATE_CHANGE_PAUSED_TO_READY\n"); ddrawsink->fps_n = 0; ddrawsink->fps_d = 1; @@ -638,7 +665,6 @@ gst_directdrawsink_change_state (GstElement * element, break; case GST_STATE_CHANGE_READY_TO_NULL: - GST_DEBUG ("GST_STATE_CHANGE_READY_TO_NULL\n"); if (ddrawsink->setup) gst_directdrawsink_cleanup (ddrawsink); @@ -863,7 +889,6 @@ DDErrorString (HRESULT hr) } -static gint gtempcpt = 0; static GstFlowReturn gst_directdrawsink_buffer_alloc (GstBaseSink * bsink, guint64 offset, guint size, GstCaps * caps, GstBuffer ** buf) @@ -874,7 +899,8 @@ gst_directdrawsink_buffer_alloc (GstBaseSink * bsink, guint64 offset, GstFlowReturn ret = GST_FLOW_OK; ddrawsink = GST_DIRECTDRAW_SINK (bsink); - GST_DEBUG ("a buffer of %d bytes was requested", size); + GST_CAT_INFO (directdrawsink_debug, "a buffer of %d bytes was requested", + size); structure = gst_caps_get_structure (caps, 0); @@ -907,7 +933,6 @@ gst_directdrawsink_buffer_alloc (GstBaseSink * bsink, guint64 offset, /* We haven't found anything, creating a new one */ if (!surface) { surface = gst_directdrawsink_surface_create (ddrawsink, caps, size); - gtempcpt++; } /* Now we should have a surface, set appropriate caps on it */ @@ -971,11 +996,13 @@ gst_directdrawsink_show_overlay (GstDirectDrawSink * ddrawsink) OffsetRect (&destsurf_rect, dest_surf_point.x, dest_surf_point.y); } - src_rect.top = 0; - src_rect.left = 0; - src_rect.bottom = ddrawsink->video_height; - src_rect.right = ddrawsink->video_width; - gst_directdrawsink_center_rect (src_rect, destsurf_rect, &destsurf_rect); + if (ddrawsink->keep_aspect_ratio) { + src_rect.top = 0; + src_rect.left = 0; + src_rect.bottom = ddrawsink->video_height; + src_rect.right = ddrawsink->video_width; + gst_directdrawsink_center_rect (src_rect, destsurf_rect, &destsurf_rect); + } gst_directdrawsink_fill_colorkey (surface, ddrawsink->color_key); @@ -1014,11 +1041,14 @@ gst_directdrawsink_show_frame (GstBaseSink * bsink, GstBuffer * buf) OffsetRect (&destsurf_rect, dest_surf_point.x, dest_surf_point.y); } - src_rect.top = 0; - src_rect.left = 0; - src_rect.bottom = ddrawsink->video_height; - src_rect.right = ddrawsink->video_width; - gst_directdrawsink_center_rect (src_rect, destsurf_rect, &destsurf_rect); + if (ddrawsink->keep_aspect_ratio) { + /*center image to dest image keeping aspect ratio */ + src_rect.top = 0; + src_rect.left = 0; + src_rect.bottom = ddrawsink->video_height; + src_rect.right = ddrawsink->video_width; + gst_directdrawsink_center_rect (src_rect, destsurf_rect, &destsurf_rect); + } if (ddrawsink->bUseOverlay) { /*get the back buffer of the overlays flipping chain */ @@ -1054,7 +1084,8 @@ gst_directdrawsink_show_frame (GstBaseSink * bsink, GstBuffer * buf) IDirectDrawSurface_Lock (lpSurface, NULL, &surf_desc, DDLOCK_WAIT, NULL); if (hRes != DD_OK) { - GST_DEBUG ("gst_directdrawsink_show_frame failed locking surface %s", + GST_CAT_WARNING (directdrawsink_debug, + "gst_directdrawsink_show_frame failed locking surface %s", DDErrorString (hRes)); return GST_FLOW_ERROR; } @@ -1074,7 +1105,8 @@ gst_directdrawsink_show_frame (GstBaseSink * bsink, GstBuffer * buf) /* Unlock the surface */ hRes = IDirectDrawSurface_Unlock (lpSurface, NULL); if (hRes != DD_OK) { - GST_DEBUG ("gst_directdrawsink_show_frame failed unlocking surface %s", + GST_CAT_WARNING (directdrawsink_debug, + "gst_directdrawsink_show_frame failed unlocking surface %s", DDErrorString (hRes)); return GST_FLOW_ERROR; } @@ -1128,7 +1160,7 @@ gst_directdrawsink_show_frame (GstBaseSink * bsink, GstBuffer * buf) hRes = IDirectDrawSurface_Flip (ddrawsink->overlays, NULL, DDFLIP_WAIT); if (hRes != DD_OK) - GST_WARNING ("error flipping"); + GST_CAT_WARNING (directdrawsink_debug, "error flipping"); } else { if (ddrawsink->extern_surface) { @@ -1151,7 +1183,11 @@ gst_directdrawsink_show_frame (GstBaseSink * bsink, GstBuffer * buf) IDirectDrawSurface_Blt (ddrawsink->primary_surface, &destsurf_rect, surface->surface, NULL, DDBLT_WAIT, NULL); if (hRes != DD_OK) - GST_WARNING ("IDirectDrawSurface_Blt returned %s", + GST_CAT_WARNING (directdrawsink_debug, + "IDirectDrawSurface_Blt returned %s", DDErrorString (hRes)); + else + GST_CAT_INFO (directdrawsink_debug, + "allocated surface was blit to our primary", DDErrorString (hRes)); } } @@ -1171,27 +1207,43 @@ gst_directdrawsink_setup_ddraw (GstDirectDrawSink * ddrawsink) DWORD dwCooperativeLevel; DDSURFACEDESC dd_surface_desc; - /*create an instance of the ddraw object */ + /*UUID IDirectDraw7_ID; + + //IDirectDraw_QueryInterface() + /*create an instance of the ddraw object + hRes = DirectDrawCreateEx (DDCREATE_EMULATIONONLY, (void**)&ddrawsink->ddraw_object, + (REFIID)IID_IDirectDraw7, NULL); + */ hRes = DirectDrawCreate (NULL, &ddrawsink->ddraw_object, NULL); - if (hRes != DD_OK || ddrawsink->ddraw_object == NULL) + if (hRes != DD_OK || ddrawsink->ddraw_object == NULL) { + GST_CAT_ERROR (directdrawsink_debug, "DirectDrawCreate failed with: %s", + DDErrorString (hRes)); return FALSE; + } + /*get ddraw caps for the current hardware */ +/* ddrawsink->DDDriverCaps.dwSize = sizeof (DDCAPS); + ddrawsink->DDHELCaps.dwSize = sizeof (DDCAPS); + hRes = IDirectDraw_GetCaps (ddrawsink->ddraw_object, &ddrawsink->DDDriverCaps, &ddrawsink->DDHELCaps); +*/ /*set cooperative level */ - if (ddrawsink->bFullScreen) + if (ddrawsink->fullscreen) dwCooperativeLevel = DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN; else dwCooperativeLevel = DDSCL_NORMAL; hRes = IDirectDraw_SetCooperativeLevel (ddrawsink->ddraw_object, ddrawsink->video_window, dwCooperativeLevel); - if (hRes != DD_OK) + if (hRes != DD_OK) { + GST_CAT_ERROR (directdrawsink_debug, "SetCooperativeLevel failed with: %s", + DDErrorString (hRes)); bRet = FALSE; + } /*for fullscreen mode, setup display mode */ -/* if (ddrawsink->bFullScreen) { - hRes = IDirectDraw_SetDisplayMode (ddrawsink->ddraw_object, 640, 480, 32); + if (ddrawsink->fullscreen) { + hRes = IDirectDraw_SetDisplayMode (ddrawsink->ddraw_object, 1440, 900, 32); } - */ if (!ddrawsink->extern_surface) { /*create our primary surface */ @@ -1202,15 +1254,11 @@ gst_directdrawsink_setup_ddraw (GstDirectDrawSink * ddrawsink) hRes = IDirectDraw_CreateSurface (ddrawsink->ddraw_object, &dd_surface_desc, &ddrawsink->primary_surface, NULL); - if (hRes != DD_OK) - bRet = FALSE; - - if (bRet == FALSE) { - if (ddrawsink->ddraw_object) { - IDirectDraw_Release (ddrawsink->ddraw_object); - GST_DEBUG ("CreateSurface failed with: %s", DDErrorString (hRes)); - return FALSE; - } + if (hRes != DD_OK) { + GST_CAT_ERROR (directdrawsink_debug, + "CreateSurface (primary) failed with: %s", DDErrorString (hRes)); + IDirectDraw_Release (ddrawsink->ddraw_object); + return FALSE; } hRes = IDirectDraw_CreateClipper (ddrawsink->ddraw_object, 0, @@ -1221,6 +1269,7 @@ gst_directdrawsink_setup_ddraw (GstDirectDrawSink * ddrawsink) hRes = IDirectDrawSurface_SetClipper (ddrawsink->primary_surface, ddrawsink->clipper); } + } else { DDSURFACEDESC desc_surface; @@ -1243,6 +1292,9 @@ gst_directdrawsink_setup_ddraw (GstDirectDrawSink * ddrawsink) &ddrawsink->dd_pixel_format); if (hRes != DD_OK) { /*error while retrieving ext surface pixel format */ + GST_CAT_WARNING (directdrawsink_debug, + "GetPixelFormat (ddrawsink->extern_surface) failed with: %s", + DDErrorString (hRes)); return FALSE; } @@ -1258,8 +1310,8 @@ long FAR PASCAL WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { - case WM_ERASEBKGND: - return TRUE; + /*case WM_ERASEBKGND: + return TRUE; */ /* case WM_WINDOWPOSCHANGED: case WM_MOVE: case WM_SIZE: @@ -1367,18 +1419,24 @@ gst_directdrawsink_create_ddraw_surfaces (GstDirectDrawSink * ddrawsink) &ddrawsink->overlays, NULL); if (hRes != DD_OK) { - GST_DEBUG ("create_ddraw_surfaces:CreateSurface(overlays) failed %s", + GST_CAT_WARNING (directdrawsink_debug, + "create_ddraw_surfaces:CreateSurface(overlays) failed %s", DDErrorString (hRes)); return FALSE; + } else { + GST_CAT_INFO (directdrawsink_debug, + "An overlay surfaces flipping chain was created"); } } else { - dd_surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; + dd_surface_desc.ddsCaps.dwCaps = + DDSCAPS_OFFSCREENPLAIN /*|DDSCAPS_SYSTEMMEMORY */ ; hRes = IDirectDraw_CreateSurface (ddrawsink->ddraw_object, &dd_surface_desc, &ddrawsink->offscreen_surface, NULL); if (hRes != DD_OK) { - GST_DEBUG ("create_ddraw_surfaces:CreateSurface(offscreen) failed %s", + GST_CAT_WARNING (directdrawsink_debug, + "create_ddraw_surfaces:CreateSurface(offscreen) failed %s", DDErrorString (hRes)); return FALSE; } @@ -1434,7 +1492,8 @@ EnumModesCallback2 (LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext) return DDENUMRET_CANCEL; if ((lpDDSurfaceDesc->dwFlags & DDSD_PIXELFORMAT) != DDSD_PIXELFORMAT) { - GST_DEBUG ("Display mode found with DDSD_PIXELFORMAT not set"); + GST_CAT_INFO (directdrawsink_debug, + "Display mode found with DDSD_PIXELFORMAT not set"); return DDENUMRET_OK; } @@ -1478,7 +1537,8 @@ gst_directdrawsink_get_ddrawcaps (GstDirectDrawSink * ddrawsink) IDirectDraw_EnumDisplayModes (ddrawsink->ddraw_object, DDEDM_REFRESHRATES, NULL, ddrawsink, EnumModesCallback2); if (hRes != DD_OK) { - GST_DEBUG ("EnumDisplayModes returns: %s", DDErrorString (hRes)); + GST_CAT_WARNING (directdrawsink_debug, "EnumDisplayModes returns: %s", + DDErrorString (hRes)); return FALSE; } @@ -1575,7 +1635,8 @@ gst_directdrawsink_surface_create (GstDirectDrawSink * ddrawsink, /* Creating an internal surface which will be used as GstBuffer, we used the detected pixel format and video dimensions */ - surf_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; + surf_desc.ddsCaps.dwCaps = + DDSCAPS_OFFSCREENPLAIN /* | DDSCAPS_SYSTEMMEMORY */ ; surf_desc.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT | DDSD_PITCH; surf_desc.dwHeight = surface->height; @@ -1587,9 +1648,10 @@ gst_directdrawsink_surface_create (GstDirectDrawSink * ddrawsink, hRes = IDirectDraw_CreateSurface (ddrawsink->ddraw_object, &surf_desc, &surface->surface, NULL); if (hRes != DD_OK) { - gst_object_unref (surface); - surface = NULL; - goto beach; + /*gst_object_unref (surface); + surface = NULL; + goto beach; */ + goto surface_pitch_bad; } /* Locking the surface to acquire the memory pointer. @@ -1600,8 +1662,8 @@ gst_directdrawsink_surface_create (GstDirectDrawSink * ddrawsink, surface->locked = TRUE; if (surf_lock_desc.lPitch != pitch) { - GST_DEBUG - ("DDraw stride/pitch %d isn't as expected value %d, let's continue allocating buffer.", + GST_CAT_INFO (directdrawsink_debug, + "DDraw stride/pitch %d isn't as expected value %d, let's continue allocating buffer.", surf_lock_desc.lPitch, pitch); /*Unlock the surface as we will change it to use system memory with a GStreamer compatible pitch */ @@ -1609,7 +1671,8 @@ gst_directdrawsink_surface_create (GstDirectDrawSink * ddrawsink, goto surface_pitch_bad; } - GST_DEBUG ("allocating a surface of %d bytes (stride=%d)\n", size, + GST_CAT_INFO (directdrawsink_debug, + "allocating a surface of %d bytes (stride=%d)\n", size, surf_lock_desc.lPitch); GST_BUFFER_DATA (surface) = surf_lock_desc.lpSurface; GST_BUFFER_SIZE (surface) = surf_lock_desc.lPitch * surface->height; @@ -1633,7 +1696,7 @@ gst_directdrawsink_surface_create (GstDirectDrawSink * ddrawsink, DDLOCK_WAIT | DDLOCK_NOSYSLOCK, NULL); */ surface->surface = NULL; - printf ("allocating a buffer of %d bytes\n", size); + /*printf ("allocating a buffer of %d bytes\n", size); */ } /* Keep a ref to our sink */ diff --git a/sys/directdraw/gstdirectdrawsink.h b/sys/directdraw/gstdirectdrawsink.h index 39d879eb..f11c95ec 100644 --- a/sys/directdraw/gstdirectdrawsink.h +++ b/sys/directdraw/gstdirectdrawsink.h @@ -93,8 +93,11 @@ struct _GstDirectDrawSink LPDIRECTDRAWSURFACE primary_surface; LPDIRECTDRAWSURFACE offscreen_surface; LPDIRECTDRAWSURFACE overlays; - LPDIRECTDRAWCLIPPER clipper; - LPDIRECTDRAWSURFACE extern_surface; + LPDIRECTDRAWCLIPPER clipper; + + /*DDCAPS DDDriverCaps; + DDCAPS DDHELCaps; + gboolean can_blit;*/ /*Directdraw caps */ GstCaps *caps; @@ -110,6 +113,11 @@ struct _GstDirectDrawSink gint fps_n; gint fps_d; + /*properties*/ + LPDIRECTDRAWSURFACE extern_surface; + gboolean keep_aspect_ratio; + gboolean fullscreen; + /*pixel format */ DDPIXELFORMAT dd_pixel_format; @@ -117,7 +125,6 @@ struct _GstDirectDrawSink gboolean bUseOverlay; gboolean bIsOverlayVisible; - gboolean bFullScreen; gboolean setup; GMutex *pool_lock; -- cgit v1.2.1 From c807b70709f6bc292bfc6b4a3f6a098bf006fe44 Mon Sep 17 00:00:00 2001 From: Sergey Scobich Date: Wed, 1 Nov 2006 10:19:18 +0000 Subject: [MOVED FROM GOOD] sys/: Wait until the window is created before using it; guard unistd.h includes with HAVE_UNISTD_H. (#366523) Original commit message from CVS: Patch by: Sergey Scobich * sys/directdraw/gstdirectdrawsink.c: (gst_directdrawsink_window_thread), (gst_directdrawsink_create_default_window): * sys/directdraw/gstdirectdrawsink.h: * sys/directsound/gstdirectsoundsink.c: Wait until the window is created before using it; guard unistd.h includes with HAVE_UNISTD_H. (#366523) * win32/vs8/libgstdirectdraw.vcproj: * win32/vs8/libgstdirectsound.vcproj: Update project files. --- sys/directdraw/gstdirectdrawsink.c | 20 ++++++++++++++++++-- sys/directdraw/gstdirectdrawsink.h | 1 + 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index fbccb80d..ec449c7d 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -28,7 +28,9 @@ #include #include +#ifdef HAVE_UNISTD_H #include +#endif #include GST_DEBUG_CATEGORY_STATIC (directdrawsink_debug); @@ -1366,6 +1368,8 @@ gst_directdrawsink_window_thread (GstDirectDrawSink * ddrawsink) if (ddrawsink->video_window == NULL) return FALSE; + ReleaseSemaphore (ddrawsink->window_created_signal, 1, NULL); + /*start message loop processing our default window messages */ while (1) { MSG msg; @@ -1381,15 +1385,27 @@ gst_directdrawsink_window_thread (GstDirectDrawSink * ddrawsink) static gboolean gst_directdrawsink_create_default_window (GstDirectDrawSink * ddrawsink) { + ddrawsink->window_created_signal = CreateSemaphore (NULL, 0, 1, NULL); + if (ddrawsink->window_created_signal == NULL) + return FALSE; + ddrawsink->window_thread = g_thread_create ( (GThreadFunc) gst_directdrawsink_window_thread, ddrawsink, TRUE, NULL); if (ddrawsink->window_thread == NULL) - return FALSE; + goto failed; - /*TODO:wait for the window to be created with timeout */ + /* wait maximum 10 seconds for windows creating */ + if (WaitForSingleObject (ddrawsink->window_created_signal, + 10000) != WAIT_OBJECT_0) + goto failed; + CloseHandle (ddrawsink->window_created_signal); return TRUE; + +failed: + CloseHandle (ddrawsink->window_created_signal); + return FALSE; } static gboolean diff --git a/sys/directdraw/gstdirectdrawsink.h b/sys/directdraw/gstdirectdrawsink.h index f11c95ec..f9d4c865 100644 --- a/sys/directdraw/gstdirectdrawsink.h +++ b/sys/directdraw/gstdirectdrawsink.h @@ -104,6 +104,7 @@ struct _GstDirectDrawSink /*handle of the video window */ HWND video_window; + HANDLE window_created_signal; gboolean resize_window; /*video properties */ -- cgit v1.2.1 From 7a8bf9900c7c010d9fdd3ef6d29bdfa69e6986e9 Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Wed, 3 Jan 2007 19:54:33 +0000 Subject: [MOVED FROM GOOD] Add directdrawsink to build and dist it, so it gets built when compiling with MingW on win32 and the required headers... Original commit message from CVS: Patch by: Vincent Torri * configure.ac: * sys/Makefile.am: * sys/directdraw/Makefile.am: Add directdrawsink to build and dist it, so it gets built when compiling with MingW on win32 and the required headers and libraries are available (fixes: #392313). * sys/directdraw/gstdirectdrawsink.c: (gst_directdrawsink_center_rect), (gst_directdrawsink_show_frame), (gst_directdrawsink_setup_ddraw), (gst_directdrawsink_surface_create): Comment out some unused things and fix some printf format issues in order to avoid warnings when buildling with MingW (#392313). --- sys/directdraw/Makefile.am | 9 +++++++++ sys/directdraw/gstdirectdrawsink.c | 17 ++++++++++------- 2 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 sys/directdraw/Makefile.am diff --git a/sys/directdraw/Makefile.am b/sys/directdraw/Makefile.am new file mode 100644 index 00000000..999f026e --- /dev/null +++ b/sys/directdraw/Makefile.am @@ -0,0 +1,9 @@ +plugin_LTLIBRARIES = libgstdirectdrawsink.la + +libgstdirectdrawsink_la_SOURCES = gstdirectdrawsink.c gstdirectdrawplugin.c +libgstdirectdrawsink_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) \ + $(GST_PLUGINS_BASE_CFLAGS) +libgstdirectdrawsink_la_LIBADD = $(DIRECTDRAW_LIBS) \ + $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) \ + -lgstinterfaces-$(GST_MAJORMINOR) +libgstdirectdrawsink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index ec449c7d..ff1d8de4 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -168,6 +168,7 @@ gst_ddrawvideosink_get_format_from_caps (GstCaps * caps, return ret; } +/* static GstCaps * gst_ddrawvideosink_get_caps_from_format (DDPIXELFORMAT pixel_format) { @@ -201,6 +202,7 @@ gst_ddrawvideosink_get_caps_from_format (DDPIXELFORMAT pixel_format) return caps; } +*/ static void gst_directdrawsink_center_rect (RECT src, RECT dst, RECT * result) @@ -241,7 +243,7 @@ gst_directdrawsink_center_rect (RECT src, RECT dst, RECT * result) } GST_CAT_INFO (directdrawsink_debug, - "source is %dx%d dest is %dx%d, result is %dx%d with x,y %dx%d", + "source is %ldx%ld dest is %ldx%ld, result is %ldx%ld with x,y %ldx%ld", src_width, src_height, dst_width, dst_heigth, result->right - result->left, result->bottom - result->top, result->left, result->right); @@ -1189,8 +1191,7 @@ gst_directdrawsink_show_frame (GstBaseSink * bsink, GstBuffer * buf) "IDirectDrawSurface_Blt returned %s", DDErrorString (hRes)); else GST_CAT_INFO (directdrawsink_debug, - "allocated surface was blit to our primary", - DDErrorString (hRes)); + "allocated surface was blit to our primary"); } } } @@ -1212,7 +1213,7 @@ gst_directdrawsink_setup_ddraw (GstDirectDrawSink * ddrawsink) /*UUID IDirectDraw7_ID; //IDirectDraw_QueryInterface() - /*create an instance of the ddraw object + create an instance of the ddraw object hRes = DirectDrawCreateEx (DDCREATE_EMULATIONONLY, (void**)&ddrawsink->ddraw_object, (REFIID)IID_IDirectDraw7, NULL); */ @@ -1679,7 +1680,7 @@ gst_directdrawsink_surface_create (GstDirectDrawSink * ddrawsink, if (surf_lock_desc.lPitch != pitch) { GST_CAT_INFO (directdrawsink_debug, - "DDraw stride/pitch %d isn't as expected value %d, let's continue allocating buffer.", + "DDraw stride/pitch %ld isn't as expected value %d, let's continue allocating buffer.", surf_lock_desc.lPitch, pitch); /*Unlock the surface as we will change it to use system memory with a GStreamer compatible pitch */ @@ -1688,7 +1689,7 @@ gst_directdrawsink_surface_create (GstDirectDrawSink * ddrawsink, } GST_CAT_INFO (directdrawsink_debug, - "allocating a surface of %d bytes (stride=%d)\n", size, + "allocating a surface of %d bytes (stride=%ld)\n", size, surf_lock_desc.lPitch); GST_BUFFER_DATA (surface) = surf_lock_desc.lpSurface; GST_BUFFER_SIZE (surface) = surf_lock_desc.lPitch * surface->height; @@ -1718,7 +1719,9 @@ gst_directdrawsink_surface_create (GstDirectDrawSink * ddrawsink, /* Keep a ref to our sink */ surface->ddrawsink = gst_object_ref (ddrawsink); -beach: + /* + beach: + */ return surface; } -- cgit v1.2.1 From 4dab9691c39ccf09da8ab487b0cd2a1e4101b951 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Moutte?= Date: Sun, 11 Feb 2007 15:26:49 +0000 Subject: [MOVED FROM GOOD] Makefile.am: Add win32 MANIFEST Original commit message from CVS: * Makefile.am: Add win32 MANIFEST * sys/directdraw/gstdirectdrawsink.c: * sys/directdraw/gstdirectdrawsink.h: Clear unused code and add comments. Remove yuv from template caps, it only supports RGB actually. Implement XOverlay interface and remove window and fullscreen properties. Add debug logs. Test for blit capabilities to return only the current colorspace if the hardware can't blit for one colorspace to another. * sys/directsound/gstdirectsoundsink.c: Add some debugs. * win32/MANIFEST: Add VS7 project files and solution. * win32/vs6/gst_plugins_bad.dsw: * win32/vs6/libgstdirectdraw.dsp: * win32/vs6/libgstdirectsound.dsp: * win32/vs6/libgstqtdemux.dsp: Update project files. --- sys/directdraw/gstdirectdrawsink.c | 584 +++++++++++++++++++++++-------------- sys/directdraw/gstdirectdrawsink.h | 54 ++-- 2 files changed, 385 insertions(+), 253 deletions(-) diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index ff1d8de4..099be4e9 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -20,6 +20,20 @@ * Boston, MA 02111-1307, USA. */ +/** + * SECTION:element-directdrawsink + * + * + * + * DirectdrawSink renders video frames to any win32 window. This element can receive + * a window ID from the application through the XOverlay interface and will then render + * video frames in this drawable. + * If no Window ID was provided by the application, the element will create its + * own internal window and render into it. + * + * + */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -43,8 +57,10 @@ GST_ELEMENT_DETAILS ("Video Sink (DIRECTDRAW)", "Output to a video card via DIRECTDRAW", "Sebastien Moutte "); -GST_BOILERPLATE (GstDirectDrawSink, gst_directdrawsink, GstVideoSink, - GST_TYPE_VIDEO_SINK); +static void gst_directdrawsink_init_interfaces (GType type); + +GST_BOILERPLATE_FULL (GstDirectDrawSink, gst_directdrawsink, GstVideoSink, + GST_TYPE_VIDEO_SINK, gst_directdrawsink_init_interfaces); static void gst_directdrawsink_finalize (GObject * object); @@ -60,15 +76,12 @@ static gboolean gst_directdrawsink_set_caps (GstBaseSink * bsink, static GstStateChangeReturn gst_directdrawsink_change_state (GstElement * element, GstStateChange transition); - static GstFlowReturn gst_directdrawsink_buffer_alloc (GstBaseSink * bsink, guint64 offset, guint size, GstCaps * caps, GstBuffer ** buf); - static void gst_directdrawsink_get_times (GstBaseSink * bsink, GstBuffer * buf, GstClockTime * start, GstClockTime * end); - static GstFlowReturn gst_directdrawsink_show_frame (GstBaseSink * bsink, GstBuffer * buf); @@ -84,8 +97,12 @@ static GstCaps *gst_directdrawsink_get_ddrawcaps (GstDirectDrawSink * static void gst_directdrawsink_cleanup (GstDirectDrawSink * ddrawsink); static void gst_directdrawsink_bufferpool_clear (GstDirectDrawSink * ddrawsink); +static void +gst_directdrawsink_ddraw_put (GstDirectDrawSink * ddrawsink, + GstDDrawSurface * surface); + -/*surfaces management functions*/ +/* surfaces management functions */ static void gst_directdrawsink_surface_destroy (GstDirectDrawSink * ddrawsink, GstDDrawSurface * surface); @@ -98,29 +115,99 @@ static GstStaticPadTemplate directdrawsink_sink_factory = GST_PAD_SINK, GST_PAD_ALWAYS, GST_STATIC_CAPS ("video/x-raw-rgb, " - "bpp = (int) { 8, 16, 24, 32 }, " - "depth = (int) { 0, 8, 16, 24, 32 }, " - "endianness = (int) LITTLE_ENDIAN, " "framerate = (fraction) [ 0, MAX ], " - "width = (int) [ 1, MAX ], " - "height = (int) [ 1, MAX ]" - "; " - "video/x-raw-yuv, " + "width = (int) [ 1, MAX ], " "height = (int) [ 1, MAX ]" +/* "; " + "video/x-raw-yuv, " "framerate = (fraction) [ 0, MAX ], " "width = (int) [ 1, MAX ], " "height = (int) [ 1, MAX ], " - "format = (fourcc) { YUY2, UYVY, YVU9, YV12, AYUV }") + "format = (fourcc) YV12" +*/ + ) ); enum { PROP_0, PROP_SURFACE, - PROP_WINDOW, - PROP_FULLSCREEN, PROP_KEEP_ASPECT_RATIO }; +/* interfaces stuff */ +static gboolean +gst_directdrawsink_interface_supported (GstImplementsInterface * iface, + GType type) +{ + g_assert (type == GST_TYPE_X_OVERLAY); + return TRUE; +} + +static void +gst_directdrawsink_interface_init (GstImplementsInterfaceClass * klass) +{ + klass->supported = gst_directdrawsink_interface_supported; +} + +static void +gst_directdrawsink_set_window_id (GstXOverlay * overlay, ULONG window_id) +{ + GstDirectDrawSink *ddrawsink = GST_DIRECTDRAW_SINK (overlay); + + /* check if we are already using this window id */ + if (ddrawsink->video_window == (HWND) window_id) + return; + + if (window_id) { + HRESULT hres; + + ddrawsink->video_window = (HWND) window_id; + ddrawsink->our_video_window = FALSE; + + if (ddrawsink->setup) { + /* update the clipper object with the new window */ + hres = IDirectDrawClipper_SetHWnd (ddrawsink->clipper, 0, + ddrawsink->video_window); + } + } +} + +static void +gst_directdrawsink_expose (GstXOverlay * overlay) +{ + GstDirectDrawSink *ddrawsink = GST_DIRECTDRAW_SINK (overlay); + + gst_directdrawsink_show_frame (GST_BASE_SINK (ddrawsink), NULL); +} + +static void +gst_directdrawsink_xoverlay_interface_init (GstXOverlayClass * iface) +{ + iface->set_xwindow_id = gst_directdrawsink_set_window_id; + iface->expose = gst_directdrawsink_expose; +} + +static void +gst_directdrawsink_init_interfaces (GType type) +{ + static const GInterfaceInfo iface_info = { + (GInterfaceInitFunc) gst_directdrawsink_interface_init, + NULL, + NULL, + }; + + static const GInterfaceInfo xoverlay_info = { + (GInterfaceInitFunc) gst_directdrawsink_xoverlay_interface_init, + NULL, + NULL, + }; + + g_type_add_interface_static (type, GST_TYPE_IMPLEMENTS_INTERFACE, + &iface_info); + g_type_add_interface_static (type, GST_TYPE_X_OVERLAY, &xoverlay_info); +} + + /* Utility functions */ static gboolean gst_ddrawvideosink_get_format_from_caps (GstCaps * caps, @@ -137,11 +224,14 @@ gst_ddrawvideosink_get_format_from_caps (GstCaps * caps, memset (pPixelFormat, 0, sizeof (DDPIXELFORMAT)); pPixelFormat->dwSize = sizeof (DDPIXELFORMAT); - if (!(structure = gst_caps_get_structure (caps, 0))) + if (!(structure = gst_caps_get_structure (caps, 0))) { + GST_CAT_ERROR (directdrawsink_debug, + "can't get structure pointer from caps"); return FALSE; + } if (gst_structure_has_name (structure, "video/x-raw-rgb")) { - gint depth, bitcount, bitmask; + gint depth, bitcount, bitmask, endianness; pPixelFormat->dwFlags = DDPF_RGB; ret &= gst_structure_get_int (structure, "bpp", &bitcount); @@ -153,6 +243,14 @@ gst_ddrawvideosink_get_format_from_caps (GstCaps * caps, pPixelFormat->dwGBitMask = bitmask; ret &= gst_structure_get_int (structure, "blue_mask", &bitmask); pPixelFormat->dwBBitMask = bitmask; + + gst_structure_get_int (structure, "endianness", &endianness); + if (endianness == G_BIG_ENDIAN) { + endianness = G_LITTLE_ENDIAN; + pPixelFormat->dwRBitMask = GUINT32_TO_BE (pPixelFormat->dwRBitMask); + pPixelFormat->dwGBitMask = GUINT32_TO_BE (pPixelFormat->dwGBitMask); + pPixelFormat->dwBBitMask = GUINT32_TO_BE (pPixelFormat->dwBBitMask); + } } else if (gst_structure_has_name (structure, "video/x-raw-yuv")) { gint fourcc; @@ -187,15 +285,17 @@ gst_ddrawvideosink_get_caps_from_format (DDPIXELFORMAT pixel_format) depth = 24; } caps = gst_caps_new_simple ("video/x-raw-rgb", - "bpp", G_TYPE_INT, bpp, + "bpp", G_TYPE_INT, bpp, "depth", G_TYPE_INT, depth, - "endianness", G_TYPE_INT, G_LITTLE_ENDIAN, NULL); + "endianness", G_TYPE_INT, G_LITTLE_ENDIAN, + NULL); } if ((pixel_format.dwFlags & DDPF_YUV) == DDPF_YUV) { fourcc = pixel_format.dwFourCC; caps = gst_caps_new_simple ("video/x-raw-yuv", - "format", GST_TYPE_FOURCC, fourcc, NULL); + "format", GST_TYPE_FOURCC, fourcc, + NULL); } g_assert (caps != NULL); @@ -249,7 +349,10 @@ gst_directdrawsink_center_rect (RECT src, RECT dst, RECT * result) result->right); } -/*subclass of GstBuffer which manages surfaces lifetime*/ +/************************************************************************/ +/* subclass of GstBuffer which manages surfaces lifetime */ +/* */ +/************************************************************************/ static void gst_ddrawsurface_finalize (GstDDrawSurface * surface) { @@ -336,36 +439,8 @@ gst_ddrawsurface_get_type (void) return _gst_ddrawsurface_type; } -/* FIXME: this is problematic if there is more than one sink instance at the - * same time, surely there exists a better solution than this? */ -/* static GstDirectDrawSink *global_ddrawsink = NULL; */ -/*GType -gst_directdrawsink_get_type (void) -{ - static GType directdrawsink_type = 0; - if (!directdrawsink_type) { - static const GTypeInfo directdrawsink_info = { - sizeof (GstDirectDrawSinkClass), - gst_directdrawsink_base_init, - NULL, - (GClassInitFunc) gst_directdrawsink_class_init, - NULL, - NULL, - sizeof (GstDirectDrawSink), - 0, - (GInstanceInitFunc) gst_directdrawsink_init, - }; - - directdrawsink_type = - g_type_register_static (GST_TYPE_VIDEO_SINK, "GstDirectDrawSink", - &directdrawsink_info, 0); - } - - return directdrawsink_type; -} -*/ static void gst_directdrawsink_base_init (gpointer g_class) { @@ -412,16 +487,6 @@ gst_directdrawsink_class_init (GstDirectDrawSinkClass * klass) GST_DEBUG_FUNCPTR (gst_directdrawsink_buffer_alloc); /*install properties */ - g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_FULLSCREEN, - g_param_spec_boolean ("fullscreen", "fullscreen", - "boolean to activate fullscreen", FALSE, G_PARAM_READWRITE)); - - /*extern window where we will display the video */ - g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_WINDOW, - g_param_spec_long ("window", "Window", - "The target window for video", G_MINLONG, G_MAXLONG, 0, - G_PARAM_WRITABLE)); - /*extern surface where we will blit the video */ g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_SURFACE, g_param_spec_pointer ("surface", "Surface", @@ -448,13 +513,6 @@ gst_directdrawsink_set_property (GObject * object, guint prop_id, case PROP_SURFACE: ddrawsink->extern_surface = g_value_get_pointer (value); break; - case PROP_WINDOW: - ddrawsink->video_window = (HWND) g_value_get_long (value); - ddrawsink->resize_window = FALSE; - break; - case PROP_FULLSCREEN: - /*ddrawsink->fullscreen = g_value_get_boolean (value); not working .... */ - break; case PROP_KEEP_ASPECT_RATIO: ddrawsink->keep_aspect_ratio = g_value_get_boolean (value); break; @@ -473,9 +531,6 @@ gst_directdrawsink_get_property (GObject * object, guint prop_id, ddrawsink = GST_DIRECTDRAW_SINK (object); switch (prop_id) { - case PROP_FULLSCREEN: - g_value_set_boolean (value, ddrawsink->fullscreen); - break; case PROP_KEEP_ASPECT_RATIO: g_value_set_boolean (value, ddrawsink->keep_aspect_ratio); break; @@ -511,6 +566,9 @@ gst_directdrawsink_init (GstDirectDrawSink * ddrawsink, ddrawsink->overlays = NULL; ddrawsink->clipper = NULL; ddrawsink->extern_surface = NULL; + ddrawsink->video_window = NULL; + ddrawsink->our_video_window = TRUE; + ddrawsink->last_buffer = NULL; /*video default values */ ddrawsink->video_height = 0; @@ -521,24 +579,17 @@ gst_directdrawsink_init (GstDirectDrawSink * ddrawsink, memset (&ddrawsink->dd_pixel_format, 0, sizeof (DDPIXELFORMAT)); ddrawsink->caps = NULL; - ddrawsink->window_thread = NULL; - ddrawsink->bUseOverlay = FALSE; ddrawsink->color_key = 0; /*need to be a public property and may be we can enable overlays when this property is set ... */ - ddrawsink->fullscreen = FALSE; ddrawsink->setup = FALSE; - ddrawsink->display_modes = NULL; ddrawsink->buffer_pool = NULL; - ddrawsink->resize_window = TRUE; /*resize only our internal window to the video size */ ddrawsink->pool_lock = g_mutex_new (); - - ddrawsink->keep_aspect_ratio = TRUE; -/* ddrawsink->can_blit = TRUE;*/ + ddrawsink->keep_aspect_ratio = FALSE; } static GstCaps * @@ -582,34 +633,39 @@ gst_directdrawsink_set_caps (GstBaseSink * bsink, GstCaps * caps) ddrawsink = GST_DIRECTDRAW_SINK (bsink); + GST_CAT_INFO (directdrawsink_debug, "set_caps"); + structure = gst_caps_get_structure (caps, 0); if (!structure) return FALSE; ret = gst_structure_get_int (structure, "width", &ddrawsink->video_width); ret &= gst_structure_get_int (structure, "height", &ddrawsink->video_height); - fps = gst_structure_get_value (structure, "framerate"); ret &= (fps != NULL); - ret &= gst_ddrawvideosink_get_format_from_caps (caps, &ddrawsink->dd_pixel_format); - if (!ret) return FALSE; ddrawsink->fps_n = gst_value_get_fraction_numerator (fps); ddrawsink->fps_d = gst_value_get_fraction_denominator (fps); - if (ddrawsink->video_window && ddrawsink->resize_window) { + /* Notify application to set window id now */ + if (!ddrawsink->video_window) { + gst_x_overlay_prepare_xwindow_id (GST_X_OVERLAY (ddrawsink)); + } + + /* if we are rendering to our own window, resize it to video size */ + if (ddrawsink->video_window && ddrawsink->our_video_window) { SetWindowPos (ddrawsink->video_window, NULL, 0, 0, ddrawsink->video_width + (GetSystemMetrics (SM_CXSIZEFRAME) * 2), ddrawsink->video_height + GetSystemMetrics (SM_CYCAPTION) + (GetSystemMetrics (SM_CYSIZEFRAME) * 2), SWP_SHOWWINDOW | SWP_NOMOVE); } - /*create overlays flipping chain */ + /* create an offscreen surface with the caps */ ret = gst_directdrawsink_create_ddraw_surfaces (ddrawsink); if (!ret && ddrawsink->bUseOverlay) { GST_CAT_WARNING (directdrawsink_debug, @@ -620,13 +676,13 @@ gst_directdrawsink_set_caps (GstBaseSink * bsink, GstCaps * caps) return TRUE; } - /*could not create draw surfaces even with fallback, so leave - everything as is */ + /*could not create draw surfaces even with fallback, so leave everything as is */ ddrawsink->bUseOverlay = TRUE; } if (!ret) { GST_CAT_ERROR (directdrawsink_debug, "Can not create ddraw surface"); } + return ret; } @@ -649,7 +705,6 @@ gst_directdrawsink_change_state (GstElement * element, if (!(ddrawsink->caps = gst_directdrawsink_get_ddrawcaps (ddrawsink))) return GST_STATE_CHANGE_FAILURE; - break; case GST_STATE_CHANGE_READY_TO_PAUSED: break; @@ -962,14 +1017,13 @@ gst_directdrawsink_fill_colorkey (LPDIRECTDRAWSURFACE surface, DWORD dwColorKey) ddbfx.dwSize = sizeof (DDBLTFX); ddbfx.dwFillColor = dwColorKey; - if (IDirectDrawSurface_Blt (surface, + if (IDirectDrawSurface7_Blt (surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &ddbfx) == DD_OK) return TRUE; else return FALSE; } - static void gst_directdrawsink_show_overlay (GstDirectDrawSink * ddrawsink) { @@ -1014,7 +1068,7 @@ gst_directdrawsink_show_overlay (GstDirectDrawSink * ddrawsink) ddofx.dckDestColorkey.dwColorSpaceLowValue = ddrawsink->color_key; ddofx.dckDestColorkey.dwColorSpaceHighValue = ddrawsink->color_key; - hRes = IDirectDrawSurface_UpdateOverlay (ddrawsink->overlays, + hRes = IDirectDrawSurface7_UpdateOverlay (ddrawsink->overlays, NULL, surface, &destsurf_rect, DDOVER_KEYDESTOVERRIDE | DDOVER_SHOW, &ddofx); } @@ -1025,13 +1079,34 @@ gst_directdrawsink_show_frame (GstBaseSink * bsink, GstBuffer * buf) GstDirectDrawSink *ddrawsink; HRESULT hRes; - DDSURFACEDESC surf_desc; + DDSURFACEDESC2 surf_desc; RECT destsurf_rect, src_rect; POINT dest_surf_point; LPDIRECTDRAWSURFACE lpSurface = NULL; ddrawsink = GST_DIRECTDRAW_SINK (bsink); + + if (buf) { + /*save a reference to the input buffer */ + if (ddrawsink->last_buffer != buf) { + if (ddrawsink->last_buffer) { + GST_LOG_OBJECT (ddrawsink, "unreffing %p", ddrawsink->last_buffer); + gst_buffer_unref (ddrawsink->last_buffer); + } + } + GST_LOG_OBJECT (ddrawsink, "reffing %p as our current buffer", buf); + ddrawsink->last_buffer = gst_buffer_ref (buf); + } else { + /*use last buffer */ + buf = ddrawsink->last_buffer; + } + + if (buf == NULL) + return GST_FLOW_ERROR; + + + if (ddrawsink->extern_surface) { destsurf_rect.left = 0; destsurf_rect.top = 0; @@ -1046,7 +1121,7 @@ gst_directdrawsink_show_frame (GstBaseSink * bsink, GstBuffer * buf) } if (ddrawsink->keep_aspect_ratio) { - /*center image to dest image keeping aspect ratio */ + /* center image to dest image keeping aspect ratio */ src_rect.top = 0; src_rect.left = 0; src_rect.bottom = ddrawsink->video_height; @@ -1059,8 +1134,12 @@ gst_directdrawsink_show_frame (GstBaseSink * bsink, GstBuffer * buf) DDSCAPS ddbackcaps; ddbackcaps.dwCaps = DDSCAPS_BACKBUFFER; - IDirectDrawSurface_GetAttachedSurface (ddrawsink->overlays, &ddbackcaps, - &lpSurface); + hRes = + IDirectDrawSurface7_GetAttachedSurface (ddrawsink->overlays, + &ddbackcaps, &lpSurface); + GST_CAT_WARNING (directdrawsink_debug, + "gst_directdrawsink_show_frame failed getting overlay backbuffer %s", + DDErrorString (hRes)); } else { /*use our offscreen surface */ lpSurface = ddrawsink->offscreen_surface; @@ -1073,11 +1152,11 @@ gst_directdrawsink_show_frame (GstBaseSink * bsink, GstBuffer * buf) ((GST_IS_DDRAWSURFACE (buf)) && (GST_BUFFER (buf)->malloc_data))) { LPBYTE data = NULL; - guint src_pitch, line; + guint src_pitch; /* Check for lost surface */ - if (IDirectDrawSurface_IsLost (lpSurface) == DDERR_SURFACELOST) { - IDirectDrawSurface_Restore (lpSurface); + if (IDirectDrawSurface7_IsLost (lpSurface) == DDERR_SURFACELOST) { + IDirectDrawSurface7_Restore (lpSurface); } ZeroMemory (&surf_desc, sizeof (surf_desc)); @@ -1085,7 +1164,7 @@ gst_directdrawsink_show_frame (GstBaseSink * bsink, GstBuffer * buf) /* Lock the surface */ hRes = - IDirectDrawSurface_Lock (lpSurface, NULL, &surf_desc, DDLOCK_WAIT, + IDirectDrawSurface7_Lock (lpSurface, NULL, &surf_desc, DDLOCK_WAIT, NULL); if (hRes != DD_OK) { GST_CAT_WARNING (directdrawsink_debug, @@ -1101,13 +1180,15 @@ gst_directdrawsink_show_frame (GstBaseSink * bsink, GstBuffer * buf) src_pitch = GST_BUFFER_SIZE (buf) / ddrawsink->video_height; /* Write each line respecting dest surface pitch */ - for (line = 0; line < surf_desc.dwHeight; line++) { - memcpy (data, GST_BUFFER_DATA (buf) + (line * src_pitch), src_pitch); +/* for (line = 0; line < surf_desc.dwHeight; line++) { + memcpy (data, GST_BUFFER_DATA (buf) + (line * src_pitch), + src_pitch); data += surf_desc.lPitch; - } + }*/ + memcpy (data, GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf)); /* Unlock the surface */ - hRes = IDirectDrawSurface_Unlock (lpSurface, NULL); + hRes = IDirectDrawSurface7_Unlock (lpSurface, NULL); if (hRes != DD_OK) { GST_CAT_WARNING (directdrawsink_debug, "gst_directdrawsink_show_frame failed unlocking surface %s", @@ -1118,27 +1199,28 @@ gst_directdrawsink_show_frame (GstBaseSink * bsink, GstBuffer * buf) if (ddrawsink->bUseOverlay) { /*Flip to front overlay */ hRes = - IDirectDrawSurface_Flip (ddrawsink->overlays, lpSurface, DDFLIP_WAIT); - IDirectDrawSurface_Release (lpSurface); + IDirectDrawSurface7_Flip (ddrawsink->overlays, lpSurface, + DDFLIP_WAIT); + IDirectDrawSurface7_Release (lpSurface); lpSurface = NULL; } else { if (ddrawsink->extern_surface) { if (ddrawsink->out_height == ddrawsink->video_height && ddrawsink->out_width == ddrawsink->video_width) { /*Fast blit to extern surface */ - hRes = IDirectDrawSurface_BltFast (ddrawsink->extern_surface, 0, 0, + hRes = IDirectDrawSurface7_BltFast (ddrawsink->extern_surface, 0, 0, lpSurface, NULL, DDBLTFAST_WAIT); } else { /*blit to extern surface (Blt will scale the video the dest rect surface if needed) */ hRes = - IDirectDrawSurface_Blt (ddrawsink->extern_surface, &destsurf_rect, - lpSurface, NULL, DDBLT_WAIT, NULL); + IDirectDrawSurface7_Blt (ddrawsink->extern_surface, + &destsurf_rect, lpSurface, NULL, DDBLT_WAIT, NULL); } } else { /*blit to primary surface ( Blt will scale the video the dest rect surface if needed */ hRes = - IDirectDrawSurface_Blt (ddrawsink->primary_surface, &destsurf_rect, + IDirectDrawSurface7_Blt (ddrawsink->primary_surface, &destsurf_rect, lpSurface, NULL, DDBLT_WAIT, NULL); } } @@ -1149,20 +1231,20 @@ gst_directdrawsink_show_frame (GstBaseSink * bsink, GstBuffer * buf) surface = GST_DDRAWSURFACE (buf); /* Unlocking surface before blit */ - IDirectDrawSurface_Unlock (surface->surface, NULL); + IDirectDrawSurface7_Unlock (surface->surface, NULL); surface->locked = FALSE; /* Check for lost surfaces */ - if (IDirectDrawSurface_IsLost (surface->surface) == DDERR_SURFACELOST) { - IDirectDrawSurface_Restore (surface->surface); + if (IDirectDrawSurface7_IsLost (surface->surface) == DDERR_SURFACELOST) { + IDirectDrawSurface7_Restore (surface->surface); } if (ddrawsink->bUseOverlay) { /* blit to the overlays back buffer */ - hRes = IDirectDrawSurface_Blt (lpSurface, NULL, + hRes = IDirectDrawSurface7_Blt (lpSurface, NULL, surface->surface, NULL, DDBLT_WAIT, NULL); - hRes = IDirectDrawSurface_Flip (ddrawsink->overlays, NULL, DDFLIP_WAIT); + hRes = IDirectDrawSurface7_Flip (ddrawsink->overlays, NULL, DDFLIP_WAIT); if (hRes != DD_OK) GST_CAT_WARNING (directdrawsink_debug, "error flipping"); @@ -1172,23 +1254,23 @@ gst_directdrawsink_show_frame (GstBaseSink * bsink, GstBuffer * buf) if (ddrawsink->out_height == ddrawsink->video_height && ddrawsink->out_width == ddrawsink->video_width) { /*Fast blit to extern surface */ - hRes = IDirectDrawSurface_BltFast (ddrawsink->extern_surface, 0, 0, + hRes = IDirectDrawSurface7_BltFast (ddrawsink->extern_surface, 0, 0, surface->surface, NULL, DDBLTFAST_WAIT); } else { /*blit to extern surface (Blt will scale the video the dest rect surface if needed) */ hRes = - IDirectDrawSurface_Blt (ddrawsink->extern_surface, &destsurf_rect, - surface->surface, NULL, DDBLT_WAIT, NULL); + IDirectDrawSurface7_Blt (ddrawsink->extern_surface, + &destsurf_rect, surface->surface, NULL, DDBLT_WAIT, NULL); } } else { /*blit to our primary surface */ hRes = - IDirectDrawSurface_Blt (ddrawsink->primary_surface, &destsurf_rect, + IDirectDrawSurface7_Blt (ddrawsink->primary_surface, &destsurf_rect, surface->surface, NULL, DDBLT_WAIT, NULL); if (hRes != DD_OK) GST_CAT_WARNING (directdrawsink_debug, - "IDirectDrawSurface_Blt returned %s", DDErrorString (hRes)); + "IDirectDrawSurface7_Blt returned %s", DDErrorString (hRes)); else GST_CAT_INFO (directdrawsink_debug, "allocated surface was blit to our primary"); @@ -1207,47 +1289,29 @@ gst_directdrawsink_setup_ddraw (GstDirectDrawSink * ddrawsink) { gboolean bRet = TRUE; HRESULT hRes; - DWORD dwCooperativeLevel; - DDSURFACEDESC dd_surface_desc; + DDSURFACEDESC2 dd_surface_desc; - /*UUID IDirectDraw7_ID; + //create an instance of the ddraw object + hRes = + DirectDrawCreateEx ( /*DDCREATE_EMULATIONONLY */ 0, + (void **) &ddrawsink->ddraw_object, &IID_IDirectDraw7, NULL); - //IDirectDraw_QueryInterface() - create an instance of the ddraw object - hRes = DirectDrawCreateEx (DDCREATE_EMULATIONONLY, (void**)&ddrawsink->ddraw_object, - (REFIID)IID_IDirectDraw7, NULL); - */ - hRes = DirectDrawCreate (NULL, &ddrawsink->ddraw_object, NULL); if (hRes != DD_OK || ddrawsink->ddraw_object == NULL) { GST_CAT_ERROR (directdrawsink_debug, "DirectDrawCreate failed with: %s", DDErrorString (hRes)); return FALSE; } - /*get ddraw caps for the current hardware */ -/* ddrawsink->DDDriverCaps.dwSize = sizeof (DDCAPS); - ddrawsink->DDHELCaps.dwSize = sizeof (DDCAPS); - hRes = IDirectDraw_GetCaps (ddrawsink->ddraw_object, &ddrawsink->DDDriverCaps, &ddrawsink->DDHELCaps); -*/ - /*set cooperative level */ - if (ddrawsink->fullscreen) - dwCooperativeLevel = DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN; - else - dwCooperativeLevel = DDSCL_NORMAL; + /* set cooperative level */ + hRes = IDirectDraw7_SetCooperativeLevel (ddrawsink->ddraw_object, + ddrawsink->video_window, DDSCL_NORMAL); - hRes = IDirectDraw_SetCooperativeLevel (ddrawsink->ddraw_object, - ddrawsink->video_window, dwCooperativeLevel); if (hRes != DD_OK) { GST_CAT_ERROR (directdrawsink_debug, "SetCooperativeLevel failed with: %s", DDErrorString (hRes)); bRet = FALSE; } - /*for fullscreen mode, setup display mode */ - if (ddrawsink->fullscreen) { - hRes = IDirectDraw_SetDisplayMode (ddrawsink->ddraw_object, 1440, 900, 32); - } - if (!ddrawsink->extern_surface) { /*create our primary surface */ memset (&dd_surface_desc, 0, sizeof (dd_surface_desc)); @@ -1255,31 +1319,34 @@ gst_directdrawsink_setup_ddraw (GstDirectDrawSink * ddrawsink) dd_surface_desc.dwFlags = DDSD_CAPS; dd_surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; - hRes = IDirectDraw_CreateSurface (ddrawsink->ddraw_object, &dd_surface_desc, + hRes = + IDirectDraw7_CreateSurface (ddrawsink->ddraw_object, &dd_surface_desc, &ddrawsink->primary_surface, NULL); if (hRes != DD_OK) { GST_CAT_ERROR (directdrawsink_debug, "CreateSurface (primary) failed with: %s", DDErrorString (hRes)); - IDirectDraw_Release (ddrawsink->ddraw_object); + IDirectDraw7_Release (ddrawsink->ddraw_object); return FALSE; } - hRes = IDirectDraw_CreateClipper (ddrawsink->ddraw_object, 0, + /* setup the clipper object */ + hRes = IDirectDraw7_CreateClipper (ddrawsink->ddraw_object, 0, &ddrawsink->clipper, NULL); if (hRes == DD_OK) { hRes = IDirectDrawClipper_SetHWnd (ddrawsink->clipper, 0, ddrawsink->video_window); - hRes = IDirectDrawSurface_SetClipper (ddrawsink->primary_surface, + + hRes = IDirectDrawSurface7_SetClipper (ddrawsink->primary_surface, ddrawsink->clipper); } } else { - DDSURFACEDESC desc_surface; + DDSURFACEDESC2 desc_surface; - desc_surface.dwSize = sizeof (DDSURFACEDESC); + desc_surface.dwSize = sizeof (DDSURFACEDESC2); /*get extern surface size */ - hRes = IDirectDrawSurface_GetSurfaceDesc (ddrawsink->extern_surface, + hRes = IDirectDrawSurface7_GetSurfaceDesc (ddrawsink->extern_surface, &desc_surface); if (hRes != DD_OK) { /*error while retrieving ext surface description */ @@ -1291,7 +1358,7 @@ gst_directdrawsink_setup_ddraw (GstDirectDrawSink * ddrawsink) /*get extern surface pixel format (FIXME not needed if we are using overlays) */ ddrawsink->dd_pixel_format.dwSize = sizeof (DDPIXELFORMAT); - hRes = IDirectDrawSurface_GetPixelFormat (ddrawsink->extern_surface, + hRes = IDirectDrawSurface7_GetPixelFormat (ddrawsink->extern_surface, &ddrawsink->dd_pixel_format); if (hRes != DD_OK) { /*error while retrieving ext surface pixel format */ @@ -1313,8 +1380,8 @@ long FAR PASCAL WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { - /*case WM_ERASEBKGND: - return TRUE; */ + case WM_ERASEBKGND: + return TRUE; /* case WM_WINDOWPOSCHANGED: case WM_MOVE: case WM_SIZE: @@ -1369,6 +1436,10 @@ gst_directdrawsink_window_thread (GstDirectDrawSink * ddrawsink) if (ddrawsink->video_window == NULL) return FALSE; + /* signal application we create a window */ + gst_x_overlay_got_xwindow_id (GST_X_OVERLAY (ddrawsink), + ddrawsink->video_window); + ReleaseSemaphore (ddrawsink->window_created_signal, 1, NULL); /*start message loop processing our default window messages */ @@ -1412,7 +1483,7 @@ failed: static gboolean gst_directdrawsink_create_ddraw_surfaces (GstDirectDrawSink * ddrawsink) { - DDSURFACEDESC dd_surface_desc; + DDSURFACEDESC2 dd_surface_desc; HRESULT hRes; memset (&dd_surface_desc, 0, sizeof (dd_surface_desc)); @@ -1432,7 +1503,8 @@ gst_directdrawsink_create_ddraw_surfaces (GstDirectDrawSink * ddrawsink) dd_surface_desc.dwFlags |= DDSD_BACKBUFFERCOUNT; dd_surface_desc.dwBackBufferCount = 1; - hRes = IDirectDraw_CreateSurface (ddrawsink->ddraw_object, &dd_surface_desc, + hRes = + IDirectDraw7_CreateSurface (ddrawsink->ddraw_object, &dd_surface_desc, &ddrawsink->overlays, NULL); if (hRes != DD_OK) { @@ -1447,10 +1519,9 @@ gst_directdrawsink_create_ddraw_surfaces (GstDirectDrawSink * ddrawsink) } else { dd_surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN /*|DDSCAPS_SYSTEMMEMORY */ ; - - hRes = IDirectDraw_CreateSurface (ddrawsink->ddraw_object, &dd_surface_desc, + hRes = + IDirectDraw7_CreateSurface (ddrawsink->ddraw_object, &dd_surface_desc, &ddrawsink->offscreen_surface, NULL); - if (hRes != DD_OK) { GST_CAT_WARNING (directdrawsink_debug, "create_ddraw_surfaces:CreateSurface(offscreen) failed %s", @@ -1500,7 +1571,7 @@ gst_directdrawsink_get_depth (LPDDPIXELFORMAT lpddpfPixelFormat) } HRESULT WINAPI -EnumModesCallback2 (LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext) +EnumModesCallback2 (LPDDSURFACEDESC2 lpDDSurfaceDesc, LPVOID lpContext) { GstDirectDrawSink *ddrawsink = (GstDirectDrawSink *) lpContext; GstCaps *format_caps = NULL; @@ -1543,16 +1614,84 @@ gst_directdrawsink_get_ddrawcaps (GstDirectDrawSink * ddrawsink) DWORD dwFourccCodeIndex = 0; LPDWORD pdwFourccCodes = NULL; DWORD dwNbFourccCodes = 0; + DDCAPS ddcaps_hardware; + DDCAPS ddcaps_emulation; GstCaps *format_caps = NULL; ddrawsink->caps = gst_caps_new_empty (); if (!ddrawsink->caps) return FALSE; - /*enumerate display modes exposed by directdraw object */ + /* get hardware caps */ + ddcaps_hardware.dwSize = sizeof (DDCAPS); + ddcaps_emulation.dwSize = sizeof (DDCAPS); + IDirectDraw7_GetCaps (ddrawsink->ddraw_object, &ddcaps_hardware, + &ddcaps_emulation); + + /* we don't test for DDCAPS_BLTSTRETCH on the hardware as the directdraw emulation layer can do it */ + + + if (!(ddcaps_hardware.dwCaps & DDCAPS_BLTFOURCC)) { + DDSURFACEDESC2 surface_desc; + gint endianness = G_LITTLE_ENDIAN; + gint depth; + + GST_CAT_INFO (directdrawsink_debug, + "hardware doesn't support blit from one colorspace to another one. " + "so we will create a caps with only the current display mode"); + + surface_desc.dwSize = sizeof (DDSURFACEDESC); + hRes = IDirectDraw7_GetDisplayMode (ddrawsink->ddraw_object, &surface_desc); + if (hRes != DD_OK) { + GST_CAT_ERROR (directdrawsink_debug, + "Error getting the current display mode (%s)", DDErrorString (hRes)); + return NULL; + } + + depth = gst_directdrawsink_get_depth (&surface_desc.ddpfPixelFormat); + + if (surface_desc.ddpfPixelFormat.dwRGBBitCount == 24 || + surface_desc.ddpfPixelFormat.dwRGBBitCount == 32) { + /* ffmpegcolorspace handles 24/32 bpp RGB as big-endian. */ + endianness = G_BIG_ENDIAN; + surface_desc.ddpfPixelFormat.dwRBitMask = + GUINT32_TO_BE (surface_desc.ddpfPixelFormat.dwRBitMask); + surface_desc.ddpfPixelFormat.dwGBitMask = + GUINT32_TO_BE (surface_desc.ddpfPixelFormat.dwGBitMask); + surface_desc.ddpfPixelFormat.dwBBitMask = + GUINT32_TO_BE (surface_desc.ddpfPixelFormat.dwBBitMask); + } + + format_caps = gst_caps_new_simple ("video/x-raw-rgb", + "width", GST_TYPE_INT_RANGE, 1, G_MAXINT, + "height", GST_TYPE_INT_RANGE, 1, G_MAXINT, + "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, + "bpp", G_TYPE_INT, surface_desc.ddpfPixelFormat.dwRGBBitCount, + "depth", G_TYPE_INT, depth, + "endianness", G_TYPE_INT, endianness, + "red_mask", G_TYPE_INT, surface_desc.ddpfPixelFormat.dwRBitMask, + "green_mask", G_TYPE_INT, surface_desc.ddpfPixelFormat.dwGBitMask, + "blue_mask", G_TYPE_INT, surface_desc.ddpfPixelFormat.dwBBitMask, NULL); + + if (format_caps) { + gst_caps_append (ddrawsink->caps, format_caps); + } + + GST_CAT_INFO (directdrawsink_debug, "returning caps %s", + gst_caps_to_string (ddrawsink->caps)); + + return ddrawsink->caps; + } + + GST_CAT_INFO (directdrawsink_debug, + "the hardware can blit from one colorspace to another, " + "then enumerate the colorspace supported by the hardware"); + + /* enumerate display modes exposed by directdraw object + to know supported RGB mode */ hRes = - IDirectDraw_EnumDisplayModes (ddrawsink->ddraw_object, DDEDM_REFRESHRATES, - NULL, ddrawsink, EnumModesCallback2); + IDirectDraw7_EnumDisplayModes (ddrawsink->ddraw_object, + DDEDM_REFRESHRATES, NULL, ddrawsink, EnumModesCallback2); if (hRes != DD_OK) { GST_CAT_WARNING (directdrawsink_debug, "EnumDisplayModes returns: %s", DDErrorString (hRes)); @@ -1560,44 +1699,44 @@ gst_directdrawsink_get_ddrawcaps (GstDirectDrawSink * ddrawsink) } /* enumerate non-rgb modes exposed by directdraw object */ - IDirectDraw_GetFourCCCodes (ddrawsink->ddraw_object, &dwNbFourccCodes, NULL); - if (dwNbFourccCodes != 0) { - pdwFourccCodes = g_new0 (DWORD, dwNbFourccCodes); - if (!pdwFourccCodes) - return FALSE; - - if (FAILED (IDirectDraw_GetFourCCCodes (ddrawsink->ddraw_object, - &dwNbFourccCodes, pdwFourccCodes))) { - g_free (pdwFourccCodes); - return FALSE; - } - - for (dwFourccCodeIndex = 0; dwFourccCodeIndex < dwNbFourccCodes; - dwFourccCodeIndex++) { - /*support only yuv formats YUY2, UYVY, YVU9, YV12, AYUV */ - if (pdwFourccCodes[dwFourccCodeIndex] == mmioFOURCC ('Y', 'U', 'Y', '2') - || pdwFourccCodes[dwFourccCodeIndex] == mmioFOURCC ('U', 'Y', 'V', - 'Y') - || pdwFourccCodes[dwFourccCodeIndex] == mmioFOURCC ('Y', 'V', 'U', - '9') - || pdwFourccCodes[dwFourccCodeIndex] == mmioFOURCC ('Y', 'V', '1', - '2') - || pdwFourccCodes[dwFourccCodeIndex] == mmioFOURCC ('A', 'Y', 'U', - 'V') - ) { - format_caps = gst_caps_new_simple ("video/x-raw-yuv", - "format", GST_TYPE_FOURCC, pdwFourccCodes[dwFourccCodeIndex], - "width", GST_TYPE_INT_RANGE, 1, G_MAXINT, - "height", GST_TYPE_INT_RANGE, 1, G_MAXINT, - "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL); - - if (format_caps) - gst_caps_append (ddrawsink->caps, format_caps); - } - } - - g_free (pdwFourccCodes); +/* IDirectDraw7_GetFourCCCodes(ddrawsink->ddraw_object, &dwNbFourccCodes, NULL); + if(dwNbFourccCodes != 0) + { + pdwFourccCodes = g_new0(DWORD, dwNbFourccCodes); + if(!pdwFourccCodes) + return FALSE; + + if (FAILED(IDirectDraw7_GetFourCCCodes(ddrawsink->ddraw_object, &dwNbFourccCodes, + pdwFourccCodes))) + { + g_free(pdwFourccCodes); + return FALSE; + } + + for(dwFourccCodeIndex = 0; dwFourccCodeIndex < dwNbFourccCodes; dwFourccCodeIndex++) + { + /*support only yuv formats YUY2, UYVY, YVU9, YV12, AYUV + if(/*pdwFourccCodes[dwFourccCodeIndex] == mmioFOURCC('Y','U','Y','2') || + pdwFourccCodes[dwFourccCodeIndex] == mmioFOURCC('U','Y','V','Y') || + pdwFourccCodes[dwFourccCodeIndex] == mmioFOURCC('Y','V','U','9') || + pdwFourccCodes[dwFourccCodeIndex] == mmioFOURCC('Y','V','1','2') /*|| + pdwFourccCodes[dwFourccCodeIndex] == mmioFOURCC('A','Y','U','V') + ) + { + format_caps = gst_caps_new_simple ("video/x-raw-yuv", + "format", GST_TYPE_FOURCC, pdwFourccCodes[dwFourccCodeIndex], + "width", GST_TYPE_INT_RANGE, 1, G_MAXINT, + "height", GST_TYPE_INT_RANGE, 1, G_MAXINT, + "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL); + + if(format_caps) + gst_caps_append (ddrawsink->caps, format_caps); + } + } + + g_free(pdwFourccCodes); } +*/ if (gst_caps_is_empty (ddrawsink->caps)) { gst_caps_unref (ddrawsink->caps); @@ -1606,6 +1745,7 @@ gst_directdrawsink_get_ddrawcaps (GstDirectDrawSink * ddrawsink) ("No supported format found")); return NULL; } +// GST_CAT_INFO (directdrawsink_debug, "returning caps %s", gst_caps_to_string (ddrawsink->caps)); return ddrawsink->caps; } @@ -1620,7 +1760,7 @@ gst_directdrawsink_surface_create (GstDirectDrawSink * ddrawsink, gint pitch; HRESULT hRes; - DDSURFACEDESC surf_desc, surf_lock_desc; + DDSURFACEDESC2 surf_desc, surf_lock_desc; g_return_val_if_fail (GST_IS_DIRECTDRAW_SINK (ddrawsink), NULL); @@ -1662,7 +1802,7 @@ gst_directdrawsink_surface_create (GstDirectDrawSink * ddrawsink, memcpy (&(surf_desc.ddpfPixelFormat), &surface->dd_pixel_format, sizeof (DDPIXELFORMAT)); - hRes = IDirectDraw_CreateSurface (ddrawsink->ddraw_object, &surf_desc, + hRes = IDirectDraw7_CreateSurface (ddrawsink->ddraw_object, &surf_desc, &surface->surface, NULL); if (hRes != DD_OK) { /*gst_object_unref (surface); @@ -1674,8 +1814,14 @@ gst_directdrawsink_surface_create (GstDirectDrawSink * ddrawsink, /* Locking the surface to acquire the memory pointer. Use DDLOCK_NOSYSLOCK to disable syslock which can cause a deadlock if directdraw api is used while a buffer is lock */ - hRes = IDirectDrawSurface_Lock (surface->surface, NULL, &surf_lock_desc, + lock: + hRes = IDirectDrawSurface7_Lock (surface->surface, NULL, &surf_lock_desc, DDLOCK_WAIT | DDLOCK_NOSYSLOCK, NULL); + if (hRes == DDERR_SURFACELOST) { + IDirectDrawSurface7_Restore (surface->surface); + goto lock; + } + surface->locked = TRUE; if (surf_lock_desc.lPitch != pitch) { @@ -1700,7 +1846,7 @@ gst_directdrawsink_surface_create (GstDirectDrawSink * ddrawsink, GST_BUFFER_DATA (surface) = GST_BUFFER (surface)->malloc_data; GST_BUFFER_SIZE (surface) = size; -/* surf_desc.dwSize = sizeof(DDSURFACEDESC); +/* surf_desc.dwSize = sizeof(DDSURFACEDESC2); surf_desc.dwFlags = DDSD_PITCH | DDSD_LPSURFACE | DDSD_HEIGHT | DDSD_WIDTH ||DDSD_PIXELFORMAT; surf_desc.lpSurface = GST_BUFFER (surface)->malloc_data; surf_desc.lPitch = pitch; @@ -1736,10 +1882,10 @@ gst_directdrawsink_surface_destroy (GstDirectDrawSink * ddrawsink, /* Release our internal surface */ if (surface->surface) { if (surface->locked) { - IDirectDrawSurface_Unlock (surface->surface, NULL); + IDirectDrawSurface7_Unlock (surface->surface, NULL); surface->locked = FALSE; } - IDirectDrawSurface_Release (surface->surface); + IDirectDrawSurface7_Release (surface->surface); surface->surface = NULL; } @@ -1780,9 +1926,11 @@ gst_directdrawsink_bufferpool_clear (GstDirectDrawSink * ddrawsink) static void gst_directdrawsink_cleanup (GstDirectDrawSink * ddrawsink) { + /* Post quit message and wait for our event window thread */ - if (ddrawsink->video_window) + if (ddrawsink->video_window && ddrawsink->our_video_window) PostMessage (ddrawsink->video_window, WM_QUIT, 0, 0); + if (ddrawsink->window_thread) { g_thread_join (ddrawsink->window_thread); ddrawsink->window_thread = NULL; @@ -1793,24 +1941,13 @@ gst_directdrawsink_cleanup (GstDirectDrawSink * ddrawsink) ddrawsink->buffer_pool = NULL; } - if (ddrawsink->display_modes) { - GSList *walk = ddrawsink->display_modes; - - while (walk) { - g_free (walk->data); - walk = g_slist_next (walk); - } - g_slist_free (ddrawsink->display_modes); - ddrawsink->display_modes = NULL; - } - if (ddrawsink->overlays) { - IDirectDrawSurface_Release (ddrawsink->overlays); + IDirectDrawSurface7_Release (ddrawsink->overlays); ddrawsink->overlays = NULL; } if (ddrawsink->offscreen_surface) { - IDirectDrawSurface_Release (ddrawsink->offscreen_surface); + IDirectDrawSurface7_Release (ddrawsink->offscreen_surface); ddrawsink->offscreen_surface = NULL; } @@ -1820,14 +1957,19 @@ gst_directdrawsink_cleanup (GstDirectDrawSink * ddrawsink) } if (ddrawsink->primary_surface) { - IDirectDrawSurface_Release (ddrawsink->primary_surface); + IDirectDrawSurface7_Release (ddrawsink->primary_surface); ddrawsink->primary_surface = NULL; } if (ddrawsink->ddraw_object) { - IDirectDraw_Release (ddrawsink->ddraw_object); + IDirectDraw7_Release (ddrawsink->ddraw_object); ddrawsink->ddraw_object = NULL; } + if (ddrawsink->last_buffer) { + gst_buffer_unref (ddrawsink->last_buffer); + ddrawsink->last_buffer = NULL; + } + ddrawsink->setup = FALSE; } diff --git a/sys/directdraw/gstdirectdrawsink.h b/sys/directdraw/gstdirectdrawsink.h index f9d4c865..1a32c5a5 100644 --- a/sys/directdraw/gstdirectdrawsink.h +++ b/sys/directdraw/gstdirectdrawsink.h @@ -27,8 +27,9 @@ #include #include -#include +#include +#include #include G_BEGIN_DECLS @@ -51,87 +52,76 @@ struct _GstDDrawSurface /* Extension of GstBuffer to store directdraw surfaces */ GstBuffer buffer; - /*directdraw surface */ + /* directdraw surface */ LPDIRECTDRAWSURFACE surface; + /* surface dimensions */ gint width; gint height; /*TRUE when surface is locked*/ gboolean locked; + /*TRUE when surface is using a system memory buffer (i'm using system memory when directdraw optimized pitch is not the same as the GStreamer one)*/ gboolean system_memory; + /* pixel format of the encapsulated surface */ DDPIXELFORMAT dd_pixel_format; + /* pointer to parent */ GstDirectDrawSink *ddrawsink; }; - -typedef struct _GstDDDDisplayMode GstDDDisplayMode; - -struct _GstDDDDisplayMode -{ - gint width; - gint height; - gint bpp; -}; - struct _GstDirectDrawSink { GstVideoSink videosink; - /*directdraw offscreen surfaces pool */ + /* directdraw offscreen surfaces pool */ GSList *buffer_pool; + GMutex *pool_lock; - GSList *display_modes; - //GstDDDisplayMode display_mode; - - /*directdraw objects */ + /* directdraw objects */ LPDIRECTDRAW ddraw_object; LPDIRECTDRAWSURFACE primary_surface; LPDIRECTDRAWSURFACE offscreen_surface; LPDIRECTDRAWSURFACE overlays; LPDIRECTDRAWCLIPPER clipper; - /*DDCAPS DDDriverCaps; - DDCAPS DDHELCaps; - gboolean can_blit;*/ + /* last buffer displayed (used for XOverlay interface expose method) */ + GstBuffer * last_buffer; - /*Directdraw caps */ + /* directdraw caps */ GstCaps *caps; - /*handle of the video window */ + /* video window management */ HWND video_window; + gboolean our_video_window; HANDLE window_created_signal; - gboolean resize_window; - - /*video properties */ + + /* video properties */ gint video_width, video_height; gint out_width, out_height; - //gdouble framerate; gint fps_n; gint fps_d; /*properties*/ LPDIRECTDRAWSURFACE extern_surface; gboolean keep_aspect_ratio; - gboolean fullscreen; /*pixel format */ DDPIXELFORMAT dd_pixel_format; + /* thread processing our default window messages */ GThread *window_thread; - gboolean bUseOverlay; - gboolean bIsOverlayVisible; + /* TRUE when directdraw objects are setup */ gboolean setup; - GMutex *pool_lock; - + /* overlays */ + gboolean bUseOverlay; + gboolean bIsOverlayVisible; guint color_key; - /*LPDIRECTDRAWSURFACE extern_surface; */ }; struct _GstDirectDrawSinkClass -- cgit v1.2.1 From 835917a6fef29c2e413e4b1b279076bbb985ad79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Moutte?= Date: Sun, 18 Feb 2007 18:00:51 +0000 Subject: [MOVED FROM GOOD] sys/directdraw/: Prepare the plugin to move to good: Original commit message from CVS: * sys/directdraw/gstdirectdrawplugin.c: * sys/directdraw/gstdirectdrawsink.c: * sys/directdraw/gstdirectdrawsink.h: Prepare the plugin to move to good: Remove unused/untested code (rendering to an extern surface, yuv format rendering).Use GST_(DEBUG/*)_OBJECT macros Rename all functions from gst_directdrawsink to gst_directdraw_sink. Add gtk doc section Fix a bug in gst_directdraw_sink_show_frame, memcpy line by line respecting destination surface stride. * sys/directsound/gstdirectsoundplugin.c: * sys/directsound/gstdirectsoundsink.c: * sys/directsound/gstdirectsoundsink.h: Prepare the plugin to move to good: Rename all functions from gst_directsoundsink to gst_directsound_sink. Add gtk doc section * win32/common/config.h.in: * win32/MANIFEST: Add config.h.in --- sys/directdraw/gstdirectdrawplugin.c | 2 +- sys/directdraw/gstdirectdrawsink.c | 1609 +++++++++++++--------------------- sys/directdraw/gstdirectdrawsink.h | 13 +- 3 files changed, 608 insertions(+), 1016 deletions(-) diff --git a/sys/directdraw/gstdirectdrawplugin.c b/sys/directdraw/gstdirectdrawplugin.c index 728551e0..14943020 100644 --- a/sys/directdraw/gstdirectdrawplugin.c +++ b/sys/directdraw/gstdirectdrawplugin.c @@ -38,5 +38,5 @@ plugin_init (GstPlugin * plugin) GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, "directdraw", - "DIRECTDRAW plugin library", + "Direct Draw plugin library", plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN) diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index 099be4e9..4dd0d834 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -27,10 +27,17 @@ * * DirectdrawSink renders video frames to any win32 window. This element can receive * a window ID from the application through the XOverlay interface and will then render - * video frames in this drawable. + * video frames in this window. * If no Window ID was provided by the application, the element will create its * own internal window and render into it. * + * Examples + * + * Here is a simple pipeline to test the sink : + * + * gst-launch-0.10 -v videotestsrc ! directdrawsink + * + * * */ @@ -40,103 +47,76 @@ #include "gstdirectdrawsink.h" -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#include - GST_DEBUG_CATEGORY_STATIC (directdrawsink_debug); #define GST_CAT_DEFAULT directdrawsink_debug /* elementfactory information */ -static const GstElementDetails gst_directdrawsink_details = -GST_ELEMENT_DETAILS ("Video Sink (DIRECTDRAW)", +static const GstElementDetails gst_directdraw_sink_details = +GST_ELEMENT_DETAILS ("Direct Draw Video Sink", "Sink/Video", - "Output to a video card via DIRECTDRAW", + "Output to a video card via Direct Draw", "Sebastien Moutte "); -static void gst_directdrawsink_init_interfaces (GType type); - -GST_BOILERPLATE_FULL (GstDirectDrawSink, gst_directdrawsink, GstVideoSink, - GST_TYPE_VIDEO_SINK, gst_directdrawsink_init_interfaces); +static void gst_directdraw_sink_init_interfaces (GType type); -static void gst_directdrawsink_finalize (GObject * object); +GST_BOILERPLATE_FULL (GstDirectDrawSink, gst_directdraw_sink, GstVideoSink, + GST_TYPE_VIDEO_SINK, gst_directdraw_sink_init_interfaces); -static void gst_directdrawsink_set_property (GObject * object, +static void gst_directdraw_sink_finalize (GObject * object); +static void gst_directdraw_sink_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); -static void gst_directdrawsink_get_property (GObject * object, +static void gst_directdraw_sink_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); - -static GstCaps *gst_directdrawsink_get_caps (GstBaseSink * bsink); -static gboolean gst_directdrawsink_set_caps (GstBaseSink * bsink, +static GstCaps *gst_directdraw_sink_get_caps (GstBaseSink * bsink); +static gboolean gst_directdraw_sink_set_caps (GstBaseSink * bsink, GstCaps * caps); - -static GstStateChangeReturn -gst_directdrawsink_change_state (GstElement * element, - GstStateChange transition); -static GstFlowReturn -gst_directdrawsink_buffer_alloc (GstBaseSink * bsink, guint64 offset, - guint size, GstCaps * caps, GstBuffer ** buf); -static void -gst_directdrawsink_get_times (GstBaseSink * bsink, GstBuffer * buf, +static GstStateChangeReturn gst_directdraw_sink_change_state (GstElement * + element, GstStateChange transition); +static GstFlowReturn gst_directdraw_sink_buffer_alloc (GstBaseSink * bsink, + guint64 offset, guint size, GstCaps * caps, GstBuffer ** buf); +static void gst_directdraw_sink_get_times (GstBaseSink * bsink, GstBuffer * buf, GstClockTime * start, GstClockTime * end); -static GstFlowReturn -gst_directdrawsink_show_frame (GstBaseSink * bsink, GstBuffer * buf); +static GstFlowReturn gst_directdraw_sink_show_frame (GstBaseSink * bsink, + GstBuffer * buf); -static gboolean gst_directdrawsink_setup_ddraw (GstDirectDrawSink * ddrawsink); -static gboolean gst_directdrawsink_create_default_window (GstDirectDrawSink * +/* utils */ +static gboolean gst_directdraw_sink_setup_ddraw (GstDirectDrawSink * ddrawsink); +static gboolean gst_directdraw_sink_create_default_window (GstDirectDrawSink * ddrawsink); -static gboolean gst_directdrawsink_create_ddraw_surfaces (GstDirectDrawSink * +static gboolean gst_directdraw_sink_create_ddraw_surface (GstDirectDrawSink * ddrawsink); - -static GstCaps *gst_directdrawsink_get_ddrawcaps (GstDirectDrawSink * +static GstCaps *gst_directdraw_sink_get_ddrawcaps (GstDirectDrawSink * ddrawsink); - -static void gst_directdrawsink_cleanup (GstDirectDrawSink * ddrawsink); -static void gst_directdrawsink_bufferpool_clear (GstDirectDrawSink * ddrawsink); - -static void -gst_directdrawsink_ddraw_put (GstDirectDrawSink * ddrawsink, +static void gst_directdraw_sink_cleanup (GstDirectDrawSink * ddrawsink); +static void gst_directdraw_sink_bufferpool_clear (GstDirectDrawSink * + ddrawsink); +static void gst_directdraw_sink_ddraw_put (GstDirectDrawSink * ddrawsink, GstDDrawSurface * surface); - /* surfaces management functions */ -static void -gst_directdrawsink_surface_destroy (GstDirectDrawSink * ddrawsink, +static void gst_directdraw_sink_surface_destroy (GstDirectDrawSink * ddrawsink, GstDDrawSurface * surface); - -static GstDDrawSurface *gst_directdrawsink_surface_create (GstDirectDrawSink * +static GstDDrawSurface *gst_directdraw_sink_surface_create (GstDirectDrawSink * ddrawsink, GstCaps * caps, size_t size); static GstStaticPadTemplate directdrawsink_sink_factory = - GST_STATIC_PAD_TEMPLATE ("sink", +GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, GST_STATIC_CAPS ("video/x-raw-rgb, " "framerate = (fraction) [ 0, MAX ], " - "width = (int) [ 1, MAX ], " "height = (int) [ 1, MAX ]" -/* "; " - "video/x-raw-yuv, " - "framerate = (fraction) [ 0, MAX ], " - "width = (int) [ 1, MAX ], " - "height = (int) [ 1, MAX ], " - "format = (fourcc) YV12" -*/ - ) + "width = (int) [ 1, MAX ], " "height = (int) [ 1, MAX ]") ); enum { PROP_0, - PROP_SURFACE, PROP_KEEP_ASPECT_RATIO }; -/* interfaces stuff */ +/* XOverlay interface implementation */ static gboolean -gst_directdrawsink_interface_supported (GstImplementsInterface * iface, +gst_directdraw_sink_interface_supported (GstImplementsInterface * iface, GType type) { g_assert (type == GST_TYPE_X_OVERLAY); @@ -144,13 +124,13 @@ gst_directdrawsink_interface_supported (GstImplementsInterface * iface, } static void -gst_directdrawsink_interface_init (GstImplementsInterfaceClass * klass) +gst_directdraw_sink_interface_init (GstImplementsInterfaceClass * klass) { - klass->supported = gst_directdrawsink_interface_supported; + klass->supported = gst_directdraw_sink_interface_supported; } static void -gst_directdrawsink_set_window_id (GstXOverlay * overlay, ULONG window_id) +gst_directdraw_sink_set_window_id (GstXOverlay * overlay, ULONG window_id) { GstDirectDrawSink *ddrawsink = GST_DIRECTDRAW_SINK (overlay); @@ -163,7 +143,6 @@ gst_directdrawsink_set_window_id (GstXOverlay * overlay, ULONG window_id) ddrawsink->video_window = (HWND) window_id; ddrawsink->our_video_window = FALSE; - if (ddrawsink->setup) { /* update the clipper object with the new window */ hres = IDirectDrawClipper_SetHWnd (ddrawsink->clipper, 0, @@ -173,31 +152,31 @@ gst_directdrawsink_set_window_id (GstXOverlay * overlay, ULONG window_id) } static void -gst_directdrawsink_expose (GstXOverlay * overlay) +gst_directdraw_sink_expose (GstXOverlay * overlay) { GstDirectDrawSink *ddrawsink = GST_DIRECTDRAW_SINK (overlay); - gst_directdrawsink_show_frame (GST_BASE_SINK (ddrawsink), NULL); + gst_directdraw_sink_show_frame (GST_BASE_SINK (ddrawsink), NULL); } static void -gst_directdrawsink_xoverlay_interface_init (GstXOverlayClass * iface) +gst_directdraw_sink_xoverlay_interface_init (GstXOverlayClass * iface) { - iface->set_xwindow_id = gst_directdrawsink_set_window_id; - iface->expose = gst_directdrawsink_expose; + iface->set_xwindow_id = gst_directdraw_sink_set_window_id; + iface->expose = gst_directdraw_sink_expose; } static void -gst_directdrawsink_init_interfaces (GType type) +gst_directdraw_sink_init_interfaces (GType type) { static const GInterfaceInfo iface_info = { - (GInterfaceInitFunc) gst_directdrawsink_interface_init, + (GInterfaceInitFunc) gst_directdraw_sink_interface_init, NULL, NULL, }; static const GInterfaceInfo xoverlay_info = { - (GInterfaceInitFunc) gst_directdrawsink_xoverlay_interface_init, + (GInterfaceInitFunc) gst_directdraw_sink_xoverlay_interface_init, NULL, NULL, }; @@ -207,25 +186,26 @@ gst_directdrawsink_init_interfaces (GType type) g_type_add_interface_static (type, GST_TYPE_X_OVERLAY, &xoverlay_info); } - /* Utility functions */ + +/* this function fill a DDPIXELFORMAT using Gstreamer caps */ static gboolean -gst_ddrawvideosink_get_format_from_caps (GstCaps * caps, - DDPIXELFORMAT * pPixelFormat) +gst_ddrawvideosink_get_format_from_caps (GstDirectDrawSink * ddrawsink, + GstCaps * caps, DDPIXELFORMAT * pPixelFormat) { GstStructure *structure = NULL; gboolean ret = TRUE; - /*check params */ + /* check params */ g_return_val_if_fail (pPixelFormat, FALSE); g_return_val_if_fail (caps, FALSE); - /*init structure */ + /* init structure */ memset (pPixelFormat, 0, sizeof (DDPIXELFORMAT)); pPixelFormat->dwSize = sizeof (DDPIXELFORMAT); if (!(structure = gst_caps_get_structure (caps, 0))) { - GST_CAT_ERROR (directdrawsink_debug, + GST_CAT_ERROR_OBJECT (directdrawsink_debug, ddrawsink, "can't get structure pointer from caps"); return FALSE; } @@ -238,500 +218,80 @@ gst_ddrawvideosink_get_format_from_caps (GstCaps * caps, pPixelFormat->dwRGBBitCount = bitcount; ret &= gst_structure_get_int (structure, "depth", &depth); ret &= gst_structure_get_int (structure, "red_mask", &bitmask); - pPixelFormat->dwRBitMask = bitmask; - ret &= gst_structure_get_int (structure, "green_mask", &bitmask); - pPixelFormat->dwGBitMask = bitmask; - ret &= gst_structure_get_int (structure, "blue_mask", &bitmask); - pPixelFormat->dwBBitMask = bitmask; - - gst_structure_get_int (structure, "endianness", &endianness); - if (endianness == G_BIG_ENDIAN) { - endianness = G_LITTLE_ENDIAN; - pPixelFormat->dwRBitMask = GUINT32_TO_BE (pPixelFormat->dwRBitMask); - pPixelFormat->dwGBitMask = GUINT32_TO_BE (pPixelFormat->dwGBitMask); - pPixelFormat->dwBBitMask = GUINT32_TO_BE (pPixelFormat->dwBBitMask); - } - } else if (gst_structure_has_name (structure, "video/x-raw-yuv")) { - gint fourcc; - - pPixelFormat->dwFlags = DDPF_FOURCC; - ret &= gst_structure_get_fourcc (structure, "format", &fourcc); - pPixelFormat->dwFourCC = fourcc; - } else { - GST_CAT_WARNING (directdrawsink_debug, - "unknown caps name received %" GST_PTR_FORMAT, caps); - ret = FALSE; - } - - return ret; -} - -/* -static GstCaps * -gst_ddrawvideosink_get_caps_from_format (DDPIXELFORMAT pixel_format) -{ - GstCaps *caps = NULL; - gint bpp, depth; - guint32 fourcc; - - if ((pixel_format.dwFlags & DDPF_RGB) == DDPF_RGB) { - bpp = pixel_format.dwRGBBitCount; - if (bpp != 32) - depth = bpp; - else { - if ((pixel_format.dwFlags & DDPF_ALPHAPREMULT) == DDPF_ALPHAPREMULT) - depth = 32; - else - depth = 24; - } - caps = gst_caps_new_simple ("video/x-raw-rgb", - "bpp", G_TYPE_INT, bpp, - "depth", G_TYPE_INT, depth, - "endianness", G_TYPE_INT, G_LITTLE_ENDIAN, - NULL); - } - - if ((pixel_format.dwFlags & DDPF_YUV) == DDPF_YUV) { - fourcc = pixel_format.dwFourCC; - caps = gst_caps_new_simple ("video/x-raw-yuv", - "format", GST_TYPE_FOURCC, fourcc, - NULL); - } - - g_assert (caps != NULL); - - return caps; -} -*/ - -static void -gst_directdrawsink_center_rect (RECT src, RECT dst, RECT * result) -{ - gdouble src_ratio, dst_ratio; - long src_width = src.right; - long src_height = src.bottom; - long dst_width = dst.right - dst.left; - long dst_heigth = dst.bottom - dst.top; - long result_width = 0, result_height = 0; - - g_return_if_fail (result != NULL); - - src_ratio = (gdouble) src_width / src_height; - dst_ratio = (gdouble) dst_width / dst_heigth; - - if (src_ratio > dst_ratio) { - /*new height */ - result_height = (long) (dst_width / src_ratio); - - result->left = dst.left; - result->right = dst.right; - result->top = dst.top + (dst_heigth - result_height) / 2; - result->bottom = result->top + result_height; - - } else if (src_ratio < dst_ratio) { - /*new width */ - result_width = (long) (dst_heigth * src_ratio); - - result->top = dst.top; - result->bottom = dst.bottom; - result->left = dst.left + (dst_width - result_width) / 2; - result->right = result->left + result_width; - - } else { - /*same ratio */ - memcpy (result, &dst, sizeof (RECT)); - } - - GST_CAT_INFO (directdrawsink_debug, - "source is %ldx%ld dest is %ldx%ld, result is %ldx%ld with x,y %ldx%ld", - src_width, src_height, dst_width, dst_heigth, - result->right - result->left, result->bottom - result->top, result->left, - result->right); -} - -/************************************************************************/ -/* subclass of GstBuffer which manages surfaces lifetime */ -/* */ -/************************************************************************/ -static void -gst_ddrawsurface_finalize (GstDDrawSurface * surface) -{ - GstDirectDrawSink *ddrawsink = NULL; - - g_return_if_fail (surface != NULL); - - ddrawsink = surface->ddrawsink; - if (!ddrawsink) - goto no_sink; - - /* If our geometry changed we can't reuse that image. */ - if ((surface->width != ddrawsink->video_width) || - (surface->height != ddrawsink->video_height) || - (memcmp (&surface->dd_pixel_format, &ddrawsink->dd_pixel_format, - sizeof (DDPIXELFORMAT)) != 0) - ) { - GST_CAT_INFO (directdrawsink_debug, - "destroy image as its size changed %dx%d vs current %dx%d", - surface->width, surface->height, ddrawsink->video_width, - ddrawsink->video_height); - gst_directdrawsink_surface_destroy (ddrawsink, surface); - - } else { - /* In that case we can reuse the image and add it to our image pool. */ - GST_CAT_INFO (directdrawsink_debug, "recycling image in pool"); - - /* need to increment the refcount again to recycle */ - gst_buffer_ref (GST_BUFFER (surface)); - - g_mutex_lock (ddrawsink->pool_lock); - ddrawsink->buffer_pool = g_slist_prepend (ddrawsink->buffer_pool, surface); - g_mutex_unlock (ddrawsink->pool_lock); - } - return; - -no_sink: - GST_CAT_WARNING (directdrawsink_debug, "no sink found"); - return; -} - -static void -gst_ddrawsurface_init (GstDDrawSurface * surface, gpointer g_class) -{ - surface->surface = NULL; - surface->width = 0; - surface->height = 0; - surface->ddrawsink = NULL; - surface->locked = FALSE; - surface->system_memory = FALSE; - memset (&surface->dd_pixel_format, 0, sizeof (DDPIXELFORMAT)); -} - -static void -gst_ddrawsurface_class_init (gpointer g_class, gpointer class_data) -{ - GstMiniObjectClass *mini_object_class = GST_MINI_OBJECT_CLASS (g_class); - - mini_object_class->finalize = (GstMiniObjectFinalizeFunction) - gst_ddrawsurface_finalize; -} - -GType -gst_ddrawsurface_get_type (void) -{ - static GType _gst_ddrawsurface_type; - - if (G_UNLIKELY (_gst_ddrawsurface_type == 0)) { - static const GTypeInfo ddrawsurface_info = { - sizeof (GstBufferClass), - NULL, - NULL, - gst_ddrawsurface_class_init, - NULL, - NULL, - sizeof (GstDDrawSurface), - 0, - (GInstanceInitFunc) gst_ddrawsurface_init, - NULL - }; - _gst_ddrawsurface_type = g_type_register_static (GST_TYPE_BUFFER, - "GstDDrawSurface", &ddrawsurface_info, 0); - } - return _gst_ddrawsurface_type; -} - - - -static void -gst_directdrawsink_base_init (gpointer g_class) -{ - GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - - gst_element_class_set_details (element_class, &gst_directdrawsink_details); - - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&directdrawsink_sink_factory)); -} - -static void -gst_directdrawsink_class_init (GstDirectDrawSinkClass * klass) -{ - GObjectClass *gobject_class; - GstElementClass *gstelement_class; - GstBaseSinkClass *gstbasesink_class; - - gobject_class = (GObjectClass *) klass; - gstbasesink_class = (GstBaseSinkClass *) klass; - gstelement_class = (GstElementClass *) klass; - - GST_DEBUG_CATEGORY_INIT (directdrawsink_debug, "directdrawsink", 0, - "Direct draw sink"); - - gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_directdrawsink_finalize); - - gobject_class->get_property = - GST_DEBUG_FUNCPTR (gst_directdrawsink_get_property); - gobject_class->set_property = - GST_DEBUG_FUNCPTR (gst_directdrawsink_set_property); - - gstelement_class->change_state = - GST_DEBUG_FUNCPTR (gst_directdrawsink_change_state); - gstbasesink_class->get_caps = GST_DEBUG_FUNCPTR (gst_directdrawsink_get_caps); - gstbasesink_class->set_caps = GST_DEBUG_FUNCPTR (gst_directdrawsink_set_caps); - gstbasesink_class->preroll = - GST_DEBUG_FUNCPTR (gst_directdrawsink_show_frame); - gstbasesink_class->render = GST_DEBUG_FUNCPTR (gst_directdrawsink_show_frame); - - gstbasesink_class->get_times = - GST_DEBUG_FUNCPTR (gst_directdrawsink_get_times); - gstbasesink_class->buffer_alloc = - GST_DEBUG_FUNCPTR (gst_directdrawsink_buffer_alloc); - - /*install properties */ - /*extern surface where we will blit the video */ - g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_SURFACE, - g_param_spec_pointer ("surface", "Surface", - "The target surface for video", G_PARAM_WRITABLE)); - - /*setup aspect ratio mode */ - g_object_class_install_property (G_OBJECT_CLASS (klass), - PROP_KEEP_ASPECT_RATIO, g_param_spec_boolean ("keep-aspect-ratio", - "keep-aspect-ratio", "boolean to video keep aspect ratio", FALSE, - G_PARAM_READWRITE)); - - /*should add a color_key property to permit applications to define the color used for overlays */ -} - -static void -gst_directdrawsink_set_property (GObject * object, guint prop_id, - const GValue * value, GParamSpec * pspec) -{ - GstDirectDrawSink *ddrawsink; - - ddrawsink = GST_DIRECTDRAW_SINK (object); - - switch (prop_id) { - case PROP_SURFACE: - ddrawsink->extern_surface = g_value_get_pointer (value); - break; - case PROP_KEEP_ASPECT_RATIO: - ddrawsink->keep_aspect_ratio = g_value_get_boolean (value); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -static void -gst_directdrawsink_get_property (GObject * object, guint prop_id, - GValue * value, GParamSpec * pspec) -{ - GstDirectDrawSink *ddrawsink; - - ddrawsink = GST_DIRECTDRAW_SINK (object); - - switch (prop_id) { - case PROP_KEEP_ASPECT_RATIO: - g_value_set_boolean (value, ddrawsink->keep_aspect_ratio); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -static void -gst_directdrawsink_finalize (GObject * object) -{ - GstDirectDrawSink *ddrawsink; - - ddrawsink = GST_DIRECTDRAW_SINK (object); - - if (ddrawsink->pool_lock) { - g_mutex_free (ddrawsink->pool_lock); - ddrawsink->pool_lock = NULL; - } - if (ddrawsink->setup) { - gst_directdrawsink_cleanup (ddrawsink); - } -} - -static void -gst_directdrawsink_init (GstDirectDrawSink * ddrawsink, - GstDirectDrawSinkClass * g_class) -{ - /*init members variables */ - ddrawsink->ddraw_object = NULL; - ddrawsink->primary_surface = NULL; - ddrawsink->overlays = NULL; - ddrawsink->clipper = NULL; - ddrawsink->extern_surface = NULL; - ddrawsink->video_window = NULL; - ddrawsink->our_video_window = TRUE; - ddrawsink->last_buffer = NULL; - - /*video default values */ - ddrawsink->video_height = 0; - ddrawsink->video_width = 0; - ddrawsink->fps_n = 0; - ddrawsink->fps_d = 0; - - memset (&ddrawsink->dd_pixel_format, 0, sizeof (DDPIXELFORMAT)); - - ddrawsink->caps = NULL; - ddrawsink->window_thread = NULL; - ddrawsink->bUseOverlay = FALSE; - ddrawsink->color_key = 0; /*need to be a public property and may be we can enable overlays when this property is set ... */ - - ddrawsink->setup = FALSE; - - ddrawsink->buffer_pool = NULL; - - - ddrawsink->pool_lock = g_mutex_new (); - ddrawsink->keep_aspect_ratio = FALSE; -} - -static GstCaps * -gst_directdrawsink_get_caps (GstBaseSink * bsink) -{ - GstDirectDrawSink *ddrawsink; - GstCaps *caps = NULL; - - ddrawsink = GST_DIRECTDRAW_SINK (bsink); - - if (!ddrawsink->setup) { - caps = gst_caps_copy (gst_pad_get_pad_template_caps (GST_VIDEO_SINK_PAD - (ddrawsink))); - - GST_CAT_INFO (directdrawsink_debug, - "getcaps called and we are not setup yet, " "returning template %" - GST_PTR_FORMAT, caps); - } else { - /*if (ddrawsink->extern_surface) { - * We are not rendering to our own surface, returning this surface's - * pixel format * - GST_WARNING ("using extern surface"); - caps = gst_ddrawvideosink_get_caps_from_format (ddrawsink->dd_pixel_format); - } else */ - - /* i think we can't really use the format of the extern surface as the application owning the surface doesn't know - the format we will render. But we need to use overlays to overlay any format on the extern surface */ - caps = gst_caps_ref (ddrawsink->caps); - } - - return caps; -} - -static gboolean -gst_directdrawsink_set_caps (GstBaseSink * bsink, GstCaps * caps) -{ - GstDirectDrawSink *ddrawsink; - GstStructure *structure = NULL; - gboolean ret; - const GValue *fps; - - ddrawsink = GST_DIRECTDRAW_SINK (bsink); - - GST_CAT_INFO (directdrawsink_debug, "set_caps"); - - structure = gst_caps_get_structure (caps, 0); - if (!structure) - return FALSE; - - ret = gst_structure_get_int (structure, "width", &ddrawsink->video_width); - ret &= gst_structure_get_int (structure, "height", &ddrawsink->video_height); - fps = gst_structure_get_value (structure, "framerate"); - ret &= (fps != NULL); - ret &= - gst_ddrawvideosink_get_format_from_caps (caps, - &ddrawsink->dd_pixel_format); - if (!ret) - return FALSE; - - ddrawsink->fps_n = gst_value_get_fraction_numerator (fps); - ddrawsink->fps_d = gst_value_get_fraction_denominator (fps); - - /* Notify application to set window id now */ - if (!ddrawsink->video_window) { - gst_x_overlay_prepare_xwindow_id (GST_X_OVERLAY (ddrawsink)); - } - - /* if we are rendering to our own window, resize it to video size */ - if (ddrawsink->video_window && ddrawsink->our_video_window) { - SetWindowPos (ddrawsink->video_window, NULL, - 0, 0, ddrawsink->video_width + (GetSystemMetrics (SM_CXSIZEFRAME) * 2), - ddrawsink->video_height + GetSystemMetrics (SM_CYCAPTION) + - (GetSystemMetrics (SM_CYSIZEFRAME) * 2), SWP_SHOWWINDOW | SWP_NOMOVE); - } + pPixelFormat->dwRBitMask = bitmask; + ret &= gst_structure_get_int (structure, "green_mask", &bitmask); + pPixelFormat->dwGBitMask = bitmask; + ret &= gst_structure_get_int (structure, "blue_mask", &bitmask); + pPixelFormat->dwBBitMask = bitmask; - /* create an offscreen surface with the caps */ - ret = gst_directdrawsink_create_ddraw_surfaces (ddrawsink); - if (!ret && ddrawsink->bUseOverlay) { - GST_CAT_WARNING (directdrawsink_debug, - "Can not create overlay surface, reverting to no overlay display"); - ddrawsink->bUseOverlay = FALSE; - ret = gst_directdrawsink_create_ddraw_surfaces (ddrawsink); - if (ret) { - return TRUE; + gst_structure_get_int (structure, "endianness", &endianness); + if (endianness == G_BIG_ENDIAN) { + endianness = G_LITTLE_ENDIAN; + pPixelFormat->dwRBitMask = GUINT32_TO_BE (pPixelFormat->dwRBitMask); + pPixelFormat->dwGBitMask = GUINT32_TO_BE (pPixelFormat->dwGBitMask); + pPixelFormat->dwBBitMask = GUINT32_TO_BE (pPixelFormat->dwBBitMask); } + } else if (gst_structure_has_name (structure, "video/x-raw-yuv")) { + gint fourcc; - /*could not create draw surfaces even with fallback, so leave everything as is */ - ddrawsink->bUseOverlay = TRUE; - } - if (!ret) { - GST_CAT_ERROR (directdrawsink_debug, "Can not create ddraw surface"); + pPixelFormat->dwFlags = DDPF_FOURCC; + ret &= gst_structure_get_fourcc (structure, "format", &fourcc); + pPixelFormat->dwFourCC = fourcc; + } else { + GST_CAT_WARNING_OBJECT (directdrawsink_debug, ddrawsink, + "unknown caps name received %" GST_PTR_FORMAT, caps); + ret = FALSE; } return ret; } -static GstStateChangeReturn -gst_directdrawsink_change_state (GstElement * element, - GstStateChange transition) +/* This function centers the RECT of source surface to +a dest surface and set the result RECT into result */ +static void +gst_directdraw_sink_center_rect (GstDirectDrawSink * ddrawsink, RECT src, + RECT dst, RECT * result) { - GstDirectDrawSink *ddrawsink; - - ddrawsink = GST_DIRECTDRAW_SINK (element); - - switch (transition) { - case GST_STATE_CHANGE_NULL_TO_READY: - if (ddrawsink->video_window == NULL && ddrawsink->extern_surface == NULL) - if (!gst_directdrawsink_create_default_window (ddrawsink)) - return GST_STATE_CHANGE_FAILURE; + gdouble src_ratio, dst_ratio; + long src_width = src.right; + long src_height = src.bottom; + long dst_width = dst.right - dst.left; + long dst_heigth = dst.bottom - dst.top; + long result_width = 0, result_height = 0; - if (!gst_directdrawsink_setup_ddraw (ddrawsink)) - return GST_STATE_CHANGE_FAILURE; + g_return_if_fail (result != NULL); - if (!(ddrawsink->caps = gst_directdrawsink_get_ddrawcaps (ddrawsink))) - return GST_STATE_CHANGE_FAILURE; - break; - case GST_STATE_CHANGE_READY_TO_PAUSED: - break; - case GST_STATE_CHANGE_PAUSED_TO_PLAYING: - break; - case GST_STATE_CHANGE_PLAYING_TO_PAUSED: - break; - case GST_STATE_CHANGE_PAUSED_TO_READY: + src_ratio = (gdouble) src_width / src_height; + dst_ratio = (gdouble) dst_width / dst_heigth; - ddrawsink->fps_n = 0; - ddrawsink->fps_d = 1; - ddrawsink->video_width = 0; - ddrawsink->video_height = 0; + if (src_ratio > dst_ratio) { + /* new height */ + result_height = (long) (dst_width / src_ratio); - if (ddrawsink->buffer_pool) - gst_directdrawsink_bufferpool_clear (ddrawsink); + result->left = dst.left; + result->right = dst.right; + result->top = dst.top + (dst_heigth - result_height) / 2; + result->bottom = result->top + result_height; - break; - case GST_STATE_CHANGE_READY_TO_NULL: + } else if (src_ratio < dst_ratio) { + /* new width */ + result_width = (long) (dst_heigth * src_ratio); - if (ddrawsink->setup) - gst_directdrawsink_cleanup (ddrawsink); + result->top = dst.top; + result->bottom = dst.bottom; + result->left = dst.left + (dst_width - result_width) / 2; + result->right = result->left + result_width; - break; + } else { + /* same ratio */ + memcpy (result, &dst, sizeof (RECT)); } - return GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); + GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, + "source is %ldx%ld dest is %ldx%ld, result is %ldx%ld with x,y %ldx%ld", + src_width, src_height, dst_width, dst_heigth, + result->right - result->left, result->bottom - result->top, result->left, + result->right); } /** @@ -944,31 +504,360 @@ DDErrorString (HRESULT hr) case DDERR_NOTINITIALIZED: return "DDERR_NOTINITIALIZED"; } - return "Unknown Error"; + return "Unknown Error"; +} + +/* Subclass of GstBuffer which manages buffer_pool surfaces lifetime */ +static void gst_ddrawsurface_finalize (GstDDrawSurface * surface); + +static void +gst_ddrawsurface_init (GstDDrawSurface * surface, gpointer g_class) +{ + surface->surface = NULL; + surface->width = 0; + surface->height = 0; + surface->ddrawsink = NULL; + surface->locked = FALSE; + surface->system_memory = FALSE; + memset (&surface->dd_pixel_format, 0, sizeof (DDPIXELFORMAT)); +} + +static void +gst_ddrawsurface_class_init (gpointer g_class, gpointer class_data) +{ + GstMiniObjectClass *mini_object_class = GST_MINI_OBJECT_CLASS (g_class); + + mini_object_class->finalize = GST_DEBUG_FUNCPTR (gst_ddrawsurface_finalize); +} + +GType +gst_ddrawsurface_get_type (void) +{ + static GType _gst_ddrawsurface_type; + + if (G_UNLIKELY (_gst_ddrawsurface_type == 0)) { + static const GTypeInfo ddrawsurface_info = { + sizeof (GstBufferClass), + NULL, + NULL, + gst_ddrawsurface_class_init, + NULL, + NULL, + sizeof (GstDDrawSurface), + 0, + (GInstanceInitFunc) gst_ddrawsurface_init, + NULL + }; + _gst_ddrawsurface_type = g_type_register_static (GST_TYPE_BUFFER, + "GstDDrawSurface", &ddrawsurface_info, 0); + } + return _gst_ddrawsurface_type; +} + +static void +gst_ddrawsurface_finalize (GstDDrawSurface * surface) +{ + GstDirectDrawSink *ddrawsink = NULL; + + g_return_if_fail (surface != NULL); + + ddrawsink = surface->ddrawsink; + if (!ddrawsink) + goto no_sink; + + /* If our geometry changed we can't reuse that image. */ + if ((surface->width != ddrawsink->video_width) || + (surface->height != ddrawsink->video_height) || + (memcmp (&surface->dd_pixel_format, &ddrawsink->dd_pixel_format, + sizeof (DDPIXELFORMAT)) != 0) + ) { + GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, + "destroy image as its size changed %dx%d vs current %dx%d", + surface->width, surface->height, ddrawsink->video_width, + ddrawsink->video_height); + gst_directdraw_sink_surface_destroy (ddrawsink, surface); + + } else { + /* In that case we can reuse the image and add it to our image pool. */ + GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, + "recycling image in pool"); + + /* need to increment the refcount again to recycle */ + gst_buffer_ref (GST_BUFFER (surface)); + + g_mutex_lock (ddrawsink->pool_lock); + ddrawsink->buffer_pool = g_slist_prepend (ddrawsink->buffer_pool, surface); + g_mutex_unlock (ddrawsink->pool_lock); + } + return; + +no_sink: + GST_WARNING (directdrawsink_debug, "no sink found"); + return; +} + +/************************************************************************/ +/* Directdraw sink functions */ +/************************************************************************/ +static void +gst_directdraw_sink_base_init (gpointer g_class) +{ + GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); + + gst_element_class_set_details (element_class, &gst_directdraw_sink_details); + gst_element_class_add_pad_template (element_class, + gst_static_pad_template_get (&directdrawsink_sink_factory)); +} + +static void +gst_directdraw_sink_class_init (GstDirectDrawSinkClass * klass) +{ + GObjectClass *gobject_class; + GstElementClass *gstelement_class; + GstBaseSinkClass *gstbasesink_class; + + gobject_class = (GObjectClass *) klass; + gstbasesink_class = (GstBaseSinkClass *) klass; + gstelement_class = (GstElementClass *) klass; + + GST_DEBUG_CATEGORY_INIT (directdrawsink_debug, "directdrawsink", 0, + "Directdraw sink"); + + gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_directdraw_sink_finalize); + gobject_class->get_property = + GST_DEBUG_FUNCPTR (gst_directdraw_sink_get_property); + gobject_class->set_property = + GST_DEBUG_FUNCPTR (gst_directdraw_sink_set_property); + gstelement_class->change_state = + GST_DEBUG_FUNCPTR (gst_directdraw_sink_change_state); + gstbasesink_class->get_caps = + GST_DEBUG_FUNCPTR (gst_directdraw_sink_get_caps); + gstbasesink_class->set_caps = + GST_DEBUG_FUNCPTR (gst_directdraw_sink_set_caps); + gstbasesink_class->preroll = + GST_DEBUG_FUNCPTR (gst_directdraw_sink_show_frame); + gstbasesink_class->render = + GST_DEBUG_FUNCPTR (gst_directdraw_sink_show_frame); + gstbasesink_class->get_times = + GST_DEBUG_FUNCPTR (gst_directdraw_sink_get_times); + gstbasesink_class->buffer_alloc = + GST_DEBUG_FUNCPTR (gst_directdraw_sink_buffer_alloc); + + /* install properties */ + /* setup aspect ratio mode */ + g_object_class_install_property (G_OBJECT_CLASS (klass), + PROP_KEEP_ASPECT_RATIO, g_param_spec_boolean ("keep-aspect-ratio", + "keep-aspect-ratio", "keep the aspect ratio or not", FALSE, + G_PARAM_READWRITE)); +} + +static void +gst_directdraw_sink_set_property (GObject * object, guint prop_id, + const GValue * value, GParamSpec * pspec) +{ + GstDirectDrawSink *ddrawsink = GST_DIRECTDRAW_SINK (object); + + switch (prop_id) { + case PROP_KEEP_ASPECT_RATIO: + ddrawsink->keep_aspect_ratio = g_value_get_boolean (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +gst_directdraw_sink_get_property (GObject * object, guint prop_id, + GValue * value, GParamSpec * pspec) +{ + GstDirectDrawSink *ddrawsink = GST_DIRECTDRAW_SINK (object); + + switch (prop_id) { + case PROP_KEEP_ASPECT_RATIO: + g_value_set_boolean (value, ddrawsink->keep_aspect_ratio); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +gst_directdraw_sink_finalize (GObject * object) +{ + GstDirectDrawSink *ddrawsink = GST_DIRECTDRAW_SINK (object); + + if (ddrawsink->pool_lock) { + g_mutex_free (ddrawsink->pool_lock); + ddrawsink->pool_lock = NULL; + } + if (ddrawsink->caps) { + gst_caps_unref (ddrawsink->caps); + ddrawsink->caps = NULL; + } + if (ddrawsink->setup) { + gst_directdraw_sink_cleanup (ddrawsink); + } +} + +static void +gst_directdraw_sink_init (GstDirectDrawSink * ddrawsink, + GstDirectDrawSinkClass * g_class) +{ + /*init members variables */ + ddrawsink->ddraw_object = NULL; + ddrawsink->primary_surface = NULL; + ddrawsink->offscreen_surface = NULL; + ddrawsink->clipper = NULL; + ddrawsink->video_window = NULL; + ddrawsink->our_video_window = TRUE; + ddrawsink->last_buffer = NULL; + ddrawsink->caps = NULL; + ddrawsink->window_thread = NULL; + ddrawsink->setup = FALSE; + ddrawsink->buffer_pool = NULL; + ddrawsink->keep_aspect_ratio = FALSE; + ddrawsink->pool_lock = g_mutex_new (); + memset (&ddrawsink->dd_pixel_format, 0, sizeof (DDPIXELFORMAT)); + + /*video default values */ + ddrawsink->video_height = 0; + ddrawsink->video_width = 0; + ddrawsink->fps_n = 0; + ddrawsink->fps_d = 0; +} + +static GstCaps * +gst_directdraw_sink_get_caps (GstBaseSink * bsink) +{ + GstDirectDrawSink *ddrawsink = GST_DIRECTDRAW_SINK (bsink); + GstCaps *caps = NULL; + + if (!ddrawsink->setup) { + caps = gst_caps_copy (gst_pad_get_pad_template_caps (GST_VIDEO_SINK_PAD + (ddrawsink))); + GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, + "getcaps called and we are not setup yet, " "returning template %" + GST_PTR_FORMAT, caps); + } else { + caps = gst_caps_ref (ddrawsink->caps); + } + + return caps; +} + +static gboolean +gst_directdraw_sink_set_caps (GstBaseSink * bsink, GstCaps * caps) +{ + GstDirectDrawSink *ddrawsink = GST_DIRECTDRAW_SINK (bsink); + GstStructure *structure = NULL; + gboolean ret; + const GValue *fps; + + structure = gst_caps_get_structure (caps, 0); + if (!structure) + return FALSE; + + ret = gst_structure_get_int (structure, "width", &ddrawsink->video_width); + ret &= gst_structure_get_int (structure, "height", &ddrawsink->video_height); + fps = gst_structure_get_value (structure, "framerate"); + ret &= (fps != NULL); + ret &= + gst_ddrawvideosink_get_format_from_caps (ddrawsink, caps, + &ddrawsink->dd_pixel_format); + if (!ret) { + GST_ELEMENT_ERROR (ddrawsink, CORE, NEGOTIATION, + ("Failed to get caps properties from caps"), (NULL)); + return FALSE; + } + + ddrawsink->fps_n = gst_value_get_fraction_numerator (fps); + ddrawsink->fps_d = gst_value_get_fraction_denominator (fps); + + /* Notify application to set window id now */ + if (!ddrawsink->video_window) { + gst_x_overlay_prepare_xwindow_id (GST_X_OVERLAY (ddrawsink)); + } + + /* if we are rendering to our own window, resize it to video size */ + if (ddrawsink->video_window && ddrawsink->our_video_window) { + SetWindowPos (ddrawsink->video_window, NULL, + 0, 0, ddrawsink->video_width + (GetSystemMetrics (SM_CXSIZEFRAME) * 2), + ddrawsink->video_height + GetSystemMetrics (SM_CYCAPTION) + + (GetSystemMetrics (SM_CYSIZEFRAME) * 2), SWP_SHOWWINDOW | SWP_NOMOVE); + } + + /* create an offscreen surface with the caps */ + ret = gst_directdraw_sink_create_ddraw_surface (ddrawsink); + if (!ret) { + GST_ELEMENT_ERROR (ddrawsink, CORE, NEGOTIATION, + ("Can't create a directdraw offscreen surface with the input caps"), + (NULL)); + } + + return ret; } +static GstStateChangeReturn +gst_directdraw_sink_change_state (GstElement * element, + GstStateChange transition) +{ + GstDirectDrawSink *ddrawsink = GST_DIRECTDRAW_SINK (element);; + + switch (transition) { + case GST_STATE_CHANGE_NULL_TO_READY: + if (ddrawsink->video_window == NULL) + if (!gst_directdraw_sink_create_default_window (ddrawsink)) + return GST_STATE_CHANGE_FAILURE; + + if (!gst_directdraw_sink_setup_ddraw (ddrawsink)) + return GST_STATE_CHANGE_FAILURE; + + if (!(ddrawsink->caps = gst_directdraw_sink_get_ddrawcaps (ddrawsink))) + return GST_STATE_CHANGE_FAILURE; + break; + case GST_STATE_CHANGE_READY_TO_PAUSED: + break; + case GST_STATE_CHANGE_PAUSED_TO_PLAYING: + break; + case GST_STATE_CHANGE_PLAYING_TO_PAUSED: + break; + case GST_STATE_CHANGE_PAUSED_TO_READY: + ddrawsink->fps_n = 0; + ddrawsink->fps_d = 1; + ddrawsink->video_width = 0; + ddrawsink->video_height = 0; + if (ddrawsink->buffer_pool) + gst_directdraw_sink_bufferpool_clear (ddrawsink); + break; + case GST_STATE_CHANGE_READY_TO_NULL: + if (ddrawsink->setup) + gst_directdraw_sink_cleanup (ddrawsink); + break; + } + + return GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); +} static GstFlowReturn -gst_directdrawsink_buffer_alloc (GstBaseSink * bsink, guint64 offset, +gst_directdraw_sink_buffer_alloc (GstBaseSink * bsink, guint64 offset, guint size, GstCaps * caps, GstBuffer ** buf) { - GstDirectDrawSink *ddrawsink = NULL; + GstDirectDrawSink *ddrawsink = GST_DIRECTDRAW_SINK (bsink); GstDDrawSurface *surface = NULL; GstStructure *structure = NULL; GstFlowReturn ret = GST_FLOW_OK; - ddrawsink = GST_DIRECTDRAW_SINK (bsink); - GST_CAT_INFO (directdrawsink_debug, "a buffer of %d bytes was requested", - size); + GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, + "a buffer of %d bytes was requested", size); structure = gst_caps_get_structure (caps, 0); - g_mutex_lock (ddrawsink->pool_lock); /* Inspect our buffer pool */ while (ddrawsink->buffer_pool) { surface = (GstDDrawSurface *) ddrawsink->buffer_pool->data; - if (surface) { /* Removing from the pool */ ddrawsink->buffer_pool = g_slist_delete_link (ddrawsink->buffer_pool, @@ -980,7 +869,7 @@ gst_directdrawsink_buffer_alloc (GstBaseSink * bsink, guint64 offset, (memcmp (&surface->dd_pixel_format, &ddrawsink->dd_pixel_format, sizeof (DDPIXELFORMAT))) ) { - gst_directdrawsink_surface_destroy (ddrawsink, surface); + gst_directdraw_sink_surface_destroy (ddrawsink, surface); surface = NULL; } else { /* We found a suitable surface */ @@ -991,7 +880,7 @@ gst_directdrawsink_buffer_alloc (GstBaseSink * bsink, guint64 offset, /* We haven't found anything, creating a new one */ if (!surface) { - surface = gst_directdrawsink_surface_create (ddrawsink, caps, size); + surface = gst_directdraw_sink_surface_create (ddrawsink, caps, size); } /* Now we should have a surface, set appropriate caps on it */ @@ -1006,119 +895,39 @@ gst_directdrawsink_buffer_alloc (GstBaseSink * bsink, guint64 offset, return ret; } -static gboolean -gst_directdrawsink_fill_colorkey (LPDIRECTDRAWSURFACE surface, DWORD dwColorKey) -{ - DDBLTFX ddbfx; - - if (!surface) - return FALSE; - - ddbfx.dwSize = sizeof (DDBLTFX); - ddbfx.dwFillColor = dwColorKey; - - if (IDirectDrawSurface7_Blt (surface, - NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &ddbfx) == DD_OK) - return TRUE; - else - return FALSE; -} - -static void -gst_directdrawsink_show_overlay (GstDirectDrawSink * ddrawsink) -{ - HRESULT hRes; - RECT destsurf_rect, src_rect; - POINT dest_surf_point; - DDOVERLAYFX ddofx; - LPDIRECTDRAWSURFACE surface = NULL; - - if (!ddrawsink || !ddrawsink->overlays) - return; - - if (ddrawsink->extern_surface) - surface = ddrawsink->extern_surface; - else - surface = ddrawsink->primary_surface; - - if (ddrawsink->extern_surface) { - destsurf_rect.left = 0; - destsurf_rect.top = 0; - destsurf_rect.right = ddrawsink->out_width; - destsurf_rect.bottom = ddrawsink->out_height; - } else { - dest_surf_point.x = 0; - dest_surf_point.y = 0; - ClientToScreen (ddrawsink->video_window, &dest_surf_point); - GetClientRect (ddrawsink->video_window, &destsurf_rect); - OffsetRect (&destsurf_rect, dest_surf_point.x, dest_surf_point.y); - } - - if (ddrawsink->keep_aspect_ratio) { - src_rect.top = 0; - src_rect.left = 0; - src_rect.bottom = ddrawsink->video_height; - src_rect.right = ddrawsink->video_width; - gst_directdrawsink_center_rect (src_rect, destsurf_rect, &destsurf_rect); - } - - gst_directdrawsink_fill_colorkey (surface, ddrawsink->color_key); - - ddofx.dwSize = sizeof (DDOVERLAYFX); - ddofx.dckDestColorkey.dwColorSpaceLowValue = ddrawsink->color_key; - ddofx.dckDestColorkey.dwColorSpaceHighValue = ddrawsink->color_key; - - hRes = IDirectDrawSurface7_UpdateOverlay (ddrawsink->overlays, - NULL, surface, &destsurf_rect, DDOVER_KEYDESTOVERRIDE | DDOVER_SHOW, - &ddofx); -} - static GstFlowReturn -gst_directdrawsink_show_frame (GstBaseSink * bsink, GstBuffer * buf) +gst_directdraw_sink_show_frame (GstBaseSink * bsink, GstBuffer * buf) { - GstDirectDrawSink *ddrawsink; + GstDirectDrawSink *ddrawsink = GST_DIRECTDRAW_SINK (bsink); HRESULT hRes; - - DDSURFACEDESC2 surf_desc; RECT destsurf_rect, src_rect; POINT dest_surf_point; - LPDIRECTDRAWSURFACE lpSurface = NULL; - - ddrawsink = GST_DIRECTDRAW_SINK (bsink); - if (buf) { - /*save a reference to the input buffer */ + /* save a reference to the input buffer */ if (ddrawsink->last_buffer != buf) { if (ddrawsink->last_buffer) { - GST_LOG_OBJECT (ddrawsink, "unreffing %p", ddrawsink->last_buffer); + GST_CAT_LOG_OBJECT (directdrawsink_debug, ddrawsink, "unreffing %p", + ddrawsink->last_buffer); gst_buffer_unref (ddrawsink->last_buffer); } } - GST_LOG_OBJECT (ddrawsink, "reffing %p as our current buffer", buf); + GST_CAT_LOG_OBJECT (directdrawsink_debug, ddrawsink, + "reffing %p as our current buffer", buf); ddrawsink->last_buffer = gst_buffer_ref (buf); } else { - /*use last buffer */ + /* use last buffer */ buf = ddrawsink->last_buffer; } - if (buf == NULL) return GST_FLOW_ERROR; - - - if (ddrawsink->extern_surface) { - destsurf_rect.left = 0; - destsurf_rect.top = 0; - destsurf_rect.right = ddrawsink->out_width; - destsurf_rect.bottom = ddrawsink->out_height; - } else { - dest_surf_point.x = 0; - dest_surf_point.y = 0; - ClientToScreen (ddrawsink->video_window, &dest_surf_point); - GetClientRect (ddrawsink->video_window, &destsurf_rect); - OffsetRect (&destsurf_rect, dest_surf_point.x, dest_surf_point.y); - } + /* get the video window position */ + dest_surf_point.x = 0; + dest_surf_point.y = 0; + ClientToScreen (ddrawsink->video_window, &dest_surf_point); + GetClientRect (ddrawsink->video_window, &destsurf_rect); + OffsetRect (&destsurf_rect, dest_surf_point.x, dest_surf_point.y); if (ddrawsink->keep_aspect_ratio) { /* center image to dest image keeping aspect ratio */ @@ -1126,106 +935,67 @@ gst_directdrawsink_show_frame (GstBaseSink * bsink, GstBuffer * buf) src_rect.left = 0; src_rect.bottom = ddrawsink->video_height; src_rect.right = ddrawsink->video_width; - gst_directdrawsink_center_rect (src_rect, destsurf_rect, &destsurf_rect); - } - - if (ddrawsink->bUseOverlay) { - /*get the back buffer of the overlays flipping chain */ - DDSCAPS ddbackcaps; - - ddbackcaps.dwCaps = DDSCAPS_BACKBUFFER; - hRes = - IDirectDrawSurface7_GetAttachedSurface (ddrawsink->overlays, - &ddbackcaps, &lpSurface); - GST_CAT_WARNING (directdrawsink_debug, - "gst_directdrawsink_show_frame failed getting overlay backbuffer %s", - DDErrorString (hRes)); - } else { - /*use our offscreen surface */ - lpSurface = ddrawsink->offscreen_surface; + gst_directdraw_sink_center_rect (ddrawsink, src_rect, destsurf_rect, + &destsurf_rect); } - if (lpSurface == NULL) - return GST_FLOW_ERROR; - if (!GST_IS_DDRAWSURFACE (buf) || ((GST_IS_DDRAWSURFACE (buf)) && (GST_BUFFER (buf)->malloc_data))) { - + /* We are receiving a system memory buffer so we will copy + to the memory of our offscreen surface and next blit this surface + on the primary surface */ LPBYTE data = NULL; - guint src_pitch; - - /* Check for lost surface */ - if (IDirectDrawSurface7_IsLost (lpSurface) == DDERR_SURFACELOST) { - IDirectDrawSurface7_Restore (lpSurface); - } + guint src_pitch, line; + DDSURFACEDESC2 surf_desc; ZeroMemory (&surf_desc, sizeof (surf_desc)); surf_desc.dwSize = sizeof (surf_desc); + /* Check for lost surface */ + if (IDirectDrawSurface7_IsLost (ddrawsink->offscreen_surface) == + DDERR_SURFACELOST) { + IDirectDrawSurface7_Restore (ddrawsink->offscreen_surface); + } + /* Lock the surface */ hRes = - IDirectDrawSurface7_Lock (lpSurface, NULL, &surf_desc, DDLOCK_WAIT, - NULL); + IDirectDrawSurface7_Lock (ddrawsink->offscreen_surface, NULL, + &surf_desc, DDLOCK_WAIT, NULL); if (hRes != DD_OK) { - GST_CAT_WARNING (directdrawsink_debug, - "gst_directdrawsink_show_frame failed locking surface %s", + GST_CAT_WARNING_OBJECT (directdrawsink_debug, ddrawsink, + "gst_directdraw_sink_show_frame failed locking surface %s", DDErrorString (hRes)); return GST_FLOW_ERROR; } - /* Write data */ + /* Write each line respecting the destination surface pitch */ data = surf_desc.lpSurface; - - /* Source video rowbytes */ src_pitch = GST_BUFFER_SIZE (buf) / ddrawsink->video_height; - - /* Write each line respecting dest surface pitch */ -/* for (line = 0; line < surf_desc.dwHeight; line++) { - memcpy (data, GST_BUFFER_DATA (buf) + (line * src_pitch), - src_pitch); + for (line = 0; line < surf_desc.dwHeight; line++) { + memcpy (data, GST_BUFFER_DATA (buf) + (line * src_pitch), src_pitch); data += surf_desc.lPitch; - }*/ - memcpy (data, GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf)); + } /* Unlock the surface */ - hRes = IDirectDrawSurface7_Unlock (lpSurface, NULL); + hRes = IDirectDrawSurface7_Unlock (ddrawsink->offscreen_surface, NULL); if (hRes != DD_OK) { - GST_CAT_WARNING (directdrawsink_debug, - "gst_directdrawsink_show_frame failed unlocking surface %s", + GST_CAT_WARNING_OBJECT (directdrawsink_debug, ddrawsink, + "gst_directdraw_sink_show_frame failed unlocking surface %s", DDErrorString (hRes)); return GST_FLOW_ERROR; } - if (ddrawsink->bUseOverlay) { - /*Flip to front overlay */ - hRes = - IDirectDrawSurface7_Flip (ddrawsink->overlays, lpSurface, - DDFLIP_WAIT); - IDirectDrawSurface7_Release (lpSurface); - lpSurface = NULL; - } else { - if (ddrawsink->extern_surface) { - if (ddrawsink->out_height == ddrawsink->video_height && - ddrawsink->out_width == ddrawsink->video_width) { - /*Fast blit to extern surface */ - hRes = IDirectDrawSurface7_BltFast (ddrawsink->extern_surface, 0, 0, - lpSurface, NULL, DDBLTFAST_WAIT); - - } else { - /*blit to extern surface (Blt will scale the video the dest rect surface if needed) */ - hRes = - IDirectDrawSurface7_Blt (ddrawsink->extern_surface, - &destsurf_rect, lpSurface, NULL, DDBLT_WAIT, NULL); - } - } else { - /*blit to primary surface ( Blt will scale the video the dest rect surface if needed */ - hRes = - IDirectDrawSurface7_Blt (ddrawsink->primary_surface, &destsurf_rect, - lpSurface, NULL, DDBLT_WAIT, NULL); - } - } - } else { + /* blit to primary surface ( Blt will scale the video the dest rect surface if needed */ + hRes = IDirectDrawSurface7_Blt (ddrawsink->primary_surface, &destsurf_rect, + ddrawsink->offscreen_surface, NULL, DDBLT_WAIT, NULL); + if (hRes != DD_OK) + GST_CAT_WARNING_OBJECT (directdrawsink_debug, ddrawsink, + "IDirectDrawSurface7_Blt (object's offscreen surface) " "returned %s", + DDErrorString (hRes)); + } else { + /* We are receiving a directdraw surface (previously returned by our buffer pool + So we will simply blit it on the primary surface */ GstDDrawSurface *surface = NULL; surface = GST_DDRAWSURFACE (buf); @@ -1239,138 +1009,72 @@ gst_directdrawsink_show_frame (GstBaseSink * bsink, GstBuffer * buf) IDirectDrawSurface7_Restore (surface->surface); } - if (ddrawsink->bUseOverlay) { - /* blit to the overlays back buffer */ - hRes = IDirectDrawSurface7_Blt (lpSurface, NULL, - surface->surface, NULL, DDBLT_WAIT, NULL); - - hRes = IDirectDrawSurface7_Flip (ddrawsink->overlays, NULL, DDFLIP_WAIT); - if (hRes != DD_OK) - GST_CAT_WARNING (directdrawsink_debug, "error flipping"); - - } else { - if (ddrawsink->extern_surface) { - /*blit to the extern surface */ - if (ddrawsink->out_height == ddrawsink->video_height && - ddrawsink->out_width == ddrawsink->video_width) { - /*Fast blit to extern surface */ - hRes = IDirectDrawSurface7_BltFast (ddrawsink->extern_surface, 0, 0, - surface->surface, NULL, DDBLTFAST_WAIT); - - } else { - /*blit to extern surface (Blt will scale the video the dest rect surface if needed) */ - hRes = - IDirectDrawSurface7_Blt (ddrawsink->extern_surface, - &destsurf_rect, surface->surface, NULL, DDBLT_WAIT, NULL); - } - } else { - /*blit to our primary surface */ - hRes = - IDirectDrawSurface7_Blt (ddrawsink->primary_surface, &destsurf_rect, - surface->surface, NULL, DDBLT_WAIT, NULL); - if (hRes != DD_OK) - GST_CAT_WARNING (directdrawsink_debug, - "IDirectDrawSurface7_Blt returned %s", DDErrorString (hRes)); - else - GST_CAT_INFO (directdrawsink_debug, - "allocated surface was blit to our primary"); - } - } + /* blit to our primary surface */ + hRes = IDirectDrawSurface7_Blt (ddrawsink->primary_surface, &destsurf_rect, + surface->surface, NULL, DDBLT_WAIT, NULL); + if (hRes != DD_OK) + GST_CAT_WARNING_OBJECT (directdrawsink_debug, ddrawsink, + "IDirectDrawSurface7_Blt (offscreen surface from buffer_alloc) " + "returned %s", DDErrorString (hRes)); } - if (ddrawsink->bUseOverlay) - gst_directdrawsink_show_overlay (ddrawsink); - return GST_FLOW_OK; } static gboolean -gst_directdrawsink_setup_ddraw (GstDirectDrawSink * ddrawsink) +gst_directdraw_sink_setup_ddraw (GstDirectDrawSink * ddrawsink) { gboolean bRet = TRUE; HRESULT hRes; DDSURFACEDESC2 dd_surface_desc; - //create an instance of the ddraw object + /* create an instance of the ddraw object use DDCREATE_EMULATIONONLY as first parameter to + force Directdraw to use the hardware emulation layer */ hRes = DirectDrawCreateEx ( /*DDCREATE_EMULATIONONLY */ 0, (void **) &ddrawsink->ddraw_object, &IID_IDirectDraw7, NULL); - if (hRes != DD_OK || ddrawsink->ddraw_object == NULL) { - GST_CAT_ERROR (directdrawsink_debug, "DirectDrawCreate failed with: %s", - DDErrorString (hRes)); + GST_ELEMENT_ERROR (ddrawsink, RESOURCE, WRITE, + ("Failed to create the DirectDraw object error=%s", + DDErrorString (hRes)), (NULL)); return FALSE; } /* set cooperative level */ hRes = IDirectDraw7_SetCooperativeLevel (ddrawsink->ddraw_object, ddrawsink->video_window, DDSCL_NORMAL); - if (hRes != DD_OK) { - GST_CAT_ERROR (directdrawsink_debug, "SetCooperativeLevel failed with: %s", - DDErrorString (hRes)); - bRet = FALSE; + GST_ELEMENT_ERROR (ddrawsink, RESOURCE, WRITE, + ("Failed to set the set the cooperative level error=%s", + DDErrorString (hRes)), (NULL)); + return FALSE; } - if (!ddrawsink->extern_surface) { - /*create our primary surface */ - memset (&dd_surface_desc, 0, sizeof (dd_surface_desc)); - dd_surface_desc.dwSize = sizeof (dd_surface_desc); - dd_surface_desc.dwFlags = DDSD_CAPS; - dd_surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; - - hRes = - IDirectDraw7_CreateSurface (ddrawsink->ddraw_object, &dd_surface_desc, - &ddrawsink->primary_surface, NULL); - if (hRes != DD_OK) { - GST_CAT_ERROR (directdrawsink_debug, - "CreateSurface (primary) failed with: %s", DDErrorString (hRes)); - IDirectDraw7_Release (ddrawsink->ddraw_object); - return FALSE; - } - - /* setup the clipper object */ - hRes = IDirectDraw7_CreateClipper (ddrawsink->ddraw_object, 0, - &ddrawsink->clipper, NULL); - if (hRes == DD_OK) { - hRes = IDirectDrawClipper_SetHWnd (ddrawsink->clipper, 0, - ddrawsink->video_window); - - hRes = IDirectDrawSurface7_SetClipper (ddrawsink->primary_surface, - ddrawsink->clipper); - } - - } else { - DDSURFACEDESC2 desc_surface; - - desc_surface.dwSize = sizeof (DDSURFACEDESC2); - - /*get extern surface size */ - hRes = IDirectDrawSurface7_GetSurfaceDesc (ddrawsink->extern_surface, - &desc_surface); - if (hRes != DD_OK) { - /*error while retrieving ext surface description */ - return FALSE; - } - - ddrawsink->out_width = desc_surface.dwWidth; - ddrawsink->out_height = desc_surface.dwHeight; - - /*get extern surface pixel format (FIXME not needed if we are using overlays) */ - ddrawsink->dd_pixel_format.dwSize = sizeof (DDPIXELFORMAT); - hRes = IDirectDrawSurface7_GetPixelFormat (ddrawsink->extern_surface, - &ddrawsink->dd_pixel_format); - if (hRes != DD_OK) { - /*error while retrieving ext surface pixel format */ - GST_CAT_WARNING (directdrawsink_debug, - "GetPixelFormat (ddrawsink->extern_surface) failed with: %s", - DDErrorString (hRes)); - return FALSE; - } + /*create our primary surface */ + memset (&dd_surface_desc, 0, sizeof (dd_surface_desc)); + dd_surface_desc.dwSize = sizeof (dd_surface_desc); + dd_surface_desc.dwFlags = DDSD_CAPS; + dd_surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; + hRes = IDirectDraw7_CreateSurface (ddrawsink->ddraw_object, &dd_surface_desc, + &ddrawsink->primary_surface, NULL); + if (hRes != DD_OK) { + GST_ELEMENT_ERROR (ddrawsink, RESOURCE, WRITE, + ("Failed to create our primary surface error=%s", DDErrorString (hRes)), + (NULL)); + return FALSE; + } - /*get specific caps if needed ... */ + /* setup the clipper object */ + hRes = IDirectDraw7_CreateClipper (ddrawsink->ddraw_object, 0, + &ddrawsink->clipper, NULL); + if (hRes == DD_OK) { + hRes = IDirectDrawClipper_SetHWnd (ddrawsink->clipper, 0, + ddrawsink->video_window); + hRes = IDirectDrawSurface7_SetClipper (ddrawsink->primary_surface, + ddrawsink->clipper); } + /* directdraw objects are setup */ ddrawsink->setup = TRUE; return bRet; @@ -1382,24 +1086,6 @@ WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) switch (message) { case WM_ERASEBKGND: return TRUE; -/* case WM_WINDOWPOSCHANGED: - case WM_MOVE: - case WM_SIZE: - if(global_ddrawsink && global_ddrawsink->bUseOverlay) - gst_directdrawsink_show_overlay(global_ddrawsink); - break; - case WM_PAINT: - if(global_ddrawsink && global_ddrawsink->bUseOverlay) - { - if(global_ddrawsink->extern_surface) - gst_directdrawsink_fill_colorkey(global_ddrawsink->extern_surface, - global_ddrawsink->color_key); - else - gst_directdrawsink_fill_colorkey(global_ddrawsink->primary_surface, - global_ddrawsink->color_key); - } - break; -*/ case WM_DESTROY: PostQuitMessage (0); break; @@ -1411,12 +1097,11 @@ WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) } static gpointer -gst_directdrawsink_window_thread (GstDirectDrawSink * ddrawsink) +gst_directdraw_sink_window_thread (GstDirectDrawSink * ddrawsink) { WNDCLASS WndClass; memset (&WndClass, 0, sizeof (WNDCLASS)); - WndClass.style = CS_HREDRAW | CS_VREDRAW; WndClass.hInstance = GetModuleHandle (NULL); WndClass.lpszClassName = "GStreamer-DirectDraw"; @@ -1425,24 +1110,22 @@ gst_directdrawsink_window_thread (GstDirectDrawSink * ddrawsink) WndClass.cbWndExtra = 0; WndClass.lpfnWndProc = WndProc; WndClass.hCursor = LoadCursor (NULL, IDC_ARROW); - RegisterClass (&WndClass); ddrawsink->video_window = CreateWindowEx (0, "GStreamer-DirectDraw", "GStreamer-DirectDraw sink default window", WS_OVERLAPPEDWINDOW | WS_SIZEBOX, 0, 0, 640, 480, NULL, NULL, WndClass.hInstance, NULL); - if (ddrawsink->video_window == NULL) return FALSE; /* signal application we create a window */ gst_x_overlay_got_xwindow_id (GST_X_OVERLAY (ddrawsink), - ddrawsink->video_window); + (gulong) ddrawsink->video_window); ReleaseSemaphore (ddrawsink->window_created_signal, 1, NULL); - /*start message loop processing our default window messages */ + /* start message loop processing our default window messages */ while (1) { MSG msg; @@ -1455,14 +1138,14 @@ gst_directdrawsink_window_thread (GstDirectDrawSink * ddrawsink) } static gboolean -gst_directdrawsink_create_default_window (GstDirectDrawSink * ddrawsink) +gst_directdraw_sink_create_default_window (GstDirectDrawSink * ddrawsink) { ddrawsink->window_created_signal = CreateSemaphore (NULL, 0, 1, NULL); if (ddrawsink->window_created_signal == NULL) return FALSE; ddrawsink->window_thread = g_thread_create ( - (GThreadFunc) gst_directdrawsink_window_thread, ddrawsink, TRUE, NULL); + (GThreadFunc) gst_directdraw_sink_window_thread, ddrawsink, TRUE, NULL); if (ddrawsink->window_thread == NULL) goto failed; @@ -1477,18 +1160,20 @@ gst_directdrawsink_create_default_window (GstDirectDrawSink * ddrawsink) failed: CloseHandle (ddrawsink->window_created_signal); + GST_ELEMENT_ERROR (ddrawsink, RESOURCE, WRITE, + ("Error creating our default window"), (NULL)); + return FALSE; } static gboolean -gst_directdrawsink_create_ddraw_surfaces (GstDirectDrawSink * ddrawsink) +gst_directdraw_sink_create_ddraw_surface (GstDirectDrawSink * ddrawsink) { DDSURFACEDESC2 dd_surface_desc; HRESULT hRes; memset (&dd_surface_desc, 0, sizeof (dd_surface_desc)); dd_surface_desc.dwSize = sizeof (dd_surface_desc); - dd_surface_desc.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT; dd_surface_desc.dwHeight = ddrawsink->video_height; @@ -1496,45 +1181,22 @@ gst_directdrawsink_create_ddraw_surfaces (GstDirectDrawSink * ddrawsink) memcpy (&(dd_surface_desc.ddpfPixelFormat), &ddrawsink->dd_pixel_format, sizeof (DDPIXELFORMAT)); - if (ddrawsink->bUseOverlay) { - /*create overlays flipping chain */ - dd_surface_desc.ddsCaps.dwCaps = - DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_FLIP | DDSCAPS_COMPLEX; - dd_surface_desc.dwFlags |= DDSD_BACKBUFFERCOUNT; - dd_surface_desc.dwBackBufferCount = 1; - - hRes = - IDirectDraw7_CreateSurface (ddrawsink->ddraw_object, &dd_surface_desc, - &ddrawsink->overlays, NULL); - - if (hRes != DD_OK) { - GST_CAT_WARNING (directdrawsink_debug, - "create_ddraw_surfaces:CreateSurface(overlays) failed %s", - DDErrorString (hRes)); - return FALSE; - } else { - GST_CAT_INFO (directdrawsink_debug, - "An overlay surfaces flipping chain was created"); - } - } else { - dd_surface_desc.ddsCaps.dwCaps = - DDSCAPS_OFFSCREENPLAIN /*|DDSCAPS_SYSTEMMEMORY */ ; - hRes = - IDirectDraw7_CreateSurface (ddrawsink->ddraw_object, &dd_surface_desc, - &ddrawsink->offscreen_surface, NULL); - if (hRes != DD_OK) { - GST_CAT_WARNING (directdrawsink_debug, - "create_ddraw_surfaces:CreateSurface(offscreen) failed %s", - DDErrorString (hRes)); - return FALSE; - } + dd_surface_desc.ddsCaps.dwCaps = + DDSCAPS_OFFSCREENPLAIN /*|DDSCAPS_SYSTEMMEMORY */ ; + hRes = + IDirectDraw7_CreateSurface (ddrawsink->ddraw_object, &dd_surface_desc, + &ddrawsink->offscreen_surface, NULL); + if (hRes != DD_OK) { + GST_CAT_WARNING_OBJECT (directdrawsink_debug, ddrawsink, + "create_ddraw_surface:CreateSurface (offscreen surface for buffer_pool) failed %s", + DDErrorString (hRes)); + return FALSE; } - return TRUE; } static void -gst_directdrawsink_get_times (GstBaseSink * bsink, GstBuffer * buf, +gst_directdraw_sink_get_times (GstBaseSink * bsink, GstBuffer * buf, GstClockTime * start, GstClockTime * end) { GstDirectDrawSink *ddrawsink; @@ -1554,7 +1216,7 @@ gst_directdrawsink_get_times (GstBaseSink * bsink, GstBuffer * buf, } static int -gst_directdrawsink_get_depth (LPDDPIXELFORMAT lpddpfPixelFormat) +gst_directdraw_sink_get_depth (LPDDPIXELFORMAT lpddpfPixelFormat) { gint order = 0, binary; @@ -1580,7 +1242,7 @@ EnumModesCallback2 (LPDDSURFACEDESC2 lpDDSurfaceDesc, LPVOID lpContext) return DDENUMRET_CANCEL; if ((lpDDSurfaceDesc->dwFlags & DDSD_PIXELFORMAT) != DDSD_PIXELFORMAT) { - GST_CAT_INFO (directdrawsink_debug, + GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, "Display mode found with DDSD_PIXELFORMAT not set"); return DDENUMRET_OK; } @@ -1594,7 +1256,7 @@ EnumModesCallback2 (LPDDSURFACEDESC2 lpDDSurfaceDesc, LPVOID lpContext) "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, "bpp", G_TYPE_INT, lpDDSurfaceDesc->ddpfPixelFormat.dwRGBBitCount, "depth", G_TYPE_INT, - gst_directdrawsink_get_depth (&lpDDSurfaceDesc->ddpfPixelFormat), + gst_directdraw_sink_get_depth (&lpDDSurfaceDesc->ddpfPixelFormat), "endianness", G_TYPE_INT, G_LITTLE_ENDIAN, "red_mask", G_TYPE_INT, lpDDSurfaceDesc->ddpfPixelFormat.dwRBitMask, "green_mask", G_TYPE_INT, lpDDSurfaceDesc->ddpfPixelFormat.dwGBitMask, "blue_mask", G_TYPE_INT, @@ -1608,7 +1270,7 @@ EnumModesCallback2 (LPDDSURFACEDESC2 lpDDSurfaceDesc, LPVOID lpContext) } static GstCaps * -gst_directdrawsink_get_ddrawcaps (GstDirectDrawSink * ddrawsink) +gst_directdraw_sink_get_ddrawcaps (GstDirectDrawSink * ddrawsink) { HRESULT hRes = S_OK; DWORD dwFourccCodeIndex = 0; @@ -1629,26 +1291,25 @@ gst_directdrawsink_get_ddrawcaps (GstDirectDrawSink * ddrawsink) &ddcaps_emulation); /* we don't test for DDCAPS_BLTSTRETCH on the hardware as the directdraw emulation layer can do it */ - - if (!(ddcaps_hardware.dwCaps & DDCAPS_BLTFOURCC)) { DDSURFACEDESC2 surface_desc; gint endianness = G_LITTLE_ENDIAN; gint depth; - GST_CAT_INFO (directdrawsink_debug, + GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, "hardware doesn't support blit from one colorspace to another one. " "so we will create a caps with only the current display mode"); surface_desc.dwSize = sizeof (DDSURFACEDESC); hRes = IDirectDraw7_GetDisplayMode (ddrawsink->ddraw_object, &surface_desc); if (hRes != DD_OK) { - GST_CAT_ERROR (directdrawsink_debug, - "Error getting the current display mode (%s)", DDErrorString (hRes)); + GST_ELEMENT_ERROR (ddrawsink, CORE, NEGOTIATION, + ("Error getting the current display mode error=%s", + DDErrorString (hRes)), (NULL)); return NULL; } - depth = gst_directdrawsink_get_depth (&surface_desc.ddpfPixelFormat); + depth = gst_directdraw_sink_get_depth (&surface_desc.ddpfPixelFormat); if (surface_desc.ddpfPixelFormat.dwRGBBitCount == 24 || surface_desc.ddpfPixelFormat.dwRGBBitCount == 32) { @@ -1660,6 +1321,11 @@ gst_directdrawsink_get_ddrawcaps (GstDirectDrawSink * ddrawsink) GUINT32_TO_BE (surface_desc.ddpfPixelFormat.dwGBitMask); surface_desc.ddpfPixelFormat.dwBBitMask = GUINT32_TO_BE (surface_desc.ddpfPixelFormat.dwBBitMask); + if (surface_desc.ddpfPixelFormat.dwRGBBitCount == 24) { + surface_desc.ddpfPixelFormat.dwRBitMask >>= 8; + surface_desc.ddpfPixelFormat.dwGBitMask >>= 8; + surface_desc.ddpfPixelFormat.dwBBitMask >>= 8; + } } format_caps = gst_caps_new_simple ("video/x-raw-rgb", @@ -1677,88 +1343,48 @@ gst_directdrawsink_get_ddrawcaps (GstDirectDrawSink * ddrawsink) gst_caps_append (ddrawsink->caps, format_caps); } - GST_CAT_INFO (directdrawsink_debug, "returning caps %s", + GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, "returning caps %s", gst_caps_to_string (ddrawsink->caps)); - return ddrawsink->caps; } - GST_CAT_INFO (directdrawsink_debug, + GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, "the hardware can blit from one colorspace to another, " "then enumerate the colorspace supported by the hardware"); /* enumerate display modes exposed by directdraw object - to know supported RGB mode */ + to know supported RGB modes */ hRes = IDirectDraw7_EnumDisplayModes (ddrawsink->ddraw_object, DDEDM_REFRESHRATES, NULL, ddrawsink, EnumModesCallback2); if (hRes != DD_OK) { - GST_CAT_WARNING (directdrawsink_debug, "EnumDisplayModes returns: %s", - DDErrorString (hRes)); - return FALSE; - } + GST_ELEMENT_ERROR (ddrawsink, CORE, NEGOTIATION, + ("Error enumerating display modes error=%s", DDErrorString (hRes)), + (NULL)); - /* enumerate non-rgb modes exposed by directdraw object */ -/* IDirectDraw7_GetFourCCCodes(ddrawsink->ddraw_object, &dwNbFourccCodes, NULL); - if(dwNbFourccCodes != 0) - { - pdwFourccCodes = g_new0(DWORD, dwNbFourccCodes); - if(!pdwFourccCodes) - return FALSE; - - if (FAILED(IDirectDraw7_GetFourCCCodes(ddrawsink->ddraw_object, &dwNbFourccCodes, - pdwFourccCodes))) - { - g_free(pdwFourccCodes); - return FALSE; - } - - for(dwFourccCodeIndex = 0; dwFourccCodeIndex < dwNbFourccCodes; dwFourccCodeIndex++) - { - /*support only yuv formats YUY2, UYVY, YVU9, YV12, AYUV - if(/*pdwFourccCodes[dwFourccCodeIndex] == mmioFOURCC('Y','U','Y','2') || - pdwFourccCodes[dwFourccCodeIndex] == mmioFOURCC('U','Y','V','Y') || - pdwFourccCodes[dwFourccCodeIndex] == mmioFOURCC('Y','V','U','9') || - pdwFourccCodes[dwFourccCodeIndex] == mmioFOURCC('Y','V','1','2') /*|| - pdwFourccCodes[dwFourccCodeIndex] == mmioFOURCC('A','Y','U','V') - ) - { - format_caps = gst_caps_new_simple ("video/x-raw-yuv", - "format", GST_TYPE_FOURCC, pdwFourccCodes[dwFourccCodeIndex], - "width", GST_TYPE_INT_RANGE, 1, G_MAXINT, - "height", GST_TYPE_INT_RANGE, 1, G_MAXINT, - "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL); - - if(format_caps) - gst_caps_append (ddrawsink->caps, format_caps); - } - } - - g_free(pdwFourccCodes); + return NULL; } -*/ if (gst_caps_is_empty (ddrawsink->caps)) { gst_caps_unref (ddrawsink->caps); - - GST_ELEMENT_ERROR (ddrawsink, STREAM, WRONG_TYPE, (NULL), - ("No supported format found")); + ddrawsink->caps = NULL; + GST_ELEMENT_ERROR (ddrawsink, CORE, NEGOTIATION, + ("No supported caps found."), (NULL)); return NULL; } -// GST_CAT_INFO (directdrawsink_debug, "returning caps %s", gst_caps_to_string (ddrawsink->caps)); + //GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, "returning caps %s", gst_caps_to_string (ddrawsink->caps)); return ddrawsink->caps; } /* Creates miniobject and our internal surface */ static GstDDrawSurface * -gst_directdrawsink_surface_create (GstDirectDrawSink * ddrawsink, +gst_directdraw_sink_surface_create (GstDirectDrawSink * ddrawsink, GstCaps * caps, size_t size) { GstDDrawSurface *surface = NULL; GstStructure *structure = NULL; gint pitch; - HRESULT hRes; DDSURFACEDESC2 surf_desc, surf_lock_desc; @@ -1777,15 +1403,15 @@ gst_directdrawsink_surface_create (GstDirectDrawSink * ddrawsink, structure = gst_caps_get_structure (caps, 0); if (!gst_structure_get_int (structure, "width", &surface->width) || !gst_structure_get_int (structure, "height", &surface->height)) { - GST_WARNING ("failed getting geometry from caps %" GST_PTR_FORMAT, caps); + GST_CAT_WARNING_OBJECT (directdrawsink_debug, ddrawsink, + "failed getting geometry from caps %" GST_PTR_FORMAT, caps); } pitch = GST_ROUND_UP_8 (size / surface->height); - - if (!gst_ddrawvideosink_get_format_from_caps (caps, + if (!gst_ddrawvideosink_get_format_from_caps (ddrawsink, caps, &surface->dd_pixel_format)) { - GST_WARNING ("failed getting pixel format from caps %" GST_PTR_FORMAT, - caps); + GST_CAT_WARNING_OBJECT (directdrawsink_debug, ddrawsink, + "failed getting pixel format from caps %" GST_PTR_FORMAT, caps); } if (ddrawsink->ddraw_object) { @@ -1798,16 +1424,12 @@ gst_directdrawsink_surface_create (GstDirectDrawSink * ddrawsink, DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT | DDSD_PITCH; surf_desc.dwHeight = surface->height; surf_desc.dwWidth = surface->width; - memcpy (&(surf_desc.ddpfPixelFormat), &surface->dd_pixel_format, sizeof (DDPIXELFORMAT)); hRes = IDirectDraw7_CreateSurface (ddrawsink->ddraw_object, &surf_desc, &surface->surface, NULL); if (hRes != DD_OK) { - /*gst_object_unref (surface); - surface = NULL; - goto beach; */ goto surface_pitch_bad; } @@ -1821,60 +1443,43 @@ gst_directdrawsink_surface_create (GstDirectDrawSink * ddrawsink, IDirectDrawSurface7_Restore (surface->surface); goto lock; } - surface->locked = TRUE; if (surf_lock_desc.lPitch != pitch) { - GST_CAT_INFO (directdrawsink_debug, - "DDraw stride/pitch %ld isn't as expected value %d, let's continue allocating buffer.", + GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, + "DDraw stride/pitch %ld isn't as expected value %d, let's continue allocating a system memory buffer.", surf_lock_desc.lPitch, pitch); /*Unlock the surface as we will change it to use system memory with a GStreamer compatible pitch */ hRes = IDirectDrawSurface_Unlock (surface->surface, NULL); goto surface_pitch_bad; } - - GST_CAT_INFO (directdrawsink_debug, - "allocating a surface of %d bytes (stride=%ld)\n", size, - surf_lock_desc.lPitch); GST_BUFFER_DATA (surface) = surf_lock_desc.lpSurface; GST_BUFFER_SIZE (surface) = surf_lock_desc.lPitch * surface->height; + GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, + "allocating a surface of %d bytes (stride=%ld)\n", size, + surf_lock_desc.lPitch); } else { surface_pitch_bad: GST_BUFFER (surface)->malloc_data = g_malloc (size); GST_BUFFER_DATA (surface) = GST_BUFFER (surface)->malloc_data; GST_BUFFER_SIZE (surface) = size; - -/* surf_desc.dwSize = sizeof(DDSURFACEDESC2); - surf_desc.dwFlags = DDSD_PITCH | DDSD_LPSURFACE | DDSD_HEIGHT | DDSD_WIDTH ||DDSD_PIXELFORMAT; - surf_desc.lpSurface = GST_BUFFER (surface)->malloc_data; - surf_desc.lPitch = pitch; - //surf_desc.dwHeight = surface->height; - surf_desc.dwWidth = surface->width; - hRes = IDirectDrawSurface7_SetSurfaceDesc(surface->surface, &surf_desc, 0); - printf("%\n", DDErrorString(hRes)); - - hRes = IDirectDrawSurface7_Lock (surface->surface, NULL, &surf_lock_desc, - DDLOCK_WAIT | DDLOCK_NOSYSLOCK, NULL); -*/ surface->surface = NULL; - /*printf ("allocating a buffer of %d bytes\n", size); */ + GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, + "allocating a system memory buffer of %d bytes", size); } /* Keep a ref to our sink */ surface->ddrawsink = gst_object_ref (ddrawsink); - /* - beach: - */ return surface; } /* We are called from the finalize method of miniobject, the object will be * destroyed so we just have to clean our internal stuff */ static void -gst_directdrawsink_surface_destroy (GstDirectDrawSink * ddrawsink, +gst_directdraw_sink_surface_destroy (GstDirectDrawSink * ddrawsink, GstDDrawSurface * surface) { g_return_if_fail (GST_IS_DIRECTDRAW_SINK (ddrawsink)); @@ -1910,7 +1515,7 @@ no_sink: } static void -gst_directdrawsink_bufferpool_clear (GstDirectDrawSink * ddrawsink) +gst_directdraw_sink_bufferpool_clear (GstDirectDrawSink * ddrawsink) { g_mutex_lock (ddrawsink->pool_lock); while (ddrawsink->buffer_pool) { @@ -1918,15 +1523,14 @@ gst_directdrawsink_bufferpool_clear (GstDirectDrawSink * ddrawsink) ddrawsink->buffer_pool = g_slist_delete_link (ddrawsink->buffer_pool, ddrawsink->buffer_pool); - gst_directdrawsink_surface_destroy (ddrawsink, surface); + gst_directdraw_sink_surface_destroy (ddrawsink, surface); } g_mutex_unlock (ddrawsink->pool_lock); } static void -gst_directdrawsink_cleanup (GstDirectDrawSink * ddrawsink) +gst_directdraw_sink_cleanup (GstDirectDrawSink * ddrawsink) { - /* Post quit message and wait for our event window thread */ if (ddrawsink->video_window && ddrawsink->our_video_window) PostMessage (ddrawsink->video_window, WM_QUIT, 0, 0); @@ -1937,15 +1541,10 @@ gst_directdrawsink_cleanup (GstDirectDrawSink * ddrawsink) } if (ddrawsink->buffer_pool) { - gst_directdrawsink_bufferpool_clear (ddrawsink); + gst_directdraw_sink_bufferpool_clear (ddrawsink); ddrawsink->buffer_pool = NULL; } - if (ddrawsink->overlays) { - IDirectDrawSurface7_Release (ddrawsink->overlays); - ddrawsink->overlays = NULL; - } - if (ddrawsink->offscreen_surface) { IDirectDrawSurface7_Release (ddrawsink->offscreen_surface); ddrawsink->offscreen_surface = NULL; diff --git a/sys/directdraw/gstdirectdrawsink.h b/sys/directdraw/gstdirectdrawsink.h index 1a32c5a5..85ed0824 100644 --- a/sys/directdraw/gstdirectdrawsink.h +++ b/sys/directdraw/gstdirectdrawsink.h @@ -33,7 +33,7 @@ #include G_BEGIN_DECLS -#define GST_TYPE_DIRECTDRAW_SINK (gst_directdrawsink_get_type()) +#define GST_TYPE_DIRECTDRAW_SINK (gst_directdraw_sink_get_type()) #define GST_DIRECTDRAW_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DIRECTDRAW_SINK,GstDirectDrawSink)) #define GST_DIRECTDRAW_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DIRECTDRAW_SINK,GstDirectDrawSinkClass)) #define GST_IS_DIRECTDRAW_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DIRECTDRAW_SINK)) @@ -85,7 +85,6 @@ struct _GstDirectDrawSink LPDIRECTDRAW ddraw_object; LPDIRECTDRAWSURFACE primary_surface; LPDIRECTDRAWSURFACE offscreen_surface; - LPDIRECTDRAWSURFACE overlays; LPDIRECTDRAWCLIPPER clipper; /* last buffer displayed (used for XOverlay interface expose method) */ @@ -105,8 +104,7 @@ struct _GstDirectDrawSink gint fps_n; gint fps_d; - /*properties*/ - LPDIRECTDRAWSURFACE extern_surface; + /* properties */ gboolean keep_aspect_ratio; /*pixel format */ @@ -117,11 +115,6 @@ struct _GstDirectDrawSink /* TRUE when directdraw objects are setup */ gboolean setup; - - /* overlays */ - gboolean bUseOverlay; - gboolean bIsOverlayVisible; - guint color_key; }; struct _GstDirectDrawSinkClass @@ -129,7 +122,7 @@ struct _GstDirectDrawSinkClass GstVideoSinkClass parent_class; }; -GType gst_directdrawsink_get_type (void); +GType gst_direct_drawsink_get_type (void); G_END_DECLS #endif /* __GST_DIRECTDRAWSINK_H__ */ -- cgit v1.2.1 From 2949448e31eceb4f2066712d669efb4b4a9b85aa Mon Sep 17 00:00:00 2001 From: Christian Schaller Date: Tue, 27 Feb 2007 12:02:03 +0000 Subject: [MOVED FROM GOOD] update copyright statements Original commit message from CVS: update copyright statements --- sys/directdraw/gstdirectdrawplugin.c | 5 +++++ sys/directdraw/gstdirectdrawsink.c | 8 ++++++-- sys/directdraw/gstdirectdrawsink.h | 5 +++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/sys/directdraw/gstdirectdrawplugin.c b/sys/directdraw/gstdirectdrawplugin.c index 14943020..190bd02e 100644 --- a/sys/directdraw/gstdirectdrawplugin.c +++ b/sys/directdraw/gstdirectdrawplugin.c @@ -1,5 +1,6 @@ /* GStreamer * Copyright (C) 2005 Sebastien Moutte +* Copyright (C) 2007 Pioneers of the Inevitable * * gstdirectdrawplugin.c: * @@ -17,6 +18,10 @@ * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. +* +* The development of this code was made possible due to the involvement +* of Pioneers of the Inevitable, the creators of the Songbird Music player +* */ #ifdef HAVE_CONFIG_H diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index 4dd0d834..b7e3fc86 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -1,5 +1,6 @@ /* GStreamer * Copyright (C) 2005 Sebastien Moutte +* Copyright (C) 2007 Pioneers of the Inevitable * * Based on directfb video sink * gstdirectdrawsink.c: @@ -18,6 +19,10 @@ * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. +* +* The development of this code was made possible due to the involvement +* of Pioneers of the Inevitable, the creators of the Songbird Music player +* */ /** @@ -1030,8 +1035,7 @@ gst_directdraw_sink_setup_ddraw (GstDirectDrawSink * ddrawsink) /* create an instance of the ddraw object use DDCREATE_EMULATIONONLY as first parameter to force Directdraw to use the hardware emulation layer */ - hRes = - DirectDrawCreateEx ( /*DDCREATE_EMULATIONONLY */ 0, + hRes = DirectDrawCreateEx ( /*DDCREATE_EMULATIONONLY */ 0, (void **) &ddrawsink->ddraw_object, &IID_IDirectDraw7, NULL); if (hRes != DD_OK || ddrawsink->ddraw_object == NULL) { GST_ELEMENT_ERROR (ddrawsink, RESOURCE, WRITE, diff --git a/sys/directdraw/gstdirectdrawsink.h b/sys/directdraw/gstdirectdrawsink.h index 85ed0824..3bd55dd3 100644 --- a/sys/directdraw/gstdirectdrawsink.h +++ b/sys/directdraw/gstdirectdrawsink.h @@ -1,5 +1,6 @@ /* GStreamer * Copyright (C) 2005 Sebastien Moutte + * Copyright (C) 2007 Pioneers of the Inevitable * * gstdirectdrawsink.h: * @@ -17,6 +18,10 @@ * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. + * + * The development of this code was made possible due to the involvement + * of Pioneers of the Inevitable, the creators of the Songbird Music player + * */ -- cgit v1.2.1 From bf5c0a89f0078ea886e80eeaaf826003cd515982 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Moutte?= Date: Sun, 11 Mar 2007 22:23:04 +0000 Subject: [MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.*: Handle display mode changes during playback. Original commit message from CVS: * sys/directdraw/gstdirectdrawsink.c: * sys/directdraw/gstdirectdrawsink.h: Handle display mode changes during playback. --- sys/directdraw/gstdirectdrawsink.c | 1137 +++++++++++++++++++++--------------- sys/directdraw/gstdirectdrawsink.h | 9 + 2 files changed, 686 insertions(+), 460 deletions(-) diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index b7e3fc86..ab778c84 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -30,7 +30,7 @@ * * * - * DirectdrawSink renders video frames to any win32 window. This element can receive + * DirectdrawSink renders video RGB frames to any win32 window. This element can receive * a window ID from the application through the XOverlay interface and will then render * video frames in this window. * If no Window ID was provided by the application, the element will create its @@ -88,21 +88,32 @@ static GstFlowReturn gst_directdraw_sink_show_frame (GstBaseSink * bsink, static gboolean gst_directdraw_sink_setup_ddraw (GstDirectDrawSink * ddrawsink); static gboolean gst_directdraw_sink_create_default_window (GstDirectDrawSink * ddrawsink); -static gboolean gst_directdraw_sink_create_ddraw_surface (GstDirectDrawSink * +static gboolean gst_directdraw_sink_check_primary_surface (GstDirectDrawSink * + ddrawsink); +static gboolean gst_directdraw_sink_check_offscreen_surface (GstDirectDrawSink * ddrawsink); static GstCaps *gst_directdraw_sink_get_ddrawcaps (GstDirectDrawSink * ddrawsink); +static GstCaps + *gst_directdraw_sink_create_caps_from_surfacedesc (LPDDSURFACEDESC2 desc); static void gst_directdraw_sink_cleanup (GstDirectDrawSink * ddrawsink); static void gst_directdraw_sink_bufferpool_clear (GstDirectDrawSink * ddrawsink); static void gst_directdraw_sink_ddraw_put (GstDirectDrawSink * ddrawsink, GstDDrawSurface * surface); +static gboolean gst_ddrawvideosink_get_format_from_caps (GstDirectDrawSink * + ddrawsink, GstCaps * caps, DDPIXELFORMAT * pPixelFormat); +static void gst_directdraw_sink_center_rect (GstDirectDrawSink * ddrawsink, + RECT src, RECT dst, RECT * result); +char *DDErrorString (HRESULT hr); /* surfaces management functions */ static void gst_directdraw_sink_surface_destroy (GstDirectDrawSink * ddrawsink, GstDDrawSurface * surface); static GstDDrawSurface *gst_directdraw_sink_surface_create (GstDirectDrawSink * ddrawsink, GstCaps * caps, size_t size); +static gboolean gst_directdraw_sink_surface_check (GstDirectDrawSink * + ddrawsink, GstDDrawSurface * surface); static GstStaticPadTemplate directdrawsink_sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", @@ -165,351 +176,30 @@ gst_directdraw_sink_expose (GstXOverlay * overlay) } static void -gst_directdraw_sink_xoverlay_interface_init (GstXOverlayClass * iface) -{ - iface->set_xwindow_id = gst_directdraw_sink_set_window_id; - iface->expose = gst_directdraw_sink_expose; -} - -static void -gst_directdraw_sink_init_interfaces (GType type) -{ - static const GInterfaceInfo iface_info = { - (GInterfaceInitFunc) gst_directdraw_sink_interface_init, - NULL, - NULL, - }; - - static const GInterfaceInfo xoverlay_info = { - (GInterfaceInitFunc) gst_directdraw_sink_xoverlay_interface_init, - NULL, - NULL, - }; - - g_type_add_interface_static (type, GST_TYPE_IMPLEMENTS_INTERFACE, - &iface_info); - g_type_add_interface_static (type, GST_TYPE_X_OVERLAY, &xoverlay_info); -} - -/* Utility functions */ - -/* this function fill a DDPIXELFORMAT using Gstreamer caps */ -static gboolean -gst_ddrawvideosink_get_format_from_caps (GstDirectDrawSink * ddrawsink, - GstCaps * caps, DDPIXELFORMAT * pPixelFormat) -{ - GstStructure *structure = NULL; - gboolean ret = TRUE; - - /* check params */ - g_return_val_if_fail (pPixelFormat, FALSE); - g_return_val_if_fail (caps, FALSE); - - /* init structure */ - memset (pPixelFormat, 0, sizeof (DDPIXELFORMAT)); - pPixelFormat->dwSize = sizeof (DDPIXELFORMAT); - - if (!(structure = gst_caps_get_structure (caps, 0))) { - GST_CAT_ERROR_OBJECT (directdrawsink_debug, ddrawsink, - "can't get structure pointer from caps"); - return FALSE; - } - - if (gst_structure_has_name (structure, "video/x-raw-rgb")) { - gint depth, bitcount, bitmask, endianness; - - pPixelFormat->dwFlags = DDPF_RGB; - ret &= gst_structure_get_int (structure, "bpp", &bitcount); - pPixelFormat->dwRGBBitCount = bitcount; - ret &= gst_structure_get_int (structure, "depth", &depth); - ret &= gst_structure_get_int (structure, "red_mask", &bitmask); - pPixelFormat->dwRBitMask = bitmask; - ret &= gst_structure_get_int (structure, "green_mask", &bitmask); - pPixelFormat->dwGBitMask = bitmask; - ret &= gst_structure_get_int (structure, "blue_mask", &bitmask); - pPixelFormat->dwBBitMask = bitmask; - - gst_structure_get_int (structure, "endianness", &endianness); - if (endianness == G_BIG_ENDIAN) { - endianness = G_LITTLE_ENDIAN; - pPixelFormat->dwRBitMask = GUINT32_TO_BE (pPixelFormat->dwRBitMask); - pPixelFormat->dwGBitMask = GUINT32_TO_BE (pPixelFormat->dwGBitMask); - pPixelFormat->dwBBitMask = GUINT32_TO_BE (pPixelFormat->dwBBitMask); - } - } else if (gst_structure_has_name (structure, "video/x-raw-yuv")) { - gint fourcc; - - pPixelFormat->dwFlags = DDPF_FOURCC; - ret &= gst_structure_get_fourcc (structure, "format", &fourcc); - pPixelFormat->dwFourCC = fourcc; - } else { - GST_CAT_WARNING_OBJECT (directdrawsink_debug, ddrawsink, - "unknown caps name received %" GST_PTR_FORMAT, caps); - ret = FALSE; - } - - return ret; -} - -/* This function centers the RECT of source surface to -a dest surface and set the result RECT into result */ -static void -gst_directdraw_sink_center_rect (GstDirectDrawSink * ddrawsink, RECT src, - RECT dst, RECT * result) -{ - gdouble src_ratio, dst_ratio; - long src_width = src.right; - long src_height = src.bottom; - long dst_width = dst.right - dst.left; - long dst_heigth = dst.bottom - dst.top; - long result_width = 0, result_height = 0; - - g_return_if_fail (result != NULL); - - src_ratio = (gdouble) src_width / src_height; - dst_ratio = (gdouble) dst_width / dst_heigth; - - if (src_ratio > dst_ratio) { - /* new height */ - result_height = (long) (dst_width / src_ratio); - - result->left = dst.left; - result->right = dst.right; - result->top = dst.top + (dst_heigth - result_height) / 2; - result->bottom = result->top + result_height; - - } else if (src_ratio < dst_ratio) { - /* new width */ - result_width = (long) (dst_heigth * src_ratio); - - result->top = dst.top; - result->bottom = dst.bottom; - result->left = dst.left + (dst_width - result_width) / 2; - result->right = result->left + result_width; - - } else { - /* same ratio */ - memcpy (result, &dst, sizeof (RECT)); - } - - GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, - "source is %ldx%ld dest is %ldx%ld, result is %ldx%ld with x,y %ldx%ld", - src_width, src_height, dst_width, dst_heigth, - result->right - result->left, result->bottom - result->top, result->left, - result->right); -} - -/** - * Get DirectDraw error message. - * @hr: HRESULT code - * Returns: Text representation of the error. - */ -char * -DDErrorString (HRESULT hr) -{ - switch (hr) { - case DDERR_ALREADYINITIALIZED: - return "DDERR_ALREADYINITIALIZED"; - case DDERR_CANNOTATTACHSURFACE: - return "DDERR_CANNOTATTACHSURFACE"; - case DDERR_CANNOTDETACHSURFACE: - return "DDERR_CANNOTDETACHSURFACE"; - case DDERR_CURRENTLYNOTAVAIL: - return "DDERR_CURRENTLYNOTAVAIL"; - case DDERR_EXCEPTION: - return "DDERR_EXCEPTION"; - case DDERR_GENERIC: - return "DDERR_GENERIC"; - case DDERR_HEIGHTALIGN: - return "DDERR_HEIGHTALIGN"; - case DDERR_INCOMPATIBLEPRIMARY: - return "DDERR_INCOMPATIBLEPRIMARY"; - case DDERR_INVALIDCAPS: - return "DDERR_INVALIDCAPS"; - case DDERR_INVALIDCLIPLIST: - return "DDERR_INVALIDCLIPLIST"; - case DDERR_INVALIDMODE: - return "DDERR_INVALIDMODE"; - case DDERR_INVALIDOBJECT: - return "DDERR_INVALIDOBJECT"; - case DDERR_INVALIDPARAMS: - return "DDERR_INVALIDPARAMS"; - case DDERR_INVALIDPIXELFORMAT: - return "DDERR_INVALIDPIXELFORMAT"; - case DDERR_INVALIDRECT: - return "DDERR_INVALIDRECT"; - case DDERR_LOCKEDSURFACES: - return "DDERR_LOCKEDSURFACES"; - case DDERR_NO3D: - return "DDERR_NO3D"; - case DDERR_NOALPHAHW: - return "DDERR_NOALPHAHW"; - case DDERR_NOCLIPLIST: - return "DDERR_NOCLIPLIST"; - case DDERR_NOCOLORCONVHW: - return "DDERR_NOCOLORCONVHW"; - case DDERR_NOCOOPERATIVELEVELSET: - return "DDERR_NOCOOPERATIVELEVELSET"; - case DDERR_NOCOLORKEY: - return "DDERR_NOCOLORKEY"; - case DDERR_NOCOLORKEYHW: - return "DDERR_NOCOLORKEYHW"; - case DDERR_NODIRECTDRAWSUPPORT: - return "DDERR_NODIRECTDRAWSUPPORT"; - case DDERR_NOEXCLUSIVEMODE: - return "DDERR_NOEXCLUSIVEMODE"; - case DDERR_NOFLIPHW: - return "DDERR_NOFLIPHW"; - case DDERR_NOGDI: - return "DDERR_NOGDI"; - case DDERR_NOMIRRORHW: - return "DDERR_NOMIRRORHW"; - case DDERR_NOTFOUND: - return "DDERR_NOTFOUND"; - case DDERR_NOOVERLAYHW: - return "DDERR_NOOVERLAYHW"; - case DDERR_NORASTEROPHW: - return "DDERR_NORASTEROPHW"; - case DDERR_NOROTATIONHW: - return "DDERR_NOROTATIONHW"; - case DDERR_NOSTRETCHHW: - return "DDERR_NOSTRETCHHW"; - case DDERR_NOT4BITCOLOR: - return "DDERR_NOT4BITCOLOR"; - case DDERR_NOT4BITCOLORINDEX: - return "DDERR_NOT4BITCOLORINDEX"; - case DDERR_NOT8BITCOLOR: - return "DDERR_NOT8BITCOLOR"; - case DDERR_NOTEXTUREHW: - return "DDERR_NOTEXTUREHW"; - case DDERR_NOVSYNCHW: - return "DDERR_NOVSYNCHW"; - case DDERR_NOZBUFFERHW: - return "DDERR_NOZBUFFERHW"; - case DDERR_NOZOVERLAYHW: - return "DDERR_NOZOVERLAYHW"; - case DDERR_OUTOFCAPS: - return "DDERR_OUTOFCAPS"; - case DDERR_OUTOFMEMORY: - return "DDERR_OUTOFMEMORY"; - case DDERR_OUTOFVIDEOMEMORY: - return "DDERR_OUTOFVIDEOMEMORY"; - case DDERR_OVERLAYCANTCLIP: - return "DDERR_OVERLAYCANTCLIP"; - case DDERR_OVERLAYCOLORKEYONLYONEACTIVE: - return "DDERR_OVERLAYCOLORKEYONLYONEACTIVE"; - case DDERR_PALETTEBUSY: - return "DDERR_PALETTEBUSY"; - case DDERR_COLORKEYNOTSET: - return "DDERR_COLORKEYNOTSET"; - case DDERR_SURFACEALREADYATTACHED: - return "DDERR_SURFACEALREADYATTACHED"; - case DDERR_SURFACEALREADYDEPENDENT: - return "DDERR_SURFACEALREADYDEPENDENT"; - case DDERR_SURFACEBUSY: - return "DDERR_SURFACEBUSY"; - case DDERR_CANTLOCKSURFACE: - return "DDERR_CANTLOCKSURFACE"; - case DDERR_SURFACEISOBSCURED: - return "DDERR_SURFACEISOBSCURED"; - case DDERR_SURFACELOST: - return "DDERR_SURFACELOST"; - case DDERR_SURFACENOTATTACHED: - return "DDERR_SURFACENOTATTACHED"; - case DDERR_TOOBIGHEIGHT: - return "DDERR_TOOBIGHEIGHT"; - case DDERR_TOOBIGSIZE: - return "DDERR_TOOBIGSIZE"; - case DDERR_TOOBIGWIDTH: - return "DDERR_TOOBIGWIDTH"; - case DDERR_UNSUPPORTED: - return "DDERR_UNSUPPORTED"; - case DDERR_UNSUPPORTEDFORMAT: - return "DDERR_UNSUPPORTEDFORMAT"; - case DDERR_UNSUPPORTEDMASK: - return "DDERR_UNSUPPORTEDMASK"; - case DDERR_VERTICALBLANKINPROGRESS: - return "DDERR_VERTICALBLANKINPROGRESS"; - case DDERR_WASSTILLDRAWING: - return "DDERR_WASSTILLDRAWING"; - case DDERR_XALIGN: - return "DDERR_XALIGN"; - case DDERR_INVALIDDIRECTDRAWGUID: - return "DDERR_INVALIDDIRECTDRAWGUID"; - case DDERR_DIRECTDRAWALREADYCREATED: - return "DDERR_DIRECTDRAWALREADYCREATED"; - case DDERR_NODIRECTDRAWHW: - return "DDERR_NODIRECTDRAWHW"; - case DDERR_PRIMARYSURFACEALREADYEXISTS: - return "DDERR_PRIMARYSURFACEALREADYEXISTS"; - case DDERR_NOEMULATION: - return "DDERR_NOEMULATION"; - case DDERR_REGIONTOOSMALL: - return "DDERR_REGIONTOOSMALL"; - case DDERR_CLIPPERISUSINGHWND: - return "DDERR_CLIPPERISUSINGHWND"; - case DDERR_NOCLIPPERATTACHED: - return "DDERR_NOCLIPPERATTACHED"; - case DDERR_NOHWND: - return "DDERR_NOHWND"; - case DDERR_HWNDSUBCLASSED: - return "DDERR_HWNDSUBCLASSED"; - case DDERR_HWNDALREADYSET: - return "DDERR_HWNDALREADYSET"; - case DDERR_NOPALETTEATTACHED: - return "DDERR_NOPALETTEATTACHED"; - case DDERR_NOPALETTEHW: - return "DDERR_NOPALETTEHW"; - case DDERR_BLTFASTCANTCLIP: - return "DDERR_BLTFASTCANTCLIP"; - case DDERR_NOBLTHW: - return "DDERR_NOBLTHW"; - case DDERR_NODDROPSHW: - return "DDERR_NODDROPSHW"; - case DDERR_OVERLAYNOTVISIBLE: - return "DDERR_OVERLAYNOTVISIBLE"; - case DDERR_NOOVERLAYDEST: - return "DDERR_NOOVERLAYDEST"; - case DDERR_INVALIDPOSITION: - return "DDERR_INVALIDPOSITION"; - case DDERR_NOTAOVERLAYSURFACE: - return "DDERR_NOTAOVERLAYSURFACE"; - case DDERR_EXCLUSIVEMODEALREADYSET: - return "DDERR_EXCLUSIVEMODEALREADYSET"; - case DDERR_NOTFLIPPABLE: - return "DDERR_NOTFLIPPABLE"; - case DDERR_CANTDUPLICATE: - return "DDERR_CANTDUPLICATE"; - case DDERR_NOTLOCKED: - return "DDERR_NOTLOCKED"; - case DDERR_CANTCREATEDC: - return "DDERR_CANTCREATEDC"; - case DDERR_NODC: - return "DDERR_NODC"; - case DDERR_WRONGMODE: - return "DDERR_WRONGMODE"; - case DDERR_IMPLICITLYCREATED: - return "DDERR_IMPLICITLYCREATED"; - case DDERR_NOTPALETTIZED: - return "DDERR_NOTPALETTIZED"; - case DDERR_UNSUPPORTEDMODE: - return "DDERR_UNSUPPORTEDMODE"; - case DDERR_NOMIPMAPHW: - return "DDERR_NOMIPMAPHW"; - case DDERR_INVALIDSURFACETYPE: - return "DDERR_INVALIDSURFACETYPE"; - case DDERR_DCALREADYCREATED: - return "DDERR_DCALREADYCREATED"; - case DDERR_CANTPAGELOCK: - return "DDERR_CANTPAGELOCK"; - case DDERR_CANTPAGEUNLOCK: - return "DDERR_CANTPAGEUNLOCK"; - case DDERR_NOTPAGELOCKED: - return "DDERR_NOTPAGELOCKED"; - case DDERR_NOTINITIALIZED: - return "DDERR_NOTINITIALIZED"; - } - return "Unknown Error"; +gst_directdraw_sink_xoverlay_interface_init (GstXOverlayClass * iface) +{ + iface->set_xwindow_id = gst_directdraw_sink_set_window_id; + iface->expose = gst_directdraw_sink_expose; +} + +static void +gst_directdraw_sink_init_interfaces (GType type) +{ + static const GInterfaceInfo iface_info = { + (GInterfaceInitFunc) gst_directdraw_sink_interface_init, + NULL, + NULL, + }; + + static const GInterfaceInfo xoverlay_info = { + (GInterfaceInitFunc) gst_directdraw_sink_xoverlay_interface_init, + NULL, + NULL, + }; + + g_type_add_interface_static (type, GST_TYPE_IMPLEMENTS_INTERFACE, + &iface_info); + g_type_add_interface_static (type, GST_TYPE_X_OVERLAY, &xoverlay_info); } /* Subclass of GstBuffer which manages buffer_pool surfaces lifetime */ @@ -574,7 +264,8 @@ gst_ddrawsurface_finalize (GstDDrawSurface * surface) if ((surface->width != ddrawsink->video_width) || (surface->height != ddrawsink->video_height) || (memcmp (&surface->dd_pixel_format, &ddrawsink->dd_pixel_format, - sizeof (DDPIXELFORMAT)) != 0) + sizeof (DDPIXELFORMAT)) != 0 || + !gst_directdraw_sink_surface_check (ddrawsink, surface)) ) { GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, "destroy image as its size changed %dx%d vs current %dx%d", @@ -724,6 +415,8 @@ gst_directdraw_sink_init (GstDirectDrawSink * ddrawsink, ddrawsink->buffer_pool = NULL; ddrawsink->keep_aspect_ratio = FALSE; ddrawsink->pool_lock = g_mutex_new (); + ddrawsink->can_blit_between_colorspace = TRUE; + ddrawsink->must_recreate_offscreen = FALSE; memset (&ddrawsink->dd_pixel_format, 0, sizeof (DDPIXELFORMAT)); /*video default values */ @@ -794,7 +487,7 @@ gst_directdraw_sink_set_caps (GstBaseSink * bsink, GstCaps * caps) } /* create an offscreen surface with the caps */ - ret = gst_directdraw_sink_create_ddraw_surface (ddrawsink); + ret = gst_directdraw_sink_check_offscreen_surface (ddrawsink); if (!ret) { GST_ELEMENT_ERROR (ddrawsink, CORE, NEGOTIATION, ("Can't create a directdraw offscreen surface with the input caps"), @@ -851,13 +544,13 @@ gst_directdraw_sink_buffer_alloc (GstBaseSink * bsink, guint64 offset, { GstDirectDrawSink *ddrawsink = GST_DIRECTDRAW_SINK (bsink); GstDDrawSurface *surface = NULL; - GstStructure *structure = NULL; GstFlowReturn ret = GST_FLOW_OK; + GstCaps *buffer_caps = caps; + gboolean buffercaps_unref = FALSE; GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, "a buffer of %d bytes was requested", size); - structure = gst_caps_get_structure (caps, 0); g_mutex_lock (ddrawsink->pool_lock); /* Inspect our buffer pool */ @@ -872,7 +565,8 @@ gst_directdraw_sink_buffer_alloc (GstBaseSink * bsink, guint64 offset, if ((surface->width != ddrawsink->video_width) || (surface->height != ddrawsink->video_height) || (memcmp (&surface->dd_pixel_format, &ddrawsink->dd_pixel_format, - sizeof (DDPIXELFORMAT))) + sizeof (DDPIXELFORMAT)) || + !gst_directdraw_sink_surface_check (ddrawsink, surface)) ) { gst_directdraw_sink_surface_destroy (ddrawsink, surface); surface = NULL; @@ -883,20 +577,111 @@ gst_directdraw_sink_buffer_alloc (GstBaseSink * bsink, guint64 offset, } } + if (!ddrawsink->can_blit_between_colorspace) { + /* Hardware doesn't support blit from one colorspace to another. + * Check if the colorspace of the current display mode has changed since + * the last negociation. If it's the case, we will have to renegociate + */ + guint depth; + HRESULT hres; + DDSURFACEDESC2 surface_desc; + GstStructure *structure = NULL; + + structure = gst_caps_get_structure (caps, 0); + if (!gst_structure_get_int (structure, "depth", &depth)) { + GST_CAT_DEBUG_OBJECT (directdrawsink_debug, ddrawsink, + "Can't get depth from buffer_alloc caps"); + return GST_FLOW_ERROR; + } + surface_desc.dwSize = sizeof (DDSURFACEDESC); + hres = IDirectDraw7_GetDisplayMode (ddrawsink->ddraw_object, &surface_desc); + if (hres != DD_OK) { + GST_CAT_DEBUG_OBJECT (directdrawsink_debug, ddrawsink, + "Can't get current display mode (error=%d)", hres); + return GST_FLOW_ERROR; + } + + if (depth != gst_directdraw_sink_get_depth (&surface_desc.ddpfPixelFormat)) { + GstCaps *copy_caps = NULL; + GstStructure *copy_structure = NULL; + GstCaps *display_caps = NULL; + GstStructure *display_structure = NULL; + + /* make a copy of the original caps */ + copy_caps = gst_caps_copy (caps); + copy_structure = gst_caps_get_structure (copy_caps, 0); + + display_caps = + gst_directdraw_sink_create_caps_from_surfacedesc (&surface_desc); + if (display_caps) { + display_structure = gst_caps_get_structure (display_caps, 0); + if (display_structure) { + gint bpp, endianness, red_mask, green_mask, blue_mask; + + /* get new display mode properties */ + gst_structure_get_int (display_structure, "depth", &depth); + gst_structure_get_int (display_structure, "bpp", &bpp); + gst_structure_get_int (display_structure, "endianness", &endianness); + gst_structure_get_int (display_structure, "red_mask", &red_mask); + gst_structure_get_int (display_structure, "green_mask", &green_mask); + gst_structure_get_int (display_structure, "blue_mask", &blue_mask); + + /* apply the new display mode changes to the previous caps */ + gst_structure_set (copy_structure, + "bpp", G_TYPE_INT, bpp, + "depth", G_TYPE_INT, depth, + "endianness", G_TYPE_INT, endianness, + "red_mask", G_TYPE_INT, red_mask, + "green_mask", G_TYPE_INT, green_mask, + "blue_mask", G_TYPE_INT, blue_mask, NULL); + + if (gst_pad_peer_accept_caps (GST_VIDEO_SINK_PAD (ddrawsink), + copy_caps)) { + buffer_caps = copy_caps; + buffercaps_unref = TRUE; + /* update buffer size needed to store video frames according to new caps */ + size = ddrawsink->video_width * ddrawsink->video_height * (bpp / 8); + + /* update our member pixel format */ + gst_ddrawvideosink_get_format_from_caps (ddrawsink, buffer_caps, + &ddrawsink->dd_pixel_format); + ddrawsink->must_recreate_offscreen = TRUE; + + GST_CAT_DEBUG_OBJECT (directdrawsink_debug, ddrawsink, + " desired caps %s \n\n new caps %s", gst_caps_to_string (caps), + gst_caps_to_string (buffer_caps)); + } else { + GST_CAT_DEBUG_OBJECT (directdrawsink_debug, ddrawsink, + "peer refused caps re-negociation " + "and we can't render with the current caps."); + ret = GST_FLOW_ERROR; + } + } + gst_caps_unref (display_caps); + } + + if (!buffercaps_unref) + gst_caps_unref (copy_caps); + } + } + /* We haven't found anything, creating a new one */ if (!surface) { - surface = gst_directdraw_sink_surface_create (ddrawsink, caps, size); + surface = gst_directdraw_sink_surface_create (ddrawsink, buffer_caps, size); } /* Now we should have a surface, set appropriate caps on it */ if (surface) { - gst_buffer_set_caps (GST_BUFFER (surface), caps); + gst_buffer_set_caps (GST_BUFFER (surface), buffer_caps); } g_mutex_unlock (ddrawsink->pool_lock); *buf = GST_BUFFER (surface); + if (buffercaps_unref) + gst_caps_unref (buffer_caps); + return ret; } @@ -912,13 +697,9 @@ gst_directdraw_sink_show_frame (GstBaseSink * bsink, GstBuffer * buf) /* save a reference to the input buffer */ if (ddrawsink->last_buffer != buf) { if (ddrawsink->last_buffer) { - GST_CAT_LOG_OBJECT (directdrawsink_debug, ddrawsink, "unreffing %p", - ddrawsink->last_buffer); gst_buffer_unref (ddrawsink->last_buffer); } } - GST_CAT_LOG_OBJECT (directdrawsink_debug, ddrawsink, - "reffing %p as our current buffer", buf); ddrawsink->last_buffer = gst_buffer_ref (buf); } else { /* use last buffer */ @@ -944,6 +725,17 @@ gst_directdraw_sink_show_frame (GstBaseSink * bsink, GstBuffer * buf) &destsurf_rect); } + if (ddrawsink->must_recreate_offscreen && ddrawsink->offscreen_surface) { + IDirectDrawSurface7_Release (ddrawsink->offscreen_surface); + ddrawsink->offscreen_surface = NULL; + } + + /* check for surfaces lost */ + if (!gst_directdraw_sink_check_primary_surface (ddrawsink) || + !gst_directdraw_sink_check_offscreen_surface (ddrawsink)) { + return GST_FLOW_ERROR; + } + if (!GST_IS_DDRAWSURFACE (buf) || ((GST_IS_DDRAWSURFACE (buf)) && (GST_BUFFER (buf)->malloc_data))) { /* We are receiving a system memory buffer so we will copy @@ -956,12 +748,6 @@ gst_directdraw_sink_show_frame (GstBaseSink * bsink, GstBuffer * buf) ZeroMemory (&surf_desc, sizeof (surf_desc)); surf_desc.dwSize = sizeof (surf_desc); - /* Check for lost surface */ - if (IDirectDrawSurface7_IsLost (ddrawsink->offscreen_surface) == - DDERR_SURFACELOST) { - IDirectDrawSurface7_Restore (ddrawsink->offscreen_surface); - } - /* Lock the surface */ hRes = IDirectDrawSurface7_Lock (ddrawsink->offscreen_surface, NULL, @@ -1009,11 +795,6 @@ gst_directdraw_sink_show_frame (GstBaseSink * bsink, GstBuffer * buf) IDirectDrawSurface7_Unlock (surface->surface, NULL); surface->locked = FALSE; - /* Check for lost surfaces */ - if (IDirectDrawSurface7_IsLost (surface->surface) == DDERR_SURFACELOST) { - IDirectDrawSurface7_Restore (surface->surface); - } - /* blit to our primary surface */ hRes = IDirectDrawSurface7_Blt (ddrawsink->primary_surface, &destsurf_rect, surface->surface, NULL, DDBLT_WAIT, NULL); @@ -1022,8 +803,349 @@ gst_directdraw_sink_show_frame (GstBaseSink * bsink, GstBuffer * buf) "IDirectDrawSurface7_Blt (offscreen surface from buffer_alloc) " "returned %s", DDErrorString (hRes)); } - - return GST_FLOW_OK; + + return GST_FLOW_OK; +} + +static void +gst_directdraw_sink_get_times (GstBaseSink * bsink, GstBuffer * buf, + GstClockTime * start, GstClockTime * end) +{ + GstDirectDrawSink *ddrawsink; + + ddrawsink = GST_DIRECTDRAW_SINK (bsink); + + if (GST_BUFFER_TIMESTAMP_IS_VALID (buf)) { + *start = GST_BUFFER_TIMESTAMP (buf); + if (GST_BUFFER_DURATION_IS_VALID (buf)) { + *end = *start + GST_BUFFER_DURATION (buf); + } else { + if (ddrawsink->fps_n > 0) { + *end = *start + (GST_SECOND * ddrawsink->fps_d) / ddrawsink->fps_n; + } + } + } +} + +/* Utility functions */ + +/* this function fill a DDPIXELFORMAT using Gstreamer caps */ +static gboolean +gst_ddrawvideosink_get_format_from_caps (GstDirectDrawSink * ddrawsink, + GstCaps * caps, DDPIXELFORMAT * pPixelFormat) +{ + GstStructure *structure = NULL; + gboolean ret = TRUE; + + /* check params */ + g_return_val_if_fail (pPixelFormat, FALSE); + g_return_val_if_fail (caps, FALSE); + + /* init structure */ + memset (pPixelFormat, 0, sizeof (DDPIXELFORMAT)); + pPixelFormat->dwSize = sizeof (DDPIXELFORMAT); + + if (!(structure = gst_caps_get_structure (caps, 0))) { + GST_CAT_ERROR_OBJECT (directdrawsink_debug, ddrawsink, + "can't get structure pointer from caps"); + return FALSE; + } + + if (gst_structure_has_name (structure, "video/x-raw-rgb")) { + gint depth, bitcount, bitmask, endianness; + + pPixelFormat->dwFlags = DDPF_RGB; + ret &= gst_structure_get_int (structure, "bpp", &bitcount); + pPixelFormat->dwRGBBitCount = bitcount; + ret &= gst_structure_get_int (structure, "depth", &depth); + ret &= gst_structure_get_int (structure, "red_mask", &bitmask); + pPixelFormat->dwRBitMask = bitmask; + ret &= gst_structure_get_int (structure, "green_mask", &bitmask); + pPixelFormat->dwGBitMask = bitmask; + ret &= gst_structure_get_int (structure, "blue_mask", &bitmask); + pPixelFormat->dwBBitMask = bitmask; + + gst_structure_get_int (structure, "endianness", &endianness); + if (endianness == G_BIG_ENDIAN) { + endianness = G_LITTLE_ENDIAN; + pPixelFormat->dwRBitMask = GUINT32_TO_BE (pPixelFormat->dwRBitMask); + pPixelFormat->dwGBitMask = GUINT32_TO_BE (pPixelFormat->dwGBitMask); + pPixelFormat->dwBBitMask = GUINT32_TO_BE (pPixelFormat->dwBBitMask); + } + } else if (gst_structure_has_name (structure, "video/x-raw-yuv")) { + gint fourcc; + + pPixelFormat->dwFlags = DDPF_FOURCC; + ret &= gst_structure_get_fourcc (structure, "format", &fourcc); + pPixelFormat->dwFourCC = fourcc; + } else { + GST_CAT_WARNING_OBJECT (directdrawsink_debug, ddrawsink, + "unknown caps name received %" GST_PTR_FORMAT, caps); + ret = FALSE; + } + + return ret; +} + +/* This function centers the RECT of source surface to +a dest surface and set the result RECT into result */ +static void +gst_directdraw_sink_center_rect (GstDirectDrawSink * ddrawsink, RECT src, + RECT dst, RECT * result) +{ + gdouble src_ratio, dst_ratio; + long src_width = src.right; + long src_height = src.bottom; + long dst_width = dst.right - dst.left; + long dst_heigth = dst.bottom - dst.top; + long result_width = 0, result_height = 0; + + g_return_if_fail (result != NULL); + + src_ratio = (gdouble) src_width / src_height; + dst_ratio = (gdouble) dst_width / dst_heigth; + + if (src_ratio > dst_ratio) { + /* new height */ + result_height = (long) (dst_width / src_ratio); + + result->left = dst.left; + result->right = dst.right; + result->top = dst.top + (dst_heigth - result_height) / 2; + result->bottom = result->top + result_height; + + } else if (src_ratio < dst_ratio) { + /* new width */ + result_width = (long) (dst_heigth * src_ratio); + + result->top = dst.top; + result->bottom = dst.bottom; + result->left = dst.left + (dst_width - result_width) / 2; + result->right = result->left + result_width; + + } else { + /* same ratio */ + memcpy (result, &dst, sizeof (RECT)); + } + + GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, + "source is %ldx%ld dest is %ldx%ld, result is %ldx%ld with x,y %ldx%ld", + src_width, src_height, dst_width, dst_heigth, + result->right - result->left, result->bottom - result->top, result->left, + result->right); +} + +/** + * Get DirectDraw error message. + * @hr: HRESULT code + * Returns: Text representation of the error. + */ +char * +DDErrorString (HRESULT hr) +{ + switch (hr) { + case DDERR_ALREADYINITIALIZED: + return "DDERR_ALREADYINITIALIZED"; + case DDERR_CANNOTATTACHSURFACE: + return "DDERR_CANNOTATTACHSURFACE"; + case DDERR_CANNOTDETACHSURFACE: + return "DDERR_CANNOTDETACHSURFACE"; + case DDERR_CURRENTLYNOTAVAIL: + return "DDERR_CURRENTLYNOTAVAIL"; + case DDERR_EXCEPTION: + return "DDERR_EXCEPTION"; + case DDERR_GENERIC: + return "DDERR_GENERIC"; + case DDERR_HEIGHTALIGN: + return "DDERR_HEIGHTALIGN"; + case DDERR_INCOMPATIBLEPRIMARY: + return "DDERR_INCOMPATIBLEPRIMARY"; + case DDERR_INVALIDCAPS: + return "DDERR_INVALIDCAPS"; + case DDERR_INVALIDCLIPLIST: + return "DDERR_INVALIDCLIPLIST"; + case DDERR_INVALIDMODE: + return "DDERR_INVALIDMODE"; + case DDERR_INVALIDOBJECT: + return "DDERR_INVALIDOBJECT"; + case DDERR_INVALIDPARAMS: + return "DDERR_INVALIDPARAMS"; + case DDERR_INVALIDPIXELFORMAT: + return "DDERR_INVALIDPIXELFORMAT"; + case DDERR_INVALIDRECT: + return "DDERR_INVALIDRECT"; + case DDERR_LOCKEDSURFACES: + return "DDERR_LOCKEDSURFACES"; + case DDERR_NO3D: + return "DDERR_NO3D"; + case DDERR_NOALPHAHW: + return "DDERR_NOALPHAHW"; + case DDERR_NOCLIPLIST: + return "DDERR_NOCLIPLIST"; + case DDERR_NOCOLORCONVHW: + return "DDERR_NOCOLORCONVHW"; + case DDERR_NOCOOPERATIVELEVELSET: + return "DDERR_NOCOOPERATIVELEVELSET"; + case DDERR_NOCOLORKEY: + return "DDERR_NOCOLORKEY"; + case DDERR_NOCOLORKEYHW: + return "DDERR_NOCOLORKEYHW"; + case DDERR_NODIRECTDRAWSUPPORT: + return "DDERR_NODIRECTDRAWSUPPORT"; + case DDERR_NOEXCLUSIVEMODE: + return "DDERR_NOEXCLUSIVEMODE"; + case DDERR_NOFLIPHW: + return "DDERR_NOFLIPHW"; + case DDERR_NOGDI: + return "DDERR_NOGDI"; + case DDERR_NOMIRRORHW: + return "DDERR_NOMIRRORHW"; + case DDERR_NOTFOUND: + return "DDERR_NOTFOUND"; + case DDERR_NOOVERLAYHW: + return "DDERR_NOOVERLAYHW"; + case DDERR_NORASTEROPHW: + return "DDERR_NORASTEROPHW"; + case DDERR_NOROTATIONHW: + return "DDERR_NOROTATIONHW"; + case DDERR_NOSTRETCHHW: + return "DDERR_NOSTRETCHHW"; + case DDERR_NOT4BITCOLOR: + return "DDERR_NOT4BITCOLOR"; + case DDERR_NOT4BITCOLORINDEX: + return "DDERR_NOT4BITCOLORINDEX"; + case DDERR_NOT8BITCOLOR: + return "DDERR_NOT8BITCOLOR"; + case DDERR_NOTEXTUREHW: + return "DDERR_NOTEXTUREHW"; + case DDERR_NOVSYNCHW: + return "DDERR_NOVSYNCHW"; + case DDERR_NOZBUFFERHW: + return "DDERR_NOZBUFFERHW"; + case DDERR_NOZOVERLAYHW: + return "DDERR_NOZOVERLAYHW"; + case DDERR_OUTOFCAPS: + return "DDERR_OUTOFCAPS"; + case DDERR_OUTOFMEMORY: + return "DDERR_OUTOFMEMORY"; + case DDERR_OUTOFVIDEOMEMORY: + return "DDERR_OUTOFVIDEOMEMORY"; + case DDERR_OVERLAYCANTCLIP: + return "DDERR_OVERLAYCANTCLIP"; + case DDERR_OVERLAYCOLORKEYONLYONEACTIVE: + return "DDERR_OVERLAYCOLORKEYONLYONEACTIVE"; + case DDERR_PALETTEBUSY: + return "DDERR_PALETTEBUSY"; + case DDERR_COLORKEYNOTSET: + return "DDERR_COLORKEYNOTSET"; + case DDERR_SURFACEALREADYATTACHED: + return "DDERR_SURFACEALREADYATTACHED"; + case DDERR_SURFACEALREADYDEPENDENT: + return "DDERR_SURFACEALREADYDEPENDENT"; + case DDERR_SURFACEBUSY: + return "DDERR_SURFACEBUSY"; + case DDERR_CANTLOCKSURFACE: + return "DDERR_CANTLOCKSURFACE"; + case DDERR_SURFACEISOBSCURED: + return "DDERR_SURFACEISOBSCURED"; + case DDERR_SURFACELOST: + return "DDERR_SURFACELOST"; + case DDERR_SURFACENOTATTACHED: + return "DDERR_SURFACENOTATTACHED"; + case DDERR_TOOBIGHEIGHT: + return "DDERR_TOOBIGHEIGHT"; + case DDERR_TOOBIGSIZE: + return "DDERR_TOOBIGSIZE"; + case DDERR_TOOBIGWIDTH: + return "DDERR_TOOBIGWIDTH"; + case DDERR_UNSUPPORTED: + return "DDERR_UNSUPPORTED"; + case DDERR_UNSUPPORTEDFORMAT: + return "DDERR_UNSUPPORTEDFORMAT"; + case DDERR_UNSUPPORTEDMASK: + return "DDERR_UNSUPPORTEDMASK"; + case DDERR_VERTICALBLANKINPROGRESS: + return "DDERR_VERTICALBLANKINPROGRESS"; + case DDERR_WASSTILLDRAWING: + return "DDERR_WASSTILLDRAWING"; + case DDERR_XALIGN: + return "DDERR_XALIGN"; + case DDERR_INVALIDDIRECTDRAWGUID: + return "DDERR_INVALIDDIRECTDRAWGUID"; + case DDERR_DIRECTDRAWALREADYCREATED: + return "DDERR_DIRECTDRAWALREADYCREATED"; + case DDERR_NODIRECTDRAWHW: + return "DDERR_NODIRECTDRAWHW"; + case DDERR_PRIMARYSURFACEALREADYEXISTS: + return "DDERR_PRIMARYSURFACEALREADYEXISTS"; + case DDERR_NOEMULATION: + return "DDERR_NOEMULATION"; + case DDERR_REGIONTOOSMALL: + return "DDERR_REGIONTOOSMALL"; + case DDERR_CLIPPERISUSINGHWND: + return "DDERR_CLIPPERISUSINGHWND"; + case DDERR_NOCLIPPERATTACHED: + return "DDERR_NOCLIPPERATTACHED"; + case DDERR_NOHWND: + return "DDERR_NOHWND"; + case DDERR_HWNDSUBCLASSED: + return "DDERR_HWNDSUBCLASSED"; + case DDERR_HWNDALREADYSET: + return "DDERR_HWNDALREADYSET"; + case DDERR_NOPALETTEATTACHED: + return "DDERR_NOPALETTEATTACHED"; + case DDERR_NOPALETTEHW: + return "DDERR_NOPALETTEHW"; + case DDERR_BLTFASTCANTCLIP: + return "DDERR_BLTFASTCANTCLIP"; + case DDERR_NOBLTHW: + return "DDERR_NOBLTHW"; + case DDERR_NODDROPSHW: + return "DDERR_NODDROPSHW"; + case DDERR_OVERLAYNOTVISIBLE: + return "DDERR_OVERLAYNOTVISIBLE"; + case DDERR_NOOVERLAYDEST: + return "DDERR_NOOVERLAYDEST"; + case DDERR_INVALIDPOSITION: + return "DDERR_INVALIDPOSITION"; + case DDERR_NOTAOVERLAYSURFACE: + return "DDERR_NOTAOVERLAYSURFACE"; + case DDERR_EXCLUSIVEMODEALREADYSET: + return "DDERR_EXCLUSIVEMODEALREADYSET"; + case DDERR_NOTFLIPPABLE: + return "DDERR_NOTFLIPPABLE"; + case DDERR_CANTDUPLICATE: + return "DDERR_CANTDUPLICATE"; + case DDERR_NOTLOCKED: + return "DDERR_NOTLOCKED"; + case DDERR_CANTCREATEDC: + return "DDERR_CANTCREATEDC"; + case DDERR_NODC: + return "DDERR_NODC"; + case DDERR_WRONGMODE: + return "DDERR_WRONGMODE"; + case DDERR_IMPLICITLYCREATED: + return "DDERR_IMPLICITLYCREATED"; + case DDERR_NOTPALETTIZED: + return "DDERR_NOTPALETTIZED"; + case DDERR_UNSUPPORTEDMODE: + return "DDERR_UNSUPPORTEDMODE"; + case DDERR_NOMIPMAPHW: + return "DDERR_NOMIPMAPHW"; + case DDERR_INVALIDSURFACETYPE: + return "DDERR_INVALIDSURFACETYPE"; + case DDERR_DCALREADYCREATED: + return "DDERR_DCALREADYCREATED"; + case DDERR_CANTPAGELOCK: + return "DDERR_CANTPAGELOCK"; + case DDERR_CANTPAGEUNLOCK: + return "DDERR_CANTPAGEUNLOCK"; + case DDERR_NOTPAGELOCKED: + return "DDERR_NOTPAGELOCKED"; + case DDERR_NOTINITIALIZED: + return "DDERR_NOTINITIALIZED"; + } + return "Unknown Error"; } static gboolean @@ -1031,7 +1153,6 @@ gst_directdraw_sink_setup_ddraw (GstDirectDrawSink * ddrawsink) { gboolean bRet = TRUE; HRESULT hRes; - DDSURFACEDESC2 dd_surface_desc; /* create an instance of the ddraw object use DDCREATE_EMULATIONONLY as first parameter to force Directdraw to use the hardware emulation layer */ @@ -1054,30 +1175,18 @@ gst_directdraw_sink_setup_ddraw (GstDirectDrawSink * ddrawsink) return FALSE; } - /*create our primary surface */ - memset (&dd_surface_desc, 0, sizeof (dd_surface_desc)); - dd_surface_desc.dwSize = sizeof (dd_surface_desc); - dd_surface_desc.dwFlags = DDSD_CAPS; - dd_surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; - hRes = IDirectDraw7_CreateSurface (ddrawsink->ddraw_object, &dd_surface_desc, - &ddrawsink->primary_surface, NULL); - if (hRes != DD_OK) { - GST_ELEMENT_ERROR (ddrawsink, RESOURCE, WRITE, - ("Failed to create our primary surface error=%s", DDErrorString (hRes)), - (NULL)); - return FALSE; - } - /* setup the clipper object */ hRes = IDirectDraw7_CreateClipper (ddrawsink->ddraw_object, 0, &ddrawsink->clipper, NULL); if (hRes == DD_OK) { hRes = IDirectDrawClipper_SetHWnd (ddrawsink->clipper, 0, ddrawsink->video_window); - hRes = IDirectDrawSurface7_SetClipper (ddrawsink->primary_surface, - ddrawsink->clipper); } + /* create our primary surface */ + if (!gst_directdraw_sink_check_primary_surface (ddrawsink)) + return FALSE; + /* directdraw objects are setup */ ddrawsink->setup = TRUE; @@ -1171,10 +1280,95 @@ failed: } static gboolean -gst_directdraw_sink_create_ddraw_surface (GstDirectDrawSink * ddrawsink) +gst_directdraw_sink_check_primary_surface (GstDirectDrawSink * ddrawsink) { + HRESULT hres; DDSURFACEDESC2 dd_surface_desc; - HRESULT hRes; + + /* if our primary surface already exist, check if it's not lost */ + if (ddrawsink->primary_surface) { + if (IDirectDrawSurface7_IsLost (ddrawsink->primary_surface) == DD_OK) { + /* no problem with our primary surface */ + return TRUE; + } else { + /* our primary surface was lost, try to restore it */ + if (IDirectDrawSurface7_Restore (ddrawsink->primary_surface) == DD_OK) { + /* restore is done */ + GST_CAT_LOG_OBJECT (directdrawsink_debug, ddrawsink, + "Our primary surface" " was restored after lost"); + return TRUE; + } else { + /* failed to restore our primary surface, + * probably because the display mode was changed. + * Release this surface and recreate a new one. + */ + GST_CAT_LOG_OBJECT (directdrawsink_debug, ddrawsink, + "Our primary surface" + " was lost and display mode has changed. Destroy and recreate our surface."); + IDirectDrawSurface7_Release (ddrawsink->primary_surface); + ddrawsink->primary_surface = NULL; + + /* also release offscreen surface */ + IDirectDrawSurface7_Release (ddrawsink->offscreen_surface); + ddrawsink->offscreen_surface = NULL; + } + } + } + + /* create our primary surface */ + memset (&dd_surface_desc, 0, sizeof (dd_surface_desc)); + dd_surface_desc.dwSize = sizeof (dd_surface_desc); + dd_surface_desc.dwFlags = DDSD_CAPS; + dd_surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; + hres = IDirectDraw7_CreateSurface (ddrawsink->ddraw_object, &dd_surface_desc, + &ddrawsink->primary_surface, NULL); + if (hres != DD_OK) { + GST_ELEMENT_ERROR (ddrawsink, RESOURCE, WRITE, + ("Failed to create our primary surface error=%s", DDErrorString (hres)), + (NULL)); + return FALSE; + } + + /* attach our clipper object to the new primary surface */ + if (ddrawsink->clipper) { + hres = IDirectDrawSurface7_SetClipper (ddrawsink->primary_surface, + ddrawsink->clipper); + } + + return TRUE; +} + +static gboolean +gst_directdraw_sink_check_offscreen_surface (GstDirectDrawSink * ddrawsink) +{ + DDSURFACEDESC2 dd_surface_desc; + HRESULT hres; + + /* if our offscreen surface already exist, check if it's not lost */ + if (ddrawsink->offscreen_surface) { + if (IDirectDrawSurface7_IsLost (ddrawsink->offscreen_surface) == DD_OK) { + /* no problem with our offscreen surface */ + return TRUE; + } else { + /* our offscreen surface was lost, try to restore it */ + if (IDirectDrawSurface7_Restore (ddrawsink->offscreen_surface) == DD_OK) { + /* restore is done */ + GST_CAT_LOG_OBJECT (directdrawsink_debug, ddrawsink, + "Our offscreen surface" " was restored after lost"); + return TRUE; + } else { + /* failed to restore our offscreen surface, + * probably because the display mode was changed. + * Release this surface and recreate a new one. + */ + GST_CAT_LOG_OBJECT (directdrawsink_debug, ddrawsink, + "Our offscreen surface" + " was lost and display mode has changed. Destroy and recreate our surface."); + IDirectDrawSurface7_Release (ddrawsink->offscreen_surface); + ddrawsink->offscreen_surface = NULL; + } + } + } memset (&dd_surface_desc, 0, sizeof (dd_surface_desc)); dd_surface_desc.dwSize = sizeof (dd_surface_desc); @@ -1185,38 +1379,19 @@ gst_directdraw_sink_create_ddraw_surface (GstDirectDrawSink * ddrawsink) memcpy (&(dd_surface_desc.ddpfPixelFormat), &ddrawsink->dd_pixel_format, sizeof (DDPIXELFORMAT)); - dd_surface_desc.ddsCaps.dwCaps = - DDSCAPS_OFFSCREENPLAIN /*|DDSCAPS_SYSTEMMEMORY */ ; - hRes = - IDirectDraw7_CreateSurface (ddrawsink->ddraw_object, &dd_surface_desc, + dd_surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; + hres = IDirectDraw7_CreateSurface (ddrawsink->ddraw_object, &dd_surface_desc, &ddrawsink->offscreen_surface, NULL); - if (hRes != DD_OK) { + if (hres != DD_OK) { GST_CAT_WARNING_OBJECT (directdrawsink_debug, ddrawsink, "create_ddraw_surface:CreateSurface (offscreen surface for buffer_pool) failed %s", - DDErrorString (hRes)); + DDErrorString (hres)); return FALSE; } - return TRUE; -} - -static void -gst_directdraw_sink_get_times (GstBaseSink * bsink, GstBuffer * buf, - GstClockTime * start, GstClockTime * end) -{ - GstDirectDrawSink *ddrawsink; - ddrawsink = GST_DIRECTDRAW_SINK (bsink); + ddrawsink->must_recreate_offscreen = FALSE; - if (GST_BUFFER_TIMESTAMP_IS_VALID (buf)) { - *start = GST_BUFFER_TIMESTAMP (buf); - if (GST_BUFFER_DURATION_IS_VALID (buf)) { - *end = *start + GST_BUFFER_DURATION (buf); - } else { - if (ddrawsink->fps_n > 0) { - *end = *start + (GST_SECOND * ddrawsink->fps_d) / ddrawsink->fps_n; - } - } - } + return TRUE; } static int @@ -1254,17 +1429,8 @@ EnumModesCallback2 (LPDDSURFACEDESC2 lpDDSurfaceDesc, LPVOID lpContext) if ((lpDDSurfaceDesc->ddpfPixelFormat.dwFlags & DDPF_RGB) != DDPF_RGB) return DDENUMRET_OK; - format_caps = gst_caps_new_simple ("video/x-raw-rgb", - "width", GST_TYPE_INT_RANGE, 1, G_MAXINT, - "height", GST_TYPE_INT_RANGE, 1, G_MAXINT, - "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, - "bpp", G_TYPE_INT, lpDDSurfaceDesc->ddpfPixelFormat.dwRGBBitCount, - "depth", G_TYPE_INT, - gst_directdraw_sink_get_depth (&lpDDSurfaceDesc->ddpfPixelFormat), - "endianness", G_TYPE_INT, G_LITTLE_ENDIAN, "red_mask", G_TYPE_INT, - lpDDSurfaceDesc->ddpfPixelFormat.dwRBitMask, "green_mask", G_TYPE_INT, - lpDDSurfaceDesc->ddpfPixelFormat.dwGBitMask, "blue_mask", G_TYPE_INT, - lpDDSurfaceDesc->ddpfPixelFormat.dwBBitMask, NULL); + format_caps = + gst_directdraw_sink_create_caps_from_surfacedesc (lpDDSurfaceDesc); if (format_caps) { gst_caps_append (ddrawsink->caps, format_caps); @@ -1273,6 +1439,49 @@ EnumModesCallback2 (LPDDSURFACEDESC2 lpDDSurfaceDesc, LPVOID lpContext) return DDENUMRET_OK; } +static GstCaps * +gst_directdraw_sink_create_caps_from_surfacedesc (LPDDSURFACEDESC2 desc) +{ + GstCaps *caps = NULL; + gint endianness = G_LITTLE_ENDIAN; + gint depth; + + if ((desc->ddpfPixelFormat.dwFlags & DDPF_RGB) != DDPF_RGB) + return NULL; + + depth = gst_directdraw_sink_get_depth (&desc->ddpfPixelFormat); + + if (desc->ddpfPixelFormat.dwRGBBitCount == 24 || + desc->ddpfPixelFormat.dwRGBBitCount == 32) { + /* ffmpegcolorspace handles 24/32 bpp RGB as big-endian. */ + endianness = G_BIG_ENDIAN; + desc->ddpfPixelFormat.dwRBitMask = + GUINT32_TO_BE (desc->ddpfPixelFormat.dwRBitMask); + desc->ddpfPixelFormat.dwGBitMask = + GUINT32_TO_BE (desc->ddpfPixelFormat.dwGBitMask); + desc->ddpfPixelFormat.dwBBitMask = + GUINT32_TO_BE (desc->ddpfPixelFormat.dwBBitMask); + if (desc->ddpfPixelFormat.dwRGBBitCount == 24) { + desc->ddpfPixelFormat.dwRBitMask >>= 8; + desc->ddpfPixelFormat.dwGBitMask >>= 8; + desc->ddpfPixelFormat.dwBBitMask >>= 8; + } + } + + caps = gst_caps_new_simple ("video/x-raw-rgb", + "width", GST_TYPE_INT_RANGE, 1, G_MAXINT, + "height", GST_TYPE_INT_RANGE, 1, G_MAXINT, + "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, + "bpp", G_TYPE_INT, desc->ddpfPixelFormat.dwRGBBitCount, + "depth", G_TYPE_INT, depth, + "endianness", G_TYPE_INT, endianness, + "red_mask", G_TYPE_INT, desc->ddpfPixelFormat.dwRBitMask, + "green_mask", G_TYPE_INT, desc->ddpfPixelFormat.dwGBitMask, + "blue_mask", G_TYPE_INT, desc->ddpfPixelFormat.dwBBitMask, NULL); + + return caps; +} + static GstCaps * gst_directdraw_sink_get_ddrawcaps (GstDirectDrawSink * ddrawsink) { @@ -1297,13 +1506,14 @@ gst_directdraw_sink_get_ddrawcaps (GstDirectDrawSink * ddrawsink) /* we don't test for DDCAPS_BLTSTRETCH on the hardware as the directdraw emulation layer can do it */ if (!(ddcaps_hardware.dwCaps & DDCAPS_BLTFOURCC)) { DDSURFACEDESC2 surface_desc; - gint endianness = G_LITTLE_ENDIAN; - gint depth; GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, "hardware doesn't support blit from one colorspace to another one. " "so we will create a caps with only the current display mode"); + /* save blit caps */ + ddrawsink->can_blit_between_colorspace = FALSE; + surface_desc.dwSize = sizeof (DDSURFACEDESC); hRes = IDirectDraw7_GetDisplayMode (ddrawsink->ddraw_object, &surface_desc); if (hRes != DD_OK) { @@ -1313,36 +1523,8 @@ gst_directdraw_sink_get_ddrawcaps (GstDirectDrawSink * ddrawsink) return NULL; } - depth = gst_directdraw_sink_get_depth (&surface_desc.ddpfPixelFormat); - - if (surface_desc.ddpfPixelFormat.dwRGBBitCount == 24 || - surface_desc.ddpfPixelFormat.dwRGBBitCount == 32) { - /* ffmpegcolorspace handles 24/32 bpp RGB as big-endian. */ - endianness = G_BIG_ENDIAN; - surface_desc.ddpfPixelFormat.dwRBitMask = - GUINT32_TO_BE (surface_desc.ddpfPixelFormat.dwRBitMask); - surface_desc.ddpfPixelFormat.dwGBitMask = - GUINT32_TO_BE (surface_desc.ddpfPixelFormat.dwGBitMask); - surface_desc.ddpfPixelFormat.dwBBitMask = - GUINT32_TO_BE (surface_desc.ddpfPixelFormat.dwBBitMask); - if (surface_desc.ddpfPixelFormat.dwRGBBitCount == 24) { - surface_desc.ddpfPixelFormat.dwRBitMask >>= 8; - surface_desc.ddpfPixelFormat.dwGBitMask >>= 8; - surface_desc.ddpfPixelFormat.dwBBitMask >>= 8; - } - } - - format_caps = gst_caps_new_simple ("video/x-raw-rgb", - "width", GST_TYPE_INT_RANGE, 1, G_MAXINT, - "height", GST_TYPE_INT_RANGE, 1, G_MAXINT, - "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, - "bpp", G_TYPE_INT, surface_desc.ddpfPixelFormat.dwRGBBitCount, - "depth", G_TYPE_INT, depth, - "endianness", G_TYPE_INT, endianness, - "red_mask", G_TYPE_INT, surface_desc.ddpfPixelFormat.dwRBitMask, - "green_mask", G_TYPE_INT, surface_desc.ddpfPixelFormat.dwGBitMask, - "blue_mask", G_TYPE_INT, surface_desc.ddpfPixelFormat.dwBBitMask, NULL); - + format_caps = + gst_directdraw_sink_create_caps_from_surfacedesc (&surface_desc); if (format_caps) { gst_caps_append (ddrawsink->caps, format_caps); } @@ -1356,6 +1538,9 @@ gst_directdraw_sink_get_ddrawcaps (GstDirectDrawSink * ddrawsink) "the hardware can blit from one colorspace to another, " "then enumerate the colorspace supported by the hardware"); + /* save blit caps */ + ddrawsink->can_blit_between_colorspace = TRUE; + /* enumerate display modes exposed by directdraw object to know supported RGB modes */ hRes = @@ -1376,7 +1561,8 @@ gst_directdraw_sink_get_ddrawcaps (GstDirectDrawSink * ddrawsink) ("No supported caps found."), (NULL)); return NULL; } - //GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, "returning caps %s", gst_caps_to_string (ddrawsink->caps)); + + /*GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, "returning caps %s", gst_caps_to_string (ddrawsink->caps)); */ return ddrawsink->caps; } @@ -1418,7 +1604,15 @@ gst_directdraw_sink_surface_create (GstDirectDrawSink * ddrawsink, "failed getting pixel format from caps %" GST_PTR_FORMAT, caps); } - if (ddrawsink->ddraw_object) { + /* disable return of directdraw surface to buffer alloc because actually I have no solution + * to handle display mode changes. The problem is that when the display mode is changed + * surface's memory is freed then the upstream filter would crash trying to write to this memory. + * Directdraw has a system lock (DDLOCK_NOSYSLOCK to disable it) to prevent display mode changes + * when a surface memory is locked but we need to disable this lock to return multiple buffers (surfaces) + * and do not lock directdraw API calls. + */ + if (0) { +/* if (ddrawsink->ddraw_object) {*/ /* Creating an internal surface which will be used as GstBuffer, we used the detected pixel format and video dimensions */ @@ -1518,6 +1712,29 @@ no_sink: return; } +static gboolean +gst_directdraw_sink_surface_check (GstDirectDrawSink * ddrawsink, + GstDDrawSurface * surface) +{ + if (!surface->surface) + return TRUE; /* system memory buffer */ + + if (IDirectDrawSurface7_IsLost (surface->surface) == DD_OK) { + /* no problem with this surface */ + return TRUE; + } else { + /* this surface was lost, try to restore it */ + if (IDirectDrawSurface7_Restore (ddrawsink->offscreen_surface) == DD_OK) { + /* restore is done */ + GST_CAT_LOG_OBJECT (directdrawsink_debug, ddrawsink, "A surface from our" + " bufferpool was restored after lost"); + return TRUE; + } + } + + return FALSE; +} + static void gst_directdraw_sink_bufferpool_clear (GstDirectDrawSink * ddrawsink) { diff --git a/sys/directdraw/gstdirectdrawsink.h b/sys/directdraw/gstdirectdrawsink.h index 3bd55dd3..68a2a14b 100644 --- a/sys/directdraw/gstdirectdrawsink.h +++ b/sys/directdraw/gstdirectdrawsink.h @@ -120,6 +120,15 @@ struct _GstDirectDrawSink /* TRUE when directdraw objects are setup */ gboolean setup; + + /* TRUE if the hardware support blitting from one colorspace to another */ + gboolean can_blit_between_colorspace; + + /* this flag is used to force re-creation of our offscreen surface + * it's need when hardware doesn't support fourcc blit and the bit deph + * of the current display mode changes. + */ + gboolean must_recreate_offscreen; }; struct _GstDirectDrawSinkClass -- cgit v1.2.1 From 0ebea33d76aa7591609e7315e364fb9a76081937 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Sun, 29 Apr 2007 13:56:18 +0000 Subject: [MOVED FROM GOOD] 80 char police Original commit message from CVS: 80 char police --- sys/directdraw/gstdirectdrawsink.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index ab778c84..ecff6343 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -30,9 +30,9 @@ * * * - * DirectdrawSink renders video RGB frames to any win32 window. This element can receive - * a window ID from the application through the XOverlay interface and will then render - * video frames in this window. + * DirectdrawSink renders video RGB frames to any win32 window. This element + * can receive a window ID from the application through the XOverlay interface + * and will then render video frames in this window. * If no Window ID was provided by the application, the element will create its * own internal window and render into it. * @@ -95,7 +95,7 @@ static gboolean gst_directdraw_sink_check_offscreen_surface (GstDirectDrawSink * static GstCaps *gst_directdraw_sink_get_ddrawcaps (GstDirectDrawSink * ddrawsink); static GstCaps - *gst_directdraw_sink_create_caps_from_surfacedesc (LPDDSURFACEDESC2 desc); + * gst_directdraw_sink_create_caps_from_surfacedesc (LPDDSURFACEDESC2 desc); static void gst_directdraw_sink_cleanup (GstDirectDrawSink * ddrawsink); static void gst_directdraw_sink_bufferpool_clear (GstDirectDrawSink * ddrawsink); -- cgit v1.2.1 From 032eeebb754035bb0e954314aefb74edf638e28e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Tue, 15 May 2007 17:22:58 +0000 Subject: [MOVED FROM GOOD] Add DIRECTDRAW_CFLAGS and DIRECTSOUND_CFLAGS to Makefile.am; save and restore the various flags in the directdraw/dir... Original commit message from CVS: * configure.ac: * sys/directdraw/Makefile.am: * sys/directsound/Makefile.am: Add DIRECTDRAW_CFLAGS and DIRECTSOUND_CFLAGS to Makefile.am; save and restore the various flags in the directdraw/directsound detection section. Apparently improves cross-compiling for win32 with mingw32 under some circumstances (#437539). --- sys/directdraw/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/directdraw/Makefile.am b/sys/directdraw/Makefile.am index 999f026e..3fa5e85f 100644 --- a/sys/directdraw/Makefile.am +++ b/sys/directdraw/Makefile.am @@ -2,8 +2,8 @@ plugin_LTLIBRARIES = libgstdirectdrawsink.la libgstdirectdrawsink_la_SOURCES = gstdirectdrawsink.c gstdirectdrawplugin.c libgstdirectdrawsink_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) \ - $(GST_PLUGINS_BASE_CFLAGS) + $(GST_PLUGINS_BASE_CFLAGS) $(DIRECTDRAW_CFLAGS) libgstdirectdrawsink_la_LIBADD = $(DIRECTDRAW_LIBS) \ $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) \ -lgstinterfaces-$(GST_MAJORMINOR) -libgstdirectdrawsink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) +libgstdirectdrawsink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(DIRECTDRAW_LDFLAGS) -- cgit v1.2.1 From b7476655fbb340f90162623d31b87353c19cb311 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 20 May 2007 14:59:46 +0000 Subject: [MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.c: Bunch of small fixes: remove static function that doesn't exist; declare another ... Original commit message from CVS: * sys/directdraw/gstdirectdrawsink.c: (gst_ddrawsurface_finalize), (gst_directdraw_sink_buffer_alloc), (gst_directdraw_sink_get_ddrawcaps), (gst_directdraw_sink_surface_create): Bunch of small fixes: remove static function that doesn't exist; declare another one that does; printf format fix; use right macro when specifying debug category; remove a bunch of unused variables; #if 0 out an unused chunk of code (partially fixes #439914). --- sys/directdraw/gstdirectdrawsink.c | 117 ++++++++++++++++++------------------- 1 file changed, 58 insertions(+), 59 deletions(-) diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index ecff6343..2ad0cb68 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -99,8 +99,7 @@ static GstCaps static void gst_directdraw_sink_cleanup (GstDirectDrawSink * ddrawsink); static void gst_directdraw_sink_bufferpool_clear (GstDirectDrawSink * ddrawsink); -static void gst_directdraw_sink_ddraw_put (GstDirectDrawSink * ddrawsink, - GstDDrawSurface * surface); +static int gst_directdraw_sink_get_depth (LPDDPIXELFORMAT lpddpfPixelFormat); static gboolean gst_ddrawvideosink_get_format_from_caps (GstDirectDrawSink * ddrawsink, GstCaps * caps, DDPIXELFORMAT * pPixelFormat); static void gst_directdraw_sink_center_rect (GstDirectDrawSink * ddrawsink, @@ -203,7 +202,7 @@ gst_directdraw_sink_init_interfaces (GType type) } /* Subclass of GstBuffer which manages buffer_pool surfaces lifetime */ -static void gst_ddrawsurface_finalize (GstDDrawSurface * surface); +static void gst_ddrawsurface_finalize (GstMiniObject * mini_object); static void gst_ddrawsurface_init (GstDDrawSurface * surface, gpointer g_class) @@ -250,11 +249,12 @@ gst_ddrawsurface_get_type (void) } static void -gst_ddrawsurface_finalize (GstDDrawSurface * surface) +gst_ddrawsurface_finalize (GstMiniObject * mini_object) { GstDirectDrawSink *ddrawsink = NULL; + GstDDrawSurface *surface; - g_return_if_fail (surface != NULL); + surface = (GstDDrawSurface *) mini_object; ddrawsink = surface->ddrawsink; if (!ddrawsink) @@ -288,7 +288,7 @@ gst_ddrawsurface_finalize (GstDDrawSurface * surface) return; no_sink: - GST_WARNING (directdrawsink_debug, "no sink found"); + GST_CAT_WARNING (directdrawsink_debug, "no sink found"); return; } @@ -597,7 +597,7 @@ gst_directdraw_sink_buffer_alloc (GstBaseSink * bsink, guint64 offset, hres = IDirectDraw7_GetDisplayMode (ddrawsink->ddraw_object, &surface_desc); if (hres != DD_OK) { GST_CAT_DEBUG_OBJECT (directdrawsink_debug, ddrawsink, - "Can't get current display mode (error=%d)", hres); + "Can't get current display mode (error=%ld)", (glong) hres); return GST_FLOW_ERROR; } @@ -1486,9 +1486,6 @@ static GstCaps * gst_directdraw_sink_get_ddrawcaps (GstDirectDrawSink * ddrawsink) { HRESULT hRes = S_OK; - DWORD dwFourccCodeIndex = 0; - LPDWORD pdwFourccCodes = NULL; - DWORD dwNbFourccCodes = 0; DDCAPS ddcaps_hardware; DDCAPS ddcaps_emulation; GstCaps *format_caps = NULL; @@ -1611,62 +1608,64 @@ gst_directdraw_sink_surface_create (GstDirectDrawSink * ddrawsink, * when a surface memory is locked but we need to disable this lock to return multiple buffers (surfaces) * and do not lock directdraw API calls. */ - if (0) { +#if 0 /* if (ddrawsink->ddraw_object) {*/ - /* Creating an internal surface which will be used as GstBuffer, we used - the detected pixel format and video dimensions */ - - surf_desc.ddsCaps.dwCaps = - DDSCAPS_OFFSCREENPLAIN /* | DDSCAPS_SYSTEMMEMORY */ ; - surf_desc.dwFlags = - DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT | DDSD_PITCH; - surf_desc.dwHeight = surface->height; - surf_desc.dwWidth = surface->width; - memcpy (&(surf_desc.ddpfPixelFormat), &surface->dd_pixel_format, - sizeof (DDPIXELFORMAT)); - - hRes = IDirectDraw7_CreateSurface (ddrawsink->ddraw_object, &surf_desc, - &surface->surface, NULL); - if (hRes != DD_OK) { - goto surface_pitch_bad; - } + /* Creating an internal surface which will be used as GstBuffer, we used + the detected pixel format and video dimensions */ + + surf_desc.ddsCaps.dwCaps = + DDSCAPS_OFFSCREENPLAIN /* | DDSCAPS_SYSTEMMEMORY */ ; + surf_desc.dwFlags = + DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT | DDSD_PITCH; + surf_desc.dwHeight = surface->height; + surf_desc.dwWidth = surface->width; + memcpy (&(surf_desc.ddpfPixelFormat), &surface->dd_pixel_format, + sizeof (DDPIXELFORMAT)); - /* Locking the surface to acquire the memory pointer. - Use DDLOCK_NOSYSLOCK to disable syslock which can cause a deadlock - if directdraw api is used while a buffer is lock */ - lock: - hRes = IDirectDrawSurface7_Lock (surface->surface, NULL, &surf_lock_desc, - DDLOCK_WAIT | DDLOCK_NOSYSLOCK, NULL); - if (hRes == DDERR_SURFACELOST) { - IDirectDrawSurface7_Restore (surface->surface); - goto lock; - } - surface->locked = TRUE; + hRes = IDirectDraw7_CreateSurface (ddrawsink->ddraw_object, &surf_desc, + &surface->surface, NULL); + if (hRes != DD_OK) { + goto surface_pitch_bad; + } - if (surf_lock_desc.lPitch != pitch) { - GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, - "DDraw stride/pitch %ld isn't as expected value %d, let's continue allocating a system memory buffer.", - surf_lock_desc.lPitch, pitch); + /* Locking the surface to acquire the memory pointer. + Use DDLOCK_NOSYSLOCK to disable syslock which can cause a deadlock + if directdraw api is used while a buffer is lock */ +lock: + hRes = IDirectDrawSurface7_Lock (surface->surface, NULL, &surf_lock_desc, + DDLOCK_WAIT | DDLOCK_NOSYSLOCK, NULL); + if (hRes == DDERR_SURFACELOST) { + IDirectDrawSurface7_Restore (surface->surface); + goto lock; + } + surface->locked = TRUE; - /*Unlock the surface as we will change it to use system memory with a GStreamer compatible pitch */ - hRes = IDirectDrawSurface_Unlock (surface->surface, NULL); - goto surface_pitch_bad; - } - GST_BUFFER_DATA (surface) = surf_lock_desc.lpSurface; - GST_BUFFER_SIZE (surface) = surf_lock_desc.lPitch * surface->height; + if (surf_lock_desc.lPitch != pitch) { GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, - "allocating a surface of %d bytes (stride=%ld)\n", size, - surf_lock_desc.lPitch); - } else { + "DDraw stride/pitch %ld isn't as expected value %d, let's continue allocating a system memory buffer.", + surf_lock_desc.lPitch, pitch); - surface_pitch_bad: - GST_BUFFER (surface)->malloc_data = g_malloc (size); - GST_BUFFER_DATA (surface) = GST_BUFFER (surface)->malloc_data; - GST_BUFFER_SIZE (surface) = size; - surface->surface = NULL; - GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, - "allocating a system memory buffer of %d bytes", size); + /*Unlock the surface as we will change it to use system memory with a GStreamer compatible pitch */ + hRes = IDirectDrawSurface_Unlock (surface->surface, NULL); + goto surface_pitch_bad; } + GST_BUFFER_DATA (surface) = surf_lock_desc.lpSurface; + GST_BUFFER_SIZE (surface) = surf_lock_desc.lPitch * surface->height; + GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, + "allocating a surface of %d bytes (stride=%ld)\n", size, + surf_lock_desc.lPitch); + +#else + +surface_pitch_bad: + GST_BUFFER (surface)->malloc_data = g_malloc (size); + GST_BUFFER_DATA (surface) = GST_BUFFER (surface)->malloc_data; + GST_BUFFER_SIZE (surface) = size; + surface->surface = NULL; + GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, + "allocating a system memory buffer of %d bytes", size); + +#endif /* Keep a ref to our sink */ surface->ddrawsink = gst_object_ref (ddrawsink); -- cgit v1.2.1 From 4c32422297fba581dc4c79f8bcfe412b604e6347 Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Thu, 24 May 2007 08:35:23 +0000 Subject: [MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.*: Fix more warnings when compiling with MingW (#439914). Original commit message from CVS: Patch by: Vincent Torri * sys/directdraw/gstdirectdrawsink.c: (gst_directdraw_sink_buffer_alloc), (gst_directdraw_sink_show_frame), (gst_directdraw_sink_check_primary_surface), (gst_directdraw_sink_check_offscreen_surface), (EnumModesCallback2), (gst_directdraw_sink_get_ddrawcaps), (gst_directdraw_sink_surface_create): * sys/directdraw/gstdirectdrawsink.h: Fix more warnings when compiling with MingW (#439914). --- sys/directdraw/gstdirectdrawsink.c | 47 ++++++++++++++++++++++++++------------ sys/directdraw/gstdirectdrawsink.h | 2 +- 2 files changed, 34 insertions(+), 15 deletions(-) diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index 2ad0cb68..300bfe07 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -585,6 +585,7 @@ gst_directdraw_sink_buffer_alloc (GstBaseSink * bsink, guint64 offset, guint depth; HRESULT hres; DDSURFACEDESC2 surface_desc; + DDSURFACEDESC2 *sd; GstStructure *structure = NULL; structure = gst_caps_get_structure (caps, 0); @@ -593,8 +594,11 @@ gst_directdraw_sink_buffer_alloc (GstBaseSink * bsink, guint64 offset, "Can't get depth from buffer_alloc caps"); return GST_FLOW_ERROR; } - surface_desc.dwSize = sizeof (DDSURFACEDESC); - hres = IDirectDraw7_GetDisplayMode (ddrawsink->ddraw_object, &surface_desc); + surface_desc.dwSize = sizeof (surface_desc); + sd = &surface_desc; + hres = + IDirectDraw7_GetDisplayMode (ddrawsink->ddraw_object, + (DDSURFACEDESC *) sd); if (hres != DD_OK) { GST_CAT_DEBUG_OBJECT (directdrawsink_debug, ddrawsink, "Can't get current display mode (error=%ld)", (glong) hres); @@ -744,14 +748,16 @@ gst_directdraw_sink_show_frame (GstBaseSink * bsink, GstBuffer * buf) LPBYTE data = NULL; guint src_pitch, line; DDSURFACEDESC2 surf_desc; + DDSURFACEDESC2 *sd; ZeroMemory (&surf_desc, sizeof (surf_desc)); surf_desc.dwSize = sizeof (surf_desc); + sd = &surf_desc; /* Lock the surface */ hRes = IDirectDrawSurface7_Lock (ddrawsink->offscreen_surface, NULL, - &surf_desc, DDLOCK_WAIT, NULL); + (DDSURFACEDESC *) sd, DDLOCK_WAIT, NULL); if (hRes != DD_OK) { GST_CAT_WARNING_OBJECT (directdrawsink_debug, ddrawsink, "gst_directdraw_sink_show_frame failed locking surface %s", @@ -1284,6 +1290,7 @@ gst_directdraw_sink_check_primary_surface (GstDirectDrawSink * ddrawsink) { HRESULT hres; DDSURFACEDESC2 dd_surface_desc; + DDSURFACEDESC2 *sd; /* if our primary surface already exist, check if it's not lost */ if (ddrawsink->primary_surface) { @@ -1320,7 +1327,9 @@ gst_directdraw_sink_check_primary_surface (GstDirectDrawSink * ddrawsink) dd_surface_desc.dwSize = sizeof (dd_surface_desc); dd_surface_desc.dwFlags = DDSD_CAPS; dd_surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; - hres = IDirectDraw7_CreateSurface (ddrawsink->ddraw_object, &dd_surface_desc, + sd = &dd_surface_desc; + hres = + IDirectDraw7_CreateSurface (ddrawsink->ddraw_object, (DDSURFACEDESC *) sd, &ddrawsink->primary_surface, NULL); if (hres != DD_OK) { GST_ELEMENT_ERROR (ddrawsink, RESOURCE, WRITE, @@ -1342,6 +1351,7 @@ static gboolean gst_directdraw_sink_check_offscreen_surface (GstDirectDrawSink * ddrawsink) { DDSURFACEDESC2 dd_surface_desc; + DDSURFACEDESC2 *sd; HRESULT hres; /* if our offscreen surface already exist, check if it's not lost */ @@ -1380,7 +1390,9 @@ gst_directdraw_sink_check_offscreen_surface (GstDirectDrawSink * ddrawsink) sizeof (DDPIXELFORMAT)); dd_surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; - hres = IDirectDraw7_CreateSurface (ddrawsink->ddraw_object, &dd_surface_desc, + sd = &dd_surface_desc; + hres = + IDirectDraw7_CreateSurface (ddrawsink->ddraw_object, (DDSURFACEDESC *) sd, &ddrawsink->offscreen_surface, NULL); if (hres != DD_OK) { GST_CAT_WARNING_OBJECT (directdrawsink_debug, ddrawsink, @@ -1412,25 +1424,26 @@ gst_directdraw_sink_get_depth (LPDDPIXELFORMAT lpddpfPixelFormat) } HRESULT WINAPI -EnumModesCallback2 (LPDDSURFACEDESC2 lpDDSurfaceDesc, LPVOID lpContext) +EnumModesCallback2 (LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext) { GstDirectDrawSink *ddrawsink = (GstDirectDrawSink *) lpContext; GstCaps *format_caps = NULL; + LPDDSURFACEDESC2 sd; if (!ddrawsink || !lpDDSurfaceDesc) return DDENUMRET_CANCEL; - if ((lpDDSurfaceDesc->dwFlags & DDSD_PIXELFORMAT) != DDSD_PIXELFORMAT) { + sd = (LPDDSURFACEDESC2) lpDDSurfaceDesc; + if ((sd->dwFlags & DDSD_PIXELFORMAT) != DDSD_PIXELFORMAT) { GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, "Display mode found with DDSD_PIXELFORMAT not set"); return DDENUMRET_OK; } - if ((lpDDSurfaceDesc->ddpfPixelFormat.dwFlags & DDPF_RGB) != DDPF_RGB) + if ((sd->ddpfPixelFormat.dwFlags & DDPF_RGB) != DDPF_RGB) return DDENUMRET_OK; - format_caps = - gst_directdraw_sink_create_caps_from_surfacedesc (lpDDSurfaceDesc); + format_caps = gst_directdraw_sink_create_caps_from_surfacedesc (sd); if (format_caps) { gst_caps_append (ddrawsink->caps, format_caps); @@ -1503,6 +1516,7 @@ gst_directdraw_sink_get_ddrawcaps (GstDirectDrawSink * ddrawsink) /* we don't test for DDCAPS_BLTSTRETCH on the hardware as the directdraw emulation layer can do it */ if (!(ddcaps_hardware.dwCaps & DDCAPS_BLTFOURCC)) { DDSURFACEDESC2 surface_desc; + DDSURFACEDESC2 *sd; GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, "hardware doesn't support blit from one colorspace to another one. " @@ -1511,8 +1525,11 @@ gst_directdraw_sink_get_ddrawcaps (GstDirectDrawSink * ddrawsink) /* save blit caps */ ddrawsink->can_blit_between_colorspace = FALSE; - surface_desc.dwSize = sizeof (DDSURFACEDESC); - hRes = IDirectDraw7_GetDisplayMode (ddrawsink->ddraw_object, &surface_desc); + surface_desc.dwSize = sizeof (surface_desc); + sd = &surface_desc; + hRes = + IDirectDraw7_GetDisplayMode (ddrawsink->ddraw_object, + (DDSURFACEDESC *) sd); if (hRes != DD_OK) { GST_ELEMENT_ERROR (ddrawsink, CORE, NEGOTIATION, ("Error getting the current display mode error=%s", @@ -1572,7 +1589,10 @@ gst_directdraw_sink_surface_create (GstDirectDrawSink * ddrawsink, GstDDrawSurface *surface = NULL; GstStructure *structure = NULL; gint pitch; + +#if 0 HRESULT hRes; +#endif DDSURFACEDESC2 surf_desc, surf_lock_desc; g_return_val_if_fail (GST_IS_DIRECTDRAW_SINK (ddrawsink), NULL); @@ -1655,9 +1675,8 @@ lock: "allocating a surface of %d bytes (stride=%ld)\n", size, surf_lock_desc.lPitch); -#else - surface_pitch_bad: +#else GST_BUFFER (surface)->malloc_data = g_malloc (size); GST_BUFFER_DATA (surface) = GST_BUFFER (surface)->malloc_data; GST_BUFFER_SIZE (surface) = size; diff --git a/sys/directdraw/gstdirectdrawsink.h b/sys/directdraw/gstdirectdrawsink.h index 68a2a14b..0026eb35 100644 --- a/sys/directdraw/gstdirectdrawsink.h +++ b/sys/directdraw/gstdirectdrawsink.h @@ -136,7 +136,7 @@ struct _GstDirectDrawSinkClass GstVideoSinkClass parent_class; }; -GType gst_direct_drawsink_get_type (void); +GType gst_directdraw_sink_get_type (void); G_END_DECLS #endif /* __GST_DIRECTDRAWSINK_H__ */ -- cgit v1.2.1 From 7e0f619ef2ba9fe40df099716bf5652df069cc87 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 8 Jun 2007 16:31:15 +0000 Subject: [MOVED FROM GOOD] Rename the keep-aspect-ratio property to force-aspect-ratio to make it consistent with xvimagesink and ximagesink. Original commit message from CVS: * docs/plugins/gst-plugins-bad-plugins.args: * sys/directdraw/gstdirectdrawsink.c: (gst_directdraw_sink_class_init): Rename the keep-aspect-ratio property to force-aspect-ratio to make it consistent with xvimagesink and ximagesink. --- sys/directdraw/gstdirectdrawsink.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index 300bfe07..5eff741c 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -342,8 +342,9 @@ gst_directdraw_sink_class_init (GstDirectDrawSinkClass * klass) /* install properties */ /* setup aspect ratio mode */ g_object_class_install_property (G_OBJECT_CLASS (klass), - PROP_KEEP_ASPECT_RATIO, g_param_spec_boolean ("keep-aspect-ratio", - "keep-aspect-ratio", "keep the aspect ratio or not", FALSE, + PROP_KEEP_ASPECT_RATIO, g_param_spec_boolean ("force-aspect-ratio", + "Force aspect ratio", + "When enabled, scaling will respect original aspect ratio", FALSE, G_PARAM_READWRITE)); } -- cgit v1.2.1 From 958dc325050cc5683e3ad21489568997737a3a53 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Thu, 14 Jun 2007 12:14:24 +0000 Subject: [MOVED FROM GOOD] Make sure to dist everything needed for win32 builds. Original commit message from CVS: * configure.ac: * sys/Makefile.am: * sys/directdraw/Makefile.am: * sys/directsound/Makefile.am: * sys/waveform/Makefile.am: Make sure to dist everything needed for win32 builds. --- sys/directdraw/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/directdraw/Makefile.am b/sys/directdraw/Makefile.am index 3fa5e85f..dddaf189 100644 --- a/sys/directdraw/Makefile.am +++ b/sys/directdraw/Makefile.am @@ -7,3 +7,5 @@ libgstdirectdrawsink_la_LIBADD = $(DIRECTDRAW_LIBS) \ $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) \ -lgstinterfaces-$(GST_MAJORMINOR) libgstdirectdrawsink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(DIRECTDRAW_LDFLAGS) + +noinst_HEADERS= gstdirectdrawsink.h -- cgit v1.2.1 From ca3a85c8338c9624a00fadddf8e9f59358e1931b Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Sat, 22 Sep 2007 08:12:57 +0000 Subject: [MOVED FROM GOOD] fix header and comments Original commit message from CVS: fix header and comments --- sys/directdraw/gstdirectdrawsink.c | 47 ++++++++++++++++++-------------------- sys/directdraw/gstdirectdrawsink.h | 15 ++++++------ 2 files changed, 29 insertions(+), 33 deletions(-) diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index 5eff741c..65c3df23 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -1,29 +1,26 @@ /* GStreamer -* Copyright (C) 2005 Sebastien Moutte -* Copyright (C) 2007 Pioneers of the Inevitable -* -* Based on directfb video sink -* gstdirectdrawsink.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., 59 Temple Place - Suite 330, -* Boston, MA 02111-1307, USA. -* -* The development of this code was made possible due to the involvement -* of Pioneers of the Inevitable, the creators of the Songbird Music player -* -*/ + * Copyright (C) 2005 Sebastien Moutte + * Copyright (C) 2007 Pioneers of the Inevitable + * + * 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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * The development of this code was made possible due to the involvement + * of Pioneers of the Inevitable, the creators of the Songbird Music player + * + */ /** * SECTION:element-directdrawsink diff --git a/sys/directdraw/gstdirectdrawsink.h b/sys/directdraw/gstdirectdrawsink.h index 0026eb35..9cb5f788 100644 --- a/sys/directdraw/gstdirectdrawsink.h +++ b/sys/directdraw/gstdirectdrawsink.h @@ -1,9 +1,7 @@ /* GStreamer - * Copyright (C) 2005 Sebastien Moutte + * Copyright (C) 2005 Sebastien Moutte * Copyright (C) 2007 Pioneers of the Inevitable * - * gstdirectdrawsink.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 @@ -24,7 +22,6 @@ * */ - #ifndef __GST_DIRECTDRAWSINK_H__ #define __GST_DIRECTDRAWSINK_H__ @@ -38,6 +35,7 @@ #include G_BEGIN_DECLS + #define GST_TYPE_DIRECTDRAW_SINK (gst_directdraw_sink_get_type()) #define GST_DIRECTDRAW_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DIRECTDRAW_SINK,GstDirectDrawSink)) #define GST_DIRECTDRAW_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DIRECTDRAW_SINK,GstDirectDrawSinkClass)) @@ -118,14 +116,14 @@ struct _GstDirectDrawSink /* thread processing our default window messages */ GThread *window_thread; - /* TRUE when directdraw objects are setup */ + /* TRUE when directdraw object is set up */ gboolean setup; - /* TRUE if the hardware support blitting from one colorspace to another */ + /* TRUE if the hardware supports blitting from one colorspace to another */ gboolean can_blit_between_colorspace; - /* this flag is used to force re-creation of our offscreen surface - * it's need when hardware doesn't support fourcc blit and the bit deph + /* This flag is used to force re-creation of our offscreen surface. + * It's needed when hardware doesn't support fourcc blit and the bit depth * of the current display mode changes. */ gboolean must_recreate_offscreen; @@ -139,4 +137,5 @@ struct _GstDirectDrawSinkClass GType gst_directdraw_sink_get_type (void); G_END_DECLS + #endif /* __GST_DIRECTDRAWSINK_H__ */ -- cgit v1.2.1 From 1e8cd75ae9e35c1951d0572f00dc8574f5c65611 Mon Sep 17 00:00:00 2001 From: Julien Moutte Date: Sat, 5 Jan 2008 21:20:08 +0000 Subject: [MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.c: Make sure we create our internal window only when we need it. That will give a ch... Original commit message from CVS: 2008-01-05 Julien Moutte * sys/directdraw/gstdirectdrawsink.c: (gst_directdraw_sink_set_window_id), (gst_directdraw_sink_set_caps), (gst_directdraw_sink_change_state), (gst_directdraw_sink_buffer_alloc), (gst_directdraw_sink_draw_borders), (gst_directdraw_sink_show_frame), (gst_directdraw_sink_setup_ddraw), (gst_directdraw_sink_window_thread), (gst_directdraw_sink_get_ddrawcaps), (gst_directdraw_sink_surface_create): Make sure we create our internal window only when we need it. That will give a chance to the application to get the prepare-xwindow-id bus message. Draw black borders when keeping aspect ratio. Handle the case where our rendering window disappears (closed or errors) like other sinks do. Various 80 columns fixes, improve state change order. That element could need some more love. --- sys/directdraw/gstdirectdrawsink.c | 181 +++++++++++++++++++++++++++++-------- 1 file changed, 143 insertions(+), 38 deletions(-) diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index 65c3df23..78406d27 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -146,13 +146,24 @@ gst_directdraw_sink_set_window_id (GstXOverlay * overlay, ULONG window_id) { GstDirectDrawSink *ddrawsink = GST_DIRECTDRAW_SINK (overlay); + GST_OBJECT_LOCK (ddrawsink); /* check if we are already using this window id */ - if (ddrawsink->video_window == (HWND) window_id) + if (ddrawsink->video_window == (HWND) window_id) { + GST_OBJECT_UNLOCK (ddrawsink); return; + } if (window_id) { HRESULT hres; + /* If we had an internal window, close it first */ + if (ddrawsink->video_window && ddrawsink->our_video_window) { + /* Trick to let the event thread know that it has to die silently */ + ddrawsink->our_video_window = FALSE; + /* Post quit message and wait for our event window thread */ + PostMessage (ddrawsink->video_window, WM_QUIT, 0, 0); + } + ddrawsink->video_window = (HWND) window_id; ddrawsink->our_video_window = FALSE; if (ddrawsink->setup) { @@ -161,6 +172,9 @@ gst_directdraw_sink_set_window_id (GstXOverlay * overlay, ULONG window_id) ddrawsink->video_window); } } + /* FIXME: Handle the case where window_id is 0 and we want the sink to + * create a new window when playback was already started (after set_caps) */ + GST_OBJECT_UNLOCK (ddrawsink); } static void @@ -476,6 +490,11 @@ gst_directdraw_sink_set_caps (GstBaseSink * bsink, GstCaps * caps) gst_x_overlay_prepare_xwindow_id (GST_X_OVERLAY (ddrawsink)); } + /* If we still don't have a window at that stage we create our own */ + if (!ddrawsink->video_window) { + gst_directdraw_sink_create_default_window (ddrawsink); + } + /* if we are rendering to our own window, resize it to video size */ if (ddrawsink->video_window && ddrawsink->our_video_window) { SetWindowPos (ddrawsink->video_window, NULL, @@ -499,26 +518,28 @@ static GstStateChangeReturn gst_directdraw_sink_change_state (GstElement * element, GstStateChange transition) { - GstDirectDrawSink *ddrawsink = GST_DIRECTDRAW_SINK (element);; + GstDirectDrawSink *ddrawsink = GST_DIRECTDRAW_SINK (element); + GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS; switch (transition) { case GST_STATE_CHANGE_NULL_TO_READY: - if (ddrawsink->video_window == NULL) - if (!gst_directdraw_sink_create_default_window (ddrawsink)) - return GST_STATE_CHANGE_FAILURE; - - if (!gst_directdraw_sink_setup_ddraw (ddrawsink)) - return GST_STATE_CHANGE_FAILURE; + if (!gst_directdraw_sink_setup_ddraw (ddrawsink)) { + ret = GST_STATE_CHANGE_FAILURE; + goto beach; + } - if (!(ddrawsink->caps = gst_directdraw_sink_get_ddrawcaps (ddrawsink))) - return GST_STATE_CHANGE_FAILURE; - break; - case GST_STATE_CHANGE_READY_TO_PAUSED: - break; - case GST_STATE_CHANGE_PAUSED_TO_PLAYING: + if (!(ddrawsink->caps = gst_directdraw_sink_get_ddrawcaps (ddrawsink))) { + ret = GST_STATE_CHANGE_FAILURE; + goto beach; + } break; - case GST_STATE_CHANGE_PLAYING_TO_PAUSED: + default: break; + } + + ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); + + switch (transition) { case GST_STATE_CHANGE_PAUSED_TO_READY: ddrawsink->fps_n = 0; ddrawsink->fps_d = 1; @@ -531,9 +552,12 @@ gst_directdraw_sink_change_state (GstElement * element, if (ddrawsink->setup) gst_directdraw_sink_cleanup (ddrawsink); break; + default: + break; } - return GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); +beach: + return ret; } static GstFlowReturn @@ -547,7 +571,7 @@ gst_directdraw_sink_buffer_alloc (GstBaseSink * bsink, guint64 offset, gboolean buffercaps_unref = FALSE; GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, - "a buffer of %d bytes was requested", size); + "a buffer of %u bytes was requested", size); g_mutex_lock (ddrawsink->pool_lock); @@ -687,6 +711,63 @@ gst_directdraw_sink_buffer_alloc (GstBaseSink * bsink, guint64 offset, return ret; } +static void +gst_directdraw_sink_draw_borders (GstDirectDrawSink * ddrawsink, RECT dst_rect) +{ + RECT win_rect, fill_rect; + POINT win_point; + HDC hdc; + + g_return_if_fail (GST_IS_DIRECTDRAW_SINK (ddrawsink)); + + /* Get the target window rect */ + win_point.x = 0; + win_point.y = 0; + ClientToScreen (ddrawsink->video_window, &win_point); + GetClientRect (ddrawsink->video_window, &win_rect); + OffsetRect (&win_rect, win_point.x, win_point.y); + + /* We acquire a drawing context */ + if (IDirectDrawSurface7_GetDC (ddrawsink->primary_surface, &hdc) == DD_OK) { + HBRUSH brush = CreateSolidBrush (RGB (0, 0, 0)); + + /* Left border */ + if (dst_rect.left > win_rect.left) { + fill_rect.left = win_rect.left; + fill_rect.top = win_rect.top; + fill_rect.bottom = win_rect.bottom; + fill_rect.right = dst_rect.left; + FillRect (hdc, &fill_rect, brush); + } + /* Right border */ + if (dst_rect.right < win_rect.right) { + fill_rect.top = win_rect.top; + fill_rect.left = dst_rect.right; + fill_rect.bottom = win_rect.bottom; + fill_rect.right = win_rect.right; + FillRect (hdc, &fill_rect, brush); + } + /* Top border */ + if (dst_rect.top > win_rect.top) { + fill_rect.top = win_rect.top; + fill_rect.left = win_rect.left; + fill_rect.right = win_rect.right; + fill_rect.bottom = dst_rect.top; + FillRect (hdc, &fill_rect, brush); + } + /* Bottom border */ + if (dst_rect.bottom < win_rect.bottom) { + fill_rect.top = dst_rect.bottom; + fill_rect.left = win_rect.left; + fill_rect.right = win_rect.right; + fill_rect.bottom = win_rect.bottom; + FillRect (hdc, &fill_rect, brush); + } + DeleteObject (brush); + IDirectDrawSurface7_ReleaseDC (ddrawsink->primary_surface, hdc); + } +} + static GstFlowReturn gst_directdraw_sink_show_frame (GstBaseSink * bsink, GstBuffer * buf) { @@ -711,6 +792,15 @@ gst_directdraw_sink_show_frame (GstBaseSink * bsink, GstBuffer * buf) return GST_FLOW_ERROR; /* get the video window position */ + GST_OBJECT_LOCK (ddrawsink); + if (G_UNLIKELY (!ddrawsink->video_window)) { + GST_OBJECT_UNLOCK (ddrawsink); + GST_CAT_WARNING_OBJECT (directdrawsink_debug, ddrawsink, + "gst_directdraw_sink_show_frame our video window disappeared"); + GST_ELEMENT_ERROR (ddrawsink, RESOURCE, NOT_FOUND, + ("Output window was closed"), (NULL)); + return GST_FLOW_ERROR; + } dest_surf_point.x = 0; dest_surf_point.y = 0; ClientToScreen (ddrawsink->video_window, &dest_surf_point); @@ -725,7 +815,9 @@ gst_directdraw_sink_show_frame (GstBaseSink * bsink, GstBuffer * buf) src_rect.right = ddrawsink->video_width; gst_directdraw_sink_center_rect (ddrawsink, src_rect, destsurf_rect, &destsurf_rect); + gst_directdraw_sink_draw_borders (ddrawsink, destsurf_rect); } + GST_OBJECT_UNLOCK (ddrawsink); if (ddrawsink->must_recreate_offscreen && ddrawsink->offscreen_surface) { IDirectDrawSurface7_Release (ddrawsink->offscreen_surface); @@ -780,17 +872,18 @@ gst_directdraw_sink_show_frame (GstBaseSink * bsink, GstBuffer * buf) return GST_FLOW_ERROR; } - /* blit to primary surface ( Blt will scale the video the dest rect surface if needed */ + /* blit to primary surface ( Blt will scale the video the dest rect surface + * if needed */ hRes = IDirectDrawSurface7_Blt (ddrawsink->primary_surface, &destsurf_rect, ddrawsink->offscreen_surface, NULL, DDBLT_WAIT, NULL); - if (hRes != DD_OK) + if (hRes != DD_OK) /* FIXME: Is it really safe to continue past here ? */ GST_CAT_WARNING_OBJECT (directdrawsink_debug, ddrawsink, "IDirectDrawSurface7_Blt (object's offscreen surface) " "returned %s", DDErrorString (hRes)); } else { - /* We are receiving a directdraw surface (previously returned by our buffer pool - So we will simply blit it on the primary surface */ + /* We are receiving a directdraw surface (previously returned by our buffer + * pool so we will simply blit it on the primary surface */ GstDDrawSurface *surface = NULL; surface = GST_DDRAWSURFACE (buf); @@ -802,7 +895,7 @@ gst_directdraw_sink_show_frame (GstBaseSink * bsink, GstBuffer * buf) /* blit to our primary surface */ hRes = IDirectDrawSurface7_Blt (ddrawsink->primary_surface, &destsurf_rect, surface->surface, NULL, DDBLT_WAIT, NULL); - if (hRes != DD_OK) + if (hRes != DD_OK) /* FIXME: Is it really safe to continue past here ? */ GST_CAT_WARNING_OBJECT (directdrawsink_debug, ddrawsink, "IDirectDrawSurface7_Blt (offscreen surface from buffer_alloc) " "returned %s", DDErrorString (hRes)); @@ -1158,8 +1251,8 @@ gst_directdraw_sink_setup_ddraw (GstDirectDrawSink * ddrawsink) gboolean bRet = TRUE; HRESULT hRes; - /* create an instance of the ddraw object use DDCREATE_EMULATIONONLY as first parameter to - force Directdraw to use the hardware emulation layer */ + /* create an instance of the ddraw object use DDCREATE_EMULATIONONLY as first + * parameter to force Directdraw to use the hardware emulation layer */ hRes = DirectDrawCreateEx ( /*DDCREATE_EMULATIONONLY */ 0, (void **) &ddrawsink->ddraw_object, &IID_IDirectDraw7, NULL); if (hRes != DD_OK || ddrawsink->ddraw_object == NULL) { @@ -1171,7 +1264,7 @@ gst_directdraw_sink_setup_ddraw (GstDirectDrawSink * ddrawsink) /* set cooperative level */ hRes = IDirectDraw7_SetCooperativeLevel (ddrawsink->ddraw_object, - ddrawsink->video_window, DDSCL_NORMAL); + NULL, DDSCL_NORMAL); if (hRes != DD_OK) { GST_ELEMENT_ERROR (ddrawsink, RESOURCE, WRITE, ("Failed to set the set the cooperative level error=%s", @@ -1182,10 +1275,6 @@ gst_directdraw_sink_setup_ddraw (GstDirectDrawSink * ddrawsink) /* setup the clipper object */ hRes = IDirectDraw7_CreateClipper (ddrawsink->ddraw_object, 0, &ddrawsink->clipper, NULL); - if (hRes == DD_OK) { - hRes = IDirectDrawClipper_SetHWnd (ddrawsink->clipper, 0, - ddrawsink->video_window); - } /* create our primary surface */ if (!gst_directdraw_sink_check_primary_surface (ddrawsink)) @@ -1236,6 +1325,9 @@ gst_directdraw_sink_window_thread (GstDirectDrawSink * ddrawsink) if (ddrawsink->video_window == NULL) return FALSE; + /* Set the clipper on that window */ + IDirectDrawClipper_SetHWnd (ddrawsink->clipper, 0, ddrawsink->video_window); + /* signal application we create a window */ gst_x_overlay_got_xwindow_id (GST_X_OVERLAY (ddrawsink), (gulong) ddrawsink->video_window); @@ -1246,8 +1338,18 @@ gst_directdraw_sink_window_thread (GstDirectDrawSink * ddrawsink) while (1) { MSG msg; - if (!GetMessage (&msg, ddrawsink->video_window, 0, 0)) + if (GetMessage (&msg, ddrawsink->video_window, 0, 0) <= 0) { + GST_CAT_LOG_OBJECT (directdrawsink_debug, ddrawsink, + "our window received WM_QUIT or error."); + /* The window could have changed, if it is not ours anymore we don't + * overwrite the current video window with NULL */ + if (ddrawsink->our_video_window) { + GST_OBJECT_LOCK (ddrawsink); + ddrawsink->video_window = NULL; + GST_OBJECT_UNLOCK (ddrawsink); + } break; + } DispatchMessage (&msg); } @@ -1511,7 +1613,8 @@ gst_directdraw_sink_get_ddrawcaps (GstDirectDrawSink * ddrawsink) IDirectDraw7_GetCaps (ddrawsink->ddraw_object, &ddcaps_hardware, &ddcaps_emulation); - /* we don't test for DDCAPS_BLTSTRETCH on the hardware as the directdraw emulation layer can do it */ + /* we don't test for DDCAPS_BLTSTRETCH on the hardware as the directdraw + * emulation layer can do it */ if (!(ddcaps_hardware.dwCaps & DDCAPS_BLTFOURCC)) { DDSURFACEDESC2 surface_desc; DDSURFACEDESC2 *sd; @@ -1574,7 +1677,8 @@ gst_directdraw_sink_get_ddrawcaps (GstDirectDrawSink * ddrawsink) return NULL; } - /*GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, "returning caps %s", gst_caps_to_string (ddrawsink->caps)); */ + /*GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, "returning caps %s", + * gst_caps_to_string (ddrawsink->caps)); */ return ddrawsink->caps; } @@ -1619,12 +1723,13 @@ gst_directdraw_sink_surface_create (GstDirectDrawSink * ddrawsink, "failed getting pixel format from caps %" GST_PTR_FORMAT, caps); } - /* disable return of directdraw surface to buffer alloc because actually I have no solution - * to handle display mode changes. The problem is that when the display mode is changed - * surface's memory is freed then the upstream filter would crash trying to write to this memory. - * Directdraw has a system lock (DDLOCK_NOSYSLOCK to disable it) to prevent display mode changes - * when a surface memory is locked but we need to disable this lock to return multiple buffers (surfaces) - * and do not lock directdraw API calls. + /* disable return of directdraw surface to buffer alloc because actually I + * have no solution to handle display mode changes. The problem is that when + * the display mode is changed surface's memory is freed then the upstream + * filter would crash trying to write to this memory. Directdraw has a system + * lock (DDLOCK_NOSYSLOCK to disable it) to prevent display mode changes + * when a surface memory is locked but we need to disable this lock to return + * multiple buffers (surfaces) and do not lock directdraw API calls. */ #if 0 /* if (ddrawsink->ddraw_object) {*/ -- cgit v1.2.1 From c67d72290784cf6a62b81ace93a24ac9494885a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Mon, 7 Jan 2008 16:41:00 +0000 Subject: [MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.c: FALSE is not a gpointer. Original commit message from CVS: * sys/directdraw/gstdirectdrawsink.c: (gst_directdraw_sink_window_thread): FALSE is not a gpointer. --- sys/directdraw/gstdirectdrawsink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index 78406d27..9a028287 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -1323,12 +1323,12 @@ gst_directdraw_sink_window_thread (GstDirectDrawSink * ddrawsink) WS_OVERLAPPEDWINDOW | WS_SIZEBOX, 0, 0, 640, 480, NULL, NULL, WndClass.hInstance, NULL); if (ddrawsink->video_window == NULL) - return FALSE; + return NULL; /* Set the clipper on that window */ IDirectDrawClipper_SetHWnd (ddrawsink->clipper, 0, ddrawsink->video_window); - /* signal application we create a window */ + /* signal application we created a window */ gst_x_overlay_got_xwindow_id (GST_X_OVERLAY (ddrawsink), (gulong) ddrawsink->video_window); -- cgit v1.2.1 From e7a9a0ef4b000a9aaf57f1bcd4ca2de3a22a96ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 12 Feb 2008 12:22:48 +0000 Subject: [MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.c: Properly chain up finalize functions. Fixes bug #515980. Original commit message from CVS: * sys/directdraw/gstdirectdrawsink.c: (gst_ddrawsurface_class_init), (gst_ddrawsurface_finalize), (gst_directdraw_sink_finalize): Properly chain up finalize functions. Fixes bug #515980. --- sys/directdraw/gstdirectdrawsink.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index 9a028287..1dd334c2 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -214,6 +214,7 @@ gst_directdraw_sink_init_interfaces (GType type) /* Subclass of GstBuffer which manages buffer_pool surfaces lifetime */ static void gst_ddrawsurface_finalize (GstMiniObject * mini_object); +static GstBufferClass *ddrawsurface_parent_class = NULL; static void gst_ddrawsurface_init (GstDDrawSurface * surface, gpointer g_class) @@ -232,6 +233,8 @@ gst_ddrawsurface_class_init (gpointer g_class, gpointer class_data) { GstMiniObjectClass *mini_object_class = GST_MINI_OBJECT_CLASS (g_class); + ddrawsurface_parent_class = g_type_class_peek_parent (g_class); + mini_object_class->finalize = GST_DEBUG_FUNCPTR (gst_ddrawsurface_finalize); } @@ -283,7 +286,7 @@ gst_ddrawsurface_finalize (GstMiniObject * mini_object) surface->width, surface->height, ddrawsink->video_width, ddrawsink->video_height); gst_directdraw_sink_surface_destroy (ddrawsink, surface); - + GST_MINI_OBJECT_CLASS (ddrawsurface_parent_class)->finalize (mini_object); } else { /* In that case we can reuse the image and add it to our image pool. */ GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, @@ -296,10 +299,12 @@ gst_ddrawsurface_finalize (GstMiniObject * mini_object) ddrawsink->buffer_pool = g_slist_prepend (ddrawsink->buffer_pool, surface); g_mutex_unlock (ddrawsink->pool_lock); } + return; no_sink: GST_CAT_WARNING (directdrawsink_debug, "no sink found"); + GST_MINI_OBJECT_CLASS (ddrawsurface_parent_class)->finalize (mini_object); return; } @@ -407,6 +412,8 @@ gst_directdraw_sink_finalize (GObject * object) if (ddrawsink->setup) { gst_directdraw_sink_cleanup (ddrawsink); } + + G_OBJECT_CLASS (parent_class)->finalize (object); } static void -- cgit v1.2.1 From edaeddd5d1fe2c84019de2a509a604eca74a0c5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Andr=C3=A9=20Vadla=20Ravn=C3=A5s?= Date: Wed, 7 May 2008 13:48:28 +0000 Subject: [MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.c Original commit message from CVS: * sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_buffer_alloc): Clear the flags on recycled buffers from buffer_alloc. Partially fixes #520885. --- sys/directdraw/gstdirectdrawsink.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index 1dd334c2..a8fe4eff 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -572,6 +572,8 @@ gst_directdraw_sink_buffer_alloc (GstBaseSink * bsink, guint64 offset, guint size, GstCaps * caps, GstBuffer ** buf) { GstDirectDrawSink *ddrawsink = GST_DIRECTDRAW_SINK (bsink); + GstStructure *structure; + gint width, height; GstDDrawSurface *surface = NULL; GstFlowReturn ret = GST_FLOW_OK; GstCaps *buffer_caps = caps; @@ -580,6 +582,14 @@ gst_directdraw_sink_buffer_alloc (GstBaseSink * bsink, guint64 offset, GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, "a buffer of %u bytes was requested", size); + structure = gst_caps_get_structure (caps, 0); + if (!gst_structure_get_int (structure, "width", &width) || + !gst_structure_get_int (structure, "height", &height)) { + GST_WARNING_OBJECT (ddrawsink, "invalid caps for buffer allocation %" + GST_PTR_FORMAT, caps); + return GST_FLOW_UNEXPECTED; + } + g_mutex_lock (ddrawsink->pool_lock); /* Inspect our buffer pool */ @@ -591,8 +601,8 @@ gst_directdraw_sink_buffer_alloc (GstBaseSink * bsink, guint64 offset, ddrawsink->buffer_pool); /* If the surface is invalid for our need, destroy */ - if ((surface->width != ddrawsink->video_width) || - (surface->height != ddrawsink->video_height) || + if ((surface->width != width) || + (surface->height != height) || (memcmp (&surface->dd_pixel_format, &ddrawsink->dd_pixel_format, sizeof (DDPIXELFORMAT)) || !gst_directdraw_sink_surface_check (ddrawsink, surface)) @@ -615,9 +625,7 @@ gst_directdraw_sink_buffer_alloc (GstBaseSink * bsink, guint64 offset, HRESULT hres; DDSURFACEDESC2 surface_desc; DDSURFACEDESC2 *sd; - GstStructure *structure = NULL; - structure = gst_caps_get_structure (caps, 0); if (!gst_structure_get_int (structure, "depth", &depth)) { GST_CAT_DEBUG_OBJECT (directdrawsink_debug, ddrawsink, "Can't get depth from buffer_alloc caps"); @@ -673,7 +681,7 @@ gst_directdraw_sink_buffer_alloc (GstBaseSink * bsink, guint64 offset, buffer_caps = copy_caps; buffercaps_unref = TRUE; /* update buffer size needed to store video frames according to new caps */ - size = ddrawsink->video_width * ddrawsink->video_height * (bpp / 8); + size = width * height * (bpp / 8); /* update our member pixel format */ gst_ddrawvideosink_get_format_from_caps (ddrawsink, buffer_caps, -- cgit v1.2.1 From 1aa90c3ce12b56aa7a1c2a5cb7087a60b72c84a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Andr=C3=A9=20Vadla=20Ravn=C3=A5s?= Date: Wed, 7 May 2008 14:39:45 +0000 Subject: [MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.c Original commit message from CVS: * sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_buffer_alloc): Reverting previous commit, it had it all mixed up, was for a different patch (major automation screw-up). Sorry! --- sys/directdraw/gstdirectdrawsink.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index a8fe4eff..1dd334c2 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -572,8 +572,6 @@ gst_directdraw_sink_buffer_alloc (GstBaseSink * bsink, guint64 offset, guint size, GstCaps * caps, GstBuffer ** buf) { GstDirectDrawSink *ddrawsink = GST_DIRECTDRAW_SINK (bsink); - GstStructure *structure; - gint width, height; GstDDrawSurface *surface = NULL; GstFlowReturn ret = GST_FLOW_OK; GstCaps *buffer_caps = caps; @@ -582,14 +580,6 @@ gst_directdraw_sink_buffer_alloc (GstBaseSink * bsink, guint64 offset, GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, "a buffer of %u bytes was requested", size); - structure = gst_caps_get_structure (caps, 0); - if (!gst_structure_get_int (structure, "width", &width) || - !gst_structure_get_int (structure, "height", &height)) { - GST_WARNING_OBJECT (ddrawsink, "invalid caps for buffer allocation %" - GST_PTR_FORMAT, caps); - return GST_FLOW_UNEXPECTED; - } - g_mutex_lock (ddrawsink->pool_lock); /* Inspect our buffer pool */ @@ -601,8 +591,8 @@ gst_directdraw_sink_buffer_alloc (GstBaseSink * bsink, guint64 offset, ddrawsink->buffer_pool); /* If the surface is invalid for our need, destroy */ - if ((surface->width != width) || - (surface->height != height) || + if ((surface->width != ddrawsink->video_width) || + (surface->height != ddrawsink->video_height) || (memcmp (&surface->dd_pixel_format, &ddrawsink->dd_pixel_format, sizeof (DDPIXELFORMAT)) || !gst_directdraw_sink_surface_check (ddrawsink, surface)) @@ -625,7 +615,9 @@ gst_directdraw_sink_buffer_alloc (GstBaseSink * bsink, guint64 offset, HRESULT hres; DDSURFACEDESC2 surface_desc; DDSURFACEDESC2 *sd; + GstStructure *structure = NULL; + structure = gst_caps_get_structure (caps, 0); if (!gst_structure_get_int (structure, "depth", &depth)) { GST_CAT_DEBUG_OBJECT (directdrawsink_debug, ddrawsink, "Can't get depth from buffer_alloc caps"); @@ -681,7 +673,7 @@ gst_directdraw_sink_buffer_alloc (GstBaseSink * bsink, guint64 offset, buffer_caps = copy_caps; buffercaps_unref = TRUE; /* update buffer size needed to store video frames according to new caps */ - size = width * height * (bpp / 8); + size = ddrawsink->video_width * ddrawsink->video_height * (bpp / 8); /* update our member pixel format */ gst_ddrawvideosink_get_format_from_caps (ddrawsink, buffer_caps, -- cgit v1.2.1 From 44a5658faaa9e32e260dfb4d6d85fe8e0982fd69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Andr=C3=A9=20Vadla=20Ravn=C3=A5s?= Date: Wed, 7 May 2008 14:43:39 +0000 Subject: [MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.c Original commit message from CVS: * sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_buffer_alloc): Clear the flags on recycled buffers from buffer_alloc. Partially fixes #520885. The right fix this time. --- sys/directdraw/gstdirectdrawsink.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index 1dd334c2..a39e0335 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -705,6 +705,7 @@ gst_directdraw_sink_buffer_alloc (GstBaseSink * bsink, guint64 offset, /* Now we should have a surface, set appropriate caps on it */ if (surface) { + GST_BUFFER_FLAGS (GST_BUFFER (surface)) = 0; gst_buffer_set_caps (GST_BUFFER (surface), buffer_caps); } -- cgit v1.2.1 From e2886ac7c9b90ecf6d5e87c0e78451e98a8ea636 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Andr=C3=A9=20Vadla=20Ravn=C3=A5s?= Date: Wed, 7 May 2008 14:56:22 +0000 Subject: [MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.c Original commit message from CVS: * sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_buffer_alloc): Make it so that gst_directdraw_sink_buffer_alloc uses the right width/height. Especially when looking through the pool of buffers, make sure that the width/height of caps is used instead of the already negotiated dimensions. For example if a buffer with different caps is requested, i.e. higher resolution, the caller would get a buffer with the old dimensions and thus corrupt the heap. --- sys/directdraw/gstdirectdrawsink.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index a39e0335..9d34cf22 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -572,6 +572,8 @@ gst_directdraw_sink_buffer_alloc (GstBaseSink * bsink, guint64 offset, guint size, GstCaps * caps, GstBuffer ** buf) { GstDirectDrawSink *ddrawsink = GST_DIRECTDRAW_SINK (bsink); + GstStructure *structure; + gint width, height; GstDDrawSurface *surface = NULL; GstFlowReturn ret = GST_FLOW_OK; GstCaps *buffer_caps = caps; @@ -580,6 +582,14 @@ gst_directdraw_sink_buffer_alloc (GstBaseSink * bsink, guint64 offset, GST_CAT_INFO_OBJECT (directdrawsink_debug, ddrawsink, "a buffer of %u bytes was requested", size); + structure = gst_caps_get_structure (caps, 0); + if (!gst_structure_get_int (structure, "width", &width) || + !gst_structure_get_int (structure, "height", &height)) { + GST_WARNING_OBJECT (ddrawsink, "invalid caps for buffer allocation %" + GST_PTR_FORMAT, caps); + return GST_FLOW_UNEXPECTED; + } + g_mutex_lock (ddrawsink->pool_lock); /* Inspect our buffer pool */ @@ -591,8 +601,8 @@ gst_directdraw_sink_buffer_alloc (GstBaseSink * bsink, guint64 offset, ddrawsink->buffer_pool); /* If the surface is invalid for our need, destroy */ - if ((surface->width != ddrawsink->video_width) || - (surface->height != ddrawsink->video_height) || + if ((surface->width != width) || + (surface->height != height) || (memcmp (&surface->dd_pixel_format, &ddrawsink->dd_pixel_format, sizeof (DDPIXELFORMAT)) || !gst_directdraw_sink_surface_check (ddrawsink, surface)) @@ -615,9 +625,7 @@ gst_directdraw_sink_buffer_alloc (GstBaseSink * bsink, guint64 offset, HRESULT hres; DDSURFACEDESC2 surface_desc; DDSURFACEDESC2 *sd; - GstStructure *structure = NULL; - structure = gst_caps_get_structure (caps, 0); if (!gst_structure_get_int (structure, "depth", &depth)) { GST_CAT_DEBUG_OBJECT (directdrawsink_debug, ddrawsink, "Can't get depth from buffer_alloc caps"); @@ -673,7 +681,7 @@ gst_directdraw_sink_buffer_alloc (GstBaseSink * bsink, guint64 offset, buffer_caps = copy_caps; buffercaps_unref = TRUE; /* update buffer size needed to store video frames according to new caps */ - size = ddrawsink->video_width * ddrawsink->video_height * (bpp / 8); + size = width * height * (bpp / 8); /* update our member pixel format */ gst_ddrawvideosink_get_format_from_caps (ddrawsink, buffer_caps, -- cgit v1.2.1 From b4633a6930097eb3e48334d67ee62d4ef9ab0a5f Mon Sep 17 00:00:00 2001 From: Haakon Sporsheim Date: Wed, 7 May 2008 15:09:10 +0000 Subject: [MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_set_caps): Fixed mid stream resolution change bug, the offscr... Original commit message from CVS: patch by: Haakon Sporsheim * sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_set_caps): Fixed mid stream resolution change bug, the offscreen surface is now released when set_caps is called. Partially fixes #520885. --- sys/directdraw/gstdirectdrawsink.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index 9d34cf22..d049c575 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -510,6 +510,12 @@ gst_directdraw_sink_set_caps (GstBaseSink * bsink, GstCaps * caps) (GetSystemMetrics (SM_CYSIZEFRAME) * 2), SWP_SHOWWINDOW | SWP_NOMOVE); } + /* release the surface, we have to recreate it! */ + if (ddrawsink->offscreen_surface) { + IDirectDrawSurface7_Release (ddrawsink->offscreen_surface); + ddrawsink->offscreen_surface = NULL; + } + /* create an offscreen surface with the caps */ ret = gst_directdraw_sink_check_offscreen_surface (ddrawsink); if (!ret) { -- cgit v1.2.1 From 4e309644e82531028d0dace0715f1803e6bfdaf6 Mon Sep 17 00:00:00 2001 From: Haakon Sporsheim Date: Wed, 7 May 2008 15:19:47 +0000 Subject: [MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_show_frame, Original commit message from CVS: patch by: Haakon Sporsheim * sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_show_frame, WndProc, gst_directdraw_sink_window_thread): Improved Windows message loop and fixed window destruction issue. When the window which DirectDraw is rendering to is destroyed, the render/show_frame function will return GST_FLOW_ERROR. Partially fixes #520885. --- sys/directdraw/gstdirectdrawsink.c | 42 +++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index d049c575..a0df1c57 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -810,8 +810,14 @@ gst_directdraw_sink_show_frame (GstBaseSink * bsink, GstBuffer * buf) /* use last buffer */ buf = ddrawsink->last_buffer; } - if (buf == NULL) + + if (buf == NULL) { + GST_ERROR_OBJECT (ddrawsink, "No buffer to render."); + return GST_FLOW_ERROR; + } else if (!ddrawsink->video_window) { + GST_WARNING_OBJECT (ddrawsink, "No video window to render to."); return GST_FLOW_ERROR; + } /* get the video window position */ GST_OBJECT_LOCK (ddrawsink); @@ -1314,13 +1320,13 @@ WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) switch (message) { case WM_ERASEBKGND: return TRUE; - case WM_DESTROY: - PostQuitMessage (0); - break; case WM_CLOSE: DestroyWindow (hWnd); + case WM_DESTROY: + PostQuitMessage (0); return 0; } + return DefWindowProc (hWnd, message, wParam, lParam); } @@ -1328,6 +1334,7 @@ static gpointer gst_directdraw_sink_window_thread (GstDirectDrawSink * ddrawsink) { WNDCLASS WndClass; + MSG msg; memset (&WndClass, 0, sizeof (WNDCLASS)); WndClass.style = CS_HREDRAW | CS_VREDRAW; @@ -1357,24 +1364,21 @@ gst_directdraw_sink_window_thread (GstDirectDrawSink * ddrawsink) ReleaseSemaphore (ddrawsink->window_created_signal, 1, NULL); /* start message loop processing our default window messages */ - while (1) { - MSG msg; - - if (GetMessage (&msg, ddrawsink->video_window, 0, 0) <= 0) { - GST_CAT_LOG_OBJECT (directdrawsink_debug, ddrawsink, - "our window received WM_QUIT or error."); - /* The window could have changed, if it is not ours anymore we don't - * overwrite the current video window with NULL */ - if (ddrawsink->our_video_window) { - GST_OBJECT_LOCK (ddrawsink); - ddrawsink->video_window = NULL; - GST_OBJECT_UNLOCK (ddrawsink); - } - break; - } + while (GetMessage (&msg, NULL, 0, 0) != FALSE) { + TranslateMessage (&msg); DispatchMessage (&msg); } + GST_CAT_LOG_OBJECT (directdrawsink_debug, ddrawsink, + "our window received WM_QUIT or error."); + /* The window could have changed, if it is not ours anymore we don't + * overwrite the current video window with NULL */ + if (ddrawsink->our_video_window) { + GST_OBJECT_LOCK (ddrawsink); + ddrawsink->video_window = NULL; + GST_OBJECT_UNLOCK (ddrawsink); + } + return NULL; } -- cgit v1.2.1 From 0a7b74558542bdc3ed6ef354576b0b9fa3bd9471 Mon Sep 17 00:00:00 2001 From: Haakon Sporsheim Date: Wed, 7 May 2008 15:28:06 +0000 Subject: [MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_show_frame): Added checking of surface lost case after an uns... Original commit message from CVS: patch by: Haakon Sporsheim * sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_show_frame): Added checking of surface lost case after an unsuccessful IDirectDrawSurface7_Lock() call. If surface is lost, return GST_FLOW_OK. --- sys/directdraw/gstdirectdrawsink.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index a0df1c57..b5a93225 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -880,7 +880,11 @@ gst_directdraw_sink_show_frame (GstBaseSink * bsink, GstBuffer * buf) GST_CAT_WARNING_OBJECT (directdrawsink_debug, ddrawsink, "gst_directdraw_sink_show_frame failed locking surface %s", DDErrorString (hRes)); - return GST_FLOW_ERROR; + + if (IDirectDrawSurface7_IsLost (ddrawsink->offscreen_surface) == DD_OK) + return GST_FLOW_OK; + else + return GST_FLOW_ERROR; } /* Write each line respecting the destination surface pitch */ -- cgit v1.2.1 From 934179d813b2e7096eb0aa4fc2fdd9e557765ef5 Mon Sep 17 00:00:00 2001 From: Haakon Sporsheim Date: Wed, 7 May 2008 15:33:52 +0000 Subject: [MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_setup_ddraw): Do IDirectDrawClipper_SetHWnd() if the window I... Original commit message from CVS: patch by: Haakon Sporsheim * sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_setup_ddraw): Do IDirectDrawClipper_SetHWnd() if the window ID has already been set after creating the clipper. --- sys/directdraw/gstdirectdrawsink.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index b5a93225..d0a318b7 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -1308,6 +1308,9 @@ gst_directdraw_sink_setup_ddraw (GstDirectDrawSink * ddrawsink) hRes = IDirectDraw7_CreateClipper (ddrawsink->ddraw_object, 0, &ddrawsink->clipper, NULL); + if (hRes == DD_OK && ddrawsink->video_window) + IDirectDrawClipper_SetHWnd (ddrawsink->clipper, 0, ddrawsink->video_window); + /* create our primary surface */ if (!gst_directdraw_sink_check_primary_surface (ddrawsink)) return FALSE; -- cgit v1.2.1 From c99b497b4fc6f9b87e4836de64eb211f67670b82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Andr=C3=A9=20Vadla=20Ravn=C3=A5s?= Date: Thu, 21 Aug 2008 15:28:09 +0000 Subject: [MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.c: Fix buffer ref leak. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original commit message from CVS: Patch by: Ole André Vadla Ravnås * sys/directdraw/gstdirectdrawsink.c: (gst_directdraw_sink_show_frame): Fix buffer ref leak. --- sys/directdraw/gstdirectdrawsink.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index d0a318b7..18d6178e 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -800,12 +800,10 @@ gst_directdraw_sink_show_frame (GstBaseSink * bsink, GstBuffer * buf) if (buf) { /* save a reference to the input buffer */ - if (ddrawsink->last_buffer != buf) { - if (ddrawsink->last_buffer) { - gst_buffer_unref (ddrawsink->last_buffer); - } - } - ddrawsink->last_buffer = gst_buffer_ref (buf); + gst_buffer_ref (buf); + if (ddrawsink->last_buffer != NULL) + gst_buffer_unref (ddrawsink->last_buffer); + ddrawsink->last_buffer = buf; } else { /* use last buffer */ buf = ddrawsink->last_buffer; -- cgit v1.2.1 From 88fb052f4fc83579310fef2857c68a54ddd9fca4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Andr=C3=A9=20Vadla=20Ravn=C3=A5s?= Date: Thu, 21 Aug 2008 21:56:19 +0000 Subject: [MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_buffer_alloc, gst_directdraw_sink_bufferpool_clear): Original commit message from CVS: * sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_buffer_alloc, gst_directdraw_sink_bufferpool_clear): Fix two more buffer ref leaks. --- sys/directdraw/gstdirectdrawsink.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index 18d6178e..caa28005 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -614,6 +614,7 @@ gst_directdraw_sink_buffer_alloc (GstBaseSink * bsink, guint64 offset, !gst_directdraw_sink_surface_check (ddrawsink, surface)) ) { gst_directdraw_sink_surface_destroy (ddrawsink, surface); + gst_buffer_unref (surface); surface = NULL; } else { /* We found a suitable surface */ @@ -1897,6 +1898,7 @@ gst_directdraw_sink_bufferpool_clear (GstDirectDrawSink * ddrawsink) ddrawsink->buffer_pool = g_slist_delete_link (ddrawsink->buffer_pool, ddrawsink->buffer_pool); gst_directdraw_sink_surface_destroy (ddrawsink, surface); + gst_buffer_unref (surface); } g_mutex_unlock (ddrawsink->pool_lock); } -- cgit v1.2.1 From 9d4bfe34dbde8410a06fce62efe6d76c88a94266 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Tue, 4 Nov 2008 12:28:34 +0000 Subject: [MOVED FROM GOOD] Don't install static libs for plugins. Fixes #550851 for -good. Original commit message from CVS: * ext/aalib/Makefile.am: * ext/annodex/Makefile.am: * ext/cairo/Makefile.am: * ext/dv/Makefile.am: * ext/esd/Makefile.am: * ext/flac/Makefile.am: * ext/gconf/Makefile.am: * ext/gdk_pixbuf/Makefile.am: * ext/hal/Makefile.am: * ext/jpeg/Makefile.am: * ext/ladspa/Makefile.am: * ext/libcaca/Makefile.am: * ext/libmng/Makefile.am: * ext/libpng/Makefile.am: * ext/mikmod/Makefile.am: * ext/pulse/Makefile.am: * ext/raw1394/Makefile.am: * ext/shout2/Makefile.am: * ext/soup/Makefile.am: * ext/speex/Makefile.am: * ext/taglib/Makefile.am: * ext/wavpack/Makefile.am: * gst/alpha/Makefile.am: * gst/apetag/Makefile.am: * gst/audiofx/Makefile.am: * gst/auparse/Makefile.am: * gst/autodetect/Makefile.am: * gst/avi/Makefile.am: * gst/cutter/Makefile.am: * gst/debug/Makefile.am: * gst/effectv/Makefile.am: * gst/equalizer/Makefile.am: * gst/flx/Makefile.am: * gst/goom/Makefile.am: * gst/goom2k1/Makefile.am: * gst/icydemux/Makefile.am: * gst/id3demux/Makefile.am: * gst/interleave/Makefile.am: * gst/law/Makefile.am: * gst/level/Makefile.am: * gst/matroska/Makefile.am: * gst/median/Makefile.am: * gst/monoscope/Makefile.am: * gst/multifile/Makefile.am: * gst/multipart/Makefile.am: * gst/oldcore/Makefile.am: * gst/qtdemux/Makefile.am: * gst/replaygain/Makefile.am: * gst/rtp/Makefile.am: * gst/rtsp/Makefile.am: * gst/smpte/Makefile.am: * gst/spectrum/Makefile.am: * gst/udp/Makefile.am: * gst/videobox/Makefile.am: * gst/videocrop/Makefile.am: * gst/videofilter/Makefile.am: * gst/videomixer/Makefile.am: * gst/wavenc/Makefile.am: * gst/wavparse/Makefile.am: * sys/directdraw/Makefile.am: * sys/directsound/Makefile.am: * sys/oss/Makefile.am: * sys/osxaudio/Makefile.am: * sys/osxvideo/Makefile.am: * sys/sunaudio/Makefile.am: * sys/v4l2/Makefile.am: * sys/waveform/Makefile.am: * sys/ximage/Makefile.am: Don't install static libs for plugins. Fixes #550851 for -good. --- sys/directdraw/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/directdraw/Makefile.am b/sys/directdraw/Makefile.am index dddaf189..647d58ac 100644 --- a/sys/directdraw/Makefile.am +++ b/sys/directdraw/Makefile.am @@ -7,5 +7,6 @@ libgstdirectdrawsink_la_LIBADD = $(DIRECTDRAW_LIBS) \ $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) \ -lgstinterfaces-$(GST_MAJORMINOR) libgstdirectdrawsink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(DIRECTDRAW_LDFLAGS) +libgstdirectdrawsink_la_LIBTOOLFLAGS = --tag=disable-static noinst_HEADERS= gstdirectdrawsink.h -- cgit v1.2.1 From 88e98b2298b338d0e342af8846a5f73d690831d0 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Thu, 29 Jan 2009 10:10:08 +0200 Subject: [MOVED FROM GOOD] Update and add documentation for platform specific plugins (sys). Link to properties. Correct titles for examples. Fix examples. --- sys/directdraw/gstdirectdrawsink.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index caa28005..26babd90 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -25,21 +25,17 @@ /** * SECTION:element-directdrawsink * - * - * * DirectdrawSink renders video RGB frames to any win32 window. This element - * can receive a window ID from the application through the XOverlay interface + * can receive a window ID from the application through the #XOverlay interface * and will then render video frames in this window. * If no Window ID was provided by the application, the element will create its * own internal window and render into it. - * - * Examples - * - * Here is a simple pipeline to test the sink : - * + * + * + * Example pipelines + * |[ * gst-launch-0.10 -v videotestsrc ! directdrawsink - * - * + * ]| a simple pipeline to test the sink * */ -- cgit v1.2.1 From 3aafd4f9c35922b01f30c278007eca40ed224544 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Thu, 29 Jan 2009 11:07:59 +0200 Subject: [MOVED FROM GOOD] Remove version numbers from a few gst-launch examples. The majority of the examples doe not use -0.10 and this will also help us to maintain the docs. --- sys/directdraw/gstdirectdrawsink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index 26babd90..a128b317 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -34,7 +34,7 @@ * * Example pipelines * |[ - * gst-launch-0.10 -v videotestsrc ! directdrawsink + * gst-launch -v videotestsrc ! directdrawsink * ]| a simple pipeline to test the sink * */ -- cgit v1.2.1 From 770c18986da43fde4b1257b50440c78cba4aade4 Mon Sep 17 00:00:00 2001 From: LRN Date: Fri, 27 Feb 2009 20:40:31 +0100 Subject: [MOVED FROM GOOD] directdrawsink: Fix type mismatches Fixes bug #573343. --- sys/directdraw/gstdirectdrawsink.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index a128b317..144f6595 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -610,7 +610,7 @@ gst_directdraw_sink_buffer_alloc (GstBaseSink * bsink, guint64 offset, !gst_directdraw_sink_surface_check (ddrawsink, surface)) ) { gst_directdraw_sink_surface_destroy (ddrawsink, surface); - gst_buffer_unref (surface); + gst_buffer_unref (GST_BUFFER_CAST (surface)); surface = NULL; } else { /* We found a suitable surface */ @@ -629,7 +629,7 @@ gst_directdraw_sink_buffer_alloc (GstBaseSink * bsink, guint64 offset, DDSURFACEDESC2 surface_desc; DDSURFACEDESC2 *sd; - if (!gst_structure_get_int (structure, "depth", &depth)) { + if (!gst_structure_get_int (structure, "depth", (gint *) & depth)) { GST_CAT_DEBUG_OBJECT (directdrawsink_debug, ddrawsink, "Can't get depth from buffer_alloc caps"); return GST_FLOW_ERROR; @@ -663,7 +663,7 @@ gst_directdraw_sink_buffer_alloc (GstBaseSink * bsink, guint64 offset, gint bpp, endianness, red_mask, green_mask, blue_mask; /* get new display mode properties */ - gst_structure_get_int (display_structure, "depth", &depth); + gst_structure_get_int (display_structure, "depth", (gint *) & depth); gst_structure_get_int (display_structure, "bpp", &bpp); gst_structure_get_int (display_structure, "endianness", &endianness); gst_structure_get_int (display_structure, "red_mask", &red_mask); @@ -997,7 +997,7 @@ gst_ddrawvideosink_get_format_from_caps (GstDirectDrawSink * ddrawsink, pPixelFormat->dwBBitMask = GUINT32_TO_BE (pPixelFormat->dwBBitMask); } } else if (gst_structure_has_name (structure, "video/x-raw-yuv")) { - gint fourcc; + guint32 fourcc; pPixelFormat->dwFlags = DDPF_FOURCC; ret &= gst_structure_get_fourcc (structure, "format", &fourcc); @@ -1894,7 +1894,7 @@ gst_directdraw_sink_bufferpool_clear (GstDirectDrawSink * ddrawsink) ddrawsink->buffer_pool = g_slist_delete_link (ddrawsink->buffer_pool, ddrawsink->buffer_pool); gst_directdraw_sink_surface_destroy (ddrawsink, surface); - gst_buffer_unref (surface); + gst_buffer_unref (GST_BUFFER_CAST (surface)); } g_mutex_unlock (ddrawsink->pool_lock); } -- cgit v1.2.1 From 85f9e66e8920e08a6d58509e1cee62022269b9ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Moutte?= Date: Thu, 5 Jan 2006 23:17:44 +0000 Subject: [MOVED FROM GOOD] added sys/directdraw added sys/directsound added win32/vs6/gst_plugins_bad.dsw added win32/vs6/libgstdirectsound.dsp ... Original commit message from CVS: 2006-01-05 Sebastien Moutte * added sys/directdraw * added sys/directsound * added win32/vs6/gst_plugins_bad.dsw * added win32/vs6/libgstdirectsound.dsp * added win32/vs6/libgstdirectdraw.dsp * added win32/common/config.h --- win32/vs6/libgstdirectdraw.dsp | 125 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 win32/vs6/libgstdirectdraw.dsp diff --git a/win32/vs6/libgstdirectdraw.dsp b/win32/vs6/libgstdirectdraw.dsp new file mode 100644 index 00000000..37432a96 --- /dev/null +++ b/win32/vs6/libgstdirectdraw.dsp @@ -0,0 +1,125 @@ +# Microsoft Developer Studio Project File - Name="libgstdirectdraw" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=libgstdirectdraw - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "libgstdirectdraw.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "libgstdirectdraw.mak" CFG="libgstdirectdraw - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "libgstdirectdraw - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "libgstdirectdraw - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "libgstdirectdraw - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBGSTDIRECTDRAW_EXPORTS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../gst-libs" /I "../../../gstreamer" /I "../common" /I "../../../gstreamer/libs" /I "../../../gst-plugins-base/gst-libs" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBGSTDIRECTDRAW_EXPORTS" /D "HAVE_CONFIG_H" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 +# ADD LINK32 libgstreamer-0.10.lib libgstbase-0.10.lib libgstvideo-0.10.lib glib-2.0.lib gobject-2.0.lib user32.lib gdi32.lib ddraw.lib /nologo /dll /machine:I386 /libpath:"../../../gstreamer/win32/vs6/release" /libpath:"../../../gst-plugins-base/win32/vs6/release" /libpath:"./release" +# Begin Special Build Tool +TargetPath=.\Release\libgstdirectdraw.dll +SOURCE="$(InputPath)" +PostBuild_Cmds=copy /Y $(TargetPath) c:\gstreamer\lib\gstreamer-0.10 +# End Special Build Tool + +!ELSEIF "$(CFG)" == "libgstdirectdraw - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBGSTDIRECTDRAW_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../gst-libs" /I "../../../gstreamer" /I "../common" /I "../../../gstreamer/libs" /I "../../../gst-plugins-base/gst-libs" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBGSTDIRECTDRAW_EXPORTS" /D "HAVE_CONFIG_H" /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 libgstreamer-0.10.lib libgstbase-0.10.lib libgstvideo-0.10.lib glib-2.0D.lib gobject-2.0D.lib ddraw.lib user32.lib gdi32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"../../../gstreamer/win32/vs6/debug" /libpath:"../../../gst-plugins-base/win32/vs6/debug" /libpath:"./debug" +# Begin Special Build Tool +TargetPath=.\Debug\libgstdirectdraw.dll +SOURCE="$(InputPath)" +PostBuild_Cmds=copy /Y $(TargetPath) c:\gstreamer\debug\lib\gstreamer-0.10 +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "libgstdirectdraw - Win32 Release" +# Name "libgstdirectdraw - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\sys\directdraw\gstdirectdrawplugin.c +# End Source File +# Begin Source File + +SOURCE=..\..\sys\directdraw\gstdirectdrawsink.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\sys\directdraw\gstdirectdrawsink.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project -- cgit v1.2.1 From 6cdf92aa3d9d01497aadf8fcb6acf2abd2133f9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Moutte?= Date: Fri, 3 Mar 2006 23:45:23 +0000 Subject: [MOVED FROM GOOD] sys/: sinks are now using GST_RANK_PRIMARY to be used with autodectection Original commit message from CVS: * sys/directdraw: * sys/directsound: sinks are now using GST_RANK_PRIMARY to be used with autodectection * win32/vs6: project files updated to fix some bugs * win32/vs7: * win32/vs8: vs7 and vs8 project files added --- win32/vs6/libgstdirectdraw.dsp | 4 +- win32/vs7/libgstdirectdraw.vcproj | 145 ++++++++++++++++++++++++++ win32/vs8/libgstdirectdraw.vcproj | 214 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 361 insertions(+), 2 deletions(-) create mode 100644 win32/vs7/libgstdirectdraw.vcproj create mode 100644 win32/vs8/libgstdirectdraw.vcproj diff --git a/win32/vs6/libgstdirectdraw.dsp b/win32/vs6/libgstdirectdraw.dsp index 37432a96..a9e6d23d 100644 --- a/win32/vs6/libgstdirectdraw.dsp +++ b/win32/vs6/libgstdirectdraw.dsp @@ -53,7 +53,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 libgstreamer-0.10.lib libgstbase-0.10.lib libgstvideo-0.10.lib glib-2.0.lib gobject-2.0.lib user32.lib gdi32.lib ddraw.lib /nologo /dll /machine:I386 /libpath:"../../../gstreamer/win32/vs6/release" /libpath:"../../../gst-plugins-base/win32/vs6/release" /libpath:"./release" +# ADD LINK32 glib-2.0.lib gobject-2.0.lib libgstreamer-0.10.lib libgstbase-0.10.lib libgstvideo-0.10.lib ddraw.lib user32.lib gdi32.lib Rpcrt4.lib /nologo /dll /machine:I386 /libpath:"../../../gstreamer/win32/vs6/release" /libpath:"../../../gst-plugins-base/win32/vs6/release" /libpath:"./release" # Begin Special Build Tool TargetPath=.\Release\libgstdirectdraw.dll SOURCE="$(InputPath)" @@ -84,7 +84,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 libgstreamer-0.10.lib libgstbase-0.10.lib libgstvideo-0.10.lib glib-2.0D.lib gobject-2.0D.lib ddraw.lib user32.lib gdi32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"../../../gstreamer/win32/vs6/debug" /libpath:"../../../gst-plugins-base/win32/vs6/debug" /libpath:"./debug" +# ADD LINK32 glib-2.0D.lib gobject-2.0D.lib libgstreamer-0.10.lib libgstbase-0.10.lib libgstvideo-0.10.lib ddraw.lib user32.lib gdi32.lib Rpcrt4.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"../../../gstreamer/win32/vs6/debug" /libpath:"../../../gst-plugins-base/win32/vs6/debug" /libpath:"./debug" # Begin Special Build Tool TargetPath=.\Debug\libgstdirectdraw.dll SOURCE="$(InputPath)" diff --git a/win32/vs7/libgstdirectdraw.vcproj b/win32/vs7/libgstdirectdraw.vcproj new file mode 100644 index 00000000..553d0c08 --- /dev/null +++ b/win32/vs7/libgstdirectdraw.vcproj @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/win32/vs8/libgstdirectdraw.vcproj b/win32/vs8/libgstdirectdraw.vcproj new file mode 100644 index 00000000..06f5ee12 --- /dev/null +++ b/win32/vs8/libgstdirectdraw.vcproj @@ -0,0 +1,214 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.1 From 1474e93c7adf88e1f42a081fd6681c58e1a149a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Moutte?= Date: Mon, 24 Jul 2006 21:43:06 +0000 Subject: [MOVED FROM GOOD] sys/directsound/gstdirectsoundsink.*: Add an attenuation property that will directly attenuate the directsound buffer. Original commit message from CVS: * sys/directsound/gstdirectsoundsink.h: * sys/directsound/gstdirectsoundsink.c: Add an attenuation property that will directly attenuate the directsound buffer. Change the size of the directsound secondary buffer to a half second. Add more debug logs. Add a lock to protect dsound buffer write access. Fix a bad implementation of reset. * sys/directsound/gstdirectdrawsink.c: * sys/directsound/gstdirectdrawsink.h: Add a keep_aspect_ratio property. Do not use overlay if not supported. Add more debug logs. Remove overwrite of WM_ERASEBKGND message handling. It was not redrawing border when keep_aspect_ratio was enabled. * win32/common/config.h: update version waiting an auto-generated config.h --- win32/vs6/libgstdirectdraw.dsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win32/vs6/libgstdirectdraw.dsp b/win32/vs6/libgstdirectdraw.dsp index a9e6d23d..799c12b3 100644 --- a/win32/vs6/libgstdirectdraw.dsp +++ b/win32/vs6/libgstdirectdraw.dsp @@ -84,7 +84,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 glib-2.0D.lib gobject-2.0D.lib libgstreamer-0.10.lib libgstbase-0.10.lib libgstvideo-0.10.lib ddraw.lib user32.lib gdi32.lib Rpcrt4.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"../../../gstreamer/win32/vs6/debug" /libpath:"../../../gst-plugins-base/win32/vs6/debug" /libpath:"./debug" +# ADD LINK32 glib-2.0D.lib gobject-2.0D.lib libgstreamer-0.10.lib libgstbase-0.10.lib libgstvideo-0.10.lib ddraw.lib user32.lib gdi32.lib Rpcrt4.lib dxguid.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"../../../gstreamer/win32/vs6/debug" /libpath:"../../../gst-plugins-base/win32/vs6/debug" /libpath:"./debug" # Begin Special Build Tool TargetPath=.\Debug\libgstdirectdraw.dll SOURCE="$(InputPath)" -- cgit v1.2.1 From 0a5a6f200d0783b59c92ed726a5593ab7a1966d7 Mon Sep 17 00:00:00 2001 From: Sergey Scobich Date: Wed, 1 Nov 2006 10:19:18 +0000 Subject: [MOVED FROM GOOD] sys/: Wait until the window is created before using it; guard unistd.h includes with HAVE_UNISTD_H. (#366523) Original commit message from CVS: Patch by: Sergey Scobich * sys/directdraw/gstdirectdrawsink.c: (gst_directdrawsink_window_thread), (gst_directdrawsink_create_default_window): * sys/directdraw/gstdirectdrawsink.h: * sys/directsound/gstdirectsoundsink.c: Wait until the window is created before using it; guard unistd.h includes with HAVE_UNISTD_H. (#366523) * win32/vs8/libgstdirectdraw.vcproj: * win32/vs8/libgstdirectsound.vcproj: Update project files. --- win32/vs8/libgstdirectdraw.vcproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/win32/vs8/libgstdirectdraw.vcproj b/win32/vs8/libgstdirectdraw.vcproj index 06f5ee12..31af1ca9 100644 --- a/win32/vs8/libgstdirectdraw.vcproj +++ b/win32/vs8/libgstdirectdraw.vcproj @@ -1,7 +1,7 @@ - + Date: Sun, 11 Feb 2007 15:26:49 +0000 Subject: [MOVED FROM GOOD] Makefile.am: Add win32 MANIFEST Original commit message from CVS: * Makefile.am: Add win32 MANIFEST * sys/directdraw/gstdirectdrawsink.c: * sys/directdraw/gstdirectdrawsink.h: Clear unused code and add comments. Remove yuv from template caps, it only supports RGB actually. Implement XOverlay interface and remove window and fullscreen properties. Add debug logs. Test for blit capabilities to return only the current colorspace if the hardware can't blit for one colorspace to another. * sys/directsound/gstdirectsoundsink.c: Add some debugs. * win32/MANIFEST: Add VS7 project files and solution. * win32/vs6/gst_plugins_bad.dsw: * win32/vs6/libgstdirectdraw.dsp: * win32/vs6/libgstdirectsound.dsp: * win32/vs6/libgstqtdemux.dsp: Update project files. --- win32/vs6/libgstdirectdraw.dsp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/win32/vs6/libgstdirectdraw.dsp b/win32/vs6/libgstdirectdraw.dsp index 799c12b3..2def6753 100644 --- a/win32/vs6/libgstdirectdraw.dsp +++ b/win32/vs6/libgstdirectdraw.dsp @@ -53,7 +53,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 glib-2.0.lib gobject-2.0.lib libgstreamer-0.10.lib libgstbase-0.10.lib libgstvideo-0.10.lib ddraw.lib user32.lib gdi32.lib Rpcrt4.lib /nologo /dll /machine:I386 /libpath:"../../../gstreamer/win32/vs6/release" /libpath:"../../../gst-plugins-base/win32/vs6/release" /libpath:"./release" +# ADD LINK32 glib-2.0.lib gobject-2.0.lib libgstinterfaces-0.10.lib libgstreamer-0.10.lib libgstbase-0.10.lib libgstvideo-0.10.lib ddraw.lib user32.lib gdi32.lib Rpcrt4.lib dxguid.lib /nologo /dll /machine:I386 /libpath:"../../../gstreamer/win32/vs6/release" /libpath:"../../../gst-plugins-base/win32/vs6/release" /libpath:"./release" # Begin Special Build Tool TargetPath=.\Release\libgstdirectdraw.dll SOURCE="$(InputPath)" @@ -84,7 +84,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 glib-2.0D.lib gobject-2.0D.lib libgstreamer-0.10.lib libgstbase-0.10.lib libgstvideo-0.10.lib ddraw.lib user32.lib gdi32.lib Rpcrt4.lib dxguid.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"../../../gstreamer/win32/vs6/debug" /libpath:"../../../gst-plugins-base/win32/vs6/debug" /libpath:"./debug" +# ADD LINK32 glib-2.0D.lib gobject-2.0D.lib libgstinterfaces-0.10.lib libgstreamer-0.10.lib libgstbase-0.10.lib libgstvideo-0.10.lib ddraw.lib user32.lib gdi32.lib Rpcrt4.lib dxguid.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"../../../gstreamer/win32/vs6/debug" /libpath:"../../../gst-plugins-base/win32/vs6/debug" /libpath:"./debug" # Begin Special Build Tool TargetPath=.\Debug\libgstdirectdraw.dll SOURCE="$(InputPath)" -- cgit v1.2.1 From 36f23678d37f80228e18d73c2492f7ccbccdf99a Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 15 Jun 2007 09:13:55 +0000 Subject: [MOVED FROM GOOD] win32/vs6/: Mark *.dsp & *.dsw as binary files and convert to DOS line endings, as they don't load into VS6 correctly... Original commit message from CVS: * win32/vs6/autogen.dsp: * win32/vs6/gst_plugins_good.dsw: * win32/vs6/libgstalaw.dsp: * win32/vs6/libgstalpha.dsp: * win32/vs6/libgstalphacolor.dsp: * win32/vs6/libgstapetag.dsp: * win32/vs6/libgstaudiofx.dsp: * win32/vs6/libgstauparse.dsp: * win32/vs6/libgstautodetect.dsp: * win32/vs6/libgstavi.dsp: * win32/vs6/libgstcutter.dsp: * win32/vs6/libgstdirectdraw.dsp: * win32/vs6/libgstdirectsound.dsp: * win32/vs6/libgsteffectv.dsp: * win32/vs6/libgstflx.dsp: * win32/vs6/libgstgoom.dsp: * win32/vs6/libgsticydemux.dsp: * win32/vs6/libgstid3demux.dsp: * win32/vs6/libgstinterleave.dsp: * win32/vs6/libgstjpeg.dsp: * win32/vs6/libgstlevel.dsp: * win32/vs6/libgstmatroska.dsp: * win32/vs6/libgstmedian.dsp: * win32/vs6/libgstmonoscope.dsp: * win32/vs6/libgstmulaw.dsp: * win32/vs6/libgstmultipart.dsp: * win32/vs6/libgstqtdemux.dsp: * win32/vs6/libgstrtp.dsp: * win32/vs6/libgstrtsp.dsp: * win32/vs6/libgstsmpte.dsp: * win32/vs6/libgstspeex.dsp: * win32/vs6/libgstudp.dsp: * win32/vs6/libgstvideobalance.dsp: * win32/vs6/libgstvideobox.dsp: * win32/vs6/libgstvideocrop.dsp: * win32/vs6/libgstvideoflip.dsp: * win32/vs6/libgstvideomixer.dsp: * win32/vs6/libgstwaveform.dsp: * win32/vs6/libgstwavenc.dsp: * win32/vs6/libgstwavparse.dsp: Mark *.dsp & *.dsw as binary files and convert to DOS line endings, as they don't load into VS6 correctly otherwise. --- win32/vs6/libgstdirectdraw.dsp | 250 ++++++++++++++++++++--------------------- 1 file changed, 125 insertions(+), 125 deletions(-) diff --git a/win32/vs6/libgstdirectdraw.dsp b/win32/vs6/libgstdirectdraw.dsp index 2def6753..3fee3bd9 100644 --- a/win32/vs6/libgstdirectdraw.dsp +++ b/win32/vs6/libgstdirectdraw.dsp @@ -1,125 +1,125 @@ -# Microsoft Developer Studio Project File - Name="libgstdirectdraw" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=libgstdirectdraw - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "libgstdirectdraw.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "libgstdirectdraw.mak" CFG="libgstdirectdraw - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "libgstdirectdraw - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "libgstdirectdraw - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "libgstdirectdraw - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBGSTDIRECTDRAW_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../gst-libs" /I "../../../gstreamer" /I "../common" /I "../../../gstreamer/libs" /I "../../../gst-plugins-base/gst-libs" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBGSTDIRECTDRAW_EXPORTS" /D "HAVE_CONFIG_H" /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 glib-2.0.lib gobject-2.0.lib libgstinterfaces-0.10.lib libgstreamer-0.10.lib libgstbase-0.10.lib libgstvideo-0.10.lib ddraw.lib user32.lib gdi32.lib Rpcrt4.lib dxguid.lib /nologo /dll /machine:I386 /libpath:"../../../gstreamer/win32/vs6/release" /libpath:"../../../gst-plugins-base/win32/vs6/release" /libpath:"./release" -# Begin Special Build Tool -TargetPath=.\Release\libgstdirectdraw.dll -SOURCE="$(InputPath)" -PostBuild_Cmds=copy /Y $(TargetPath) c:\gstreamer\lib\gstreamer-0.10 -# End Special Build Tool - -!ELSEIF "$(CFG)" == "libgstdirectdraw - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBGSTDIRECTDRAW_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../gst-libs" /I "../../../gstreamer" /I "../common" /I "../../../gstreamer/libs" /I "../../../gst-plugins-base/gst-libs" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBGSTDIRECTDRAW_EXPORTS" /D "HAVE_CONFIG_H" /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 glib-2.0D.lib gobject-2.0D.lib libgstinterfaces-0.10.lib libgstreamer-0.10.lib libgstbase-0.10.lib libgstvideo-0.10.lib ddraw.lib user32.lib gdi32.lib Rpcrt4.lib dxguid.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"../../../gstreamer/win32/vs6/debug" /libpath:"../../../gst-plugins-base/win32/vs6/debug" /libpath:"./debug" -# Begin Special Build Tool -TargetPath=.\Debug\libgstdirectdraw.dll -SOURCE="$(InputPath)" -PostBuild_Cmds=copy /Y $(TargetPath) c:\gstreamer\debug\lib\gstreamer-0.10 -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "libgstdirectdraw - Win32 Release" -# Name "libgstdirectdraw - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\sys\directdraw\gstdirectdrawplugin.c -# End Source File -# Begin Source File - -SOURCE=..\..\sys\directdraw\gstdirectdrawsink.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\sys\directdraw\gstdirectdrawsink.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="libgstdirectdraw" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=libgstdirectdraw - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "libgstdirectdraw.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "libgstdirectdraw.mak" CFG="libgstdirectdraw - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "libgstdirectdraw - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "libgstdirectdraw - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "libgstdirectdraw - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBGSTDIRECTDRAW_EXPORTS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../gst-libs" /I "../../../gstreamer" /I "../common" /I "../../../gstreamer/libs" /I "../../../gst-plugins-base/gst-libs" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBGSTDIRECTDRAW_EXPORTS" /D "HAVE_CONFIG_H" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 +# ADD LINK32 glib-2.0.lib gobject-2.0.lib libgstinterfaces-0.10.lib libgstreamer-0.10.lib libgstbase-0.10.lib libgstvideo-0.10.lib ddraw.lib user32.lib gdi32.lib Rpcrt4.lib dxguid.lib /nologo /dll /machine:I386 /libpath:"../../../gstreamer/win32/vs6/release" /libpath:"../../../gst-plugins-base/win32/vs6/release" /libpath:"./release" +# Begin Special Build Tool +TargetPath=.\Release\libgstdirectdraw.dll +SOURCE="$(InputPath)" +PostBuild_Cmds=copy /Y $(TargetPath) c:\gstreamer\lib\gstreamer-0.10 +# End Special Build Tool + +!ELSEIF "$(CFG)" == "libgstdirectdraw - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBGSTDIRECTDRAW_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../gst-libs" /I "../../../gstreamer" /I "../common" /I "../../../gstreamer/libs" /I "../../../gst-plugins-base/gst-libs" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBGSTDIRECTDRAW_EXPORTS" /D "HAVE_CONFIG_H" /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 glib-2.0D.lib gobject-2.0D.lib libgstinterfaces-0.10.lib libgstreamer-0.10.lib libgstbase-0.10.lib libgstvideo-0.10.lib ddraw.lib user32.lib gdi32.lib Rpcrt4.lib dxguid.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"../../../gstreamer/win32/vs6/debug" /libpath:"../../../gst-plugins-base/win32/vs6/debug" /libpath:"./debug" +# Begin Special Build Tool +TargetPath=.\Debug\libgstdirectdraw.dll +SOURCE="$(InputPath)" +PostBuild_Cmds=copy /Y $(TargetPath) c:\gstreamer\debug\lib\gstreamer-0.10 +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "libgstdirectdraw - Win32 Release" +# Name "libgstdirectdraw - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\sys\directdraw\gstdirectdrawplugin.c +# End Source File +# Begin Source File + +SOURCE=..\..\sys\directdraw\gstdirectdrawsink.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\sys\directdraw\gstdirectdrawsink.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project -- cgit v1.2.1 From 3a05abd2b1e7813fe54d8d54ca1643e4f576f889 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Sat, 16 May 2009 01:14:23 +0100 Subject: Moved 'directdraw' from -good to -bad --- configure.ac | 42 +++++++++++++++++++++++ docs/plugins/Makefile.am | 1 + docs/plugins/gst-plugins-bad-plugins-docs.sgml | 2 ++ docs/plugins/gst-plugins-bad-plugins-sections.txt | 19 ++++++++++ docs/plugins/inspect/plugin-directdraw.xml | 20 +++++++++++ sys/Makefile.am | 10 ++++-- 6 files changed, 92 insertions(+), 2 deletions(-) create mode 100644 docs/plugins/inspect/plugin-directdraw.xml diff --git a/configure.ac b/configure.ac index bae6c23b..78ddecc3 100644 --- a/configure.ac +++ b/configure.ac @@ -348,6 +348,46 @@ fi dnl *** sys plug-ins *** +dnl DirectDraw +translit(dnm, m, l) AM_CONDITIONAL(USE_DIRECTDRAW, true) +AG_GST_CHECK_FEATURE(DIRECTDRAW, [DirectDraw plug-in], directdrawsink, [ + HAVE_DIRECTDRAW="no" + save_CFLAGS="$CFLAGS" + save_LDFLAGS="$LDFLAGS" + save_LIBS="$LIBS" + CFLAGS="$CFLAGS $DIRECTDRAW_CFLAGS" + LDFLAGS="$LDFLAGS $DIRECTDRAW_LDFLAGS" + LIBS="$LIBS -lddraw -lgdi32" + AC_MSG_CHECKING(for DirectDraw LDFLAGS) + AC_LINK_IFELSE([ +#include +#include + +int main () +{ + GetStockObject(0); + DirectDrawCreate(NULL, NULL, NULL); + + return 0; +} +], + [HAVE_DIRECTDRAW="yes"], + [HAVE_DIRECTDRAW="no"]) + AC_MSG_RESULT($HAVE_DIRECTDRAW) + CFLAGS=$save_CFLAGS + LDFLAGS=$save_LDFLAGS + LIBS=$save_LIBS + + if test "x$HAVE_DIRECTDRAW" = "xyes"; then + dnl this is much more than we want + DIRECTDRAW_LIBS="-lddraw -ldxguid -lgdi32" + AC_SUBST(DIRECTDRAW_CFLAGS) + AC_SUBST(DIRECTDRAW_LDFLAGS) + AC_SUBST(DIRECTDRAW_LIBS) + fi + AC_SUBST(HAVE_DIRECTDRAW) +]) + dnl *** OS X videosrc *** translit(dnm, m, l) AM_CONDITIONAL(USE_OSX_VIDEO, true) HAVE_OSX_VIDEO="no" @@ -1413,6 +1453,7 @@ AM_CONDITIONAL(USE_CDAUDIO, false) AM_CONDITIONAL(USE_CELT, false) AM_CONDITIONAL(USE_DC1394, false) AM_CONDITIONAL(USE_DIRECTFB, false) +AM_CONDITIONAL(USE_DIRECTDRAW, false) AM_CONDITIONAL(USE_DTS, false) AM_CONDITIONAL(USE_DIRAC, false) AM_CONDITIONAL(USE_DIVX, false) @@ -1569,6 +1610,7 @@ sys/Makefile sys/dshowdecwrapper/Makefile sys/acmenc/Makefile sys/acmmp3dec/Makefile +sys/directdraw/Makefile sys/dshowsrcwrapper/Makefile sys/dshowvideosink/Makefile sys/dvb/Makefile diff --git a/docs/plugins/Makefile.am b/docs/plugins/Makefile.am index 87d5f9eb..dcd9e5df 100644 --- a/docs/plugins/Makefile.am +++ b/docs/plugins/Makefile.am @@ -155,6 +155,7 @@ EXTRA_HFILES = \ $(top_srcdir)/gst/videosignal/gstvideodetect.h \ $(top_srcdir)/gst/videosignal/gstvideomark.h \ $(top_srcdir)/gst/valve/gstvalve.h \ + $(top_srcdir)/sys/directdraw/gstdirectdrawsink.h \ $(top_srcdir)/sys/dvb/gstdvbsrc.h # Images to copy into HTML directory. diff --git a/docs/plugins/gst-plugins-bad-plugins-docs.sgml b/docs/plugins/gst-plugins-bad-plugins-docs.sgml index 5a996c03..329e6bab 100644 --- a/docs/plugins/gst-plugins-bad-plugins-docs.sgml +++ b/docs/plugins/gst-plugins-bad-plugins-docs.sgml @@ -33,6 +33,7 @@ + @@ -103,6 +104,7 @@ + diff --git a/docs/plugins/gst-plugins-bad-plugins-sections.txt b/docs/plugins/gst-plugins-bad-plugins-sections.txt index 8f9ff75d..2c57e3f1 100644 --- a/docs/plugins/gst-plugins-bad-plugins-sections.txt +++ b/docs/plugins/gst-plugins-bad-plugins-sections.txt @@ -229,6 +229,25 @@ GST_TYPE_DFBSURFACE gst_dfbsurface_get_type
+
+element-directdrawsink +directdrawsink +GstDirectDrawSink + +GstDirectDrawSinkClass +GST_DIRECTDRAW_SINK +GST_DIRECTDRAW_SINK_CLASS +GST_IS_DIRECTDRAW_SINK +GST_IS_DIRECTDRAW_SINK_CLASS +GST_TYPE_DIRECTDRAW_SINK +gst_directdraw_sink_get_type +GstDDrawSurface +GST_DDRAWSURFACE +GST_IS_DDRAWSURFACE +GST_TYPE_DDRAWSURFACE +DIRECTDRAW_VERSION +
+
element-dtmfsrc dtmfsrc diff --git a/docs/plugins/inspect/plugin-directdraw.xml b/docs/plugins/inspect/plugin-directdraw.xml new file mode 100644 index 00000000..24110324 --- /dev/null +++ b/docs/plugins/inspect/plugin-directdraw.xml @@ -0,0 +1,20 @@ + + directdraw + Direct Draw plugin + ../../win32/vs6/release/libgstdirectdraw.dll + libgstdirectdraw.dll + 0.10.4.1 + LGPL + gst-plugins-bad + GStreamer Bad Plug-ins CVS + Unknown package origin + + + directdrawsink + Direct Draw video sink + Sink/Video + Direct Draw video sink + Sebastien Moutte <sebastien@moutte.net> + + + diff --git a/sys/Makefile.am b/sys/Makefile.am index e6212c65..161f3339 100644 --- a/sys/Makefile.am +++ b/sys/Makefile.am @@ -22,6 +22,12 @@ endif # CDROM_DIR= # endif +if USE_DIRECTDRAW +DIRECTDRAW_DIR=directdraw +else +DIRECTDRAW_DIR= +endif + if USE_FBDEV FBDEV_DIR=fbdev else @@ -64,8 +70,8 @@ else ACM_DIR= endif -SUBDIRS = $(ACM_DIR) $(DVB_DIR) $(FBDEV_DIR) $(OSS4_DIR) $(OSX_VIDEO_DIR) $(QT_DIR) $(VCD_DIR) $(WININET_DIR) +SUBDIRS = $(ACM_DIR) $(DIRECTDRAW_DIR) $(DVB_DIR) $(FBDEV_DIR) $(OSS4_DIR) $(OSX_VIDEO_DIR) $(QT_DIR) $(VCD_DIR) $(WININET_DIR) -DIST_SUBDIRS = acmenc acmmp3dec dvb fbdev dshowdecwrapper dshowsrcwrapper dshowvideosink \ +DIST_SUBDIRS = acmenc acmmp3dec directdraw dvb fbdev dshowdecwrapper dshowsrcwrapper dshowvideosink \ oss4 osxvideo qtwrapper vcd wasapi wininet winks winscreencap -- cgit v1.2.1 From 0d91864b21515581d6865323344dbe6ee329fb9e Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Sat, 16 May 2009 01:53:15 +0100 Subject: win32: Add directdraw project files to the win32 manifest --- win32/MANIFEST | 3 +++ 1 file changed, 3 insertions(+) diff --git a/win32/MANIFEST b/win32/MANIFEST index 61247a21..647176e4 100644 --- a/win32/MANIFEST +++ b/win32/MANIFEST @@ -2,6 +2,7 @@ win32/MANIFEST win32/common/config.h win32/common/config.h.in win32/vs6/gst_plugins_bad.dsw +win32/vs6/libgstdirectdraw.dsp win32/vs6/libgstdshow.dsp win32/vs6/libgstdshowdecwrapper.dsp win32/vs6/libdshowsrcwrapper.dsp @@ -9,5 +10,7 @@ win32/vs6/libgstflv.dsp win32/vs6/libgstmpegvideoparse.dsp win32/vs6/libgstneon.dsp win32/vs7/gst-plugins-bad.sln +win32/vs7/libgstdirectdraw.vcproj win32/vs8/gst-plugins-bad.sln +win32/vs8/libgstdirectdraw.vcproj win32/common/libgstdshow.def -- cgit v1.2.1 From 347c35e482643550bba9e4741d6171c7f160ba08 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Sat, 16 May 2009 01:58:33 +0100 Subject: 0.10.11.3 pre-release --- ChangeLog | 1077 +++++++++++++++++++++++++++++++++++++++++++++++++ configure.ac | 2 +- po/af.po | 92 +---- po/az.po | 92 +---- po/bg.po | 268 +++++------- po/ca.po | 92 +---- po/cs.po | 92 +---- po/da.po | 92 +---- po/de.po | 262 ++++-------- po/en_GB.po | 92 +---- po/es.po | 92 +---- po/fi.po | 92 +---- po/fr.po | 92 +---- po/hu.po | 92 +---- po/id.po | 96 +---- po/it.po | 112 +---- po/ky.po | 92 +---- po/lt.po | 92 +---- po/mt.po | 92 +---- po/nb.po | 92 +---- po/nl.po | 92 +---- po/or.po | 92 +---- po/pl.po | 92 +---- po/pt_BR.po | 92 +---- po/ru.po | 92 +---- po/sk.po | 92 +---- po/sq.po | 92 +---- po/sr.po | 92 +---- po/sv.po | 92 +---- po/tr.po | 92 +---- po/uk.po | 92 +---- po/vi.po | 108 +---- po/zh_CN.po | 92 +---- win32/common/config.h | 2 +- 34 files changed, 1301 insertions(+), 3018 deletions(-) diff --git a/ChangeLog b/ChangeLog index a79d0230..eb971757 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,1080 @@ +2009-05-16 01:58:33 +0100 Jan Schmidt + + * configure.ac: + * po/af.po: + * po/az.po: + * po/bg.po: + * po/ca.po: + * po/cs.po: + * po/da.po: + * po/de.po: + * po/en_GB.po: + * po/es.po: + * po/fi.po: + * po/fr.po: + * po/hu.po: + * po/id.po: + * po/it.po: + * po/ky.po: + * po/lt.po: + * po/mt.po: + * po/nb.po: + * po/nl.po: + * po/or.po: + * po/pl.po: + * po/pt_BR.po: + * po/ru.po: + * po/sk.po: + * po/sq.po: + * po/sr.po: + * po/sv.po: + * po/tr.po: + * po/uk.po: + * po/vi.po: + * po/zh_CN.po: + * win32/common/config.h: + 0.10.11.3 pre-release + +2009-05-16 01:53:15 +0100 Jan Schmidt + + * win32/MANIFEST: + win32: Add directdraw project files to the win32 manifest + +2009-05-16 01:14:23 +0100 Jan Schmidt + + * configure.ac: + * docs/plugins/Makefile.am: + * docs/plugins/gst-plugins-bad-plugins-docs.sgml: + * docs/plugins/gst-plugins-bad-plugins-sections.txt: + * docs/plugins/inspect/plugin-directdraw.xml: + * sys/Makefile.am: + Moved 'directdraw' from -good to -bad + +2007-06-15 09:13:55 +0000 Jan Schmidt + + [MOVED FROM GOOD] win32/vs6/: Mark *.dsp & *.dsw as binary files and convert to DOS line endings, as they don't load into VS6 correctly... + Original commit message from CVS: + * win32/vs6/autogen.dsp: + * win32/vs6/gst_plugins_good.dsw: + * win32/vs6/libgstalaw.dsp: + * win32/vs6/libgstalpha.dsp: + * win32/vs6/libgstalphacolor.dsp: + * win32/vs6/libgstapetag.dsp: + * win32/vs6/libgstaudiofx.dsp: + * win32/vs6/libgstauparse.dsp: + * win32/vs6/libgstautodetect.dsp: + * win32/vs6/libgstavi.dsp: + * win32/vs6/libgstcutter.dsp: + * win32/vs6/libgstdirectdraw.dsp: + * win32/vs6/libgstdirectsound.dsp: + * win32/vs6/libgsteffectv.dsp: + * win32/vs6/libgstflx.dsp: + * win32/vs6/libgstgoom.dsp: + * win32/vs6/libgsticydemux.dsp: + * win32/vs6/libgstid3demux.dsp: + * win32/vs6/libgstinterleave.dsp: + * win32/vs6/libgstjpeg.dsp: + * win32/vs6/libgstlevel.dsp: + * win32/vs6/libgstmatroska.dsp: + * win32/vs6/libgstmedian.dsp: + * win32/vs6/libgstmonoscope.dsp: + * win32/vs6/libgstmulaw.dsp: + * win32/vs6/libgstmultipart.dsp: + * win32/vs6/libgstqtdemux.dsp: + * win32/vs6/libgstrtp.dsp: + * win32/vs6/libgstrtsp.dsp: + * win32/vs6/libgstsmpte.dsp: + * win32/vs6/libgstspeex.dsp: + * win32/vs6/libgstudp.dsp: + * win32/vs6/libgstvideobalance.dsp: + * win32/vs6/libgstvideobox.dsp: + * win32/vs6/libgstvideocrop.dsp: + * win32/vs6/libgstvideoflip.dsp: + * win32/vs6/libgstvideomixer.dsp: + * win32/vs6/libgstwaveform.dsp: + * win32/vs6/libgstwavenc.dsp: + * win32/vs6/libgstwavparse.dsp: + Mark *.dsp & *.dsw as binary files and convert to DOS line + endings, as they don't load into VS6 correctly otherwise. + +2007-02-11 15:26:49 +0000 Sébastien Moutte + + [MOVED FROM GOOD] Makefile.am: Add win32 MANIFEST + Original commit message from CVS: + * Makefile.am: + Add win32 MANIFEST + * sys/directdraw/gstdirectdrawsink.c: + * sys/directdraw/gstdirectdrawsink.h: + Clear unused code and add comments. + Remove yuv from template caps, it only supports RGB + actually. + Implement XOverlay interface and remove window and fullscreen + properties. + Add debug logs. + Test for blit capabilities to return only the current colorspace if + the hardware can't blit for one colorspace to another. + * sys/directsound/gstdirectsoundsink.c: + Add some debugs. + * win32/MANIFEST: + Add VS7 project files and solution. + * win32/vs6/gst_plugins_bad.dsw: + * win32/vs6/libgstdirectdraw.dsp: + * win32/vs6/libgstdirectsound.dsp: + * win32/vs6/libgstqtdemux.dsp: + Update project files. + +2006-11-01 10:19:18 +0000 Sergey Scobich + + [MOVED FROM GOOD] sys/: Wait until the window is created before using it; guard unistd.h includes with HAVE_UNISTD_H. (#366523) + Original commit message from CVS: + Patch by: Sergey Scobich + * sys/directdraw/gstdirectdrawsink.c: + (gst_directdrawsink_window_thread), + (gst_directdrawsink_create_default_window): + * sys/directdraw/gstdirectdrawsink.h: + * sys/directsound/gstdirectsoundsink.c: + Wait until the window is created before using it; guard unistd.h + includes with HAVE_UNISTD_H. (#366523) + * win32/vs8/libgstdirectdraw.vcproj: + * win32/vs8/libgstdirectsound.vcproj: + Update project files. + +2006-07-24 21:43:06 +0000 Sébastien Moutte + + [MOVED FROM GOOD] sys/directsound/gstdirectsoundsink.*: Add an attenuation property that will directly attenuate the directsound buffer. + Original commit message from CVS: + * sys/directsound/gstdirectsoundsink.h: + * sys/directsound/gstdirectsoundsink.c: + Add an attenuation property that will directly attenuate the + directsound buffer. + Change the size of the directsound secondary buffer to a half second. + Add more debug logs. + Add a lock to protect dsound buffer write access. + Fix a bad implementation of reset. + * sys/directsound/gstdirectdrawsink.c: + * sys/directsound/gstdirectdrawsink.h: + Add a keep_aspect_ratio property. + Do not use overlay if not supported. + Add more debug logs. + Remove overwrite of WM_ERASEBKGND message handling. It was not + redrawing border when keep_aspect_ratio was enabled. + * win32/common/config.h: + update version waiting an auto-generated config.h + +2006-03-03 23:45:23 +0000 Sébastien Moutte + + [MOVED FROM GOOD] sys/: sinks are now using GST_RANK_PRIMARY to be used with autodectection + Original commit message from CVS: + * sys/directdraw: + * sys/directsound: + sinks are now using GST_RANK_PRIMARY to be used with autodectection + * win32/vs6: + project files updated to fix some bugs + * win32/vs7: + * win32/vs8: + vs7 and vs8 project files added + +2006-01-05 23:17:44 +0000 Sébastien Moutte + + * win32/vs6/libgstdirectdraw.dsp: + [MOVED FROM GOOD] added sys/directdraw added sys/directsound added win32/vs6/gst_plugins_bad.dsw added win32/vs6/libgstdirectsound.dsp ... + Original commit message from CVS: + 2006-01-05 Sebastien Moutte + * added sys/directdraw + * added sys/directsound + * added win32/vs6/gst_plugins_bad.dsw + * added win32/vs6/libgstdirectsound.dsp + * added win32/vs6/libgstdirectdraw.dsp + * added win32/common/config.h + +2009-02-27 20:40:31 +0100 LRN + + * sys/directdraw/gstdirectdrawsink.c: + [MOVED FROM GOOD] directdrawsink: Fix type mismatches + Fixes bug #573343. + +2009-01-29 11:07:59 +0200 Stefan Kost + + * sys/directdraw/gstdirectdrawsink.c: + [MOVED FROM GOOD] Remove version numbers from a few gst-launch examples. + The majority of the examples doe not use -0.10 and this will also help us to maintain the docs. + +2009-01-29 10:10:08 +0200 Stefan Kost + + * sys/directdraw/gstdirectdrawsink.c: + [MOVED FROM GOOD] Update and add documentation for platform specific plugins (sys). + Link to properties. Correct titles for examples. Fix examples. + +2008-11-04 12:28:34 +0000 Stefan Kost + + [MOVED FROM GOOD] Don't install static libs for plugins. Fixes #550851 for -good. + Original commit message from CVS: + * ext/aalib/Makefile.am: + * ext/annodex/Makefile.am: + * ext/cairo/Makefile.am: + * ext/dv/Makefile.am: + * ext/esd/Makefile.am: + * ext/flac/Makefile.am: + * ext/gconf/Makefile.am: + * ext/gdk_pixbuf/Makefile.am: + * ext/hal/Makefile.am: + * ext/jpeg/Makefile.am: + * ext/ladspa/Makefile.am: + * ext/libcaca/Makefile.am: + * ext/libmng/Makefile.am: + * ext/libpng/Makefile.am: + * ext/mikmod/Makefile.am: + * ext/pulse/Makefile.am: + * ext/raw1394/Makefile.am: + * ext/shout2/Makefile.am: + * ext/soup/Makefile.am: + * ext/speex/Makefile.am: + * ext/taglib/Makefile.am: + * ext/wavpack/Makefile.am: + * gst/alpha/Makefile.am: + * gst/apetag/Makefile.am: + * gst/audiofx/Makefile.am: + * gst/auparse/Makefile.am: + * gst/autodetect/Makefile.am: + * gst/avi/Makefile.am: + * gst/cutter/Makefile.am: + * gst/debug/Makefile.am: + * gst/effectv/Makefile.am: + * gst/equalizer/Makefile.am: + * gst/flx/Makefile.am: + * gst/goom/Makefile.am: + * gst/goom2k1/Makefile.am: + * gst/icydemux/Makefile.am: + * gst/id3demux/Makefile.am: + * gst/interleave/Makefile.am: + * gst/law/Makefile.am: + * gst/level/Makefile.am: + * gst/matroska/Makefile.am: + * gst/median/Makefile.am: + * gst/monoscope/Makefile.am: + * gst/multifile/Makefile.am: + * gst/multipart/Makefile.am: + * gst/oldcore/Makefile.am: + * gst/qtdemux/Makefile.am: + * gst/replaygain/Makefile.am: + * gst/rtp/Makefile.am: + * gst/rtsp/Makefile.am: + * gst/smpte/Makefile.am: + * gst/spectrum/Makefile.am: + * gst/udp/Makefile.am: + * gst/videobox/Makefile.am: + * gst/videocrop/Makefile.am: + * gst/videofilter/Makefile.am: + * gst/videomixer/Makefile.am: + * gst/wavenc/Makefile.am: + * gst/wavparse/Makefile.am: + * sys/directdraw/Makefile.am: + * sys/directsound/Makefile.am: + * sys/oss/Makefile.am: + * sys/osxaudio/Makefile.am: + * sys/osxvideo/Makefile.am: + * sys/sunaudio/Makefile.am: + * sys/v4l2/Makefile.am: + * sys/waveform/Makefile.am: + * sys/ximage/Makefile.am: + Don't install static libs for plugins. Fixes #550851 for -good. + +2008-08-21 21:56:19 +0000 Ole André Vadla RavnÃ¥s + + * sys/directdraw/gstdirectdrawsink.c: + [MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_buffer_alloc, gst_directdraw_sink_bufferpool_clear): + Original commit message from CVS: + * sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_buffer_alloc, + gst_directdraw_sink_bufferpool_clear): + Fix two more buffer ref leaks. + +2008-08-21 15:28:09 +0000 Ole André Vadla RavnÃ¥s + + [MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.c: Fix buffer ref leak. + Original commit message from CVS: + Patch by: Ole André Vadla RavnÃ¥s + * sys/directdraw/gstdirectdrawsink.c: + (gst_directdraw_sink_show_frame): + Fix buffer ref leak. + +2008-05-07 15:33:52 +0000 Haakon Sporsheim + + [MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_setup_ddraw): Do IDirectDrawClipper_SetHWnd() if the window I... + Original commit message from CVS: + patch by: Haakon Sporsheim + * sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_setup_ddraw): + Do IDirectDrawClipper_SetHWnd() if the window ID has already been + set after creating the clipper. + +2008-05-07 15:28:06 +0000 Haakon Sporsheim + + [MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_show_frame): Added checking of surface lost case after an uns... + Original commit message from CVS: + patch by: Haakon Sporsheim + * sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_show_frame): + Added checking of surface lost case after an unsuccessful + IDirectDrawSurface7_Lock() call. + If surface is lost, return GST_FLOW_OK. + +2008-05-07 15:19:47 +0000 Haakon Sporsheim + + * sys/directdraw/gstdirectdrawsink.c: + [MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_show_frame, + Original commit message from CVS: + patch by: Haakon Sporsheim + * sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_show_frame, + WndProc, gst_directdraw_sink_window_thread): + Improved Windows message loop and fixed window destruction issue. + When the window which DirectDraw is rendering to is destroyed, the + render/show_frame function will return GST_FLOW_ERROR. + Partially fixes #520885. + +2008-05-07 15:09:10 +0000 Haakon Sporsheim + + [MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_set_caps): Fixed mid stream resolution change bug, the offscr... + Original commit message from CVS: + patch by: Haakon Sporsheim + * sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_set_caps): + Fixed mid stream resolution change bug, the offscreen surface is now + released when set_caps is called. + Partially fixes #520885. + +2008-05-07 14:56:22 +0000 Ole André Vadla RavnÃ¥s + + * sys/directdraw/gstdirectdrawsink.c: + [MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.c + Original commit message from CVS: + * sys/directdraw/gstdirectdrawsink.c + (gst_directdraw_sink_buffer_alloc): + Make it so that gst_directdraw_sink_buffer_alloc uses the right + width/height. + Especially when looking through the pool of buffers, make sure that + the width/height of caps is used instead of the already negotiated + dimensions. + For example if a buffer with different caps is requested, i.e. + higher resolution, the caller would get a buffer with the old + dimensions and thus corrupt the heap. + +2008-05-07 14:43:39 +0000 Ole André Vadla RavnÃ¥s + + * sys/directdraw/gstdirectdrawsink.c: + [MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.c + Original commit message from CVS: + * sys/directdraw/gstdirectdrawsink.c + (gst_directdraw_sink_buffer_alloc): + Clear the flags on recycled buffers from buffer_alloc. + Partially fixes #520885. + The right fix this time. + +2008-05-07 14:39:45 +0000 Ole André Vadla RavnÃ¥s + + * sys/directdraw/gstdirectdrawsink.c: + [MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.c + Original commit message from CVS: + * sys/directdraw/gstdirectdrawsink.c + (gst_directdraw_sink_buffer_alloc): + Reverting previous commit, it had it all mixed up, was for a different + patch (major automation screw-up). Sorry! + +2008-05-07 13:48:28 +0000 Ole André Vadla RavnÃ¥s + + * sys/directdraw/gstdirectdrawsink.c: + [MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.c + Original commit message from CVS: + * sys/directdraw/gstdirectdrawsink.c + (gst_directdraw_sink_buffer_alloc): + Clear the flags on recycled buffers from buffer_alloc. + Partially fixes #520885. + +2008-02-12 12:22:48 +0000 Sebastian Dröge + + [MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.c: Properly chain up finalize functions. Fixes bug #515980. + Original commit message from CVS: + * sys/directdraw/gstdirectdrawsink.c: + (gst_ddrawsurface_class_init), (gst_ddrawsurface_finalize), + (gst_directdraw_sink_finalize): + Properly chain up finalize functions. Fixes bug #515980. + +2008-01-07 16:41:00 +0000 Tim-Philipp Müller + + [MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.c: FALSE is not a gpointer. + Original commit message from CVS: + * sys/directdraw/gstdirectdrawsink.c: + (gst_directdraw_sink_window_thread): + FALSE is not a gpointer. + +2008-01-05 21:20:08 +0000 Julien Moutte + + [MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.c: Make sure we create our internal window only when we need it. That will give a ch... + Original commit message from CVS: + 2008-01-05 Julien Moutte + * sys/directdraw/gstdirectdrawsink.c: + (gst_directdraw_sink_set_window_id), + (gst_directdraw_sink_set_caps), + (gst_directdraw_sink_change_state), + (gst_directdraw_sink_buffer_alloc), + (gst_directdraw_sink_draw_borders), + (gst_directdraw_sink_show_frame), + (gst_directdraw_sink_setup_ddraw), + (gst_directdraw_sink_window_thread), + (gst_directdraw_sink_get_ddrawcaps), + (gst_directdraw_sink_surface_create): Make sure we create our + internal window only when we need it. That will give a chance to + the application to get the prepare-xwindow-id bus message. Draw + black borders when keeping aspect ratio. Handle the case where + our + rendering window disappears (closed or errors) like other sinks + do. Various 80 columns fixes, improve state change order. That + element could need some more love. + +2007-09-22 08:12:57 +0000 Thomas Vander Stichele + + * sys/directdraw/gstdirectdrawsink.c: + * sys/directdraw/gstdirectdrawsink.h: + [MOVED FROM GOOD] fix header and comments + Original commit message from CVS: + fix header and comments + +2007-06-14 12:14:24 +0000 Jan Schmidt + + [MOVED FROM GOOD] Make sure to dist everything needed for win32 builds. + Original commit message from CVS: + * configure.ac: + * sys/Makefile.am: + * sys/directdraw/Makefile.am: + * sys/directsound/Makefile.am: + * sys/waveform/Makefile.am: + Make sure to dist everything needed for win32 builds. + +2007-06-08 16:31:15 +0000 Jan Schmidt + + [MOVED FROM GOOD] Rename the keep-aspect-ratio property to force-aspect-ratio to make it consistent with xvimagesink and ximagesink. + Original commit message from CVS: + * docs/plugins/gst-plugins-bad-plugins.args: + * sys/directdraw/gstdirectdrawsink.c: + (gst_directdraw_sink_class_init): + Rename the keep-aspect-ratio property to force-aspect-ratio to make + it consistent with xvimagesink and ximagesink. + +2007-05-24 08:35:23 +0000 Vincent Torri + + [MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.*: Fix more warnings when compiling with MingW (#439914). + Original commit message from CVS: + Patch by: Vincent Torri + * sys/directdraw/gstdirectdrawsink.c: + (gst_directdraw_sink_buffer_alloc), + (gst_directdraw_sink_show_frame), + (gst_directdraw_sink_check_primary_surface), + (gst_directdraw_sink_check_offscreen_surface), + (EnumModesCallback2), (gst_directdraw_sink_get_ddrawcaps), + (gst_directdraw_sink_surface_create): + * sys/directdraw/gstdirectdrawsink.h: + Fix more warnings when compiling with MingW (#439914). + +2007-05-20 14:59:46 +0000 Tim-Philipp Müller + + [MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.c: Bunch of small fixes: remove static function that doesn't exist; declare another ... + Original commit message from CVS: + * sys/directdraw/gstdirectdrawsink.c: (gst_ddrawsurface_finalize), + (gst_directdraw_sink_buffer_alloc), + (gst_directdraw_sink_get_ddrawcaps), + (gst_directdraw_sink_surface_create): + Bunch of small fixes: remove static function that doesn't exist; + declare another one that does; printf format fix; use right macro + when specifying debug category; remove a bunch of unused variables; + #if 0 out an unused chunk of code (partially fixes #439914). + +2007-05-15 17:22:58 +0000 Tim-Philipp Müller + + [MOVED FROM GOOD] Add DIRECTDRAW_CFLAGS and DIRECTSOUND_CFLAGS to Makefile.am; save and restore the various flags in the directdraw/dir... + Original commit message from CVS: + * configure.ac: + * sys/directdraw/Makefile.am: + * sys/directsound/Makefile.am: + Add DIRECTDRAW_CFLAGS and DIRECTSOUND_CFLAGS to Makefile.am; save + and restore the various flags in the directdraw/directsound + detection section. Apparently improves cross-compiling for win32 + with mingw32 under some circumstances (#437539). + +2007-04-29 13:56:18 +0000 Thomas Vander Stichele + + * sys/directdraw/gstdirectdrawsink.c: + [MOVED FROM GOOD] 80 char police + Original commit message from CVS: + 80 char police + +2007-03-11 22:23:04 +0000 Sébastien Moutte + + [MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.*: Handle display mode changes during playback. + Original commit message from CVS: + * sys/directdraw/gstdirectdrawsink.c: + * sys/directdraw/gstdirectdrawsink.h: + Handle display mode changes during playback. + +2007-02-27 12:02:03 +0000 Christian Schaller + + * sys/directdraw/gstdirectdrawplugin.c: + * sys/directdraw/gstdirectdrawsink.c: + * sys/directdraw/gstdirectdrawsink.h: + [MOVED FROM GOOD] update copyright statements + Original commit message from CVS: + update copyright statements + +2007-02-18 18:00:51 +0000 Sébastien Moutte + + [MOVED FROM GOOD] sys/directdraw/: Prepare the plugin to move to good: + Original commit message from CVS: + * sys/directdraw/gstdirectdrawplugin.c: + * sys/directdraw/gstdirectdrawsink.c: + * sys/directdraw/gstdirectdrawsink.h: + Prepare the plugin to move to good: + Remove unused/untested code (rendering to an extern surface, + yuv format rendering).Use GST_(DEBUG/*)_OBJECT macros + Rename all functions from gst_directdrawsink to gst_directdraw_sink. + Add gtk doc section + Fix a bug in gst_directdraw_sink_show_frame, memcpy line by line + respecting destination surface stride. + * sys/directsound/gstdirectsoundplugin.c: + * sys/directsound/gstdirectsoundsink.c: + * sys/directsound/gstdirectsoundsink.h: + Prepare the plugin to move to good: + Rename all functions from gst_directsoundsink to gst_directsound_sink. + Add gtk doc section + * win32/common/config.h.in: + * win32/MANIFEST: + Add config.h.in + +2007-02-11 15:26:49 +0000 Sébastien Moutte + + [MOVED FROM GOOD] Makefile.am: Add win32 MANIFEST + Original commit message from CVS: + * Makefile.am: + Add win32 MANIFEST + * sys/directdraw/gstdirectdrawsink.c: + * sys/directdraw/gstdirectdrawsink.h: + Clear unused code and add comments. + Remove yuv from template caps, it only supports RGB + actually. + Implement XOverlay interface and remove window and fullscreen + properties. + Add debug logs. + Test for blit capabilities to return only the current colorspace if + the hardware can't blit for one colorspace to another. + * sys/directsound/gstdirectsoundsink.c: + Add some debugs. + * win32/MANIFEST: + Add VS7 project files and solution. + * win32/vs6/gst_plugins_bad.dsw: + * win32/vs6/libgstdirectdraw.dsp: + * win32/vs6/libgstdirectsound.dsp: + * win32/vs6/libgstqtdemux.dsp: + Update project files. + +2007-01-03 19:54:33 +0000 Vincent Torri + + [MOVED FROM GOOD] Add directdrawsink to build and dist it, so it gets built when compiling with MingW on win32 and the required headers... + Original commit message from CVS: + Patch by: Vincent Torri + * configure.ac: + * sys/Makefile.am: + * sys/directdraw/Makefile.am: + Add directdrawsink to build and dist it, so it gets built when + compiling with MingW on win32 and the required headers and libraries + are available (fixes: #392313). + * sys/directdraw/gstdirectdrawsink.c: + (gst_directdrawsink_center_rect), (gst_directdrawsink_show_frame), + (gst_directdrawsink_setup_ddraw), + (gst_directdrawsink_surface_create): + Comment out some unused things and fix some printf format issues in + order to avoid warnings when buildling with MingW (#392313). + +2006-11-01 10:19:18 +0000 Sergey Scobich + + [MOVED FROM GOOD] sys/: Wait until the window is created before using it; guard unistd.h includes with HAVE_UNISTD_H. (#366523) + Original commit message from CVS: + Patch by: Sergey Scobich + * sys/directdraw/gstdirectdrawsink.c: + (gst_directdrawsink_window_thread), + (gst_directdrawsink_create_default_window): + * sys/directdraw/gstdirectdrawsink.h: + * sys/directsound/gstdirectsoundsink.c: + Wait until the window is created before using it; guard unistd.h + includes with HAVE_UNISTD_H. (#366523) + * win32/vs8/libgstdirectdraw.vcproj: + * win32/vs8/libgstdirectsound.vcproj: + Update project files. + +2006-07-24 21:43:06 +0000 Sébastien Moutte + + [MOVED FROM GOOD] sys/directsound/gstdirectsoundsink.*: Add an attenuation property that will directly attenuate the directsound buffer. + Original commit message from CVS: + * sys/directsound/gstdirectsoundsink.h: + * sys/directsound/gstdirectsoundsink.c: + Add an attenuation property that will directly attenuate the + directsound buffer. + Change the size of the directsound secondary buffer to a half second. + Add more debug logs. + Add a lock to protect dsound buffer write access. + Fix a bad implementation of reset. + * sys/directsound/gstdirectdrawsink.c: + * sys/directsound/gstdirectdrawsink.h: + Add a keep_aspect_ratio property. + Do not use overlay if not supported. + Add more debug logs. + Remove overwrite of WM_ERASEBKGND message handling. It was not + redrawing border when keep_aspect_ratio was enabled. + * win32/common/config.h: + update version waiting an auto-generated config.h + +2006-06-12 10:53:26 +0000 Tim-Philipp Müller + + [MOVED FROM GOOD] ext/libmms/gstmms.c: Set caps on outgoing buffers. + Original commit message from CVS: + * ext/libmms/gstmms.c: (gst_mms_create): + Set caps on outgoing buffers. + * sys/directdraw/gstdirectdrawsink.c: (gst_directdrawsink_init): + Comment out unused global instance variable. + +2006-06-01 22:00:26 +0000 Stefan Kost + + [MOVED FROM GOOD] Fix more gobject macros: obj<->klass, GstXXX<->GstXXXClass + Original commit message from CVS: + * ext/alsaspdif/alsaspdifsink.h: + * ext/amrwb/gstamrwbdec.h: + * ext/amrwb/gstamrwbenc.h: + * ext/amrwb/gstamrwbparse.h: + * ext/arts/gst_arts.h: + * ext/artsd/gstartsdsink.h: + * ext/audiofile/gstafparse.h: + * ext/audiofile/gstafsink.h: + * ext/audiofile/gstafsrc.h: + * ext/audioresample/gstaudioresample.h: + * ext/bz2/gstbz2dec.h: + * ext/bz2/gstbz2enc.h: + * ext/dirac/gstdiracdec.h: + * ext/directfb/dfbvideosink.h: + * ext/divx/gstdivxdec.h: + * ext/divx/gstdivxenc.h: + * ext/dts/gstdtsdec.h: + * ext/faac/gstfaac.h: + * ext/gsm/gstgsmdec.h: + * ext/gsm/gstgsmenc.h: + * ext/ivorbis/vorbisenc.h: + * ext/libfame/gstlibfame.h: + * ext/nas/nassink.h: + * ext/neon/gstneonhttpsrc.h: + * ext/polyp/polypsink.h: + * ext/sdl/sdlaudiosink.h: + * ext/sdl/sdlvideosink.h: + * ext/shout/gstshout.h: + * ext/snapshot/gstsnapshot.h: + * ext/sndfile/gstsf.h: + * ext/swfdec/gstswfdec.h: + * ext/tarkin/gsttarkindec.h: + * ext/tarkin/gsttarkinenc.h: + * ext/theora/theoradec.h: + * ext/wavpack/gstwavpackdec.h: + * ext/wavpack/gstwavpackparse.h: + * ext/xine/gstxine.h: + * ext/xvid/gstxviddec.h: + * ext/xvid/gstxvidenc.h: + * gst/cdxaparse/gstcdxaparse.h: + * gst/cdxaparse/gstcdxastrip.h: + * gst/colorspace/gstcolorspace.h: + * gst/festival/gstfestival.h: + * gst/freeze/gstfreeze.h: + * gst/gdp/gstgdpdepay.h: + * gst/gdp/gstgdppay.h: + * gst/modplug/gstmodplug.h: + * gst/mpeg1sys/gstmpeg1systemencode.h: + * gst/mpeg1videoparse/gstmp1videoparse.h: + * gst/mpeg2sub/gstmpeg2subt.h: + * gst/mpegaudioparse/gstmpegaudioparse.h: + * gst/multifilesink/gstmultifilesink.h: + * gst/overlay/gstoverlay.h: + * gst/playondemand/gstplayondemand.h: + * gst/qtdemux/qtdemux.h: + * gst/rtjpeg/gstrtjpegdec.h: + * gst/rtjpeg/gstrtjpegenc.h: + * gst/smooth/gstsmooth.h: + * gst/smoothwave/gstsmoothwave.h: + * gst/spectrum/gstspectrum.h: + * gst/speed/gstspeed.h: + * gst/stereo/gststereo.h: + * gst/switch/gstswitch.h: + * gst/tta/gstttadec.h: + * gst/tta/gstttaparse.h: + * gst/videodrop/gstvideodrop.h: + * gst/xingheader/gstxingmux.h: + * sys/directdraw/gstdirectdrawsink.h: + * sys/directsound/gstdirectsoundsink.h: + * sys/dxr3/dxr3audiosink.h: + * sys/dxr3/dxr3spusink.h: + * sys/dxr3/dxr3videosink.h: + * sys/qcam/gstqcamsrc.h: + * sys/vcd/vcdsrc.h: + Fix more gobject macros: obj<->klass, GstXXX<->GstXXXClass + +2006-04-25 21:56:38 +0000 Stefan Kost + + [MOVED FROM GOOD] Define GstElementDetails as const and also static (when defined as global) + Original commit message from CVS: + * ext/amrwb/gstamrwbdec.c: + * ext/amrwb/gstamrwbenc.c: + * ext/amrwb/gstamrwbparse.c: + * ext/arts/gst_arts.c: + * ext/artsd/gstartsdsink.c: + * ext/audiofile/gstafparse.c: + * ext/audiofile/gstafsink.c: + * ext/audiofile/gstafsrc.c: + * ext/audioresample/gstaudioresample.c: + * ext/bz2/gstbz2dec.c: + * ext/bz2/gstbz2enc.c: + * ext/cdaudio/gstcdaudio.c: + * ext/directfb/dfbvideosink.c: + * ext/divx/gstdivxdec.c: + * ext/divx/gstdivxenc.c: + * ext/dts/gstdtsdec.c: (gst_dtsdec_base_init): + * ext/faac/gstfaac.c: (gst_faac_base_init): + * ext/faad/gstfaad.c: + * ext/gsm/gstgsmdec.c: + * ext/gsm/gstgsmenc.c: + * ext/hermes/gsthermescolorspace.c: + * ext/ivorbis/vorbisfile.c: + * ext/lcs/gstcolorspace.c: + * ext/libfame/gstlibfame.c: + * ext/libmms/gstmms.c: (gst_mms_base_init): + * ext/musepack/gstmusepackdec.c: (gst_musepackdec_base_init): + * ext/musicbrainz/gsttrm.c: (gst_musicbrainz_base_init): + * ext/nas/nassink.c: (gst_nassink_base_init): + * ext/neon/gstneonhttpsrc.c: + * ext/sdl/sdlaudiosink.c: + * ext/sdl/sdlvideosink.c: + * ext/shout/gstshout.c: + * ext/snapshot/gstsnapshot.c: + * ext/sndfile/gstsf.c: + * ext/swfdec/gstswfdec.c: + * ext/tarkin/gsttarkindec.c: + * ext/tarkin/gsttarkinenc.c: + * ext/theora/theoradec.c: + * ext/wavpack/gstwavpackdec.c: (gst_wavpack_dec_base_init): + * ext/wavpack/gstwavpackparse.c: (gst_wavpack_parse_base_init): + * ext/xvid/gstxviddec.c: + * ext/xvid/gstxvidenc.c: + * gst/cdxaparse/gstcdxaparse.c: (gst_cdxa_parse_base_init): + * gst/cdxaparse/gstcdxastrip.c: (gst_cdxastrip_base_init): + * gst/chart/gstchart.c: + * gst/colorspace/gstcolorspace.c: + * gst/deinterlace/gstdeinterlace.c: + * gst/equalizer/gstiirequalizer.c: (gst_iir_equalizer_base_init): + * gst/festival/gstfestival.c: + * gst/filter/gstbpwsinc.c: + * gst/filter/gstiir.c: + * gst/filter/gstlpwsinc.c: + * gst/freeze/gstfreeze.c: + * gst/games/gstpuzzle.c: (gst_puzzle_base_init): + * gst/librfb/gstrfbsrc.c: + * gst/mixmatrix/mixmatrix.c: + * gst/mpeg1sys/gstmpeg1systemencode.c: + * gst/mpeg1videoparse/gstmp1videoparse.c: + * gst/mpeg2sub/gstmpeg2subt.c: + * gst/mpegaudioparse/gstmpegaudioparse.c: + * gst/multifilesink/gstmultifilesink.c: + * gst/overlay/gstoverlay.c: + * gst/passthrough/gstpassthrough.c: + * gst/playondemand/gstplayondemand.c: + * gst/qtdemux/qtdemux.c: + * gst/rtjpeg/gstrtjpegdec.c: + * gst/rtjpeg/gstrtjpegenc.c: + * gst/smooth/gstsmooth.c: + * gst/smoothwave/gstsmoothwave.c: + * gst/spectrum/gstspectrum.c: + * gst/speed/gstspeed.c: + * gst/stereo/gststereo.c: + * gst/switch/gstswitch.c: + * gst/tta/gstttadec.c: (gst_tta_dec_base_init): + * gst/tta/gstttaparse.c: (gst_tta_parse_base_init): + * gst/vbidec/gstvbidec.c: + * gst/videocrop/gstvideocrop.c: + * gst/videodrop/gstvideodrop.c: + * gst/virtualdub/gstxsharpen.c: + * gst/xingheader/gstxingmux.c: (gst_xing_mux_base_init): + * gst/y4m/gsty4mencode.c: + * sys/cdrom/gstcdplayer.c: + * sys/directdraw/gstdirectdrawsink.c: + * sys/directsound/gstdirectsoundsink.c: + * sys/glsink/glimagesink.c: + * sys/qcam/gstqcamsrc.c: + * sys/v4l2/gstv4l2src.c: + * sys/vcd/vcdsrc.c: (gst_vcdsrc_base_init): + * sys/ximagesrc/ximagesrc.c: + Define GstElementDetails as const and also static (when defined as + global) + +2006-04-01 10:09:11 +0000 Thomas Vander Stichele + + * sys/directdraw/gstdirectdrawplugin.c: + [MOVED FROM GOOD] rework build; add translations for v4l2 + Original commit message from CVS: + rework build; add translations for v4l2 + +2006-03-03 23:45:23 +0000 Sébastien Moutte + + [MOVED FROM GOOD] sys/: sinks are now using GST_RANK_PRIMARY to be used with autodectection + Original commit message from CVS: + * sys/directdraw: + * sys/directsound: + sinks are now using GST_RANK_PRIMARY to be used with autodectection + * win32/vs6: + project files updated to fix some bugs + * win32/vs7: + * win32/vs8: + vs7 and vs8 project files added + +2006-01-05 23:17:44 +0000 Sébastien Moutte + + * sys/directdraw/gstdirectdrawplugin.c: + * sys/directdraw/gstdirectdrawsink.c: + * sys/directdraw/gstdirectdrawsink.h: + [MOVED FROM GOOD] added sys/directdraw added sys/directsound added win32/vs6/gst_plugins_bad.dsw added win32/vs6/libgstdirectsound.dsp ... + Original commit message from CVS: + 2006-01-05 Sebastien Moutte + * added sys/directdraw + * added sys/directsound + * added win32/vs6/gst_plugins_bad.dsw + * added win32/vs6/libgstdirectsound.dsp + * added win32/vs6/libgstdirectdraw.dsp + * added win32/common/config.h + +2009-05-15 10:45:45 +0100 Jan Schmidt + + * gst/debugutils/fpsdisplaysink.c: + fpsdisplaysink: Fix resetting of the sink in NULL + Reset the fpsdisplaysink in NULL by removing the textoverlay if we + created it. + Fixes: #582633 + +2009-05-16 00:17:00 +0100 Jan Schmidt + + * configure.ac: + * docs/plugins/Makefile.am: + * docs/plugins/gst-plugins-bad-plugins-docs.sgml: + * docs/plugins/gst-plugins-bad-plugins-sections.txt: + * docs/plugins/inspect/plugin-y4menc.xml: + * gst/y4m/Makefile.am: + * gst/y4m/gsty4mencode.c: + * gst/y4m/gsty4mencode.h: + * gst/y4m/y4menc.vcproj: + * tests/check/Makefile.am: + * tests/check/elements/.gitignore: + * tests/check/elements/y4menc.c: + Moved 'y4menc' from -bad to -good + +2009-05-15 18:24:41 +0100 Tim-Philipp Müller + + * po/Makevars: + po: add Makevars magic so we don't get line numbers in *.po files + This avoids the number one reason for local modifications in *.po + files and and makes things less annoying when working with git (or + any other VCS for that matter). + +2009-05-15 01:54:44 -0300 Thiago Santos + + * gst/qtmux/atoms.c: + [qtmux] Fixes segfault when adding a blob as first tag. + Moves tags data initialization to the function that actually appends + the tags to the list. Fixes #582702 + Also fixes some style caught by the pre-commit hook. + +2009-05-14 21:20:47 +0200 Sebastian Dröge + + * gst/mxf/mxfdemux.c: + * gst/mxf/mxfdemux.h: + mxfdemux: Use a RW lock to protect metadata and add all pads at once without a lock held + This makes it possible, among other things, to do a query in the + pad-added callback. + Fixes bug #582656. + +2009-05-14 10:34:08 +0100 Jan Schmidt + + * ext/resindvd/resindvdsrc.c: + resindvd: Fix the argument order in a debug statement + Make the debug statement correctly show the 'old' and 'new' button + coordinates, instead of the wrong way around. + +2009-05-14 09:53:25 +0100 Jan Schmidt + + * ext/resindvd/gstmpegdemux.c: + * ext/resindvd/gstmpegdemux.h: + resindvd: Make segment updates less aggressive. + When updating a pad, send the update to half a second behind the SCR, + which avoids ever updating the start time for a pad to beyond the end of + the cell. Also, remember the last actual new-segment start time for each + pad, and use it when closing the segment. + +2009-05-13 12:47:43 +0100 Jan Schmidt + + * ext/resindvd/resindvdsrc.c: + resindvd: Rework button highlight calculation slightly + When the current button number is higher than the number of available + buttons, switch to the highest numbered button rather than the lowest. + Also, don't throw errors when we fail to retrieve some button info + from libdvdnav, just reset the highlight. + +2009-05-12 23:42:00 +0100 Jan Schmidt + + * ext/resindvd/resindvdsrc.c: + * ext/resindvd/resindvdsrc.h: + resindvd: Send commands-changed on button change and handle commands query + Send the commands-changed navigation message when the set of available + DVD menu button actions changes, and handle the commands navigation + query so that (e.g.) Totem can know about the available navigation + commands. + +2009-05-14 08:42:24 +0100 Jan Schmidt + + * ext/resindvd/resindvdsrc.c: + resindvd: Fix a leak of the DVD title string + +2009-05-14 10:55:38 +0100 Jan Schmidt + + * gst/dvdspu/gstdvdspu.c: + dvdspu: Push update frame, if any, when entering stills. + When entering a still frame generates an updated buffer, make sure + to push it out, otherwise we may not put a frame onscreen with a + rendered button, causing raciness as to whether buttons get drawn + or not when jumping back to the menu on some discs. + +2009-05-13 10:29:36 +0100 Jan Schmidt + + * ext/resindvd/resindvdbin.c: + * ext/resindvd/resindvdbin.h: + resindvd: Fix raciness in rsndvdbin when initially creating pads + Protect pad exposure with a preroll lock to avoid situations + where no-more-pads is fired more than once, or fired just before + the last pad is actually added. + +2009-05-13 17:55:46 +0200 Wim Taymans + + * gst/y4m/gsty4mencode.c: + y4menc: change my email + change my email to something more current + See #580783 + +2009-05-13 17:54:47 +0200 Wim Taymans + + * gst/y4m/gsty4mencode.c: + y4menc: don't strip timestamps + Fixes #582483 + +2009-05-13 10:47:23 +0200 Sebastian Dröge + + * configure.ac: + * docs/plugins/Makefile.am: + * docs/plugins/gst-plugins-bad-plugins-docs.sgml: + * docs/plugins/gst-plugins-bad-plugins-sections.txt: + * docs/plugins/inspect/plugin-deinterlace2.xml: + * docs/plugins/inspect/plugin-gstinterlace.xml: + * gst/deinterlace/.gitignore: + * gst/deinterlace/Makefile.am: + * gst/deinterlace/deinterlace.vcproj: + * gst/deinterlace/gstdeinterlace.c: + * gst/deinterlace/gstdeinterlace.h: + * gst/deinterlace2/Makefile.am: + * gst/deinterlace2/gstdeinterlace2.c: + * gst/deinterlace2/gstdeinterlace2.h: + * gst/deinterlace2/tvtime/greedy.c: + * gst/deinterlace2/tvtime/greedyh.asm: + * gst/deinterlace2/tvtime/greedyh.c: + * gst/deinterlace2/tvtime/greedyhmacros.h: + * gst/deinterlace2/tvtime/linear.c: + * gst/deinterlace2/tvtime/linearblend.c: + * gst/deinterlace2/tvtime/mmx.h: + * gst/deinterlace2/tvtime/plugins.h: + * gst/deinterlace2/tvtime/scalerbob.c: + * gst/deinterlace2/tvtime/sse.h: + * gst/deinterlace2/tvtime/tomsmocomp.c: + * gst/deinterlace2/tvtime/tomsmocomp/SearchLoop0A.inc: + * gst/deinterlace2/tvtime/tomsmocomp/SearchLoopBottom.inc: + * gst/deinterlace2/tvtime/tomsmocomp/SearchLoopEdgeA.inc: + * gst/deinterlace2/tvtime/tomsmocomp/SearchLoopEdgeA8.inc: + * gst/deinterlace2/tvtime/tomsmocomp/SearchLoopOddA.inc: + * gst/deinterlace2/tvtime/tomsmocomp/SearchLoopOddA2.inc: + * gst/deinterlace2/tvtime/tomsmocomp/SearchLoopOddA6.inc: + * gst/deinterlace2/tvtime/tomsmocomp/SearchLoopOddAH.inc: + * gst/deinterlace2/tvtime/tomsmocomp/SearchLoopOddAH2.inc: + * gst/deinterlace2/tvtime/tomsmocomp/SearchLoopTop.inc: + * gst/deinterlace2/tvtime/tomsmocomp/SearchLoopVA.inc: + * gst/deinterlace2/tvtime/tomsmocomp/SearchLoopVAH.inc: + * gst/deinterlace2/tvtime/tomsmocomp/StrangeBob.inc: + * gst/deinterlace2/tvtime/tomsmocomp/TomsMoCompAll.inc: + * gst/deinterlace2/tvtime/tomsmocomp/TomsMoCompAll2.inc: + * gst/deinterlace2/tvtime/tomsmocomp/WierdBob.inc: + * gst/deinterlace2/tvtime/tomsmocomp/tomsmocompmacros.h: + * gst/deinterlace2/tvtime/vfir.c: + * gst/deinterlace2/tvtime/weave.c: + * gst/deinterlace2/tvtime/weavebff.c: + * gst/deinterlace2/tvtime/weavetff.c: + * gst/deinterlace2/tvtime/x86-64_macros.inc: + Moved 'deinterlace2' from -bad to -good + And remove old deinterlace plugin as deinterlace2 will + be called deinterlace in -good. + +2009-05-12 21:50:12 +0200 Sebastian Dröge + + * configure.ac: + * docs/plugins/Makefile.am: + * docs/plugins/gst-plugins-bad-plugins-docs.sgml: + * docs/plugins/gst-plugins-bad-plugins-sections.txt: + * docs/plugins/inspect/plugin-flv.xml: + * docs/plugins/inspect/plugin-flvdemux.xml: + * gst/flv/Makefile.am: + * gst/flv/gstflvdemux.c: + * gst/flv/gstflvdemux.h: + * gst/flv/gstflvmux.c: + * gst/flv/gstflvmux.h: + * gst/flv/gstflvparse.c: + * gst/flv/gstflvparse.h: + Moved 'flv' from -bad to -good + +2009-05-12 00:50:01 +0100 Jan Schmidt + + * ChangeLog: + * configure.ac: + * po/af.po: + * po/az.po: + * po/bg.po: + * po/ca.po: + * po/cs.po: + * po/da.po: + * po/de.po: + * po/en_GB.po: + * po/es.po: + * po/fi.po: + * po/fr.po: + * po/hu.po: + * po/id.po: + * po/it.po: + * po/ky.po: + * po/lt.po: + * po/mt.po: + * po/nb.po: + * po/nl.po: + * po/or.po: + * po/pl.po: + * po/pt_BR.po: + * po/ru.po: + * po/sk.po: + * po/sq.po: + * po/sr.po: + * po/sv.po: + * po/tr.po: + * po/uk.po: + * po/vi.po: + * po/zh_CN.po: + * win32/common/config.h: + 0.10.11.2 pre-release + 2009-05-11 17:50:41 +0100 Jan Schmidt * ext/resindvd/gstmpegdemux.c: diff --git a/configure.ac b/configure.ac index 78ddecc3..a0f16e1f 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ AC_PREREQ(2.52) dnl initialize autoconf dnl when going to/from release please set the nano (fourth number) right ! dnl releases only do Wall, cvs and prerelease does Werror too -AC_INIT(GStreamer Bad Plug-ins, 0.10.11.2, +AC_INIT(GStreamer Bad Plug-ins, 0.10.11.3, http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer, gst-plugins-bad) diff --git a/po/af.po b/po/af.po index bcdb15a2..894e8b64 100644 --- a/po/af.po +++ b/po/af.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins 0.7.6\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-12 00:07+0100\n" +"POT-Creation-Date: 2009-05-16 01:36+0100\n" "PO-Revision-Date: 2004-03-18 14:16+0200\n" "Last-Translator: Petri Jooste \n" "Language-Team: Afrikaans \n" @@ -15,385 +15,295 @@ msgstr "" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" -#: ext/resindvd/resindvdsrc.c:352 #, fuzzy msgid "Could not read title information for DVD." msgstr "Kon nie skryf na lêer \"%s\" nie." -#: ext/resindvd/resindvdsrc.c:358 #, fuzzy, c-format msgid "Failed to open DVD device '%s'." msgstr "Kon nie beheertoestel \"%s\" toemaak nie." -#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "" -#: ext/resindvd/rsnbasesrc.c:1659 msgid "Internal clock error." msgstr "" -#: ext/resindvd/rsnbasesrc.c:1904 ext/resindvd/rsnbasesrc.c:1915 -#: gst/aiffparse/aiffparse.c:1265 msgid "Internal data flow error." msgstr "" -#: ext/sndfile/gstsfsink.c:277 ext/sndfile/gstsfsrc.c:345 #, fuzzy msgid "No file name specified for writing." msgstr "Geen lêernaam gespesifiseer." -#: ext/sndfile/gstsfsink.c:290 ext/sndfile/gstsfsrc.c:351 #, c-format msgid "Could not open file \"%s\" for writing." msgstr "Kon nie lêer \"%s\" oopmaak om in te skryf nie." -#: ext/sndfile/gstsfsink.c:440 gst/nuvdemux/gstnuvdemux.c:735 msgid "Internal data stream error." msgstr "" -#: ext/sndfile/gstsfsink.c:494 ext/sndfile/gstsfsink.c:502 #, c-format msgid "Could not write to file \"%s\"." msgstr "Kon nie skryf na lêer \"%s\" nie." -#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Toestel \"%s\" bestaan nie." -#: sys/dvb/gstdvbsrc.c:710 #, fuzzy, c-format msgid "Could not open frontend device \"%s\"." msgstr "Kon nie beheertoestel \"%s\" toemaak nie." -#: sys/dvb/gstdvbsrc.c:722 #, fuzzy, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Kon nie genoeg buffers vanaf toestel \"%s\" kry nie." -#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Kon nie lêer \"%s\" oopmaak om te lees nie." -#: sys/oss4/oss4-mixer.c:302 #, fuzzy msgid "Could not open audio device for mixer control handling." msgstr "Kon nie oudio-toestel \"%s\" oopmaak vir skryf nie." -#: sys/oss4/oss4-mixer.c:316 msgid "" "Could not open audio device for mixer control handling. This version of the " "Open Sound System is not supported by this element." msgstr "" -#: sys/oss4/oss4-mixer.c:720 msgid "Fast" msgstr "" -#: sys/oss4/oss4-mixer.c:721 msgid "Low" msgstr "" -#: sys/oss4/oss4-mixer.c:722 msgid "Medium" msgstr "" -#: sys/oss4/oss4-mixer.c:723 msgid "High" msgstr "" -#: sys/oss4/oss4-mixer.c:724 msgid "Very high" msgstr "" -#: sys/oss4/oss4-mixer.c:725 msgid "Production" msgstr "" -#: sys/oss4/oss4-mixer.c:726 msgid "Off" msgstr "" -#: sys/oss4/oss4-mixer.c:727 msgid "On" msgstr "" -#: sys/oss4/oss4-mixer.c:728 msgid "Stereo" msgstr "" -#: sys/oss4/oss4-mixer.c:729 msgid "Surround sound" msgstr "" -#: sys/oss4/oss4-mixer.c:730 sys/oss4/oss4-mixer.c:805 msgid "Input mix" msgstr "" -#: sys/oss4/oss4-mixer.c:731 sys/oss4/oss4-mixer.c:800 msgid "Front" msgstr "" -#: sys/oss4/oss4-mixer.c:732 sys/oss4/oss4-mixer.c:801 #, fuzzy msgid "Rear" msgstr "Neem op" -#: sys/oss4/oss4-mixer.c:733 sys/oss4/oss4-mixer.c:802 #, fuzzy msgid "Side" msgstr "Video" -#: sys/oss4/oss4-mixer.c:734 sys/oss4/oss4-mixer.c:803 msgid "Center / LFE" msgstr "" -#: sys/oss4/oss4-mixer.c:735 sys/oss4/oss4-mixer.c:794 msgid "Microphone" msgstr "Mikrofoon" -#: sys/oss4/oss4-mixer.c:736 sys/oss4/oss4-mixer.c:795 msgid "Front panel microphone" msgstr "" -#: sys/oss4/oss4-mixer.c:737 msgid "Input" msgstr "" -#: sys/oss4/oss4-mixer.c:738 sys/oss4/oss4-mixer.c:796 msgid "Line-in" msgstr "Lyn-in" -#: sys/oss4/oss4-mixer.c:739 #, fuzzy msgid "PCM 1" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:740 #, fuzzy msgid "PCM 2" msgstr "PCM-2" -#: sys/oss4/oss4-mixer.c:741 #, fuzzy msgid "PCM 3" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:742 #, fuzzy msgid "PCM 4" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:754 msgid "Green connector" msgstr "" -#: sys/oss4/oss4-mixer.c:755 msgid "Green front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:756 msgid "Pink connector" msgstr "" -#: sys/oss4/oss4-mixer.c:757 msgid "Pink front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:758 msgid "Blue connector" msgstr "" -#: sys/oss4/oss4-mixer.c:759 msgid "Blue front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:760 msgid "Orange connector" msgstr "" -#: sys/oss4/oss4-mixer.c:761 msgid "Orange front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:762 msgid "Black connector" msgstr "" -#: sys/oss4/oss4-mixer.c:763 msgid "Black front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:764 msgid "Gray connector" msgstr "" -#: sys/oss4/oss4-mixer.c:765 msgid "Gray front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:766 msgid "White connector" msgstr "" -#: sys/oss4/oss4-mixer.c:767 msgid "White front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:768 msgid "Red connector" msgstr "" -#: sys/oss4/oss4-mixer.c:769 msgid "Red front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:770 msgid "Yellow connector" msgstr "" -#: sys/oss4/oss4-mixer.c:771 msgid "Yellow front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:774 msgid "Green connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:775 msgid "Green front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:776 msgid "Pink connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:777 msgid "Pink front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:778 msgid "Blue connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:779 msgid "Blue front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:780 msgid "Orange connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:781 msgid "Orange front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:782 msgid "Black connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:783 msgid "Black front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:784 msgid "Gray connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:785 msgid "Gray front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:786 msgid "White connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:787 msgid "White front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:788 msgid "Red connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:789 msgid "Red front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:790 msgid "Yellow connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:791 msgid "Yellow front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:797 msgid "Front panel line-in" msgstr "" -#: sys/oss4/oss4-mixer.c:798 msgid "Headphones" msgstr "" -#: sys/oss4/oss4-mixer.c:799 msgid "Front panel headphones" msgstr "" -#: sys/oss4/oss4-mixer.c:804 msgid "PCM" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:846 msgid "Virtual mixer input" msgstr "" -#: sys/oss4/oss4-mixer.c:848 msgid "Virtual mixer output" msgstr "" -#: sys/oss4/oss4-mixer.c:850 msgid "Virtual mixer channel configuration" msgstr "" -#: sys/oss4/oss4-sink.c:376 sys/oss4/oss4-source.c:367 msgid "" "Could not open audio device for playback. Device is being used by another " "application." msgstr "" -#: sys/oss4/oss4-sink.c:386 sys/oss4/oss4-source.c:377 msgid "" "Could not open audio device for playback. You don't have permission to open " "the device." msgstr "" -#: sys/oss4/oss4-sink.c:397 sys/oss4/oss4-source.c:388 #, fuzzy msgid "Could not open audio device for playback." msgstr "Kon nie oudio-toestel \"%s\" oopmaak vir skryf nie." -#: sys/oss4/oss4-sink.c:406 sys/oss4/oss4-source.c:398 msgid "" "Could not open audio device for playback. This version of the Open Sound " "System is not supported by this element." msgstr "" -#: sys/oss4/oss4-sink.c:522 msgid "Playback is not supported by this audio device." msgstr "" -#: sys/oss4/oss4-sink.c:529 msgid "Audio playback error." msgstr "" -#: sys/oss4/oss4-source.c:520 msgid "Recording is not supported by this audio device." msgstr "" -#: sys/oss4/oss4-source.c:527 msgid "Error recording from audio device." msgstr "" diff --git a/po/az.po b/po/az.po index 343edd02..f346d31e 100644 --- a/po/az.po +++ b/po/az.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-0.8.0\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-12 00:07+0100\n" +"POT-Creation-Date: 2009-05-16 01:36+0100\n" "PO-Revision-Date: 2004-03-19 18:29+0200\n" "Last-Translator: Metin Amiroff \n" "Language-Team: Azerbaijani \n" @@ -16,385 +16,295 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.0.2\n" -#: ext/resindvd/resindvdsrc.c:352 #, fuzzy msgid "Could not read title information for DVD." msgstr "\"%s\" faylına yazıla bilmÉ™di." -#: ext/resindvd/resindvdsrc.c:358 #, fuzzy, c-format msgid "Failed to open DVD device '%s'." msgstr "\"%s\" idarÉ™ avadanlığı baÄŸlana bilmÉ™di." -#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "" -#: ext/resindvd/rsnbasesrc.c:1659 msgid "Internal clock error." msgstr "" -#: ext/resindvd/rsnbasesrc.c:1904 ext/resindvd/rsnbasesrc.c:1915 -#: gst/aiffparse/aiffparse.c:1265 msgid "Internal data flow error." msgstr "" -#: ext/sndfile/gstsfsink.c:277 ext/sndfile/gstsfsrc.c:345 #, fuzzy msgid "No file name specified for writing." msgstr "Fayl adı verilmÉ™yib." -#: ext/sndfile/gstsfsink.c:290 ext/sndfile/gstsfsrc.c:351 #, c-format msgid "Could not open file \"%s\" for writing." msgstr "\"%s\" faylı yazma üçün açıla bilmÉ™di." -#: ext/sndfile/gstsfsink.c:440 gst/nuvdemux/gstnuvdemux.c:735 msgid "Internal data stream error." msgstr "" -#: ext/sndfile/gstsfsink.c:494 ext/sndfile/gstsfsink.c:502 #, c-format msgid "Could not write to file \"%s\"." msgstr "\"%s\" faylına yazıla bilmÉ™di." -#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "\"%s\" avadanlığı mövcud deyil." -#: sys/dvb/gstdvbsrc.c:710 #, fuzzy, c-format msgid "Could not open frontend device \"%s\"." msgstr "\"%s\" idarÉ™ avadanlığı baÄŸlana bilmÉ™di." -#: sys/dvb/gstdvbsrc.c:722 #, fuzzy, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "\"%s\" avadanlığından kifayÉ™t qÉ™dÉ™r bufferlÉ™r alına bilmÉ™di." -#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "\"%s\" faylı oxuma üçün açıla bilmÉ™di." -#: sys/oss4/oss4-mixer.c:302 #, fuzzy msgid "Could not open audio device for mixer control handling." msgstr "\"%s\" audio avadanlığı yazma üçün açıla bilmÉ™di." -#: sys/oss4/oss4-mixer.c:316 msgid "" "Could not open audio device for mixer control handling. This version of the " "Open Sound System is not supported by this element." msgstr "" -#: sys/oss4/oss4-mixer.c:720 msgid "Fast" msgstr "" -#: sys/oss4/oss4-mixer.c:721 msgid "Low" msgstr "" -#: sys/oss4/oss4-mixer.c:722 msgid "Medium" msgstr "" -#: sys/oss4/oss4-mixer.c:723 msgid "High" msgstr "" -#: sys/oss4/oss4-mixer.c:724 msgid "Very high" msgstr "" -#: sys/oss4/oss4-mixer.c:725 msgid "Production" msgstr "" -#: sys/oss4/oss4-mixer.c:726 msgid "Off" msgstr "" -#: sys/oss4/oss4-mixer.c:727 msgid "On" msgstr "" -#: sys/oss4/oss4-mixer.c:728 msgid "Stereo" msgstr "" -#: sys/oss4/oss4-mixer.c:729 msgid "Surround sound" msgstr "" -#: sys/oss4/oss4-mixer.c:730 sys/oss4/oss4-mixer.c:805 msgid "Input mix" msgstr "" -#: sys/oss4/oss4-mixer.c:731 sys/oss4/oss4-mixer.c:800 msgid "Front" msgstr "" -#: sys/oss4/oss4-mixer.c:732 sys/oss4/oss4-mixer.c:801 #, fuzzy msgid "Rear" msgstr "Qeyd" -#: sys/oss4/oss4-mixer.c:733 sys/oss4/oss4-mixer.c:802 #, fuzzy msgid "Side" msgstr "Video" -#: sys/oss4/oss4-mixer.c:734 sys/oss4/oss4-mixer.c:803 msgid "Center / LFE" msgstr "" -#: sys/oss4/oss4-mixer.c:735 sys/oss4/oss4-mixer.c:794 msgid "Microphone" msgstr "Mikrofon" -#: sys/oss4/oss4-mixer.c:736 sys/oss4/oss4-mixer.c:795 msgid "Front panel microphone" msgstr "" -#: sys/oss4/oss4-mixer.c:737 msgid "Input" msgstr "" -#: sys/oss4/oss4-mixer.c:738 sys/oss4/oss4-mixer.c:796 msgid "Line-in" msgstr "XÉ™td-giriÅŸ" -#: sys/oss4/oss4-mixer.c:739 #, fuzzy msgid "PCM 1" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:740 #, fuzzy msgid "PCM 2" msgstr "PCM-2" -#: sys/oss4/oss4-mixer.c:741 #, fuzzy msgid "PCM 3" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:742 #, fuzzy msgid "PCM 4" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:754 msgid "Green connector" msgstr "" -#: sys/oss4/oss4-mixer.c:755 msgid "Green front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:756 msgid "Pink connector" msgstr "" -#: sys/oss4/oss4-mixer.c:757 msgid "Pink front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:758 msgid "Blue connector" msgstr "" -#: sys/oss4/oss4-mixer.c:759 msgid "Blue front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:760 msgid "Orange connector" msgstr "" -#: sys/oss4/oss4-mixer.c:761 msgid "Orange front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:762 msgid "Black connector" msgstr "" -#: sys/oss4/oss4-mixer.c:763 msgid "Black front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:764 msgid "Gray connector" msgstr "" -#: sys/oss4/oss4-mixer.c:765 msgid "Gray front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:766 msgid "White connector" msgstr "" -#: sys/oss4/oss4-mixer.c:767 msgid "White front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:768 msgid "Red connector" msgstr "" -#: sys/oss4/oss4-mixer.c:769 msgid "Red front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:770 msgid "Yellow connector" msgstr "" -#: sys/oss4/oss4-mixer.c:771 msgid "Yellow front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:774 msgid "Green connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:775 msgid "Green front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:776 msgid "Pink connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:777 msgid "Pink front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:778 msgid "Blue connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:779 msgid "Blue front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:780 msgid "Orange connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:781 msgid "Orange front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:782 msgid "Black connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:783 msgid "Black front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:784 msgid "Gray connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:785 msgid "Gray front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:786 msgid "White connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:787 msgid "White front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:788 msgid "Red connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:789 msgid "Red front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:790 msgid "Yellow connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:791 msgid "Yellow front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:797 msgid "Front panel line-in" msgstr "" -#: sys/oss4/oss4-mixer.c:798 msgid "Headphones" msgstr "" -#: sys/oss4/oss4-mixer.c:799 msgid "Front panel headphones" msgstr "" -#: sys/oss4/oss4-mixer.c:804 msgid "PCM" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:846 msgid "Virtual mixer input" msgstr "" -#: sys/oss4/oss4-mixer.c:848 msgid "Virtual mixer output" msgstr "" -#: sys/oss4/oss4-mixer.c:850 msgid "Virtual mixer channel configuration" msgstr "" -#: sys/oss4/oss4-sink.c:376 sys/oss4/oss4-source.c:367 msgid "" "Could not open audio device for playback. Device is being used by another " "application." msgstr "" -#: sys/oss4/oss4-sink.c:386 sys/oss4/oss4-source.c:377 msgid "" "Could not open audio device for playback. You don't have permission to open " "the device." msgstr "" -#: sys/oss4/oss4-sink.c:397 sys/oss4/oss4-source.c:388 #, fuzzy msgid "Could not open audio device for playback." msgstr "\"%s\" audio avadanlığı yazma üçün açıla bilmÉ™di." -#: sys/oss4/oss4-sink.c:406 sys/oss4/oss4-source.c:398 msgid "" "Could not open audio device for playback. This version of the Open Sound " "System is not supported by this element." msgstr "" -#: sys/oss4/oss4-sink.c:522 msgid "Playback is not supported by this audio device." msgstr "" -#: sys/oss4/oss4-sink.c:529 msgid "Audio playback error." msgstr "" -#: sys/oss4/oss4-source.c:520 msgid "Recording is not supported by this audio device." msgstr "" -#: sys/oss4/oss4-source.c:527 msgid "Error recording from audio device." msgstr "" diff --git a/po/bg.po b/po/bg.po index 80bb8d76..afbb38e0 100644 --- a/po/bg.po +++ b/po/bg.po @@ -1,14 +1,14 @@ # Bulgarian translation of gst-plugins-bad. -# Copyright (C) 2007, 2008 Free Software Fondation, Inc. +# Copyright (C) 2007, 2008, 2009 Free Software Fondation, Inc. # This file is distributed under the same license as the gst-plugins-bad package. -# Alexander Shopov , 2007, 2008. +# Alexander Shopov , 2007, 2008, 2009. # msgid "" msgstr "" -"Project-Id-Version: gst-plugins-bad 0.10.7.2\n" +"Project-Id-Version: gst-plugins-bad 0.10.11.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-12 00:07+0100\n" -"PO-Revision-Date: 2008-07-21 11:20+0300\n" +"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"PO-Revision-Date: 2009-05-15 08:31+0300\n" "Last-Translator: Alexander Shopov \n" "Language-Team: Bulgarian \n" "MIME-Version: 1.0\n" @@ -16,379 +16,293 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -#: ext/resindvd/resindvdsrc.c:352 -#, fuzzy msgid "Could not read title information for DVD." -msgstr "Във файла „%s“ не може да Ñе пише." +msgstr "ИнформациÑта за заглавието на DVD-то не може да бъде прочетена." -#: ext/resindvd/resindvdsrc.c:358 -#, fuzzy, c-format +#, c-format msgid "Failed to open DVD device '%s'." -msgstr "УÑтройÑтвото „%s“ не може да бъде отворено." +msgstr "УÑтройÑтвото за DVD „%s“ не може да бъде отворено." -#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." -msgstr "" +msgstr "ÐеуÑпех при задаване на Ñ‚ÑŠÑ€Ñене чрез PGC." -#: ext/resindvd/rsnbasesrc.c:1659 -#, fuzzy msgid "Internal clock error." -msgstr "Вътрешна грешка в потока от данни." +msgstr "Вътрешна грешка в чаÑовника." -#: ext/resindvd/rsnbasesrc.c:1904 ext/resindvd/rsnbasesrc.c:1915 -#: gst/aiffparse/aiffparse.c:1265 -#, fuzzy msgid "Internal data flow error." msgstr "Вътрешна грешка в потока от данни." -#: ext/sndfile/gstsfsink.c:277 ext/sndfile/gstsfsrc.c:345 msgid "No file name specified for writing." msgstr "Ðе е указано име на файл, в който да Ñе пише." -#: ext/sndfile/gstsfsink.c:290 ext/sndfile/gstsfsrc.c:351 #, c-format msgid "Could not open file \"%s\" for writing." msgstr "Файлът „%s“ не може да бъде отворен за запиÑ." -#: ext/sndfile/gstsfsink.c:440 gst/nuvdemux/gstnuvdemux.c:735 msgid "Internal data stream error." msgstr "Вътрешна грешка в потока от данни." -#: ext/sndfile/gstsfsink.c:494 ext/sndfile/gstsfsink.c:502 #, c-format msgid "Could not write to file \"%s\"." msgstr "Във файла „%s“ не може да Ñе пише." -#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "УÑтройÑтвото „%s“ не ÑъщеÑтвува." -#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "УÑтройÑтвото „%s“ не може да бъде отворено." -#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Ðе могат да бъдат получени наÑтройките от уÑтройÑтвото „%s“." -#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Файлът „%s“ не може да бъде отворен за четене." -#: sys/oss4/oss4-mixer.c:302 -#, fuzzy msgid "Could not open audio device for mixer control handling." -msgstr "Файлът „%s“ не може да бъде отворен за четене." +msgstr "" +"Ðудио уÑтройÑтвото не може да бъде отворено за управление на ÑмеÑването." -#: sys/oss4/oss4-mixer.c:316 msgid "" "Could not open audio device for mixer control handling. This version of the " "Open Sound System is not supported by this element." msgstr "" +"Ðудио уÑтройÑтвото не може да бъде отворено за управление на ÑмеÑването. " +"Тази верÑÐ¸Ñ Ð½Ð° Open Sound System не Ñе поддържа от този елемент." -#: sys/oss4/oss4-mixer.c:720 msgid "Fast" -msgstr "" +msgstr "Бързо" -#: sys/oss4/oss4-mixer.c:721 msgid "Low" -msgstr "" +msgstr "ÐиÑки" -#: sys/oss4/oss4-mixer.c:722 msgid "Medium" -msgstr "" +msgstr "Средни" -#: sys/oss4/oss4-mixer.c:723 msgid "High" -msgstr "" +msgstr "ВиÑоки" -#: sys/oss4/oss4-mixer.c:724 msgid "Very high" -msgstr "" +msgstr "Много виÑоки" -#: sys/oss4/oss4-mixer.c:725 msgid "Production" -msgstr "" +msgstr "ПроизводÑтво" -#: sys/oss4/oss4-mixer.c:726 msgid "Off" -msgstr "" +msgstr "Изключено" -#: sys/oss4/oss4-mixer.c:727 msgid "On" -msgstr "" +msgstr "Включено" -#: sys/oss4/oss4-mixer.c:728 msgid "Stereo" -msgstr "" +msgstr "Стерео" -#: sys/oss4/oss4-mixer.c:729 msgid "Surround sound" -msgstr "" +msgstr "Стерео и Ñъраунд" -#: sys/oss4/oss4-mixer.c:730 sys/oss4/oss4-mixer.c:805 msgid "Input mix" -msgstr "" +msgstr "ВходÑщ ÑмеÑител" -#: sys/oss4/oss4-mixer.c:731 sys/oss4/oss4-mixer.c:800 msgid "Front" -msgstr "" +msgstr "Отпред" -#: sys/oss4/oss4-mixer.c:732 sys/oss4/oss4-mixer.c:801 msgid "Rear" -msgstr "" +msgstr "Отзад" -#: sys/oss4/oss4-mixer.c:733 sys/oss4/oss4-mixer.c:802 msgid "Side" -msgstr "" +msgstr "ОтÑтрани" -#: sys/oss4/oss4-mixer.c:734 sys/oss4/oss4-mixer.c:803 msgid "Center / LFE" -msgstr "" +msgstr "Център/баÑи" -#: sys/oss4/oss4-mixer.c:735 sys/oss4/oss4-mixer.c:794 msgid "Microphone" -msgstr "" +msgstr "Микрофон" -#: sys/oss4/oss4-mixer.c:736 sys/oss4/oss4-mixer.c:795 msgid "Front panel microphone" -msgstr "" +msgstr "Микрофон на Ð¿Ñ€ÐµÐ´Ð½Ð¸Ñ Ð¿Ð°Ð½ÐµÐ»" -#: sys/oss4/oss4-mixer.c:737 msgid "Input" -msgstr "" +msgstr "Вход" -#: sys/oss4/oss4-mixer.c:738 sys/oss4/oss4-mixer.c:796 msgid "Line-in" -msgstr "" +msgstr "ВходÑщ канал" -#: sys/oss4/oss4-mixer.c:739 msgid "PCM 1" -msgstr "" +msgstr "PCM 1" -#: sys/oss4/oss4-mixer.c:740 msgid "PCM 2" -msgstr "" +msgstr "PCM 2" -#: sys/oss4/oss4-mixer.c:741 msgid "PCM 3" -msgstr "" +msgstr "PCM 3" -#: sys/oss4/oss4-mixer.c:742 msgid "PCM 4" -msgstr "" +msgstr "PCM 4" -#: sys/oss4/oss4-mixer.c:754 msgid "Green connector" -msgstr "" +msgstr "Зелено гнездо" -#: sys/oss4/oss4-mixer.c:755 msgid "Green front panel connector" -msgstr "" +msgstr "Зелено гнездо на Ð¿Ñ€ÐµÐ´Ð½Ð¸Ñ Ð¿Ð°Ð½ÐµÐ»" -#: sys/oss4/oss4-mixer.c:756 msgid "Pink connector" -msgstr "" +msgstr "Розово гнездо" -#: sys/oss4/oss4-mixer.c:757 msgid "Pink front panel connector" -msgstr "" +msgstr "Розово гнездо на Ð¿Ñ€ÐµÐ´Ð½Ð¸Ñ Ð¿Ð°Ð½ÐµÐ»" -#: sys/oss4/oss4-mixer.c:758 msgid "Blue connector" -msgstr "" +msgstr "Синьо гнездо" -#: sys/oss4/oss4-mixer.c:759 msgid "Blue front panel connector" -msgstr "" +msgstr "Синьо гнездо на Ð¿Ñ€ÐµÐ´Ð½Ð¸Ñ Ð¿Ð°Ð½ÐµÐ»" -#: sys/oss4/oss4-mixer.c:760 msgid "Orange connector" -msgstr "" +msgstr "Оранжево гнездо" -#: sys/oss4/oss4-mixer.c:761 msgid "Orange front panel connector" -msgstr "" +msgstr "Оранжево гнездо на предни панел" -#: sys/oss4/oss4-mixer.c:762 msgid "Black connector" -msgstr "" +msgstr "Черно гнездо" -#: sys/oss4/oss4-mixer.c:763 msgid "Black front panel connector" -msgstr "" +msgstr "Черно гнездо на Ð¿Ñ€ÐµÐ´Ð½Ð¸Ñ Ð¿Ð°Ð½ÐµÐ»" -#: sys/oss4/oss4-mixer.c:764 msgid "Gray connector" -msgstr "" +msgstr "Сиво гнездо" -#: sys/oss4/oss4-mixer.c:765 msgid "Gray front panel connector" -msgstr "" +msgstr "Сиво гнездо на Ð¿Ñ€ÐµÐ´Ð½Ð¸Ñ Ð¿Ð°Ð½ÐµÐ»" -#: sys/oss4/oss4-mixer.c:766 msgid "White connector" -msgstr "" +msgstr "БÑло гнездо" -#: sys/oss4/oss4-mixer.c:767 msgid "White front panel connector" -msgstr "" +msgstr "БÑло гнездо на Ð¿Ñ€ÐµÐ´Ð½Ð¸Ñ Ð¿Ð°Ð½ÐµÐ»" -#: sys/oss4/oss4-mixer.c:768 msgid "Red connector" -msgstr "" +msgstr "Червено гнездо" -#: sys/oss4/oss4-mixer.c:769 msgid "Red front panel connector" -msgstr "" +msgstr "Червено гнездо на Ð¿Ñ€ÐµÐ´Ð½Ð¸Ñ Ð¿Ð°Ð½ÐµÐ»" -#: sys/oss4/oss4-mixer.c:770 msgid "Yellow connector" -msgstr "" +msgstr "Жълто гнездо" -#: sys/oss4/oss4-mixer.c:771 msgid "Yellow front panel connector" -msgstr "" +msgstr "Жълто гнездо на Ð¿Ñ€ÐµÐ´Ð½Ð¸Ñ Ð¿Ð°Ð½ÐµÐ»" -#: sys/oss4/oss4-mixer.c:774 msgid "Green connector function" -msgstr "" +msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ð½Ð° зеленото гнездо" -#: sys/oss4/oss4-mixer.c:775 msgid "Green front panel connector function" -msgstr "" +msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ð½Ð° зеленото гнездо на Ð¿Ñ€ÐµÐ´Ð½Ð¸Ñ Ð¿Ð°Ð½ÐµÐ»" -#: sys/oss4/oss4-mixer.c:776 msgid "Pink connector function" -msgstr "" +msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ð½Ð° розовото гнездо" -#: sys/oss4/oss4-mixer.c:777 msgid "Pink front panel connector function" -msgstr "" +msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ð½Ð° розовото гнездо на Ð¿Ñ€ÐµÐ´Ð½Ð¸Ñ Ð¿Ð°Ð½ÐµÐ»" -#: sys/oss4/oss4-mixer.c:778 msgid "Blue connector function" -msgstr "" +msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ð½Ð° Ñиньото гнездо" -#: sys/oss4/oss4-mixer.c:779 msgid "Blue front panel connector function" -msgstr "" +msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ð½Ð° Ñиньото гнездо на Ð¿Ñ€ÐµÐ´Ð½Ð¸Ñ Ð¿Ð°Ð½ÐµÐ»" -#: sys/oss4/oss4-mixer.c:780 msgid "Orange connector function" -msgstr "" +msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ð½Ð° оранжевото гнездо" -#: sys/oss4/oss4-mixer.c:781 msgid "Orange front panel connector function" -msgstr "" +msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ð½Ð° оранжевото гнездо на Ð¿Ñ€ÐµÐ´Ð½Ð¸Ñ Ð¿Ð°Ð½ÐµÐ»" -#: sys/oss4/oss4-mixer.c:782 msgid "Black connector function" -msgstr "" +msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ð½Ð° черното гнездо" -#: sys/oss4/oss4-mixer.c:783 msgid "Black front panel connector function" -msgstr "" +msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ð½Ð° черното гнездо на Ð¿Ñ€ÐµÐ´Ð½Ð¸Ñ Ð¿Ð°Ð½ÐµÐ»" -#: sys/oss4/oss4-mixer.c:784 msgid "Gray connector function" -msgstr "" +msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ð½Ð° Ñивото гнездо" -#: sys/oss4/oss4-mixer.c:785 msgid "Gray front panel connector function" -msgstr "" +msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ð½Ð° Ñивото гнездо на Ð¿Ñ€ÐµÐ´Ð½Ð¸Ñ Ð¿Ð°Ð½ÐµÐ»" -#: sys/oss4/oss4-mixer.c:786 msgid "White connector function" -msgstr "" +msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ð½Ð° бÑлото гнездо" -#: sys/oss4/oss4-mixer.c:787 msgid "White front panel connector function" -msgstr "" +msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ð½Ð° бÑлото гнездо на Ð¿Ñ€ÐµÐ´Ð½Ð¸Ñ Ð¿Ð°Ð½ÐµÐ»" -#: sys/oss4/oss4-mixer.c:788 msgid "Red connector function" -msgstr "" +msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ð½Ð° червеното гнездо" -#: sys/oss4/oss4-mixer.c:789 msgid "Red front panel connector function" -msgstr "" +msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ð½Ð° червеното гнездо на Ð¿Ñ€ÐµÐ´Ð½Ð¸Ñ Ð¿Ð°Ð½ÐµÐ»" -#: sys/oss4/oss4-mixer.c:790 msgid "Yellow connector function" -msgstr "" +msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ð½Ð° жълтото гнездо" -#: sys/oss4/oss4-mixer.c:791 msgid "Yellow front panel connector function" -msgstr "" +msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ð½Ð° жълтото гнездо на Ð¿Ñ€ÐµÐ´Ð½Ð¸Ñ Ð¿Ð°Ð½ÐµÐ»" -#: sys/oss4/oss4-mixer.c:797 msgid "Front panel line-in" -msgstr "" +msgstr "ВходÑщ канал на Ð¿Ñ€ÐµÐ´Ð½Ð¸Ñ Ð¿Ð°Ð½ÐµÐ»" -#: sys/oss4/oss4-mixer.c:798 msgid "Headphones" -msgstr "" +msgstr "Слушалки" -#: sys/oss4/oss4-mixer.c:799 msgid "Front panel headphones" -msgstr "" +msgstr "Слушалки на Ð¿Ñ€ÐµÐ´Ð½Ð¸Ñ Ð¿Ð°Ð½ÐµÐ»" -#: sys/oss4/oss4-mixer.c:804 msgid "PCM" -msgstr "" +msgstr "PCM" -#: sys/oss4/oss4-mixer.c:846 msgid "Virtual mixer input" -msgstr "" +msgstr "Вход на виртуален ÑмеÑител" -#: sys/oss4/oss4-mixer.c:848 msgid "Virtual mixer output" -msgstr "" +msgstr "Изход на виртуален ÑмеÑител" -#: sys/oss4/oss4-mixer.c:850 msgid "Virtual mixer channel configuration" -msgstr "" +msgstr "ÐаÑтройки на каналите на виртуален ÑмеÑител" -#: sys/oss4/oss4-sink.c:376 sys/oss4/oss4-source.c:367 msgid "" "Could not open audio device for playback. Device is being used by another " "application." msgstr "" +"Ðудио уÑтройÑтвото не може да бъде отворено за изпълнение. използва Ñе от " +"друго приложение." -#: sys/oss4/oss4-sink.c:386 sys/oss4/oss4-source.c:377 msgid "" "Could not open audio device for playback. You don't have permission to open " "the device." msgstr "" +"Ðудио уÑтройÑтвото не може да бъде отворено за изпълнение. ÐÑмате " +"необходимите права." -#: sys/oss4/oss4-sink.c:397 sys/oss4/oss4-source.c:388 -#, fuzzy msgid "Could not open audio device for playback." -msgstr "УÑтройÑтвото „%s“ не може да бъде отворено." +msgstr "Ðудио уÑтройÑтвото не може да бъде отворено за изпълнение." -#: sys/oss4/oss4-sink.c:406 sys/oss4/oss4-source.c:398 msgid "" "Could not open audio device for playback. This version of the Open Sound " "System is not supported by this element." msgstr "" +"Ðудио уÑтройÑтвото не може да бъде отворено за изпълнение. Тази верÑÐ¸Ñ Ð½Ð° " +"Open Sound System не Ñе поддържа от този елемент." -#: sys/oss4/oss4-sink.c:522 msgid "Playback is not supported by this audio device." -msgstr "" +msgstr "Това аудио уÑтройÑтво не поддържа изпълнение." -#: sys/oss4/oss4-sink.c:529 msgid "Audio playback error." -msgstr "" +msgstr "Грешка при изпълнение на аудиото." -#: sys/oss4/oss4-source.c:520 msgid "Recording is not supported by this audio device." -msgstr "" +msgstr "Това аудио уÑтройÑтво не поддържа запиÑ." -#: sys/oss4/oss4-source.c:527 msgid "Error recording from audio device." -msgstr "" +msgstr "Грешка при запиÑа от аудио уÑтройÑтвото." diff --git a/po/ca.po b/po/ca.po index 2f9bde11..a964455a 100644 --- a/po/ca.po +++ b/po/ca.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins 0.8.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-12 00:07+0100\n" +"POT-Creation-Date: 2009-05-16 01:36+0100\n" "PO-Revision-Date: 2004-08-05 15:48+0200\n" "Last-Translator: Jordi Mallach \n" "Language-Team: Catalan \n" @@ -15,387 +15,297 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ext/resindvd/resindvdsrc.c:352 #, fuzzy msgid "Could not read title information for DVD." msgstr "No s'ha pogut escriure al fitxer «%s»." -#: ext/resindvd/resindvdsrc.c:358 #, fuzzy, c-format msgid "Failed to open DVD device '%s'." msgstr "No s'ha pogut tancar el dispositiu de control «%s»." -#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "" -#: ext/resindvd/rsnbasesrc.c:1659 msgid "Internal clock error." msgstr "" -#: ext/resindvd/rsnbasesrc.c:1904 ext/resindvd/rsnbasesrc.c:1915 -#: gst/aiffparse/aiffparse.c:1265 msgid "Internal data flow error." msgstr "" -#: ext/sndfile/gstsfsink.c:277 ext/sndfile/gstsfsrc.c:345 #, fuzzy msgid "No file name specified for writing." msgstr "No s'ha especificat cap nom de fitxer." -#: ext/sndfile/gstsfsink.c:290 ext/sndfile/gstsfsrc.c:351 #, c-format msgid "Could not open file \"%s\" for writing." msgstr "No s'ha pogut obrir el fitxer «%s» per a l'escriptura." -#: ext/sndfile/gstsfsink.c:440 gst/nuvdemux/gstnuvdemux.c:735 msgid "Internal data stream error." msgstr "" -#: ext/sndfile/gstsfsink.c:494 ext/sndfile/gstsfsink.c:502 #, c-format msgid "Could not write to file \"%s\"." msgstr "No s'ha pogut escriure al fitxer «%s»." -#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "El dispositiu «%s» no existeix." -#: sys/dvb/gstdvbsrc.c:710 #, fuzzy, c-format msgid "Could not open frontend device \"%s\"." msgstr "No s'ha pogut tancar el dispositiu de control «%s»." -#: sys/dvb/gstdvbsrc.c:722 #, fuzzy, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "No s'han pogut obtenir búfers suficients del dispositiu «%s»." -#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "No s'ha pogut obrir el fitxer «%s» per a la lectura." -#: sys/oss4/oss4-mixer.c:302 #, fuzzy msgid "Could not open audio device for mixer control handling." msgstr "No s'ha pogut el dispositiu d'àudio «%s» per a l'escriptura." -#: sys/oss4/oss4-mixer.c:316 #, fuzzy msgid "" "Could not open audio device for mixer control handling. This version of the " "Open Sound System is not supported by this element." msgstr "No s'ha pogut el dispositiu d'àudio «%s» per a l'escriptura." -#: sys/oss4/oss4-mixer.c:720 msgid "Fast" msgstr "" -#: sys/oss4/oss4-mixer.c:721 msgid "Low" msgstr "" -#: sys/oss4/oss4-mixer.c:722 msgid "Medium" msgstr "" -#: sys/oss4/oss4-mixer.c:723 msgid "High" msgstr "" -#: sys/oss4/oss4-mixer.c:724 msgid "Very high" msgstr "" -#: sys/oss4/oss4-mixer.c:725 msgid "Production" msgstr "" -#: sys/oss4/oss4-mixer.c:726 msgid "Off" msgstr "" -#: sys/oss4/oss4-mixer.c:727 msgid "On" msgstr "" -#: sys/oss4/oss4-mixer.c:728 msgid "Stereo" msgstr "" -#: sys/oss4/oss4-mixer.c:729 msgid "Surround sound" msgstr "" -#: sys/oss4/oss4-mixer.c:730 sys/oss4/oss4-mixer.c:805 msgid "Input mix" msgstr "" -#: sys/oss4/oss4-mixer.c:731 sys/oss4/oss4-mixer.c:800 msgid "Front" msgstr "" -#: sys/oss4/oss4-mixer.c:732 sys/oss4/oss4-mixer.c:801 #, fuzzy msgid "Rear" msgstr "Enregistrament" -#: sys/oss4/oss4-mixer.c:733 sys/oss4/oss4-mixer.c:802 #, fuzzy msgid "Side" msgstr "Vídeo" -#: sys/oss4/oss4-mixer.c:734 sys/oss4/oss4-mixer.c:803 msgid "Center / LFE" msgstr "" -#: sys/oss4/oss4-mixer.c:735 sys/oss4/oss4-mixer.c:794 msgid "Microphone" msgstr "Micròfon" -#: sys/oss4/oss4-mixer.c:736 sys/oss4/oss4-mixer.c:795 msgid "Front panel microphone" msgstr "" -#: sys/oss4/oss4-mixer.c:737 msgid "Input" msgstr "" -#: sys/oss4/oss4-mixer.c:738 sys/oss4/oss4-mixer.c:796 msgid "Line-in" msgstr "Línia-entrada" -#: sys/oss4/oss4-mixer.c:739 #, fuzzy msgid "PCM 1" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:740 #, fuzzy msgid "PCM 2" msgstr "PCM-2" -#: sys/oss4/oss4-mixer.c:741 #, fuzzy msgid "PCM 3" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:742 #, fuzzy msgid "PCM 4" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:754 msgid "Green connector" msgstr "" -#: sys/oss4/oss4-mixer.c:755 msgid "Green front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:756 msgid "Pink connector" msgstr "" -#: sys/oss4/oss4-mixer.c:757 msgid "Pink front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:758 msgid "Blue connector" msgstr "" -#: sys/oss4/oss4-mixer.c:759 msgid "Blue front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:760 msgid "Orange connector" msgstr "" -#: sys/oss4/oss4-mixer.c:761 msgid "Orange front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:762 msgid "Black connector" msgstr "" -#: sys/oss4/oss4-mixer.c:763 msgid "Black front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:764 msgid "Gray connector" msgstr "" -#: sys/oss4/oss4-mixer.c:765 msgid "Gray front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:766 msgid "White connector" msgstr "" -#: sys/oss4/oss4-mixer.c:767 msgid "White front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:768 msgid "Red connector" msgstr "" -#: sys/oss4/oss4-mixer.c:769 msgid "Red front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:770 msgid "Yellow connector" msgstr "" -#: sys/oss4/oss4-mixer.c:771 msgid "Yellow front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:774 msgid "Green connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:775 msgid "Green front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:776 msgid "Pink connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:777 msgid "Pink front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:778 msgid "Blue connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:779 msgid "Blue front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:780 msgid "Orange connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:781 msgid "Orange front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:782 msgid "Black connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:783 msgid "Black front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:784 msgid "Gray connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:785 msgid "Gray front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:786 msgid "White connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:787 msgid "White front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:788 msgid "Red connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:789 msgid "Red front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:790 msgid "Yellow connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:791 msgid "Yellow front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:797 msgid "Front panel line-in" msgstr "" -#: sys/oss4/oss4-mixer.c:798 msgid "Headphones" msgstr "" -#: sys/oss4/oss4-mixer.c:799 msgid "Front panel headphones" msgstr "" -#: sys/oss4/oss4-mixer.c:804 msgid "PCM" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:846 msgid "Virtual mixer input" msgstr "" -#: sys/oss4/oss4-mixer.c:848 msgid "Virtual mixer output" msgstr "" -#: sys/oss4/oss4-mixer.c:850 msgid "Virtual mixer channel configuration" msgstr "" -#: sys/oss4/oss4-sink.c:376 sys/oss4/oss4-source.c:367 msgid "" "Could not open audio device for playback. Device is being used by another " "application." msgstr "" -#: sys/oss4/oss4-sink.c:386 sys/oss4/oss4-source.c:377 #, fuzzy msgid "" "Could not open audio device for playback. You don't have permission to open " "the device." msgstr "No s'ha pogut el dispositiu d'àudio «%s» per a l'escriptura." -#: sys/oss4/oss4-sink.c:397 sys/oss4/oss4-source.c:388 #, fuzzy msgid "Could not open audio device for playback." msgstr "No s'ha pogut el dispositiu d'àudio «%s» per a l'escriptura." -#: sys/oss4/oss4-sink.c:406 sys/oss4/oss4-source.c:398 msgid "" "Could not open audio device for playback. This version of the Open Sound " "System is not supported by this element." msgstr "" -#: sys/oss4/oss4-sink.c:522 msgid "Playback is not supported by this audio device." msgstr "" -#: sys/oss4/oss4-sink.c:529 msgid "Audio playback error." msgstr "" -#: sys/oss4/oss4-source.c:520 msgid "Recording is not supported by this audio device." msgstr "" -#: sys/oss4/oss4-source.c:527 msgid "Error recording from audio device." msgstr "" diff --git a/po/cs.po b/po/cs.po index 5c80d30b..bf3b89c9 100644 --- a/po/cs.po +++ b/po/cs.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.9.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-12 00:07+0100\n" +"POT-Creation-Date: 2009-05-16 01:36+0100\n" "PO-Revision-Date: 2009-01-18 18:55+0100\n" "Last-Translator: Petr Kovar \n" "Language-Team: Czech \n" @@ -18,72 +18,56 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "NezdaÅ™ilo se pÅ™eÄtení informací o titulu DVD." -#: ext/resindvd/resindvdsrc.c:358 #, c-format msgid "Failed to open DVD device '%s'." msgstr "NezdaÅ™ilo se otevÅ™ení zařízení DVD \"%s\"." -#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "NezdaÅ™ilo se nastavení hledání založeného na PGC." -#: ext/resindvd/rsnbasesrc.c:1659 msgid "Internal clock error." msgstr "VnitÅ™ní chyba ÄasovaÄe." -#: ext/resindvd/rsnbasesrc.c:1904 ext/resindvd/rsnbasesrc.c:1915 -#: gst/aiffparse/aiffparse.c:1265 msgid "Internal data flow error." msgstr "VnitÅ™ní chyba datového toku." -#: ext/sndfile/gstsfsink.c:277 ext/sndfile/gstsfsrc.c:345 msgid "No file name specified for writing." msgstr "K zápisu nebyl zadán žádný název souboru." -#: ext/sndfile/gstsfsink.c:290 ext/sndfile/gstsfsrc.c:351 #, c-format msgid "Could not open file \"%s\" for writing." msgstr "NezdaÅ™ilo se otevÅ™ení souboru \"%s\" k zápisu." -#: ext/sndfile/gstsfsink.c:440 gst/nuvdemux/gstnuvdemux.c:735 msgid "Internal data stream error." msgstr "Chyba proudu vnitÅ™ních dat." -#: ext/sndfile/gstsfsink.c:494 ext/sndfile/gstsfsink.c:502 #, c-format msgid "Could not write to file \"%s\"." msgstr "NezdaÅ™il se zápis do souboru \"%s\"." -#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Zařízení \"%s\" neexistuje." -#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "NezdaÅ™ilo se otevÅ™ení zařízení rozhraní \"%s\"." -#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Ze zařízení rozhraní \"%s\" se nezdaÅ™ilo získat nastavení." -#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "NezdaÅ™ilo se otevÅ™ení souboru \"%s\" ke Ätení." -#: sys/oss4/oss4-mixer.c:302 msgid "Could not open audio device for mixer control handling." msgstr "" "NezdaÅ™ilo se otevÅ™ení zvukového zařízení pro obsluhu ovládání směšovaÄe." -#: sys/oss4/oss4-mixer.c:316 msgid "" "Could not open audio device for mixer control handling. This version of the " "Open Sound System is not supported by this element." @@ -91,271 +75,204 @@ msgstr "" "NezdaÅ™ilo se otevÅ™ení zvukového zařízení k obsluze ovládání směšovaÄe. Tato " "verze Open Sound System není přísluÅ¡ným prvkem podporována." -#: sys/oss4/oss4-mixer.c:720 msgid "Fast" msgstr "Rychlé" -#: sys/oss4/oss4-mixer.c:721 msgid "Low" msgstr "Nízké" -#: sys/oss4/oss4-mixer.c:722 msgid "Medium" msgstr "StÅ™ední" -#: sys/oss4/oss4-mixer.c:723 msgid "High" msgstr "Vysoké" -#: sys/oss4/oss4-mixer.c:724 msgid "Very high" msgstr "Velmi vysoké" -#: sys/oss4/oss4-mixer.c:725 msgid "Production" msgstr "Výroba" -#: sys/oss4/oss4-mixer.c:726 msgid "Off" msgstr "Vypnuto" -#: sys/oss4/oss4-mixer.c:727 msgid "On" msgstr "Zapnuto" -#: sys/oss4/oss4-mixer.c:728 msgid "Stereo" msgstr "Stereo" -#: sys/oss4/oss4-mixer.c:729 msgid "Surround sound" msgstr "Prostorový zvuk" -#: sys/oss4/oss4-mixer.c:730 sys/oss4/oss4-mixer.c:805 msgid "Input mix" msgstr "SměšovaÄ vstupu" -#: sys/oss4/oss4-mixer.c:731 sys/oss4/oss4-mixer.c:800 msgid "Front" msgstr "PÅ™ední" -#: sys/oss4/oss4-mixer.c:732 sys/oss4/oss4-mixer.c:801 msgid "Rear" msgstr "Zadní" -#: sys/oss4/oss4-mixer.c:733 sys/oss4/oss4-mixer.c:802 msgid "Side" msgstr "BoÄní" -#: sys/oss4/oss4-mixer.c:734 sys/oss4/oss4-mixer.c:803 msgid "Center / LFE" msgstr "StÅ™edový / LFE" -#: sys/oss4/oss4-mixer.c:735 sys/oss4/oss4-mixer.c:794 msgid "Microphone" msgstr "Mikrofon" -#: sys/oss4/oss4-mixer.c:736 sys/oss4/oss4-mixer.c:795 msgid "Front panel microphone" msgstr "Mikrofon na pÅ™edním panelu" -#: sys/oss4/oss4-mixer.c:737 msgid "Input" msgstr "Vstup" -#: sys/oss4/oss4-mixer.c:738 sys/oss4/oss4-mixer.c:796 msgid "Line-in" msgstr "Linkový vstup" -#: sys/oss4/oss4-mixer.c:739 msgid "PCM 1" msgstr "PCM 1" -#: sys/oss4/oss4-mixer.c:740 msgid "PCM 2" msgstr "PCM 2" -#: sys/oss4/oss4-mixer.c:741 msgid "PCM 3" msgstr "PCM 3" -#: sys/oss4/oss4-mixer.c:742 msgid "PCM 4" msgstr "PCM 4" -#: sys/oss4/oss4-mixer.c:754 msgid "Green connector" msgstr "Zelený konektor" -#: sys/oss4/oss4-mixer.c:755 msgid "Green front panel connector" msgstr "Zelený konektor na pÅ™edním panelu" -#: sys/oss4/oss4-mixer.c:756 msgid "Pink connector" msgstr "Růžový konektor" -#: sys/oss4/oss4-mixer.c:757 msgid "Pink front panel connector" msgstr "Růžový konektor na pÅ™edním panelu" -#: sys/oss4/oss4-mixer.c:758 msgid "Blue connector" msgstr "Modrý konektor" -#: sys/oss4/oss4-mixer.c:759 msgid "Blue front panel connector" msgstr "Modrý konektor na pÅ™edním panelu" -#: sys/oss4/oss4-mixer.c:760 msgid "Orange connector" msgstr "Oranžový konektor" -#: sys/oss4/oss4-mixer.c:761 msgid "Orange front panel connector" msgstr "Oranžový konektor na pÅ™edním panelu" -#: sys/oss4/oss4-mixer.c:762 msgid "Black connector" msgstr "ÄŒerný konektor" -#: sys/oss4/oss4-mixer.c:763 msgid "Black front panel connector" msgstr "ÄŒerný konektor na pÅ™edním panelu" -#: sys/oss4/oss4-mixer.c:764 msgid "Gray connector" msgstr "Å edý konektor" -#: sys/oss4/oss4-mixer.c:765 msgid "Gray front panel connector" msgstr "Å edý konektor na pÅ™edním panelu" -#: sys/oss4/oss4-mixer.c:766 msgid "White connector" msgstr "Bílý konektor" -#: sys/oss4/oss4-mixer.c:767 msgid "White front panel connector" msgstr "Bílý konektor na pÅ™edním panelu" -#: sys/oss4/oss4-mixer.c:768 msgid "Red connector" msgstr "ÄŒervený konektor" -#: sys/oss4/oss4-mixer.c:769 msgid "Red front panel connector" msgstr "ÄŒervený konektor na pÅ™edním panelu" -#: sys/oss4/oss4-mixer.c:770 msgid "Yellow connector" msgstr "Žlutý konektor" -#: sys/oss4/oss4-mixer.c:771 msgid "Yellow front panel connector" msgstr "Žlutý konektor na pÅ™edním panelu" -#: sys/oss4/oss4-mixer.c:774 msgid "Green connector function" msgstr "Funkce zeleného konektoru" -#: sys/oss4/oss4-mixer.c:775 msgid "Green front panel connector function" msgstr "Funkce zeleného konektoru na pÅ™edním panelu" -#: sys/oss4/oss4-mixer.c:776 msgid "Pink connector function" msgstr "Funkce růžového konektoru" -#: sys/oss4/oss4-mixer.c:777 msgid "Pink front panel connector function" msgstr "Funkce růžového konektoru na pÅ™edním panelu" -#: sys/oss4/oss4-mixer.c:778 msgid "Blue connector function" msgstr "Funkce modrého konektoru" -#: sys/oss4/oss4-mixer.c:779 msgid "Blue front panel connector function" msgstr "Funkce modrého konektoru na pÅ™edním panelu" -#: sys/oss4/oss4-mixer.c:780 msgid "Orange connector function" msgstr "Funkce oranžového konektoru" -#: sys/oss4/oss4-mixer.c:781 msgid "Orange front panel connector function" msgstr "Funkce oranžového konektoru na pÅ™edním panelu" -#: sys/oss4/oss4-mixer.c:782 msgid "Black connector function" msgstr "Funkce Äerného konektoru" -#: sys/oss4/oss4-mixer.c:783 msgid "Black front panel connector function" msgstr "Funkce Äerného konektoru na pÅ™edním panelu" -#: sys/oss4/oss4-mixer.c:784 msgid "Gray connector function" msgstr "Funkce Å¡edého konektoru" -#: sys/oss4/oss4-mixer.c:785 msgid "Gray front panel connector function" msgstr "Funkce Å¡edého konektoru na pÅ™edním panelu" -#: sys/oss4/oss4-mixer.c:786 msgid "White connector function" msgstr "Funkce bílého konektoru" -#: sys/oss4/oss4-mixer.c:787 msgid "White front panel connector function" msgstr "Funkce bílého konektoru na pÅ™edním panelu" -#: sys/oss4/oss4-mixer.c:788 msgid "Red connector function" msgstr "Funkce Äerveného konektoru" -#: sys/oss4/oss4-mixer.c:789 msgid "Red front panel connector function" msgstr "Funkce Äerveného konektoru na pÅ™edním panelu" -#: sys/oss4/oss4-mixer.c:790 msgid "Yellow connector function" msgstr "Funkce žlutého konektoru" -#: sys/oss4/oss4-mixer.c:791 msgid "Yellow front panel connector function" msgstr "Funkce žlutého konektoru na pÅ™edním panelu" -#: sys/oss4/oss4-mixer.c:797 msgid "Front panel line-in" msgstr "Linkový vstup na pÅ™edním panelu" -#: sys/oss4/oss4-mixer.c:798 msgid "Headphones" msgstr "Sluchátka" -#: sys/oss4/oss4-mixer.c:799 msgid "Front panel headphones" msgstr "Sluchátka na pÅ™edním panelu" -#: sys/oss4/oss4-mixer.c:804 msgid "PCM" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:846 msgid "Virtual mixer input" msgstr "Vstup virtuálního směšovaÄe" -#: sys/oss4/oss4-mixer.c:848 msgid "Virtual mixer output" msgstr "Výstup virtuálního směšovaÄe" -#: sys/oss4/oss4-mixer.c:850 msgid "Virtual mixer channel configuration" msgstr "Konfigurace kanálu virtuálního směšovaÄe" -#: sys/oss4/oss4-sink.c:376 sys/oss4/oss4-source.c:367 msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -363,7 +280,6 @@ msgstr "" "NezdaÅ™ilo se otevÅ™ení zvukového zařízení k pÅ™ehrávání. Zařízení je právÄ› " "používáno jinou aplikací." -#: sys/oss4/oss4-sink.c:386 sys/oss4/oss4-source.c:377 msgid "" "Could not open audio device for playback. You don't have permission to open " "the device." @@ -371,11 +287,9 @@ msgstr "" "NezdaÅ™ilo se otevÅ™ení zvukového zařízení k pÅ™ehrávání. Nemáte oprávnÄ›ní k " "otevÅ™ení zařízení." -#: sys/oss4/oss4-sink.c:397 sys/oss4/oss4-source.c:388 msgid "Could not open audio device for playback." msgstr "NezdaÅ™ilo se otevÅ™ení zvukového zařízení k pÅ™ehrávání." -#: sys/oss4/oss4-sink.c:406 sys/oss4/oss4-source.c:398 msgid "" "Could not open audio device for playback. This version of the Open Sound " "System is not supported by this element." @@ -383,19 +297,15 @@ msgstr "" "NezdaÅ™ilo se otevÅ™ení zvukového zařízení k pÅ™ehrávání. Tato verze Open Sound " "System není přísluÅ¡ným prvkem podporována." -#: sys/oss4/oss4-sink.c:522 msgid "Playback is not supported by this audio device." msgstr "PÅ™ehrávání není tímto zvukovým zařízením podporováno." -#: sys/oss4/oss4-sink.c:529 msgid "Audio playback error." msgstr "Chyba pÅ™ehrávání zvuku." -#: sys/oss4/oss4-source.c:520 msgid "Recording is not supported by this audio device." msgstr "Toto zvukové zařízení nepodporuje nahrávání." -#: sys/oss4/oss4-source.c:527 msgid "Error recording from audio device." msgstr "Chyba pÅ™i nahrávání ze zvukového zařízení." diff --git a/po/da.po b/po/da.po index 3e47de8a..857dd29c 100644 --- a/po/da.po +++ b/po/da.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad-0.10.10.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-12 00:07+0100\n" +"POT-Creation-Date: 2009-05-16 01:36+0100\n" "PO-Revision-Date: 2009-04-13 11:28+0200\n" "Last-Translator: Joe Hansen \n" "Language-Team: Danish \n" @@ -16,71 +16,55 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "Kunne ikke læse titelinformation for dvd." -#: ext/resindvd/resindvdsrc.c:358 #, c-format msgid "Failed to open DVD device '%s'." msgstr "Kunne ikke Ã¥bne dvd-enhed »%s«." -#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "Kunne ikke indstille PGC-baseret søgning." -#: ext/resindvd/rsnbasesrc.c:1659 msgid "Internal clock error." msgstr "Intern urfejl." -#: ext/resindvd/rsnbasesrc.c:1904 ext/resindvd/rsnbasesrc.c:1915 -#: gst/aiffparse/aiffparse.c:1265 msgid "Internal data flow error." msgstr "Intern datastrømfejl." -#: ext/sndfile/gstsfsink.c:277 ext/sndfile/gstsfsrc.c:345 msgid "No file name specified for writing." msgstr "Intet filnavn er angivet til skrivning." -#: ext/sndfile/gstsfsink.c:290 ext/sndfile/gstsfsrc.c:351 #, c-format msgid "Could not open file \"%s\" for writing." msgstr "Kunne ikke Ã¥bne filen »%s« til skrivning." -#: ext/sndfile/gstsfsink.c:440 gst/nuvdemux/gstnuvdemux.c:735 msgid "Internal data stream error." msgstr "Intern datastrømfejl." -#: ext/sndfile/gstsfsink.c:494 ext/sndfile/gstsfsink.c:502 #, c-format msgid "Could not write to file \"%s\"." msgstr "Kunne ikke skrive til fil »%s«." -#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Enheden »%s« eksisterer ikke." -#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Kunne ikke Ã¥bne forende-enheden »%s«." -#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Kunne ikke hente indstillinger fra forende-enheden »%s«." -#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Kunne ikke Ã¥bne filen »%s« for læsning." -#: sys/oss4/oss4-mixer.c:302 msgid "Could not open audio device for mixer control handling." msgstr "Kunne ikke Ã¥bne lydenhed til mikserpulthÃ¥ndtering." -#: sys/oss4/oss4-mixer.c:316 msgid "" "Could not open audio device for mixer control handling. This version of the " "Open Sound System is not supported by this element." @@ -88,280 +72,212 @@ msgstr "" "Kunne ikke Ã¥bne lydenhed til mikserpulthÃ¥ndtering. Denne version af Open " "Sound System er ikke understøttet af dette element." -#: sys/oss4/oss4-mixer.c:720 msgid "Fast" msgstr "Hurtig" -#: sys/oss4/oss4-mixer.c:721 msgid "Low" msgstr "Lav" -#: sys/oss4/oss4-mixer.c:722 msgid "Medium" msgstr "Medium" -#: sys/oss4/oss4-mixer.c:723 msgid "High" msgstr "Højt" -#: sys/oss4/oss4-mixer.c:724 msgid "Very high" msgstr "Meget højt" -#: sys/oss4/oss4-mixer.c:725 msgid "Production" msgstr "Produktion" -#: sys/oss4/oss4-mixer.c:726 msgid "Off" msgstr "Slukket" -#: sys/oss4/oss4-mixer.c:727 msgid "On" msgstr "Tændt" -#: sys/oss4/oss4-mixer.c:728 msgid "Stereo" msgstr "Stereo" -#: sys/oss4/oss4-mixer.c:729 msgid "Surround sound" msgstr "Surround-lyd" -#: sys/oss4/oss4-mixer.c:730 sys/oss4/oss4-mixer.c:805 msgid "Input mix" msgstr "Inddata mix" -#: sys/oss4/oss4-mixer.c:731 sys/oss4/oss4-mixer.c:800 msgid "Front" msgstr "Front" # bagende eller eller "Bag" hvis det er den bagerste lydkanal # vi snakker om -#: sys/oss4/oss4-mixer.c:732 sys/oss4/oss4-mixer.c:801 msgid "Rear" msgstr "Bag" -#: sys/oss4/oss4-mixer.c:733 sys/oss4/oss4-mixer.c:802 msgid "Side" msgstr "Side" -#: sys/oss4/oss4-mixer.c:734 sys/oss4/oss4-mixer.c:803 msgid "Center / LFE" msgstr "Center / LFE" -#: sys/oss4/oss4-mixer.c:735 sys/oss4/oss4-mixer.c:794 msgid "Microphone" msgstr "Mikrofon" -#: sys/oss4/oss4-mixer.c:736 sys/oss4/oss4-mixer.c:795 msgid "Front panel microphone" msgstr "Frontpanelmikrofon" -#: sys/oss4/oss4-mixer.c:737 msgid "Input" msgstr "Inddata" -#: sys/oss4/oss4-mixer.c:738 sys/oss4/oss4-mixer.c:796 msgid "Line-in" msgstr "Linje-ind" -#: sys/oss4/oss4-mixer.c:739 msgid "PCM 1" msgstr "PCM 1" -#: sys/oss4/oss4-mixer.c:740 msgid "PCM 2" msgstr "PCM 2" -#: sys/oss4/oss4-mixer.c:741 msgid "PCM 3" msgstr "PCM 3" -#: sys/oss4/oss4-mixer.c:742 msgid "PCM 4" msgstr "PCM 4" -#: sys/oss4/oss4-mixer.c:754 msgid "Green connector" msgstr "Grøn forbindelse" -#: sys/oss4/oss4-mixer.c:755 msgid "Green front panel connector" msgstr "Grøn frontpanelforbindelse" -#: sys/oss4/oss4-mixer.c:756 msgid "Pink connector" msgstr "Lyserød forbindelse" -#: sys/oss4/oss4-mixer.c:757 msgid "Pink front panel connector" msgstr "Lyserød frontpanelforbindelse" -#: sys/oss4/oss4-mixer.c:758 msgid "Blue connector" msgstr "BlÃ¥ forbindelse" -#: sys/oss4/oss4-mixer.c:759 msgid "Blue front panel connector" msgstr "BlÃ¥ frontpanelforbindelse" -#: sys/oss4/oss4-mixer.c:760 msgid "Orange connector" msgstr "Orange forbindelse" -#: sys/oss4/oss4-mixer.c:761 msgid "Orange front panel connector" msgstr "Orange frontpanelforbindelse" -#: sys/oss4/oss4-mixer.c:762 msgid "Black connector" msgstr "Sort forbindelse" -#: sys/oss4/oss4-mixer.c:763 msgid "Black front panel connector" msgstr "Sort frontpanelforbindelse" -#: sys/oss4/oss4-mixer.c:764 msgid "Gray connector" msgstr "GrÃ¥ forbindelse" -#: sys/oss4/oss4-mixer.c:765 msgid "Gray front panel connector" msgstr "GrÃ¥ frontpanelforbindelse" -#: sys/oss4/oss4-mixer.c:766 msgid "White connector" msgstr "Hvid forbindelse" -#: sys/oss4/oss4-mixer.c:767 msgid "White front panel connector" msgstr "Hvid frontpanelforbindelse" -#: sys/oss4/oss4-mixer.c:768 msgid "Red connector" msgstr "Rød forbindelse" -#: sys/oss4/oss4-mixer.c:769 msgid "Red front panel connector" msgstr "Rød frontpanelforbindelse" -#: sys/oss4/oss4-mixer.c:770 msgid "Yellow connector" msgstr "Gul forbindelse" -#: sys/oss4/oss4-mixer.c:771 msgid "Yellow front panel connector" msgstr "Gul frontpanelforbindelse" -#: sys/oss4/oss4-mixer.c:774 msgid "Green connector function" msgstr "Grøn forbindelsesfunktion" -#: sys/oss4/oss4-mixer.c:775 msgid "Green front panel connector function" msgstr "Grøn frontpanelforbindelsesfunktion" -#: sys/oss4/oss4-mixer.c:776 msgid "Pink connector function" msgstr "Lyserød forbindelsesfunktion" -#: sys/oss4/oss4-mixer.c:777 msgid "Pink front panel connector function" msgstr "Lyserød frontpanelforbindelsesfunktion" -#: sys/oss4/oss4-mixer.c:778 msgid "Blue connector function" msgstr "BlÃ¥ forbindelsesfunktion" -#: sys/oss4/oss4-mixer.c:779 msgid "Blue front panel connector function" msgstr "BlÃ¥ frontpanelforbindelsesfunktion" -#: sys/oss4/oss4-mixer.c:780 msgid "Orange connector function" msgstr "Orange forbindelsesfunktion" -#: sys/oss4/oss4-mixer.c:781 msgid "Orange front panel connector function" msgstr "Orange frontpanelforbindelsesfunktion" -#: sys/oss4/oss4-mixer.c:782 msgid "Black connector function" msgstr "Sort forbindelsesfunktion" -#: sys/oss4/oss4-mixer.c:783 msgid "Black front panel connector function" msgstr "Sort frontpanelforbindelsesfunktion" -#: sys/oss4/oss4-mixer.c:784 msgid "Gray connector function" msgstr "GrÃ¥ forbindelsesfunktion" -#: sys/oss4/oss4-mixer.c:785 msgid "Gray front panel connector function" msgstr "GrÃ¥ frontpanelforbindelsesfunktion" -#: sys/oss4/oss4-mixer.c:786 msgid "White connector function" msgstr "Hvid forbindelsesfunktion" -#: sys/oss4/oss4-mixer.c:787 msgid "White front panel connector function" msgstr "Hvid frontpanelforbindelsesfunktion" -#: sys/oss4/oss4-mixer.c:788 msgid "Red connector function" msgstr "Rød forbindelsesfunktion" -#: sys/oss4/oss4-mixer.c:789 msgid "Red front panel connector function" msgstr "Rød frontpanelforbindelsesfunktion" -#: sys/oss4/oss4-mixer.c:790 msgid "Yellow connector function" msgstr "Gul forbindelsesfunktion" -#: sys/oss4/oss4-mixer.c:791 msgid "Yellow front panel connector function" msgstr "Gul frontpanelforbindelsesfunktion" -#: sys/oss4/oss4-mixer.c:797 msgid "Front panel line-in" msgstr "Frontpanel linje-ind" -#: sys/oss4/oss4-mixer.c:798 msgid "Headphones" msgstr "Høretelefoner" -#: sys/oss4/oss4-mixer.c:799 msgid "Front panel headphones" msgstr "Frontpanel høretelefoner" -#: sys/oss4/oss4-mixer.c:804 msgid "PCM" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:846 msgid "Virtual mixer input" msgstr "Virtuel mikserpultinddata" -#: sys/oss4/oss4-mixer.c:848 msgid "Virtual mixer output" msgstr "Virtuel mikserpultuddata" -#: sys/oss4/oss4-mixer.c:850 msgid "Virtual mixer channel configuration" msgstr "Virtuel mikserkanalkonfiguration" -#: sys/oss4/oss4-sink.c:376 sys/oss4/oss4-source.c:367 msgid "" "Could not open audio device for playback. Device is being used by another " "application." msgstr "" "Kunne ikke Ã¥bne lydenhed til afspilning. Enheden bruges af et andet program." -#: sys/oss4/oss4-sink.c:386 sys/oss4/oss4-source.c:377 msgid "" "Could not open audio device for playback. You don't have permission to open " "the device." @@ -369,11 +285,9 @@ msgstr "" "Kunne ikke Ã¥bne lydenhed til afspilning. Du har ikke rettigheder til at Ã¥bne " "enheden." -#: sys/oss4/oss4-sink.c:397 sys/oss4/oss4-source.c:388 msgid "Could not open audio device for playback." msgstr "Kunne ikke Ã¥bne lydenhed til afspilning." -#: sys/oss4/oss4-sink.c:406 sys/oss4/oss4-source.c:398 msgid "" "Could not open audio device for playback. This version of the Open Sound " "System is not supported by this element." @@ -381,19 +295,15 @@ msgstr "" "Kunne ikke Ã¥bne lydenhed for afspilning. Denne version af Open Sound System " "er ikke understøttet af dette element." -#: sys/oss4/oss4-sink.c:522 msgid "Playback is not supported by this audio device." msgstr "Afspilning er ikke understøttet af denne lydenhed." -#: sys/oss4/oss4-sink.c:529 msgid "Audio playback error." msgstr "Fejl ved lydafspilning." -#: sys/oss4/oss4-source.c:520 msgid "Recording is not supported by this audio device." msgstr "Optagelse er ikke understøttet af denne lydenhed." -#: sys/oss4/oss4-source.c:527 msgid "Error recording from audio device." msgstr "Fejl under optagelse fra lydenhed." diff --git a/po/de.po b/po/de.po index 4cba82df..384ad0dd 100644 --- a/po/de.po +++ b/po/de.po @@ -2,13 +2,14 @@ # Copyright (C) 2007 Free Software Foundation, Inc. # This file is distributed under the same license as the gst-plugins-bad package. # Andre Klapper , 2008. +# Christian Kirbach , 2009. # msgid "" msgstr "" -"Project-Id-Version: gst-plugins-bad 0.10.5.2\n" +"Project-Id-Version: gst-plugins-bad 0.10.11.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-12 00:07+0100\n" -"PO-Revision-Date: 2008-01-01 20:00+0100\n" +"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"PO-Revision-Date: 2009-05-14 21:52+0200\n" "Last-Translator: Andre Klapper \n" "Language-Team: German \n" "MIME-Version: 1.0\n" @@ -16,379 +17,292 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: ext/resindvd/resindvdsrc.c:352 -#, fuzzy msgid "Could not read title information for DVD." -msgstr "Es konnte nicht in Datei »%s« geschrieben werden." +msgstr "Es konnte keine Titelinformationen der DVD gelesen werden." -#: ext/resindvd/resindvdsrc.c:358 -#, fuzzy, c-format +#, c-format msgid "Failed to open DVD device '%s'." -msgstr "Frontend-Gerät »%s« konnte nicht geöffnet werden." +msgstr "Öffnen des DVD-Geräts »%s« schlug fehl." -#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "" -#: ext/resindvd/rsnbasesrc.c:1659 -#, fuzzy msgid "Internal clock error." -msgstr "Interner Datenstromfehler." +msgstr "Interner Zeitfehler." -#: ext/resindvd/rsnbasesrc.c:1904 ext/resindvd/rsnbasesrc.c:1915 -#: gst/aiffparse/aiffparse.c:1265 -#, fuzzy msgid "Internal data flow error." msgstr "Interner Datenstromfehler." -#: ext/sndfile/gstsfsink.c:277 ext/sndfile/gstsfsrc.c:345 msgid "No file name specified for writing." msgstr "Kein Dateiname zum Schreiben angegeben." -#: ext/sndfile/gstsfsink.c:290 ext/sndfile/gstsfsrc.c:351 #, c-format msgid "Could not open file \"%s\" for writing." msgstr "Datei »%s« konnte nicht zum Schreiben geöffnet werden." -#: ext/sndfile/gstsfsink.c:440 gst/nuvdemux/gstnuvdemux.c:735 msgid "Internal data stream error." msgstr "Interner Datenstromfehler." -#: ext/sndfile/gstsfsink.c:494 ext/sndfile/gstsfsink.c:502 #, c-format msgid "Could not write to file \"%s\"." msgstr "Es konnte nicht in Datei »%s« geschrieben werden." -#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Gerät »%s« existiert nicht." -#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Frontend-Gerät »%s« konnte nicht geöffnet werden." -#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Einstellungen des Frontend-Geräts »%s« konnten nicht aufgerufen werden." -#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Datei »%s« konnte nicht zum Lesen geöffnet werden." -#: sys/oss4/oss4-mixer.c:302 -#, fuzzy msgid "Could not open audio device for mixer control handling." -msgstr "Datei »%s« konnte nicht zum Lesen geöffnet werden." +msgstr "Audio-Gerät konnte nicht zum Regeln geöffnet werden." -#: sys/oss4/oss4-mixer.c:316 msgid "" "Could not open audio device for mixer control handling. This version of the " "Open Sound System is not supported by this element." msgstr "" +"Audio-Gerät konnte nicht zum Regeln geöffnet werden. Diese Version des Open " +"Sound System (OSS) wird nicht von diesem Element unterstützt." -#: sys/oss4/oss4-mixer.c:720 msgid "Fast" -msgstr "" +msgstr "Schnell" -#: sys/oss4/oss4-mixer.c:721 msgid "Low" -msgstr "" +msgstr "Tief" -#: sys/oss4/oss4-mixer.c:722 msgid "Medium" -msgstr "" +msgstr "Mittel" -#: sys/oss4/oss4-mixer.c:723 msgid "High" -msgstr "" +msgstr "Hoch" -#: sys/oss4/oss4-mixer.c:724 msgid "Very high" -msgstr "" +msgstr "Sehr hoch" -#: sys/oss4/oss4-mixer.c:725 msgid "Production" -msgstr "" +msgstr "Produktion" -#: sys/oss4/oss4-mixer.c:726 msgid "Off" -msgstr "" +msgstr "Aus" -#: sys/oss4/oss4-mixer.c:727 msgid "On" -msgstr "" +msgstr "Ein" -#: sys/oss4/oss4-mixer.c:728 msgid "Stereo" -msgstr "" +msgstr "Stereo" -#: sys/oss4/oss4-mixer.c:729 msgid "Surround sound" -msgstr "" +msgstr "Surround-Ton" -#: sys/oss4/oss4-mixer.c:730 sys/oss4/oss4-mixer.c:805 msgid "Input mix" -msgstr "" +msgstr "Aufnahmemixer" -#: sys/oss4/oss4-mixer.c:731 sys/oss4/oss4-mixer.c:800 msgid "Front" -msgstr "" +msgstr "Vorne" -#: sys/oss4/oss4-mixer.c:732 sys/oss4/oss4-mixer.c:801 msgid "Rear" -msgstr "" +msgstr "Hinten" -#: sys/oss4/oss4-mixer.c:733 sys/oss4/oss4-mixer.c:802 msgid "Side" -msgstr "" +msgstr "Seite" -#: sys/oss4/oss4-mixer.c:734 sys/oss4/oss4-mixer.c:803 msgid "Center / LFE" -msgstr "" +msgstr "Mitte / LFE" -#: sys/oss4/oss4-mixer.c:735 sys/oss4/oss4-mixer.c:794 msgid "Microphone" -msgstr "" +msgstr "Mikrofon" -#: sys/oss4/oss4-mixer.c:736 sys/oss4/oss4-mixer.c:795 msgid "Front panel microphone" -msgstr "" +msgstr "Mikrofon am Fronteingang" -#: sys/oss4/oss4-mixer.c:737 msgid "Input" -msgstr "" +msgstr "Aufnahme" -#: sys/oss4/oss4-mixer.c:738 sys/oss4/oss4-mixer.c:796 msgid "Line-in" -msgstr "" +msgstr "Line-in" -#: sys/oss4/oss4-mixer.c:739 msgid "PCM 1" -msgstr "" +msgstr "PCM 1" -#: sys/oss4/oss4-mixer.c:740 msgid "PCM 2" -msgstr "" +msgstr "PCM 2" -#: sys/oss4/oss4-mixer.c:741 msgid "PCM 3" -msgstr "" +msgstr "PCM 3" -#: sys/oss4/oss4-mixer.c:742 msgid "PCM 4" -msgstr "" +msgstr "PCM 4" -#: sys/oss4/oss4-mixer.c:754 msgid "Green connector" -msgstr "" +msgstr "Grüner Stecker" -#: sys/oss4/oss4-mixer.c:755 msgid "Green front panel connector" -msgstr "" +msgstr "Grüner Frontstecker" -#: sys/oss4/oss4-mixer.c:756 msgid "Pink connector" -msgstr "" +msgstr "Rosa Stecker" -#: sys/oss4/oss4-mixer.c:757 msgid "Pink front panel connector" -msgstr "" +msgstr "Rosa Frontstecker" -#: sys/oss4/oss4-mixer.c:758 msgid "Blue connector" -msgstr "" +msgstr "Blauer Stecker" -#: sys/oss4/oss4-mixer.c:759 msgid "Blue front panel connector" -msgstr "" +msgstr "Blauer Frontstecker" -#: sys/oss4/oss4-mixer.c:760 msgid "Orange connector" -msgstr "" +msgstr "Oranger Stecker" -#: sys/oss4/oss4-mixer.c:761 msgid "Orange front panel connector" -msgstr "" +msgstr "Oranger Frontstecker" -#: sys/oss4/oss4-mixer.c:762 msgid "Black connector" -msgstr "" +msgstr "Schwarzer Stecker" -#: sys/oss4/oss4-mixer.c:763 msgid "Black front panel connector" -msgstr "" +msgstr "Schwarzer Frontstecker" -#: sys/oss4/oss4-mixer.c:764 msgid "Gray connector" -msgstr "" +msgstr "Grauer Stecker" -#: sys/oss4/oss4-mixer.c:765 msgid "Gray front panel connector" -msgstr "" +msgstr "Grauer Frontstecker" -#: sys/oss4/oss4-mixer.c:766 msgid "White connector" -msgstr "" +msgstr "Weißer Stecker" -#: sys/oss4/oss4-mixer.c:767 msgid "White front panel connector" -msgstr "" +msgstr "Weißer Frontstecker" -#: sys/oss4/oss4-mixer.c:768 msgid "Red connector" -msgstr "" +msgstr "Roter Stecker" -#: sys/oss4/oss4-mixer.c:769 msgid "Red front panel connector" -msgstr "" +msgstr "Roter Frontstecker" -#: sys/oss4/oss4-mixer.c:770 msgid "Yellow connector" -msgstr "" +msgstr "Gelber Stecker" -#: sys/oss4/oss4-mixer.c:771 msgid "Yellow front panel connector" -msgstr "" +msgstr "Gelber Frontstecker" -#: sys/oss4/oss4-mixer.c:774 msgid "Green connector function" -msgstr "" +msgstr "Funktion des grünen Steckers" -#: sys/oss4/oss4-mixer.c:775 msgid "Green front panel connector function" -msgstr "" +msgstr "Funktion des grünen Frontsteckers" -#: sys/oss4/oss4-mixer.c:776 msgid "Pink connector function" -msgstr "" +msgstr "Funktion des rosa Steckers" -#: sys/oss4/oss4-mixer.c:777 msgid "Pink front panel connector function" -msgstr "" +msgstr "Funktion des rosa Frontsteckers" -#: sys/oss4/oss4-mixer.c:778 msgid "Blue connector function" -msgstr "" +msgstr "Funktion des blauen Steckers" -#: sys/oss4/oss4-mixer.c:779 msgid "Blue front panel connector function" -msgstr "" +msgstr "Funktion des blauen Frontsteckers" -#: sys/oss4/oss4-mixer.c:780 msgid "Orange connector function" -msgstr "" +msgstr "Funktion des orangen Steckers" -#: sys/oss4/oss4-mixer.c:781 msgid "Orange front panel connector function" -msgstr "" +msgstr "Funktion des orangen Frontsteckers" -#: sys/oss4/oss4-mixer.c:782 msgid "Black connector function" -msgstr "" +msgstr "Funktion des schwarzen Steckers" -#: sys/oss4/oss4-mixer.c:783 msgid "Black front panel connector function" -msgstr "" +msgstr "Funktion des schwarzen Frontsteckers" -#: sys/oss4/oss4-mixer.c:784 msgid "Gray connector function" -msgstr "" +msgstr "Funktion des grauen Steckers" -#: sys/oss4/oss4-mixer.c:785 msgid "Gray front panel connector function" -msgstr "" +msgstr "Funktion des grauen Frontsteckers" -#: sys/oss4/oss4-mixer.c:786 msgid "White connector function" -msgstr "" +msgstr "Funktion des weißen Steckers" -#: sys/oss4/oss4-mixer.c:787 msgid "White front panel connector function" -msgstr "" +msgstr "Funktion des weißen Frontsteckers" -#: sys/oss4/oss4-mixer.c:788 msgid "Red connector function" -msgstr "" +msgstr "Funktion des roten Steckers" -#: sys/oss4/oss4-mixer.c:789 msgid "Red front panel connector function" -msgstr "" +msgstr "Funktion des roten Frontsteckers" -#: sys/oss4/oss4-mixer.c:790 msgid "Yellow connector function" -msgstr "" +msgstr "Funktion des gelben Steckers" -#: sys/oss4/oss4-mixer.c:791 msgid "Yellow front panel connector function" -msgstr "" +msgstr "Funktion des gelben Frontsteckers" -#: sys/oss4/oss4-mixer.c:797 msgid "Front panel line-in" -msgstr "" +msgstr "Front-Line-in" -#: sys/oss4/oss4-mixer.c:798 msgid "Headphones" -msgstr "" +msgstr "Kopfhörer" -#: sys/oss4/oss4-mixer.c:799 msgid "Front panel headphones" -msgstr "" +msgstr "Front-Kopfhörer" -#: sys/oss4/oss4-mixer.c:804 msgid "PCM" -msgstr "" +msgstr "PCM" -#: sys/oss4/oss4-mixer.c:846 msgid "Virtual mixer input" -msgstr "" +msgstr "Eingang des virtuellen Mischers" -#: sys/oss4/oss4-mixer.c:848 msgid "Virtual mixer output" -msgstr "" +msgstr "Ausgang des virtuellen Mischers" -#: sys/oss4/oss4-mixer.c:850 msgid "Virtual mixer channel configuration" -msgstr "" +msgstr "Konfiguration des virtuellen Mischers" -#: sys/oss4/oss4-sink.c:376 sys/oss4/oss4-source.c:367 msgid "" "Could not open audio device for playback. Device is being used by another " "application." msgstr "" +"Das Audio-Gerät konnte nicht zur Wiedergabe geöffnet werden. Das Gerät wird " +"von einer anderen Anwendung verwendet." -#: sys/oss4/oss4-sink.c:386 sys/oss4/oss4-source.c:377 msgid "" "Could not open audio device for playback. You don't have permission to open " "the device." msgstr "" +"Das Audio-Gerät konnte nicht zur Wiedergabe geöffnet werden. Sie haben " +"nicht die Berechtigungen zum Öffnen des Gerätes." -#: sys/oss4/oss4-sink.c:397 sys/oss4/oss4-source.c:388 -#, fuzzy msgid "Could not open audio device for playback." -msgstr "Frontend-Gerät »%s« konnte nicht geöffnet werden." +msgstr "Das Audio-Gerät konnte nicht zur Wiedergabe geöffnet werden. " -#: sys/oss4/oss4-sink.c:406 sys/oss4/oss4-source.c:398 msgid "" "Could not open audio device for playback. This version of the Open Sound " "System is not supported by this element." msgstr "" +"Das Audio-Gerät konnte nicht zur Wiedergabe geöffnet werden. Diese Version " +"des Open Sound System (OSS) wird nicht von diesem Element unterstützt." -#: sys/oss4/oss4-sink.c:522 msgid "Playback is not supported by this audio device." -msgstr "" +msgstr "Die Wiedergabe wird nicht von diesem Audio-Gerät unterstützt." -#: sys/oss4/oss4-sink.c:529 msgid "Audio playback error." -msgstr "" +msgstr "Fehler bei Audio-Wiedergabe." -#: sys/oss4/oss4-source.c:520 msgid "Recording is not supported by this audio device." -msgstr "" +msgstr "Die Aufnahme wird nicht von diesem Audio-Gerät unterstützt." -#: sys/oss4/oss4-source.c:527 msgid "Error recording from audio device." -msgstr "" +msgstr "Fehler bei der Aufnahme vom Audio-Gerät." diff --git a/po/en_GB.po b/po/en_GB.po index b816d5be..2c5525ff 100644 --- a/po/en_GB.po +++ b/po/en_GB.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins 0.8.1\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-12 00:07+0100\n" +"POT-Creation-Date: 2009-05-16 01:36+0100\n" "PO-Revision-Date: 2004-04-26 10:41-0400\n" "Last-Translator: Gareth Owen \n" "Language-Team: English (British) \n" @@ -14,385 +14,295 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ext/resindvd/resindvdsrc.c:352 #, fuzzy msgid "Could not read title information for DVD." msgstr "Could not write to file \"%s\"." -#: ext/resindvd/resindvdsrc.c:358 #, fuzzy, c-format msgid "Failed to open DVD device '%s'." msgstr "Could not close control device \"%s\"." -#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "" -#: ext/resindvd/rsnbasesrc.c:1659 msgid "Internal clock error." msgstr "" -#: ext/resindvd/rsnbasesrc.c:1904 ext/resindvd/rsnbasesrc.c:1915 -#: gst/aiffparse/aiffparse.c:1265 msgid "Internal data flow error." msgstr "" -#: ext/sndfile/gstsfsink.c:277 ext/sndfile/gstsfsrc.c:345 #, fuzzy msgid "No file name specified for writing." msgstr "No filename specified." -#: ext/sndfile/gstsfsink.c:290 ext/sndfile/gstsfsrc.c:351 #, c-format msgid "Could not open file \"%s\" for writing." msgstr "Could not open file \"%s\" for writing." -#: ext/sndfile/gstsfsink.c:440 gst/nuvdemux/gstnuvdemux.c:735 msgid "Internal data stream error." msgstr "" -#: ext/sndfile/gstsfsink.c:494 ext/sndfile/gstsfsink.c:502 #, c-format msgid "Could not write to file \"%s\"." msgstr "Could not write to file \"%s\"." -#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Device \"%s\" does not exist." -#: sys/dvb/gstdvbsrc.c:710 #, fuzzy, c-format msgid "Could not open frontend device \"%s\"." msgstr "Could not close control device \"%s\"." -#: sys/dvb/gstdvbsrc.c:722 #, fuzzy, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Could not get enough buffers from device \"%s\"." -#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Could not open file \"%s\" for reading." -#: sys/oss4/oss4-mixer.c:302 #, fuzzy msgid "Could not open audio device for mixer control handling." msgstr "Could not open audio device \"%s\" for writing." -#: sys/oss4/oss4-mixer.c:316 msgid "" "Could not open audio device for mixer control handling. This version of the " "Open Sound System is not supported by this element." msgstr "" -#: sys/oss4/oss4-mixer.c:720 msgid "Fast" msgstr "" -#: sys/oss4/oss4-mixer.c:721 msgid "Low" msgstr "" -#: sys/oss4/oss4-mixer.c:722 msgid "Medium" msgstr "" -#: sys/oss4/oss4-mixer.c:723 msgid "High" msgstr "" -#: sys/oss4/oss4-mixer.c:724 msgid "Very high" msgstr "" -#: sys/oss4/oss4-mixer.c:725 msgid "Production" msgstr "" -#: sys/oss4/oss4-mixer.c:726 msgid "Off" msgstr "" -#: sys/oss4/oss4-mixer.c:727 msgid "On" msgstr "" -#: sys/oss4/oss4-mixer.c:728 msgid "Stereo" msgstr "" -#: sys/oss4/oss4-mixer.c:729 msgid "Surround sound" msgstr "" -#: sys/oss4/oss4-mixer.c:730 sys/oss4/oss4-mixer.c:805 msgid "Input mix" msgstr "" -#: sys/oss4/oss4-mixer.c:731 sys/oss4/oss4-mixer.c:800 msgid "Front" msgstr "" -#: sys/oss4/oss4-mixer.c:732 sys/oss4/oss4-mixer.c:801 #, fuzzy msgid "Rear" msgstr "Record" -#: sys/oss4/oss4-mixer.c:733 sys/oss4/oss4-mixer.c:802 #, fuzzy msgid "Side" msgstr "Video" -#: sys/oss4/oss4-mixer.c:734 sys/oss4/oss4-mixer.c:803 msgid "Center / LFE" msgstr "" -#: sys/oss4/oss4-mixer.c:735 sys/oss4/oss4-mixer.c:794 msgid "Microphone" msgstr "Microphone" -#: sys/oss4/oss4-mixer.c:736 sys/oss4/oss4-mixer.c:795 msgid "Front panel microphone" msgstr "" -#: sys/oss4/oss4-mixer.c:737 msgid "Input" msgstr "" -#: sys/oss4/oss4-mixer.c:738 sys/oss4/oss4-mixer.c:796 msgid "Line-in" msgstr "Line-in" -#: sys/oss4/oss4-mixer.c:739 #, fuzzy msgid "PCM 1" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:740 #, fuzzy msgid "PCM 2" msgstr "PCM-2" -#: sys/oss4/oss4-mixer.c:741 #, fuzzy msgid "PCM 3" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:742 #, fuzzy msgid "PCM 4" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:754 msgid "Green connector" msgstr "" -#: sys/oss4/oss4-mixer.c:755 msgid "Green front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:756 msgid "Pink connector" msgstr "" -#: sys/oss4/oss4-mixer.c:757 msgid "Pink front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:758 msgid "Blue connector" msgstr "" -#: sys/oss4/oss4-mixer.c:759 msgid "Blue front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:760 msgid "Orange connector" msgstr "" -#: sys/oss4/oss4-mixer.c:761 msgid "Orange front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:762 msgid "Black connector" msgstr "" -#: sys/oss4/oss4-mixer.c:763 msgid "Black front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:764 msgid "Gray connector" msgstr "" -#: sys/oss4/oss4-mixer.c:765 msgid "Gray front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:766 msgid "White connector" msgstr "" -#: sys/oss4/oss4-mixer.c:767 msgid "White front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:768 msgid "Red connector" msgstr "" -#: sys/oss4/oss4-mixer.c:769 msgid "Red front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:770 msgid "Yellow connector" msgstr "" -#: sys/oss4/oss4-mixer.c:771 msgid "Yellow front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:774 msgid "Green connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:775 msgid "Green front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:776 msgid "Pink connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:777 msgid "Pink front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:778 msgid "Blue connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:779 msgid "Blue front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:780 msgid "Orange connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:781 msgid "Orange front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:782 msgid "Black connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:783 msgid "Black front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:784 msgid "Gray connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:785 msgid "Gray front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:786 msgid "White connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:787 msgid "White front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:788 msgid "Red connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:789 msgid "Red front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:790 msgid "Yellow connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:791 msgid "Yellow front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:797 msgid "Front panel line-in" msgstr "" -#: sys/oss4/oss4-mixer.c:798 msgid "Headphones" msgstr "" -#: sys/oss4/oss4-mixer.c:799 msgid "Front panel headphones" msgstr "" -#: sys/oss4/oss4-mixer.c:804 msgid "PCM" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:846 msgid "Virtual mixer input" msgstr "" -#: sys/oss4/oss4-mixer.c:848 msgid "Virtual mixer output" msgstr "" -#: sys/oss4/oss4-mixer.c:850 msgid "Virtual mixer channel configuration" msgstr "" -#: sys/oss4/oss4-sink.c:376 sys/oss4/oss4-source.c:367 msgid "" "Could not open audio device for playback. Device is being used by another " "application." msgstr "" -#: sys/oss4/oss4-sink.c:386 sys/oss4/oss4-source.c:377 msgid "" "Could not open audio device for playback. You don't have permission to open " "the device." msgstr "" -#: sys/oss4/oss4-sink.c:397 sys/oss4/oss4-source.c:388 #, fuzzy msgid "Could not open audio device for playback." msgstr "Could not open audio device \"%s\" for writing." -#: sys/oss4/oss4-sink.c:406 sys/oss4/oss4-source.c:398 msgid "" "Could not open audio device for playback. This version of the Open Sound " "System is not supported by this element." msgstr "" -#: sys/oss4/oss4-sink.c:522 msgid "Playback is not supported by this audio device." msgstr "" -#: sys/oss4/oss4-sink.c:529 msgid "Audio playback error." msgstr "" -#: sys/oss4/oss4-source.c:520 msgid "Recording is not supported by this audio device." msgstr "" -#: sys/oss4/oss4-source.c:527 msgid "Error recording from audio device." msgstr "" diff --git a/po/es.po b/po/es.po index cb4fe93c..5ac72f64 100644 --- a/po/es.po +++ b/po/es.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.10.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-12 00:07+0100\n" +"POT-Creation-Date: 2009-05-16 01:36+0100\n" "PO-Revision-Date: 2009-04-04 13:31+0200\n" "Last-Translator: Jorge González González \n" "Language-Team: Spanish \n" @@ -17,73 +17,57 @@ msgstr "" "X-Generator: KBabel 1.11.4\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "No se pudo leer la información del título para el DVD." -#: ext/resindvd/resindvdsrc.c:358 #, c-format msgid "Failed to open DVD device '%s'." msgstr "Falló abrir el dispositivo DVD «%s»." -#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "Falló al establecer la búsqueda basada en PGC." -#: ext/resindvd/rsnbasesrc.c:1659 msgid "Internal clock error." msgstr "Error en el reloj interno." -#: ext/resindvd/rsnbasesrc.c:1904 ext/resindvd/rsnbasesrc.c:1915 -#: gst/aiffparse/aiffparse.c:1265 msgid "Internal data flow error." msgstr "Error en el flujo de datos interno." -#: ext/sndfile/gstsfsink.c:277 ext/sndfile/gstsfsrc.c:345 msgid "No file name specified for writing." msgstr "No se especificó un nombre de archivo para su escritura." -#: ext/sndfile/gstsfsink.c:290 ext/sndfile/gstsfsrc.c:351 #, c-format msgid "Could not open file \"%s\" for writing." msgstr "No se pudo abrir el archivo «%s» para escribir." -#: ext/sndfile/gstsfsink.c:440 gst/nuvdemux/gstnuvdemux.c:735 msgid "Internal data stream error." msgstr "Error en el flujo de datos interno." -#: ext/sndfile/gstsfsink.c:494 ext/sndfile/gstsfsink.c:502 #, c-format msgid "Could not write to file \"%s\"." msgstr "No se pudo escribir en el archivo «%s»." -#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "El dispositivo «%s» no existe." -#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "No se pudo abrir el dispositivo frontend «%s»." -#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "No se pudieron obtener los ajustes del dispositivo frontend «%s»." -#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "No se pudo abrir el archivo «%s» para leer." -#: sys/oss4/oss4-mixer.c:302 msgid "Could not open audio device for mixer control handling." msgstr "" "No se pudo abrir el dispositivo de sonido para manejar el control del " "mezclador." -#: sys/oss4/oss4-mixer.c:316 msgid "" "Could not open audio device for mixer control handling. This version of the " "Open Sound System is not supported by this element." @@ -91,271 +75,204 @@ msgstr "" "No se pudo abrir el dispositivo para manejar el control del mezclador. Este " "elemento no soporta esta versión del Open Sound System." -#: sys/oss4/oss4-mixer.c:720 msgid "Fast" msgstr "Rápido" -#: sys/oss4/oss4-mixer.c:721 msgid "Low" msgstr "Bajo" -#: sys/oss4/oss4-mixer.c:722 msgid "Medium" msgstr "Medio" -#: sys/oss4/oss4-mixer.c:723 msgid "High" msgstr "Alto" -#: sys/oss4/oss4-mixer.c:724 msgid "Very high" msgstr "Muy alto" -#: sys/oss4/oss4-mixer.c:725 msgid "Production" msgstr "Producción" -#: sys/oss4/oss4-mixer.c:726 msgid "Off" msgstr "Apagado" -#: sys/oss4/oss4-mixer.c:727 msgid "On" msgstr "Encendido" -#: sys/oss4/oss4-mixer.c:728 msgid "Stereo" msgstr "Estéreo" -#: sys/oss4/oss4-mixer.c:729 msgid "Surround sound" msgstr "Sonido envolvente" -#: sys/oss4/oss4-mixer.c:730 sys/oss4/oss4-mixer.c:805 msgid "Input mix" msgstr "Mezclador de entrada" -#: sys/oss4/oss4-mixer.c:731 sys/oss4/oss4-mixer.c:800 msgid "Front" msgstr "Frontal" -#: sys/oss4/oss4-mixer.c:732 sys/oss4/oss4-mixer.c:801 msgid "Rear" msgstr "Trasero" -#: sys/oss4/oss4-mixer.c:733 sys/oss4/oss4-mixer.c:802 msgid "Side" msgstr "Lateral" -#: sys/oss4/oss4-mixer.c:734 sys/oss4/oss4-mixer.c:803 msgid "Center / LFE" msgstr "Centrado / LFE" -#: sys/oss4/oss4-mixer.c:735 sys/oss4/oss4-mixer.c:794 msgid "Microphone" msgstr "Micrófono" -#: sys/oss4/oss4-mixer.c:736 sys/oss4/oss4-mixer.c:795 msgid "Front panel microphone" msgstr "Micrófono del panel frontal" -#: sys/oss4/oss4-mixer.c:737 msgid "Input" msgstr "Entrada" -#: sys/oss4/oss4-mixer.c:738 sys/oss4/oss4-mixer.c:796 msgid "Line-in" msgstr "Línea de entrada" -#: sys/oss4/oss4-mixer.c:739 msgid "PCM 1" msgstr "PCM 1" -#: sys/oss4/oss4-mixer.c:740 msgid "PCM 2" msgstr "PCM 2" -#: sys/oss4/oss4-mixer.c:741 msgid "PCM 3" msgstr "PCM 3" -#: sys/oss4/oss4-mixer.c:742 msgid "PCM 4" msgstr "PCM 4" -#: sys/oss4/oss4-mixer.c:754 msgid "Green connector" msgstr "Conector verde" -#: sys/oss4/oss4-mixer.c:755 msgid "Green front panel connector" msgstr "Conector verde del panel frontal" -#: sys/oss4/oss4-mixer.c:756 msgid "Pink connector" msgstr "Conector rosa" -#: sys/oss4/oss4-mixer.c:757 msgid "Pink front panel connector" msgstr "Conector rosa del panel frontal" -#: sys/oss4/oss4-mixer.c:758 msgid "Blue connector" msgstr "Conector azul" -#: sys/oss4/oss4-mixer.c:759 msgid "Blue front panel connector" msgstr "Conector azul del panel frontal" -#: sys/oss4/oss4-mixer.c:760 msgid "Orange connector" msgstr "Conector naranja" -#: sys/oss4/oss4-mixer.c:761 msgid "Orange front panel connector" msgstr "Conector naranja del panel frontal" -#: sys/oss4/oss4-mixer.c:762 msgid "Black connector" msgstr "Conector negro" -#: sys/oss4/oss4-mixer.c:763 msgid "Black front panel connector" msgstr "Conector negro del panel frontal" -#: sys/oss4/oss4-mixer.c:764 msgid "Gray connector" msgstr "Conector gris" -#: sys/oss4/oss4-mixer.c:765 msgid "Gray front panel connector" msgstr "Conector gris del panel frontal" -#: sys/oss4/oss4-mixer.c:766 msgid "White connector" msgstr "Conector blanco" -#: sys/oss4/oss4-mixer.c:767 msgid "White front panel connector" msgstr "Conector blanco del panel frontal" -#: sys/oss4/oss4-mixer.c:768 msgid "Red connector" msgstr "Conector rojo" -#: sys/oss4/oss4-mixer.c:769 msgid "Red front panel connector" msgstr "Conector rojo del panel frontal" -#: sys/oss4/oss4-mixer.c:770 msgid "Yellow connector" msgstr "Conector amarillo" -#: sys/oss4/oss4-mixer.c:771 msgid "Yellow front panel connector" msgstr "Conector amarillo del panel frontal" -#: sys/oss4/oss4-mixer.c:774 msgid "Green connector function" msgstr "Función del conector verde" -#: sys/oss4/oss4-mixer.c:775 msgid "Green front panel connector function" msgstr "Función del conector verde del panel frontal" -#: sys/oss4/oss4-mixer.c:776 msgid "Pink connector function" msgstr "Función del conector rosa" -#: sys/oss4/oss4-mixer.c:777 msgid "Pink front panel connector function" msgstr "Función del conector rosa del panel frontal" -#: sys/oss4/oss4-mixer.c:778 msgid "Blue connector function" msgstr "Función del conector azul" -#: sys/oss4/oss4-mixer.c:779 msgid "Blue front panel connector function" msgstr "Función del conector azul del panel frontal" -#: sys/oss4/oss4-mixer.c:780 msgid "Orange connector function" msgstr "Función del conector naranja" -#: sys/oss4/oss4-mixer.c:781 msgid "Orange front panel connector function" msgstr "Función del conector naranja del panel frontal" -#: sys/oss4/oss4-mixer.c:782 msgid "Black connector function" msgstr "Función del conector negro" -#: sys/oss4/oss4-mixer.c:783 msgid "Black front panel connector function" msgstr "Función del conector negro del panel frontal" -#: sys/oss4/oss4-mixer.c:784 msgid "Gray connector function" msgstr "Función del conector gris" -#: sys/oss4/oss4-mixer.c:785 msgid "Gray front panel connector function" msgstr "Función del conector gris del panel frontal" -#: sys/oss4/oss4-mixer.c:786 msgid "White connector function" msgstr "Función del conector blanco" -#: sys/oss4/oss4-mixer.c:787 msgid "White front panel connector function" msgstr "Función del conector blanco del panel frontal" -#: sys/oss4/oss4-mixer.c:788 msgid "Red connector function" msgstr "Función del conector rojo" -#: sys/oss4/oss4-mixer.c:789 msgid "Red front panel connector function" msgstr "Función del conector rojo del panel frontal" -#: sys/oss4/oss4-mixer.c:790 msgid "Yellow connector function" msgstr "Función del conector amarillo" -#: sys/oss4/oss4-mixer.c:791 msgid "Yellow front panel connector function" msgstr "Función del conector amarillo del panel frontal" -#: sys/oss4/oss4-mixer.c:797 msgid "Front panel line-in" msgstr "Línea de entrada del panel frontal" -#: sys/oss4/oss4-mixer.c:798 msgid "Headphones" msgstr "Auriculares" -#: sys/oss4/oss4-mixer.c:799 msgid "Front panel headphones" msgstr "Auriculares del panel frontal" -#: sys/oss4/oss4-mixer.c:804 msgid "PCM" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:846 msgid "Virtual mixer input" msgstr "Entrada del mezclador virtual" -#: sys/oss4/oss4-mixer.c:848 msgid "Virtual mixer output" msgstr "Salida del mezclador virtual" -#: sys/oss4/oss4-mixer.c:850 msgid "Virtual mixer channel configuration" msgstr "Configuración del canal del mezclador virtual" -#: sys/oss4/oss4-sink.c:376 sys/oss4/oss4-source.c:367 msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -363,7 +280,6 @@ msgstr "" "No se pudo abrir el dispositivo de sonido para reproducir. Otra aplicación " "está usando el dispositivo." -#: sys/oss4/oss4-sink.c:386 sys/oss4/oss4-source.c:377 msgid "" "Could not open audio device for playback. You don't have permission to open " "the device." @@ -371,11 +287,9 @@ msgstr "" "No se pudo abrir el dispositivo de sonido para reproducir. No tiene permiso " "para abrir el dispositivo." -#: sys/oss4/oss4-sink.c:397 sys/oss4/oss4-source.c:388 msgid "Could not open audio device for playback." msgstr "No se pudo abrir el dispositivo de sonido para reproducción." -#: sys/oss4/oss4-sink.c:406 sys/oss4/oss4-source.c:398 msgid "" "Could not open audio device for playback. This version of the Open Sound " "System is not supported by this element." @@ -383,19 +297,15 @@ msgstr "" "No se pudo abrir el dispositivo para reproducir. Este elemento no soporta " "esta versión del Open Sound System." -#: sys/oss4/oss4-sink.c:522 msgid "Playback is not supported by this audio device." msgstr "Este dispositivo de sonido no soporta reproducción." -#: sys/oss4/oss4-sink.c:529 msgid "Audio playback error." msgstr "Error en la reproducción del sonido." -#: sys/oss4/oss4-source.c:520 msgid "Recording is not supported by this audio device." msgstr "Este dispositivo de sonido no soporta grabación." -#: sys/oss4/oss4-source.c:527 msgid "Error recording from audio device." msgstr "Error al grabar desde el dispositivo de sonido." diff --git a/po/fi.po b/po/fi.po index 77e421dd..452147b4 100644 --- a/po/fi.po +++ b/po/fi.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.10.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-12 00:07+0100\n" +"POT-Creation-Date: 2009-05-16 01:36+0100\n" "PO-Revision-Date: 2009-03-11 08:23+0200\n" "Last-Translator: Tommi Vainikainen \n" "Language-Team: Finnish \n" @@ -21,71 +21,55 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: KBabel 1.11.2\n" -#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "DVD:n otsikkotietoja ei voitu lukea." -#: ext/resindvd/resindvdsrc.c:358 #, c-format msgid "Failed to open DVD device '%s'." msgstr "DVD-laitetta \"%s\" ei voitu avata." -#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "PGC-pohjaisen kelauksen asetus epäonnistui." -#: ext/resindvd/rsnbasesrc.c:1659 msgid "Internal clock error." msgstr "Sisäinen kellovirhe." -#: ext/resindvd/rsnbasesrc.c:1904 ext/resindvd/rsnbasesrc.c:1915 -#: gst/aiffparse/aiffparse.c:1265 msgid "Internal data flow error." msgstr "Sisäinen tietovirtavirhe." -#: ext/sndfile/gstsfsink.c:277 ext/sndfile/gstsfsrc.c:345 msgid "No file name specified for writing." msgstr "Kirjoitettavaa tiedostonimeä ei annettu." -#: ext/sndfile/gstsfsink.c:290 ext/sndfile/gstsfsrc.c:351 #, c-format msgid "Could not open file \"%s\" for writing." msgstr "Tiedostoa \"%s\" ei voi avata kirjoitettavaksi." -#: ext/sndfile/gstsfsink.c:440 gst/nuvdemux/gstnuvdemux.c:735 msgid "Internal data stream error." msgstr "Sisäisen tietovirran virhe." -#: ext/sndfile/gstsfsink.c:494 ext/sndfile/gstsfsink.c:502 #, c-format msgid "Could not write to file \"%s\"." msgstr "Tiedostoon \"%s\" ei voitu kirjoittaa." -#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Laitetta \"%s\" ei ole olemassa." -#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Edustalaitetta \"%s\" ei voitu avata." -#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Edustalaitteen \"%s\" asetuksia ei saatu." -#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Tiedostoa \"%s\" ei voi avata luettavaksi." -#: sys/oss4/oss4-mixer.c:302 msgid "Could not open audio device for mixer control handling." msgstr "Äänilaitetta ei voitu avata mikserinhallinnan käsiteltäväksi." -#: sys/oss4/oss4-mixer.c:316 msgid "" "Could not open audio device for mixer control handling. This version of the " "Open Sound System is not supported by this element." @@ -93,271 +77,204 @@ msgstr "" "Äänilaitetta ei voitu avata mikserinhallinnan käsiteltäväksi. Tämä elementti " "ei tue tätä versiota Open Sound Systemistä." -#: sys/oss4/oss4-mixer.c:720 msgid "Fast" msgstr "Nopea" -#: sys/oss4/oss4-mixer.c:721 msgid "Low" msgstr "Matala" -#: sys/oss4/oss4-mixer.c:722 msgid "Medium" msgstr "Keskitaso" -#: sys/oss4/oss4-mixer.c:723 msgid "High" msgstr "Korkea" -#: sys/oss4/oss4-mixer.c:724 msgid "Very high" msgstr "Erittäin korkea" -#: sys/oss4/oss4-mixer.c:725 msgid "Production" msgstr "Tuotanto" -#: sys/oss4/oss4-mixer.c:726 msgid "Off" msgstr "Poissa" -#: sys/oss4/oss4-mixer.c:727 msgid "On" msgstr "Päällä" -#: sys/oss4/oss4-mixer.c:728 msgid "Stereo" msgstr "Stereo" -#: sys/oss4/oss4-mixer.c:729 msgid "Surround sound" msgstr "Surround-ääni" -#: sys/oss4/oss4-mixer.c:730 sys/oss4/oss4-mixer.c:805 msgid "Input mix" msgstr "Sisääntulomiksaus" -#: sys/oss4/oss4-mixer.c:731 sys/oss4/oss4-mixer.c:800 msgid "Front" msgstr "Etu" -#: sys/oss4/oss4-mixer.c:732 sys/oss4/oss4-mixer.c:801 msgid "Rear" msgstr "Taka" -#: sys/oss4/oss4-mixer.c:733 sys/oss4/oss4-mixer.c:802 msgid "Side" msgstr "Sivu" -#: sys/oss4/oss4-mixer.c:734 sys/oss4/oss4-mixer.c:803 msgid "Center / LFE" msgstr "Keski / LFE" -#: sys/oss4/oss4-mixer.c:735 sys/oss4/oss4-mixer.c:794 msgid "Microphone" msgstr "Mikrofoni" -#: sys/oss4/oss4-mixer.c:736 sys/oss4/oss4-mixer.c:795 msgid "Front panel microphone" msgstr "Etupaneelin mikrofoni" -#: sys/oss4/oss4-mixer.c:737 msgid "Input" msgstr "Sisääntulo" -#: sys/oss4/oss4-mixer.c:738 sys/oss4/oss4-mixer.c:796 msgid "Line-in" msgstr "Linja sisään" -#: sys/oss4/oss4-mixer.c:739 msgid "PCM 1" msgstr "PCM 1" -#: sys/oss4/oss4-mixer.c:740 msgid "PCM 2" msgstr "PCM 2" -#: sys/oss4/oss4-mixer.c:741 msgid "PCM 3" msgstr "PCM 3" -#: sys/oss4/oss4-mixer.c:742 msgid "PCM 4" msgstr "PCM 4" -#: sys/oss4/oss4-mixer.c:754 msgid "Green connector" msgstr "Vihreä liitin" -#: sys/oss4/oss4-mixer.c:755 msgid "Green front panel connector" msgstr "Vihreä etupaneelin liitin" -#: sys/oss4/oss4-mixer.c:756 msgid "Pink connector" msgstr "Violetti liitin" -#: sys/oss4/oss4-mixer.c:757 msgid "Pink front panel connector" msgstr "Violetti etupaneelin liitin" -#: sys/oss4/oss4-mixer.c:758 msgid "Blue connector" msgstr "Sininen liitin" -#: sys/oss4/oss4-mixer.c:759 msgid "Blue front panel connector" msgstr "Sininen etupaneelin liitin" -#: sys/oss4/oss4-mixer.c:760 msgid "Orange connector" msgstr "Oranssi liitin" -#: sys/oss4/oss4-mixer.c:761 msgid "Orange front panel connector" msgstr "Oranssi etupaneelin liitin" -#: sys/oss4/oss4-mixer.c:762 msgid "Black connector" msgstr "Musta liitin" -#: sys/oss4/oss4-mixer.c:763 msgid "Black front panel connector" msgstr "Musta etupaneelin liitin" -#: sys/oss4/oss4-mixer.c:764 msgid "Gray connector" msgstr "Harmaa liitin" -#: sys/oss4/oss4-mixer.c:765 msgid "Gray front panel connector" msgstr "Harmaa etupaneelin liitin" -#: sys/oss4/oss4-mixer.c:766 msgid "White connector" msgstr "Valkoinen liitin" -#: sys/oss4/oss4-mixer.c:767 msgid "White front panel connector" msgstr "Valkoinen etupaneelin liitin" -#: sys/oss4/oss4-mixer.c:768 msgid "Red connector" msgstr "Punainen liitin" -#: sys/oss4/oss4-mixer.c:769 msgid "Red front panel connector" msgstr "Punainen etupaneelin liitin" -#: sys/oss4/oss4-mixer.c:770 msgid "Yellow connector" msgstr "Keltainen liitin" -#: sys/oss4/oss4-mixer.c:771 msgid "Yellow front panel connector" msgstr "Keltainen etupaneelin liitin" -#: sys/oss4/oss4-mixer.c:774 msgid "Green connector function" msgstr "Vihreän liittimen toiminto" -#: sys/oss4/oss4-mixer.c:775 msgid "Green front panel connector function" msgstr "Vihreän etupaneelin liittimen toiminto" -#: sys/oss4/oss4-mixer.c:776 msgid "Pink connector function" msgstr "Violetin liittimen toiminto" -#: sys/oss4/oss4-mixer.c:777 msgid "Pink front panel connector function" msgstr "Violetin etupaneelin liittimen toiminto" -#: sys/oss4/oss4-mixer.c:778 msgid "Blue connector function" msgstr "Sinisen liittimen toiminto" -#: sys/oss4/oss4-mixer.c:779 msgid "Blue front panel connector function" msgstr "Sinisen etupaneelin liittimen toiminto" -#: sys/oss4/oss4-mixer.c:780 msgid "Orange connector function" msgstr "Oranssin liittimen toiminto" -#: sys/oss4/oss4-mixer.c:781 msgid "Orange front panel connector function" msgstr "Oranssin etupaneelin liittimen toiminto" -#: sys/oss4/oss4-mixer.c:782 msgid "Black connector function" msgstr "Mustan liittimen toiminto" -#: sys/oss4/oss4-mixer.c:783 msgid "Black front panel connector function" msgstr "Mustan etupaneelin liittimen toiminto" -#: sys/oss4/oss4-mixer.c:784 msgid "Gray connector function" msgstr "Harmaan liittimen toiminto" -#: sys/oss4/oss4-mixer.c:785 msgid "Gray front panel connector function" msgstr "Harmaan etupaneelin liittimen toiminto" -#: sys/oss4/oss4-mixer.c:786 msgid "White connector function" msgstr "Valkoisen liittimen toiminto" -#: sys/oss4/oss4-mixer.c:787 msgid "White front panel connector function" msgstr "Valkoisen etupaneelin liittimen toiminto" -#: sys/oss4/oss4-mixer.c:788 msgid "Red connector function" msgstr "Punaisen liittimen toiminto" -#: sys/oss4/oss4-mixer.c:789 msgid "Red front panel connector function" msgstr "Punaisen etupaneelin liittimen toiminto" -#: sys/oss4/oss4-mixer.c:790 msgid "Yellow connector function" msgstr "Keltaisen liittimen toiminto" -#: sys/oss4/oss4-mixer.c:791 msgid "Yellow front panel connector function" msgstr "Keltaisen etupaneelin liittimen toiminto" -#: sys/oss4/oss4-mixer.c:797 msgid "Front panel line-in" msgstr "Etupaneelin linjasisääntulo" -#: sys/oss4/oss4-mixer.c:798 msgid "Headphones" msgstr "Kuulokkeet" -#: sys/oss4/oss4-mixer.c:799 msgid "Front panel headphones" msgstr "Etupaneelin kuulokkeet" -#: sys/oss4/oss4-mixer.c:804 msgid "PCM" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:846 msgid "Virtual mixer input" msgstr "Näennäinen mikserisisääntulo" -#: sys/oss4/oss4-mixer.c:848 msgid "Virtual mixer output" msgstr "Näennäinen mikseriulostulo" -#: sys/oss4/oss4-mixer.c:850 msgid "Virtual mixer channel configuration" msgstr "Näennäinen mikserikanava-asetus" -#: sys/oss4/oss4-sink.c:376 sys/oss4/oss4-source.c:367 msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -365,7 +282,6 @@ msgstr "" "Äänialaitetta ei voitu avata toistoa varten. Laite on toisen sovelluksen " "käytössä." -#: sys/oss4/oss4-sink.c:386 sys/oss4/oss4-source.c:377 msgid "" "Could not open audio device for playback. You don't have permission to open " "the device." @@ -373,11 +289,9 @@ msgstr "" "Äänialaitetta ei voitu avata toistoa varten. Sinulla ei ole oikeuksia avata " "laitetta." -#: sys/oss4/oss4-sink.c:397 sys/oss4/oss4-source.c:388 msgid "Could not open audio device for playback." msgstr "Äänialaitetta ei voitu avata toistoa varten." -#: sys/oss4/oss4-sink.c:406 sys/oss4/oss4-source.c:398 msgid "" "Could not open audio device for playback. This version of the Open Sound " "System is not supported by this element." @@ -385,18 +299,14 @@ msgstr "" "Äänialaitetta ei voitu avata toistoa varten. Tämä elementti ei tue tätä " "versiota Open Sound Systemistä." -#: sys/oss4/oss4-sink.c:522 msgid "Playback is not supported by this audio device." msgstr "Tämä äänilaite ei tue toistamista." -#: sys/oss4/oss4-sink.c:529 msgid "Audio playback error." msgstr "Äänentoistovirhe." -#: sys/oss4/oss4-source.c:520 msgid "Recording is not supported by this audio device." msgstr "Tämä äänilaite ei tue nauhoitusta." -#: sys/oss4/oss4-source.c:527 msgid "Error recording from audio device." msgstr "Virhe nauhoitettaessa äänilaitteelta." diff --git a/po/fr.po b/po/fr.po index 23b7543b..fc54df33 100644 --- a/po/fr.po +++ b/po/fr.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.8.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-12 00:07+0100\n" +"POT-Creation-Date: 2009-05-16 01:36+0100\n" "PO-Revision-Date: 2008-10-21 09:59+0200\n" "Last-Translator: Claude Paroz \n" "Language-Team: French \n" @@ -16,73 +16,57 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "Impossible de lire les informations de titre du DVD." -#: ext/resindvd/resindvdsrc.c:358 #, c-format msgid "Failed to open DVD device '%s'." msgstr "Impossible d'ouvrir le périphérique du DVD « %s »." -#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "" -#: ext/resindvd/rsnbasesrc.c:1659 msgid "Internal clock error." msgstr "Erreur d'horloge interne." -#: ext/resindvd/rsnbasesrc.c:1904 ext/resindvd/rsnbasesrc.c:1915 -#: gst/aiffparse/aiffparse.c:1265 msgid "Internal data flow error." msgstr "Erreur interne de flux de données." -#: ext/sndfile/gstsfsink.c:277 ext/sndfile/gstsfsrc.c:345 msgid "No file name specified for writing." msgstr "Aucun nom de fichier indiqué pour l'écriture." -#: ext/sndfile/gstsfsink.c:290 ext/sndfile/gstsfsrc.c:351 #, c-format msgid "Could not open file \"%s\" for writing." msgstr "Impossible d'ouvrir le fichier « %s » pour l'écriture." -#: ext/sndfile/gstsfsink.c:440 gst/nuvdemux/gstnuvdemux.c:735 msgid "Internal data stream error." msgstr "Erreur interne de flux de données." -#: ext/sndfile/gstsfsink.c:494 ext/sndfile/gstsfsink.c:502 #, c-format msgid "Could not write to file \"%s\"." msgstr "Impossible d'écrire dans le fichier « %s »." -#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Le périphérique « %s » n'existe pas." -#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Impossible d'ouvrir le périphérique frontal « %s »." -#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Impossible d'obtenir les paramètres du périphérique frontal « %s »." -#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Impossible d'ouvrir le fichier « %s » en lecture." -#: sys/oss4/oss4-mixer.c:302 msgid "Could not open audio device for mixer control handling." msgstr "" "Impossible d'ouvrir le périphérique audio pour la gestion des contrôles de " "mixage." -#: sys/oss4/oss4-mixer.c:316 msgid "" "Could not open audio device for mixer control handling. This version of the " "Open Sound System is not supported by this element." @@ -91,271 +75,204 @@ msgstr "" "mixage. Cette version de OSS (Open Sound System) n'est pas prise en charge " "par cet élément." -#: sys/oss4/oss4-mixer.c:720 msgid "Fast" msgstr "Rapide" -#: sys/oss4/oss4-mixer.c:721 msgid "Low" msgstr "Bas" -#: sys/oss4/oss4-mixer.c:722 msgid "Medium" msgstr "Moyen" -#: sys/oss4/oss4-mixer.c:723 msgid "High" msgstr "Élevé" -#: sys/oss4/oss4-mixer.c:724 msgid "Very high" msgstr "Très élevé" -#: sys/oss4/oss4-mixer.c:725 msgid "Production" msgstr "Production" -#: sys/oss4/oss4-mixer.c:726 msgid "Off" msgstr "Désactivé" -#: sys/oss4/oss4-mixer.c:727 msgid "On" msgstr "Activé" -#: sys/oss4/oss4-mixer.c:728 msgid "Stereo" msgstr "Stéréo" -#: sys/oss4/oss4-mixer.c:729 msgid "Surround sound" msgstr "Son ambiophonique" -#: sys/oss4/oss4-mixer.c:730 sys/oss4/oss4-mixer.c:805 msgid "Input mix" msgstr "Mélangeur d'entrée" -#: sys/oss4/oss4-mixer.c:731 sys/oss4/oss4-mixer.c:800 msgid "Front" msgstr "Avant" -#: sys/oss4/oss4-mixer.c:732 sys/oss4/oss4-mixer.c:801 msgid "Rear" msgstr "Arrière" -#: sys/oss4/oss4-mixer.c:733 sys/oss4/oss4-mixer.c:802 msgid "Side" msgstr "Côté" -#: sys/oss4/oss4-mixer.c:734 sys/oss4/oss4-mixer.c:803 msgid "Center / LFE" msgstr "Centre / LFE" -#: sys/oss4/oss4-mixer.c:735 sys/oss4/oss4-mixer.c:794 msgid "Microphone" msgstr "Microphone" -#: sys/oss4/oss4-mixer.c:736 sys/oss4/oss4-mixer.c:795 msgid "Front panel microphone" msgstr "Micro du panneau avant" -#: sys/oss4/oss4-mixer.c:737 msgid "Input" msgstr "Entrée" -#: sys/oss4/oss4-mixer.c:738 sys/oss4/oss4-mixer.c:796 msgid "Line-in" msgstr "Entrée ligne" -#: sys/oss4/oss4-mixer.c:739 msgid "PCM 1" msgstr "PCM 1" -#: sys/oss4/oss4-mixer.c:740 msgid "PCM 2" msgstr "PCM 2" -#: sys/oss4/oss4-mixer.c:741 msgid "PCM 3" msgstr "PCM 3" -#: sys/oss4/oss4-mixer.c:742 msgid "PCM 4" msgstr "PCM 4" -#: sys/oss4/oss4-mixer.c:754 msgid "Green connector" msgstr "Connecteur vert" -#: sys/oss4/oss4-mixer.c:755 msgid "Green front panel connector" msgstr "Connecteur vert du panneau avant" -#: sys/oss4/oss4-mixer.c:756 msgid "Pink connector" msgstr "Connecteur rose" -#: sys/oss4/oss4-mixer.c:757 msgid "Pink front panel connector" msgstr "Connecteur rose du panneau avant" -#: sys/oss4/oss4-mixer.c:758 msgid "Blue connector" msgstr "Connecteur bleu" -#: sys/oss4/oss4-mixer.c:759 msgid "Blue front panel connector" msgstr "Connecteur bleu du panneau avant" -#: sys/oss4/oss4-mixer.c:760 msgid "Orange connector" msgstr "Connecteur orange" -#: sys/oss4/oss4-mixer.c:761 msgid "Orange front panel connector" msgstr "Connecteur orange du panneau avant" -#: sys/oss4/oss4-mixer.c:762 msgid "Black connector" msgstr "Connecteur noir" -#: sys/oss4/oss4-mixer.c:763 msgid "Black front panel connector" msgstr "Connecteur noir du panneau avant" -#: sys/oss4/oss4-mixer.c:764 msgid "Gray connector" msgstr "Connecteur gris" -#: sys/oss4/oss4-mixer.c:765 msgid "Gray front panel connector" msgstr "Connecteur gris du panneau avant" -#: sys/oss4/oss4-mixer.c:766 msgid "White connector" msgstr "Connecteur blanc" -#: sys/oss4/oss4-mixer.c:767 msgid "White front panel connector" msgstr "Connecteur blanc du panneau avant" -#: sys/oss4/oss4-mixer.c:768 msgid "Red connector" msgstr "Connecteur rouge" -#: sys/oss4/oss4-mixer.c:769 msgid "Red front panel connector" msgstr "Connecteur rouge du panneau avant" -#: sys/oss4/oss4-mixer.c:770 msgid "Yellow connector" msgstr "Connecteur jaune" -#: sys/oss4/oss4-mixer.c:771 msgid "Yellow front panel connector" msgstr "Connecteur jaune du panneau avant" -#: sys/oss4/oss4-mixer.c:774 msgid "Green connector function" msgstr "Fonction du connecteur vert" -#: sys/oss4/oss4-mixer.c:775 msgid "Green front panel connector function" msgstr "Fonction du connecteur vert du panneau avant" -#: sys/oss4/oss4-mixer.c:776 msgid "Pink connector function" msgstr "Fonction du connecteur rose" -#: sys/oss4/oss4-mixer.c:777 msgid "Pink front panel connector function" msgstr "Fonction du connecteur rose du panneau avant" -#: sys/oss4/oss4-mixer.c:778 msgid "Blue connector function" msgstr "Fonction du connecteur bleu" -#: sys/oss4/oss4-mixer.c:779 msgid "Blue front panel connector function" msgstr "Fonction du connecteur bleu du panneau avant" -#: sys/oss4/oss4-mixer.c:780 msgid "Orange connector function" msgstr "Fonction du connecteur orange" -#: sys/oss4/oss4-mixer.c:781 msgid "Orange front panel connector function" msgstr "Fonction du connecteur orange du panneau avant" -#: sys/oss4/oss4-mixer.c:782 msgid "Black connector function" msgstr "Fonction du connecteur noir" -#: sys/oss4/oss4-mixer.c:783 msgid "Black front panel connector function" msgstr "Fonction du connecteur noir du panneau avant" -#: sys/oss4/oss4-mixer.c:784 msgid "Gray connector function" msgstr "Fonction du connecteur gris" -#: sys/oss4/oss4-mixer.c:785 msgid "Gray front panel connector function" msgstr "Fonction du connecteur gris du panneau avant" -#: sys/oss4/oss4-mixer.c:786 msgid "White connector function" msgstr "Fonction du connecteur blanc" -#: sys/oss4/oss4-mixer.c:787 msgid "White front panel connector function" msgstr "Fonction du connecteur blanc du panneau avant" -#: sys/oss4/oss4-mixer.c:788 msgid "Red connector function" msgstr "Fonction du connecteur rouge" -#: sys/oss4/oss4-mixer.c:789 msgid "Red front panel connector function" msgstr "Fonction du connecteur rouge du panneau avant" -#: sys/oss4/oss4-mixer.c:790 msgid "Yellow connector function" msgstr "Fonction du connecteur jaune" -#: sys/oss4/oss4-mixer.c:791 msgid "Yellow front panel connector function" msgstr "Fonction du connecteur jaune du panneau avant" -#: sys/oss4/oss4-mixer.c:797 msgid "Front panel line-in" msgstr "Entrée ligne du panneau avant" -#: sys/oss4/oss4-mixer.c:798 msgid "Headphones" msgstr "Écouteurs" -#: sys/oss4/oss4-mixer.c:799 msgid "Front panel headphones" msgstr "Écouteurs du panneau avant" -#: sys/oss4/oss4-mixer.c:804 msgid "PCM" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:846 msgid "Virtual mixer input" msgstr "Entrée de mélangeur virtuel" -#: sys/oss4/oss4-mixer.c:848 msgid "Virtual mixer output" msgstr "Sortie de mélangeur virtuel" -#: sys/oss4/oss4-mixer.c:850 msgid "Virtual mixer channel configuration" msgstr "Configuration du canal du mélangeur virtuel" -#: sys/oss4/oss4-sink.c:376 sys/oss4/oss4-source.c:367 msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -363,7 +280,6 @@ msgstr "" "Impossible d'ouvrir le périphérique audio pour la lecture. Le périphérique " "est utilisé par une autre application." -#: sys/oss4/oss4-sink.c:386 sys/oss4/oss4-source.c:377 msgid "" "Could not open audio device for playback. You don't have permission to open " "the device." @@ -371,11 +287,9 @@ msgstr "" "Impossible d'ouvrir le périphérique audio pour la lecture. Vous n'avez pas " "les droits nécessaires pour ouvrir le périphérique." -#: sys/oss4/oss4-sink.c:397 sys/oss4/oss4-source.c:388 msgid "Could not open audio device for playback." msgstr "Impossible d'ouvrir le périphérique audio pour la lecture." -#: sys/oss4/oss4-sink.c:406 sys/oss4/oss4-source.c:398 msgid "" "Could not open audio device for playback. This version of the Open Sound " "System is not supported by this element." @@ -383,19 +297,15 @@ msgstr "" "Impossible d'ouvrir le périphérique audio pour la lecture. Cette version de " "OSS (Open Sound System) n'est pas prise en charge par cet élément." -#: sys/oss4/oss4-sink.c:522 msgid "Playback is not supported by this audio device." msgstr "La lecture n'est pas prise en charge par ce périphérique audio." -#: sys/oss4/oss4-sink.c:529 msgid "Audio playback error." msgstr "Erreur de lecture audio." -#: sys/oss4/oss4-source.c:520 msgid "Recording is not supported by this audio device." msgstr "L'enregistrement n'est pas pris en charge par ce périphérique audio." -#: sys/oss4/oss4-source.c:527 msgid "Error recording from audio device." msgstr "Erreur lors de l'enregistrement à partir du périphérique audio." diff --git a/po/hu.po b/po/hu.po index 0891142b..d3c6d29c 100644 --- a/po/hu.po +++ b/po/hu.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.10.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-12 00:07+0100\n" +"POT-Creation-Date: 2009-05-16 01:36+0100\n" "PO-Revision-Date: 2009-04-20 02:16+0200\n" "Last-Translator: Gabor Kelemen \n" "Language-Team: Hungarian \n" @@ -16,71 +16,55 @@ msgstr "" "X-Generator: KBabel 1.11.4\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "Nem lehet címinformációkat olvasni a DVD-rÅ‘l." -#: ext/resindvd/resindvdsrc.c:358 #, c-format msgid "Failed to open DVD device '%s'." msgstr "Nem nyitható meg a DVD eszköz („%sâ€)." -#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "A PGC-alapú keresés beállítása meghiúsult." -#: ext/resindvd/rsnbasesrc.c:1659 msgid "Internal clock error." msgstr "BelsÅ‘ órahiba." -#: ext/resindvd/rsnbasesrc.c:1904 ext/resindvd/rsnbasesrc.c:1915 -#: gst/aiffparse/aiffparse.c:1265 msgid "Internal data flow error." msgstr "BelsÅ‘ adatfolyamhiba." -#: ext/sndfile/gstsfsink.c:277 ext/sndfile/gstsfsrc.c:345 msgid "No file name specified for writing." msgstr "Nincs megadva fájlnév az íráshoz." -#: ext/sndfile/gstsfsink.c:290 ext/sndfile/gstsfsrc.c:351 #, c-format msgid "Could not open file \"%s\" for writing." msgstr "A fájl („%sâ€) nem nyitható meg írásra." -#: ext/sndfile/gstsfsink.c:440 gst/nuvdemux/gstnuvdemux.c:735 msgid "Internal data stream error." msgstr "BelsÅ‘ adatfolyamhiba." -#: ext/sndfile/gstsfsink.c:494 ext/sndfile/gstsfsink.c:502 #, c-format msgid "Could not write to file \"%s\"." msgstr "Nem lehet írni a fájlba („%sâ€)." -#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Az eszköz („%sâ€) nem létezik." -#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Nem nyitható meg az elÅ‘téteszköz („%sâ€)." -#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Nem kérhetÅ‘k le a beállítások az elÅ‘téteszköztÅ‘l („%sâ€)." -#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "A fájl („%sâ€) nem nyitható meg olvasásra." -#: sys/oss4/oss4-mixer.c:302 msgid "Could not open audio device for mixer control handling." msgstr "A hangeszköz nem nyitható meg a keverÅ‘ vezérlÅ‘inek kezeléséhez." -#: sys/oss4/oss4-mixer.c:316 msgid "" "Could not open audio device for mixer control handling. This version of the " "Open Sound System is not supported by this element." @@ -88,271 +72,204 @@ msgstr "" "A hangeszköz nem nyitható meg a keverÅ‘ vezérlÅ‘inek kezeléséhez. A Nyílt " "hangrendszer ezen verzióját nem támogatja az elem." -#: sys/oss4/oss4-mixer.c:720 msgid "Fast" msgstr "Gyors" -#: sys/oss4/oss4-mixer.c:721 msgid "Low" msgstr "Alacsony" -#: sys/oss4/oss4-mixer.c:722 msgid "Medium" msgstr "Közepes" -#: sys/oss4/oss4-mixer.c:723 msgid "High" msgstr "Magas" -#: sys/oss4/oss4-mixer.c:724 msgid "Very high" msgstr "Nagyon magas" -#: sys/oss4/oss4-mixer.c:725 msgid "Production" msgstr "Előállítás" -#: sys/oss4/oss4-mixer.c:726 msgid "Off" msgstr "Ki" -#: sys/oss4/oss4-mixer.c:727 msgid "On" msgstr "Be" -#: sys/oss4/oss4-mixer.c:728 msgid "Stereo" msgstr "Sztereó" -#: sys/oss4/oss4-mixer.c:729 msgid "Surround sound" msgstr "Térhatású hang" -#: sys/oss4/oss4-mixer.c:730 sys/oss4/oss4-mixer.c:805 msgid "Input mix" msgstr "Bemeneti keverÅ‘" -#: sys/oss4/oss4-mixer.c:731 sys/oss4/oss4-mixer.c:800 msgid "Front" msgstr "Elöl" -#: sys/oss4/oss4-mixer.c:732 sys/oss4/oss4-mixer.c:801 msgid "Rear" msgstr "Hátul" -#: sys/oss4/oss4-mixer.c:733 sys/oss4/oss4-mixer.c:802 msgid "Side" msgstr "Oldalt" -#: sys/oss4/oss4-mixer.c:734 sys/oss4/oss4-mixer.c:803 msgid "Center / LFE" msgstr "Közép/LFE" -#: sys/oss4/oss4-mixer.c:735 sys/oss4/oss4-mixer.c:794 msgid "Microphone" msgstr "Mikrofon" -#: sys/oss4/oss4-mixer.c:736 sys/oss4/oss4-mixer.c:795 msgid "Front panel microphone" msgstr "ElÅ‘lapi mikrofon" -#: sys/oss4/oss4-mixer.c:737 msgid "Input" msgstr "Bemenet" -#: sys/oss4/oss4-mixer.c:738 sys/oss4/oss4-mixer.c:796 msgid "Line-in" msgstr "Vonalbemenet" -#: sys/oss4/oss4-mixer.c:739 msgid "PCM 1" msgstr "PCM 1" -#: sys/oss4/oss4-mixer.c:740 msgid "PCM 2" msgstr "PCM 2" -#: sys/oss4/oss4-mixer.c:741 msgid "PCM 3" msgstr "PCM 3" -#: sys/oss4/oss4-mixer.c:742 msgid "PCM 4" msgstr "PCM 4" -#: sys/oss4/oss4-mixer.c:754 msgid "Green connector" msgstr "Zöld csatlakozó" -#: sys/oss4/oss4-mixer.c:755 msgid "Green front panel connector" msgstr "Zöld elÅ‘lapi csatlakozó" -#: sys/oss4/oss4-mixer.c:756 msgid "Pink connector" msgstr "Rózsaszín csatlakozó" -#: sys/oss4/oss4-mixer.c:757 msgid "Pink front panel connector" msgstr "Rózsaszín elÅ‘lapi csatlakozó" -#: sys/oss4/oss4-mixer.c:758 msgid "Blue connector" msgstr "Kék csatlakozó" -#: sys/oss4/oss4-mixer.c:759 msgid "Blue front panel connector" msgstr "Kék elÅ‘lapi csatlakozó" -#: sys/oss4/oss4-mixer.c:760 msgid "Orange connector" msgstr "Narancs csatlakozó" -#: sys/oss4/oss4-mixer.c:761 msgid "Orange front panel connector" msgstr "Narancs elÅ‘lapi csatlakozó" -#: sys/oss4/oss4-mixer.c:762 msgid "Black connector" msgstr "Fekete csatlakozó" -#: sys/oss4/oss4-mixer.c:763 msgid "Black front panel connector" msgstr "Fekete elÅ‘lapi csatlakozó" -#: sys/oss4/oss4-mixer.c:764 msgid "Gray connector" msgstr "Szürke csatlakozó" -#: sys/oss4/oss4-mixer.c:765 msgid "Gray front panel connector" msgstr "Szürke elÅ‘lapi csatlakozó" -#: sys/oss4/oss4-mixer.c:766 msgid "White connector" msgstr "Fehér csatlakozó" -#: sys/oss4/oss4-mixer.c:767 msgid "White front panel connector" msgstr "Fehér elÅ‘lapi csatlakozó" -#: sys/oss4/oss4-mixer.c:768 msgid "Red connector" msgstr "Vörös csatlakozó" -#: sys/oss4/oss4-mixer.c:769 msgid "Red front panel connector" msgstr "Vörös elÅ‘lapi csatlakozó" -#: sys/oss4/oss4-mixer.c:770 msgid "Yellow connector" msgstr "Sárga csatlakozó" -#: sys/oss4/oss4-mixer.c:771 msgid "Yellow front panel connector" msgstr "Sárga elÅ‘lapi csatlakozó" -#: sys/oss4/oss4-mixer.c:774 msgid "Green connector function" msgstr "Zöld csatlakozó funkciója" -#: sys/oss4/oss4-mixer.c:775 msgid "Green front panel connector function" msgstr "Zöld elÅ‘lapi csatlakozó funkciója" -#: sys/oss4/oss4-mixer.c:776 msgid "Pink connector function" msgstr "Rózsaszín csatlakozó funkciója" -#: sys/oss4/oss4-mixer.c:777 msgid "Pink front panel connector function" msgstr "Rózsaszín elÅ‘lapi csatlakozó funkciója" -#: sys/oss4/oss4-mixer.c:778 msgid "Blue connector function" msgstr "Kék csatlakozó funkciója" -#: sys/oss4/oss4-mixer.c:779 msgid "Blue front panel connector function" msgstr "Kék elÅ‘lapi csatlakozó funkciója" -#: sys/oss4/oss4-mixer.c:780 msgid "Orange connector function" msgstr "Narancs csatlakozó funkciója" -#: sys/oss4/oss4-mixer.c:781 msgid "Orange front panel connector function" msgstr "Narancs elÅ‘lapi csatlakozó funkciója" -#: sys/oss4/oss4-mixer.c:782 msgid "Black connector function" msgstr "Fekete csatlakozó funkciója" -#: sys/oss4/oss4-mixer.c:783 msgid "Black front panel connector function" msgstr "Fekete elÅ‘lapi csatlakozó funkciója" -#: sys/oss4/oss4-mixer.c:784 msgid "Gray connector function" msgstr "Szürke csatlakozó funkciója" -#: sys/oss4/oss4-mixer.c:785 msgid "Gray front panel connector function" msgstr "Szürke elÅ‘lapi csatlakozó funkciója" -#: sys/oss4/oss4-mixer.c:786 msgid "White connector function" msgstr "Fehér csatlakozó funkciója" -#: sys/oss4/oss4-mixer.c:787 msgid "White front panel connector function" msgstr "Fehér elÅ‘lapi csatlakozó funkciója" -#: sys/oss4/oss4-mixer.c:788 msgid "Red connector function" msgstr "Vörös csatlakozó funkciója" -#: sys/oss4/oss4-mixer.c:789 msgid "Red front panel connector function" msgstr "Vörös elÅ‘lapi csatlakozó funkciója" -#: sys/oss4/oss4-mixer.c:790 msgid "Yellow connector function" msgstr "Sárga csatlakozó funkciója" -#: sys/oss4/oss4-mixer.c:791 msgid "Yellow front panel connector function" msgstr "Sárga elÅ‘lapi csatlakozó funkciója" -#: sys/oss4/oss4-mixer.c:797 msgid "Front panel line-in" msgstr "ElÅ‘lapi vonalbemenet" -#: sys/oss4/oss4-mixer.c:798 msgid "Headphones" msgstr "Fülhallgatók" -#: sys/oss4/oss4-mixer.c:799 msgid "Front panel headphones" msgstr "ElÅ‘lapi fülhallgató" -#: sys/oss4/oss4-mixer.c:804 msgid "PCM" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:846 msgid "Virtual mixer input" msgstr "Virtuális keverÅ‘bemenet" -#: sys/oss4/oss4-mixer.c:848 msgid "Virtual mixer output" msgstr "Virtuális keverÅ‘kimenet" -#: sys/oss4/oss4-mixer.c:850 msgid "Virtual mixer channel configuration" msgstr "Virtuális keverÅ‘ csatornabeállításai" -#: sys/oss4/oss4-sink.c:376 sys/oss4/oss4-source.c:367 msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -360,7 +277,6 @@ msgstr "" "Nem nyitható meg hangeszköz a lejátszáshoz. Az eszközt másik alkalmazás " "használja." -#: sys/oss4/oss4-sink.c:386 sys/oss4/oss4-source.c:377 msgid "" "Could not open audio device for playback. You don't have permission to open " "the device." @@ -368,11 +284,9 @@ msgstr "" "Nem nyitható meg hangeszköz a lejátszáshoz. Nincs jogosultsága az eszköz " "megnyitására." -#: sys/oss4/oss4-sink.c:397 sys/oss4/oss4-source.c:388 msgid "Could not open audio device for playback." msgstr "Nem nyitható meg hangeszköz a lejátszáshoz." -#: sys/oss4/oss4-sink.c:406 sys/oss4/oss4-source.c:398 msgid "" "Could not open audio device for playback. This version of the Open Sound " "System is not supported by this element." @@ -380,18 +294,14 @@ msgstr "" "Nem nyitható meg hangeszköz a lejátszáshoz. A Nyílt hangrendszer ezen " "verzióját nem támogatja az elem." -#: sys/oss4/oss4-sink.c:522 msgid "Playback is not supported by this audio device." msgstr "A hangeszköz nem támogatja a lejátszást." -#: sys/oss4/oss4-sink.c:529 msgid "Audio playback error." msgstr "Hanglejátszási hiba." -#: sys/oss4/oss4-source.c:520 msgid "Recording is not supported by this audio device." msgstr "A hangeszköz nem támogatja a felvételt." -#: sys/oss4/oss4-source.c:527 msgid "Error recording from audio device." msgstr "Hiba a hangeszközrÅ‘l való felvételkor." diff --git a/po/id.po b/po/id.po index 35d56758..b21503a5 100644 --- a/po/id.po +++ b/po/id.po @@ -4,81 +4,65 @@ # msgid "" msgstr "" -"Project-Id-Version: gst-plugins-bad 0.10.10.2\n" +"Project-Id-Version: gst-plugins-bad 0.10.11.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-12 00:07+0100\n" -"PO-Revision-Date: 2009-03-10 22:23+0700\n" +"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"PO-Revision-Date: 2009-05-14 21:41+0700\n" "Last-Translator: Andhika Padmawan \n" "Language-Team: Indonesian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "Tak dapat membaca informasi judul untuk DVD." -#: ext/resindvd/resindvdsrc.c:358 #, c-format msgid "Failed to open DVD device '%s'." msgstr "Gagal membuka divais DVD '%s'." -#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "Gagal mengatur pencarian berbasis PGC." -#: ext/resindvd/rsnbasesrc.c:1659 msgid "Internal clock error." msgstr "Galat jam internal." -#: ext/resindvd/rsnbasesrc.c:1904 ext/resindvd/rsnbasesrc.c:1915 -#: gst/aiffparse/aiffparse.c:1265 msgid "Internal data flow error." msgstr "Galat arus data internal." -#: ext/sndfile/gstsfsink.c:277 ext/sndfile/gstsfsrc.c:345 msgid "No file name specified for writing." msgstr "Tak ada nama berkas yang ditentukan untuk ditulis." -#: ext/sndfile/gstsfsink.c:290 ext/sndfile/gstsfsrc.c:351 #, c-format msgid "Could not open file \"%s\" for writing." msgstr "Tak dapat membuka berkas \"%s\" untuk ditulis." -#: ext/sndfile/gstsfsink.c:440 gst/nuvdemux/gstnuvdemux.c:735 msgid "Internal data stream error." msgstr "Galat arus data internal." -#: ext/sndfile/gstsfsink.c:494 ext/sndfile/gstsfsink.c:502 #, c-format msgid "Could not write to file \"%s\"." msgstr "Tak dapat menulis ke berkas \"%s\"." -#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Divais \"%s\" tak ada." -#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Tak dapat membuka divais ujung-depan \"%s\"." -#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Tak dapat mendapatkan pengaturan dari divais ujung-depan \"%s\"." -#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Tak dapat membuka berkas \"%s\" untuk dibaca." -#: sys/oss4/oss4-mixer.c:302 msgid "Could not open audio device for mixer control handling." msgstr "Tak dapat membuka divais audio untuk pengendalian kontrol mixer." -#: sys/oss4/oss4-mixer.c:316 msgid "" "Could not open audio device for mixer control handling. This version of the " "Open Sound System is not supported by this element." @@ -86,271 +70,204 @@ msgstr "" "Tak dapat membuka divais audio untuk pengendalian kontrol mixer. Versi Open " "Sound System ini tak didukung oleh elemen ini." -#: sys/oss4/oss4-mixer.c:720 msgid "Fast" msgstr "Cepat" -#: sys/oss4/oss4-mixer.c:721 msgid "Low" msgstr "Rendah" -#: sys/oss4/oss4-mixer.c:722 msgid "Medium" msgstr "Sedang" -#: sys/oss4/oss4-mixer.c:723 msgid "High" msgstr "Tinggi" -#: sys/oss4/oss4-mixer.c:724 msgid "Very high" msgstr "Sangat tinggi" -#: sys/oss4/oss4-mixer.c:725 msgid "Production" msgstr "Produksi" -#: sys/oss4/oss4-mixer.c:726 msgid "Off" msgstr "Mati" -#: sys/oss4/oss4-mixer.c:727 msgid "On" msgstr "Hidup" -#: sys/oss4/oss4-mixer.c:728 msgid "Stereo" msgstr "Stereo" -#: sys/oss4/oss4-mixer.c:729 msgid "Surround sound" msgstr "Surround sound" -#: sys/oss4/oss4-mixer.c:730 sys/oss4/oss4-mixer.c:805 msgid "Input mix" msgstr "Mix masukan" -#: sys/oss4/oss4-mixer.c:731 sys/oss4/oss4-mixer.c:800 msgid "Front" msgstr "Depan" -#: sys/oss4/oss4-mixer.c:732 sys/oss4/oss4-mixer.c:801 msgid "Rear" msgstr "Belakang" -#: sys/oss4/oss4-mixer.c:733 sys/oss4/oss4-mixer.c:802 msgid "Side" msgstr "Samping" -#: sys/oss4/oss4-mixer.c:734 sys/oss4/oss4-mixer.c:803 msgid "Center / LFE" msgstr "Tengah / LFE" -#: sys/oss4/oss4-mixer.c:735 sys/oss4/oss4-mixer.c:794 msgid "Microphone" msgstr "Mikrofon" -#: sys/oss4/oss4-mixer.c:736 sys/oss4/oss4-mixer.c:795 msgid "Front panel microphone" msgstr "Mikrofon panel depan" -#: sys/oss4/oss4-mixer.c:737 msgid "Input" msgstr "Masukan" -#: sys/oss4/oss4-mixer.c:738 sys/oss4/oss4-mixer.c:796 msgid "Line-in" msgstr "Jalur-masuk" -#: sys/oss4/oss4-mixer.c:739 msgid "PCM 1" msgstr "PCM 1" -#: sys/oss4/oss4-mixer.c:740 msgid "PCM 2" msgstr "PCM 2" -#: sys/oss4/oss4-mixer.c:741 msgid "PCM 3" msgstr "PCM 3" -#: sys/oss4/oss4-mixer.c:742 msgid "PCM 4" msgstr "PCM 4" -#: sys/oss4/oss4-mixer.c:754 msgid "Green connector" msgstr "Penyambung hijau" -#: sys/oss4/oss4-mixer.c:755 msgid "Green front panel connector" msgstr "Penyambung panel depan hijau" -#: sys/oss4/oss4-mixer.c:756 msgid "Pink connector" msgstr "Penyambung merah jambu" -#: sys/oss4/oss4-mixer.c:757 msgid "Pink front panel connector" msgstr "Penyambung panel depan merah jambu" -#: sys/oss4/oss4-mixer.c:758 msgid "Blue connector" msgstr "Penyambung biru" -#: sys/oss4/oss4-mixer.c:759 msgid "Blue front panel connector" msgstr "Penyambung panel depan biru" -#: sys/oss4/oss4-mixer.c:760 msgid "Orange connector" msgstr "Penyambung jingga" -#: sys/oss4/oss4-mixer.c:761 msgid "Orange front panel connector" msgstr "Penyambung panel depan jingga" -#: sys/oss4/oss4-mixer.c:762 msgid "Black connector" msgstr "Penyambung hitam" -#: sys/oss4/oss4-mixer.c:763 msgid "Black front panel connector" msgstr "Penyambung panel depan hitam" -#: sys/oss4/oss4-mixer.c:764 msgid "Gray connector" msgstr "Penyambung abu-abu" -#: sys/oss4/oss4-mixer.c:765 msgid "Gray front panel connector" msgstr "Penyambung panel depan abu-abu" -#: sys/oss4/oss4-mixer.c:766 msgid "White connector" msgstr "Penyambung putih" -#: sys/oss4/oss4-mixer.c:767 msgid "White front panel connector" msgstr "Penyambung panel depan putih" -#: sys/oss4/oss4-mixer.c:768 msgid "Red connector" msgstr "Penyambung merah" -#: sys/oss4/oss4-mixer.c:769 msgid "Red front panel connector" msgstr "Penyambung panel depan merah" -#: sys/oss4/oss4-mixer.c:770 msgid "Yellow connector" msgstr "Penyambung kuning" -#: sys/oss4/oss4-mixer.c:771 msgid "Yellow front panel connector" msgstr "Penyambung panel depan kuning" -#: sys/oss4/oss4-mixer.c:774 msgid "Green connector function" msgstr "Fungsi penyambung hijau" -#: sys/oss4/oss4-mixer.c:775 msgid "Green front panel connector function" msgstr "Fungsi penyambung panel depan hijau" -#: sys/oss4/oss4-mixer.c:776 msgid "Pink connector function" msgstr "Fungsi penyambung merah jambu" -#: sys/oss4/oss4-mixer.c:777 msgid "Pink front panel connector function" msgstr "Fungsi penyambung panel depan merah jambu" -#: sys/oss4/oss4-mixer.c:778 msgid "Blue connector function" msgstr "Fungsi penyambung biru" -#: sys/oss4/oss4-mixer.c:779 msgid "Blue front panel connector function" msgstr "Fungsi penyambung panel depan biru" -#: sys/oss4/oss4-mixer.c:780 msgid "Orange connector function" msgstr "Fungsi penyambung jingga" -#: sys/oss4/oss4-mixer.c:781 msgid "Orange front panel connector function" msgstr "Fungsi penyambung panel depan jingga" -#: sys/oss4/oss4-mixer.c:782 msgid "Black connector function" msgstr "Fungsi penyambung hitam" -#: sys/oss4/oss4-mixer.c:783 msgid "Black front panel connector function" msgstr "Fungsi penyambung panel depan hitam" -#: sys/oss4/oss4-mixer.c:784 msgid "Gray connector function" msgstr "Fungsi penyambung abu-abu" -#: sys/oss4/oss4-mixer.c:785 msgid "Gray front panel connector function" msgstr "Fungsi penyambung panel depan abu-abu" -#: sys/oss4/oss4-mixer.c:786 msgid "White connector function" msgstr "Fungsi penyambung putih" -#: sys/oss4/oss4-mixer.c:787 msgid "White front panel connector function" msgstr "Fungsi penyambung panel depan putih" -#: sys/oss4/oss4-mixer.c:788 msgid "Red connector function" msgstr "Fungsi penyambung merah" -#: sys/oss4/oss4-mixer.c:789 msgid "Red front panel connector function" msgstr "Fungsi penyambung panel depan merah" -#: sys/oss4/oss4-mixer.c:790 msgid "Yellow connector function" msgstr "Fungsi penyambung kuning" -#: sys/oss4/oss4-mixer.c:791 msgid "Yellow front panel connector function" msgstr "Fungsi penyambung panel depan kuning" -#: sys/oss4/oss4-mixer.c:797 msgid "Front panel line-in" msgstr "Jalur-masuk panel depan" -#: sys/oss4/oss4-mixer.c:798 msgid "Headphones" msgstr "Headphone" -#: sys/oss4/oss4-mixer.c:799 msgid "Front panel headphones" msgstr "Headphone panel depan" -#: sys/oss4/oss4-mixer.c:804 msgid "PCM" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:846 msgid "Virtual mixer input" msgstr "Masukan mixer virtual" -#: sys/oss4/oss4-mixer.c:848 msgid "Virtual mixer output" msgstr "Keluaran mixer virtual" -#: sys/oss4/oss4-mixer.c:850 msgid "Virtual mixer channel configuration" msgstr "Konfigurasi kanal mixer virtual" -#: sys/oss4/oss4-sink.c:376 sys/oss4/oss4-source.c:367 msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -358,7 +275,6 @@ msgstr "" "Tak dapat membuka divais audio untuk putar kembali. Divais sedang digunakan " "oleh aplikasi lain." -#: sys/oss4/oss4-sink.c:386 sys/oss4/oss4-source.c:377 msgid "" "Could not open audio device for playback. You don't have permission to open " "the device." @@ -366,11 +282,9 @@ msgstr "" "Tak dapat membuka divais audio untuk putar kembali. Anda tak memiliki hak " "akses untuk membuka divais." -#: sys/oss4/oss4-sink.c:397 sys/oss4/oss4-source.c:388 msgid "Could not open audio device for playback." msgstr "Tak dapat membuka divais audio untuk putar kembali." -#: sys/oss4/oss4-sink.c:406 sys/oss4/oss4-source.c:398 msgid "" "Could not open audio device for playback. This version of the Open Sound " "System is not supported by this element." @@ -378,19 +292,15 @@ msgstr "" "Tak dapat membuka divais audio untuk putar kembali. Versi Open Sound System " "ini tak didukung oleh elemen ini." -#: sys/oss4/oss4-sink.c:522 msgid "Playback is not supported by this audio device." msgstr "Putar kembali tak didukung oleh divais audio ini." -#: sys/oss4/oss4-sink.c:529 msgid "Audio playback error." msgstr "Putar kembali audio galat." -#: sys/oss4/oss4-source.c:520 msgid "Recording is not supported by this audio device." msgstr "Perekaman tak didukung oleh divais audio ini." -#: sys/oss4/oss4-source.c:527 msgid "Error recording from audio device." msgstr "Galat ketika merekam dari divais audio." diff --git a/po/it.po b/po/it.po index 70c580ea..08b34f97 100644 --- a/po/it.po +++ b/po/it.po @@ -1,87 +1,71 @@ # Italian translation for gst-plugins-bad package of GStreamer project. # Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 GStreamer core team # This file is distributed under the same license as the gst-plugins-bad package. -# Luca Ferretti , 2007-2009. # +# Luca Ferretti , 2007, 2008, 2009. msgid "" msgstr "" -"Project-Id-Version: gst-plugins-bad 0.10.9.3\n" +"Project-Id-Version: gst-plugins-bad 0.10.11.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-12 00:07+0100\n" -"PO-Revision-Date: 2009-01-14 10:51+0100\n" +"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"PO-Revision-Date: 2009-05-13 09:14+0200\n" "Last-Translator: Luca Ferretti \n" "Language-Team: Italian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." -msgstr "Impossibile leggere le informazioni sul titolo per il DVD." +msgstr "Impossibile leggere le informazioni del titolo per il DVD." -#: ext/resindvd/resindvdsrc.c:358 #, c-format msgid "Failed to open DVD device '%s'." msgstr "Apertura del device DVD «%s» non riuscita." -#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "Impostazione del posizionamento basato su PGC non riuscita" -#: ext/resindvd/rsnbasesrc.c:1659 msgid "Internal clock error." msgstr "Errore interno del clock." -#: ext/resindvd/rsnbasesrc.c:1904 ext/resindvd/rsnbasesrc.c:1915 -#: gst/aiffparse/aiffparse.c:1265 msgid "Internal data flow error." msgstr "Errore interno nel flusso di dati." -#: ext/sndfile/gstsfsink.c:277 ext/sndfile/gstsfsrc.c:345 msgid "No file name specified for writing." msgstr "Nessun nome di file specificato per la scrittura." -#: ext/sndfile/gstsfsink.c:290 ext/sndfile/gstsfsrc.c:351 #, c-format msgid "Could not open file \"%s\" for writing." msgstr "Impossibile aprire il file «%s» in scrittura." -#: ext/sndfile/gstsfsink.c:440 gst/nuvdemux/gstnuvdemux.c:735 msgid "Internal data stream error." msgstr "Errore interno nello stream di dati." -#: ext/sndfile/gstsfsink.c:494 ext/sndfile/gstsfsink.c:502 #, c-format msgid "Could not write to file \"%s\"." msgstr "Impossibile scrivere sul file «%s»." -#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Il device «%s» non esiste." -#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Impossibile aprire il device frontend «%s»." -#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Impossibile ottenere le impostazioni dal device frontend «%s»." -#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Impossibile aprire il file «%s» in lettura." -#: sys/oss4/oss4-mixer.c:302 msgid "Could not open audio device for mixer control handling." msgstr "" "Impossibile aprire il device audio per la gestione della regolazione del " "mixer." -#: sys/oss4/oss4-mixer.c:316 msgid "" "Could not open audio device for mixer control handling. This version of the " "Open Sound System is not supported by this element." @@ -91,315 +75,241 @@ msgstr "" "elemento." # NdT: questo e i successivi non ho controllato che sono.... -#: sys/oss4/oss4-mixer.c:720 msgid "Fast" msgstr "Veloce" -#: sys/oss4/oss4-mixer.c:721 msgid "Low" msgstr "Lento" -#: sys/oss4/oss4-mixer.c:722 msgid "Medium" msgstr "Medio" -#: sys/oss4/oss4-mixer.c:723 msgid "High" msgstr "Alto" -#: sys/oss4/oss4-mixer.c:724 msgid "Very high" msgstr "Molto alto" -#: sys/oss4/oss4-mixer.c:725 msgid "Production" msgstr "Produzione" -#: sys/oss4/oss4-mixer.c:726 msgid "Off" msgstr "Spento" -#: sys/oss4/oss4-mixer.c:727 msgid "On" msgstr "Acceso" -#: sys/oss4/oss4-mixer.c:728 msgid "Stereo" msgstr "Stereo" -#: sys/oss4/oss4-mixer.c:729 msgid "Surround sound" msgstr "Suono surround" -#: sys/oss4/oss4-mixer.c:730 sys/oss4/oss4-mixer.c:805 msgid "Input mix" msgstr "Mix ingresso" -#: sys/oss4/oss4-mixer.c:731 sys/oss4/oss4-mixer.c:800 msgid "Front" msgstr "Fronte" -#: sys/oss4/oss4-mixer.c:732 sys/oss4/oss4-mixer.c:801 msgid "Rear" msgstr "Dietro" -#: sys/oss4/oss4-mixer.c:733 sys/oss4/oss4-mixer.c:802 msgid "Side" msgstr "Lato" # NdT: forse questo? --> http://en.wikipedia.org/wiki/Low-frequency_effect # # o forse Low Frequency Emitter -#: sys/oss4/oss4-mixer.c:734 sys/oss4/oss4-mixer.c:803 msgid "Center / LFE" msgstr "Centro / LFE" -#: sys/oss4/oss4-mixer.c:735 sys/oss4/oss4-mixer.c:794 msgid "Microphone" msgstr "Microfono" -#: sys/oss4/oss4-mixer.c:736 sys/oss4/oss4-mixer.c:795 msgid "Front panel microphone" msgstr "Microfono pannello frontale" -#: sys/oss4/oss4-mixer.c:737 msgid "Input" msgstr "Input" -#: sys/oss4/oss4-mixer.c:738 sys/oss4/oss4-mixer.c:796 msgid "Line-in" msgstr "Linea in" -#: sys/oss4/oss4-mixer.c:739 msgid "PCM 1" msgstr "PCM 1" -#: sys/oss4/oss4-mixer.c:740 msgid "PCM 2" msgstr "PCM 2" -#: sys/oss4/oss4-mixer.c:741 msgid "PCM 3" msgstr "PCM 3" -#: sys/oss4/oss4-mixer.c:742 msgid "PCM 4" msgstr "PCM 4" -#: sys/oss4/oss4-mixer.c:754 msgid "Green connector" msgstr "Connettore verde" -#: sys/oss4/oss4-mixer.c:755 msgid "Green front panel connector" msgstr "Connettore verde pannello frontale" -#: sys/oss4/oss4-mixer.c:756 msgid "Pink connector" msgstr "Connettore rosa" -#: sys/oss4/oss4-mixer.c:757 msgid "Pink front panel connector" msgstr "Connettore rosa pannello frontale" -#: sys/oss4/oss4-mixer.c:758 msgid "Blue connector" msgstr "Connettore blu" -#: sys/oss4/oss4-mixer.c:759 msgid "Blue front panel connector" msgstr "Connettore blu pannello frontale" -#: sys/oss4/oss4-mixer.c:760 msgid "Orange connector" msgstr "Connettore arancione" -#: sys/oss4/oss4-mixer.c:761 msgid "Orange front panel connector" msgstr "Connettore arancione pannello frontale" -#: sys/oss4/oss4-mixer.c:762 msgid "Black connector" msgstr "Connettore nero" -#: sys/oss4/oss4-mixer.c:763 msgid "Black front panel connector" msgstr "Connettore nero pannello frontale" -#: sys/oss4/oss4-mixer.c:764 msgid "Gray connector" msgstr "Connettore grigio" -#: sys/oss4/oss4-mixer.c:765 msgid "Gray front panel connector" msgstr "Connettore grigio pannello frontale" -#: sys/oss4/oss4-mixer.c:766 msgid "White connector" msgstr "Connettore bianco" -#: sys/oss4/oss4-mixer.c:767 msgid "White front panel connector" msgstr "Connettore bianco pannello frontale" -#: sys/oss4/oss4-mixer.c:768 msgid "Red connector" msgstr "Connettore rosso" -#: sys/oss4/oss4-mixer.c:769 msgid "Red front panel connector" msgstr "Connettore rosso pannello frontale" -#: sys/oss4/oss4-mixer.c:770 msgid "Yellow connector" msgstr "Connettore giallo" -#: sys/oss4/oss4-mixer.c:771 msgid "Yellow front panel connector" msgstr "Connettore giallo pannello frontale" -#: sys/oss4/oss4-mixer.c:774 msgid "Green connector function" msgstr "Funzione connettore verde" -#: sys/oss4/oss4-mixer.c:775 msgid "Green front panel connector function" msgstr "Funzione connettore verde pannello frontale" -#: sys/oss4/oss4-mixer.c:776 msgid "Pink connector function" msgstr "Funzione connettore rosa" -#: sys/oss4/oss4-mixer.c:777 msgid "Pink front panel connector function" msgstr "Funzione connettore rosa pannello frontale" -#: sys/oss4/oss4-mixer.c:778 msgid "Blue connector function" msgstr "Funzione connettore blu" -#: sys/oss4/oss4-mixer.c:779 msgid "Blue front panel connector function" msgstr "Funzione connettore blu pannello frontale" -#: sys/oss4/oss4-mixer.c:780 msgid "Orange connector function" msgstr "Funzione connettore arancione" -#: sys/oss4/oss4-mixer.c:781 msgid "Orange front panel connector function" msgstr "Funzione connettore arancione pannello frontale" -#: sys/oss4/oss4-mixer.c:782 msgid "Black connector function" msgstr "Funzione connettore nero" -#: sys/oss4/oss4-mixer.c:783 msgid "Black front panel connector function" msgstr "Funzione connettore nero pannello frontale" -#: sys/oss4/oss4-mixer.c:784 msgid "Gray connector function" msgstr "Funzione connettore grigio" -#: sys/oss4/oss4-mixer.c:785 msgid "Gray front panel connector function" msgstr "Funzione connettore grigio pannello frontale" -#: sys/oss4/oss4-mixer.c:786 msgid "White connector function" msgstr "Funzione connettore bianco" -#: sys/oss4/oss4-mixer.c:787 msgid "White front panel connector function" msgstr "Funzione connettore bianco pannello frontale" -#: sys/oss4/oss4-mixer.c:788 msgid "Red connector function" msgstr "Funzione connettore rosso" -#: sys/oss4/oss4-mixer.c:789 msgid "Red front panel connector function" msgstr "Funzione connettore rosso pannello frontale" -#: sys/oss4/oss4-mixer.c:790 msgid "Yellow connector function" msgstr "Funzione connettore giallo" -#: sys/oss4/oss4-mixer.c:791 msgid "Yellow front panel connector function" msgstr "Funzione connettore giallo pannello frontale" -#: sys/oss4/oss4-mixer.c:797 msgid "Front panel line-in" msgstr "Canale ingresso pannello frontale" -#: sys/oss4/oss4-mixer.c:798 msgid "Headphones" msgstr "Cuffie" -#: sys/oss4/oss4-mixer.c:799 msgid "Front panel headphones" msgstr "Cuffie pannello frontale" # http://it.wikipedia.org/wiki/Pulse-Code_Modulation -#: sys/oss4/oss4-mixer.c:804 msgid "PCM" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:846 msgid "Virtual mixer input" msgstr "Ingresso mixer virtuale" -#: sys/oss4/oss4-mixer.c:848 msgid "Virtual mixer output" msgstr "Uscita mixer virtuale" -#: sys/oss4/oss4-mixer.c:850 msgid "Virtual mixer channel configuration" msgstr "Configurazione canale mixer virtuale" -#: sys/oss4/oss4-sink.c:376 sys/oss4/oss4-source.c:367 msgid "" "Could not open audio device for playback. Device is being used by another " "application." msgstr "" -"Impossibile aprire il device audio in riproduzione. Il dispositivo è " +"Impossibile aprire il device audio per la riproduzione. Il dispositivo è " "attualmente usato da un'altra applicazione." -#: sys/oss4/oss4-sink.c:386 sys/oss4/oss4-source.c:377 msgid "" "Could not open audio device for playback. You don't have permission to open " "the device." msgstr "" -"Impossibile aprire il device audio in riproduzione. Permessi non sufficienti " -"per aprire il dispositivo." +"Impossibile aprire il device audio per la riproduzione. Permessi non " +"sufficienti per aprire il dispositivo." -#: sys/oss4/oss4-sink.c:397 sys/oss4/oss4-source.c:388 msgid "Could not open audio device for playback." -msgstr "Impossibile aprire il device audio in riproduzione." +msgstr "Impossibile aprire il device audio per la riproduzione." -#: sys/oss4/oss4-sink.c:406 sys/oss4/oss4-source.c:398 msgid "" "Could not open audio device for playback. This version of the Open Sound " "System is not supported by this element." msgstr "" -"Impossibile aprire il device audio in riproduzione. Questa versione di Open " -"Sound System non è supportata da questo elemento." +"Impossibile aprire il device audio per la riproduzione. Questa versione di " +"Open Sound System non è supportata da questo elemento." -#: sys/oss4/oss4-sink.c:522 msgid "Playback is not supported by this audio device." msgstr "Questo device audio non supporta la riproduzione." -#: sys/oss4/oss4-sink.c:529 msgid "Audio playback error." msgstr "Errore nel riprodurre l'audio." -#: sys/oss4/oss4-source.c:520 msgid "Recording is not supported by this audio device." msgstr "Questo dispositivo audio non supporta la registrazione." -#: sys/oss4/oss4-source.c:527 msgid "Error recording from audio device." msgstr "Errore nel registrare dal dispositivo audio." diff --git a/po/ky.po b/po/ky.po index d16fc5d3..426f8c6a 100644 --- a/po/ky.po +++ b/po/ky.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.5\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-12 00:07+0100\n" +"POT-Creation-Date: 2009-05-16 01:36+0100\n" "PO-Revision-Date: 2007-11-13 17:16+0600\n" "Last-Translator: Ilyas Bakirov \n" "Language-Team: Kirghiz \n" @@ -16,376 +16,286 @@ msgstr "" "X-Poedit-Language: Kyrgyz\n" "X-Poedit-Country: KYRGYZSTAN\n" -#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "" -#: ext/resindvd/resindvdsrc.c:358 #, fuzzy, c-format msgid "Failed to open DVD device '%s'." msgstr "Ðлдын \"%s\" жабдыкты ачалган жок." -#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "" -#: ext/resindvd/rsnbasesrc.c:1659 msgid "Internal clock error." msgstr "" -#: ext/resindvd/rsnbasesrc.c:1904 ext/resindvd/rsnbasesrc.c:1915 -#: gst/aiffparse/aiffparse.c:1265 msgid "Internal data flow error." msgstr "" -#: ext/sndfile/gstsfsink.c:277 ext/sndfile/gstsfsrc.c:345 msgid "No file name specified for writing." msgstr "" -#: ext/sndfile/gstsfsink.c:290 ext/sndfile/gstsfsrc.c:351 #, fuzzy, c-format msgid "Could not open file \"%s\" for writing." msgstr "\"%s\" файлы окууга ачылган жок." -#: ext/sndfile/gstsfsink.c:440 gst/nuvdemux/gstnuvdemux.c:735 msgid "Internal data stream error." msgstr "" -#: ext/sndfile/gstsfsink.c:494 ext/sndfile/gstsfsink.c:502 #, fuzzy, c-format msgid "Could not write to file \"%s\"." msgstr "Ðлдын \"%s\" жабдыкты ачалган жок." -#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "\"%s\" мындай жабдык жок." -#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Ðлдын \"%s\" жабдыкты ачалган жок." -#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Ðлдын \"%s\" жабдыктан ыраÑтоолор алынган жок." -#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "\"%s\" файлы окууга ачылган жок." -#: sys/oss4/oss4-mixer.c:302 #, fuzzy msgid "Could not open audio device for mixer control handling." msgstr "\"%s\" файлы окууга ачылган жок." -#: sys/oss4/oss4-mixer.c:316 msgid "" "Could not open audio device for mixer control handling. This version of the " "Open Sound System is not supported by this element." msgstr "" -#: sys/oss4/oss4-mixer.c:720 msgid "Fast" msgstr "" -#: sys/oss4/oss4-mixer.c:721 msgid "Low" msgstr "" -#: sys/oss4/oss4-mixer.c:722 msgid "Medium" msgstr "" -#: sys/oss4/oss4-mixer.c:723 msgid "High" msgstr "" -#: sys/oss4/oss4-mixer.c:724 msgid "Very high" msgstr "" -#: sys/oss4/oss4-mixer.c:725 msgid "Production" msgstr "" -#: sys/oss4/oss4-mixer.c:726 msgid "Off" msgstr "" -#: sys/oss4/oss4-mixer.c:727 msgid "On" msgstr "" -#: sys/oss4/oss4-mixer.c:728 msgid "Stereo" msgstr "" -#: sys/oss4/oss4-mixer.c:729 msgid "Surround sound" msgstr "" -#: sys/oss4/oss4-mixer.c:730 sys/oss4/oss4-mixer.c:805 msgid "Input mix" msgstr "" -#: sys/oss4/oss4-mixer.c:731 sys/oss4/oss4-mixer.c:800 msgid "Front" msgstr "" -#: sys/oss4/oss4-mixer.c:732 sys/oss4/oss4-mixer.c:801 msgid "Rear" msgstr "" -#: sys/oss4/oss4-mixer.c:733 sys/oss4/oss4-mixer.c:802 msgid "Side" msgstr "" -#: sys/oss4/oss4-mixer.c:734 sys/oss4/oss4-mixer.c:803 msgid "Center / LFE" msgstr "" -#: sys/oss4/oss4-mixer.c:735 sys/oss4/oss4-mixer.c:794 msgid "Microphone" msgstr "" -#: sys/oss4/oss4-mixer.c:736 sys/oss4/oss4-mixer.c:795 msgid "Front panel microphone" msgstr "" -#: sys/oss4/oss4-mixer.c:737 msgid "Input" msgstr "" -#: sys/oss4/oss4-mixer.c:738 sys/oss4/oss4-mixer.c:796 msgid "Line-in" msgstr "" -#: sys/oss4/oss4-mixer.c:739 msgid "PCM 1" msgstr "" -#: sys/oss4/oss4-mixer.c:740 msgid "PCM 2" msgstr "" -#: sys/oss4/oss4-mixer.c:741 msgid "PCM 3" msgstr "" -#: sys/oss4/oss4-mixer.c:742 msgid "PCM 4" msgstr "" -#: sys/oss4/oss4-mixer.c:754 msgid "Green connector" msgstr "" -#: sys/oss4/oss4-mixer.c:755 msgid "Green front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:756 msgid "Pink connector" msgstr "" -#: sys/oss4/oss4-mixer.c:757 msgid "Pink front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:758 msgid "Blue connector" msgstr "" -#: sys/oss4/oss4-mixer.c:759 msgid "Blue front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:760 msgid "Orange connector" msgstr "" -#: sys/oss4/oss4-mixer.c:761 msgid "Orange front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:762 msgid "Black connector" msgstr "" -#: sys/oss4/oss4-mixer.c:763 msgid "Black front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:764 msgid "Gray connector" msgstr "" -#: sys/oss4/oss4-mixer.c:765 msgid "Gray front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:766 msgid "White connector" msgstr "" -#: sys/oss4/oss4-mixer.c:767 msgid "White front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:768 msgid "Red connector" msgstr "" -#: sys/oss4/oss4-mixer.c:769 msgid "Red front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:770 msgid "Yellow connector" msgstr "" -#: sys/oss4/oss4-mixer.c:771 msgid "Yellow front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:774 msgid "Green connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:775 msgid "Green front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:776 msgid "Pink connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:777 msgid "Pink front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:778 msgid "Blue connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:779 msgid "Blue front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:780 msgid "Orange connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:781 msgid "Orange front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:782 msgid "Black connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:783 msgid "Black front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:784 msgid "Gray connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:785 msgid "Gray front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:786 msgid "White connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:787 msgid "White front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:788 msgid "Red connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:789 msgid "Red front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:790 msgid "Yellow connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:791 msgid "Yellow front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:797 msgid "Front panel line-in" msgstr "" -#: sys/oss4/oss4-mixer.c:798 msgid "Headphones" msgstr "" -#: sys/oss4/oss4-mixer.c:799 msgid "Front panel headphones" msgstr "" -#: sys/oss4/oss4-mixer.c:804 msgid "PCM" msgstr "" -#: sys/oss4/oss4-mixer.c:846 msgid "Virtual mixer input" msgstr "" -#: sys/oss4/oss4-mixer.c:848 msgid "Virtual mixer output" msgstr "" -#: sys/oss4/oss4-mixer.c:850 msgid "Virtual mixer channel configuration" msgstr "" -#: sys/oss4/oss4-sink.c:376 sys/oss4/oss4-source.c:367 msgid "" "Could not open audio device for playback. Device is being used by another " "application." msgstr "" -#: sys/oss4/oss4-sink.c:386 sys/oss4/oss4-source.c:377 msgid "" "Could not open audio device for playback. You don't have permission to open " "the device." msgstr "" -#: sys/oss4/oss4-sink.c:397 sys/oss4/oss4-source.c:388 #, fuzzy msgid "Could not open audio device for playback." msgstr "Ðлдын \"%s\" жабдыкты ачалган жок." -#: sys/oss4/oss4-sink.c:406 sys/oss4/oss4-source.c:398 msgid "" "Could not open audio device for playback. This version of the Open Sound " "System is not supported by this element." msgstr "" -#: sys/oss4/oss4-sink.c:522 msgid "Playback is not supported by this audio device." msgstr "" -#: sys/oss4/oss4-sink.c:529 msgid "Audio playback error." msgstr "" -#: sys/oss4/oss4-source.c:520 msgid "Recording is not supported by this audio device." msgstr "" -#: sys/oss4/oss4-source.c:527 msgid "Error recording from audio device." msgstr "" diff --git a/po/lt.po b/po/lt.po index dd4ce9f7..54d08c1f 100644 --- a/po/lt.po +++ b/po/lt.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad-0.10.6.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-12 00:07+0100\n" +"POT-Creation-Date: 2009-05-16 01:36+0100\n" "PO-Revision-Date: 2008-05-14 02:13+0300\n" "Last-Translator: Gintautas Miliauskas \n" "Language-Team: Lithuanian \n" @@ -17,379 +17,289 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%" "100<10 || n%100>=20) ? 1 : 2);\n" -#: ext/resindvd/resindvdsrc.c:352 #, fuzzy msgid "Could not read title information for DVD." msgstr "Nepavyko raÅ¡yti į failÄ… „%s“." -#: ext/resindvd/resindvdsrc.c:358 #, fuzzy, c-format msgid "Failed to open DVD device '%s'." msgstr "Nepavyko atverti iÅ¡orinÄ—s pusÄ—s įrenginio „%s“." -#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "" -#: ext/resindvd/rsnbasesrc.c:1659 #, fuzzy msgid "Internal clock error." msgstr "VidinÄ— duomenų srauto klaida." -#: ext/resindvd/rsnbasesrc.c:1904 ext/resindvd/rsnbasesrc.c:1915 -#: gst/aiffparse/aiffparse.c:1265 #, fuzzy msgid "Internal data flow error." msgstr "VidinÄ— duomenų srauto klaida." -#: ext/sndfile/gstsfsink.c:277 ext/sndfile/gstsfsrc.c:345 msgid "No file name specified for writing." msgstr "Nenurodytas failo raÅ¡ymui pavadinimas." -#: ext/sndfile/gstsfsink.c:290 ext/sndfile/gstsfsrc.c:351 #, c-format msgid "Could not open file \"%s\" for writing." msgstr "Nepavyko atverti failo „%s“ raÅ¡ymui." -#: ext/sndfile/gstsfsink.c:440 gst/nuvdemux/gstnuvdemux.c:735 msgid "Internal data stream error." msgstr "VidinÄ— duomenų srauto klaida." -#: ext/sndfile/gstsfsink.c:494 ext/sndfile/gstsfsink.c:502 #, c-format msgid "Could not write to file \"%s\"." msgstr "Nepavyko raÅ¡yti į failÄ… „%s“." -#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Ä®renginys „%s“ neegzistuoja." -#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Nepavyko atverti iÅ¡orinÄ—s pusÄ—s įrenginio „%s“." -#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Nepavyko gauti nustatymų iÅ¡ iÅ¡orinÄ—s pusÄ—s įrenginio „%s“." -#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Nepavyko atverti failo „%s“ skaitymui." -#: sys/oss4/oss4-mixer.c:302 #, fuzzy msgid "Could not open audio device for mixer control handling." msgstr "Nepavyko atverti failo „%s“ skaitymui." -#: sys/oss4/oss4-mixer.c:316 msgid "" "Could not open audio device for mixer control handling. This version of the " "Open Sound System is not supported by this element." msgstr "" -#: sys/oss4/oss4-mixer.c:720 msgid "Fast" msgstr "" -#: sys/oss4/oss4-mixer.c:721 msgid "Low" msgstr "" -#: sys/oss4/oss4-mixer.c:722 msgid "Medium" msgstr "" -#: sys/oss4/oss4-mixer.c:723 msgid "High" msgstr "" -#: sys/oss4/oss4-mixer.c:724 msgid "Very high" msgstr "" -#: sys/oss4/oss4-mixer.c:725 msgid "Production" msgstr "" -#: sys/oss4/oss4-mixer.c:726 msgid "Off" msgstr "" -#: sys/oss4/oss4-mixer.c:727 msgid "On" msgstr "" -#: sys/oss4/oss4-mixer.c:728 msgid "Stereo" msgstr "" -#: sys/oss4/oss4-mixer.c:729 msgid "Surround sound" msgstr "" -#: sys/oss4/oss4-mixer.c:730 sys/oss4/oss4-mixer.c:805 msgid "Input mix" msgstr "" -#: sys/oss4/oss4-mixer.c:731 sys/oss4/oss4-mixer.c:800 msgid "Front" msgstr "" -#: sys/oss4/oss4-mixer.c:732 sys/oss4/oss4-mixer.c:801 msgid "Rear" msgstr "" -#: sys/oss4/oss4-mixer.c:733 sys/oss4/oss4-mixer.c:802 msgid "Side" msgstr "" -#: sys/oss4/oss4-mixer.c:734 sys/oss4/oss4-mixer.c:803 msgid "Center / LFE" msgstr "" -#: sys/oss4/oss4-mixer.c:735 sys/oss4/oss4-mixer.c:794 msgid "Microphone" msgstr "" -#: sys/oss4/oss4-mixer.c:736 sys/oss4/oss4-mixer.c:795 msgid "Front panel microphone" msgstr "" -#: sys/oss4/oss4-mixer.c:737 msgid "Input" msgstr "" -#: sys/oss4/oss4-mixer.c:738 sys/oss4/oss4-mixer.c:796 msgid "Line-in" msgstr "" -#: sys/oss4/oss4-mixer.c:739 msgid "PCM 1" msgstr "" -#: sys/oss4/oss4-mixer.c:740 msgid "PCM 2" msgstr "" -#: sys/oss4/oss4-mixer.c:741 msgid "PCM 3" msgstr "" -#: sys/oss4/oss4-mixer.c:742 msgid "PCM 4" msgstr "" -#: sys/oss4/oss4-mixer.c:754 msgid "Green connector" msgstr "" -#: sys/oss4/oss4-mixer.c:755 msgid "Green front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:756 msgid "Pink connector" msgstr "" -#: sys/oss4/oss4-mixer.c:757 msgid "Pink front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:758 msgid "Blue connector" msgstr "" -#: sys/oss4/oss4-mixer.c:759 msgid "Blue front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:760 msgid "Orange connector" msgstr "" -#: sys/oss4/oss4-mixer.c:761 msgid "Orange front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:762 msgid "Black connector" msgstr "" -#: sys/oss4/oss4-mixer.c:763 msgid "Black front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:764 msgid "Gray connector" msgstr "" -#: sys/oss4/oss4-mixer.c:765 msgid "Gray front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:766 msgid "White connector" msgstr "" -#: sys/oss4/oss4-mixer.c:767 msgid "White front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:768 msgid "Red connector" msgstr "" -#: sys/oss4/oss4-mixer.c:769 msgid "Red front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:770 msgid "Yellow connector" msgstr "" -#: sys/oss4/oss4-mixer.c:771 msgid "Yellow front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:774 msgid "Green connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:775 msgid "Green front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:776 msgid "Pink connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:777 msgid "Pink front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:778 msgid "Blue connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:779 msgid "Blue front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:780 msgid "Orange connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:781 msgid "Orange front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:782 msgid "Black connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:783 msgid "Black front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:784 msgid "Gray connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:785 msgid "Gray front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:786 msgid "White connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:787 msgid "White front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:788 msgid "Red connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:789 msgid "Red front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:790 msgid "Yellow connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:791 msgid "Yellow front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:797 msgid "Front panel line-in" msgstr "" -#: sys/oss4/oss4-mixer.c:798 msgid "Headphones" msgstr "" -#: sys/oss4/oss4-mixer.c:799 msgid "Front panel headphones" msgstr "" -#: sys/oss4/oss4-mixer.c:804 msgid "PCM" msgstr "" -#: sys/oss4/oss4-mixer.c:846 msgid "Virtual mixer input" msgstr "" -#: sys/oss4/oss4-mixer.c:848 msgid "Virtual mixer output" msgstr "" -#: sys/oss4/oss4-mixer.c:850 msgid "Virtual mixer channel configuration" msgstr "" -#: sys/oss4/oss4-sink.c:376 sys/oss4/oss4-source.c:367 msgid "" "Could not open audio device for playback. Device is being used by another " "application." msgstr "" -#: sys/oss4/oss4-sink.c:386 sys/oss4/oss4-source.c:377 msgid "" "Could not open audio device for playback. You don't have permission to open " "the device." msgstr "" -#: sys/oss4/oss4-sink.c:397 sys/oss4/oss4-source.c:388 #, fuzzy msgid "Could not open audio device for playback." msgstr "Nepavyko atverti iÅ¡orinÄ—s pusÄ—s įrenginio „%s“." -#: sys/oss4/oss4-sink.c:406 sys/oss4/oss4-source.c:398 msgid "" "Could not open audio device for playback. This version of the Open Sound " "System is not supported by this element." msgstr "" -#: sys/oss4/oss4-sink.c:522 msgid "Playback is not supported by this audio device." msgstr "" -#: sys/oss4/oss4-sink.c:529 msgid "Audio playback error." msgstr "" -#: sys/oss4/oss4-source.c:520 msgid "Recording is not supported by this audio device." msgstr "" -#: sys/oss4/oss4-source.c:527 msgid "Error recording from audio device." msgstr "" diff --git a/po/mt.po b/po/mt.po index 2741ea9d..3bbe3944 100644 --- a/po/mt.po +++ b/po/mt.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad-0.10.8.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-12 00:07+0100\n" +"POT-Creation-Date: 2009-05-16 01:36+0100\n" "PO-Revision-Date: 2008-10-26 20:27+0100\n" "Last-Translator: Michel Bugeja \n" "Language-Team: Maltese \n" @@ -17,71 +17,55 @@ msgstr "" "X-Poedit-SourceCharset: utf-8\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "Ma stajtx naqra informazzjoni fuq it-titlu tad-DVD." -#: ext/resindvd/resindvdsrc.c:358 #, c-format msgid "Failed to open DVD device '%s'." msgstr "Problema biex niftaħ apparat tad-DVD '%s'." -#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "" -#: ext/resindvd/rsnbasesrc.c:1659 msgid "Internal clock error." msgstr "Internal clock error." -#: ext/resindvd/rsnbasesrc.c:1904 ext/resindvd/rsnbasesrc.c:1915 -#: gst/aiffparse/aiffparse.c:1265 msgid "Internal data flow error." msgstr "Internal data flow error." -#: ext/sndfile/gstsfsink.c:277 ext/sndfile/gstsfsrc.c:345 msgid "No file name specified for writing." msgstr "L-ebda isem speÄ‹ifikat biex nikteb." -#: ext/sndfile/gstsfsink.c:290 ext/sndfile/gstsfsrc.c:351 #, c-format msgid "Could not open file \"%s\" for writing." msgstr "Ma nistax niftaħ fajl \"%s\" biex nikteb." -#: ext/sndfile/gstsfsink.c:440 gst/nuvdemux/gstnuvdemux.c:735 msgid "Internal data stream error." msgstr "Internal data stream error." -#: ext/sndfile/gstsfsink.c:494 ext/sndfile/gstsfsink.c:502 #, c-format msgid "Could not write to file \"%s\"." msgstr "Ma nistax nikteb fil-fajl \"%s\". " -#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Apparat \"%s\" ma jeżistiex." -#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Ma nistax niftaħ apparat frontend \"%s\"." -#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Ma nistax inÄ¡ib is-settings mill-apparat frontend \"%s\"." -#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Ma nistax naqra mill-fajl \"%s\"." -#: sys/oss4/oss4-mixer.c:302 msgid "Could not open audio device for mixer control handling." msgstr "Ma nistax niftaħ apparat tal-awdjo għal mixer control handling." -#: sys/oss4/oss4-mixer.c:316 msgid "" "Could not open audio device for mixer control handling. This version of the " "Open Sound System is not supported by this element." @@ -89,271 +73,204 @@ msgstr "" "Ma nistax niftaħ apparat tal-awdjo għal mixer control handling. Din il-" "verzjoni ta' Open Sound System mhux issapportjata minn din l-element." -#: sys/oss4/oss4-mixer.c:720 msgid "Fast" msgstr "Fast" -#: sys/oss4/oss4-mixer.c:721 msgid "Low" msgstr "Low" -#: sys/oss4/oss4-mixer.c:722 msgid "Medium" msgstr "Medium" -#: sys/oss4/oss4-mixer.c:723 msgid "High" msgstr "High" -#: sys/oss4/oss4-mixer.c:724 msgid "Very high" msgstr "Very high" -#: sys/oss4/oss4-mixer.c:725 msgid "Production" msgstr "Production" -#: sys/oss4/oss4-mixer.c:726 msgid "Off" msgstr "Off" -#: sys/oss4/oss4-mixer.c:727 msgid "On" msgstr "On" -#: sys/oss4/oss4-mixer.c:728 msgid "Stereo" msgstr "Stereo" -#: sys/oss4/oss4-mixer.c:729 msgid "Surround sound" msgstr "Surround sound" -#: sys/oss4/oss4-mixer.c:730 sys/oss4/oss4-mixer.c:805 msgid "Input mix" msgstr "Input mix" -#: sys/oss4/oss4-mixer.c:731 sys/oss4/oss4-mixer.c:800 msgid "Front" msgstr "Quddiem" -#: sys/oss4/oss4-mixer.c:732 sys/oss4/oss4-mixer.c:801 msgid "Rear" msgstr "Wara" -#: sys/oss4/oss4-mixer.c:733 sys/oss4/oss4-mixer.c:802 msgid "Side" msgstr "Ä enb" -#: sys/oss4/oss4-mixer.c:734 sys/oss4/oss4-mixer.c:803 msgid "Center / LFE" msgstr "Center / LFE" -#: sys/oss4/oss4-mixer.c:735 sys/oss4/oss4-mixer.c:794 msgid "Microphone" msgstr "Mikrofonu" -#: sys/oss4/oss4-mixer.c:736 sys/oss4/oss4-mixer.c:795 msgid "Front panel microphone" msgstr "Mikrofonu tal-panella ta' quddiem" -#: sys/oss4/oss4-mixer.c:737 msgid "Input" msgstr "Input" -#: sys/oss4/oss4-mixer.c:738 sys/oss4/oss4-mixer.c:796 msgid "Line-in" msgstr "Line-in" -#: sys/oss4/oss4-mixer.c:739 msgid "PCM 1" msgstr "PCM 1" -#: sys/oss4/oss4-mixer.c:740 msgid "PCM 2" msgstr "PCM 2" -#: sys/oss4/oss4-mixer.c:741 msgid "PCM 3" msgstr "PCM 3" -#: sys/oss4/oss4-mixer.c:742 msgid "PCM 4" msgstr "PCM 4" -#: sys/oss4/oss4-mixer.c:754 msgid "Green connector" msgstr "Connector aħdar" -#: sys/oss4/oss4-mixer.c:755 msgid "Green front panel connector" msgstr "Front panel connector aħdar" -#: sys/oss4/oss4-mixer.c:756 msgid "Pink connector" msgstr "Connector roża" -#: sys/oss4/oss4-mixer.c:757 msgid "Pink front panel connector" msgstr "Front panel connector roża" -#: sys/oss4/oss4-mixer.c:758 msgid "Blue connector" msgstr "Connector Blu" -#: sys/oss4/oss4-mixer.c:759 msgid "Blue front panel connector" msgstr "Front panel connector blu" -#: sys/oss4/oss4-mixer.c:760 msgid "Orange connector" msgstr "Connector oranÄ¡jo" -#: sys/oss4/oss4-mixer.c:761 msgid "Orange front panel connector" msgstr "Front Panel connector oranÄ¡jo" -#: sys/oss4/oss4-mixer.c:762 msgid "Black connector" msgstr "Connector iswed" -#: sys/oss4/oss4-mixer.c:763 msgid "Black front panel connector" msgstr "Front panel connector iswed" -#: sys/oss4/oss4-mixer.c:764 msgid "Gray connector" msgstr "Connector Griż" -#: sys/oss4/oss4-mixer.c:765 msgid "Gray front panel connector" msgstr "Front panel connector Griż" -#: sys/oss4/oss4-mixer.c:766 msgid "White connector" msgstr "Connector abjad" -#: sys/oss4/oss4-mixer.c:767 msgid "White front panel connector" msgstr "Front panel connector abjad" -#: sys/oss4/oss4-mixer.c:768 msgid "Red connector" msgstr "Connector aħmar" -#: sys/oss4/oss4-mixer.c:769 msgid "Red front panel connector" msgstr "Front panel connector aħmar" -#: sys/oss4/oss4-mixer.c:770 msgid "Yellow connector" msgstr "Connector isfar" -#: sys/oss4/oss4-mixer.c:771 msgid "Yellow front panel connector" msgstr "Front panel connector isfar" -#: sys/oss4/oss4-mixer.c:774 msgid "Green connector function" msgstr "Connector function aħdar" -#: sys/oss4/oss4-mixer.c:775 msgid "Green front panel connector function" msgstr "Front panel connector function aħdar" -#: sys/oss4/oss4-mixer.c:776 msgid "Pink connector function" msgstr "Connector function roża" -#: sys/oss4/oss4-mixer.c:777 msgid "Pink front panel connector function" msgstr "Front panel connector function roża" -#: sys/oss4/oss4-mixer.c:778 msgid "Blue connector function" msgstr "Connector function blu" -#: sys/oss4/oss4-mixer.c:779 msgid "Blue front panel connector function" msgstr "Front panel connector function blu" -#: sys/oss4/oss4-mixer.c:780 msgid "Orange connector function" msgstr "Connector function oranÄ¡jo" -#: sys/oss4/oss4-mixer.c:781 msgid "Orange front panel connector function" msgstr "Front panel connector function oranÄ¡jo" -#: sys/oss4/oss4-mixer.c:782 msgid "Black connector function" msgstr "Connector function iswed" -#: sys/oss4/oss4-mixer.c:783 msgid "Black front panel connector function" msgstr "Front panel connector function iswed" -#: sys/oss4/oss4-mixer.c:784 msgid "Gray connector function" msgstr "Connector function griż" -#: sys/oss4/oss4-mixer.c:785 msgid "Gray front panel connector function" msgstr "Front panel connector function griż" -#: sys/oss4/oss4-mixer.c:786 msgid "White connector function" msgstr "Connector function abjad" -#: sys/oss4/oss4-mixer.c:787 msgid "White front panel connector function" msgstr "Front panel connector function abjad" -#: sys/oss4/oss4-mixer.c:788 msgid "Red connector function" msgstr "Connector function aħmar" -#: sys/oss4/oss4-mixer.c:789 msgid "Red front panel connector function" msgstr "Front panel connector function aħmar" -#: sys/oss4/oss4-mixer.c:790 msgid "Yellow connector function" msgstr "Connector function isfar" -#: sys/oss4/oss4-mixer.c:791 msgid "Yellow front panel connector function" msgstr "Front panel connector function isfar" -#: sys/oss4/oss4-mixer.c:797 msgid "Front panel line-in" msgstr "Front panel line-in" -#: sys/oss4/oss4-mixer.c:798 msgid "Headphones" msgstr "Headphones" -#: sys/oss4/oss4-mixer.c:799 msgid "Front panel headphones" msgstr "Front panel headphones" -#: sys/oss4/oss4-mixer.c:804 msgid "PCM" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:846 msgid "Virtual mixer input" msgstr "Virtual mixer input" -#: sys/oss4/oss4-mixer.c:848 msgid "Virtual mixer output" msgstr "Virtual mixer output" -#: sys/oss4/oss4-mixer.c:850 msgid "Virtual mixer channel configuration" msgstr "Virtual mixer channel configuration" -#: sys/oss4/oss4-sink.c:376 sys/oss4/oss4-source.c:367 msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -361,7 +278,6 @@ msgstr "" "Ma nistax niftaħ apparat tal-awdjo biex indoqq. Apparat qed jintuża minn " "programm ieħor." -#: sys/oss4/oss4-sink.c:386 sys/oss4/oss4-source.c:377 msgid "" "Could not open audio device for playback. You don't have permission to open " "the device." @@ -369,11 +285,9 @@ msgstr "" "Ma nistax niftaħ apparat tal-awdjo biex indoqq. M'għandekx aÄ‹Ä‹ess għall-" "apparat." -#: sys/oss4/oss4-sink.c:397 sys/oss4/oss4-source.c:388 msgid "Could not open audio device for playback." msgstr "Ma nistax niftaħ apparat tal-awdjo biex indoqq." -#: sys/oss4/oss4-sink.c:406 sys/oss4/oss4-source.c:398 msgid "" "Could not open audio device for playback. This version of the Open Sound " "System is not supported by this element." @@ -381,19 +295,15 @@ msgstr "" "Ma nistax niftaħ apparat tal-awdjo biex indoqq. Dil il-verżjoni ta' Open " "Sound System mhux issapportjatha minn dan l-element." -#: sys/oss4/oss4-sink.c:522 msgid "Playback is not supported by this audio device." msgstr "Id-daqq mhux issappartjat minn dan l-apparat tal-awdjo." -#: sys/oss4/oss4-sink.c:529 msgid "Audio playback error." msgstr "Å»ball fiid-daqq tal-awdjo." -#: sys/oss4/oss4-source.c:520 msgid "Recording is not supported by this audio device." msgstr "Irrekordjar mhux issapportjat minn dan l-apparat tal-awdjo." -#: sys/oss4/oss4-source.c:527 msgid "Error recording from audio device." msgstr "Å»ball fl-irrekordjar mill-apparat tal-awdjo." diff --git a/po/nb.po b/po/nb.po index f310233a..df660f0e 100644 --- a/po/nb.po +++ b/po/nb.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.5\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-12 00:07+0100\n" +"POT-Creation-Date: 2009-05-16 01:36+0100\n" "PO-Revision-Date: 2007-11-03 14:46+0100\n" "Last-Translator: Kjartan Maraas \n" "Language-Team: Norwegian Bokmaal \n" @@ -14,379 +14,289 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ext/resindvd/resindvdsrc.c:352 #, fuzzy msgid "Could not read title information for DVD." msgstr "Kunne ikke skrive til fil «%s»." -#: ext/resindvd/resindvdsrc.c:358 #, fuzzy, c-format msgid "Failed to open DVD device '%s'." msgstr "Kunne ikke Ã¥pne frontenhet «%s»." -#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "" -#: ext/resindvd/rsnbasesrc.c:1659 #, fuzzy msgid "Internal clock error." msgstr "Intern feil i datastrøm." -#: ext/resindvd/rsnbasesrc.c:1904 ext/resindvd/rsnbasesrc.c:1915 -#: gst/aiffparse/aiffparse.c:1265 #, fuzzy msgid "Internal data flow error." msgstr "Intern feil i datastrøm." -#: ext/sndfile/gstsfsink.c:277 ext/sndfile/gstsfsrc.c:345 msgid "No file name specified for writing." msgstr "Ingen filnavn oppgitt for skriving." -#: ext/sndfile/gstsfsink.c:290 ext/sndfile/gstsfsrc.c:351 #, c-format msgid "Could not open file \"%s\" for writing." msgstr "Kunne ikke Ã¥pne filen «%s» for skriving." -#: ext/sndfile/gstsfsink.c:440 gst/nuvdemux/gstnuvdemux.c:735 msgid "Internal data stream error." msgstr "Intern feil i datastrøm." -#: ext/sndfile/gstsfsink.c:494 ext/sndfile/gstsfsink.c:502 #, c-format msgid "Could not write to file \"%s\"." msgstr "Kunne ikke skrive til fil «%s»." -#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Enhet «%s» eksisterer ikke." -#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Kunne ikke Ã¥pne frontenhet «%s»." -#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Kunne ikke hente innstillinger fra frontenhet «%s»." -#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Kunne ikke Ã¥pne filen «%s» for lesing." -#: sys/oss4/oss4-mixer.c:302 #, fuzzy msgid "Could not open audio device for mixer control handling." msgstr "Kunne ikke Ã¥pne filen «%s» for lesing." -#: sys/oss4/oss4-mixer.c:316 msgid "" "Could not open audio device for mixer control handling. This version of the " "Open Sound System is not supported by this element." msgstr "" -#: sys/oss4/oss4-mixer.c:720 msgid "Fast" msgstr "" -#: sys/oss4/oss4-mixer.c:721 msgid "Low" msgstr "" -#: sys/oss4/oss4-mixer.c:722 msgid "Medium" msgstr "" -#: sys/oss4/oss4-mixer.c:723 msgid "High" msgstr "" -#: sys/oss4/oss4-mixer.c:724 msgid "Very high" msgstr "" -#: sys/oss4/oss4-mixer.c:725 msgid "Production" msgstr "" -#: sys/oss4/oss4-mixer.c:726 msgid "Off" msgstr "" -#: sys/oss4/oss4-mixer.c:727 msgid "On" msgstr "" -#: sys/oss4/oss4-mixer.c:728 msgid "Stereo" msgstr "" -#: sys/oss4/oss4-mixer.c:729 msgid "Surround sound" msgstr "" -#: sys/oss4/oss4-mixer.c:730 sys/oss4/oss4-mixer.c:805 msgid "Input mix" msgstr "" -#: sys/oss4/oss4-mixer.c:731 sys/oss4/oss4-mixer.c:800 msgid "Front" msgstr "" -#: sys/oss4/oss4-mixer.c:732 sys/oss4/oss4-mixer.c:801 msgid "Rear" msgstr "" -#: sys/oss4/oss4-mixer.c:733 sys/oss4/oss4-mixer.c:802 msgid "Side" msgstr "" -#: sys/oss4/oss4-mixer.c:734 sys/oss4/oss4-mixer.c:803 msgid "Center / LFE" msgstr "" -#: sys/oss4/oss4-mixer.c:735 sys/oss4/oss4-mixer.c:794 msgid "Microphone" msgstr "" -#: sys/oss4/oss4-mixer.c:736 sys/oss4/oss4-mixer.c:795 msgid "Front panel microphone" msgstr "" -#: sys/oss4/oss4-mixer.c:737 msgid "Input" msgstr "" -#: sys/oss4/oss4-mixer.c:738 sys/oss4/oss4-mixer.c:796 msgid "Line-in" msgstr "" -#: sys/oss4/oss4-mixer.c:739 msgid "PCM 1" msgstr "" -#: sys/oss4/oss4-mixer.c:740 msgid "PCM 2" msgstr "" -#: sys/oss4/oss4-mixer.c:741 msgid "PCM 3" msgstr "" -#: sys/oss4/oss4-mixer.c:742 msgid "PCM 4" msgstr "" -#: sys/oss4/oss4-mixer.c:754 msgid "Green connector" msgstr "" -#: sys/oss4/oss4-mixer.c:755 msgid "Green front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:756 msgid "Pink connector" msgstr "" -#: sys/oss4/oss4-mixer.c:757 msgid "Pink front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:758 msgid "Blue connector" msgstr "" -#: sys/oss4/oss4-mixer.c:759 msgid "Blue front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:760 msgid "Orange connector" msgstr "" -#: sys/oss4/oss4-mixer.c:761 msgid "Orange front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:762 msgid "Black connector" msgstr "" -#: sys/oss4/oss4-mixer.c:763 msgid "Black front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:764 msgid "Gray connector" msgstr "" -#: sys/oss4/oss4-mixer.c:765 msgid "Gray front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:766 msgid "White connector" msgstr "" -#: sys/oss4/oss4-mixer.c:767 msgid "White front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:768 msgid "Red connector" msgstr "" -#: sys/oss4/oss4-mixer.c:769 msgid "Red front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:770 msgid "Yellow connector" msgstr "" -#: sys/oss4/oss4-mixer.c:771 msgid "Yellow front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:774 msgid "Green connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:775 msgid "Green front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:776 msgid "Pink connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:777 msgid "Pink front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:778 msgid "Blue connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:779 msgid "Blue front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:780 msgid "Orange connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:781 msgid "Orange front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:782 msgid "Black connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:783 msgid "Black front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:784 msgid "Gray connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:785 msgid "Gray front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:786 msgid "White connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:787 msgid "White front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:788 msgid "Red connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:789 msgid "Red front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:790 msgid "Yellow connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:791 msgid "Yellow front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:797 msgid "Front panel line-in" msgstr "" -#: sys/oss4/oss4-mixer.c:798 msgid "Headphones" msgstr "" -#: sys/oss4/oss4-mixer.c:799 msgid "Front panel headphones" msgstr "" -#: sys/oss4/oss4-mixer.c:804 msgid "PCM" msgstr "" -#: sys/oss4/oss4-mixer.c:846 msgid "Virtual mixer input" msgstr "" -#: sys/oss4/oss4-mixer.c:848 msgid "Virtual mixer output" msgstr "" -#: sys/oss4/oss4-mixer.c:850 msgid "Virtual mixer channel configuration" msgstr "" -#: sys/oss4/oss4-sink.c:376 sys/oss4/oss4-source.c:367 msgid "" "Could not open audio device for playback. Device is being used by another " "application." msgstr "" -#: sys/oss4/oss4-sink.c:386 sys/oss4/oss4-source.c:377 msgid "" "Could not open audio device for playback. You don't have permission to open " "the device." msgstr "" -#: sys/oss4/oss4-sink.c:397 sys/oss4/oss4-source.c:388 #, fuzzy msgid "Could not open audio device for playback." msgstr "Kunne ikke Ã¥pne frontenhet «%s»." -#: sys/oss4/oss4-sink.c:406 sys/oss4/oss4-source.c:398 msgid "" "Could not open audio device for playback. This version of the Open Sound " "System is not supported by this element." msgstr "" -#: sys/oss4/oss4-sink.c:522 msgid "Playback is not supported by this audio device." msgstr "" -#: sys/oss4/oss4-sink.c:529 msgid "Audio playback error." msgstr "" -#: sys/oss4/oss4-source.c:520 msgid "Recording is not supported by this audio device." msgstr "" -#: sys/oss4/oss4-source.c:527 msgid "Error recording from audio device." msgstr "" diff --git a/po/nl.po b/po/nl.po index 79f82399..56ff9b2c 100644 --- a/po/nl.po +++ b/po/nl.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.9.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-12 00:07+0100\n" +"POT-Creation-Date: 2009-05-16 01:36+0100\n" "PO-Revision-Date: 2009-01-23 18:06+0100\n" "Last-Translator: Freek de Kruijf \n" "Language-Team: Dutch \n" @@ -18,71 +18,55 @@ msgstr "" "X-Generator: KBabel 1.11.4\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "Kan de titelinformatie voor de DVD niet lezen." -#: ext/resindvd/resindvdsrc.c:358 #, c-format msgid "Failed to open DVD device '%s'." msgstr "Kan het DVD-apparaat '%s' niet openen." -#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "Het instellen van het zoeken op basis van PGC is mislukt." -#: ext/resindvd/rsnbasesrc.c:1659 msgid "Internal clock error." msgstr "Interne fout met de klok." -#: ext/resindvd/rsnbasesrc.c:1904 ext/resindvd/rsnbasesrc.c:1915 -#: gst/aiffparse/aiffparse.c:1265 msgid "Internal data flow error." msgstr "Interne fout met gegevensdoorvoer." -#: ext/sndfile/gstsfsink.c:277 ext/sndfile/gstsfsrc.c:345 msgid "No file name specified for writing." msgstr "Geen bestandsnaam gespecificeerd voor de uitvoer." -#: ext/sndfile/gstsfsink.c:290 ext/sndfile/gstsfsrc.c:351 #, c-format msgid "Could not open file \"%s\" for writing." msgstr "Kan bestand \"%s\" niet openen voor uitvoer." -#: ext/sndfile/gstsfsink.c:440 gst/nuvdemux/gstnuvdemux.c:735 msgid "Internal data stream error." msgstr "Interne fout in gegevensstroom." -#: ext/sndfile/gstsfsink.c:494 ext/sndfile/gstsfsink.c:502 #, c-format msgid "Could not write to file \"%s\"." msgstr "Kan niet in bestand \"%s\" schrijven." -#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Apparaat \"%s\" bestaat niet." -#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Kan het frontend-apparaat \"%s\" niet openen." -#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Kan de instellingen van het frontend-apparaat \"%s\" niet verkrijgen." -#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Kan bestand \"%s\" niet openen om te lezen." -#: sys/oss4/oss4-mixer.c:302 msgid "Could not open audio device for mixer control handling." msgstr "Kan het audio-apparaat niet openen voor de mixerbesturing." -#: sys/oss4/oss4-mixer.c:316 msgid "" "Could not open audio device for mixer control handling. This version of the " "Open Sound System is not supported by this element." @@ -90,271 +74,204 @@ msgstr "" "Kan het audio-apparaat niet openen voor de mixerbesturing. Deze versie van " "het Open Soundsysteem wordt niet ondersteund door dit element." -#: sys/oss4/oss4-mixer.c:720 msgid "Fast" msgstr "Snel" -#: sys/oss4/oss4-mixer.c:721 msgid "Low" msgstr "Laag" -#: sys/oss4/oss4-mixer.c:722 msgid "Medium" msgstr "Gemiddeld" -#: sys/oss4/oss4-mixer.c:723 msgid "High" msgstr "Hoog" -#: sys/oss4/oss4-mixer.c:724 msgid "Very high" msgstr "Erg hoog" -#: sys/oss4/oss4-mixer.c:725 msgid "Production" msgstr "Productie" -#: sys/oss4/oss4-mixer.c:726 msgid "Off" msgstr "Uit" -#: sys/oss4/oss4-mixer.c:727 msgid "On" msgstr "Aan" -#: sys/oss4/oss4-mixer.c:728 msgid "Stereo" msgstr "Stereo" -#: sys/oss4/oss4-mixer.c:729 msgid "Surround sound" msgstr "Surround geluid" -#: sys/oss4/oss4-mixer.c:730 sys/oss4/oss4-mixer.c:805 msgid "Input mix" msgstr "Invoermix" -#: sys/oss4/oss4-mixer.c:731 sys/oss4/oss4-mixer.c:800 msgid "Front" msgstr "Voorzijde" -#: sys/oss4/oss4-mixer.c:732 sys/oss4/oss4-mixer.c:801 msgid "Rear" msgstr "Achterzijde" -#: sys/oss4/oss4-mixer.c:733 sys/oss4/oss4-mixer.c:802 msgid "Side" msgstr "Zijkant" -#: sys/oss4/oss4-mixer.c:734 sys/oss4/oss4-mixer.c:803 msgid "Center / LFE" msgstr "Midden / LFE" -#: sys/oss4/oss4-mixer.c:735 sys/oss4/oss4-mixer.c:794 msgid "Microphone" msgstr "Microfoon" -#: sys/oss4/oss4-mixer.c:736 sys/oss4/oss4-mixer.c:795 msgid "Front panel microphone" msgstr "Microfoon in frontpaneel" -#: sys/oss4/oss4-mixer.c:737 msgid "Input" msgstr "Invoer" -#: sys/oss4/oss4-mixer.c:738 sys/oss4/oss4-mixer.c:796 msgid "Line-in" msgstr "Lijn-in" -#: sys/oss4/oss4-mixer.c:739 msgid "PCM 1" msgstr "PCM 1" -#: sys/oss4/oss4-mixer.c:740 msgid "PCM 2" msgstr "PCM 2" -#: sys/oss4/oss4-mixer.c:741 msgid "PCM 3" msgstr "PCM 3" -#: sys/oss4/oss4-mixer.c:742 msgid "PCM 4" msgstr "PCM 4" -#: sys/oss4/oss4-mixer.c:754 msgid "Green connector" msgstr "Groene connector" -#: sys/oss4/oss4-mixer.c:755 msgid "Green front panel connector" msgstr "Groene connector in frontpaneel" -#: sys/oss4/oss4-mixer.c:756 msgid "Pink connector" msgstr "Roze connector" -#: sys/oss4/oss4-mixer.c:757 msgid "Pink front panel connector" msgstr "Roze connector in frontpaneel" -#: sys/oss4/oss4-mixer.c:758 msgid "Blue connector" msgstr "Blauwe connector" -#: sys/oss4/oss4-mixer.c:759 msgid "Blue front panel connector" msgstr "Blauwe connector in frontpaneel" -#: sys/oss4/oss4-mixer.c:760 msgid "Orange connector" msgstr "Oranje connector" -#: sys/oss4/oss4-mixer.c:761 msgid "Orange front panel connector" msgstr "Oranje connector in frontpaneel" -#: sys/oss4/oss4-mixer.c:762 msgid "Black connector" msgstr "Zwarte connector" -#: sys/oss4/oss4-mixer.c:763 msgid "Black front panel connector" msgstr "Zwarte connector in frontpaneel" -#: sys/oss4/oss4-mixer.c:764 msgid "Gray connector" msgstr "Grijze connector" -#: sys/oss4/oss4-mixer.c:765 msgid "Gray front panel connector" msgstr "Grijze connector in frontpaneel" -#: sys/oss4/oss4-mixer.c:766 msgid "White connector" msgstr "Witte connector" -#: sys/oss4/oss4-mixer.c:767 msgid "White front panel connector" msgstr "Witte connector in frontpaneel" -#: sys/oss4/oss4-mixer.c:768 msgid "Red connector" msgstr "Rode connector" -#: sys/oss4/oss4-mixer.c:769 msgid "Red front panel connector" msgstr "Rode connector in frontpaneel" -#: sys/oss4/oss4-mixer.c:770 msgid "Yellow connector" msgstr "Gele connector" -#: sys/oss4/oss4-mixer.c:771 msgid "Yellow front panel connector" msgstr "Gele connector in frontpaneel" -#: sys/oss4/oss4-mixer.c:774 msgid "Green connector function" msgstr "Functie van groene connector" -#: sys/oss4/oss4-mixer.c:775 msgid "Green front panel connector function" msgstr "Functie van groene connector in frontpaneel" -#: sys/oss4/oss4-mixer.c:776 msgid "Pink connector function" msgstr "Functie van roze connector" -#: sys/oss4/oss4-mixer.c:777 msgid "Pink front panel connector function" msgstr "Functie van roze connector in frontpaneel" -#: sys/oss4/oss4-mixer.c:778 msgid "Blue connector function" msgstr "Functie van blauwe connector" -#: sys/oss4/oss4-mixer.c:779 msgid "Blue front panel connector function" msgstr "Functie van blauwe connector in frontpaneel" -#: sys/oss4/oss4-mixer.c:780 msgid "Orange connector function" msgstr "Functie van oranje connector" -#: sys/oss4/oss4-mixer.c:781 msgid "Orange front panel connector function" msgstr "Functie van oranje connector in frontpaneel" -#: sys/oss4/oss4-mixer.c:782 msgid "Black connector function" msgstr "Functie van zwarte connector" -#: sys/oss4/oss4-mixer.c:783 msgid "Black front panel connector function" msgstr "Functie van zwarte connector in frontpaneel" -#: sys/oss4/oss4-mixer.c:784 msgid "Gray connector function" msgstr "Functie van grijze connector" -#: sys/oss4/oss4-mixer.c:785 msgid "Gray front panel connector function" msgstr "Functie van grijze connector in frontpaneel" -#: sys/oss4/oss4-mixer.c:786 msgid "White connector function" msgstr "Functie van witte connector" -#: sys/oss4/oss4-mixer.c:787 msgid "White front panel connector function" msgstr "Functie van witte connector in frontpaneel" -#: sys/oss4/oss4-mixer.c:788 msgid "Red connector function" msgstr "Functie van rode connector" -#: sys/oss4/oss4-mixer.c:789 msgid "Red front panel connector function" msgstr "Functie van rode connector in frontpaneel" -#: sys/oss4/oss4-mixer.c:790 msgid "Yellow connector function" msgstr "Functie van gele connector" -#: sys/oss4/oss4-mixer.c:791 msgid "Yellow front panel connector function" msgstr "Functie van gele connector in frontpaneel" -#: sys/oss4/oss4-mixer.c:797 msgid "Front panel line-in" msgstr "Lijn-in in frontpaneel" -#: sys/oss4/oss4-mixer.c:798 msgid "Headphones" msgstr "Hoofdtelefoon" -#: sys/oss4/oss4-mixer.c:799 msgid "Front panel headphones" msgstr "Hoofdtelefoon in frontpaneel" -#: sys/oss4/oss4-mixer.c:804 msgid "PCM" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:846 msgid "Virtual mixer input" msgstr "Virtuele mixer-invoer" -#: sys/oss4/oss4-mixer.c:848 msgid "Virtual mixer output" msgstr "Virtuele mixer-uitvoer" -#: sys/oss4/oss4-mixer.c:850 msgid "Virtual mixer channel configuration" msgstr "Kanaalconfiguratie van virtuele mixer " -#: sys/oss4/oss4-sink.c:376 sys/oss4/oss4-source.c:367 msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -362,7 +279,6 @@ msgstr "" "Kan het audio-apparaat niet openen voor afspelen. Apparaat is in gebruik bij " "een andere applicatie." -#: sys/oss4/oss4-sink.c:386 sys/oss4/oss4-source.c:377 msgid "" "Could not open audio device for playback. You don't have permission to open " "the device." @@ -370,11 +286,9 @@ msgstr "" "Kan het audio-apparaat niet openen voor afspelen. U hebt geen toestemming om " "het apparaat te openen." -#: sys/oss4/oss4-sink.c:397 sys/oss4/oss4-source.c:388 msgid "Could not open audio device for playback." msgstr "Kan het audio-apparaat niet openen voor afspelen." -#: sys/oss4/oss4-sink.c:406 sys/oss4/oss4-source.c:398 msgid "" "Could not open audio device for playback. This version of the Open Sound " "System is not supported by this element." @@ -382,19 +296,15 @@ msgstr "" "Kan het audio-apparaat niet openen voor afspelen. Deze versie van het Open " "Soundsysteem wordt niet ondersteund door dit element." -#: sys/oss4/oss4-sink.c:522 msgid "Playback is not supported by this audio device." msgstr "Afspelen wordt door dit audio-apparaat niet ondersteund." -#: sys/oss4/oss4-sink.c:529 msgid "Audio playback error." msgstr "Fout bij audio-afspelen." -#: sys/oss4/oss4-source.c:520 msgid "Recording is not supported by this audio device." msgstr "Opnemen wordt door dit audio-apparaat niet ondersteund." -#: sys/oss4/oss4-source.c:527 msgid "Error recording from audio device." msgstr "Fout bij opnemen met dit audio-apparaat." diff --git a/po/or.po b/po/or.po index d9a97c4d..7d2cf270 100644 --- a/po/or.po +++ b/po/or.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-0.8.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-12 00:07+0100\n" +"POT-Creation-Date: 2009-05-16 01:36+0100\n" "PO-Revision-Date: 2004-09-27 13:32+0530\n" "Last-Translator: Gora Mohanty \n" "Language-Team: Oriya \n" @@ -16,387 +16,297 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ext/resindvd/resindvdsrc.c:352 #, fuzzy msgid "Could not read title information for DVD." msgstr "\"%s\" ଫାଇଲ ଲେଖିହେଲା ନାହିà¬." -#: ext/resindvd/resindvdsrc.c:358 #, fuzzy, c-format msgid "Failed to open DVD device '%s'." msgstr "\"%s\" ନିୟନà­à¬¤à­à¬°à¬£ ଯନà­à¬¤à­à¬° ବନà­à¬¦ କରିହେଲା ନାହିà¬." -#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "" -#: ext/resindvd/rsnbasesrc.c:1659 msgid "Internal clock error." msgstr "" -#: ext/resindvd/rsnbasesrc.c:1904 ext/resindvd/rsnbasesrc.c:1915 -#: gst/aiffparse/aiffparse.c:1265 msgid "Internal data flow error." msgstr "" -#: ext/sndfile/gstsfsink.c:277 ext/sndfile/gstsfsrc.c:345 #, fuzzy msgid "No file name specified for writing." msgstr "କୌଣସି ଫାଇଲନାମ ଉଲà­à¬²à­‡à¬–ିତ ହୋଇ ନାହିà¬." -#: ext/sndfile/gstsfsink.c:290 ext/sndfile/gstsfsrc.c:351 #, c-format msgid "Could not open file \"%s\" for writing." msgstr "\"%s\" ଫାଇଲ ଲେଖିବା ପାଇଠଖୋଲିହେଲା ନାହିà¬." -#: ext/sndfile/gstsfsink.c:440 gst/nuvdemux/gstnuvdemux.c:735 msgid "Internal data stream error." msgstr "" -#: ext/sndfile/gstsfsink.c:494 ext/sndfile/gstsfsink.c:502 #, c-format msgid "Could not write to file \"%s\"." msgstr "\"%s\" ଫାଇଲ ଲେଖିହେଲା ନାହିà¬." -#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "\"%s\" ଯନà­à¬¤à­à¬° ଅବସà­à¬¥à¬¿à¬¤ ନାହିà¬." -#: sys/dvb/gstdvbsrc.c:710 #, fuzzy, c-format msgid "Could not open frontend device \"%s\"." msgstr "\"%s\" ନିୟନà­à¬¤à­à¬°à¬£ ଯନà­à¬¤à­à¬° ବନà­à¬¦ କରିହେଲା ନାହିà¬." -#: sys/dvb/gstdvbsrc.c:722 #, fuzzy, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "\"%s\" ଯନà­à¬¤à­à¬°à¬°à­ ପରà­à¬¯à­à¬¯à¬¾à¬ªà­à¬¤ ଅସà­à¬¥à¬¾à­Ÿà­€ ସଞà­à¬šà­Ÿ ସà­à¬¥à¬¾à¬¨ ଆଣିହେଲା ନାହିà¬." -#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "\"%s\" ଫାଇଲ ପଢ଼ିବା ପାଇଠଖୋଲିହେଲା ନାହିà¬." -#: sys/oss4/oss4-mixer.c:302 #, fuzzy msgid "Could not open audio device for mixer control handling." msgstr "\"%s\" ଧà­à¬¬à¬¨à¬¿ ଯନà­à¬¤à­à¬° ଲେଖିବା ପାଇଠଖୋଲିହେଲା ନାହିà¬." -#: sys/oss4/oss4-mixer.c:316 #, fuzzy msgid "" "Could not open audio device for mixer control handling. This version of the " "Open Sound System is not supported by this element." msgstr "\"%s\" ଧà­à¬¬à¬¨à¬¿ ଯନà­à¬¤à­à¬° ଲେଖିବା ପାଇଠଖୋଲିହେଲା ନାହିà¬." -#: sys/oss4/oss4-mixer.c:720 msgid "Fast" msgstr "" -#: sys/oss4/oss4-mixer.c:721 msgid "Low" msgstr "" -#: sys/oss4/oss4-mixer.c:722 msgid "Medium" msgstr "" -#: sys/oss4/oss4-mixer.c:723 msgid "High" msgstr "" -#: sys/oss4/oss4-mixer.c:724 msgid "Very high" msgstr "" -#: sys/oss4/oss4-mixer.c:725 msgid "Production" msgstr "" -#: sys/oss4/oss4-mixer.c:726 msgid "Off" msgstr "" -#: sys/oss4/oss4-mixer.c:727 msgid "On" msgstr "" -#: sys/oss4/oss4-mixer.c:728 msgid "Stereo" msgstr "" -#: sys/oss4/oss4-mixer.c:729 msgid "Surround sound" msgstr "" -#: sys/oss4/oss4-mixer.c:730 sys/oss4/oss4-mixer.c:805 msgid "Input mix" msgstr "" -#: sys/oss4/oss4-mixer.c:731 sys/oss4/oss4-mixer.c:800 msgid "Front" msgstr "" -#: sys/oss4/oss4-mixer.c:732 sys/oss4/oss4-mixer.c:801 #, fuzzy msgid "Rear" msgstr "ଅନà­à¬²à¬¿à¬ªà¬¿à¬•à¬°à¬£" -#: sys/oss4/oss4-mixer.c:733 sys/oss4/oss4-mixer.c:802 #, fuzzy msgid "Side" msgstr "ଭିଡିଓ" -#: sys/oss4/oss4-mixer.c:734 sys/oss4/oss4-mixer.c:803 msgid "Center / LFE" msgstr "" -#: sys/oss4/oss4-mixer.c:735 sys/oss4/oss4-mixer.c:794 msgid "Microphone" msgstr "ମାଇକà­à¬°à­‹à¬«à­‹à¬¨à­" -#: sys/oss4/oss4-mixer.c:736 sys/oss4/oss4-mixer.c:795 msgid "Front panel microphone" msgstr "" -#: sys/oss4/oss4-mixer.c:737 msgid "Input" msgstr "" -#: sys/oss4/oss4-mixer.c:738 sys/oss4/oss4-mixer.c:796 msgid "Line-in" msgstr "ଲାଇନ-ଇନ" -#: sys/oss4/oss4-mixer.c:739 #, fuzzy msgid "PCM 1" msgstr "ପି.ସି.à¬à¬®." -#: sys/oss4/oss4-mixer.c:740 #, fuzzy msgid "PCM 2" msgstr "ପି.ସି.à¬à¬®.-à­¨" -#: sys/oss4/oss4-mixer.c:741 #, fuzzy msgid "PCM 3" msgstr "ପି.ସି.à¬à¬®." -#: sys/oss4/oss4-mixer.c:742 #, fuzzy msgid "PCM 4" msgstr "ପି.ସି.à¬à¬®." -#: sys/oss4/oss4-mixer.c:754 msgid "Green connector" msgstr "" -#: sys/oss4/oss4-mixer.c:755 msgid "Green front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:756 msgid "Pink connector" msgstr "" -#: sys/oss4/oss4-mixer.c:757 msgid "Pink front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:758 msgid "Blue connector" msgstr "" -#: sys/oss4/oss4-mixer.c:759 msgid "Blue front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:760 msgid "Orange connector" msgstr "" -#: sys/oss4/oss4-mixer.c:761 msgid "Orange front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:762 msgid "Black connector" msgstr "" -#: sys/oss4/oss4-mixer.c:763 msgid "Black front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:764 msgid "Gray connector" msgstr "" -#: sys/oss4/oss4-mixer.c:765 msgid "Gray front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:766 msgid "White connector" msgstr "" -#: sys/oss4/oss4-mixer.c:767 msgid "White front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:768 msgid "Red connector" msgstr "" -#: sys/oss4/oss4-mixer.c:769 msgid "Red front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:770 msgid "Yellow connector" msgstr "" -#: sys/oss4/oss4-mixer.c:771 msgid "Yellow front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:774 msgid "Green connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:775 msgid "Green front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:776 msgid "Pink connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:777 msgid "Pink front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:778 msgid "Blue connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:779 msgid "Blue front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:780 msgid "Orange connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:781 msgid "Orange front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:782 msgid "Black connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:783 msgid "Black front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:784 msgid "Gray connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:785 msgid "Gray front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:786 msgid "White connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:787 msgid "White front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:788 msgid "Red connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:789 msgid "Red front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:790 msgid "Yellow connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:791 msgid "Yellow front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:797 msgid "Front panel line-in" msgstr "" -#: sys/oss4/oss4-mixer.c:798 msgid "Headphones" msgstr "" -#: sys/oss4/oss4-mixer.c:799 msgid "Front panel headphones" msgstr "" -#: sys/oss4/oss4-mixer.c:804 msgid "PCM" msgstr "ପି.ସି.à¬à¬®." -#: sys/oss4/oss4-mixer.c:846 msgid "Virtual mixer input" msgstr "" -#: sys/oss4/oss4-mixer.c:848 msgid "Virtual mixer output" msgstr "" -#: sys/oss4/oss4-mixer.c:850 msgid "Virtual mixer channel configuration" msgstr "" -#: sys/oss4/oss4-sink.c:376 sys/oss4/oss4-source.c:367 msgid "" "Could not open audio device for playback. Device is being used by another " "application." msgstr "" -#: sys/oss4/oss4-sink.c:386 sys/oss4/oss4-source.c:377 #, fuzzy msgid "" "Could not open audio device for playback. You don't have permission to open " "the device." msgstr "\"%s\" ଧà­à¬¬à¬¨à¬¿ ଯନà­à¬¤à­à¬° ଲେଖିବା ପାଇଠଖୋଲିହେଲା ନାହିà¬." -#: sys/oss4/oss4-sink.c:397 sys/oss4/oss4-source.c:388 #, fuzzy msgid "Could not open audio device for playback." msgstr "\"%s\" ଧà­à¬¬à¬¨à¬¿ ଯନà­à¬¤à­à¬° ଲେଖିବା ପାଇଠଖୋଲିହେଲା ନାହିà¬." -#: sys/oss4/oss4-sink.c:406 sys/oss4/oss4-source.c:398 msgid "" "Could not open audio device for playback. This version of the Open Sound " "System is not supported by this element." msgstr "" -#: sys/oss4/oss4-sink.c:522 msgid "Playback is not supported by this audio device." msgstr "" -#: sys/oss4/oss4-sink.c:529 msgid "Audio playback error." msgstr "" -#: sys/oss4/oss4-source.c:520 msgid "Recording is not supported by this audio device." msgstr "" -#: sys/oss4/oss4-source.c:527 msgid "Error recording from audio device." msgstr "" diff --git a/po/pl.po b/po/pl.po index 648d7b05..e4fe8989 100644 --- a/po/pl.po +++ b/po/pl.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.9.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-12 00:07+0100\n" +"POT-Creation-Date: 2009-05-16 01:36+0100\n" "PO-Revision-Date: 2009-01-12 20:15+0100\n" "Last-Translator: Jakub Bogusz \n" "Language-Team: Polish \n" @@ -14,71 +14,55 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "Nie udaÅ‚o siÄ™ odczytać informacji o tytuÅ‚ach dla DVD." -#: ext/resindvd/resindvdsrc.c:358 #, c-format msgid "Failed to open DVD device '%s'." msgstr "Nie udaÅ‚o siÄ™ otworzyć urzÄ…dzenia DVD '%s'." -#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "Nie udaÅ‚o siÄ™ ustawić przewijania opartego na PGC." -#: ext/resindvd/rsnbasesrc.c:1659 msgid "Internal clock error." msgstr "BÅ‚Ä…d wewnÄ™trzny zegara." -#: ext/resindvd/rsnbasesrc.c:1904 ext/resindvd/rsnbasesrc.c:1915 -#: gst/aiffparse/aiffparse.c:1265 msgid "Internal data flow error." msgstr "BÅ‚Ä…d wewnÄ™trzny przepÅ‚ywu danych." -#: ext/sndfile/gstsfsink.c:277 ext/sndfile/gstsfsrc.c:345 msgid "No file name specified for writing." msgstr "Nie okreÅ›lono nazwy pliku do zapisu." -#: ext/sndfile/gstsfsink.c:290 ext/sndfile/gstsfsrc.c:351 #, c-format msgid "Could not open file \"%s\" for writing." msgstr "Nie udaÅ‚o siÄ™ otworzyć pliku \"%s\" do zapisu." -#: ext/sndfile/gstsfsink.c:440 gst/nuvdemux/gstnuvdemux.c:735 msgid "Internal data stream error." msgstr "BÅ‚Ä…d wewnÄ™trzny strumienia danych." -#: ext/sndfile/gstsfsink.c:494 ext/sndfile/gstsfsink.c:502 #, c-format msgid "Could not write to file \"%s\"." msgstr "Nie udaÅ‚o siÄ™ zapisać danych do pliku \"%s\"." -#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "UrzÄ…dzenie \"%s\" nie istnieje." -#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Nie udaÅ‚o siÄ™ otworzyć urzÄ…dzenia frontendu \"%s\"." -#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Nie udaÅ‚o siÄ™ pobrać ustawieÅ„ z urzÄ…dzenia frontendu \"%s\"." -#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Nie udaÅ‚o siÄ™ otworzyć pliku \"%s\" do odczytu." -#: sys/oss4/oss4-mixer.c:302 msgid "Could not open audio device for mixer control handling." msgstr "Nie udaÅ‚o siÄ™ otworzyć urzÄ…dzenia dźwiÄ™kowego do sterowania mikserem." -#: sys/oss4/oss4-mixer.c:316 msgid "" "Could not open audio device for mixer control handling. This version of the " "Open Sound System is not supported by this element." @@ -86,271 +70,204 @@ msgstr "" "Nie udaÅ‚o siÄ™ otworzyć urzÄ…dzenia dźwiÄ™kowego do sterowania mikserem. Ta " "wersja Open Sound System nie jest obsÅ‚ugiwana przez ten moduÅ‚." -#: sys/oss4/oss4-mixer.c:720 msgid "Fast" msgstr "Szybka" -#: sys/oss4/oss4-mixer.c:721 msgid "Low" msgstr "Niska" -#: sys/oss4/oss4-mixer.c:722 msgid "Medium" msgstr "Åšrednia" -#: sys/oss4/oss4-mixer.c:723 msgid "High" msgstr "Wysoka" -#: sys/oss4/oss4-mixer.c:724 msgid "Very high" msgstr "Bardzo wysoka" -#: sys/oss4/oss4-mixer.c:725 msgid "Production" msgstr "Produkcyjna" -#: sys/oss4/oss4-mixer.c:726 msgid "Off" msgstr "WyÅ‚Ä…czone" -#: sys/oss4/oss4-mixer.c:727 msgid "On" msgstr "WÅ‚Ä…czone" -#: sys/oss4/oss4-mixer.c:728 msgid "Stereo" msgstr "Stereo" -#: sys/oss4/oss4-mixer.c:729 msgid "Surround sound" msgstr "DźwiÄ™k surround" -#: sys/oss4/oss4-mixer.c:730 sys/oss4/oss4-mixer.c:805 msgid "Input mix" msgstr "Miksowanie wejÅ›cia" -#: sys/oss4/oss4-mixer.c:731 sys/oss4/oss4-mixer.c:800 msgid "Front" msgstr "Przód" -#: sys/oss4/oss4-mixer.c:732 sys/oss4/oss4-mixer.c:801 msgid "Rear" msgstr "TyÅ‚" -#: sys/oss4/oss4-mixer.c:733 sys/oss4/oss4-mixer.c:802 msgid "Side" msgstr "Bok" -#: sys/oss4/oss4-mixer.c:734 sys/oss4/oss4-mixer.c:803 msgid "Center / LFE" msgstr "Åšrodek / LFE" -#: sys/oss4/oss4-mixer.c:735 sys/oss4/oss4-mixer.c:794 msgid "Microphone" msgstr "Mikrofon" -#: sys/oss4/oss4-mixer.c:736 sys/oss4/oss4-mixer.c:795 msgid "Front panel microphone" msgstr "Mikrofon na przednim panelu" -#: sys/oss4/oss4-mixer.c:737 msgid "Input" msgstr "WejÅ›cie" -#: sys/oss4/oss4-mixer.c:738 sys/oss4/oss4-mixer.c:796 msgid "Line-in" msgstr "WejÅ›cie linii" -#: sys/oss4/oss4-mixer.c:739 msgid "PCM 1" msgstr "PCM 1" -#: sys/oss4/oss4-mixer.c:740 msgid "PCM 2" msgstr "PCM 2" -#: sys/oss4/oss4-mixer.c:741 msgid "PCM 3" msgstr "PCM 3" -#: sys/oss4/oss4-mixer.c:742 msgid "PCM 4" msgstr "PCM 4" -#: sys/oss4/oss4-mixer.c:754 msgid "Green connector" msgstr "Zielone gniazdo" -#: sys/oss4/oss4-mixer.c:755 msgid "Green front panel connector" msgstr "Zielone gniazdo na przednim panelu" -#: sys/oss4/oss4-mixer.c:756 msgid "Pink connector" msgstr "Różowe gniazdo" -#: sys/oss4/oss4-mixer.c:757 msgid "Pink front panel connector" msgstr "Różowe gniazdo na przednim panelu" -#: sys/oss4/oss4-mixer.c:758 msgid "Blue connector" msgstr "Niebieskie gniazdo" -#: sys/oss4/oss4-mixer.c:759 msgid "Blue front panel connector" msgstr "Niebieskie gniazdo na przednim panelu" -#: sys/oss4/oss4-mixer.c:760 msgid "Orange connector" msgstr "PomaraÅ„czowe gniazdo" -#: sys/oss4/oss4-mixer.c:761 msgid "Orange front panel connector" msgstr "PomaraÅ„czowe gniazdo na przednim panelu" -#: sys/oss4/oss4-mixer.c:762 msgid "Black connector" msgstr "Czarne gniazdo" -#: sys/oss4/oss4-mixer.c:763 msgid "Black front panel connector" msgstr "Czarne gniazdo na przednim panelu" -#: sys/oss4/oss4-mixer.c:764 msgid "Gray connector" msgstr "Szare gniazdo" -#: sys/oss4/oss4-mixer.c:765 msgid "Gray front panel connector" msgstr "Szare gniazdo na przednim panelu" -#: sys/oss4/oss4-mixer.c:766 msgid "White connector" msgstr "BiaÅ‚e gniazdo" -#: sys/oss4/oss4-mixer.c:767 msgid "White front panel connector" msgstr "BiaÅ‚e gniazdo na przednim panelu" -#: sys/oss4/oss4-mixer.c:768 msgid "Red connector" msgstr "Czerwone gniazdo" -#: sys/oss4/oss4-mixer.c:769 msgid "Red front panel connector" msgstr "Czerwone gniazdo na przednim panelu" -#: sys/oss4/oss4-mixer.c:770 msgid "Yellow connector" msgstr "Żółte gniazdo" -#: sys/oss4/oss4-mixer.c:771 msgid "Yellow front panel connector" msgstr "Żółte gniazdo na przednim panelu" -#: sys/oss4/oss4-mixer.c:774 msgid "Green connector function" msgstr "Funkcja zielonego gniazda" -#: sys/oss4/oss4-mixer.c:775 msgid "Green front panel connector function" msgstr "Funkcja zielonego gniazda na przednim panelu" -#: sys/oss4/oss4-mixer.c:776 msgid "Pink connector function" msgstr "Funkcja różowego gniazda" -#: sys/oss4/oss4-mixer.c:777 msgid "Pink front panel connector function" msgstr "Funkcja różowego gniazda na przednim panelu" -#: sys/oss4/oss4-mixer.c:778 msgid "Blue connector function" msgstr "Funkcja niebieskiego gniazda" -#: sys/oss4/oss4-mixer.c:779 msgid "Blue front panel connector function" msgstr "Funkcja niebieskiego gniazda na przednim panelu" -#: sys/oss4/oss4-mixer.c:780 msgid "Orange connector function" msgstr "Funkcja pomaraÅ„czowego gniazda" -#: sys/oss4/oss4-mixer.c:781 msgid "Orange front panel connector function" msgstr "Funkcja pomaraÅ„czowego gniazda na przednim panelu" -#: sys/oss4/oss4-mixer.c:782 msgid "Black connector function" msgstr "Funkcja czarnego gniazda" -#: sys/oss4/oss4-mixer.c:783 msgid "Black front panel connector function" msgstr "Funkcja czarnego gniazda na przednim panelu" -#: sys/oss4/oss4-mixer.c:784 msgid "Gray connector function" msgstr "Funkcja szarego gniazda" -#: sys/oss4/oss4-mixer.c:785 msgid "Gray front panel connector function" msgstr "Funkcja szarego gniazda na przednim panelu" -#: sys/oss4/oss4-mixer.c:786 msgid "White connector function" msgstr "Funkcja biaÅ‚ego gniazda" -#: sys/oss4/oss4-mixer.c:787 msgid "White front panel connector function" msgstr "Funkcja biaÅ‚ego gniazda na przednim panelu" -#: sys/oss4/oss4-mixer.c:788 msgid "Red connector function" msgstr "Funkcja czerwonego gniazda" -#: sys/oss4/oss4-mixer.c:789 msgid "Red front panel connector function" msgstr "Funkcja czerwonego gniazda na przednim panelu" -#: sys/oss4/oss4-mixer.c:790 msgid "Yellow connector function" msgstr "Funkcja żółtego gniazda" -#: sys/oss4/oss4-mixer.c:791 msgid "Yellow front panel connector function" msgstr "Funkcja żółtego gniazda na przednim panelu" -#: sys/oss4/oss4-mixer.c:797 msgid "Front panel line-in" msgstr "WejÅ›cie linii na przednim panelu" -#: sys/oss4/oss4-mixer.c:798 msgid "Headphones" msgstr "SÅ‚uchawki" -#: sys/oss4/oss4-mixer.c:799 msgid "Front panel headphones" msgstr "SÅ‚uchawki na przednim panelu" -#: sys/oss4/oss4-mixer.c:804 msgid "PCM" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:846 msgid "Virtual mixer input" msgstr "WejÅ›cie wirtualnego miksera" -#: sys/oss4/oss4-mixer.c:848 msgid "Virtual mixer output" msgstr "WyjÅ›cie wirtualnego miksera" -#: sys/oss4/oss4-mixer.c:850 msgid "Virtual mixer channel configuration" msgstr "Konfiguracja kanałów wirtualnego miksera" -#: sys/oss4/oss4-sink.c:376 sys/oss4/oss4-source.c:367 msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -358,7 +275,6 @@ msgstr "" "Nie udaÅ‚o siÄ™ otworzyć urzÄ…dzenia dźwiÄ™kowego do odtwarzania. UrzÄ…dzenie " "jest używane przez innÄ… aplikacjÄ™." -#: sys/oss4/oss4-sink.c:386 sys/oss4/oss4-source.c:377 msgid "" "Could not open audio device for playback. You don't have permission to open " "the device." @@ -366,11 +282,9 @@ msgstr "" "Nie udaÅ‚o siÄ™ otworzyć urzÄ…dzenia dźwiÄ™kowego do odtwarzania. Brak uprawnieÅ„ " "do otwarcia urzÄ…dzenia." -#: sys/oss4/oss4-sink.c:397 sys/oss4/oss4-source.c:388 msgid "Could not open audio device for playback." msgstr "Nie udaÅ‚o siÄ™ otworzyć urzÄ…dzenia dźwiÄ™kowego do odtwarzania." -#: sys/oss4/oss4-sink.c:406 sys/oss4/oss4-source.c:398 msgid "" "Could not open audio device for playback. This version of the Open Sound " "System is not supported by this element." @@ -378,19 +292,15 @@ msgstr "" "Nie udaÅ‚o siÄ™ otworzyć urzÄ…dzenia dźwiÄ™kowego do odtwarzania. Ta wersja Open " "Sound System nie jest obsÅ‚ugiwana przez ten moduÅ‚." -#: sys/oss4/oss4-sink.c:522 msgid "Playback is not supported by this audio device." msgstr "To urzÄ…dzenie dźwiÄ™kowe nie obsÅ‚uguje odtwarzania." -#: sys/oss4/oss4-sink.c:529 msgid "Audio playback error." msgstr "BÅ‚Ä…d odtwarzania dźwiÄ™ku" -#: sys/oss4/oss4-source.c:520 msgid "Recording is not supported by this audio device." msgstr "To urzÄ…dzenie dźwiÄ™kowe nie obsÅ‚uguje nagrywania." -#: sys/oss4/oss4-source.c:527 msgid "Error recording from audio device." msgstr "BÅ‚Ä…d nagrywania z urzÄ…dzenia dźwiÄ™kowego." diff --git a/po/pt_BR.po b/po/pt_BR.po index 1262cc8d..80ee566b 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad-0.10.10.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-12 00:07+0100\n" +"POT-Creation-Date: 2009-05-16 01:36+0100\n" "PO-Revision-Date: 2009-03-11 02:31-0300\n" "Last-Translator: Fabrício Godoy \n" "Language-Team: Brazilian Portuguese \n" @@ -17,74 +17,58 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "Não foi possível ler as informações de título do DVD." -#: ext/resindvd/resindvdsrc.c:358 #, c-format msgid "Failed to open DVD device '%s'." msgstr "Falha ao abrir o dispositivo de DVD \"%s\"." -#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "Falha ao definir busca baseada em PGC." -#: ext/resindvd/rsnbasesrc.c:1659 msgid "Internal clock error." msgstr "Erro interno do temporizador." -#: ext/resindvd/rsnbasesrc.c:1904 ext/resindvd/rsnbasesrc.c:1915 -#: gst/aiffparse/aiffparse.c:1265 msgid "Internal data flow error." msgstr "Erro interno de fluxo de dados." -#: ext/sndfile/gstsfsink.c:277 ext/sndfile/gstsfsrc.c:345 msgid "No file name specified for writing." msgstr "Nenhum nome de arquivo especificado para gravação." -#: ext/sndfile/gstsfsink.c:290 ext/sndfile/gstsfsrc.c:351 #, c-format msgid "Could not open file \"%s\" for writing." msgstr "Não foi possível abrir o arquivo \"%s\" para gravação." -#: ext/sndfile/gstsfsink.c:440 gst/nuvdemux/gstnuvdemux.c:735 msgid "Internal data stream error." msgstr "Erro interno de fluxo de dados." -#: ext/sndfile/gstsfsink.c:494 ext/sndfile/gstsfsink.c:502 #, c-format msgid "Could not write to file \"%s\"." msgstr "Não foi possível gravar no arquivo \"%s\"." -#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "O dispositivo \"%s\" não existe." -#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Não foi possível abrir o dispositivo de interface \"%s\"." -#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "" "Não foi possível obter as configurações do dispositivo de interface \"%s\"." -#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Não foi possível abrir o arquivo \"%s\" para leitura." -#: sys/oss4/oss4-mixer.c:302 msgid "Could not open audio device for mixer control handling." msgstr "" "Não foi possível abrir o dispositivo de áudio para manuseio do controle de " "mixer." -#: sys/oss4/oss4-mixer.c:316 msgid "" "Could not open audio device for mixer control handling. This version of the " "Open Sound System is not supported by this element." @@ -92,271 +76,204 @@ msgstr "" "Não foi possível abrir o dispositivo de áudio para manuseio do controle de " "mixer. Não há suporte a este elemento nesta versão do Open Sound System." -#: sys/oss4/oss4-mixer.c:720 msgid "Fast" msgstr "Rápido" -#: sys/oss4/oss4-mixer.c:721 msgid "Low" msgstr "Baixo" -#: sys/oss4/oss4-mixer.c:722 msgid "Medium" msgstr "Médio" -#: sys/oss4/oss4-mixer.c:723 msgid "High" msgstr "Alto" -#: sys/oss4/oss4-mixer.c:724 msgid "Very high" msgstr "Muito alto" -#: sys/oss4/oss4-mixer.c:725 msgid "Production" msgstr "Produção" -#: sys/oss4/oss4-mixer.c:726 msgid "Off" msgstr "Desligado" -#: sys/oss4/oss4-mixer.c:727 msgid "On" msgstr "Ligado" -#: sys/oss4/oss4-mixer.c:728 msgid "Stereo" msgstr "Estéreo" -#: sys/oss4/oss4-mixer.c:729 msgid "Surround sound" msgstr "Som surround" -#: sys/oss4/oss4-mixer.c:730 sys/oss4/oss4-mixer.c:805 msgid "Input mix" msgstr "Mistura de entrada" -#: sys/oss4/oss4-mixer.c:731 sys/oss4/oss4-mixer.c:800 msgid "Front" msgstr "Frontal" -#: sys/oss4/oss4-mixer.c:732 sys/oss4/oss4-mixer.c:801 msgid "Rear" msgstr "Traseira" -#: sys/oss4/oss4-mixer.c:733 sys/oss4/oss4-mixer.c:802 msgid "Side" msgstr "Lateral" -#: sys/oss4/oss4-mixer.c:734 sys/oss4/oss4-mixer.c:803 msgid "Center / LFE" msgstr "Centro/LFE" -#: sys/oss4/oss4-mixer.c:735 sys/oss4/oss4-mixer.c:794 msgid "Microphone" msgstr "Microfone" -#: sys/oss4/oss4-mixer.c:736 sys/oss4/oss4-mixer.c:795 msgid "Front panel microphone" msgstr "Microfone do painel frontal" -#: sys/oss4/oss4-mixer.c:737 msgid "Input" msgstr "Entrada" -#: sys/oss4/oss4-mixer.c:738 sys/oss4/oss4-mixer.c:796 msgid "Line-in" msgstr "Entrada de linha" -#: sys/oss4/oss4-mixer.c:739 msgid "PCM 1" msgstr "PCM 1" -#: sys/oss4/oss4-mixer.c:740 msgid "PCM 2" msgstr "PCM 2" -#: sys/oss4/oss4-mixer.c:741 msgid "PCM 3" msgstr "PCM 3" -#: sys/oss4/oss4-mixer.c:742 msgid "PCM 4" msgstr "PCM 4" -#: sys/oss4/oss4-mixer.c:754 msgid "Green connector" msgstr "Conector verde" -#: sys/oss4/oss4-mixer.c:755 msgid "Green front panel connector" msgstr "Conector verde do painel frontal" -#: sys/oss4/oss4-mixer.c:756 msgid "Pink connector" msgstr "Conector rosa" -#: sys/oss4/oss4-mixer.c:757 msgid "Pink front panel connector" msgstr "Conector rosa do painel frontal" -#: sys/oss4/oss4-mixer.c:758 msgid "Blue connector" msgstr "Conector azul" -#: sys/oss4/oss4-mixer.c:759 msgid "Blue front panel connector" msgstr "Conector azul do painel frontal" -#: sys/oss4/oss4-mixer.c:760 msgid "Orange connector" msgstr "Conector laranja" -#: sys/oss4/oss4-mixer.c:761 msgid "Orange front panel connector" msgstr "Conector laranja do painel frontal" -#: sys/oss4/oss4-mixer.c:762 msgid "Black connector" msgstr "Conector preto" -#: sys/oss4/oss4-mixer.c:763 msgid "Black front panel connector" msgstr "Conector preto do painel frontal" -#: sys/oss4/oss4-mixer.c:764 msgid "Gray connector" msgstr "Conector cinza" -#: sys/oss4/oss4-mixer.c:765 msgid "Gray front panel connector" msgstr "Conector cinza do painel frontal" -#: sys/oss4/oss4-mixer.c:766 msgid "White connector" msgstr "Conector branco" -#: sys/oss4/oss4-mixer.c:767 msgid "White front panel connector" msgstr "Conector branco do painel frontal" -#: sys/oss4/oss4-mixer.c:768 msgid "Red connector" msgstr "Conector vermelho" -#: sys/oss4/oss4-mixer.c:769 msgid "Red front panel connector" msgstr "Conector vermelho do painel frontal" -#: sys/oss4/oss4-mixer.c:770 msgid "Yellow connector" msgstr "Conector amarelo" -#: sys/oss4/oss4-mixer.c:771 msgid "Yellow front panel connector" msgstr "Conector amarelo do painel frontal" -#: sys/oss4/oss4-mixer.c:774 msgid "Green connector function" msgstr "Função do conector verde" -#: sys/oss4/oss4-mixer.c:775 msgid "Green front panel connector function" msgstr "Função do conector verde do painel frontal" -#: sys/oss4/oss4-mixer.c:776 msgid "Pink connector function" msgstr "Função do conector rosa" -#: sys/oss4/oss4-mixer.c:777 msgid "Pink front panel connector function" msgstr "Função do conector rosa do painel frontal" -#: sys/oss4/oss4-mixer.c:778 msgid "Blue connector function" msgstr "Função do conector azul" -#: sys/oss4/oss4-mixer.c:779 msgid "Blue front panel connector function" msgstr "Função do conector azul do painel frontal" -#: sys/oss4/oss4-mixer.c:780 msgid "Orange connector function" msgstr "Função do conector laranja" -#: sys/oss4/oss4-mixer.c:781 msgid "Orange front panel connector function" msgstr "Função do conector laranja do painel frontal" -#: sys/oss4/oss4-mixer.c:782 msgid "Black connector function" msgstr "Função do conector preto" -#: sys/oss4/oss4-mixer.c:783 msgid "Black front panel connector function" msgstr "Função do conector preto do painel frontal" -#: sys/oss4/oss4-mixer.c:784 msgid "Gray connector function" msgstr "Função do conector cinza" -#: sys/oss4/oss4-mixer.c:785 msgid "Gray front panel connector function" msgstr "Função do conector cinza do painel frontal" -#: sys/oss4/oss4-mixer.c:786 msgid "White connector function" msgstr "Função do conector branco" -#: sys/oss4/oss4-mixer.c:787 msgid "White front panel connector function" msgstr "Função do conector branco do painel frontal" -#: sys/oss4/oss4-mixer.c:788 msgid "Red connector function" msgstr "Função do conector vermelho" -#: sys/oss4/oss4-mixer.c:789 msgid "Red front panel connector function" msgstr "Função do conector vermelho do painel frontal" -#: sys/oss4/oss4-mixer.c:790 msgid "Yellow connector function" msgstr "Função do conector amarelo" -#: sys/oss4/oss4-mixer.c:791 msgid "Yellow front panel connector function" msgstr "Função do conector amarelo do painel frontal" -#: sys/oss4/oss4-mixer.c:797 msgid "Front panel line-in" msgstr "Entrada de linha do painel frontal" -#: sys/oss4/oss4-mixer.c:798 msgid "Headphones" msgstr "Fones de ouvido" -#: sys/oss4/oss4-mixer.c:799 msgid "Front panel headphones" msgstr "Fones de ouvido do painel frontal" -#: sys/oss4/oss4-mixer.c:804 msgid "PCM" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:846 msgid "Virtual mixer input" msgstr "Entrada do mixer virtual" -#: sys/oss4/oss4-mixer.c:848 msgid "Virtual mixer output" msgstr "Saída do mixer virtual" -#: sys/oss4/oss4-mixer.c:850 msgid "Virtual mixer channel configuration" msgstr "Configuração de canal do mixer virtual" -#: sys/oss4/oss4-sink.c:376 sys/oss4/oss4-source.c:367 msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -364,7 +281,6 @@ msgstr "" "Não foi possível abrir o dispositivo de áudio para reprodução. O dispositivo " "está sendo usado por outro aplicativo." -#: sys/oss4/oss4-sink.c:386 sys/oss4/oss4-source.c:377 msgid "" "Could not open audio device for playback. You don't have permission to open " "the device." @@ -372,11 +288,9 @@ msgstr "" "Não foi possível abrir o dispositivo de áudio para reprodução. Você não tem " "permissão para abrir o dispositivo." -#: sys/oss4/oss4-sink.c:397 sys/oss4/oss4-source.c:388 msgid "Could not open audio device for playback." msgstr "Não foi possível abrir o dispositivo de áudio para reprodução." -#: sys/oss4/oss4-sink.c:406 sys/oss4/oss4-source.c:398 msgid "" "Could not open audio device for playback. This version of the Open Sound " "System is not supported by this element." @@ -384,18 +298,14 @@ msgstr "" "Não foi possível abrir o dispositivo de áudio para reprodução. Não há " "suporte a este elemento nesta versão do Open Sound System." -#: sys/oss4/oss4-sink.c:522 msgid "Playback is not supported by this audio device." msgstr "Não há suporte a reprodução neste dispositivo de áudio." -#: sys/oss4/oss4-sink.c:529 msgid "Audio playback error." msgstr "Erro de reprodução de áudio." -#: sys/oss4/oss4-source.c:520 msgid "Recording is not supported by this audio device." msgstr "Não há suporte a gravação neste dispositivo de áudio." -#: sys/oss4/oss4-source.c:527 msgid "Error recording from audio device." msgstr "Erro ao gravar deste dispositivo de áudio." diff --git a/po/ru.po b/po/ru.po index 978fb83e..962b23c6 100644 --- a/po/ru.po +++ b/po/ru.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.9.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-12 00:07+0100\n" +"POT-Creation-Date: 2009-05-16 01:36+0100\n" "PO-Revision-Date: 2009-02-12 15:00+0200\n" "Last-Translator: Pavel Maryanov \n" "Language-Team: Russian \n" @@ -15,71 +15,55 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "Ðе удалоÑÑŒ прочеÑÑ‚ÑŒ информацию о Ñтруктуре DVD." -#: ext/resindvd/resindvdsrc.c:358 #, c-format msgid "Failed to open DVD device '%s'." msgstr "Ðе удалоÑÑŒ открыть DVD-уÑтройÑтво «%s»." -#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "Ðе удалоÑÑŒ включить PGC-позиционирование." -#: ext/resindvd/rsnbasesrc.c:1659 msgid "Internal clock error." msgstr "ВнутреннÑÑ Ð¾ÑˆÐ¸Ð±ÐºÐ° Ñинхронизации." -#: ext/resindvd/rsnbasesrc.c:1904 ext/resindvd/rsnbasesrc.c:1915 -#: gst/aiffparse/aiffparse.c:1265 msgid "Internal data flow error." msgstr "ВнутреннÑÑ Ð¾ÑˆÐ¸Ð±ÐºÐ° передачи данных." -#: ext/sndfile/gstsfsink.c:277 ext/sndfile/gstsfsrc.c:345 msgid "No file name specified for writing." msgstr "Ðе указано Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð° Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи." -#: ext/sndfile/gstsfsink.c:290 ext/sndfile/gstsfsrc.c:351 #, c-format msgid "Could not open file \"%s\" for writing." msgstr "Ðе удалоÑÑŒ открыть Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи файл «%s»." -#: ext/sndfile/gstsfsink.c:440 gst/nuvdemux/gstnuvdemux.c:735 msgid "Internal data stream error." msgstr "ВнутреннÑÑ Ð¾ÑˆÐ¸Ð±ÐºÐ° потока данных." -#: ext/sndfile/gstsfsink.c:494 ext/sndfile/gstsfsink.c:502 #, c-format msgid "Could not write to file \"%s\"." msgstr "Ðе удалоÑÑŒ оÑущеÑтвить запиÑÑŒ в файл «%s»." -#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "УÑтройÑтво «%s» не ÑущеÑтвует." -#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Ðе удалоÑÑŒ открыть DVB-декодер «%s»." -#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Ðе удалоÑÑŒ получить параметры DVB-декодера «%s»." -#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Ðе удалоÑÑŒ открыть Ð´Ð»Ñ Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ñ„Ð°Ð¹Ð» «%s»." -#: sys/oss4/oss4-mixer.c:302 msgid "Could not open audio device for mixer control handling." msgstr "Ðе удалоÑÑŒ открыть аудио-уÑтройÑтво Ð´Ð»Ñ Ð¾Ð±Ñ€Ð°Ð±Ð¾Ñ‚ÐºÐ¸ параметров микшера." -#: sys/oss4/oss4-mixer.c:316 msgid "" "Could not open audio device for mixer control handling. This version of the " "Open Sound System is not supported by this element." @@ -87,271 +71,204 @@ msgstr "" "Ðе удалоÑÑŒ открыть аудио-уÑтройÑтво Ð´Ð»Ñ Ð¾Ð±Ñ€Ð°Ð±Ð¾Ñ‚ÐºÐ¸ параметров микшера. Ð”Ð°Ð½Ð½Ð°Ñ " "верÑÐ¸Ñ Open Sound System не поддерживаетÑÑ Ñтим Ñлементом." -#: sys/oss4/oss4-mixer.c:720 msgid "Fast" msgstr "СкороÑÑ‚ÑŒ" -#: sys/oss4/oss4-mixer.c:721 msgid "Low" msgstr "Ðизкое" -#: sys/oss4/oss4-mixer.c:722 msgid "Medium" msgstr "Среднее" -#: sys/oss4/oss4-mixer.c:723 msgid "High" msgstr "Ð’Ñ‹Ñокое" -#: sys/oss4/oss4-mixer.c:724 msgid "Very high" msgstr "Очень выÑокое" -#: sys/oss4/oss4-mixer.c:725 msgid "Production" msgstr "ПродукциÑ" -#: sys/oss4/oss4-mixer.c:726 msgid "Off" msgstr "Выкл" -#: sys/oss4/oss4-mixer.c:727 msgid "On" msgstr "Вкл" -#: sys/oss4/oss4-mixer.c:728 msgid "Stereo" msgstr "Стерео" -#: sys/oss4/oss4-mixer.c:729 msgid "Surround sound" msgstr "Объёмный звук" -#: sys/oss4/oss4-mixer.c:730 sys/oss4/oss4-mixer.c:805 msgid "Input mix" msgstr "Уровень входа" -#: sys/oss4/oss4-mixer.c:731 sys/oss4/oss4-mixer.c:800 msgid "Front" msgstr "Фронт" -#: sys/oss4/oss4-mixer.c:732 sys/oss4/oss4-mixer.c:801 msgid "Rear" msgstr "Тыл" -#: sys/oss4/oss4-mixer.c:733 sys/oss4/oss4-mixer.c:802 msgid "Side" msgstr "Боковые" -#: sys/oss4/oss4-mixer.c:734 sys/oss4/oss4-mixer.c:803 msgid "Center / LFE" msgstr "Центр / Сабвуфер" -#: sys/oss4/oss4-mixer.c:735 sys/oss4/oss4-mixer.c:794 msgid "Microphone" msgstr "Микрофон" -#: sys/oss4/oss4-mixer.c:736 sys/oss4/oss4-mixer.c:795 msgid "Front panel microphone" msgstr "Фронтальный микрофон" -#: sys/oss4/oss4-mixer.c:737 msgid "Input" msgstr "Вход" -#: sys/oss4/oss4-mixer.c:738 sys/oss4/oss4-mixer.c:796 msgid "Line-in" msgstr "Линейный вход" -#: sys/oss4/oss4-mixer.c:739 msgid "PCM 1" msgstr "PCM 1" -#: sys/oss4/oss4-mixer.c:740 msgid "PCM 2" msgstr "PCM 2" -#: sys/oss4/oss4-mixer.c:741 msgid "PCM 3" msgstr "PCM 3" -#: sys/oss4/oss4-mixer.c:742 msgid "PCM 4" msgstr "PCM 4" -#: sys/oss4/oss4-mixer.c:754 msgid "Green connector" msgstr "Зелёный разъём" -#: sys/oss4/oss4-mixer.c:755 msgid "Green front panel connector" msgstr "Фронтальный зелёный разъём" -#: sys/oss4/oss4-mixer.c:756 msgid "Pink connector" msgstr "Розовый разъём" -#: sys/oss4/oss4-mixer.c:757 msgid "Pink front panel connector" msgstr "Фронтальный розовый разъём" -#: sys/oss4/oss4-mixer.c:758 msgid "Blue connector" msgstr "Синий разъём" -#: sys/oss4/oss4-mixer.c:759 msgid "Blue front panel connector" msgstr "Фронтальный Ñиний разъём" -#: sys/oss4/oss4-mixer.c:760 msgid "Orange connector" msgstr "Оранжевый разъём" -#: sys/oss4/oss4-mixer.c:761 msgid "Orange front panel connector" msgstr "Фронтальный оранжевый разъём" -#: sys/oss4/oss4-mixer.c:762 msgid "Black connector" msgstr "Чёрный разъём" -#: sys/oss4/oss4-mixer.c:763 msgid "Black front panel connector" msgstr "Фронтальный чёрный разъём" -#: sys/oss4/oss4-mixer.c:764 msgid "Gray connector" msgstr "Серый разъём" -#: sys/oss4/oss4-mixer.c:765 msgid "Gray front panel connector" msgstr "Фронтальный Ñерый разъём" -#: sys/oss4/oss4-mixer.c:766 msgid "White connector" msgstr "Белый разъём" -#: sys/oss4/oss4-mixer.c:767 msgid "White front panel connector" msgstr "Фронтальный белый разъём" -#: sys/oss4/oss4-mixer.c:768 msgid "Red connector" msgstr "КраÑный разъём" -#: sys/oss4/oss4-mixer.c:769 msgid "Red front panel connector" msgstr "Фронтальный краÑный разъём" -#: sys/oss4/oss4-mixer.c:770 msgid "Yellow connector" msgstr "Жёлтый разъём" -#: sys/oss4/oss4-mixer.c:771 msgid "Yellow front panel connector" msgstr "Фронтальный жёлтый разъём" -#: sys/oss4/oss4-mixer.c:774 msgid "Green connector function" msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ð·ÐµÐ»Ñ‘Ð½Ð¾Ð³Ð¾ разъёма" -#: sys/oss4/oss4-mixer.c:775 msgid "Green front panel connector function" msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ñ„Ñ€Ð¾Ð½Ñ‚Ð°Ð»ÑŒÐ½Ð¾Ð³Ð¾ зелёного разъёма" -#: sys/oss4/oss4-mixer.c:776 msgid "Pink connector function" msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ñ€Ð¾Ð·Ð¾Ð²Ð¾Ð³Ð¾ разъёма" -#: sys/oss4/oss4-mixer.c:777 msgid "Pink front panel connector function" msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ñ„Ñ€Ð¾Ð½Ñ‚Ð°Ð»ÑŒÐ½Ð¾Ð³Ð¾ розового разъёма" -#: sys/oss4/oss4-mixer.c:778 msgid "Blue connector function" msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ñинего разъёма" -#: sys/oss4/oss4-mixer.c:779 msgid "Blue front panel connector function" msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ñ„Ñ€Ð¾Ð½Ñ‚Ð°Ð»ÑŒÐ½Ð¾Ð³Ð¾ Ñинего разъёма" -#: sys/oss4/oss4-mixer.c:780 msgid "Orange connector function" msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ð¾Ñ€Ð°Ð½Ð¶ÐµÐ²Ð¾Ð³Ð¾ разъёма" -#: sys/oss4/oss4-mixer.c:781 msgid "Orange front panel connector function" msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ñ„Ñ€Ð¾Ð½Ñ‚Ð°Ð»ÑŒÐ½Ð¾Ð³Ð¾ оранжевого разъёма" -#: sys/oss4/oss4-mixer.c:782 msgid "Black connector function" msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ñ‡Ñ‘Ñ€Ð½Ð¾Ð³Ð¾ разъёма" -#: sys/oss4/oss4-mixer.c:783 msgid "Black front panel connector function" msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ñ„Ñ€Ð¾Ð½Ñ‚Ð°Ð»ÑŒÐ½Ð¾Ð³Ð¾ чёрного разъёма" -#: sys/oss4/oss4-mixer.c:784 msgid "Gray connector function" msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ñерого разъёма" -#: sys/oss4/oss4-mixer.c:785 msgid "Gray front panel connector function" msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ñ„Ñ€Ð¾Ð½Ñ‚Ð°Ð»ÑŒÐ½Ð¾Ð³Ð¾ Ñерого разъёма" -#: sys/oss4/oss4-mixer.c:786 msgid "White connector function" msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ð±ÐµÐ»Ð¾Ð³Ð¾ разъёма" -#: sys/oss4/oss4-mixer.c:787 msgid "White front panel connector function" msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ñ„Ñ€Ð¾Ð½Ñ‚Ð°Ð»ÑŒÐ½Ð¾Ð³Ð¾ белого разъёма" -#: sys/oss4/oss4-mixer.c:788 msgid "Red connector function" msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ ÐºÑ€Ð°Ñного разъёма" -#: sys/oss4/oss4-mixer.c:789 msgid "Red front panel connector function" msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ñ„Ñ€Ð¾Ð½Ñ‚Ð°Ð»ÑŒÐ½Ð¾Ð³Ð¾ краÑного разъёма" -#: sys/oss4/oss4-mixer.c:790 msgid "Yellow connector function" msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ð¶Ñ‘Ð»Ñ‚Ð¾Ð³Ð¾ разъёма" -#: sys/oss4/oss4-mixer.c:791 msgid "Yellow front panel connector function" msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ñ„Ñ€Ð¾Ð½Ñ‚Ð°Ð»ÑŒÐ½Ð¾Ð³Ð¾ жёлтого разъёма" -#: sys/oss4/oss4-mixer.c:797 msgid "Front panel line-in" msgstr "Фронтальный линейный вход" -#: sys/oss4/oss4-mixer.c:798 msgid "Headphones" msgstr "Ðаушники" -#: sys/oss4/oss4-mixer.c:799 msgid "Front panel headphones" msgstr "Фронтальные наушники" -#: sys/oss4/oss4-mixer.c:804 msgid "PCM" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:846 msgid "Virtual mixer input" msgstr "Виртуальный вход микшера" -#: sys/oss4/oss4-mixer.c:848 msgid "Virtual mixer output" msgstr "Виртуальный выход микшера" -#: sys/oss4/oss4-mixer.c:850 msgid "Virtual mixer channel configuration" msgstr "ÐšÐ¾Ð½Ñ„Ð¸Ð³ÑƒÑ€Ð°Ñ†Ð¸Ñ Ð²Ð¸Ñ€Ñ‚ÑƒÐ°Ð»ÑŒÐ½Ñ‹Ñ… каналов микшера" -#: sys/oss4/oss4-sink.c:376 sys/oss4/oss4-source.c:367 msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -359,7 +276,6 @@ msgstr "" "Ðе удалоÑÑŒ открыть аудио-уÑтройÑтво Ð´Ð»Ñ Ð²Ð¾ÑпроизведениÑ. УÑтройÑтво " "иÑпользуетÑÑ Ð´Ñ€ÑƒÐ³Ð¸Ð¼ приложением." -#: sys/oss4/oss4-sink.c:386 sys/oss4/oss4-source.c:377 msgid "" "Could not open audio device for playback. You don't have permission to open " "the device." @@ -367,11 +283,9 @@ msgstr "" "Ðе удалоÑÑŒ открыть аудио-уÑтройÑтво Ð´Ð»Ñ Ð²Ð¾ÑпроизведениÑ. ОтÑутÑтвуют права " "доÑтупа к уÑтройÑтву." -#: sys/oss4/oss4-sink.c:397 sys/oss4/oss4-source.c:388 msgid "Could not open audio device for playback." msgstr "Ðе удалоÑÑŒ открыть аудио-уÑтройÑтво Ð´Ð»Ñ Ð²Ð¾ÑпроизведениÑ." -#: sys/oss4/oss4-sink.c:406 sys/oss4/oss4-source.c:398 msgid "" "Could not open audio device for playback. This version of the Open Sound " "System is not supported by this element." @@ -379,19 +293,15 @@ msgstr "" "Ðе удалоÑÑŒ открыть аудио-уÑтройÑтво Ð´Ð»Ñ Ð²Ð¾ÑпроизведениÑ. Ð”Ð°Ð½Ð½Ð°Ñ Ð²ÐµÑ€ÑÐ¸Ñ Open " "Sound System не поддерживаетÑÑ Ñтим Ñлементом." -#: sys/oss4/oss4-sink.c:522 msgid "Playback is not supported by this audio device." msgstr "ВоÑпроизведение не поддерживаетÑÑ Ð´Ð°Ð½Ð½Ñ‹Ð¼ аудио-уÑтройÑтвом." -#: sys/oss4/oss4-sink.c:529 msgid "Audio playback error." msgstr "Ошибка воÑÐ¿Ñ€Ð¾Ð¸Ð·Ð²ÐµÐ´ÐµÐ½Ð¸Ñ Ð°ÑƒÐ´Ð¸Ð¾." -#: sys/oss4/oss4-source.c:520 msgid "Recording is not supported by this audio device." msgstr "ЗапиÑÑŒ не поддерживаетÑÑ Ð´Ð°Ð½Ð½Ñ‹Ð¼ аудио-уÑтройÑтвом." -#: sys/oss4/oss4-source.c:527 msgid "Error recording from audio device." msgstr "Ошибка запиÑи Ñ Ð°ÑƒÐ´Ð¸Ð¾-уÑтройÑтва." diff --git a/po/sk.po b/po/sk.po index 0ff45d17..626f6e02 100644 --- a/po/sk.po +++ b/po/sk.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.8.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-12 00:07+0100\n" +"POT-Creation-Date: 2009-05-16 01:36+0100\n" "PO-Revision-Date: 2008-11-04 09:39+0100\n" "Last-Translator: Peter Tuhársky \n" "Language-Team: Slovak \n" @@ -20,71 +20,55 @@ msgstr "" "X-Poedit-Language: Slovak\n" "X-Poedit-Country: SLOVAKIA\n" -#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "Nepodarilo sa preÄítaÅ¥ titulok DVD." -#: ext/resindvd/resindvdsrc.c:358 #, c-format msgid "Failed to open DVD device '%s'." msgstr "Nepodarilo sa otvoriÅ¥ zariadenie DVD '%s'." -#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "" -#: ext/resindvd/rsnbasesrc.c:1659 msgid "Internal clock error." msgstr "Vnútorná chyba ÄasovaÄa." -#: ext/resindvd/rsnbasesrc.c:1904 ext/resindvd/rsnbasesrc.c:1915 -#: gst/aiffparse/aiffparse.c:1265 msgid "Internal data flow error." msgstr "Vnútorná chyba prúdu údajov." -#: ext/sndfile/gstsfsink.c:277 ext/sndfile/gstsfsrc.c:345 msgid "No file name specified for writing." msgstr "Nebolo zadané žiadne meno súboru pre zápis." -#: ext/sndfile/gstsfsink.c:290 ext/sndfile/gstsfsrc.c:351 #, c-format msgid "Could not open file \"%s\" for writing." msgstr "Nepodarilo sa otvoriÅ¥ súbor \"%s\" pre zápis." -#: ext/sndfile/gstsfsink.c:440 gst/nuvdemux/gstnuvdemux.c:735 msgid "Internal data stream error." msgstr "Vnútorná chyba prúdu údajov." -#: ext/sndfile/gstsfsink.c:494 ext/sndfile/gstsfsink.c:502 #, c-format msgid "Could not write to file \"%s\"." msgstr "Nepodarilo sa zapísaÅ¥ do súboru \"%s\"." -#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Zariadenie \"%s\" neexistuje." -#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Nepodarilo sa otvoriÅ¥ ovládacie zariadenie \"%s\"." -#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Nepodarilo sa získaÅ¥ nastavenia od zariadenia \"%s\"." -#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Nepodarilo sa otvoriÅ¥ súbor \"%s\" na Äítanie." -#: sys/oss4/oss4-mixer.c:302 msgid "Could not open audio device for mixer control handling." msgstr "Nepodarilo sa otvoriÅ¥ zvukové zariadenie pre obsluhu ovládania mixéra." -#: sys/oss4/oss4-mixer.c:316 msgid "" "Could not open audio device for mixer control handling. This version of the " "Open Sound System is not supported by this element." @@ -92,271 +76,204 @@ msgstr "" "Nepodarilo sa otvoriÅ¥ zvukové zariadenie pre obsluhu ovládania mixéra. Táto " "verzia Open Sound System nie je podporovaná týmto prvkom." -#: sys/oss4/oss4-mixer.c:720 msgid "Fast" msgstr "Rýchla" -#: sys/oss4/oss4-mixer.c:721 msgid "Low" msgstr "Nízka" -#: sys/oss4/oss4-mixer.c:722 msgid "Medium" msgstr "Stredná" -#: sys/oss4/oss4-mixer.c:723 msgid "High" msgstr "Vysoká" -#: sys/oss4/oss4-mixer.c:724 msgid "Very high" msgstr "Veľmi vysoká" -#: sys/oss4/oss4-mixer.c:725 msgid "Production" msgstr "ProdukÄná" -#: sys/oss4/oss4-mixer.c:726 msgid "Off" msgstr "Vyp" -#: sys/oss4/oss4-mixer.c:727 msgid "On" msgstr "Zap" -#: sys/oss4/oss4-mixer.c:728 msgid "Stereo" msgstr "Stereo" -#: sys/oss4/oss4-mixer.c:729 msgid "Surround sound" msgstr "Surround" -#: sys/oss4/oss4-mixer.c:730 sys/oss4/oss4-mixer.c:805 msgid "Input mix" msgstr "Vstup mix" -#: sys/oss4/oss4-mixer.c:731 sys/oss4/oss4-mixer.c:800 msgid "Front" msgstr "Predné" -#: sys/oss4/oss4-mixer.c:732 sys/oss4/oss4-mixer.c:801 msgid "Rear" msgstr "Zadné" -#: sys/oss4/oss4-mixer.c:733 sys/oss4/oss4-mixer.c:802 msgid "Side" msgstr "Postranné" -#: sys/oss4/oss4-mixer.c:734 sys/oss4/oss4-mixer.c:803 msgid "Center / LFE" msgstr "Stredné / LFE" -#: sys/oss4/oss4-mixer.c:735 sys/oss4/oss4-mixer.c:794 msgid "Microphone" msgstr "Mikrofón" -#: sys/oss4/oss4-mixer.c:736 sys/oss4/oss4-mixer.c:795 msgid "Front panel microphone" msgstr "Mikrofón predného panelu" -#: sys/oss4/oss4-mixer.c:737 msgid "Input" msgstr "Vstup" -#: sys/oss4/oss4-mixer.c:738 sys/oss4/oss4-mixer.c:796 msgid "Line-in" msgstr "Linkový vstup" -#: sys/oss4/oss4-mixer.c:739 msgid "PCM 1" msgstr "PCM 1" -#: sys/oss4/oss4-mixer.c:740 msgid "PCM 2" msgstr "PCM 2" -#: sys/oss4/oss4-mixer.c:741 msgid "PCM 3" msgstr "PCM 3" -#: sys/oss4/oss4-mixer.c:742 msgid "PCM 4" msgstr "PCM 4" -#: sys/oss4/oss4-mixer.c:754 msgid "Green connector" msgstr "Zelený konektor" -#: sys/oss4/oss4-mixer.c:755 msgid "Green front panel connector" msgstr "Zelený konektor na prednom paneli" -#: sys/oss4/oss4-mixer.c:756 msgid "Pink connector" msgstr "Ružový konektor" -#: sys/oss4/oss4-mixer.c:757 msgid "Pink front panel connector" msgstr "Ružový konektor na prednom paneli" -#: sys/oss4/oss4-mixer.c:758 msgid "Blue connector" msgstr "Modrý konektor" -#: sys/oss4/oss4-mixer.c:759 msgid "Blue front panel connector" msgstr "Modrý konektor na prednom paneli" -#: sys/oss4/oss4-mixer.c:760 msgid "Orange connector" msgstr "Oranžový konektor" -#: sys/oss4/oss4-mixer.c:761 msgid "Orange front panel connector" msgstr "Oranžový konektor na prednom paneli" -#: sys/oss4/oss4-mixer.c:762 msgid "Black connector" msgstr "ÄŒierny konektor" -#: sys/oss4/oss4-mixer.c:763 msgid "Black front panel connector" msgstr "ÄŒierny konektor na prednom paneli" -#: sys/oss4/oss4-mixer.c:764 msgid "Gray connector" msgstr "Å edý konektor" -#: sys/oss4/oss4-mixer.c:765 msgid "Gray front panel connector" msgstr "Å edý konektor na prednom paneli" -#: sys/oss4/oss4-mixer.c:766 msgid "White connector" msgstr "Biely konektor" -#: sys/oss4/oss4-mixer.c:767 msgid "White front panel connector" msgstr "Biely konektor na prednom paneli" -#: sys/oss4/oss4-mixer.c:768 msgid "Red connector" msgstr "ÄŒervený konektor" -#: sys/oss4/oss4-mixer.c:769 msgid "Red front panel connector" msgstr "ÄŒervený konektor na prednom paneli" -#: sys/oss4/oss4-mixer.c:770 msgid "Yellow connector" msgstr "Žltý konektor" -#: sys/oss4/oss4-mixer.c:771 msgid "Yellow front panel connector" msgstr "Žltý konektor na prednom paneli" -#: sys/oss4/oss4-mixer.c:774 msgid "Green connector function" msgstr "Funkcia zeleného konektora" -#: sys/oss4/oss4-mixer.c:775 msgid "Green front panel connector function" msgstr "Funkcia zeleného konektora na prednom paneli" -#: sys/oss4/oss4-mixer.c:776 msgid "Pink connector function" msgstr "Funkcia ružového konektora" -#: sys/oss4/oss4-mixer.c:777 msgid "Pink front panel connector function" msgstr "Funkcia ružového konektora na prednom paneli" -#: sys/oss4/oss4-mixer.c:778 msgid "Blue connector function" msgstr "Funkcia modrého konektora" -#: sys/oss4/oss4-mixer.c:779 msgid "Blue front panel connector function" msgstr "Funkcia modrého konektora na prednom paneli" -#: sys/oss4/oss4-mixer.c:780 msgid "Orange connector function" msgstr "Funkcia oranžového konektora" -#: sys/oss4/oss4-mixer.c:781 msgid "Orange front panel connector function" msgstr "Funkcia oranžového konektora na prednom paneli" -#: sys/oss4/oss4-mixer.c:782 msgid "Black connector function" msgstr "Funkcia Äierneho konektora" -#: sys/oss4/oss4-mixer.c:783 msgid "Black front panel connector function" msgstr "Funkcia Äierneho konektora na prednom paneli" -#: sys/oss4/oss4-mixer.c:784 msgid "Gray connector function" msgstr "Funkcia Å¡edého konektora" -#: sys/oss4/oss4-mixer.c:785 msgid "Gray front panel connector function" msgstr "Funkcia Å¡edého konektora na prednom paneli" -#: sys/oss4/oss4-mixer.c:786 msgid "White connector function" msgstr "Funkcia bieleho konektora" -#: sys/oss4/oss4-mixer.c:787 msgid "White front panel connector function" msgstr "Funkcia bieleho konektora na prednom paneli" -#: sys/oss4/oss4-mixer.c:788 msgid "Red connector function" msgstr "Funkcia Äerveného konektora" -#: sys/oss4/oss4-mixer.c:789 msgid "Red front panel connector function" msgstr "Funkcia Äerveného konektora na prednom paneli" -#: sys/oss4/oss4-mixer.c:790 msgid "Yellow connector function" msgstr "Funkcia žltého konektora" -#: sys/oss4/oss4-mixer.c:791 msgid "Yellow front panel connector function" msgstr "Funkcia žltého konektora na prednom paneli" -#: sys/oss4/oss4-mixer.c:797 msgid "Front panel line-in" msgstr "Linkový vstup na prednom paneli" -#: sys/oss4/oss4-mixer.c:798 msgid "Headphones" msgstr "Slúchadlá" -#: sys/oss4/oss4-mixer.c:799 msgid "Front panel headphones" msgstr "Slúchadlá na prednom paneli" -#: sys/oss4/oss4-mixer.c:804 msgid "PCM" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:846 msgid "Virtual mixer input" msgstr "Vstup virtuálneho mixéra" -#: sys/oss4/oss4-mixer.c:848 msgid "Virtual mixer output" msgstr "Výstup virtuálneho mixéra" -#: sys/oss4/oss4-mixer.c:850 msgid "Virtual mixer channel configuration" msgstr "Konfigurácia kanálov virtuálneho mixéra" -#: sys/oss4/oss4-sink.c:376 sys/oss4/oss4-source.c:367 msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -364,7 +281,6 @@ msgstr "" "Nepodarilo sa otvoriÅ¥ zvukové zariadenie v režime prehrávania. Zariadenie už " "používa iná aplikácia." -#: sys/oss4/oss4-sink.c:386 sys/oss4/oss4-source.c:377 msgid "" "Could not open audio device for playback. You don't have permission to open " "the device." @@ -372,11 +288,9 @@ msgstr "" "Nepodarilo sa otvoriÅ¥ zvukové zariadenie v režime prehrávania. Nemáte " "oprávnenie na otvorenie tohto zariadenia." -#: sys/oss4/oss4-sink.c:397 sys/oss4/oss4-source.c:388 msgid "Could not open audio device for playback." msgstr "Nepodarilo sa otvoriÅ¥ zvukové zariadenie v režime prehrávania." -#: sys/oss4/oss4-sink.c:406 sys/oss4/oss4-source.c:398 msgid "" "Could not open audio device for playback. This version of the Open Sound " "System is not supported by this element." @@ -384,19 +298,15 @@ msgstr "" "Nepodarilo sa otvoriÅ¥ zvukové zariadenie v režime prehrávania. Túto verziu " "Open Sound System nepodporuje tento prvok." -#: sys/oss4/oss4-sink.c:522 msgid "Playback is not supported by this audio device." msgstr "Toto zvukové zariadenie nepodporuje prehrávanie." -#: sys/oss4/oss4-sink.c:529 msgid "Audio playback error." msgstr "Chyba prehrávania zvuku." -#: sys/oss4/oss4-source.c:520 msgid "Recording is not supported by this audio device." msgstr "Toto zvukové zariadenie nepodporuje záznam." -#: sys/oss4/oss4-source.c:527 msgid "Error recording from audio device." msgstr "Chyba pri zázname zo zvukového zariadenia." diff --git a/po/sq.po b/po/sq.po index 24361e22..5043b13b 100644 --- a/po/sq.po +++ b/po/sq.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.7.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-12 00:07+0100\n" +"POT-Creation-Date: 2009-05-16 01:36+0100\n" "PO-Revision-Date: 2008-08-15 16:07+0200\n" "Last-Translator: Laurent Dhima \n" "Language-Team: Albanian \n" @@ -14,386 +14,296 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ext/resindvd/resindvdsrc.c:352 #, fuzzy msgid "Could not read title information for DVD." msgstr "I pamundur shkrimi tek file \"%s\"." -#: ext/resindvd/resindvdsrc.c:358 #, fuzzy, c-format msgid "Failed to open DVD device '%s'." msgstr "E pamundur hapja e dispozitivit frontend \"%s\"." -#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "" -#: ext/resindvd/rsnbasesrc.c:1659 #, fuzzy msgid "Internal clock error." msgstr "Gabim i brendshëm tek stream i të dhënave." -#: ext/resindvd/rsnbasesrc.c:1904 ext/resindvd/rsnbasesrc.c:1915 -#: gst/aiffparse/aiffparse.c:1265 #, fuzzy msgid "Internal data flow error." msgstr "Gabim i brendshëm tek stream i të dhënave." -#: ext/sndfile/gstsfsink.c:277 ext/sndfile/gstsfsrc.c:345 msgid "No file name specified for writing." msgstr "Asnjë emër file specifikuar për shkrim." -#: ext/sndfile/gstsfsink.c:290 ext/sndfile/gstsfsrc.c:351 #, c-format msgid "Could not open file \"%s\" for writing." msgstr "E pamundur hapja e file \"%s\" në shkrim." -#: ext/sndfile/gstsfsink.c:440 gst/nuvdemux/gstnuvdemux.c:735 msgid "Internal data stream error." msgstr "Gabim i brendshëm tek stream i të dhënave." -#: ext/sndfile/gstsfsink.c:494 ext/sndfile/gstsfsink.c:502 #, c-format msgid "Could not write to file \"%s\"." msgstr "I pamundur shkrimi tek file \"%s\"." -#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Dispozitivi \"%s\" nuk ekziston." -#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "E pamundur hapja e dispozitivit frontend \"%s\"." -#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "E pamundur marrja e rregullimeve nga dispozitivi frontend \"%s\"." -#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "E pamundur hapja e file \"%s\" për lexim." -#: sys/oss4/oss4-mixer.c:302 #, fuzzy msgid "Could not open audio device for mixer control handling." msgstr "E pamundur hapja e dispozitivit të zërit \"%s\" për shkrim." -#: sys/oss4/oss4-mixer.c:316 msgid "" "Could not open audio device for mixer control handling. This version of the " "Open Sound System is not supported by this element." msgstr "" -#: sys/oss4/oss4-mixer.c:720 msgid "Fast" msgstr "" -#: sys/oss4/oss4-mixer.c:721 msgid "Low" msgstr "" -#: sys/oss4/oss4-mixer.c:722 msgid "Medium" msgstr "" -#: sys/oss4/oss4-mixer.c:723 msgid "High" msgstr "" -#: sys/oss4/oss4-mixer.c:724 msgid "Very high" msgstr "" -#: sys/oss4/oss4-mixer.c:725 msgid "Production" msgstr "" -#: sys/oss4/oss4-mixer.c:726 msgid "Off" msgstr "" -#: sys/oss4/oss4-mixer.c:727 msgid "On" msgstr "" -#: sys/oss4/oss4-mixer.c:728 msgid "Stereo" msgstr "" -#: sys/oss4/oss4-mixer.c:729 msgid "Surround sound" msgstr "" -#: sys/oss4/oss4-mixer.c:730 sys/oss4/oss4-mixer.c:805 msgid "Input mix" msgstr "" -#: sys/oss4/oss4-mixer.c:731 sys/oss4/oss4-mixer.c:800 msgid "Front" msgstr "" -#: sys/oss4/oss4-mixer.c:732 sys/oss4/oss4-mixer.c:801 #, fuzzy msgid "Rear" msgstr "Regjistrimi" -#: sys/oss4/oss4-mixer.c:733 sys/oss4/oss4-mixer.c:802 #, fuzzy msgid "Side" msgstr "Video" -#: sys/oss4/oss4-mixer.c:734 sys/oss4/oss4-mixer.c:803 msgid "Center / LFE" msgstr "" -#: sys/oss4/oss4-mixer.c:735 sys/oss4/oss4-mixer.c:794 msgid "Microphone" msgstr "Mikrofoni" -#: sys/oss4/oss4-mixer.c:736 sys/oss4/oss4-mixer.c:795 msgid "Front panel microphone" msgstr "" -#: sys/oss4/oss4-mixer.c:737 msgid "Input" msgstr "" -#: sys/oss4/oss4-mixer.c:738 sys/oss4/oss4-mixer.c:796 msgid "Line-in" msgstr "Linja-hyrje" -#: sys/oss4/oss4-mixer.c:739 #, fuzzy msgid "PCM 1" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:740 #, fuzzy msgid "PCM 2" msgstr "PCM-2" -#: sys/oss4/oss4-mixer.c:741 #, fuzzy msgid "PCM 3" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:742 #, fuzzy msgid "PCM 4" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:754 msgid "Green connector" msgstr "" -#: sys/oss4/oss4-mixer.c:755 msgid "Green front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:756 msgid "Pink connector" msgstr "" -#: sys/oss4/oss4-mixer.c:757 msgid "Pink front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:758 msgid "Blue connector" msgstr "" -#: sys/oss4/oss4-mixer.c:759 msgid "Blue front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:760 msgid "Orange connector" msgstr "" -#: sys/oss4/oss4-mixer.c:761 msgid "Orange front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:762 msgid "Black connector" msgstr "" -#: sys/oss4/oss4-mixer.c:763 msgid "Black front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:764 msgid "Gray connector" msgstr "" -#: sys/oss4/oss4-mixer.c:765 msgid "Gray front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:766 msgid "White connector" msgstr "" -#: sys/oss4/oss4-mixer.c:767 msgid "White front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:768 msgid "Red connector" msgstr "" -#: sys/oss4/oss4-mixer.c:769 msgid "Red front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:770 msgid "Yellow connector" msgstr "" -#: sys/oss4/oss4-mixer.c:771 msgid "Yellow front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:774 msgid "Green connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:775 msgid "Green front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:776 msgid "Pink connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:777 msgid "Pink front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:778 msgid "Blue connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:779 msgid "Blue front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:780 msgid "Orange connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:781 msgid "Orange front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:782 msgid "Black connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:783 msgid "Black front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:784 msgid "Gray connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:785 msgid "Gray front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:786 msgid "White connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:787 msgid "White front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:788 msgid "Red connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:789 msgid "Red front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:790 msgid "Yellow connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:791 msgid "Yellow front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:797 msgid "Front panel line-in" msgstr "" -#: sys/oss4/oss4-mixer.c:798 msgid "Headphones" msgstr "" -#: sys/oss4/oss4-mixer.c:799 msgid "Front panel headphones" msgstr "" -#: sys/oss4/oss4-mixer.c:804 msgid "PCM" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:846 msgid "Virtual mixer input" msgstr "" -#: sys/oss4/oss4-mixer.c:848 msgid "Virtual mixer output" msgstr "" -#: sys/oss4/oss4-mixer.c:850 msgid "Virtual mixer channel configuration" msgstr "" -#: sys/oss4/oss4-sink.c:376 sys/oss4/oss4-source.c:367 msgid "" "Could not open audio device for playback. Device is being used by another " "application." msgstr "" -#: sys/oss4/oss4-sink.c:386 sys/oss4/oss4-source.c:377 msgid "" "Could not open audio device for playback. You don't have permission to open " "the device." msgstr "" -#: sys/oss4/oss4-sink.c:397 sys/oss4/oss4-source.c:388 #, fuzzy msgid "Could not open audio device for playback." msgstr "E pamundur hapja e dispozitivit të zërit \"%s\" për shkrim." -#: sys/oss4/oss4-sink.c:406 sys/oss4/oss4-source.c:398 msgid "" "Could not open audio device for playback. This version of the Open Sound " "System is not supported by this element." msgstr "" -#: sys/oss4/oss4-sink.c:522 msgid "Playback is not supported by this audio device." msgstr "" -#: sys/oss4/oss4-sink.c:529 msgid "Audio playback error." msgstr "" -#: sys/oss4/oss4-source.c:520 msgid "Recording is not supported by this audio device." msgstr "" -#: sys/oss4/oss4-source.c:527 msgid "Error recording from audio device." msgstr "" diff --git a/po/sr.po b/po/sr.po index 8af631fc..6b57f350 100644 --- a/po/sr.po +++ b/po/sr.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins 0.7.6\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-12 00:07+0100\n" +"POT-Creation-Date: 2009-05-16 01:36+0100\n" "PO-Revision-Date: 2004-03-13 00:18+0100\n" "Last-Translator: Danilo Segan \n" "Language-Team: Serbian \n" @@ -16,385 +16,295 @@ msgstr "" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : (n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" -#: ext/resindvd/resindvdsrc.c:352 #, fuzzy msgid "Could not read title information for DVD." msgstr "Ðе могу да пишем у датотеку „%s“." -#: ext/resindvd/resindvdsrc.c:358 #, fuzzy, c-format msgid "Failed to open DVD device '%s'." msgstr "Ðе могу да затворим управљачки уређај „%s“." -#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "" -#: ext/resindvd/rsnbasesrc.c:1659 msgid "Internal clock error." msgstr "" -#: ext/resindvd/rsnbasesrc.c:1904 ext/resindvd/rsnbasesrc.c:1915 -#: gst/aiffparse/aiffparse.c:1265 msgid "Internal data flow error." msgstr "" -#: ext/sndfile/gstsfsink.c:277 ext/sndfile/gstsfsrc.c:345 #, fuzzy msgid "No file name specified for writing." msgstr "Име датотеке није задато." -#: ext/sndfile/gstsfsink.c:290 ext/sndfile/gstsfsrc.c:351 #, c-format msgid "Could not open file \"%s\" for writing." msgstr "Ðе могу да отворим датотеку „%s“ ради упиÑа." -#: ext/sndfile/gstsfsink.c:440 gst/nuvdemux/gstnuvdemux.c:735 msgid "Internal data stream error." msgstr "" -#: ext/sndfile/gstsfsink.c:494 ext/sndfile/gstsfsink.c:502 #, c-format msgid "Could not write to file \"%s\"." msgstr "Ðе могу да пишем у датотеку „%s“." -#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Ðе поÑтоји уређај „%s“." -#: sys/dvb/gstdvbsrc.c:710 #, fuzzy, c-format msgid "Could not open frontend device \"%s\"." msgstr "Ðе могу да затворим управљачки уређај „%s“." -#: sys/dvb/gstdvbsrc.c:722 #, fuzzy, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Ðе могу да примим довољно бафера Ñа уређаја „%s“." -#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Ðе могу да отворим датотеку „%s“ ради читања." -#: sys/oss4/oss4-mixer.c:302 #, fuzzy msgid "Could not open audio device for mixer control handling." msgstr "Ðе могу да отворим звучни уређај „%s“ ради упиÑа." -#: sys/oss4/oss4-mixer.c:316 msgid "" "Could not open audio device for mixer control handling. This version of the " "Open Sound System is not supported by this element." msgstr "" -#: sys/oss4/oss4-mixer.c:720 msgid "Fast" msgstr "" -#: sys/oss4/oss4-mixer.c:721 msgid "Low" msgstr "" -#: sys/oss4/oss4-mixer.c:722 msgid "Medium" msgstr "" -#: sys/oss4/oss4-mixer.c:723 msgid "High" msgstr "" -#: sys/oss4/oss4-mixer.c:724 msgid "Very high" msgstr "" -#: sys/oss4/oss4-mixer.c:725 msgid "Production" msgstr "" -#: sys/oss4/oss4-mixer.c:726 msgid "Off" msgstr "" -#: sys/oss4/oss4-mixer.c:727 msgid "On" msgstr "" -#: sys/oss4/oss4-mixer.c:728 msgid "Stereo" msgstr "" -#: sys/oss4/oss4-mixer.c:729 msgid "Surround sound" msgstr "" -#: sys/oss4/oss4-mixer.c:730 sys/oss4/oss4-mixer.c:805 msgid "Input mix" msgstr "" -#: sys/oss4/oss4-mixer.c:731 sys/oss4/oss4-mixer.c:800 msgid "Front" msgstr "" -#: sys/oss4/oss4-mixer.c:732 sys/oss4/oss4-mixer.c:801 #, fuzzy msgid "Rear" msgstr "Снимање" -#: sys/oss4/oss4-mixer.c:733 sys/oss4/oss4-mixer.c:802 #, fuzzy msgid "Side" msgstr "Видео" -#: sys/oss4/oss4-mixer.c:734 sys/oss4/oss4-mixer.c:803 msgid "Center / LFE" msgstr "" -#: sys/oss4/oss4-mixer.c:735 sys/oss4/oss4-mixer.c:794 msgid "Microphone" msgstr "Микрофон" -#: sys/oss4/oss4-mixer.c:736 sys/oss4/oss4-mixer.c:795 msgid "Front panel microphone" msgstr "" -#: sys/oss4/oss4-mixer.c:737 msgid "Input" msgstr "" -#: sys/oss4/oss4-mixer.c:738 sys/oss4/oss4-mixer.c:796 msgid "Line-in" msgstr "Ул.лин." -#: sys/oss4/oss4-mixer.c:739 #, fuzzy msgid "PCM 1" msgstr "ПЦМ" -#: sys/oss4/oss4-mixer.c:740 #, fuzzy msgid "PCM 2" msgstr "ПЦМ-2" -#: sys/oss4/oss4-mixer.c:741 #, fuzzy msgid "PCM 3" msgstr "ПЦМ" -#: sys/oss4/oss4-mixer.c:742 #, fuzzy msgid "PCM 4" msgstr "ПЦМ" -#: sys/oss4/oss4-mixer.c:754 msgid "Green connector" msgstr "" -#: sys/oss4/oss4-mixer.c:755 msgid "Green front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:756 msgid "Pink connector" msgstr "" -#: sys/oss4/oss4-mixer.c:757 msgid "Pink front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:758 msgid "Blue connector" msgstr "" -#: sys/oss4/oss4-mixer.c:759 msgid "Blue front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:760 msgid "Orange connector" msgstr "" -#: sys/oss4/oss4-mixer.c:761 msgid "Orange front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:762 msgid "Black connector" msgstr "" -#: sys/oss4/oss4-mixer.c:763 msgid "Black front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:764 msgid "Gray connector" msgstr "" -#: sys/oss4/oss4-mixer.c:765 msgid "Gray front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:766 msgid "White connector" msgstr "" -#: sys/oss4/oss4-mixer.c:767 msgid "White front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:768 msgid "Red connector" msgstr "" -#: sys/oss4/oss4-mixer.c:769 msgid "Red front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:770 msgid "Yellow connector" msgstr "" -#: sys/oss4/oss4-mixer.c:771 msgid "Yellow front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:774 msgid "Green connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:775 msgid "Green front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:776 msgid "Pink connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:777 msgid "Pink front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:778 msgid "Blue connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:779 msgid "Blue front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:780 msgid "Orange connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:781 msgid "Orange front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:782 msgid "Black connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:783 msgid "Black front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:784 msgid "Gray connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:785 msgid "Gray front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:786 msgid "White connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:787 msgid "White front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:788 msgid "Red connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:789 msgid "Red front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:790 msgid "Yellow connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:791 msgid "Yellow front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:797 msgid "Front panel line-in" msgstr "" -#: sys/oss4/oss4-mixer.c:798 msgid "Headphones" msgstr "" -#: sys/oss4/oss4-mixer.c:799 msgid "Front panel headphones" msgstr "" -#: sys/oss4/oss4-mixer.c:804 msgid "PCM" msgstr "ПЦМ" -#: sys/oss4/oss4-mixer.c:846 msgid "Virtual mixer input" msgstr "" -#: sys/oss4/oss4-mixer.c:848 msgid "Virtual mixer output" msgstr "" -#: sys/oss4/oss4-mixer.c:850 msgid "Virtual mixer channel configuration" msgstr "" -#: sys/oss4/oss4-sink.c:376 sys/oss4/oss4-source.c:367 msgid "" "Could not open audio device for playback. Device is being used by another " "application." msgstr "" -#: sys/oss4/oss4-sink.c:386 sys/oss4/oss4-source.c:377 msgid "" "Could not open audio device for playback. You don't have permission to open " "the device." msgstr "" -#: sys/oss4/oss4-sink.c:397 sys/oss4/oss4-source.c:388 #, fuzzy msgid "Could not open audio device for playback." msgstr "Ðе могу да отворим звучни уређај „%s“ ради упиÑа." -#: sys/oss4/oss4-sink.c:406 sys/oss4/oss4-source.c:398 msgid "" "Could not open audio device for playback. This version of the Open Sound " "System is not supported by this element." msgstr "" -#: sys/oss4/oss4-sink.c:522 msgid "Playback is not supported by this audio device." msgstr "" -#: sys/oss4/oss4-sink.c:529 msgid "Audio playback error." msgstr "" -#: sys/oss4/oss4-source.c:520 msgid "Recording is not supported by this audio device." msgstr "" -#: sys/oss4/oss4-source.c:527 msgid "Error recording from audio device." msgstr "" diff --git a/po/sv.po b/po/sv.po index f286245b..38ce7916 100644 --- a/po/sv.po +++ b/po/sv.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.9.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-12 00:07+0100\n" +"POT-Creation-Date: 2009-05-16 01:36+0100\n" "PO-Revision-Date: 2009-01-23 00:44+0100\n" "Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \n" @@ -15,71 +15,55 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "Kunde inte läsa titelinformation för dvd." -#: ext/resindvd/resindvdsrc.c:358 #, c-format msgid "Failed to open DVD device '%s'." msgstr "Misslyckades med att öppna dvd-enheten \"%s\"." -#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "Misslyckades med att ställa in PGC-baserad spolning." -#: ext/resindvd/rsnbasesrc.c:1659 msgid "Internal clock error." msgstr "Internt klockfel." -#: ext/resindvd/rsnbasesrc.c:1904 ext/resindvd/rsnbasesrc.c:1915 -#: gst/aiffparse/aiffparse.c:1265 msgid "Internal data flow error." msgstr "Internt fel i dataflöde." -#: ext/sndfile/gstsfsink.c:277 ext/sndfile/gstsfsrc.c:345 msgid "No file name specified for writing." msgstr "Inget filnamn angavs för skrivning." -#: ext/sndfile/gstsfsink.c:290 ext/sndfile/gstsfsrc.c:351 #, c-format msgid "Could not open file \"%s\" for writing." msgstr "Kunde inte öppna filen \"%s\" för skrivning." -#: ext/sndfile/gstsfsink.c:440 gst/nuvdemux/gstnuvdemux.c:735 msgid "Internal data stream error." msgstr "Internt fel i dataström." -#: ext/sndfile/gstsfsink.c:494 ext/sndfile/gstsfsink.c:502 #, c-format msgid "Could not write to file \"%s\"." msgstr "Kunde inte skriva till filen \"%s\"." -#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Enheten \"%s\" finns inte." -#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Kunde inte öppna framändsenheten \"%s\"." -#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Kunde inte fÃ¥ inställningar frÃ¥n framändsenheten \"%s\"." -#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Kunde inte öppna filen \"%s\" för läsning." -#: sys/oss4/oss4-mixer.c:302 msgid "Could not open audio device for mixer control handling." msgstr "Kunde inte öppna ljudenheten för mixningshantering." -#: sys/oss4/oss4-mixer.c:316 msgid "" "Could not open audio device for mixer control handling. This version of the " "Open Sound System is not supported by this element." @@ -87,272 +71,205 @@ msgstr "" "Kunde inte öppna ljudenheten för mixningshantering. Denna version av Open " "Sound System stöds inte av detta element." -#: sys/oss4/oss4-mixer.c:720 msgid "Fast" msgstr "Snabb" -#: sys/oss4/oss4-mixer.c:721 msgid "Low" msgstr "LÃ¥g" -#: sys/oss4/oss4-mixer.c:722 msgid "Medium" msgstr "Medel" -#: sys/oss4/oss4-mixer.c:723 msgid "High" msgstr "Hög" -#: sys/oss4/oss4-mixer.c:724 msgid "Very high" msgstr "Mycket hög" -#: sys/oss4/oss4-mixer.c:725 msgid "Production" msgstr "Produktion" -#: sys/oss4/oss4-mixer.c:726 msgid "Off" msgstr "Av" -#: sys/oss4/oss4-mixer.c:727 msgid "On" msgstr "PÃ¥" -#: sys/oss4/oss4-mixer.c:728 msgid "Stereo" msgstr "Stereo" -#: sys/oss4/oss4-mixer.c:729 msgid "Surround sound" msgstr "Surroundljud" -#: sys/oss4/oss4-mixer.c:730 sys/oss4/oss4-mixer.c:805 msgid "Input mix" msgstr "IngÃ¥ngsmix" -#: sys/oss4/oss4-mixer.c:731 sys/oss4/oss4-mixer.c:800 msgid "Front" msgstr "Fram" -#: sys/oss4/oss4-mixer.c:732 sys/oss4/oss4-mixer.c:801 msgid "Rear" msgstr "Bak" -#: sys/oss4/oss4-mixer.c:733 sys/oss4/oss4-mixer.c:802 msgid "Side" msgstr "Sida" # LFE=lÃ¥gfrekvenseffekter -#: sys/oss4/oss4-mixer.c:734 sys/oss4/oss4-mixer.c:803 msgid "Center / LFE" msgstr "Center / LFE" -#: sys/oss4/oss4-mixer.c:735 sys/oss4/oss4-mixer.c:794 msgid "Microphone" msgstr "Mikrofon" -#: sys/oss4/oss4-mixer.c:736 sys/oss4/oss4-mixer.c:795 msgid "Front panel microphone" msgstr "Frontpanelsmikrofon" -#: sys/oss4/oss4-mixer.c:737 msgid "Input" msgstr "IngÃ¥ng" -#: sys/oss4/oss4-mixer.c:738 sys/oss4/oss4-mixer.c:796 msgid "Line-in" msgstr "Linje-in" -#: sys/oss4/oss4-mixer.c:739 msgid "PCM 1" msgstr "PCM 1" -#: sys/oss4/oss4-mixer.c:740 msgid "PCM 2" msgstr "PCM 2" -#: sys/oss4/oss4-mixer.c:741 msgid "PCM 3" msgstr "PCM 3" -#: sys/oss4/oss4-mixer.c:742 msgid "PCM 4" msgstr "PCM 4" -#: sys/oss4/oss4-mixer.c:754 msgid "Green connector" msgstr "Grön kontakt" -#: sys/oss4/oss4-mixer.c:755 msgid "Green front panel connector" msgstr "Grön frontpanelskontakt" -#: sys/oss4/oss4-mixer.c:756 msgid "Pink connector" msgstr "Rosa kontakt" -#: sys/oss4/oss4-mixer.c:757 msgid "Pink front panel connector" msgstr "Rosa frontpanelskontakt" -#: sys/oss4/oss4-mixer.c:758 msgid "Blue connector" msgstr "BlÃ¥ kontakt" -#: sys/oss4/oss4-mixer.c:759 msgid "Blue front panel connector" msgstr "BlÃ¥ frontpanelskontakt" -#: sys/oss4/oss4-mixer.c:760 msgid "Orange connector" msgstr "Orange kontakt" -#: sys/oss4/oss4-mixer.c:761 msgid "Orange front panel connector" msgstr "Orange frontpanelskontakt" -#: sys/oss4/oss4-mixer.c:762 msgid "Black connector" msgstr "Svart kontakt" -#: sys/oss4/oss4-mixer.c:763 msgid "Black front panel connector" msgstr "Svart frontpanelskontakt" -#: sys/oss4/oss4-mixer.c:764 msgid "Gray connector" msgstr "GrÃ¥ kontakt" -#: sys/oss4/oss4-mixer.c:765 msgid "Gray front panel connector" msgstr "GrÃ¥ frontpanelskontakt" -#: sys/oss4/oss4-mixer.c:766 msgid "White connector" msgstr "Vit kontakt" -#: sys/oss4/oss4-mixer.c:767 msgid "White front panel connector" msgstr "Vit frontpanelskontakt" -#: sys/oss4/oss4-mixer.c:768 msgid "Red connector" msgstr "Röd kontakt" -#: sys/oss4/oss4-mixer.c:769 msgid "Red front panel connector" msgstr "Röd frontpanelskontakt" -#: sys/oss4/oss4-mixer.c:770 msgid "Yellow connector" msgstr "Gul kontakt" -#: sys/oss4/oss4-mixer.c:771 msgid "Yellow front panel connector" msgstr "Gul frontpanelskontakt" -#: sys/oss4/oss4-mixer.c:774 msgid "Green connector function" msgstr "Funktion för grön kontakt" -#: sys/oss4/oss4-mixer.c:775 msgid "Green front panel connector function" msgstr "Funktion för grön frontpanelskontakt" -#: sys/oss4/oss4-mixer.c:776 msgid "Pink connector function" msgstr "Funktion för rosa kontakt" -#: sys/oss4/oss4-mixer.c:777 msgid "Pink front panel connector function" msgstr "Funktion för rosa frontpanelskontakt" -#: sys/oss4/oss4-mixer.c:778 msgid "Blue connector function" msgstr "Funktion för blÃ¥ kontakt" -#: sys/oss4/oss4-mixer.c:779 msgid "Blue front panel connector function" msgstr "Funktion för blÃ¥ frontpanelskontakt" -#: sys/oss4/oss4-mixer.c:780 msgid "Orange connector function" msgstr "Funktion för orange kontakt" -#: sys/oss4/oss4-mixer.c:781 msgid "Orange front panel connector function" msgstr "Funktion för orange frontpanelskontakt" -#: sys/oss4/oss4-mixer.c:782 msgid "Black connector function" msgstr "Funktion för svart kontakt" -#: sys/oss4/oss4-mixer.c:783 msgid "Black front panel connector function" msgstr "Funktion för svart frontpanelskontakt" -#: sys/oss4/oss4-mixer.c:784 msgid "Gray connector function" msgstr "Funktion för grÃ¥ kontakt" -#: sys/oss4/oss4-mixer.c:785 msgid "Gray front panel connector function" msgstr "Funktion för grÃ¥ frontpanelskontakt" -#: sys/oss4/oss4-mixer.c:786 msgid "White connector function" msgstr "Funktion för vit kontakt" -#: sys/oss4/oss4-mixer.c:787 msgid "White front panel connector function" msgstr "Funktion för vit frontpanelskontakt" -#: sys/oss4/oss4-mixer.c:788 msgid "Red connector function" msgstr "Funktion för röd kontakt" -#: sys/oss4/oss4-mixer.c:789 msgid "Red front panel connector function" msgstr "Funktion för röd frontpanelskontakt" -#: sys/oss4/oss4-mixer.c:790 msgid "Yellow connector function" msgstr "Funktion för gul kontakt" -#: sys/oss4/oss4-mixer.c:791 msgid "Yellow front panel connector function" msgstr "Funktion för gul frontpanelskontakt" -#: sys/oss4/oss4-mixer.c:797 msgid "Front panel line-in" msgstr "Linje-in pÃ¥ frontpanel" -#: sys/oss4/oss4-mixer.c:798 msgid "Headphones" msgstr "Hörlurar" -#: sys/oss4/oss4-mixer.c:799 msgid "Front panel headphones" msgstr "Hörlurar pÃ¥ frontpanel" -#: sys/oss4/oss4-mixer.c:804 msgid "PCM" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:846 msgid "Virtual mixer input" msgstr "Virtuell mixeringÃ¥ng" -#: sys/oss4/oss4-mixer.c:848 msgid "Virtual mixer output" msgstr "Virtuell mixerutgÃ¥ng" -#: sys/oss4/oss4-mixer.c:850 msgid "Virtual mixer channel configuration" msgstr "Kanalkonfiguration för virtuell mixer" -#: sys/oss4/oss4-sink.c:376 sys/oss4/oss4-source.c:367 msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -360,7 +277,6 @@ msgstr "" "Kunde inte öppna ljudenheten för uppspelning. Enheten används av ett annat " "program." -#: sys/oss4/oss4-sink.c:386 sys/oss4/oss4-source.c:377 msgid "" "Could not open audio device for playback. You don't have permission to open " "the device." @@ -368,11 +284,9 @@ msgstr "" "Kunde inte öppna ljudenheten för uppspelning. Du har inte behörighet att " "öppna enheten." -#: sys/oss4/oss4-sink.c:397 sys/oss4/oss4-source.c:388 msgid "Could not open audio device for playback." msgstr "Kunde inte öppna ljudenheten för uppspelning." -#: sys/oss4/oss4-sink.c:406 sys/oss4/oss4-source.c:398 msgid "" "Could not open audio device for playback. This version of the Open Sound " "System is not supported by this element." @@ -380,19 +294,15 @@ msgstr "" "Kunde inte öppna ljudenheten för uppspelning. Denna version av Open Sound " "System stöds inte av detta element." -#: sys/oss4/oss4-sink.c:522 msgid "Playback is not supported by this audio device." msgstr "Uppspelning stöds inte av denna ljudenhet." -#: sys/oss4/oss4-sink.c:529 msgid "Audio playback error." msgstr "Fel vid ljuduppspelning." -#: sys/oss4/oss4-source.c:520 msgid "Recording is not supported by this audio device." msgstr "Inspelning stöds inte av denna ljudenhet." -#: sys/oss4/oss4-source.c:527 msgid "Error recording from audio device." msgstr "Fel vid inspelning frÃ¥n ljudenhet." diff --git a/po/tr.po b/po/tr.po index c8aea9f6..7dee4c8c 100644 --- a/po/tr.po +++ b/po/tr.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad-0.10.10.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-12 00:07+0100\n" +"POT-Creation-Date: 2009-05-16 01:36+0100\n" "PO-Revision-Date: 2009-03-11 08:01+0200\n" "Last-Translator: Server Acim \n" "Language-Team: Turkish \n" @@ -15,71 +15,55 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" -#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "DVD'deki baÅŸlık bilgisi okunamıyor." -#: ext/resindvd/resindvdsrc.c:358 #, c-format msgid "Failed to open DVD device '%s'." msgstr "DVD aygıtı açılamadı '%s'." -#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "PGC temelli arama ayarı yapılamadı." -#: ext/resindvd/rsnbasesrc.c:1659 msgid "Internal clock error." msgstr "İç saat hatası." -#: ext/resindvd/rsnbasesrc.c:1904 ext/resindvd/rsnbasesrc.c:1915 -#: gst/aiffparse/aiffparse.c:1265 msgid "Internal data flow error." msgstr "İç veri akış hatası." -#: ext/sndfile/gstsfsink.c:277 ext/sndfile/gstsfsrc.c:345 msgid "No file name specified for writing." msgstr "Yazmak için dosya adı belirtilmedi." -#: ext/sndfile/gstsfsink.c:290 ext/sndfile/gstsfsrc.c:351 #, c-format msgid "Could not open file \"%s\" for writing." msgstr "Dosyayı \"%s\" yazmak için açamıyor." -#: ext/sndfile/gstsfsink.c:440 gst/nuvdemux/gstnuvdemux.c:735 msgid "Internal data stream error." msgstr "İç veri akım hatası." -#: ext/sndfile/gstsfsink.c:494 ext/sndfile/gstsfsink.c:502 #, c-format msgid "Could not write to file \"%s\"." msgstr "Dosya yazılamıyor \"%s\"." -#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Aygıt \"%s\" bulunamadı." -#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Aygıt açılamaz durumda \"%s\"." -#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Aygıt ayarları bulunamadı \"%s\"." -#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Dosyayı \"%s\" okumak için açamıyor." -#: sys/oss4/oss4-mixer.c:302 msgid "Could not open audio device for mixer control handling." msgstr "Karıştırıcı iÅŸlemi için ses aygıtı açılamıyor." -#: sys/oss4/oss4-mixer.c:316 msgid "" "Could not open audio device for mixer control handling. This version of the " "Open Sound System is not supported by this element." @@ -87,271 +71,204 @@ msgstr "" "Karıştırıcı iÅŸlemi için ses aygıtı açılamıyor. Bu öğe tarafından Açık Ses " "Sistemi'nin bu sürümü desteklenmiyor." -#: sys/oss4/oss4-mixer.c:720 msgid "Fast" msgstr "Hızlı" -#: sys/oss4/oss4-mixer.c:721 msgid "Low" msgstr "Düşük" -#: sys/oss4/oss4-mixer.c:722 msgid "Medium" msgstr "Orta" -#: sys/oss4/oss4-mixer.c:723 msgid "High" msgstr "Yüksek" -#: sys/oss4/oss4-mixer.c:724 msgid "Very high" msgstr "Çok yüksek" -#: sys/oss4/oss4-mixer.c:725 msgid "Production" msgstr "Yapım" -#: sys/oss4/oss4-mixer.c:726 msgid "Off" msgstr "Kapalı" -#: sys/oss4/oss4-mixer.c:727 msgid "On" msgstr "Açık" -#: sys/oss4/oss4-mixer.c:728 msgid "Stereo" msgstr "Stereo" -#: sys/oss4/oss4-mixer.c:729 msgid "Surround sound" msgstr "Surround ses" -#: sys/oss4/oss4-mixer.c:730 sys/oss4/oss4-mixer.c:805 msgid "Input mix" msgstr "GiriÅŸ karışımı" -#: sys/oss4/oss4-mixer.c:731 sys/oss4/oss4-mixer.c:800 msgid "Front" msgstr "Ön" -#: sys/oss4/oss4-mixer.c:732 sys/oss4/oss4-mixer.c:801 msgid "Rear" msgstr "Arka" -#: sys/oss4/oss4-mixer.c:733 sys/oss4/oss4-mixer.c:802 msgid "Side" msgstr "Yan" -#: sys/oss4/oss4-mixer.c:734 sys/oss4/oss4-mixer.c:803 msgid "Center / LFE" msgstr "Merkez / LFE" -#: sys/oss4/oss4-mixer.c:735 sys/oss4/oss4-mixer.c:794 msgid "Microphone" msgstr "Mikrofon" -#: sys/oss4/oss4-mixer.c:736 sys/oss4/oss4-mixer.c:795 msgid "Front panel microphone" msgstr "Ön panel mikrofonu" -#: sys/oss4/oss4-mixer.c:737 msgid "Input" msgstr "GiriÅŸ" -#: sys/oss4/oss4-mixer.c:738 sys/oss4/oss4-mixer.c:796 msgid "Line-in" msgstr "Hat giriÅŸi" -#: sys/oss4/oss4-mixer.c:739 msgid "PCM 1" msgstr "PCM 1" -#: sys/oss4/oss4-mixer.c:740 msgid "PCM 2" msgstr "PCM 2" -#: sys/oss4/oss4-mixer.c:741 msgid "PCM 3" msgstr "PCM 3" -#: sys/oss4/oss4-mixer.c:742 msgid "PCM 4" msgstr "PCM 4" -#: sys/oss4/oss4-mixer.c:754 msgid "Green connector" msgstr "YeÅŸil konnektör" -#: sys/oss4/oss4-mixer.c:755 msgid "Green front panel connector" msgstr "YeÅŸil ön panel konnektörü" -#: sys/oss4/oss4-mixer.c:756 msgid "Pink connector" msgstr "Pembe konnektör" -#: sys/oss4/oss4-mixer.c:757 msgid "Pink front panel connector" msgstr "Pembe ön panel könnektörü" -#: sys/oss4/oss4-mixer.c:758 msgid "Blue connector" msgstr "Mavi konnektör" -#: sys/oss4/oss4-mixer.c:759 msgid "Blue front panel connector" msgstr "Mavi ön panel konnektörü" -#: sys/oss4/oss4-mixer.c:760 msgid "Orange connector" msgstr "Portakal konnektör" -#: sys/oss4/oss4-mixer.c:761 msgid "Orange front panel connector" msgstr "Portakal ön panel konnektörü" -#: sys/oss4/oss4-mixer.c:762 msgid "Black connector" msgstr "Siyah konnektör" -#: sys/oss4/oss4-mixer.c:763 msgid "Black front panel connector" msgstr "Siyah ön panel konnektörü" -#: sys/oss4/oss4-mixer.c:764 msgid "Gray connector" msgstr "Gri konnektör" -#: sys/oss4/oss4-mixer.c:765 msgid "Gray front panel connector" msgstr "Gri ön panel konnektörü" -#: sys/oss4/oss4-mixer.c:766 msgid "White connector" msgstr "Beyaz konnektör" -#: sys/oss4/oss4-mixer.c:767 msgid "White front panel connector" msgstr "Beyaz ön panel konnektörü" -#: sys/oss4/oss4-mixer.c:768 msgid "Red connector" msgstr "Kırmızı konnektör" -#: sys/oss4/oss4-mixer.c:769 msgid "Red front panel connector" msgstr "Kırmızı ön panel konnektörü" -#: sys/oss4/oss4-mixer.c:770 msgid "Yellow connector" msgstr "Sarı konnektör" -#: sys/oss4/oss4-mixer.c:771 msgid "Yellow front panel connector" msgstr "Sarı ön panel konnektörü" -#: sys/oss4/oss4-mixer.c:774 msgid "Green connector function" msgstr "YeÅŸil konnektör iÅŸlevi" -#: sys/oss4/oss4-mixer.c:775 msgid "Green front panel connector function" msgstr "YeÅŸil ön panel konnektör iÅŸlevi" -#: sys/oss4/oss4-mixer.c:776 msgid "Pink connector function" msgstr "Pembe konnektör iÅŸlevi" -#: sys/oss4/oss4-mixer.c:777 msgid "Pink front panel connector function" msgstr "Pembe ön panel konnektör iÅŸlevi" -#: sys/oss4/oss4-mixer.c:778 msgid "Blue connector function" msgstr "Mavi konnektör iÅŸlevi" -#: sys/oss4/oss4-mixer.c:779 msgid "Blue front panel connector function" msgstr "Mavi ön panel konnektör iÅŸlevi" -#: sys/oss4/oss4-mixer.c:780 msgid "Orange connector function" msgstr "Portakal konnektör iÅŸlevi" -#: sys/oss4/oss4-mixer.c:781 msgid "Orange front panel connector function" msgstr "Portakal ön panel konnektör iÅŸlevi" -#: sys/oss4/oss4-mixer.c:782 msgid "Black connector function" msgstr "Siyah konnektör iÅŸlevi" -#: sys/oss4/oss4-mixer.c:783 msgid "Black front panel connector function" msgstr "Siyah ön panel konnektör iÅŸlevi" -#: sys/oss4/oss4-mixer.c:784 msgid "Gray connector function" msgstr "Gri konnektör iÅŸlevi" -#: sys/oss4/oss4-mixer.c:785 msgid "Gray front panel connector function" msgstr "Gri ön panel konnektör iÅŸlevi" -#: sys/oss4/oss4-mixer.c:786 msgid "White connector function" msgstr "Beyaz konnektör iÅŸlevi" -#: sys/oss4/oss4-mixer.c:787 msgid "White front panel connector function" msgstr "Beyaz ön panel konnektör iÅŸlevi" -#: sys/oss4/oss4-mixer.c:788 msgid "Red connector function" msgstr "Kırmızı konnektör iÅŸlevi" -#: sys/oss4/oss4-mixer.c:789 msgid "Red front panel connector function" msgstr "Kırmızı ön panel konnektör iÅŸlevi" -#: sys/oss4/oss4-mixer.c:790 msgid "Yellow connector function" msgstr "Sarı konnektör iÅŸlevi" -#: sys/oss4/oss4-mixer.c:791 msgid "Yellow front panel connector function" msgstr "Sarı ön panel konnektör iÅŸlevi" -#: sys/oss4/oss4-mixer.c:797 msgid "Front panel line-in" msgstr "Ön panel hat giriÅŸi" -#: sys/oss4/oss4-mixer.c:798 msgid "Headphones" msgstr "Kulaklıklar" -#: sys/oss4/oss4-mixer.c:799 msgid "Front panel headphones" msgstr "Ön panel kulaklıkları" -#: sys/oss4/oss4-mixer.c:804 msgid "PCM" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:846 msgid "Virtual mixer input" msgstr "Sanal karıştırıcı giriÅŸi" -#: sys/oss4/oss4-mixer.c:848 msgid "Virtual mixer output" msgstr "Sanal karıştırıcı çıkışı" -#: sys/oss4/oss4-mixer.c:850 msgid "Virtual mixer channel configuration" msgstr "Sanal karıştırıcı kanal yapılandırması" -#: sys/oss4/oss4-sink.c:376 sys/oss4/oss4-source.c:367 msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -359,17 +276,14 @@ msgstr "" "Çalmak için ses aygıtı açılamıyor. Aygıt baÅŸka bir uygulama tarafından " "kullanılıyor." -#: sys/oss4/oss4-sink.c:386 sys/oss4/oss4-source.c:377 msgid "" "Could not open audio device for playback. You don't have permission to open " "the device." msgstr "Çalmak için ses aygıtı açılamıyor. Aygıtı açma izniniz bulunmuyor." -#: sys/oss4/oss4-sink.c:397 sys/oss4/oss4-source.c:388 msgid "Could not open audio device for playback." msgstr "Çalmak için ses aygıtı açılamıyor." -#: sys/oss4/oss4-sink.c:406 sys/oss4/oss4-source.c:398 msgid "" "Could not open audio device for playback. This version of the Open Sound " "System is not supported by this element." @@ -377,18 +291,14 @@ msgstr "" "Çalmak için ses aygıtı açılamıyor. Açık Ses Sistemi'nin bu sürümü bu öğe " "tarafından desteklenmiyor." -#: sys/oss4/oss4-sink.c:522 msgid "Playback is not supported by this audio device." msgstr "Bu ses aygıtı çalma iÅŸlevini desteklemiyor." -#: sys/oss4/oss4-sink.c:529 msgid "Audio playback error." msgstr "Ses çalma hatası." -#: sys/oss4/oss4-source.c:520 msgid "Recording is not supported by this audio device." msgstr "Bu ses aygıtı kayıt iÅŸlevini desteklemiyor." -#: sys/oss4/oss4-source.c:527 msgid "Error recording from audio device." msgstr "Ses aygıtı ile kayıtta hata." diff --git a/po/uk.po b/po/uk.po index cdd57856..cc11447e 100644 --- a/po/uk.po +++ b/po/uk.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.5\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-12 00:07+0100\n" +"POT-Creation-Date: 2009-05-16 01:36+0100\n" "PO-Revision-Date: 2007-07-04 12:19+0200\n" "Last-Translator: Maxim V. Dziumanenko \n" "Language-Team: Ukrainian \n" @@ -17,376 +17,286 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" "10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" -#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "" -#: ext/resindvd/resindvdsrc.c:358 #, fuzzy, c-format msgid "Failed to open DVD device '%s'." msgstr "Ðе вдаєтьÑÑ Ð²Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ð¸ приÑтрій Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ \"%s\"." -#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "" -#: ext/resindvd/rsnbasesrc.c:1659 msgid "Internal clock error." msgstr "" -#: ext/resindvd/rsnbasesrc.c:1904 ext/resindvd/rsnbasesrc.c:1915 -#: gst/aiffparse/aiffparse.c:1265 msgid "Internal data flow error." msgstr "" -#: ext/sndfile/gstsfsink.c:277 ext/sndfile/gstsfsrc.c:345 msgid "No file name specified for writing." msgstr "" -#: ext/sndfile/gstsfsink.c:290 ext/sndfile/gstsfsrc.c:351 #, fuzzy, c-format msgid "Could not open file \"%s\" for writing." msgstr "Ðе вдаєтьÑÑ Ð²Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ð¸ файл \"%s\" Ð´Ð»Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ." -#: ext/sndfile/gstsfsink.c:440 gst/nuvdemux/gstnuvdemux.c:735 msgid "Internal data stream error." msgstr "" -#: ext/sndfile/gstsfsink.c:494 ext/sndfile/gstsfsink.c:502 #, fuzzy, c-format msgid "Could not write to file \"%s\"." msgstr "Ðе вдаєтьÑÑ Ð²Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ð¸ приÑтрій Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ \"%s\"." -#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "ПриÑтрій \"%s\" не Ñ–Ñнує." -#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Ðе вдаєтьÑÑ Ð²Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ð¸ приÑтрій Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ \"%s\"." -#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Ðе вдаєтьÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ параметри приÑтрою Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ \"%s\"." -#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Ðе вдаєтьÑÑ Ð²Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ð¸ файл \"%s\" Ð´Ð»Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ." -#: sys/oss4/oss4-mixer.c:302 #, fuzzy msgid "Could not open audio device for mixer control handling." msgstr "Ðе вдаєтьÑÑ Ð²Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ð¸ файл \"%s\" Ð´Ð»Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ." -#: sys/oss4/oss4-mixer.c:316 msgid "" "Could not open audio device for mixer control handling. This version of the " "Open Sound System is not supported by this element." msgstr "" -#: sys/oss4/oss4-mixer.c:720 msgid "Fast" msgstr "" -#: sys/oss4/oss4-mixer.c:721 msgid "Low" msgstr "" -#: sys/oss4/oss4-mixer.c:722 msgid "Medium" msgstr "" -#: sys/oss4/oss4-mixer.c:723 msgid "High" msgstr "" -#: sys/oss4/oss4-mixer.c:724 msgid "Very high" msgstr "" -#: sys/oss4/oss4-mixer.c:725 msgid "Production" msgstr "" -#: sys/oss4/oss4-mixer.c:726 msgid "Off" msgstr "" -#: sys/oss4/oss4-mixer.c:727 msgid "On" msgstr "" -#: sys/oss4/oss4-mixer.c:728 msgid "Stereo" msgstr "" -#: sys/oss4/oss4-mixer.c:729 msgid "Surround sound" msgstr "" -#: sys/oss4/oss4-mixer.c:730 sys/oss4/oss4-mixer.c:805 msgid "Input mix" msgstr "" -#: sys/oss4/oss4-mixer.c:731 sys/oss4/oss4-mixer.c:800 msgid "Front" msgstr "" -#: sys/oss4/oss4-mixer.c:732 sys/oss4/oss4-mixer.c:801 msgid "Rear" msgstr "" -#: sys/oss4/oss4-mixer.c:733 sys/oss4/oss4-mixer.c:802 msgid "Side" msgstr "" -#: sys/oss4/oss4-mixer.c:734 sys/oss4/oss4-mixer.c:803 msgid "Center / LFE" msgstr "" -#: sys/oss4/oss4-mixer.c:735 sys/oss4/oss4-mixer.c:794 msgid "Microphone" msgstr "" -#: sys/oss4/oss4-mixer.c:736 sys/oss4/oss4-mixer.c:795 msgid "Front panel microphone" msgstr "" -#: sys/oss4/oss4-mixer.c:737 msgid "Input" msgstr "" -#: sys/oss4/oss4-mixer.c:738 sys/oss4/oss4-mixer.c:796 msgid "Line-in" msgstr "" -#: sys/oss4/oss4-mixer.c:739 msgid "PCM 1" msgstr "" -#: sys/oss4/oss4-mixer.c:740 msgid "PCM 2" msgstr "" -#: sys/oss4/oss4-mixer.c:741 msgid "PCM 3" msgstr "" -#: sys/oss4/oss4-mixer.c:742 msgid "PCM 4" msgstr "" -#: sys/oss4/oss4-mixer.c:754 msgid "Green connector" msgstr "" -#: sys/oss4/oss4-mixer.c:755 msgid "Green front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:756 msgid "Pink connector" msgstr "" -#: sys/oss4/oss4-mixer.c:757 msgid "Pink front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:758 msgid "Blue connector" msgstr "" -#: sys/oss4/oss4-mixer.c:759 msgid "Blue front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:760 msgid "Orange connector" msgstr "" -#: sys/oss4/oss4-mixer.c:761 msgid "Orange front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:762 msgid "Black connector" msgstr "" -#: sys/oss4/oss4-mixer.c:763 msgid "Black front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:764 msgid "Gray connector" msgstr "" -#: sys/oss4/oss4-mixer.c:765 msgid "Gray front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:766 msgid "White connector" msgstr "" -#: sys/oss4/oss4-mixer.c:767 msgid "White front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:768 msgid "Red connector" msgstr "" -#: sys/oss4/oss4-mixer.c:769 msgid "Red front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:770 msgid "Yellow connector" msgstr "" -#: sys/oss4/oss4-mixer.c:771 msgid "Yellow front panel connector" msgstr "" -#: sys/oss4/oss4-mixer.c:774 msgid "Green connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:775 msgid "Green front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:776 msgid "Pink connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:777 msgid "Pink front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:778 msgid "Blue connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:779 msgid "Blue front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:780 msgid "Orange connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:781 msgid "Orange front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:782 msgid "Black connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:783 msgid "Black front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:784 msgid "Gray connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:785 msgid "Gray front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:786 msgid "White connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:787 msgid "White front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:788 msgid "Red connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:789 msgid "Red front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:790 msgid "Yellow connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:791 msgid "Yellow front panel connector function" msgstr "" -#: sys/oss4/oss4-mixer.c:797 msgid "Front panel line-in" msgstr "" -#: sys/oss4/oss4-mixer.c:798 msgid "Headphones" msgstr "" -#: sys/oss4/oss4-mixer.c:799 msgid "Front panel headphones" msgstr "" -#: sys/oss4/oss4-mixer.c:804 msgid "PCM" msgstr "" -#: sys/oss4/oss4-mixer.c:846 msgid "Virtual mixer input" msgstr "" -#: sys/oss4/oss4-mixer.c:848 msgid "Virtual mixer output" msgstr "" -#: sys/oss4/oss4-mixer.c:850 msgid "Virtual mixer channel configuration" msgstr "" -#: sys/oss4/oss4-sink.c:376 sys/oss4/oss4-source.c:367 msgid "" "Could not open audio device for playback. Device is being used by another " "application." msgstr "" -#: sys/oss4/oss4-sink.c:386 sys/oss4/oss4-source.c:377 msgid "" "Could not open audio device for playback. You don't have permission to open " "the device." msgstr "" -#: sys/oss4/oss4-sink.c:397 sys/oss4/oss4-source.c:388 #, fuzzy msgid "Could not open audio device for playback." msgstr "Ðе вдаєтьÑÑ Ð²Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ð¸ приÑтрій Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ \"%s\"." -#: sys/oss4/oss4-sink.c:406 sys/oss4/oss4-source.c:398 msgid "" "Could not open audio device for playback. This version of the Open Sound " "System is not supported by this element." msgstr "" -#: sys/oss4/oss4-sink.c:522 msgid "Playback is not supported by this audio device." msgstr "" -#: sys/oss4/oss4-sink.c:529 msgid "Audio playback error." msgstr "" -#: sys/oss4/oss4-source.c:520 msgid "Recording is not supported by this audio device." msgstr "" -#: sys/oss4/oss4-source.c:527 msgid "Error recording from audio device." msgstr "" diff --git a/po/vi.po b/po/vi.po index f5179e70..6f6386f1 100644 --- a/po/vi.po +++ b/po/vi.po @@ -5,10 +5,10 @@ # msgid "" msgstr "" -"Project-Id-Version: gst-plugins-bad 0.10.9.3\n" +"Project-Id-Version: gst-plugins-bad 0.10.11.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-12 00:07+0100\n" -"PO-Revision-Date: 2009-01-26 20:24+1030\n" +"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"PO-Revision-Date: 2009-05-12 21:32+0930\n" "Last-Translator: Clytie Siddall \n" "Language-Team: Vietnamese \n" "MIME-Version: 1.0\n" @@ -17,71 +17,55 @@ msgstr "" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: LocFactoryEditor 1.8\n" -#: ext/resindvd/resindvdsrc.c:352 msgid "Could not read title information for DVD." msgstr "Không thể Ä‘á»c thông tin tá»±a Ä‘á» vá» Ä‘Ä©a DVD." -#: ext/resindvd/resindvdsrc.c:358 #, c-format msgid "Failed to open DVD device '%s'." msgstr "Không mở được thiết bị Ä‘Ä©a DVD « %s »." -#: ext/resindvd/resindvdsrc.c:364 msgid "Failed to set PGC based seeking." msgstr "Không đặt được chức năng tìm nÆ¡i dá»±a vào PGC." -#: ext/resindvd/rsnbasesrc.c:1659 msgid "Internal clock error." msgstr "Lá»—i đồng hồ ná»™i bá»™." -#: ext/resindvd/rsnbasesrc.c:1904 ext/resindvd/rsnbasesrc.c:1915 -#: gst/aiffparse/aiffparse.c:1265 msgid "Internal data flow error." msgstr "Lá»—i luồng dữ liệu ná»™i bá»™." -#: ext/sndfile/gstsfsink.c:277 ext/sndfile/gstsfsrc.c:345 msgid "No file name specified for writing." msgstr "ChÆ°a ghi rõ tên tập tin để ghi vào." -#: ext/sndfile/gstsfsink.c:290 ext/sndfile/gstsfsrc.c:351 #, c-format msgid "Could not open file \"%s\" for writing." msgstr "Không thể mở tập tin « %s » để ghi." -#: ext/sndfile/gstsfsink.c:440 gst/nuvdemux/gstnuvdemux.c:735 msgid "Internal data stream error." msgstr "Lá»—i luồng dữ liệu ná»™i bá»™." -#: ext/sndfile/gstsfsink.c:494 ext/sndfile/gstsfsink.c:502 #, c-format msgid "Could not write to file \"%s\"." msgstr "Không thể ghi vào tập tin « %s »." -#: sys/dvb/gstdvbsrc.c:706 sys/dvb/gstdvbsrc.c:799 #, c-format msgid "Device \"%s\" does not exist." msgstr "Thiết bị « %s » không tồn tại." -#: sys/dvb/gstdvbsrc.c:710 #, c-format msgid "Could not open frontend device \"%s\"." msgstr "Không thể mở thiết bị giao diện « %s »." -#: sys/dvb/gstdvbsrc.c:722 #, c-format msgid "Could not get settings from frontend device \"%s\"." msgstr "Không thể lấy thiết lập từ thiết bị giao diện « %s »." -#: sys/dvb/gstdvbsrc.c:803 #, c-format msgid "Could not open file \"%s\" for reading." msgstr "Không thể mở tập tin « %s » để Ä‘á»c." -#: sys/oss4/oss4-mixer.c:302 msgid "Could not open audio device for mixer control handling." msgstr "Không thể mở thiết bị âm thanh để quản lý Ä‘iá»u khiển máy hoà tiếng." -#: sys/oss4/oss4-mixer.c:316 msgid "" "Could not open audio device for mixer control handling. This version of the " "Open Sound System is not supported by this element." @@ -89,271 +73,204 @@ msgstr "" "Không thể mở thiết bị âm thanh để quản lý Ä‘iá»u khiển máy hoà tiếng. Phiên " "bản Hệ thống Âm thanh Mở này không được yếu tố này há»— trợ." -#: sys/oss4/oss4-mixer.c:720 msgid "Fast" msgstr "Nhanh" -#: sys/oss4/oss4-mixer.c:721 msgid "Low" msgstr "Thấp" -#: sys/oss4/oss4-mixer.c:722 msgid "Medium" msgstr "Vừa" -#: sys/oss4/oss4-mixer.c:723 msgid "High" msgstr "Cao" -#: sys/oss4/oss4-mixer.c:724 msgid "Very high" msgstr "Rất cao" -#: sys/oss4/oss4-mixer.c:725 msgid "Production" msgstr "Sản xuất" -#: sys/oss4/oss4-mixer.c:726 msgid "Off" msgstr "Tắt" -#: sys/oss4/oss4-mixer.c:727 msgid "On" msgstr "Bật" -#: sys/oss4/oss4-mixer.c:728 msgid "Stereo" msgstr "Âm lập thể" -#: sys/oss4/oss4-mixer.c:729 msgid "Surround sound" msgstr "Âm thanh vòm" -#: sys/oss4/oss4-mixer.c:730 sys/oss4/oss4-mixer.c:805 msgid "Input mix" msgstr "Hoà tiếng đầu vào" -#: sys/oss4/oss4-mixer.c:731 sys/oss4/oss4-mixer.c:800 msgid "Front" msgstr "TrÆ°á»›c" -#: sys/oss4/oss4-mixer.c:732 sys/oss4/oss4-mixer.c:801 msgid "Rear" msgstr "Sau" -#: sys/oss4/oss4-mixer.c:733 sys/oss4/oss4-mixer.c:802 msgid "Side" msgstr "Bên" -#: sys/oss4/oss4-mixer.c:734 sys/oss4/oss4-mixer.c:803 msgid "Center / LFE" msgstr "Giữa/LFE" -#: sys/oss4/oss4-mixer.c:735 sys/oss4/oss4-mixer.c:794 msgid "Microphone" msgstr "Máy vi âm" -#: sys/oss4/oss4-mixer.c:736 sys/oss4/oss4-mixer.c:795 msgid "Front panel microphone" msgstr "Máy vi âm bảng trÆ°á»›c" -#: sys/oss4/oss4-mixer.c:737 msgid "Input" msgstr "Vào" -#: sys/oss4/oss4-mixer.c:738 sys/oss4/oss4-mixer.c:796 msgid "Line-in" msgstr "Dây vào" -#: sys/oss4/oss4-mixer.c:739 msgid "PCM 1" msgstr "PCM 1" -#: sys/oss4/oss4-mixer.c:740 msgid "PCM 2" msgstr "PCM 2" -#: sys/oss4/oss4-mixer.c:741 msgid "PCM 3" msgstr "PCM 3" -#: sys/oss4/oss4-mixer.c:742 msgid "PCM 4" msgstr "PCM 4" -#: sys/oss4/oss4-mixer.c:754 msgid "Green connector" msgstr "Äầu kẹp lục" -#: sys/oss4/oss4-mixer.c:755 msgid "Green front panel connector" msgstr "Äầu kẹp lục bảng trÆ°á»›c" -#: sys/oss4/oss4-mixer.c:756 msgid "Pink connector" msgstr "Äầu kẹp hồng" -#: sys/oss4/oss4-mixer.c:757 msgid "Pink front panel connector" msgstr "Äầu kẹp hồng bảng trÆ°á»›c" -#: sys/oss4/oss4-mixer.c:758 msgid "Blue connector" msgstr "Äầu kẹp xanh" -#: sys/oss4/oss4-mixer.c:759 msgid "Blue front panel connector" msgstr "Äầu kẹp xanh bảng trÆ°á»›c" -#: sys/oss4/oss4-mixer.c:760 msgid "Orange connector" msgstr "Äầu kẹp cam" -#: sys/oss4/oss4-mixer.c:761 msgid "Orange front panel connector" msgstr "Äầu kẹp cam bảng trÆ°á»›c" -#: sys/oss4/oss4-mixer.c:762 msgid "Black connector" msgstr "Äầu kẹp Ä‘en" -#: sys/oss4/oss4-mixer.c:763 msgid "Black front panel connector" msgstr "Äầu kẹp Ä‘en bảng trÆ°á»›c" -#: sys/oss4/oss4-mixer.c:764 msgid "Gray connector" msgstr "Äầu kẹp xám" -#: sys/oss4/oss4-mixer.c:765 msgid "Gray front panel connector" msgstr "Äầu kẹp xám bảng trÆ°á»›c" -#: sys/oss4/oss4-mixer.c:766 msgid "White connector" msgstr "Äầu kẹp trắng" -#: sys/oss4/oss4-mixer.c:767 msgid "White front panel connector" msgstr "Äầu kẹp trắng bảng trÆ°á»›c" -#: sys/oss4/oss4-mixer.c:768 msgid "Red connector" msgstr "Äầu kẹp Ä‘á»" -#: sys/oss4/oss4-mixer.c:769 msgid "Red front panel connector" msgstr "Äầu kẹp Ä‘á» bảng trÆ°á»›c" -#: sys/oss4/oss4-mixer.c:770 msgid "Yellow connector" msgstr "Äầu kẹp vàng" -#: sys/oss4/oss4-mixer.c:771 msgid "Yellow front panel connector" msgstr "Äầu kẹp vàng bảng trÆ°á»›c" -#: sys/oss4/oss4-mixer.c:774 msgid "Green connector function" msgstr "Chức năng đầu kẹp lục" -#: sys/oss4/oss4-mixer.c:775 msgid "Green front panel connector function" msgstr "Chức năng đầu kẹp lục bảng trÆ°á»›c" -#: sys/oss4/oss4-mixer.c:776 msgid "Pink connector function" msgstr "Chức năng đầu kẹp hồng" -#: sys/oss4/oss4-mixer.c:777 msgid "Pink front panel connector function" msgstr "Chức năng đầu kẹp hồng bảng trÆ°á»›c" -#: sys/oss4/oss4-mixer.c:778 msgid "Blue connector function" msgstr "Chức năng đầu kẹp xanh" -#: sys/oss4/oss4-mixer.c:779 msgid "Blue front panel connector function" msgstr "Chức năng đầu kẹp xanh bảng trÆ°á»›c" -#: sys/oss4/oss4-mixer.c:780 msgid "Orange connector function" msgstr "Chức năng đầu kẹp cam" -#: sys/oss4/oss4-mixer.c:781 msgid "Orange front panel connector function" msgstr "Chức năng đầu kẹp cam bảng trÆ°á»›c" -#: sys/oss4/oss4-mixer.c:782 msgid "Black connector function" msgstr "Chức năng đầu kẹp Ä‘en" -#: sys/oss4/oss4-mixer.c:783 msgid "Black front panel connector function" msgstr "Chức năng đầu kẹp Ä‘en bảng trÆ°á»›c" -#: sys/oss4/oss4-mixer.c:784 msgid "Gray connector function" msgstr "Chức năng đầu kẹp xám" -#: sys/oss4/oss4-mixer.c:785 msgid "Gray front panel connector function" msgstr "Chức năng đầu kẹp xám bảng trÆ°á»›c" -#: sys/oss4/oss4-mixer.c:786 msgid "White connector function" msgstr "Chức năng đầu kẹp trắng" -#: sys/oss4/oss4-mixer.c:787 msgid "White front panel connector function" msgstr "Chức năng đầu kẹp trắng bảng trÆ°á»›c" -#: sys/oss4/oss4-mixer.c:788 msgid "Red connector function" msgstr "Chức năng đầu kẹp Ä‘á»" -#: sys/oss4/oss4-mixer.c:789 msgid "Red front panel connector function" msgstr "Chức năng đầu kẹp Ä‘á» bảng trÆ°á»›c" -#: sys/oss4/oss4-mixer.c:790 msgid "Yellow connector function" msgstr "Chức năng đầu kẹp vàng" -#: sys/oss4/oss4-mixer.c:791 msgid "Yellow front panel connector function" msgstr "Chức năng đầu kẹp vàng bảng trÆ°á»›c" -#: sys/oss4/oss4-mixer.c:797 msgid "Front panel line-in" msgstr "Dây vào bảng trÆ°á»›c" -#: sys/oss4/oss4-mixer.c:798 msgid "Headphones" msgstr "Tai nghe" -#: sys/oss4/oss4-mixer.c:799 msgid "Front panel headphones" msgstr "Tai nghe bảng trÆ°á»›c" -#: sys/oss4/oss4-mixer.c:804 msgid "PCM" msgstr "PCM" -#: sys/oss4/oss4-mixer.c:846 msgid "Virtual mixer input" msgstr "Äầu vào bá»™ hoà tiếng ảo" -#: sys/oss4/oss4-mixer.c:848 msgid "Virtual mixer output" msgstr "Äầu ra bá»™ hoà tiếng ảo" -#: sys/oss4/oss4-mixer.c:850 msgid "Virtual mixer channel configuration" msgstr "Cấu hình kênh bá»™ hoà tiếng ảo" -#: sys/oss4/oss4-sink.c:376 sys/oss4/oss4-source.c:367 msgid "" "Could not open audio device for playback. Device is being used by another " "application." @@ -361,7 +278,6 @@ msgstr "" "Không thể mở thiết bị âm thanh để phát lại. Thiết bị này Ä‘ang được ứng dụng " "khác sá»­ dụng." -#: sys/oss4/oss4-sink.c:386 sys/oss4/oss4-source.c:377 msgid "" "Could not open audio device for playback. You don't have permission to open " "the device." @@ -369,11 +285,9 @@ msgstr "" "Không thể mở thiết bị âm thanh để phát lại. Bạn không có quyá»n mở thiết bị " "này." -#: sys/oss4/oss4-sink.c:397 sys/oss4/oss4-source.c:388 msgid "Could not open audio device for playback." msgstr "Không thể mở thiết bị âm thanh để phát lại." -#: sys/oss4/oss4-sink.c:406 sys/oss4/oss4-source.c:398 msgid "" "Could not open audio device for playback. This version of the Open Sound " "System is not supported by this element." @@ -381,30 +295,14 @@ msgstr "" "Không thể mở thiết bị âm thanh để phát lại. Phiên bản Hệ thống Âm thanh Mở " "này không được yếu tố này há»— trợ." -#: sys/oss4/oss4-sink.c:522 msgid "Playback is not supported by this audio device." msgstr "Thiết bị âm thanh này không há»— trợ chức năng phát lại." -#: sys/oss4/oss4-sink.c:529 msgid "Audio playback error." msgstr "Lá»—i phát lại âm thanh." -#: sys/oss4/oss4-source.c:520 msgid "Recording is not supported by this audio device." msgstr "Thiết bị âm thanh này không há»— trợ chức năng thu." -#: sys/oss4/oss4-source.c:527 msgid "Error recording from audio device." msgstr "Lá»—i thu từ thiết bị âm thanh." - -#~ msgid "Failed to configure TwoLAME encoder. Check your encoding parameters." -#~ msgstr "" -#~ "Không cấu hình được bá»™ biên mã TwoLAME. Hãy kiểm tra lại các tham số biên " -#~ "mã." - -#~ msgid "" -#~ "The requested bitrate %d kbit/s for property '%s' is not allowed. The " -#~ "bitrate was changed to %d kbit/s." -#~ msgstr "" -#~ "Không cho phép tá»· lệ bit yêu cầu %d kbit/giây cho thuá»™c tính « %s ». Tá»· lê " -#~ "bit đã được thay đổi thành %d kbit/giây." diff --git a/po/zh_CN.po b/po/zh_CN.po index 9791842a..dd33e731 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.9.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-12 00:07+0100\n" +"POT-Creation-Date: 2009-05-16 01:36+0100\n" "PO-Revision-Date: 2009-01-14 12:04+0800\n" "Last-Translator: Ji ZhengYu \n" "Language-Team: Chinese (simplified) Date: Wed, 20 May 2009 17:10:40 +0200 Subject: mxf: Fix frame_layout for non-interlaced formats. Fixes #583337 --- gst/mxf/mxfmetadata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/mxf/mxfmetadata.c b/gst/mxf/mxfmetadata.c index 2237bc60..7d1af0c1 100644 --- a/gst/mxf/mxfmetadata.c +++ b/gst/mxf/mxfmetadata.c @@ -4984,7 +4984,7 @@ gboolean s = gst_caps_get_structure (caps, 0); if (!gst_structure_get_boolean (s, "interlaced", &interlaced) || !interlaced) - self->frame_layout = 1; + self->frame_layout = 0; else self->frame_layout = 3; -- cgit v1.2.1 From 7368fd257028e9ddf12f259f5474180350b00622 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Wed, 20 May 2009 20:44:12 +0100 Subject: Update .po files --- po/af.po | 2 +- po/az.po | 2 +- po/bg.po | 2 +- po/ca.po | 2 +- po/cs.po | 2 +- po/da.po | 2 +- po/de.po | 2 +- po/en_GB.po | 2 +- po/es.po | 2 +- po/fi.po | 2 +- po/fr.po | 2 +- po/hu.po | 2 +- po/id.po | 2 +- po/it.po | 2 +- po/ky.po | 2 +- po/lt.po | 2 +- po/mt.po | 2 +- po/nb.po | 2 +- po/nl.po | 2 +- po/or.po | 2 +- po/pl.po | 2 +- po/pt_BR.po | 2 +- po/ru.po | 2 +- po/sk.po | 2 +- po/sq.po | 2 +- po/sr.po | 2 +- po/sv.po | 2 +- po/tr.po | 2 +- po/uk.po | 2 +- po/vi.po | 2 +- po/zh_CN.po | 2 +- 31 files changed, 31 insertions(+), 31 deletions(-) diff --git a/po/af.po b/po/af.po index 894e8b64..26239a60 100644 --- a/po/af.po +++ b/po/af.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins 0.7.6\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"POT-Creation-Date: 2009-05-20 20:43+0100\n" "PO-Revision-Date: 2004-03-18 14:16+0200\n" "Last-Translator: Petri Jooste \n" "Language-Team: Afrikaans \n" diff --git a/po/az.po b/po/az.po index f346d31e..90d270ff 100644 --- a/po/az.po +++ b/po/az.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-0.8.0\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"POT-Creation-Date: 2009-05-20 20:43+0100\n" "PO-Revision-Date: 2004-03-19 18:29+0200\n" "Last-Translator: Metin Amiroff \n" "Language-Team: Azerbaijani \n" diff --git a/po/bg.po b/po/bg.po index afbb38e0..ea593be4 100644 --- a/po/bg.po +++ b/po/bg.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.11.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"POT-Creation-Date: 2009-05-20 20:43+0100\n" "PO-Revision-Date: 2009-05-15 08:31+0300\n" "Last-Translator: Alexander Shopov \n" "Language-Team: Bulgarian \n" diff --git a/po/ca.po b/po/ca.po index a964455a..3ac15545 100644 --- a/po/ca.po +++ b/po/ca.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins 0.8.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"POT-Creation-Date: 2009-05-20 20:43+0100\n" "PO-Revision-Date: 2004-08-05 15:48+0200\n" "Last-Translator: Jordi Mallach \n" "Language-Team: Catalan \n" diff --git a/po/cs.po b/po/cs.po index bf3b89c9..1ebc58a8 100644 --- a/po/cs.po +++ b/po/cs.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.9.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"POT-Creation-Date: 2009-05-20 20:43+0100\n" "PO-Revision-Date: 2009-01-18 18:55+0100\n" "Last-Translator: Petr Kovar \n" "Language-Team: Czech \n" diff --git a/po/da.po b/po/da.po index 857dd29c..6e876d71 100644 --- a/po/da.po +++ b/po/da.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad-0.10.10.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"POT-Creation-Date: 2009-05-20 20:43+0100\n" "PO-Revision-Date: 2009-04-13 11:28+0200\n" "Last-Translator: Joe Hansen \n" "Language-Team: Danish \n" diff --git a/po/de.po b/po/de.po index 384ad0dd..29de6310 100644 --- a/po/de.po +++ b/po/de.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.11.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"POT-Creation-Date: 2009-05-20 20:43+0100\n" "PO-Revision-Date: 2009-05-14 21:52+0200\n" "Last-Translator: Andre Klapper \n" "Language-Team: German \n" diff --git a/po/en_GB.po b/po/en_GB.po index 2c5525ff..714972a3 100644 --- a/po/en_GB.po +++ b/po/en_GB.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins 0.8.1\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"POT-Creation-Date: 2009-05-20 20:43+0100\n" "PO-Revision-Date: 2004-04-26 10:41-0400\n" "Last-Translator: Gareth Owen \n" "Language-Team: English (British) \n" diff --git a/po/es.po b/po/es.po index 5ac72f64..07742fbd 100644 --- a/po/es.po +++ b/po/es.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.10.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"POT-Creation-Date: 2009-05-20 20:43+0100\n" "PO-Revision-Date: 2009-04-04 13:31+0200\n" "Last-Translator: Jorge González González \n" "Language-Team: Spanish \n" diff --git a/po/fi.po b/po/fi.po index 452147b4..65496b23 100644 --- a/po/fi.po +++ b/po/fi.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.10.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"POT-Creation-Date: 2009-05-20 20:43+0100\n" "PO-Revision-Date: 2009-03-11 08:23+0200\n" "Last-Translator: Tommi Vainikainen \n" "Language-Team: Finnish \n" diff --git a/po/fr.po b/po/fr.po index fc54df33..e3a5d46d 100644 --- a/po/fr.po +++ b/po/fr.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.8.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"POT-Creation-Date: 2009-05-20 20:43+0100\n" "PO-Revision-Date: 2008-10-21 09:59+0200\n" "Last-Translator: Claude Paroz \n" "Language-Team: French \n" diff --git a/po/hu.po b/po/hu.po index d3c6d29c..4a9ccb3c 100644 --- a/po/hu.po +++ b/po/hu.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.10.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"POT-Creation-Date: 2009-05-20 20:43+0100\n" "PO-Revision-Date: 2009-04-20 02:16+0200\n" "Last-Translator: Gabor Kelemen \n" "Language-Team: Hungarian \n" diff --git a/po/id.po b/po/id.po index b21503a5..b9a5e89c 100644 --- a/po/id.po +++ b/po/id.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.11.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"POT-Creation-Date: 2009-05-20 20:43+0100\n" "PO-Revision-Date: 2009-05-14 21:41+0700\n" "Last-Translator: Andhika Padmawan \n" "Language-Team: Indonesian \n" diff --git a/po/it.po b/po/it.po index 08b34f97..62fa7705 100644 --- a/po/it.po +++ b/po/it.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.11.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"POT-Creation-Date: 2009-05-20 20:43+0100\n" "PO-Revision-Date: 2009-05-13 09:14+0200\n" "Last-Translator: Luca Ferretti \n" "Language-Team: Italian \n" diff --git a/po/ky.po b/po/ky.po index 426f8c6a..9f3570b4 100644 --- a/po/ky.po +++ b/po/ky.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.5\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"POT-Creation-Date: 2009-05-20 20:43+0100\n" "PO-Revision-Date: 2007-11-13 17:16+0600\n" "Last-Translator: Ilyas Bakirov \n" "Language-Team: Kirghiz \n" diff --git a/po/lt.po b/po/lt.po index 54d08c1f..f9613a61 100644 --- a/po/lt.po +++ b/po/lt.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad-0.10.6.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"POT-Creation-Date: 2009-05-20 20:43+0100\n" "PO-Revision-Date: 2008-05-14 02:13+0300\n" "Last-Translator: Gintautas Miliauskas \n" "Language-Team: Lithuanian \n" diff --git a/po/mt.po b/po/mt.po index 3bbe3944..bd142280 100644 --- a/po/mt.po +++ b/po/mt.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad-0.10.8.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"POT-Creation-Date: 2009-05-20 20:43+0100\n" "PO-Revision-Date: 2008-10-26 20:27+0100\n" "Last-Translator: Michel Bugeja \n" "Language-Team: Maltese \n" diff --git a/po/nb.po b/po/nb.po index df660f0e..f583dceb 100644 --- a/po/nb.po +++ b/po/nb.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.5\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"POT-Creation-Date: 2009-05-20 20:43+0100\n" "PO-Revision-Date: 2007-11-03 14:46+0100\n" "Last-Translator: Kjartan Maraas \n" "Language-Team: Norwegian Bokmaal \n" diff --git a/po/nl.po b/po/nl.po index 56ff9b2c..0207dbec 100644 --- a/po/nl.po +++ b/po/nl.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.9.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"POT-Creation-Date: 2009-05-20 20:43+0100\n" "PO-Revision-Date: 2009-01-23 18:06+0100\n" "Last-Translator: Freek de Kruijf \n" "Language-Team: Dutch \n" diff --git a/po/or.po b/po/or.po index 7d2cf270..cc31265a 100644 --- a/po/or.po +++ b/po/or.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-0.8.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"POT-Creation-Date: 2009-05-20 20:43+0100\n" "PO-Revision-Date: 2004-09-27 13:32+0530\n" "Last-Translator: Gora Mohanty \n" "Language-Team: Oriya \n" diff --git a/po/pl.po b/po/pl.po index e4fe8989..d2100c89 100644 --- a/po/pl.po +++ b/po/pl.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.9.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"POT-Creation-Date: 2009-05-20 20:43+0100\n" "PO-Revision-Date: 2009-01-12 20:15+0100\n" "Last-Translator: Jakub Bogusz \n" "Language-Team: Polish \n" diff --git a/po/pt_BR.po b/po/pt_BR.po index 80ee566b..c0303ce2 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad-0.10.10.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"POT-Creation-Date: 2009-05-20 20:43+0100\n" "PO-Revision-Date: 2009-03-11 02:31-0300\n" "Last-Translator: Fabrício Godoy \n" "Language-Team: Brazilian Portuguese \n" diff --git a/po/ru.po b/po/ru.po index 962b23c6..c7525626 100644 --- a/po/ru.po +++ b/po/ru.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.9.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"POT-Creation-Date: 2009-05-20 20:43+0100\n" "PO-Revision-Date: 2009-02-12 15:00+0200\n" "Last-Translator: Pavel Maryanov \n" "Language-Team: Russian \n" diff --git a/po/sk.po b/po/sk.po index 626f6e02..5edb99c2 100644 --- a/po/sk.po +++ b/po/sk.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.8.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"POT-Creation-Date: 2009-05-20 20:43+0100\n" "PO-Revision-Date: 2008-11-04 09:39+0100\n" "Last-Translator: Peter Tuhársky \n" "Language-Team: Slovak \n" diff --git a/po/sq.po b/po/sq.po index 5043b13b..e0461250 100644 --- a/po/sq.po +++ b/po/sq.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.7.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"POT-Creation-Date: 2009-05-20 20:43+0100\n" "PO-Revision-Date: 2008-08-15 16:07+0200\n" "Last-Translator: Laurent Dhima \n" "Language-Team: Albanian \n" diff --git a/po/sr.po b/po/sr.po index 6b57f350..c02366c5 100644 --- a/po/sr.po +++ b/po/sr.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins 0.7.6\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"POT-Creation-Date: 2009-05-20 20:43+0100\n" "PO-Revision-Date: 2004-03-13 00:18+0100\n" "Last-Translator: Danilo Segan \n" "Language-Team: Serbian \n" diff --git a/po/sv.po b/po/sv.po index 38ce7916..ccafdb11 100644 --- a/po/sv.po +++ b/po/sv.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.9.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"POT-Creation-Date: 2009-05-20 20:43+0100\n" "PO-Revision-Date: 2009-01-23 00:44+0100\n" "Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \n" diff --git a/po/tr.po b/po/tr.po index 7dee4c8c..1e1aaff2 100644 --- a/po/tr.po +++ b/po/tr.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad-0.10.10.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"POT-Creation-Date: 2009-05-20 20:43+0100\n" "PO-Revision-Date: 2009-03-11 08:01+0200\n" "Last-Translator: Server Acim \n" "Language-Team: Turkish \n" diff --git a/po/uk.po b/po/uk.po index cc11447e..ae4a24a0 100644 --- a/po/uk.po +++ b/po/uk.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.5\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"POT-Creation-Date: 2009-05-20 20:43+0100\n" "PO-Revision-Date: 2007-07-04 12:19+0200\n" "Last-Translator: Maxim V. Dziumanenko \n" "Language-Team: Ukrainian \n" diff --git a/po/vi.po b/po/vi.po index 6f6386f1..22207357 100644 --- a/po/vi.po +++ b/po/vi.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.11.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"POT-Creation-Date: 2009-05-20 20:43+0100\n" "PO-Revision-Date: 2009-05-12 21:32+0930\n" "Last-Translator: Clytie Siddall \n" "Language-Team: Vietnamese \n" diff --git a/po/zh_CN.po b/po/zh_CN.po index dd33e731..5256dd7a 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-bad 0.10.9.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2009-05-16 01:36+0100\n" +"POT-Creation-Date: 2009-05-20 20:43+0100\n" "PO-Revision-Date: 2009-01-14 12:04+0800\n" "Last-Translator: Ji ZhengYu \n" "Language-Team: Chinese (simplified) Date: Wed, 20 May 2009 22:31:54 +0100 Subject: Release 0.10.12 --- ChangeLog | 13 + NEWS | 61 +- RELEASE | 135 +- configure.ac | 2 +- docs/plugins/gst-plugins-bad-plugins.args | 74 +- docs/plugins/gst-plugins-bad-plugins.hierarchy | 337 +- docs/plugins/gst-plugins-bad-plugins.interfaces | 28 +- docs/plugins/gst-plugins-bad-plugins.prerequisites | 14 +- docs/plugins/inspect/plugin-aacparse.xml | 4 +- docs/plugins/inspect/plugin-aiffparse.xml | 4 +- docs/plugins/inspect/plugin-alsaspdif.xml | 4 +- docs/plugins/inspect/plugin-amrparse.xml | 4 +- docs/plugins/inspect/plugin-apex.xml | 4 +- docs/plugins/inspect/plugin-autoconvert.xml | 4 +- docs/plugins/inspect/plugin-bayer.xml | 4 +- docs/plugins/inspect/plugin-bz2.xml | 4 +- docs/plugins/inspect/plugin-camerabin.xml | 4 +- docs/plugins/inspect/plugin-cdaudio.xml | 4 +- docs/plugins/inspect/plugin-cdxaparse.xml | 4 +- docs/plugins/inspect/plugin-celt.xml | 4 +- docs/plugins/inspect/plugin-dc1394.xml | 4 +- docs/plugins/inspect/plugin-dccp.xml | 2 +- docs/plugins/inspect/plugin-debugutilsbad.xml | 4 +- docs/plugins/inspect/plugin-dfbvideosink.xml | 4 +- docs/plugins/inspect/plugin-dirac.xml | 2 +- docs/plugins/inspect/plugin-dtmf.xml | 4 +- docs/plugins/inspect/plugin-dtsdec.xml | 4 +- docs/plugins/inspect/plugin-dvb.xml | 4 +- docs/plugins/inspect/plugin-dvdspu.xml | 4 +- docs/plugins/inspect/plugin-faac.xml | 4 +- docs/plugins/inspect/plugin-faad.xml | 4 +- docs/plugins/inspect/plugin-fbdevsink.xml | 4 +- docs/plugins/inspect/plugin-festival.xml | 4 +- docs/plugins/inspect/plugin-freeze.xml | 4 +- docs/plugins/inspect/plugin-gsm.xml | 4 +- docs/plugins/inspect/plugin-gstrtpmanager.xml | 4 +- docs/plugins/inspect/plugin-gstsiren.xml | 4 +- docs/plugins/inspect/plugin-h264parse.xml | 4 +- docs/plugins/inspect/plugin-jack.xml | 4 +- docs/plugins/inspect/plugin-ladspa.xml | 4151 +------------------- docs/plugins/inspect/plugin-legacyresample.xml | 6 +- docs/plugins/inspect/plugin-liveadder.xml | 4 +- docs/plugins/inspect/plugin-metadata.xml | 4 +- docs/plugins/inspect/plugin-mms.xml | 4 +- docs/plugins/inspect/plugin-modplug.xml | 6 +- docs/plugins/inspect/plugin-mpeg2enc.xml | 2 +- docs/plugins/inspect/plugin-mpeg4videoparse.xml | 4 +- docs/plugins/inspect/plugin-mpegdemux2.xml | 4 +- docs/plugins/inspect/plugin-mpegtsmux.xml | 4 +- docs/plugins/inspect/plugin-mpegvideoparse.xml | 4 +- docs/plugins/inspect/plugin-mplex.xml | 4 +- docs/plugins/inspect/plugin-musepack.xml | 6 +- docs/plugins/inspect/plugin-musicbrainz.xml | 4 +- docs/plugins/inspect/plugin-mve.xml | 4 +- docs/plugins/inspect/plugin-mxf.xml | 4 +- docs/plugins/inspect/plugin-mythtv.xml | 4 +- docs/plugins/inspect/plugin-nas.xml | 4 +- docs/plugins/inspect/plugin-neon.xml | 4 +- docs/plugins/inspect/plugin-nsfdec.xml | 4 +- docs/plugins/inspect/plugin-nuvdemux.xml | 4 +- docs/plugins/inspect/plugin-ofa.xml | 4 +- docs/plugins/inspect/plugin-oss4.xml | 4 +- docs/plugins/inspect/plugin-pcapparse.xml | 2 +- docs/plugins/inspect/plugin-qtmux.xml | 10 +- docs/plugins/inspect/plugin-rawparse.xml | 4 +- docs/plugins/inspect/plugin-real.xml | 4 +- docs/plugins/inspect/plugin-resindvd.xml | 2 +- docs/plugins/inspect/plugin-rfbsrc.xml | 4 +- docs/plugins/inspect/plugin-rtpmux.xml | 4 +- docs/plugins/inspect/plugin-scaletempo.xml | 2 +- docs/plugins/inspect/plugin-sdl.xml | 4 +- docs/plugins/inspect/plugin-sdp.xml | 4 +- docs/plugins/inspect/plugin-selector.xml | 4 +- docs/plugins/inspect/plugin-sndfile.xml | 4 +- docs/plugins/inspect/plugin-soundtouch.xml | 2 +- docs/plugins/inspect/plugin-spcdec.xml | 2 +- docs/plugins/inspect/plugin-speed.xml | 4 +- docs/plugins/inspect/plugin-stereo.xml | 4 +- docs/plugins/inspect/plugin-subenc.xml | 4 +- docs/plugins/inspect/plugin-tta.xml | 4 +- docs/plugins/inspect/plugin-valve.xml | 4 +- docs/plugins/inspect/plugin-vcdsrc.xml | 4 +- docs/plugins/inspect/plugin-videosignal.xml | 4 +- docs/plugins/inspect/plugin-vmnc.xml | 4 +- docs/plugins/inspect/plugin-wildmidi.xml | 4 +- docs/plugins/inspect/plugin-x264.xml | 4 +- docs/plugins/inspect/plugin-xdgmime.xml | 4 +- docs/plugins/inspect/plugin-xvid.xml | 4 +- gst-plugins-bad.doap | 11 + win32/common/config.h | 4 +- 90 files changed, 539 insertions(+), 4603 deletions(-) diff --git a/ChangeLog b/ChangeLog index eb971757..85254fb0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,18 @@ +=== release 0.10.12 === + +2009-05-20 Jan Schmidt + + * configure.ac: + releasing 0.10.12, "More than I can handle" + +2009-05-20 17:10:40 +0200 Edward Hervey + + * gst/mxf/mxfmetadata.c: + mxf: Fix frame_layout for non-interlaced formats. Fixes #583337 + 2009-05-16 01:58:33 +0100 Jan Schmidt + * ChangeLog: * configure.ac: * po/af.po: * po/az.po: diff --git a/NEWS b/NEWS index 90bd44ca..966261a0 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,63 @@ -This is GStreamer Bad Plug-ins 0.10.11, "A precious stone" +This is GStreamer Bad Plug-ins 0.10.11, "More than I can handle" + +Changes since 0.10.11: + + * Presets support in several elements + * Support ITV MPEG-TS streams + * New element: flvmux + * New element: osxvideosrc + * Fixes in RTP elements + * camerabin fixes + * Improved QT/mp4 muxing + * xdgmime based content type guessing + * deinterlace2 moved to the Good plugins (replacing deinterlace) + * Support for MXF muxing, and improved MXF demuxing + * Greatly improved DVD playback + * DirectDraw element moved back from Good plugins + * Many other bug fixes and improvements + +Bugs fixed since 0.10.11: + + * 573852 : Update celt to 0.5.x + * 574401 : metadatamux fails^WIS failure + * 580091 : soundtouch plugin fails to load + * 153684 : [osxvideosrc] Mac users needs an osxvideosrc + * 537700 : [scaletempo] Scale audio tempo in sync with playback rate + * 569437 : mpegtsparse: flow error or crashes while dynamicly changi... + * 569673 : [Mpegtsparse] PAT changes not always signaled + * 569781 : [Mpegtsparse] drop of valid TS packets + * 573595 : plugins-bad mingw ports + * 573846 : Check for soundtouch-1.4 too + * 573847 : Use SDL static-libs for conftest and libs for gstsdl* + * 573848 : Use native CPU number detection in mpeg2enc + * 573849 : modplug's sndfile.h conflicts with libsndfile's sndfile.h + * 575388 : [aacparse] deadlocks in busy loop when seeking + * 575736 : mpeg2enc's bitrate parameter does not work properly + * 576408 : [playbin2] Deadlock when using resindvd as source + * 577690 : rtpdtmfmux: missing pad unref + * 577864 : [residvd] dvdnav version requirements should be higher + * 578112 : x264enc: I-frame request + * 578562 : dshowdecwrapper missing check for GST_DISABLE_GST_DEBUG + * 578563 : win32 export files are not disted + * 580133 : Regression in baseparse since last release + * 580144 : emit notify::internal-ssrc when there is a ssrc collision + * 580786 : [flvmux] " uninitialized variable " compiler warning + * 580901 : Uninitialized variable may be used in fpsdisplaysink.c + * 581375 : rtpssrcdemux crashes on SR-less rtcp packets + * 582013 : uninitialized var in mxfmux.c prevents gst-plugins-bad bu... + * 582074 : [faad] Fails to build with faad 2.6 (misdetected as 2.7) + * 582208 : [PATCH] fix for soundtouch-1.4 + * 582483 : y4menc doesn't pass timestamps on + * 582656 : [mxfdemux] Fix deadlock when querying from the pad-added ... + * 582702 : qtmux: crash in atom_moov_add_blob_tag + * 583337 : [mxfmux] Wrong layout for non-interlaced formats + * 580585 : rtpmux memleak + * 577843 : input-selector causes problems with DVD menus in playbin2 + * 581593 : gppmux doesn't support MPEG4 part 2 in sink caps + * 575284 : add auto-connect-forced mode to jackaudiosrc and jackaudi... + * 576021 : On Windows qtmux can't write files longer than 2-4 GiB, u... + * 576712 : Output-selector keeps reference to latest buffer when cha... + * 581427 : [mpeg4videoparse] config buffer is leaked Changes since 0.10.10: diff --git a/RELEASE b/RELEASE index b3abafb6..5b86ba82 100644 --- a/RELEASE +++ b/RELEASE @@ -1,5 +1,5 @@ -Release notes for GStreamer Bad Plug-ins 0.10.11 "A precious stone" +Release notes for GStreamer Bad Plug-ins 0.10.12 "More than I can handle" @@ -60,45 +60,62 @@ contains a set of well-supported plug-ins, but might pose problems for Features of this release - * Add ASS/SSA subtitle handling element assrender - * Leak fixes in the QuickTime decoder wrapper - * Better DirectShow output on Windows - * Extend QT muxing support to include AMR and H.263 - * mms seeking support - * Extended MXF file format handling - * camerabin and photography API for digital camera interfacing - * Merge elements from Farsight: liveadder, sirendec, sirenenc, valve, rtpdtmfsrc, rtpdtmdepay, dtmfsrc, rtpdtmfmux, autoconvert, mimdec, mimenc - * typefinder based on xdgmime + * Presets support in several elements + * Support ITV MPEG-TS streams + * New element: flvmux + * New element: osxvideosrc + * Fixes in RTP elements + * camerabin fixes + * Improved QT/mp4 muxing + * xdgmime based content type guessing + * deinterlace2 moved to the Good plugins (replacing deinterlace) + * Support for MXF muxing, and improved MXF demuxing + * Greatly improved DVD playback + * DirectDraw element moved back from Good plugins + * Many other bug fixes and improvements Bugs fixed in this release - * 573369 : [gstfaad] Memory corruption and segfault - * 568704 : Metadatamux: unable to configure byte order for EXIF - * 354908 : videoflipping interface for v4l2src - * 369912 : missing inclusion in rpm spec file - * 469930 : [mmssrc] seeking support PATCH - * 481075 : Full support for ASS/SSA subtitles - * 549645 : merge useful elements from gst-plugins-farsight into core - * 567003 : [ladspa] improve plugin scanning - * 567371 : [mpegtsparse] memory leak in mpegtspacketizer - * 567828 : rtpmanager and RTCP BYE packet - * 567965 : [flvdemux] add support for ECMA arrays in script tags - * 568480 : gst-plugins-bad dccp plugin won't compile on Soalris - * 568483 : Problems linking gst-plugins-bad - * 568837 : RFE: allow building against the system modplug library - * 569323 : [qtmux] should support audio/AMR sink - * 570996 : bpmdetect relibably crashes with SIGSEGV on particular file - * 571560 : gstdshowaudio decoder doesn't compile. - * 572315 : Compiling camerabin on Windows with Visual Studio - * 572900 : gstrtpsession should not forward recv side event to the s... - * 573288 : [mpegtsdemux] memory leak when pusi is missed due to pack... - * 573391 : [videoanalyse] Wrong brightness calculation - * 575157 : xdgmime typefinder: make more conservative - * 575565 : [mxf] mxf plugin uses symbols not in glib 2.6 (minimum gl... - * 564114 : [PATCH] fbdev: fix depth calculation - * 573850 : Use Glib's byte order in gstgsmdec - * 573851 : Use glib integer types in gstfaad - * 172043 : [mpegpsdemux] wrong video length on mpeg file + * 573852 : Update celt to 0.5.x + * 574401 : metadatamux fails^WIS failure + * 580091 : soundtouch plugin fails to load + * 153684 : [osxvideosrc] Mac users needs an osxvideosrc + * 537700 : [scaletempo] Scale audio tempo in sync with playback rate + * 569437 : mpegtsparse: flow error or crashes while dynamicly changi... + * 569673 : [Mpegtsparse] PAT changes not always signaled + * 569781 : [Mpegtsparse] drop of valid TS packets + * 573595 : plugins-bad mingw ports + * 573846 : Check for soundtouch-1.4 too + * 573847 : Use SDL static-libs for conftest and libs for gstsdl* + * 573848 : Use native CPU number detection in mpeg2enc + * 573849 : modplug's sndfile.h conflicts with libsndfile's sndfile.h + * 575388 : [aacparse] deadlocks in busy loop when seeking + * 575736 : mpeg2enc's bitrate parameter does not work properly + * 576408 : [playbin2] Deadlock when using resindvd as source + * 577690 : rtpdtmfmux: missing pad unref + * 577864 : [residvd] dvdnav version requirements should be higher + * 578112 : x264enc: I-frame request + * 578562 : dshowdecwrapper missing check for GST_DISABLE_GST_DEBUG + * 578563 : win32 export files are not disted + * 580133 : Regression in baseparse since last release + * 580144 : emit notify::internal-ssrc when there is a ssrc collision + * 580786 : [flvmux] " uninitialized variable " compiler warning + * 580901 : Uninitialized variable may be used in fpsdisplaysink.c + * 581375 : rtpssrcdemux crashes on SR-less rtcp packets + * 582013 : uninitialized var in mxfmux.c prevents gst-plugins-bad bu... + * 582074 : [faad] Fails to build with faad 2.6 (misdetected as 2.7) + * 582208 : [PATCH] fix for soundtouch-1.4 + * 582483 : y4menc doesn't pass timestamps on + * 582656 : [mxfdemux] Fix deadlock when querying from the pad-added ... + * 582702 : qtmux: crash in atom_moov_add_blob_tag + * 583337 : [mxfmux] Wrong layout for non-interlaced formats + * 580585 : rtpmux memleak + * 577843 : input-selector causes problems with DVD menus in playbin2 + * 581593 : gppmux doesn't support MPEG4 part 2 in sink caps + * 575284 : add auto-connect-forced mode to jackaudiosrc and jackaudi... + * 576021 : On Windows qtmux can't write files longer than 2-4 GiB, u... + * 576712 : Output-selector keeps reference to latest buffer when cha... + * 581427 : [mpeg4videoparse] config buffer is leaked Download @@ -127,46 +144,38 @@ Applications Contributors to this release - * Andoni Morales - * Andrzej PolatyÅ„ski + * Alan Falloon + * Alessandro Decina * Andy Wingo - * Benjamin Schmitz - * Brian Cameron + * Arnout Vandecappelle * Christian Schaller * David Schleef * Edward Hervey - * Hans de Goede - * HÃ¥vard Graff + * Felipe Contreras + * Haakon Sporsheim * Jan Schmidt - * Jan Urbanski - * Josep Torra + * Janin Kolenc * Julien Moutte - * LRN * Lasse Laukkanen * Laurent Glayal + * Marc-Andre Lureau * Mark Nauwelaerts * Michael Smith - * Nokia Corporation - * Olivier Crete + * Ole André Vadla RavnÃ¥s * Olivier Crête - * Peter Kjellerstedt - * Philipe Kalaf - * Philippe Khalaf * René Stadler + * Rov Juvano * Sebastian Dröge - * Sebastian Pölsterl - * Simon McVittie - * Sjoerd Simons + * Sergey Scobich * Stefan Kost - * Thiago Sousa Santos + * Sébastien Moutte + * Thiago Santos + * Thomas Vander Stichele * Tim-Philipp Müller + * Tristan Matthews + * Vincent Genieux + * Vincent Torri * Wim Taymans - * Youness Alaoui - * Zaheer Merali - * Zeeshan Ali - * philippe.kalaf@collabora.co.uk - * sjoerd@luon.net - * vanista - * zeenix@gmail.com - * zeeshan.ali@nokia.com + * Zaheer Abbas Merali + * РуÑлан Ижбулатов   \ No newline at end of file diff --git a/configure.ac b/configure.ac index a0f16e1f..5c7ab2d8 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ AC_PREREQ(2.52) dnl initialize autoconf dnl when going to/from release please set the nano (fourth number) right ! dnl releases only do Wall, cvs and prerelease does Werror too -AC_INIT(GStreamer Bad Plug-ins, 0.10.11.3, +AC_INIT(GStreamer Bad Plug-ins, 0.10.12, http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer, gst-plugins-bad) diff --git a/docs/plugins/gst-plugins-bad-plugins.args b/docs/plugins/gst-plugins-bad-plugins.args index 0f238ebf..a1b7e6e2 100644 --- a/docs/plugins/gst-plugins-bad-plugins.args +++ b/docs/plugins/gst-plugins-bad-plugins.args @@ -41,7 +41,7 @@ GstXvidEnc::averaging-period gint -[G_MAXULONG,100] +[-1,100] rw Averaging Period [CBR] Number of frames for which XviD averages bitrate. @@ -91,7 +91,7 @@ GstXvidEnc::buffer gint ->= G_MAXULONG +>= -1 rw Buffer Size [CBR] Size of the video buffers. @@ -121,7 +121,7 @@ GstXvidEnc::container-frame-overhead gint -[G_MAXULONG,100] +[-1,100] rw Container Frame Overhead [PASS2] Average container overhead per frame. @@ -151,7 +151,7 @@ GstXvidEnc::flow-control-strength gint -[G_MAXULONG,100] +[-1,100] rw Flow Control Strength [PASS2] Overflow control strength per frame. @@ -211,7 +211,7 @@ GstXvidEnc::keyframe-reduction gint -[G_MAXULONG,100] +[-1,100] rw Keyframe Reduction [PASS2] Keyframe size reduction in % of those within threshold. @@ -221,7 +221,7 @@ GstXvidEnc::keyframe-threshold gint -[G_MAXULONG,100] +[-1,100] rw Keyframe Threshold [PASS2] Distance between keyframes not to be subject to reduction. @@ -281,7 +281,7 @@ GstXvidEnc::max-overflow-degradation gint -[G_MAXULONG,100] +[-1,100] rw Max Overflow Degradation [PASS2] Amount in % that flow control can decrease frame size compared to ideal curve. @@ -291,7 +291,7 @@ GstXvidEnc::max-overflow-improvement gint -[G_MAXULONG,100] +[-1,100] rw Max Overflow Improvement [PASS2] Amount in % that flow control can increase frame size compared to ideal curve. @@ -421,7 +421,7 @@ GstXvidEnc::reaction-delay-factor gint -[G_MAXULONG,100] +[-1,100] rw Reaction Delay Factor [CBR] Reaction delay factor. @@ -681,7 +681,7 @@ GstMpeg2enc::bitrate gint -[0,10240] +[0,10000] rw Bitrate Compressed video bitrate (kbps). @@ -841,7 +841,7 @@ GstMpeg2enc::non-video-bitrate gint -[0,10240] +[0,10000] rw Non-video bitrate Assumed bitrate of non-video for sequence splitting (kbps). @@ -984,7 +984,7 @@ [0,512] rw VCD stills size -Size of VCD stills (in kB). +Size of VCD stills (in KB). 0 @@ -1681,7 +1681,7 @@ GstDvbSrc::diseqc-source gint -[G_MAXULONG,7] +[-1,7] rw diseqc source DISEqC selected source (-1 disabled) (DVB-S). @@ -17455,7 +17455,7 @@ rw Path where to search for RealPlayer codecs Path where to search for RealPlayer codecs. -"/usr/lib64/win32:/usr/lib64/codecs:/usr/local/lib64/win32:/usr/local/lib64/codecs" +"/usr/lib/win32:/usr/lib/codecs:/usr/local/RealPlayer/codecs:/usr/local/lib/win32:/usr/local/lib/codecs" @@ -17495,7 +17495,7 @@ rw Path where to search for RealPlayer codecs Path where to search for RealPlayer codecs. -"/usr/lib64/win32:/usr/lib64/codecs:/usr/local/lib64/win32:/usr/local/lib64/codecs" +"/usr/lib/win32:/usr/lib/codecs:/usr/local/RealPlayer/codecs:/usr/local/lib/win32:/usr/local/lib/codecs" @@ -18431,7 +18431,7 @@ DvbBaseBin::diseqc-source gint -[G_MAXULONG,7] +[-1,7] rw diseqc source DISEqC selected source (-1 disabled) (DVB-S). @@ -22376,7 +22376,7 @@ GstDCCPClientSrc::sockfd gint ->= G_MAXULONG +>= -1 rw Socket fd The socket file descriptor. @@ -22416,7 +22416,7 @@ GstDCCPServerSink::sockfd gint ->= G_MAXULONG +>= -1 rw Socket fd The client socket file descriptor. @@ -22476,7 +22476,7 @@ GstDCCPClientSink::sockfd gint ->= G_MAXULONG +>= -1 rw Socket fd The socket file descriptor. @@ -22536,7 +22536,7 @@ GstDCCPServerSrc::sockfd gint ->= G_MAXULONG +>= -1 rw Socket fd The client socket file descriptor. @@ -22596,7 +22596,7 @@ GstMpegTSDemux::program-number gint ->= G_MAXULONG +>= -1 rw Program Number Program number to demux for (-1 to ignore). @@ -22656,7 +22656,7 @@ GstPcapParse::dst-port gint -[G_MAXULONG,65535] +[-1,65535] rw Destination port Destination port to restrict to. @@ -22676,7 +22676,7 @@ GstPcapParse::src-port gint -[G_MAXULONG,65535] +[-1,65535] rw Source port Source port to restrict to. @@ -23206,7 +23206,7 @@ GstRTPDTMFSrc::seqnum-offset gint ->= G_MAXULONG +>= -1 rw Sequence number Offset Offset to add to all outgoing seqnum (-1 = random). @@ -23236,7 +23236,7 @@ GstRTPDTMFSrc::timestamp-offset gint ->= G_MAXULONG +>= -1 rw Timestamp Offset Offset to add to all outgoing timestamps (-1 = random). @@ -23286,7 +23286,7 @@ GstRTPMux::seqnum-offset gint ->= G_MAXULONG +>= -1 rw Sequence number Offset Offset to add to all outgoing seqnum (-1 = random). @@ -23306,7 +23306,7 @@ GstRTPMux::timestamp-offset gint ->= G_MAXULONG +>= -1 rw Timestamp Offset Offset to add to all outgoing timestamps (-1 = random). @@ -23373,3 +23373,23 @@ TRUE + +GstFPSDisplaySink::sync +gboolean + +rw +Sync +Sync on the clock. +TRUE + + + +GstFPSDisplaySink::text-overlay +gboolean + +rw +text-overlay +Wether to use text-overlay. +TRUE + + diff --git a/docs/plugins/gst-plugins-bad-plugins.hierarchy b/docs/plugins/gst-plugins-bad-plugins.hierarchy index 52501cc2..d29e1748 100644 --- a/docs/plugins/gst-plugins-bad-plugins.hierarchy +++ b/docs/plugins/gst-plugins-bad-plugins.hierarchy @@ -13,299 +13,151 @@ GObject GstCameraBin RsnDvdBin DvbBaseBin + GstAutoConvert GstRtpBin GstRtpClient - FPSDisplaySink - GstAutoConvert GstSDPDemux - GstAmrwbDec - GstAmrwbParse - GstAmrwbEnc - GstBaseMetadata - GstMetadataDemux - GstMetadataMux - GstXvidEnc - GstXvidDec - GstFaad + GstFPSDisplaySink GstBz2enc GstBz2dec - GstCDAudio - GstX264Enc - GstBaseSink - GstVideoSink - GstDfbVideoSink - GstSDLVideoSink - GstBaseAudioSink - GstAudioSink - GstNasSink - GstSDLAudioSink - GstApExSink - GstOss4Sink - GstJackAudioSink - AlsaSPDIFSink - GstSFSink - GstFBDEVSink - GstDCCPServerSink - GstDCCPClientSink + GstMplex GstBaseSrc GstPushSrc + GstNeonhttpSrc GstMythtvSrc - GstMMS GstDc1394 + GstMMS GstBaseAudioSrc GstJackAudioSrc GstAudioSrc GstOss4Source - GstNeonhttpSrc GstVCDSrc GstDvbSrc - GstRfbSrc GstDCCPClientSrc GstDCCPServerSrc + GstRfbSrc GstSFSrc GstDTMFSrc GstRTPDTMFSrc + GstCDAudio + GstBaseSink + GstVideoSink + GstDfbVideoSink + GstSDLVideoSink + GstBaseAudioSink + GstAudioSink + GstSDLAudioSink + GstApExSink + GstNasSink + GstOss4Sink + GstJackAudioSink + GstSFSink + AlsaSPDIFSink + GstFBDEVSink + GstDCCPServerSink + GstDCCPClientSink + GstFaad + GstCeltEnc + GstCeltDec + GstSpcDec + GstWildmidi GstBaseTransform GstAudioFilter GstOFA + GstBPMDetect GstStereo GstBayer2RGB GstScaletempo + GstDeinterlace GstVideoFilter GstVideoAnalyse GstVideoDetect GstVideoMark - GstAudioresample - GstDeinterlace - GstDtsDec - GstFaac - GstMusepackDec - GstGSMEnc - GstGSMDec - GstModPlug - GstWildmidi + GstIIR + GstLegacyresample GstSignalProcessor - ladspa-flanger - ladspa-tap-rotspeak - ladspa-retroFlange - ladspa-triplePara - ladspa-tap-vibrato - ladspa-pitchScaleHQ - ladspa-matrixStMS - ladspa-imp - ladspa-analogueOsc - ladspa-hilbert - ladspa-notch-iir - ladspa-bodeShifter - ladspa-valveRect - ladspa-tap-sigmoid - ladspa-diode - ladspa-se4 - ladspa-pitchScale - ladspa-foldover - ladspa-freqTracker - ladspa-rateShifter - ladspa-inv - ladspa-sc1 - ladspa-ringmod-2i1o - ladspa-ringmod-1i1o1l - ladspa-impulse-fc - ladspa-tap-reverb + ladspa-noise-white + ladspa-delay-5s ladspa-amp-mono ladspa-amp-stereo - ladspa-stepMuxer - ladspa-tap-equalizer - ladspa-fastLookaheadLimiter - ladspa-artificialLatency - ladspa-gate - ladspa-delay-n - ladspa-delay-l - ladspa-delay-c - ladspa-bwxover-iir - ladspa-buttlow-iir - ladspa-butthigh-iir - ladspa-mbeq - ladspa-lsFilter - ladspa-const - ladspa-Pulse-VCO - ladspa-Saw-VCO - ladspa-Rec-VCO - ladspa-smoothDecimate - ladspa-giantFlange - ladspa-lfoPhaser - ladspa-fourByFourPole - ladspa-autoPhaser - ladspa-lpf - ladspa-hpf - ladspa-tap-autopan - ladspa-highpass-iir - ladspa-comb - ladspa-matrixSpatialiser - ladspa-comb-n - ladspa-comb-l - ladspa-comb-c - ladspa-lcrDelay - ladspa-combSplitter - ladspa-dcRemove - ladspa-tap-doubler - ladspa-sinusWavewrapper - ladspa-modDelay - ladspa-shaper - ladspa-zm1 - ladspa-sc4 - ladspa-delay-5s - ladspa-dysonCompress - ladspa-tap-stereo-echo - ladspa-lowpass-iir - ladspa-fadDelay - ladspa-plate - ladspa-bandpass-iir - ladspa-singlePara - ladspa-gongBeater - ladspa-tapeDelay - ladspa-sifter - ladspa-tap-dynamics-st - ladspa-hardLimiter - ladspa-sc3 - ladspa-amp - ladspa-xfade - ladspa-xfade4 - ladspa-tap-pitch - ladspa-multivoiceChorus - ladspa-G2reverb - ladspa-surroundEncoder - ladspa-sc2 - ladspa-gverb - ladspa-matrixMSSt - ladspa-amPitchshift - ladspa-tap-deesser - ladspa-tap-tubewarmth - ladspa-hermesFilter - ladspa-bandpass-a-iir - ladspa-gsm - ladspa-Chorus1 - ladspa-Chorus2 - ladspa-crossoverDist - ladspa-allpass-n - ladspa-allpass-l - ladspa-allpass-c - ladspa-decay - ladspa-valve - ladspa-bodeShifterCV - ladspa-harmonicGen - ladspa-waveTerrain - ladspa-transient - ladspa-sinCos - ladspa-split - ladspa-divider - ladspa-declip - ladspa-tap-dynamics-m - ladspa-tap-reflector - ladspa-Ambisonics-11-mono-panner - ladspa-Ambisonics-11-stereo-panner - ladspa-Ambisonics-11-rotator - ladspa-Ambisonics-11-square-decoder - ladspa-Ambisonics-11-hexagon-decoder - ladspa-Ambisonics-11-cube-decoder - ladspa-tap-equalizer-bw - ladspa-tap-tremolo ladspa-sine-faaa ladspa-sine-faac ladspa-sine-fcaa ladspa-sine-fcac - ladspa-chebstortion - ladspa-alias - ladspa-Parametric1 - ladspa-tap-limiter - ladspa-noise-white - ladspa-tap-pinknoise - ladspa-delayorama - ladspa-pointerCastDistortion - ladspa-svf - ladspa-Phaser1 - ladspa-Phaser1+LFO - ladspa-revdelay - ladspa-tap-chorusflanger - ladspa-vynil - ladspa-Mvchpf-1 - ladspa-djFlanger - ladspa-fmOsc - ladspa-decimator - ladspa-Ambisonics-21-panner - ladspa-Ambisonics-21-rotator - ladspa-dj-eq-mono - ladspa-dj-eq - ladspa-Mvclpf-1 - ladspa-Mvclpf-2 - ladspa-Mvclpf-3 - ladspa-Mvclpf-4 - ladspa-satanMaximiser - ladspa-foverdrive - ladspa-karaoke - ladspa-gong - ladspa-sc4m - Gstassrender - GstTwoLame - GstCeltEnc - GstCeltDec + ladspa-lpf + ladspa-hpf + GstXvidEnc + GstXvidDec + GstPitch + GstMusepackDec + GstMpeg2enc + GstGSMEnc + GstGSMDec + GstFaac + GstDtsDec + GstDiracEnc GstTRM + GstX264Enc + GstBaseMetadata + GstMetadataDemux + GstMetadataMux GstOss4Mixer + GstAmrBaseParse + GstAmrParse + GstFestival + GstModPlug GstMveDemux GstMveMux - GstDeinterlace2 - GstBaseRTPDepayload - GstRtpDTMFDepay - GstRtpJitterBuffer - GstRtpPtDemux - GstRtpSession - GstRtpSsrcDemux - GstMpegPSDemux - GstMpegTSDemux - MpegTSParse - GstH264Parse - GstLiveAdder + GstSrtEnc GstMpeg4VParse - GstValve - MpegVideoParse - GstFLVDemux - GstFlvMux - GstNuvDemux + GstCDXAParse + GstVcdParse + GstNsfDec + GstSirenDec + GstSirenEnc + MpegTsMux + GstRealVideoDec + GstRealAudioDec + GstRTPMux + GstRTPDTMFMux GstRawParse GstVideoParse GstAudioParse - GstSpeed + GstRtpJitterBuffer + GstRtpPtDemux + GstRtpSession + GstRtpSsrcDemux + GstPcapParse GstInputSelector GstOutputSelector + GstAacBaseParse + GstAacParse + GstVMncDec GstQTMux GstMP4Mux GstGPPMux GstMJ2Mux - GstAacBaseParse - GstAacParse - GstCDXAParse - GstVcdParse - GstNsfDec - GstTtaParse - GstTtaDec - GstY4mEncode - GstRTPMux - GstRTPDTMFMux - GstFreeze - GstVMncDec - AIFFParse - GstSrtEnc - GstFestival - MpegTsMux - GstDVDSpu + MpegVideoParse + GstH264Parse GstMXFDemux GstMXFMux - GstRealVideoDec - GstRealAudioDec - GstAmrBaseParse - GstAmrParse - GstSirenDec - GstSirenEnc - GstPcapParse + GstSpeed + GstFreeze + GstDVDSpu + AIFFParse + GstTtaParse + GstTtaDec + GstLiveAdder + GstValve + GstBaseRTPDepayload + GstRtpDTMFDepay + GstNuvDemux + GstFLVDemux + GstFlvMux + GstMpegPSDemux + GstMpegTSDemux + MpegTSParse + GstDeinterlace2 GstBus GstTask GstClock @@ -327,12 +179,13 @@ GInterface GTypePlugin GstChildProxy GstURIHandler - GstTagSetter GstImplementsInterface GstNavigation GstColorBalance GstXOverlay + GstTagSetter + GstPreset GstMixer GstPropertyProbe - GstPhotography MXFDescriptiveMetadataFrameworkInterface + GstPhotography diff --git a/docs/plugins/gst-plugins-bad-plugins.interfaces b/docs/plugins/gst-plugins-bad-plugins.interfaces index 415e3e72..4a91852b 100644 --- a/docs/plugins/gst-plugins-bad-plugins.interfaces +++ b/docs/plugins/gst-plugins-bad-plugins.interfaces @@ -1,28 +1,34 @@ GstBin GstChildProxy GstPipeline GstChildProxy -GstCameraBin GstChildProxy GstTagSetter GstImplementsInterface GstColorBalance GstXOverlay GstPhotography +GstCameraBin GstChildProxy GstImplementsInterface GstColorBalance GstXOverlay GstTagSetter GstPhotography RsnDvdBin GstChildProxy GstURIHandler DvbBaseBin GstChildProxy GstURIHandler +GstAutoConvert GstChildProxy GstRtpBin GstChildProxy GstRtpClient GstChildProxy -FPSDisplaySink GstChildProxy GstImplementsInterface GstXOverlay -GstAutoConvert GstChildProxy GstSDPDemux GstChildProxy -GstMetadataMux GstTagSetter +GstFPSDisplaySink GstChildProxy +GstNeonhttpSrc GstURIHandler +GstMythtvSrc GstURIHandler +GstMMS GstURIHandler +GstOss4Source GstImplementsInterface GstMixer GstPropertyProbe +GstVCDSrc GstURIHandler GstCDAudio GstURIHandler GstDfbVideoSink GstImplementsInterface GstNavigation GstColorBalance GstSDLVideoSink GstImplementsInterface GstNavigation GstXOverlay GstApExSink GstImplementsInterface GstMixer GstOss4Sink GstPropertyProbe -GstMythtvSrc GstURIHandler -GstMMS GstURIHandler -GstOss4Source GstImplementsInterface GstMixer GstPropertyProbe -GstNeonhttpSrc GstURIHandler -GstVCDSrc GstURIHandler -GstCeltEnc GstTagSetter +GstCeltEnc GstTagSetter GstPreset +GstXvidEnc GstPreset +GstMpeg2enc GstPreset +GstFaac GstPreset +GstDiracEnc GstPreset +GstX264Enc GstPreset +GstMetadataMux GstTagSetter GstOss4Mixer GstImplementsInterface GstMixer GstPropertyProbe -GstDeinterlace2 GstChildProxy GstQTMux GstTagSetter GstMP4Mux GstTagSetter GstGPPMux GstTagSetter GstMJ2Mux GstTagSetter +GstFlvMux GstTagSetter +GstDeinterlace2 GstChildProxy diff --git a/docs/plugins/gst-plugins-bad-plugins.prerequisites b/docs/plugins/gst-plugins-bad-plugins.prerequisites index cfb75898..fa02d4b9 100644 --- a/docs/plugins/gst-plugins-bad-plugins.prerequisites +++ b/docs/plugins/gst-plugins-bad-plugins.prerequisites @@ -1,8 +1,8 @@ GstChildProxy GstObject -GstTagSetter GstObject GstElement -GstImplementsInterface GstObject GstElement -GstColorBalance GstObject GstImplementsInterface GstElement -GstXOverlay GstObject GstImplementsInterface GstElement -GstMixer GstObject GstImplementsInterface GstElement -GstPhotography GstObject GstImplementsInterface GstElement -MXFDescriptiveMetadataFrameworkInterface MXFMetadataBase MXFDescriptiveMetadata +GstImplementsInterface GstElement +GstColorBalance GstImplementsInterface GstElement +GstXOverlay GstImplementsInterface GstElement +GstTagSetter GstElement +GstMixer GstImplementsInterface GstElement +MXFDescriptiveMetadataFrameworkInterface MXFDescriptiveMetadata +GstPhotography GstImplementsInterface GstElement diff --git a/docs/plugins/inspect/plugin-aacparse.xml b/docs/plugins/inspect/plugin-aacparse.xml index 1c7d252e..1c393910 100644 --- a/docs/plugins/inspect/plugin-aacparse.xml +++ b/docs/plugins/inspect/plugin-aacparse.xml @@ -3,10 +3,10 @@ Advanced Audio Coding Parser ../../gst/aacparse/.libs/libgstaacparse.so libgstaacparse.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-aiffparse.xml b/docs/plugins/inspect/plugin-aiffparse.xml index bda4ae6d..bd759dab 100644 --- a/docs/plugins/inspect/plugin-aiffparse.xml +++ b/docs/plugins/inspect/plugin-aiffparse.xml @@ -3,10 +3,10 @@ Parse an .aiff file into raw audio ../../gst/aiffparse/.libs/libgstaiffparse.so libgstaiffparse.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-alsaspdif.xml b/docs/plugins/inspect/plugin-alsaspdif.xml index 2639b4e3..cf814485 100644 --- a/docs/plugins/inspect/plugin-alsaspdif.xml +++ b/docs/plugins/inspect/plugin-alsaspdif.xml @@ -3,10 +3,10 @@ Alsa plugin for S/PDIF output ../../ext/alsaspdif/.libs/libgstalsaspdif.so libgstalsaspdif.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-amrparse.xml b/docs/plugins/inspect/plugin-amrparse.xml index 41c890ae..cf277f20 100644 --- a/docs/plugins/inspect/plugin-amrparse.xml +++ b/docs/plugins/inspect/plugin-amrparse.xml @@ -3,10 +3,10 @@ Adaptive Multi-Rate Parser ../../gst/amrparse/.libs/libgstamrparse.so libgstamrparse.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-apex.xml b/docs/plugins/inspect/plugin-apex.xml index e17de0b2..ad80bfcc 100644 --- a/docs/plugins/inspect/plugin-apex.xml +++ b/docs/plugins/inspect/plugin-apex.xml @@ -3,10 +3,10 @@ Apple AirPort Express Plugin ../../ext/apexsink/.libs/libgstapexsink.so libgstapexsink.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-autoconvert.xml b/docs/plugins/inspect/plugin-autoconvert.xml index ea9be4e7..3b36c4bf 100644 --- a/docs/plugins/inspect/plugin-autoconvert.xml +++ b/docs/plugins/inspect/plugin-autoconvert.xml @@ -3,10 +3,10 @@ Selects convertor element based on caps ../../gst/autoconvert/.libs/libgstautoconvert.so libgstautoconvert.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-bayer.xml b/docs/plugins/inspect/plugin-bayer.xml index b706b97b..f80b59c3 100644 --- a/docs/plugins/inspect/plugin-bayer.xml +++ b/docs/plugins/inspect/plugin-bayer.xml @@ -3,10 +3,10 @@ Elements to convert Bayer images ../../gst/bayer/.libs/libgstbayer.so libgstbayer.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-bz2.xml b/docs/plugins/inspect/plugin-bz2.xml index 75959fc3..1d4c9832 100644 --- a/docs/plugins/inspect/plugin-bz2.xml +++ b/docs/plugins/inspect/plugin-bz2.xml @@ -3,10 +3,10 @@ Compress or decompress streams ../../ext/bz2/.libs/libgstbz2.so libgstbz2.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-camerabin.xml b/docs/plugins/inspect/plugin-camerabin.xml index fc709f6e..de34c5d4 100644 --- a/docs/plugins/inspect/plugin-camerabin.xml +++ b/docs/plugins/inspect/plugin-camerabin.xml @@ -3,10 +3,10 @@ High level api for DC (Digital Camera) application ../../gst/camerabin/.libs/libgstcamerabin.so libgstcamerabin.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-cdaudio.xml b/docs/plugins/inspect/plugin-cdaudio.xml index 2cc8c513..df9b1ee4 100644 --- a/docs/plugins/inspect/plugin-cdaudio.xml +++ b/docs/plugins/inspect/plugin-cdaudio.xml @@ -3,10 +3,10 @@ Play CD audio through the CD Drive ../../ext/cdaudio/.libs/libgstcdaudio.so libgstcdaudio.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-cdxaparse.xml b/docs/plugins/inspect/plugin-cdxaparse.xml index 610e0a88..64fa14f2 100644 --- a/docs/plugins/inspect/plugin-cdxaparse.xml +++ b/docs/plugins/inspect/plugin-cdxaparse.xml @@ -3,10 +3,10 @@ Parse a .dat file (VCD) into raw mpeg1 ../../gst/cdxaparse/.libs/libgstcdxaparse.so libgstcdxaparse.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-celt.xml b/docs/plugins/inspect/plugin-celt.xml index bab76834..14473606 100644 --- a/docs/plugins/inspect/plugin-celt.xml +++ b/docs/plugins/inspect/plugin-celt.xml @@ -3,10 +3,10 @@ CELT plugin library ../../ext/celt/.libs/libgstcelt.so libgstcelt.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-dc1394.xml b/docs/plugins/inspect/plugin-dc1394.xml index 32e341b2..c71c1695 100644 --- a/docs/plugins/inspect/plugin-dc1394.xml +++ b/docs/plugins/inspect/plugin-dc1394.xml @@ -3,10 +3,10 @@ 1394 IIDC Video Source ../../ext/dc1394/.libs/libgstdc1394.so libgstdc1394.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-dccp.xml b/docs/plugins/inspect/plugin-dccp.xml index dda567bd..d2d230b4 100644 --- a/docs/plugins/inspect/plugin-dccp.xml +++ b/docs/plugins/inspect/plugin-dccp.xml @@ -3,7 +3,7 @@ transfer data over the network via DCCP. ../../gst/dccp/.libs/libgstdccp.so libgstdccp.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad DCCP diff --git a/docs/plugins/inspect/plugin-debugutilsbad.xml b/docs/plugins/inspect/plugin-debugutilsbad.xml index 9edeaf09..d9c59e36 100644 --- a/docs/plugins/inspect/plugin-debugutilsbad.xml +++ b/docs/plugins/inspect/plugin-debugutilsbad.xml @@ -3,10 +3,10 @@ Collection of elements that may or may not be useful for debugging ../../gst/debugutils/.libs/libgstdebugutilsbad.so libgstdebugutilsbad.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-dfbvideosink.xml b/docs/plugins/inspect/plugin-dfbvideosink.xml index a4975984..954ba16d 100644 --- a/docs/plugins/inspect/plugin-dfbvideosink.xml +++ b/docs/plugins/inspect/plugin-dfbvideosink.xml @@ -3,10 +3,10 @@ DirectFB video output plugin ../../ext/directfb/.libs/libgstdfbvideosink.so libgstdfbvideosink.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-dirac.xml b/docs/plugins/inspect/plugin-dirac.xml index 07bd893c..3aed5544 100644 --- a/docs/plugins/inspect/plugin-dirac.xml +++ b/docs/plugins/inspect/plugin-dirac.xml @@ -3,7 +3,7 @@ Dirac plugin ../../ext/dirac/.libs/libgstdirac.so libgstdirac.so - 0.10.11 + 0.10.12 LGPL gst-plugins-bad GStreamer Bad Plug-ins source release diff --git a/docs/plugins/inspect/plugin-dtmf.xml b/docs/plugins/inspect/plugin-dtmf.xml index ccf2d2d5..ec7ba070 100644 --- a/docs/plugins/inspect/plugin-dtmf.xml +++ b/docs/plugins/inspect/plugin-dtmf.xml @@ -3,10 +3,10 @@ DTMF plugins ../../gst/dtmf/.libs/libgstdtmf.so libgstdtmf.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-dtsdec.xml b/docs/plugins/inspect/plugin-dtsdec.xml index 31dd0876..952b06c3 100644 --- a/docs/plugins/inspect/plugin-dtsdec.xml +++ b/docs/plugins/inspect/plugin-dtsdec.xml @@ -3,10 +3,10 @@ Decodes DTS audio streams ../../ext/dts/.libs/libgstdtsdec.so libgstdtsdec.so - 0.10.11.1 + 0.10.12 GPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-dvb.xml b/docs/plugins/inspect/plugin-dvb.xml index 5d55eb67..3beaaf82 100644 --- a/docs/plugins/inspect/plugin-dvb.xml +++ b/docs/plugins/inspect/plugin-dvb.xml @@ -3,10 +3,10 @@ DVB elements ../../sys/dvb/.libs/libgstdvb.so libgstdvb.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-dvdspu.xml b/docs/plugins/inspect/plugin-dvdspu.xml index 2fe9d8d9..e930028b 100644 --- a/docs/plugins/inspect/plugin-dvdspu.xml +++ b/docs/plugins/inspect/plugin-dvdspu.xml @@ -3,10 +3,10 @@ DVD Sub-picture Overlay element ../../gst/dvdspu/.libs/libgstdvdspu.so libgstdvdspu.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-faac.xml b/docs/plugins/inspect/plugin-faac.xml index a4d7ada2..ca97558e 100644 --- a/docs/plugins/inspect/plugin-faac.xml +++ b/docs/plugins/inspect/plugin-faac.xml @@ -3,10 +3,10 @@ Free AAC Encoder (FAAC) ../../ext/faac/.libs/libgstfaac.so libgstfaac.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-faad.xml b/docs/plugins/inspect/plugin-faad.xml index 9b289935..a895c494 100644 --- a/docs/plugins/inspect/plugin-faad.xml +++ b/docs/plugins/inspect/plugin-faad.xml @@ -3,10 +3,10 @@ Free AAC Decoder (FAAD) ../../ext/faad/.libs/libgstfaad.so libgstfaad.so - 0.10.11.1 + 0.10.12 GPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-fbdevsink.xml b/docs/plugins/inspect/plugin-fbdevsink.xml index 5b4fde9f..e5f0cc7a 100644 --- a/docs/plugins/inspect/plugin-fbdevsink.xml +++ b/docs/plugins/inspect/plugin-fbdevsink.xml @@ -3,10 +3,10 @@ linux framebuffer video sink ../../sys/fbdev/.libs/libgstfbdevsink.so libgstfbdevsink.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-festival.xml b/docs/plugins/inspect/plugin-festival.xml index 8786b357..6bbf7b22 100644 --- a/docs/plugins/inspect/plugin-festival.xml +++ b/docs/plugins/inspect/plugin-festival.xml @@ -3,10 +3,10 @@ Synthesizes plain text into audio ../../gst/festival/.libs/libgstfestival.so libgstfestival.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-freeze.xml b/docs/plugins/inspect/plugin-freeze.xml index c7797157..574c3c54 100644 --- a/docs/plugins/inspect/plugin-freeze.xml +++ b/docs/plugins/inspect/plugin-freeze.xml @@ -3,10 +3,10 @@ Stream freezer ../../gst/freeze/.libs/libgstfreeze.so libgstfreeze.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-gsm.xml b/docs/plugins/inspect/plugin-gsm.xml index 83765d70..102af4d1 100644 --- a/docs/plugins/inspect/plugin-gsm.xml +++ b/docs/plugins/inspect/plugin-gsm.xml @@ -3,10 +3,10 @@ GSM encoder/decoder ../../ext/gsm/.libs/libgstgsm.so libgstgsm.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-gstrtpmanager.xml b/docs/plugins/inspect/plugin-gstrtpmanager.xml index f6f246dd..9c085e5c 100644 --- a/docs/plugins/inspect/plugin-gstrtpmanager.xml +++ b/docs/plugins/inspect/plugin-gstrtpmanager.xml @@ -3,10 +3,10 @@ RTP session management plugin library ../../gst/rtpmanager/.libs/libgstrtpmanager.so libgstrtpmanager.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-gstsiren.xml b/docs/plugins/inspect/plugin-gstsiren.xml index d56f0434..29bc12bd 100644 --- a/docs/plugins/inspect/plugin-gstsiren.xml +++ b/docs/plugins/inspect/plugin-gstsiren.xml @@ -3,10 +3,10 @@ Siren encoder/decoder/payloader/depayloader plugins ../../gst/siren/.libs/libgstsiren.so libgstsiren.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-h264parse.xml b/docs/plugins/inspect/plugin-h264parse.xml index 58a5c86e..b190eda0 100644 --- a/docs/plugins/inspect/plugin-h264parse.xml +++ b/docs/plugins/inspect/plugin-h264parse.xml @@ -3,10 +3,10 @@ Element parsing raw h264 streams ../../gst/h264parse/.libs/libgsth264parse.so libgsth264parse.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-jack.xml b/docs/plugins/inspect/plugin-jack.xml index b23ec5dd..c8cf9ef7 100644 --- a/docs/plugins/inspect/plugin-jack.xml +++ b/docs/plugins/inspect/plugin-jack.xml @@ -3,10 +3,10 @@ Jack elements ../../ext/jack/.libs/libgstjack.so libgstjack.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-ladspa.xml b/docs/plugins/inspect/plugin-ladspa.xml index c89cce37..677a3601 100644 --- a/docs/plugins/inspect/plugin-ladspa.xml +++ b/docs/plugins/inspect/plugin-ladspa.xml @@ -3,3864 +3,18 @@ All LADSPA plugins ../../ext/ladspa/.libs/libgstladspa.so libgstladspa.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin - ladspa-Ambisonics-11-cube-decoder - AMB order 1,1 cube decoder - Filter/Effect/Audio/LADSPA - AMB order 1,1 cube decoder - Fons Adriaensen <fons@kokkinizita.net> - - - Out-ULB - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out-URB - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out-URF - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out-ULF - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out-DLB - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out-DRB - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out-DRF - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out-DLF - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - In-Z - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - In-Y - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - In-X - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - In-W - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-Ambisonics-11-hexagon-decoder - AMB order 1,1 hexagon decoder - Filter/Effect/Audio/LADSPA - AMB order 1,1 hexagon decoder - Fons Adriaensen <fons@kokkinizita.net> - - - Out-L-LF - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out-LB-LB - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out-RB-B - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out-R-RB - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out-RF-RF - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out-LF-F - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - In-Z - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - In-Y - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - In-X - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - In-W - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-Ambisonics-11-mono-panner - AMB order 1,1 mono panner - Filter/Effect/Audio/LADSPA - AMB order 1,1 mono panner - Fons Adriaensen <fons@kokkinizita.net> - - - Out-Z - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out-Y - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out-X - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out-W - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - In - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-Ambisonics-11-rotator - AMB order 1,1 rotator - Filter/Effect/Audio/LADSPA - AMB order 1,1 rotator - Fons Adriaensen <fons@kokkinizita.net> - - - Out-Z - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out-Y - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out-X - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out-W - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - In-Z - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - In-Y - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - In-X - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - In-W - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-Ambisonics-11-square-decoder - AMB order 1,1 square decoder - Filter/Effect/Audio/LADSPA - AMB order 1,1 square decoder - Fons Adriaensen <fons@kokkinizita.net> - - - Out-LB-L - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out-RB-B - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out-RF-R - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out-LF-F - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - In-Z - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - In-Y - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - In-X - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - In-W - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-Ambisonics-11-stereo-panner - AMB order 1,1 stereo panner - Filter/Effect/Audio/LADSPA - AMB order 1,1 stereo panner - Fons Adriaensen <fons@kokkinizita.net> - - - Out-Z - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out-Y - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out-X - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out-W - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - In-R - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - In-L - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-Ambisonics-21-panner - AMB order 2,1 panner - Filter/Effect/Audio/LADSPA - AMB order 2,1 panner - Fons Adriaensen <fons@kokkinizita.net> - - - Out-Z - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out-V - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out-U - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out-Y - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out-X - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out-W - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - In - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-Ambisonics-21-rotator - AMB order 2,1 rotator - Filter/Effect/Audio/LADSPA - AMB order 2,1 rotator - Fons Adriaensen <fons@kokkinizita.net> - - - Out-Z - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out-V - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out-U - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out-Y - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out-X - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out-W - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - In-Z - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - In-V - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - In-U - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - In-Y - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - In-X - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - In-W - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-Chorus1 - Chorus1 - Based on CSound orchestra by Sean Costello - Filter/Effect/Audio/LADSPA - Chorus1 - Based on CSound orchestra by Sean Costello - Fons Adriaensen <fons.adriaensen@alcatel.be> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-Chorus2 - Chorus2 - Based on CSound orchestra by Sean Costello - Filter/Effect/Audio/LADSPA - Chorus2 - Based on CSound orchestra by Sean Costello - Fons Adriaensen <fons.adriaensen@alcatel.be> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-G2reverb - Stereo reverb - Filter/Effect/Audio/LADSPA - Stereo reverb - Fons Adriaensen <fons.adriaensen@alcatel.be> - - - Out_R - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Out_L - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - In_R - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - In_L - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-Mvchpf-1 - Mvchpf-1 Digital implementation of the VC HP filter invented by R.A. Moog - Filter/Effect/Audio/LADSPA - Mvchpf-1 Digital implementation of the VC HP filter invented by R.A. Moog - Fons Adriaensen <fons.adriaensen@skynet.be> - - - Exp_FM - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Frequency - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-Mvclpf-1 - Mvclpf-1 Digital implementation of the VC filter invented by R.A.Moog - Filter/Effect/Audio/LADSPA - Mvclpf-1 Digital implementation of the VC filter invented by R.A.Moog - Fons Adriaensen <fons.adriaensen@alcatel.be> - - - Resonance - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Exp_FM - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Frequency - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-Mvclpf-2 - Mvclpf-2 Digital implementation of the VC filter invented by R.A.Moog - Filter/Effect/Audio/LADSPA - Mvclpf-2 Digital implementation of the VC filter invented by R.A.Moog - Fons Adriaensen <fons.adriaensen@alcatel.be> - - - Resonance - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Exp_FM - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Frequency - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-Mvclpf-3 - Mvclpf-3 Digital implementation of the VC filter invented by R.A.Moog - Filter/Effect/Audio/LADSPA - Mvclpf-3 Digital implementation of the VC filter invented by R.A.Moog - Fons Adriaensen <fons.adriaensen@alcatel.be> - - - Resonance - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Exp_FM - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Frequency - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-Mvclpf-4 - Mvclpf-4 Digital implementation of the VC filter invented by R.A.Moog - Filter/Effect/Audio/LADSPA - Mvclpf-4 Digital implementation of the VC filter invented by R.A.Moog - Fons Adriaensen <fons.adriaensen@alcatel.be> - - - Resonance - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Exp_FM - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Frequency - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-Parametric1 - 4-band parametric filter - Filter/Effect/Audio/LADSPA - 4-band parametric filter - Fons Adriaensen <fons.adriaensen@alcatel.be> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-Phaser1 - Phaser1 - Similar to CSound's phaser1 by Sean Costello - Filter/Effect/Audio/LADSPA - Phaser1 - Similar to CSound's phaser1 by Sean Costello - Fons Adriaensen <fons.adriaensen@alcatel.be> - - - Lin_FM - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Exp_FM - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Frequency - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-Phaser1+LFO - Phaser1 with LFO - Filter/Effect/Audio/LADSPA - Phaser1 with LFO - Fons Adriaensen <fons.adriaensen@alcatel.be> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-Pulse-VCO - Pulse-VCO -- Anti-aliased oscillator - Filter/Effect/Audio/LADSPA - Pulse-VCO -- Anti-aliased oscillator - Fons Adriaensen <fons.adriaensen@alcatel.be> - - - Lin_FM - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Exp_FM - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Frequency - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-Rec-VCO - Rec-VCO -- Anti-aliased oscillator - Filter/Effect/Audio/LADSPA - Rec-VCO -- Anti-aliased oscillator - Fons Adriaensen <fons.adriaensen@alcatel.be> - - - Sync - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Mod - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Lin_FM - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Exp_FM - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Frequency - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-Saw-VCO - Saw-VCO -- Anti-aliased oscillator - Filter/Effect/Audio/LADSPA - Saw-VCO -- Anti-aliased oscillator - Fons Adriaensen <fons.adriaensen@alcatel.be> - - - Sync - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Lin_FM - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Exp_FM - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Frequency - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-alias - Aliasing - Filter/Effect/Audio/LADSPA/Distortions/Amplitude - Aliasing - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-allpass-c - Allpass delay line, cubic spline interpolation - Filter/Effect/Audio/LADSPA/Time/Delays - Allpass delay line, cubic spline interpolation - Andy Wingo <wingo at pobox dot com> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-allpass-l - Allpass delay line, linear interpolation - Filter/Effect/Audio/LADSPA/Time/Delays - Allpass delay line, linear interpolation - Andy Wingo <wingo at pobox dot com> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-allpass-n - Allpass delay line, noninterpolating - Filter/Effect/Audio/LADSPA/Time/Delays - Allpass delay line, noninterpolating - Andy Wingo <wingo at pobox dot com> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-amPitchshift - AM pitchshifter - Filter/Effect/Audio/LADSPA/Frequency/Pitch shifters - AM pitchshifter - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-amp - Simple amplifier - Filter/Effect/Audio/LADSPA/Amplitude/Amplifiers - Simple amplifier - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-amp-mono - Mono Amplifier - Filter/Effect/Audio/LADSPA - Mono Amplifier - Richard Furse (LADSPA example plugins) - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-amp-stereo - Stereo Amplifier - Filter/Effect/Audio/LADSPA - Stereo Amplifier - Richard Furse (LADSPA example plugins) - - - Output_-Right- - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_-Right- - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Output_-Left- - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_-Left- - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-analogueOsc - Analogue Oscillator - Source/Audio/LADSPA/Generators/Oscillators - Analogue Oscillator - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-artificialLatency - Artificial latency - Filter/Effect/Audio/LADSPA/Utilities - Artificial latency - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-autoPhaser - Auto phaser - Filter/Effect/Audio/LADSPA/Time/Phasers - Auto phaser - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-bandpass-a-iir - Glame Bandpass Analog Filter - Filter/Effect/Audio/LADSPA/Frequency/Bandpass/Filters - Glame Bandpass Analog Filter - Alexander Ehlert <mag@glame.de> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-bandpass-iir - Glame Bandpass Filter - Filter/Effect/Audio/LADSPA/Frequency/Bandpass/Filters - Glame Bandpass Filter - Alexander Ehlert <mag@glame.de> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-bodeShifter - Bode frequency shifter - Filter/Effect/Audio/LADSPA/Spectral - Bode frequency shifter - Steve Harris <steve@plugin.org.uk> - - - Up_out - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Down_out - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-bodeShifterCV - Bode frequency shifter (CV) - Filter/Effect/Audio/LADSPA/Spectral - Bode frequency shifter (CV) - Steve Harris <steve@plugin.org.uk> - - - Mix_out - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Up_out - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Down_out - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Shift_CV - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-butthigh-iir - GLAME Butterworth Highpass - Filter/Effect/Audio/LADSPA/Frequency/Highpass/Filters - GLAME Butterworth Highpass - Alexander Ehlert <mag@glame.de> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-buttlow-iir - GLAME Butterworth Lowpass - Filter/Effect/Audio/LADSPA/Frequency/Lowpass/Filters - GLAME Butterworth Lowpass - Alexander Ehlert <mag@glame.de> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-bwxover-iir - Glame Butterworth X-over Filter - Filter/Effect/Audio/LADSPA/Frequency/Bandpass/Filters - Glame Butterworth X-over Filter - Alexander Ehlert <mag@glame.de> - - - HP-Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - LP-Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-chebstortion - Chebyshev distortion - Filter/Effect/Audio/LADSPA/Distortions/Amplitude - Chebyshev distortion - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-comb - Comb Filter - Filter/Effect/Audio/LADSPA/Frequency/Combs/Filters - Comb Filter - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-comb-c - Comb delay line, cubic spline interpolation - Filter/Effect/Audio/LADSPA/Time/Delays - Comb delay line, cubic spline interpolation - Andy Wingo <wingo at pobox dot com> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-comb-l - Comb delay line, linear interpolation - Filter/Effect/Audio/LADSPA/Time/Delays - Comb delay line, linear interpolation - Andy Wingo <wingo at pobox dot com> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-comb-n - Comb delay line, noninterpolating - Filter/Effect/Audio/LADSPA/Time/Delays - Comb delay line, noninterpolating - Andy Wingo <wingo at pobox dot com> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-combSplitter - Comb Splitter - Filter/Effect/Audio/LADSPA/Frequency/Combs/Filters - Comb Splitter - Steve Harris <steve@plugin.org.uk> - - - Output_2 - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Output_1 - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-const - Constant Signal Generator - Filter/Effect/Audio/LADSPA/Utilities - Constant Signal Generator - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-crossoverDist - Crossover distortion - Filter/Effect/Audio/LADSPA/Distortions/Amplitude - Crossover distortion - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-dcRemove - DC Offset Remover - Filter/Effect/Audio/LADSPA - DC Offset Remover - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-decay - Exponential signal decay - Filter/Effect/Audio/LADSPA/Utilities - Exponential signal decay - Andy Wingo <wingo at pobox dot com> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-decimator - Decimator - Filter/Effect/Audio/LADSPA/Distortions/Amplitude - Decimator - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-declip - Declipper - Filter/Effect/Audio/LADSPA/Amplitude/Waveshapers - Declipper - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-delay-5s - Simple Delay Line - Filter/Effect/Audio/LADSPA - Simple Delay Line - Richard Furse (LADSPA example plugins) - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-delay-c - Simple delay line, cubic spline interpolation - Filter/Effect/Audio/LADSPA/Time/Delays - Simple delay line, cubic spline interpolation - Andy Wingo <wingo at pobox dot com> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-delay-l - Simple delay line, linear interpolation - Filter/Effect/Audio/LADSPA/Time/Delays - Simple delay line, linear interpolation - Andy Wingo <wingo at pobox dot com> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-delay-n - Simple delay line, noninterpolating - Filter/Effect/Audio/LADSPA/Time/Delays - Simple delay line, noninterpolating - Andy Wingo <wingo at pobox dot com> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-delayorama - Delayorama - Filter/Effect/Audio/LADSPA/Time/Delays - Delayorama - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-diode - Diode Processor - Filter/Effect/Audio/LADSPA/Distortions/Amplitude - Diode Processor - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-divider - Audio Divider (Suboctave Generator) - Filter/Effect/Audio/LADSPA/Generators - Audio Divider (Suboctave Generator) - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-dj-eq - DJ EQ - Filter/Effect/Audio/LADSPA/Frequency/EQs - DJ EQ - Steve Harris <steve@plugin.org.uk> - - - Output_R - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Output_L - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_R - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_L - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-dj-eq-mono - DJ EQ (mono) - Filter/Effect/Audio/LADSPA/Frequency/EQs - DJ EQ (mono) - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-djFlanger - DJ flanger - Filter/Effect/Audio/LADSPA/Time/Flangers - DJ flanger - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-dysonCompress - Dyson compressor - Filter/Effect/Audio/LADSPA/Compressors/Amplitude/Dynamics - Dyson compressor - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-fadDelay - Fractionally Addressed Delay Line - Filter/Effect/Audio/LADSPA/Time/Delays - Fractionally Addressed Delay Line - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-fastLookaheadLimiter - Fast Lookahead limiter - Filter/Effect/Audio/LADSPA/Limiters/Amplitude/Dynamics - Fast Lookahead limiter - Steve Harris <steve@plugin.org.uk> - - - Output_2 - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Output_1 - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_2 - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_1 - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-flanger - Flanger - Filter/Effect/Audio/LADSPA/Time/Flangers - Flanger - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-fmOsc - FM Oscillator - Filter/Effect/Audio/LADSPA/Generators/Oscillators - FM Oscillator - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Frequency_-Hz- - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-foldover - Foldover distortion - Filter/Effect/Audio/LADSPA/Distortions/Amplitude - Foldover distortion - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-fourByFourPole - 4 x 4 pole allpass - Filter/Effect/Audio/LADSPA/Frequency/Filters/Allpass - 4 x 4 pole allpass - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-foverdrive - Fast overdrive - Filter/Effect/Audio/LADSPA/Distortions/Amplitude - Fast overdrive - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-freqTracker - Frequency tracker - Filter/Effect/Audio/LADSPA/Frequency/Measurement - Frequency tracker - Steve Harris <steve@plugin.org.uk> - - - Frequency_-Hz- - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-gate - Gate - Filter/Effect/Audio/LADSPA/Gates/Amplitude/Dynamics - Gate - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-giantFlange - Giant flange - Filter/Effect/Audio/LADSPA/Time/Flangers - Giant flange - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-gong - Gong model - Filter/Effect/Audio/LADSPA - Gong model - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-gongBeater - Gong beater - Filter/Effect/Audio/LADSPA/Generators - Gong beater - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-gsm - GSM simulator - Filter/Effect/Audio/LADSPA/Distortions/Amplitude - GSM simulator - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-gverb - GVerb - Filter/Effect/Audio/LADSPA/Reverbs/Time/Simulators - GVerb - Juhana Sadeharju <kouhia at nic.funet.fi>, LADSPAification by Steve Harris <steve@plugin.org.uk> - - - Right_output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Left_output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-hardLimiter - Hard Limiter - Filter/Effect/Audio/LADSPA - Hard Limiter - Marcus Andersson - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-harmonicGen - Harmonic generator - Filter/Effect/Audio/LADSPA/Generators - Harmonic generator - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-hermesFilter - Hermes Filter - Filter/Effect/Audio/LADSPA/Frequency/Filters - Hermes Filter - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-highpass-iir - Glame Highpass Filter - Filter/Effect/Audio/LADSPA/Frequency/Highpass/Filters - Glame Highpass Filter - Alexander Ehlert <mag@glame.de> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-hilbert - Hilbert transformer - Filter/Effect/Audio/LADSPA/Utilities - Hilbert transformer - Steve Harris <steve@plugin.org.uk> - - - 90deg_output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - 0deg_output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-hpf - Simple High Pass Filter - Filter/Effect/Audio/LADSPA - Simple High Pass Filter - Richard Furse (LADSPA example plugins) - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-imp - Impulse convolver - Filter/Effect/Audio/LADSPA/Spectral - Impulse convolver - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-impulse-fc - Nonbandlimited single-sample impulses (Frequency: Control) - Source/Audio/LADSPA/Utilities - Nonbandlimited single-sample impulses (Frequency: Control) - Andy Wingo <wingo at pobox dot com> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-inv - Inverter - Filter/Effect/Audio/LADSPA/Utilities - Inverter - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-karaoke - Karaoke - Filter/Effect/Audio/LADSPA/Utilities - Karaoke - Steve Harris <steve@plugin.org.uk> - - - Right_out - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Left_out - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Right_in - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Left_in - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-lcrDelay - L/C/R Delay - Filter/Effect/Audio/LADSPA/Time/Delays - L/C/R Delay - Steve Harris <steve@plugin.org.uk> - - - R_output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - L_output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - R_input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - L_input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-lfoPhaser - LFO Phaser - Filter/Effect/Audio/LADSPA/Time/Phasers - LFO Phaser - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-lowpass-iir - Glame Lowpass Filter - Filter/Effect/Audio/LADSPA/Frequency/Lowpass/Filters - Glame Lowpass Filter - Alexander Ehlert <mag@glame.de> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-lpf - Simple Low Pass Filter - Filter/Effect/Audio/LADSPA - Simple Low Pass Filter - Richard Furse (LADSPA example plugins) - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-lsFilter - LS Filter - Filter/Effect/Audio/LADSPA/Frequency/Filters - LS Filter - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-matrixMSSt - Matrix: MS to Stereo - Filter/Effect/Audio/LADSPA/Utilities - Matrix: MS to Stereo - Steve Harris <steve@plugin.org.uk> - - - Right - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Left - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Side - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Mid - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-matrixSpatialiser - Matrix Spatialiser - Filter/Effect/Audio/LADSPA/Utilities - Matrix Spatialiser - Joern Nettingsmeier <nettings@folkwang-hochschule.de> - - - Output_R - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Output_L - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_R - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_L - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-matrixStMS - Matrix: Stereo to MS - Filter/Effect/Audio/LADSPA/Utilities - Matrix: Stereo to MS - Steve Harris <steve@plugin.org.uk> - - - Side - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Mid - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Right - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Left - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-mbeq - Multiband EQ - Filter/Effect/Audio/LADSPA/Frequency/Multiband/EQs - Multiband EQ - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-modDelay - Modulatable delay - Filter/Effect/Audio/LADSPA/Time/Delays - Modulatable delay - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Delay_-s- - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-multivoiceChorus - Multivoice Chorus - Filter/Effect/Audio/LADSPA/Chorus/Time - Multivoice Chorus - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-noise-white - White Noise Source - Source/Audio/LADSPA - White Noise Source - Richard Furse (LADSPA example plugins) - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-notch-iir - Mag's Notch Filter - Filter/Effect/Audio/LADSPA/Frequency/Notch/Filters - Mag's Notch Filter - Alexander Ehlert <mag@glame.de> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-pitchScale - Pitch Scaler - Filter/Effect/Audio/LADSPA/Frequency/Pitch shifters - Pitch Scaler - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-pitchScaleHQ - Higher Quality Pitch Scaler - Filter/Effect/Audio/LADSPA/Frequency/Pitch shifters - Higher Quality Pitch Scaler - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-plate - Plate reverb - Filter/Effect/Audio/LADSPA/Reverbs/Time/Simulators - Plate reverb - Steve Harris <steve@plugin.org.uk> - - - Right_output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Left_output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-pointerCastDistortion - Pointer cast distortion - Filter/Effect/Audio/LADSPA/Distortions/Amplitude - Pointer cast distortion - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-rateShifter - Rate shifter - Filter/Effect/Audio/LADSPA/Frequency/Pitch shifters - Rate shifter - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-retroFlange - Retro Flanger - Filter/Effect/Audio/LADSPA/Time/Flangers - Retro Flanger - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-revdelay - Reverse Delay (5s max) - Filter/Effect/Audio/LADSPA/Time/Delays - Reverse Delay (5s max) - Jesse Chappell <jesse at essej dot net> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-ringmod-1i1o1l - Ringmod with LFO - Filter/Effect/Audio/LADSPA/Amplitude/Modulators - Ringmod with LFO - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-ringmod-2i1o - Ringmod with two inputs - Filter/Effect/Audio/LADSPA/Amplitude/Modulators - Ringmod with two inputs - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Modulator - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-satanMaximiser - Barry's Satan Maximiser - Filter/Effect/Audio/LADSPA - Barry's Satan Maximiser - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-sc1 - SC1 - Filter/Effect/Audio/LADSPA/Compressors/Amplitude/Dynamics - SC1 - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-sc2 - SC2 - Filter/Effect/Audio/LADSPA/Compressors/Amplitude/Dynamics - SC2 - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Sidechain - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-sc3 - SC3 - Filter/Effect/Audio/LADSPA/Compressors/Amplitude/Dynamics - SC3 - Steve Harris <steve@plugin.org.uk> - - - Right_output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Left_output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Right_input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Left_input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Sidechain - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-sc4 - SC4 - Filter/Effect/Audio/LADSPA/Compressors/Amplitude/Dynamics - SC4 - Steve Harris <steve@plugin.org.uk> - - - Right_output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Left_output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Right_input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Left_input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-sc4m - SC4 mono - Filter/Effect/Audio/LADSPA/Compressors/Amplitude/Dynamics - SC4 mono - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-se4 - SE4 - Filter/Effect/Audio/LADSPA/Compressors/Amplitude/Dynamics - SE4 - Steve Harris <steve@plugin.org.uk> - - - Right_output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Left_output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Right_input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Left_input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-shaper - Wave shaper - Filter/Effect/Audio/LADSPA/Amplitude/Waveshapers - Wave shaper - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-sifter - Signal sifter - Filter/Effect/Audio/LADSPA - Signal sifter - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-sinCos - Sine + cosine oscillator - Source/Audio/LADSPA/Generators/Oscillators - Sine + cosine oscillator - Steve Harris <steve@plugin.org.uk> - - - Cosine_output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Sine_output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-sine-faaa - Sine Oscillator (Freq:audio, Amp:audio) - Filter/Effect/Audio/LADSPA - Sine Oscillator (Freq:audio, Amp:audio) - Richard Furse (LADSPA example plugins) - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Amplitude - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Frequency_-Hz- - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-sine-faac - Sine Oscillator (Freq:audio, Amp:control) - Filter/Effect/Audio/LADSPA - Sine Oscillator (Freq:audio, Amp:control) - Richard Furse (LADSPA example plugins) - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Frequency_-Hz- - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-sine-fcaa - Sine Oscillator (Freq:control, Amp:audio) - Filter/Effect/Audio/LADSPA - Sine Oscillator (Freq:control, Amp:audio) - Richard Furse (LADSPA example plugins) - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Amplitude - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-sine-fcac - Sine Oscillator (Freq:control, Amp:control) - Source/Audio/LADSPA - Sine Oscillator (Freq:control, Amp:control) - Richard Furse (LADSPA example plugins) - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-singlePara - Single band parametric - Filter/Effect/Audio/LADSPA/Frequency/EQs/Parametric - Single band parametric - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-sinusWavewrapper - Sinus wavewrapper - Filter/Effect/Audio/LADSPA/Amplitude/Waveshapers - Sinus wavewrapper - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-smoothDecimate - Smooth Decimator - Filter/Effect/Audio/LADSPA/Distortions/Amplitude - Smooth Decimator - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-split - Mono to Stereo splitter - Filter/Effect/Audio/LADSPA/Utilities - Mono to Stereo splitter - Frank Neumann <franky@users.sourceforge.net> - - - Output_2 - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Output_1 - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-stepMuxer - Step Demuxer - Filter/Effect/Audio/LADSPA/Utilities - Step Demuxer - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_8 - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_7 - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_6 - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_5 - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_4 - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_3 - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_2 - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_1 - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Clock - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-surroundEncoder - Surround matrix encoder - Filter/Effect/Audio/LADSPA/Utilities - Surround matrix encoder - Steve Harris <steve@plugin.org.uk> - - - Rt - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Lt - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - S - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - C - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - R - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - L - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-svf - State Variable Filter - Filter/Effect/Audio/LADSPA/Frequency/Filters - State Variable Filter - Steve Harris <steve@plugin.org.uk> - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-tap-autopan - TAP AutoPanner - Filter/Effect/Audio/LADSPA/Amplitude/Modulators - TAP AutoPanner - Tom Szilagyi - - - Output_R - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Output_L - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_R - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_L - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-tap-chorusflanger - TAP Chorus/Flanger - Filter/Effect/Audio/LADSPA/Time/Flangers - TAP Chorus/Flanger - Tom Szilagyi - - - Output_R - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Output_L - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_R - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_L - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-tap-deesser - TAP DeEsser - Filter/Effect/Audio/LADSPA/Amplitude/Dynamics - TAP DeEsser - Tom Szilagyi - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-tap-doubler - TAP Fractal Doubler - Filter/Effect/Audio/LADSPA/Simulators - TAP Fractal Doubler - Tom Szilagyi - - - Output_R - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Output_L - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_R - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_L - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-tap-dynamics-m - TAP Dynamics (M) - Filter/Effect/Audio/LADSPA/Amplitude/Dynamics - TAP Dynamics (M) - Tom Szilagyi - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-tap-dynamics-st - TAP Dynamics (St) - Filter/Effect/Audio/LADSPA/Amplitude/Dynamics - TAP Dynamics (St) - Tom Szilagyi - - - Output_Right - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Output_Left - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_Right - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_Left - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-tap-equalizer - TAP Equalizer - Filter/Effect/Audio/LADSPA/Frequency/EQs - TAP Equalizer - Tom Szilagyi - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-tap-equalizer-bw - TAP Equalizer/BW - Filter/Effect/Audio/LADSPA/Frequency/EQs - TAP Equalizer/BW - Tom Szilagyi - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-tap-limiter - TAP Scaling Limiter - Filter/Effect/Audio/LADSPA/Limiters/Amplitude/Dynamics - TAP Scaling Limiter - Tom Szilagyi - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-tap-pinknoise - TAP Pink/Fractal Noise - Filter/Effect/Audio/LADSPA/Utilities - TAP Pink/Fractal Noise - Tom Szilagyi - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-tap-pitch - TAP Pitch Shifter - Filter/Effect/Audio/LADSPA/Frequency/Pitch shifters - TAP Pitch Shifter - Tom Szilagyi - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-tap-reflector - TAP Reflector - Filter/Effect/Audio/LADSPA/Time - TAP Reflector - Tom Szilagyi - - - Output - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-tap-reverb - TAP Reverberator - Filter/Effect/Audio/LADSPA/Reverbs/Time/Simulators - TAP Reverberator - Tom Szilagyi - - - Output_Right - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_Right - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Output_Left - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_Left - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-tap-rotspeak - TAP Rotary Speaker - Filter/Effect/Audio/LADSPA/Simulators - TAP Rotary Speaker - Tom Szilagyi - - - Output_R - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Output_L - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_R - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_L - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-tap-sigmoid - TAP Sigmoid Booster - Filter/Effect/Audio/LADSPA/Distortions/Amplitude - TAP Sigmoid Booster - Tom Szilagyi + ladspa-amp-mono + Mono Amplifier + Filter/Effect/Audio/LADSPA + Mono Amplifier + Richard Furse (LADSPA example plugins) Output @@ -3877,95 +31,32 @@ - ladspa-tap-stereo-echo - TAP Stereo Echo - Filter/Effect/Audio/LADSPA/Time/Delays - TAP Stereo Echo - Tom Szilagyi - - - Output_Right - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_Right - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Output_Left - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_Left - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-tap-tremolo - TAP Tremolo - Filter/Effect/Audio/LADSPA/Amplitude/Modulators - TAP Tremolo - Tom Szilagyi - - - Output_0 - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_0 - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-tap-tubewarmth - TAP TubeWarmth - Filter/Effect/Audio/LADSPA/Simulators - TAP TubeWarmth - Tom Szilagyi + ladspa-amp-stereo + Stereo Amplifier + Filter/Effect/Audio/LADSPA + Stereo Amplifier + Richard Furse (LADSPA example plugins) - Output + Output_-Right- source always
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
- Input + Input_-Right- sink always
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
- - ladspa-tap-vibrato - TAP Vibrato - Filter/Effect/Audio/LADSPA/Amplitude/Modulators - TAP Vibrato - Tom Szilagyi - - Output + Output_-Left- source always
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
- Input + Input_-Left- sink always
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
@@ -3973,11 +64,11 @@
- ladspa-tapeDelay - Tape Delay Simulation + ladspa-delay-5s + Simple Delay Line Filter/Effect/Audio/LADSPA - Tape Delay Simulation - Steve Harris <steve@plugin.org.uk> + Simple Delay Line + Richard Furse (LADSPA example plugins) Output @@ -3994,11 +85,11 @@ - ladspa-transient - Transient mangler - Filter/Effect/Audio/LADSPA/Amplitude/Dynamics - Transient mangler - Steve Harris <steve@plugin.org.uk> + ladspa-hpf + Simple High Pass Filter + Filter/Effect/Audio/LADSPA + Simple High Pass Filter + Richard Furse (LADSPA example plugins) Output @@ -4015,11 +106,11 @@ - ladspa-triplePara - Triple band parametric with shelves - Filter/Effect/Audio/LADSPA/Frequency/EQs/Parametric - Triple band parametric with shelves - Steve Harris <steve@plugin.org.uk> + ladspa-lpf + Simple Low Pass Filter + Filter/Effect/Audio/LADSPA + Simple Low Pass Filter + Richard Furse (LADSPA example plugins) Output @@ -4036,11 +127,11 @@ - ladspa-valve - Valve saturation - Filter/Effect/Audio/LADSPA - Valve saturation - Steve Harris <steve@plugin.org.uk> + ladspa-noise-white + White Noise Source + Source/Audio/LADSPA + White Noise Source + Richard Furse (LADSPA example plugins) Output @@ -4048,20 +139,14 @@ always
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- ladspa-valveRect - Valve rectifier + ladspa-sine-faaa + Sine Oscillator (Freq:audio, Amp:audio) Filter/Effect/Audio/LADSPA - Valve rectifier - Steve Harris <steve@plugin.org.uk> + Sine Oscillator (Freq:audio, Amp:audio) + Richard Furse (LADSPA example plugins) Output @@ -4070,67 +155,13 @@
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
- Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-vynil - VyNil (Vinyl Effect) - Filter/Effect/Audio/LADSPA/Distortions/Amplitude - VyNil (Vinyl Effect) - Steve Harris <steve@plugin.org.uk> - - - Output_R - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Output_L - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_R - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_L - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
-
-
- - ladspa-waveTerrain - Wave Terrain Oscillator - Filter/Effect/Audio/LADSPA/Generators/Oscillators - Wave Terrain Oscillator - Steve Harris <steve@plugin.org.uk> - - - z - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - y + Amplitude sink always
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
- x + Frequency_-Hz- sink always
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
@@ -4138,44 +169,20 @@
- ladspa-xfade - Crossfade + ladspa-sine-faac + Sine Oscillator (Freq:audio, Amp:control) Filter/Effect/Audio/LADSPA - Crossfade - Steve Harris <steve@plugin.org.uk> + Sine Oscillator (Freq:audio, Amp:control) + Richard Furse (LADSPA example plugins) - Output_right - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Output_left + Output source always
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
- Input_B_right - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_B_left - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_A_right - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_A_left + Frequency_-Hz- sink always
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
@@ -4183,56 +190,20 @@
- ladspa-xfade4 - Crossfade (4 outs) + ladspa-sine-fcaa + Sine Oscillator (Freq:control, Amp:audio) Filter/Effect/Audio/LADSPA - Crossfade (4 outs) - Steve Harris <steve@plugin.org.uk> + Sine Oscillator (Freq:control, Amp:audio) + Richard Furse (LADSPA example plugins) - Output_B_right - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Output_B_left - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Output_A_right - source - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Output_A_left + Output source always
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
- Input_B_right - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_B_left - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_A_right - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
- - Input_A_left + Amplitude sink always
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
@@ -4240,11 +211,11 @@
- ladspa-zm1 - z-1 - Filter/Effect/Audio/LADSPA/Utilities - z-1 - Steve Harris <steve@plugin.org.uk> + ladspa-sine-fcac + Sine Oscillator (Freq:control, Amp:control) + Source/Audio/LADSPA + Sine Oscillator (Freq:control, Amp:control) + Richard Furse (LADSPA example plugins) Output @@ -4252,12 +223,6 @@ always
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
- - Input - sink - always -
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
-
diff --git a/docs/plugins/inspect/plugin-legacyresample.xml b/docs/plugins/inspect/plugin-legacyresample.xml index 401c8705..e8b72df4 100644 --- a/docs/plugins/inspect/plugin-legacyresample.xml +++ b/docs/plugins/inspect/plugin-legacyresample.xml @@ -1,12 +1,12 @@ legacyresample Resamples audio - ../../gst/audioresample/.libs/libgstlegacyresample.so + ../../gst/legacyresample/.libs/libgstlegacyresample.so libgstlegacyresample.so - 0.10.10.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-liveadder.xml b/docs/plugins/inspect/plugin-liveadder.xml index cd22b920..7582e6aa 100644 --- a/docs/plugins/inspect/plugin-liveadder.xml +++ b/docs/plugins/inspect/plugin-liveadder.xml @@ -3,10 +3,10 @@ Adds multiple live discontinuous streams ../../gst/liveadder/.libs/libgstliveadder.so libgstliveadder.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-metadata.xml b/docs/plugins/inspect/plugin-metadata.xml index 2ee4dec7..05c4f451 100644 --- a/docs/plugins/inspect/plugin-metadata.xml +++ b/docs/plugins/inspect/plugin-metadata.xml @@ -3,10 +3,10 @@ Metadata (EXIF, IPTC and XMP) image (JPEG, TIFF) demuxer and muxer ../../ext/metadata/.libs/libgstmetadata.so libgstmetadata.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-mms.xml b/docs/plugins/inspect/plugin-mms.xml index 43096f07..a434232a 100644 --- a/docs/plugins/inspect/plugin-mms.xml +++ b/docs/plugins/inspect/plugin-mms.xml @@ -3,10 +3,10 @@ Microsoft Multi Media Server streaming protocol support ../../ext/libmms/.libs/libgstmms.so libgstmms.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-modplug.xml b/docs/plugins/inspect/plugin-modplug.xml index 8ed3885b..65a955e6 100644 --- a/docs/plugins/inspect/plugin-modplug.xml +++ b/docs/plugins/inspect/plugin-modplug.xml @@ -1,12 +1,12 @@ modplug .MOD audio decoding - ../../ext/modplug/.libs/libgstmodplug.so + ../../gst/modplug/.libs/libgstmodplug.so libgstmodplug.so - 0.10.11.1 + 0.10.10 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-mpeg2enc.xml b/docs/plugins/inspect/plugin-mpeg2enc.xml index 648a481f..aeed34c6 100644 --- a/docs/plugins/inspect/plugin-mpeg2enc.xml +++ b/docs/plugins/inspect/plugin-mpeg2enc.xml @@ -3,7 +3,7 @@ High-quality MPEG-1/2 video encoder ../../ext/mpeg2enc/.libs/libgstmpeg2enc.so libgstmpeg2enc.so - 0.10.11 + 0.10.12 GPL gst-plugins-bad GStreamer Bad Plug-ins source release diff --git a/docs/plugins/inspect/plugin-mpeg4videoparse.xml b/docs/plugins/inspect/plugin-mpeg4videoparse.xml index c5864a01..bedff713 100644 --- a/docs/plugins/inspect/plugin-mpeg4videoparse.xml +++ b/docs/plugins/inspect/plugin-mpeg4videoparse.xml @@ -3,10 +3,10 @@ MPEG-4 video parser ../../gst/mpeg4videoparse/.libs/libgstmpeg4videoparse.so libgstmpeg4videoparse.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-mpegdemux2.xml b/docs/plugins/inspect/plugin-mpegdemux2.xml index 769a3af5..959b7a4b 100644 --- a/docs/plugins/inspect/plugin-mpegdemux2.xml +++ b/docs/plugins/inspect/plugin-mpegdemux2.xml @@ -3,10 +3,10 @@ MPEG demuxers ../../gst/mpegdemux/.libs/libgstmpegdemux.so libgstmpegdemux.so - 0.10.11.1 + 0.10.12 unknown gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-mpegtsmux.xml b/docs/plugins/inspect/plugin-mpegtsmux.xml index 79b43760..2e1084af 100644 --- a/docs/plugins/inspect/plugin-mpegtsmux.xml +++ b/docs/plugins/inspect/plugin-mpegtsmux.xml @@ -3,10 +3,10 @@ MPEG-TS muxer ../../gst/mpegtsmux/.libs/libgstmpegtsmux.so libgstmpegtsmux.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-mpegvideoparse.xml b/docs/plugins/inspect/plugin-mpegvideoparse.xml index 53588b80..dbf663d3 100644 --- a/docs/plugins/inspect/plugin-mpegvideoparse.xml +++ b/docs/plugins/inspect/plugin-mpegvideoparse.xml @@ -3,10 +3,10 @@ MPEG-1 and MPEG-2 video parser ../../gst/mpegvideoparse/.libs/libgstmpegvideoparse.so libgstmpegvideoparse.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-mplex.xml b/docs/plugins/inspect/plugin-mplex.xml index af5cb223..cdd16c37 100644 --- a/docs/plugins/inspect/plugin-mplex.xml +++ b/docs/plugins/inspect/plugin-mplex.xml @@ -3,10 +3,10 @@ High-quality MPEG/DVD/SVCD/VCD video/audio multiplexer ../../ext/mplex/.libs/libgstmplex.so libgstmplex.so - 0.10.9.1 + 0.10.12 GPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-musepack.xml b/docs/plugins/inspect/plugin-musepack.xml index 8ae20d01..c0b0823a 100644 --- a/docs/plugins/inspect/plugin-musepack.xml +++ b/docs/plugins/inspect/plugin-musepack.xml @@ -3,10 +3,10 @@ Musepack decoder ../../ext/musepack/.libs/libgstmusepack.so libgstmusepack.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin @@ -20,7 +20,7 @@ sink sink always -
audio/x-musepack, streamversion=(int){ 7, 8 }
+
audio/x-musepack, streamversion=(int)7
src diff --git a/docs/plugins/inspect/plugin-musicbrainz.xml b/docs/plugins/inspect/plugin-musicbrainz.xml index 414f3d20..6df560cd 100644 --- a/docs/plugins/inspect/plugin-musicbrainz.xml +++ b/docs/plugins/inspect/plugin-musicbrainz.xml @@ -3,10 +3,10 @@ A TRM signature producer based on libmusicbrainz ../../ext/musicbrainz/.libs/libgsttrm.so libgsttrm.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-mve.xml b/docs/plugins/inspect/plugin-mve.xml index ba546161..4ad0b598 100644 --- a/docs/plugins/inspect/plugin-mve.xml +++ b/docs/plugins/inspect/plugin-mve.xml @@ -3,10 +3,10 @@ Interplay MVE movie format manipulation ../../gst/mve/.libs/libgstmve.so libgstmve.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-mxf.xml b/docs/plugins/inspect/plugin-mxf.xml index 4de635a6..27c152ad 100644 --- a/docs/plugins/inspect/plugin-mxf.xml +++ b/docs/plugins/inspect/plugin-mxf.xml @@ -3,10 +3,10 @@ MXF plugin library ../../gst/mxf/.libs/libgstmxf.so libgstmxf.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-mythtv.xml b/docs/plugins/inspect/plugin-mythtv.xml index 6f4d0b54..81b309fb 100644 --- a/docs/plugins/inspect/plugin-mythtv.xml +++ b/docs/plugins/inspect/plugin-mythtv.xml @@ -3,10 +3,10 @@ lib MythTV src ../../ext/mythtv/.libs/libgstmythtvsrc.so libgstmythtvsrc.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-nas.xml b/docs/plugins/inspect/plugin-nas.xml index 29cf4b9b..01b60e53 100644 --- a/docs/plugins/inspect/plugin-nas.xml +++ b/docs/plugins/inspect/plugin-nas.xml @@ -3,10 +3,10 @@ NAS (Network Audio System) support for GStreamer ../../ext/nas/.libs/libgstnassink.so libgstnassink.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-neon.xml b/docs/plugins/inspect/plugin-neon.xml index aa7e7511..bce0ddd8 100644 --- a/docs/plugins/inspect/plugin-neon.xml +++ b/docs/plugins/inspect/plugin-neon.xml @@ -3,10 +3,10 @@ lib neon http client src ../../ext/neon/.libs/libgstneonhttpsrc.so libgstneonhttpsrc.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-nsfdec.xml b/docs/plugins/inspect/plugin-nsfdec.xml index f3c5bc09..e034cbb7 100644 --- a/docs/plugins/inspect/plugin-nsfdec.xml +++ b/docs/plugins/inspect/plugin-nsfdec.xml @@ -3,10 +3,10 @@ Uses nosefart to decode .nsf files ../../gst/nsf/.libs/libgstnsf.so libgstnsf.so - 0.10.11.1 + 0.10.12 GPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-nuvdemux.xml b/docs/plugins/inspect/plugin-nuvdemux.xml index 84891954..7e127f8b 100644 --- a/docs/plugins/inspect/plugin-nuvdemux.xml +++ b/docs/plugins/inspect/plugin-nuvdemux.xml @@ -3,10 +3,10 @@ Demuxes and muxes audio and video ../../gst/nuvdemux/.libs/libgstnuvdemux.so libgstnuvdemux.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-ofa.xml b/docs/plugins/inspect/plugin-ofa.xml index f9343810..74aad399 100644 --- a/docs/plugins/inspect/plugin-ofa.xml +++ b/docs/plugins/inspect/plugin-ofa.xml @@ -3,10 +3,10 @@ Calculate MusicIP fingerprint from audio files ../../ext/ofa/.libs/libgstofa.so libgstofa.so - 0.10.11.1 + 0.10.12 GPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-oss4.xml b/docs/plugins/inspect/plugin-oss4.xml index 55258802..bb34fea1 100644 --- a/docs/plugins/inspect/plugin-oss4.xml +++ b/docs/plugins/inspect/plugin-oss4.xml @@ -3,10 +3,10 @@ Open Sound System (OSS) version 4 support for GStreamer ../../sys/oss4/.libs/libgstoss4audio.so libgstoss4audio.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-pcapparse.xml b/docs/plugins/inspect/plugin-pcapparse.xml index c7606d2c..251eefde 100644 --- a/docs/plugins/inspect/plugin-pcapparse.xml +++ b/docs/plugins/inspect/plugin-pcapparse.xml @@ -3,7 +3,7 @@ Element parsing raw pcap streams ../../gst/pcapparse/.libs/libgstpcapparse.so libgstpcapparse.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad GStreamer diff --git a/docs/plugins/inspect/plugin-qtmux.xml b/docs/plugins/inspect/plugin-qtmux.xml index b0f56196..9f664379 100644 --- a/docs/plugins/inspect/plugin-qtmux.xml +++ b/docs/plugins/inspect/plugin-qtmux.xml @@ -3,7 +3,7 @@ Quicktime Muxer plugin ../../gst/qtmux/.libs/libgstqtmux.so libgstqtmux.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad gsoc2008 package @@ -20,7 +20,7 @@ video_%d sink request -
video/x-h263, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-h264, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
+
video/x-h263, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-divx, divxversion=(int)5, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-h264, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
audio_%d @@ -32,7 +32,7 @@ src source always -
application/x-3gp
+
video/quicktime, variant=(string)3gpp
@@ -86,7 +86,7 @@ src source always -
video/quicktime
+
video/quicktime, variant=(string)iso
@@ -113,7 +113,7 @@ src source always -
video/quicktime
+
video/quicktime, variant=(string)apple
diff --git a/docs/plugins/inspect/plugin-rawparse.xml b/docs/plugins/inspect/plugin-rawparse.xml index 26363e48..5d96a9dc 100644 --- a/docs/plugins/inspect/plugin-rawparse.xml +++ b/docs/plugins/inspect/plugin-rawparse.xml @@ -3,10 +3,10 @@ Parses byte streams into raw frames ../../gst/rawparse/.libs/libgstrawparse.so libgstrawparse.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-real.xml b/docs/plugins/inspect/plugin-real.xml index a20b2be8..c47ad40e 100644 --- a/docs/plugins/inspect/plugin-real.xml +++ b/docs/plugins/inspect/plugin-real.xml @@ -3,10 +3,10 @@ Decode REAL streams ../../gst/real/.libs/libgstreal.so libgstreal.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-resindvd.xml b/docs/plugins/inspect/plugin-resindvd.xml index a5f669de..159dfde4 100644 --- a/docs/plugins/inspect/plugin-resindvd.xml +++ b/docs/plugins/inspect/plugin-resindvd.xml @@ -3,7 +3,7 @@ Resin DVD playback elements ../../ext/resindvd/.libs/libresindvd.so libresindvd.so - 0.10.11.1 + 0.10.12 GPL gst-plugins-bad GStreamer diff --git a/docs/plugins/inspect/plugin-rfbsrc.xml b/docs/plugins/inspect/plugin-rfbsrc.xml index d22dc398..20bf6b36 100644 --- a/docs/plugins/inspect/plugin-rfbsrc.xml +++ b/docs/plugins/inspect/plugin-rfbsrc.xml @@ -3,10 +3,10 @@ Connects to a VNC server and decodes RFB stream ../../gst/librfb/.libs/libgstrfbsrc.so libgstrfbsrc.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-rtpmux.xml b/docs/plugins/inspect/plugin-rtpmux.xml index 467f3124..4adc8799 100644 --- a/docs/plugins/inspect/plugin-rtpmux.xml +++ b/docs/plugins/inspect/plugin-rtpmux.xml @@ -3,10 +3,10 @@ RTP Muxer plugins ../../gst/rtpmux/.libs/libgstrtpmux.so libgstrtpmux.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-scaletempo.xml b/docs/plugins/inspect/plugin-scaletempo.xml index 16d4def8..ca7cb44c 100644 --- a/docs/plugins/inspect/plugin-scaletempo.xml +++ b/docs/plugins/inspect/plugin-scaletempo.xml @@ -3,7 +3,7 @@ Scale audio tempo in sync with playback rate ../../gst/scaletempo/.libs/libgstscaletempoplugin.so libgstscaletempoplugin.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad GStreamer diff --git a/docs/plugins/inspect/plugin-sdl.xml b/docs/plugins/inspect/plugin-sdl.xml index 46f357c5..4047dd24 100644 --- a/docs/plugins/inspect/plugin-sdl.xml +++ b/docs/plugins/inspect/plugin-sdl.xml @@ -3,10 +3,10 @@ SDL (Simple DirectMedia Layer) support for GStreamer ../../ext/sdl/.libs/libgstsdl.so libgstsdl.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-sdp.xml b/docs/plugins/inspect/plugin-sdp.xml index 0d25b34b..52f79329 100644 --- a/docs/plugins/inspect/plugin-sdp.xml +++ b/docs/plugins/inspect/plugin-sdp.xml @@ -3,10 +3,10 @@ configure streaming sessions using SDP ../../gst/sdp/.libs/libgstsdpelem.so libgstsdpelem.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-selector.xml b/docs/plugins/inspect/plugin-selector.xml index ce4bdc5c..6f4e9b9d 100644 --- a/docs/plugins/inspect/plugin-selector.xml +++ b/docs/plugins/inspect/plugin-selector.xml @@ -3,10 +3,10 @@ input/output stream selector elements ../../gst/selector/.libs/libgstselector.so libgstselector.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-sndfile.xml b/docs/plugins/inspect/plugin-sndfile.xml index af3fdc42..cc52fb63 100644 --- a/docs/plugins/inspect/plugin-sndfile.xml +++ b/docs/plugins/inspect/plugin-sndfile.xml @@ -3,10 +3,10 @@ use libsndfile to read and write audio from and to files ../../ext/sndfile/.libs/libgstsndfile.so libgstsndfile.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-soundtouch.xml b/docs/plugins/inspect/plugin-soundtouch.xml index f073ffcb..2362b104 100644 --- a/docs/plugins/inspect/plugin-soundtouch.xml +++ b/docs/plugins/inspect/plugin-soundtouch.xml @@ -3,7 +3,7 @@ Audio Pitch Controller & BPM Detection ../../ext/soundtouch/.libs/libgstsoundtouch.so libgstsoundtouch.so - 0.10.11 + 0.10.12 LGPL gst-plugins-bad GStreamer Bad Plug-ins source release diff --git a/docs/plugins/inspect/plugin-spcdec.xml b/docs/plugins/inspect/plugin-spcdec.xml index fa39a614..8c852b08 100644 --- a/docs/plugins/inspect/plugin-spcdec.xml +++ b/docs/plugins/inspect/plugin-spcdec.xml @@ -3,7 +3,7 @@ OpenSPC Audio Decoder ../../ext/spc/.libs/libgstspc.so libgstspc.so - 0.10.11 + 0.10.12 LGPL gst-plugins-bad GStreamer Bad Plug-ins source release diff --git a/docs/plugins/inspect/plugin-speed.xml b/docs/plugins/inspect/plugin-speed.xml index 80f69e21..c86c002f 100644 --- a/docs/plugins/inspect/plugin-speed.xml +++ b/docs/plugins/inspect/plugin-speed.xml @@ -3,10 +3,10 @@ Set speed/pitch on audio/raw streams (resampler) ../../gst/speed/.libs/libgstspeed.so libgstspeed.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-stereo.xml b/docs/plugins/inspect/plugin-stereo.xml index 4b08e8d4..795fe63c 100644 --- a/docs/plugins/inspect/plugin-stereo.xml +++ b/docs/plugins/inspect/plugin-stereo.xml @@ -3,10 +3,10 @@ Muck with the stereo signal, enhance it's 'stereo-ness' ../../gst/stereo/.libs/libgststereo.so libgststereo.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-subenc.xml b/docs/plugins/inspect/plugin-subenc.xml index f3951b95..5e64469e 100644 --- a/docs/plugins/inspect/plugin-subenc.xml +++ b/docs/plugins/inspect/plugin-subenc.xml @@ -3,10 +3,10 @@ subtitle encoders ../../gst/subenc/.libs/libgstsubenc.so libgstsubenc.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-tta.xml b/docs/plugins/inspect/plugin-tta.xml index cc27956c..2ca01490 100644 --- a/docs/plugins/inspect/plugin-tta.xml +++ b/docs/plugins/inspect/plugin-tta.xml @@ -3,10 +3,10 @@ TTA lossless audio format handling ../../gst/tta/.libs/libgsttta.so libgsttta.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-valve.xml b/docs/plugins/inspect/plugin-valve.xml index 55e85654..977fdf23 100644 --- a/docs/plugins/inspect/plugin-valve.xml +++ b/docs/plugins/inspect/plugin-valve.xml @@ -3,10 +3,10 @@ Valve ../../gst/valve/.libs/libgstvalve.so libgstvalve.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-vcdsrc.xml b/docs/plugins/inspect/plugin-vcdsrc.xml index 3b66f401..09414b54 100644 --- a/docs/plugins/inspect/plugin-vcdsrc.xml +++ b/docs/plugins/inspect/plugin-vcdsrc.xml @@ -3,10 +3,10 @@ Asynchronous read from VCD disk ../../sys/vcd/.libs/libgstvcdsrc.so libgstvcdsrc.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-videosignal.xml b/docs/plugins/inspect/plugin-videosignal.xml index 47f1a8cb..79720091 100644 --- a/docs/plugins/inspect/plugin-videosignal.xml +++ b/docs/plugins/inspect/plugin-videosignal.xml @@ -3,10 +3,10 @@ Various video signal analysers ../../gst/videosignal/.libs/libgstvideosignal.so libgstvideosignal.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-vmnc.xml b/docs/plugins/inspect/plugin-vmnc.xml index d1880676..7baa0743 100644 --- a/docs/plugins/inspect/plugin-vmnc.xml +++ b/docs/plugins/inspect/plugin-vmnc.xml @@ -3,10 +3,10 @@ VMnc video plugin library ../../gst/vmnc/.libs/libgstvmnc.so libgstvmnc.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-wildmidi.xml b/docs/plugins/inspect/plugin-wildmidi.xml index d6479b22..904ae28b 100644 --- a/docs/plugins/inspect/plugin-wildmidi.xml +++ b/docs/plugins/inspect/plugin-wildmidi.xml @@ -3,10 +3,10 @@ Wildmidi Plugin ../../ext/timidity/.libs/libgstwildmidi.so libgstwildmidi.so - 0.10.11.1 + 0.10.12 GPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-x264.xml b/docs/plugins/inspect/plugin-x264.xml index a449eeef..be47f395 100644 --- a/docs/plugins/inspect/plugin-x264.xml +++ b/docs/plugins/inspect/plugin-x264.xml @@ -3,10 +3,10 @@ libx264-based H264 plugins ../../ext/x264/.libs/libgstx264.so libgstx264.so - 0.10.11.1 + 0.10.12 GPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-xdgmime.xml b/docs/plugins/inspect/plugin-xdgmime.xml index 7c276fac..4f725957 100644 --- a/docs/plugins/inspect/plugin-xdgmime.xml +++ b/docs/plugins/inspect/plugin-xdgmime.xml @@ -3,10 +3,10 @@ XDG-MIME ../../gst/xdgmime/.libs/libgstxdgmime.so libgstxdgmime.so - 0.10.11.1 + 0.10.12 LGPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/docs/plugins/inspect/plugin-xvid.xml b/docs/plugins/inspect/plugin-xvid.xml index efaf16e7..87de1d95 100644 --- a/docs/plugins/inspect/plugin-xvid.xml +++ b/docs/plugins/inspect/plugin-xvid.xml @@ -3,10 +3,10 @@ XviD plugin library ../../ext/xvid/.libs/libgstxvid.so libgstxvid.so - 0.10.11.1 + 0.10.12 GPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins source release Unknown package origin diff --git a/gst-plugins-bad.doap b/gst-plugins-bad.doap index ab67cf2e..4e8dbecc 100644 --- a/gst-plugins-bad.doap +++ b/gst-plugins-bad.doap @@ -34,6 +34,17 @@ real live maintainer, or some actual wide use. + + + 0.10.12 + 0.10 + More than I can handle + 2009-05-20 + + + + + 0.10.11 diff --git a/win32/common/config.h b/win32/common/config.h index 3da50412..71a8018e 100644 --- a/win32/common/config.h +++ b/win32/common/config.h @@ -24,7 +24,7 @@ #define GST_LICENSE "LGPL" /* package name in plugins */ -#define GST_PACKAGE_NAME "GStreamer Bad Plug-ins CVS/prerelease" +#define GST_PACKAGE_NAME "GStreamer Bad Plug-ins source release" /* package origin */ #define GST_PACKAGE_ORIGIN "Unknown package origin" @@ -199,7 +199,7 @@ #undef USE_POISONING /* Version number of package */ -#define VERSION "0.10.11.3" +#define VERSION "0.10.12" /* Define to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel and VAX). */ -- cgit v1.2.1 From b9ac26713b9c4097373082a47c960d314a19119a Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Thu, 21 May 2009 21:02:55 +0100 Subject: Back to hacking -> 0.10.12.1 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 5c7ab2d8..f2c01f22 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ AC_PREREQ(2.52) dnl initialize autoconf dnl when going to/from release please set the nano (fourth number) right ! dnl releases only do Wall, cvs and prerelease does Werror too -AC_INIT(GStreamer Bad Plug-ins, 0.10.12, +AC_INIT(GStreamer Bad Plug-ins, 0.10.12.1, http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer, gst-plugins-bad) -- cgit v1.2.1 From fe38f53572ff91b63a3dc5a5a5ed78e13040d16c Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Thu, 21 May 2009 13:15:46 -0700 Subject: id3tag: Add new id3 tagging plugin, supports v1, v2.3, and v2.4. By default, does v1 and v2.3, but there are properties to select. Will hopefully replace id3mux, id3v2mux, in the not-too-distant future. --- configure.ac | 2 + gst/id3tag/Makefile.am | 19 + gst/id3tag/gstid3tag.c | 229 ++++++++++ gst/id3tag/gstid3tag.h | 63 +++ gst/id3tag/gsttagmux.c | 490 ++++++++++++++++++++ gst/id3tag/gsttagmux.h | 79 ++++ gst/id3tag/id3tag.c | 1194 ++++++++++++++++++++++++++++++++++++++++++++++++ gst/id3tag/id3tag.h | 32 ++ 8 files changed, 2108 insertions(+) create mode 100644 gst/id3tag/Makefile.am create mode 100644 gst/id3tag/gstid3tag.c create mode 100644 gst/id3tag/gstid3tag.h create mode 100644 gst/id3tag/gsttagmux.c create mode 100644 gst/id3tag/gsttagmux.h create mode 100644 gst/id3tag/id3tag.c create mode 100644 gst/id3tag/id3tag.h diff --git a/configure.ac b/configure.ac index f2c01f22..b2d485ca 100644 --- a/configure.ac +++ b/configure.ac @@ -265,6 +265,7 @@ AG_GST_CHECK_PLUGIN(dvdspu) AG_GST_CHECK_PLUGIN(festival) AG_GST_CHECK_PLUGIN(freeze) AG_GST_CHECK_PLUGIN(h264parse) +AG_GST_CHECK_PLUGIN(id3tag) AG_GST_CHECK_PLUGIN(librfb) AG_GST_CHECK_PLUGIN(liveadder) AG_GST_CHECK_PLUGIN(mpegdemux) @@ -1574,6 +1575,7 @@ gst/dvdspu/Makefile gst/festival/Makefile gst/freeze/Makefile gst/h264parse/Makefile +gst/id3tag/Makefile gst/librfb/Makefile gst/mpegdemux/Makefile gst/mpegtsmux/Makefile diff --git a/gst/id3tag/Makefile.am b/gst/id3tag/Makefile.am new file mode 100644 index 00000000..9595be0f --- /dev/null +++ b/gst/id3tag/Makefile.am @@ -0,0 +1,19 @@ +plugin_LTLIBRARIES = libgstid3tag.la + +libgstid3tag_la_SOURCES = \ + gsttagmux.c \ + id3tag.c \ + gstid3tag.c + +libgstid3tag_la_CFLAGS = \ + $(GST_PLUGINS_BASE_CFLAGS) \ + $(GST_CFLAGS) + +libgstid3tag_la_LIBADD = \ + $(GST_PLUGINS_BASE_LIBS) -lgsttag-$(GST_MAJORMINOR) \ + $(GST_LIBS) + +libgstid3tag_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) +libgstid3tag_la_LIBTOOLFLAGS = --tag=disable-static + +noinst_HEADERS = gstid3tag.h id3tag.h gsttagmux.h diff --git a/gst/id3tag/gstid3tag.c b/gst/id3tag/gstid3tag.c new file mode 100644 index 00000000..f67d781f --- /dev/null +++ b/gst/id3tag/gstid3tag.c @@ -0,0 +1,229 @@ +/* GStreamer ID3 v1 and v2 muxer + * + * Copyright (C) 2006 Christophe Fergeau + * Copyright (C) 2006 Tim-Philipp Müller + * Copyright (C) 2009 Pioneers of the Inevitable + * + * 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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +/** + * SECTION:element-id3tag + * @see_also: #GstID3Demux, #GstTagSetter + * + * This element adds ID3v2 tags to the beginning of a stream, and ID3v1 tags + * to the end. + * + * It defaults to writing ID3 version 2.3.0 tags (since those are the most + * widely supported), but can optionally write version 2.4.0 tags. + * + * Applications can set the tags to write using the #GstTagSetter interface. + * Tags sent by upstream elements will be picked up automatically (and merged + * according to the merge mode set via the tag setter interface). + * + * + * Example pipelines + * |[ + * gst-launch -v filesrc location=foo.ogg ! decodebin ! audioconvert ! lame ! id3tag ! filesink location=foo.mp3 + * ]| A pipeline that transcodes a file from Ogg/Vorbis to mp3 format with + * ID3 tags that contain the same metadata as the the Ogg/Vorbis file. + * Make sure the Ogg/Vorbis file actually has comments to preserve. + * |[ + * gst-launch -m filesrc location=foo.mp3 ! id3demux ! fakesink silent=TRUE 2> /dev/null | grep taglist + * ]| Verify that tags have been written. + * + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include "gstid3tag.h" +#include + +#include + +GST_DEBUG_CATEGORY (gst_id3tag_debug); +#define GST_CAT_DEFAULT gst_id3tag_debug + +enum +{ + ARG_0, + ARG_WRITE_V1, + ARG_WRITE_V2, + ARG_V2_MAJOR_VERSION +}; + +#define DEFAULT_WRITE_V1 TRUE +#define DEFAULT_WRITE_V2 TRUE +#define DEFAULT_V2_MAJOR_VERSION 3 + +static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", + GST_PAD_SRC, + GST_PAD_ALWAYS, + GST_STATIC_CAPS ("application/x-id3")); + +GST_BOILERPLATE (GstID3Tag, gst_id3tag, GstTagMux, GST_TYPE_TAG_MUX); + +static GstBuffer *gst_id3tag_render_v2_tag (GstTagMux * mux, + GstTagList * taglist); +static GstBuffer *gst_id3tag_render_v1_tag (GstTagMux * mux, + GstTagList * taglist); + +static void gst_id3tag_set_property (GObject * object, guint prop_id, + const GValue * value, GParamSpec * pspec); +static void gst_id3tag_get_property (GObject * object, guint prop_id, + GValue * value, GParamSpec * pspec); + +static void +gst_id3tag_base_init (gpointer g_class) +{ + GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); + + gst_element_class_add_pad_template (element_class, + gst_static_pad_template_get (&src_template)); + + gst_element_class_set_details_simple (element_class, + "ID3 v1 and v2 Muxer", "Formatter/Metadata", + "Adds an ID3v2 header and ID3v1 footer to a file", + "Michael Smith , " + "Tim-Philipp Müller "); + + GST_DEBUG_CATEGORY_INIT (gst_id3tag_debug, "id3tag", 0, + "ID3 v1 and v2 tag muxer"); +} + +static void +gst_id3tag_class_init (GstID3TagClass * klass) +{ + GObjectClass *gobject_class = (GObjectClass *) klass; + + gobject_class->set_property = gst_id3tag_set_property; + gobject_class->get_property = gst_id3tag_get_property; + + g_object_class_install_property (gobject_class, ARG_WRITE_V1, + g_param_spec_boolean ("write-v1", "Write id3v1 tag", + "Write an id3v1 tag at the end of the file", DEFAULT_WRITE_V1, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); + + g_object_class_install_property (gobject_class, ARG_WRITE_V2, + g_param_spec_boolean ("write-v2", "Write id3v2 tag", + "Write an id3v2 tag at the start of the file", DEFAULT_WRITE_V2, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); + + g_object_class_install_property (gobject_class, ARG_V2_MAJOR_VERSION, + g_param_spec_int ("v2-version", "Version (3 or 4) of id3v2 tag", + "Set version (3 for id3v2.3, 4 for id3v2.4) of id3v2 tags", + 3, 4, DEFAULT_V2_MAJOR_VERSION, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); + + GST_TAG_MUX_CLASS (klass)->render_start_tag = + GST_DEBUG_FUNCPTR (gst_id3tag_render_v2_tag); + + GST_TAG_MUX_CLASS (klass)->render_end_tag = gst_id3tag_render_v1_tag; +} + +static void +gst_id3tag_init (GstID3Tag * id3mux, GstID3TagClass * id3mux_class) +{ + id3mux->write_v1 = DEFAULT_WRITE_V1; + id3mux->write_v2 = DEFAULT_WRITE_V2; + + id3mux->v2_major_version = DEFAULT_V2_MAJOR_VERSION; +} + +static void +gst_id3tag_set_property (GObject * object, guint prop_id, + const GValue * value, GParamSpec * pspec) +{ + GstID3Tag *mux = GST_ID3TAG (object); + + switch (prop_id) { + case ARG_WRITE_V1: + mux->write_v1 = g_value_get_boolean (value); + break; + case ARG_WRITE_V2: + mux->write_v2 = g_value_get_boolean (value); + break; + case ARG_V2_MAJOR_VERSION: + mux->v2_major_version = g_value_get_int (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +gst_id3tag_get_property (GObject * object, guint prop_id, + GValue * value, GParamSpec * pspec) +{ + GstID3Tag *mux = GST_ID3TAG (object); + + switch (prop_id) { + case ARG_WRITE_V1: + g_value_set_boolean (value, mux->write_v1); + break; + case ARG_WRITE_V2: + g_value_set_boolean (value, mux->write_v2); + break; + case ARG_V2_MAJOR_VERSION: + g_value_set_int (value, mux->v2_major_version); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static GstBuffer * +gst_id3tag_render_v2_tag (GstTagMux * mux, GstTagList * taglist) +{ + GstID3Tag *id3mux = GST_ID3TAG (mux); + + if (id3mux->write_v2) + return gst_id3mux_render_v2_tag (mux, taglist, id3mux->v2_major_version); + else + return NULL; +} + +static GstBuffer * +gst_id3tag_render_v1_tag (GstTagMux * mux, GstTagList * taglist) +{ + GstID3Tag *id3mux = GST_ID3TAG (mux); + + if (id3mux->write_v1) + return gst_id3mux_render_v1_tag (mux, taglist); + else + return NULL; +} + +static gboolean +plugin_init (GstPlugin * plugin) +{ + if (!gst_element_register (plugin, "id3tag", GST_RANK_NONE, GST_TYPE_ID3TAG)) + return FALSE; + + gst_tag_register_musicbrainz_tags (); + + return TRUE; +} + +GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, + GST_VERSION_MINOR, + "id3tag", + "ID3 v1 and v2 muxing plugin", + plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN); diff --git a/gst/id3tag/gstid3tag.h b/gst/id3tag/gstid3tag.h new file mode 100644 index 00000000..6b33df25 --- /dev/null +++ b/gst/id3tag/gstid3tag.h @@ -0,0 +1,63 @@ +/* GStreamer ID3 v1 and v2 muxer + * + * Copyright (C) 2006 Christophe Fergeau + * Copyright (C) 2006 Tim-Philipp Müller + * Copyright (C) 2009 Pioneers of the Inevitable + * + * 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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef GST_ID3TAG_H +#define GST_ID3TAG_H + +#include "gsttagmux.h" +#include "id3tag.h" + +G_BEGIN_DECLS + +typedef struct _GstID3Tag GstID3Tag; +typedef struct _GstID3TagClass GstID3TagClass; + +struct _GstID3Tag { + GstTagMux tagmux; + + gboolean write_v1; + gboolean write_v2; + + gint v2_major_version; +}; + +struct _GstID3TagClass { + GstTagMuxClass tagmux_class; +}; + +#define GST_TYPE_ID3TAG \ + (gst_id3tag_get_type()) +#define GST_ID3TAG(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ID3TAG,GstID3Tag)) +#define GST_ID3TAG_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ID3TAG,GstID3TagClass)) +#define GST_IS_ID3TAG(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ID3TAG)) +#define GST_IS_ID3TAG_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ID3TAG)) + +GType gst_id3tag_get_type (void); + +G_END_DECLS + +#endif /* GST_ID3TAG_H */ + diff --git a/gst/id3tag/gsttagmux.c b/gst/id3tag/gsttagmux.c new file mode 100644 index 00000000..bfa4e1bc --- /dev/null +++ b/gst/id3tag/gsttagmux.c @@ -0,0 +1,490 @@ +/* GStreamer tag muxer base class + * + * Copyright (C) 2006 Christophe Fergeau + * Copyright (C) 2006 Tim-Philipp Müller + * Copyright (C) 2006 Sebastian Dröge + * Copyright (C) 2009 Pioneers of the Inevitable + * + * 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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include + +#include "gsttagmux.h" + +GST_DEBUG_CATEGORY_STATIC (gst_tag_mux_debug); +#define GST_CAT_DEFAULT gst_tag_mux_debug + +/* Subclass provides a src template and pad. We accept anything as input here, + however. */ + +static GstStaticPadTemplate gst_tag_mux_sink_template = +GST_STATIC_PAD_TEMPLATE ("sink", + GST_PAD_SINK, + GST_PAD_ALWAYS, + GST_STATIC_CAPS ("ANY")); + +static void +gst_tag_mux_iface_init (GType tag_type) +{ + static const GInterfaceInfo tag_setter_info = { + NULL, + NULL, + NULL + }; + + g_type_add_interface_static (tag_type, GST_TYPE_TAG_SETTER, &tag_setter_info); +} + +GST_BOILERPLATE_FULL (GstTagMux, gst_tag_mux, + GstElement, GST_TYPE_ELEMENT, gst_tag_mux_iface_init); + + +static GstStateChangeReturn +gst_tag_mux_change_state (GstElement * element, GstStateChange transition); +static GstFlowReturn gst_tag_mux_chain (GstPad * pad, GstBuffer * buffer); +static gboolean gst_tag_mux_sink_event (GstPad * pad, GstEvent * event); + +static void +gst_tag_mux_finalize (GObject * obj) +{ + GstTagMux *mux = GST_TAG_MUX (obj); + + if (mux->newsegment_ev) { + gst_event_unref (mux->newsegment_ev); + mux->newsegment_ev = NULL; + } + + if (mux->event_tags) { + gst_tag_list_free (mux->event_tags); + mux->event_tags = NULL; + } + + if (mux->final_tags) { + gst_tag_list_free (mux->final_tags); + mux->final_tags = NULL; + } + + G_OBJECT_CLASS (parent_class)->finalize (obj); +} + +static void +gst_tag_mux_base_init (gpointer g_class) +{ + GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); + + gst_element_class_add_pad_template (element_class, + gst_static_pad_template_get (&gst_tag_mux_sink_template)); + + GST_DEBUG_CATEGORY_INIT (gst_tag_mux_debug, "tagmux", 0, + "tag muxer base class"); +} + +static void +gst_tag_mux_class_init (GstTagMuxClass * klass) +{ + GObjectClass *gobject_class; + GstElementClass *gstelement_class; + + gobject_class = (GObjectClass *) klass; + gstelement_class = (GstElementClass *) klass; + + gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_tag_mux_finalize); + gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_tag_mux_change_state); +} + +static void +gst_tag_mux_init (GstTagMux * mux, GstTagMuxClass * mux_class) +{ + GstElementClass *element_klass = GST_ELEMENT_CLASS (mux_class); + GstPadTemplate *tmpl; + + /* pad through which data comes in to the element */ + mux->sinkpad = + gst_pad_new_from_static_template (&gst_tag_mux_sink_template, "sink"); + gst_pad_set_chain_function (mux->sinkpad, + GST_DEBUG_FUNCPTR (gst_tag_mux_chain)); + gst_pad_set_event_function (mux->sinkpad, + GST_DEBUG_FUNCPTR (gst_tag_mux_sink_event)); + gst_element_add_pad (GST_ELEMENT (mux), mux->sinkpad); + + /* pad through which data goes out of the element */ + tmpl = gst_element_class_get_pad_template (element_klass, "src"); + if (tmpl) { + mux->srcpad = gst_pad_new_from_template (tmpl, "src"); + gst_pad_use_fixed_caps (mux->srcpad); + gst_pad_set_caps (mux->srcpad, gst_pad_template_get_caps (tmpl)); + gst_element_add_pad (GST_ELEMENT (mux), mux->srcpad); + } + + mux->render_start_tag = TRUE; + mux->render_end_tag = TRUE; +} + +static GstTagList * +gst_tag_mux_get_tags (GstTagMux * mux) +{ + GstTagSetter *tagsetter = GST_TAG_SETTER (mux); + const GstTagList *tagsetter_tags; + GstTagMergeMode merge_mode; + + if (mux->final_tags) + return mux->final_tags; + + tagsetter_tags = gst_tag_setter_get_tag_list (tagsetter); + merge_mode = gst_tag_setter_get_tag_merge_mode (tagsetter); + + GST_LOG_OBJECT (mux, "merging tags, merge mode = %d", merge_mode); + GST_LOG_OBJECT (mux, "event tags: %" GST_PTR_FORMAT, mux->event_tags); + GST_LOG_OBJECT (mux, "set tags: %" GST_PTR_FORMAT, tagsetter_tags); + + mux->final_tags = + gst_tag_list_merge (tagsetter_tags, mux->event_tags, merge_mode); + + GST_LOG_OBJECT (mux, "final tags: %" GST_PTR_FORMAT, mux->final_tags); + + return mux->final_tags; +} + +static GstFlowReturn +gst_tag_mux_render_start_tag (GstTagMux * mux) +{ + GstTagMuxClass *klass; + GstBuffer *buffer; + GstTagList *taglist; + GstEvent *event; + GstFlowReturn ret; + + taglist = gst_tag_mux_get_tags (mux); + + klass = GST_TAG_MUX_CLASS (G_OBJECT_GET_CLASS (mux)); + + if (klass->render_start_tag == NULL) + goto no_vfunc; + + buffer = klass->render_start_tag (mux, taglist); + + /* Null buffer is ok, just means we're not outputting anything */ + if (buffer == NULL) { + GST_INFO_OBJECT (mux, "No start tag generated"); + mux->start_tag_size = 0; + return GST_FLOW_OK; + } + + mux->start_tag_size = GST_BUFFER_SIZE (buffer); + GST_LOG_OBJECT (mux, "tag size = %" G_GSIZE_FORMAT " bytes", + mux->start_tag_size); + + /* Send newsegment event from byte position 0, so the tag really gets + * written to the start of the file, independent of the upstream segment */ + gst_pad_push_event (mux->srcpad, + gst_event_new_new_segment (FALSE, 1.0, GST_FORMAT_BYTES, 0, -1, 0)); + + /* Send an event about the new tags to downstream elements */ + /* gst_event_new_tag takes ownership of the list, so use a copy */ + event = gst_event_new_tag (gst_tag_list_copy (taglist)); + gst_pad_push_event (mux->srcpad, event); + + GST_BUFFER_OFFSET (buffer) = 0; + ret = gst_pad_push (mux->srcpad, buffer); + + mux->current_offset = mux->start_tag_size; + mux->max_offset = MAX (mux->max_offset, mux->current_offset); + + return ret; + +no_vfunc: + { + GST_ERROR_OBJECT (mux, "Subclass does not implement " + "render_start_tag vfunc!"); + return GST_FLOW_ERROR; + } +} + +static GstFlowReturn +gst_tag_mux_render_end_tag (GstTagMux * mux) +{ + GstTagMuxClass *klass; + GstBuffer *buffer; + GstTagList *taglist; + GstFlowReturn ret; + + taglist = gst_tag_mux_get_tags (mux); + + klass = GST_TAG_MUX_CLASS (G_OBJECT_GET_CLASS (mux)); + + if (klass->render_end_tag == NULL) + goto no_vfunc; + + buffer = klass->render_end_tag (mux, taglist); + + if (buffer == NULL) { + GST_INFO_OBJECT (mux, "No end tag generated"); + mux->end_tag_size = 0; + return GST_FLOW_OK; + } + + mux->end_tag_size = GST_BUFFER_SIZE (buffer); + GST_LOG_OBJECT (mux, "tag size = %" G_GSIZE_FORMAT " bytes", + mux->end_tag_size); + + /* Send newsegment event from the end of the file, so it gets written there, + independent of whatever new segment events upstream has sent us */ + gst_pad_push_event (mux->srcpad, + gst_event_new_new_segment (FALSE, 1.0, GST_FORMAT_BYTES, mux->max_offset, + -1, 0)); + + GST_BUFFER_OFFSET (buffer) = mux->max_offset; + ret = gst_pad_push (mux->srcpad, buffer); + + return ret; + +no_vfunc: + { + GST_ERROR_OBJECT (mux, "Subclass does not implement " + "render_end_tag vfunc!"); + return GST_FLOW_ERROR; + } +} + +static GstEvent * +gst_tag_mux_adjust_event_offsets (GstTagMux * mux, + const GstEvent * newsegment_event) +{ + GstFormat format; + gint64 start, stop, cur; + + gst_event_parse_new_segment ((GstEvent *) newsegment_event, NULL, NULL, + &format, &start, &stop, &cur); + + g_assert (format == GST_FORMAT_BYTES); + + if (start != -1) + start += mux->start_tag_size; + if (stop != -1) + stop += mux->start_tag_size; + if (cur != -1) + cur += mux->start_tag_size; + + GST_DEBUG_OBJECT (mux, "adjusting newsegment event offsets to start=%" + G_GINT64_FORMAT ", stop=%" G_GINT64_FORMAT ", cur=%" G_GINT64_FORMAT + " (delta = +%" G_GSIZE_FORMAT ")", start, stop, cur, mux->start_tag_size); + + return gst_event_new_new_segment (TRUE, 1.0, format, start, stop, cur); +} + +static GstFlowReturn +gst_tag_mux_chain (GstPad * pad, GstBuffer * buffer) +{ + GstTagMux *mux = GST_TAG_MUX (GST_OBJECT_PARENT (pad)); + GstFlowReturn ret; + int length; + + if (mux->render_start_tag) { + + GST_INFO_OBJECT (mux, "Adding tags to stream"); + ret = gst_tag_mux_render_start_tag (mux); + if (ret != GST_FLOW_OK) { + GST_DEBUG_OBJECT (mux, "flow: %s", gst_flow_get_name (ret)); + gst_buffer_unref (buffer); + return ret; + } + + /* Now send the cached newsegment event that we got from upstream */ + if (mux->newsegment_ev) { + gint64 start; + GstEvent *newseg; + + GST_DEBUG_OBJECT (mux, "sending cached newsegment event"); + newseg = gst_tag_mux_adjust_event_offsets (mux, mux->newsegment_ev); + gst_event_unref (mux->newsegment_ev); + mux->newsegment_ev = NULL; + + gst_event_parse_new_segment (newseg, NULL, NULL, NULL, &start, NULL, + NULL); + + gst_pad_push_event (mux->srcpad, newseg); + mux->current_offset = start; + mux->max_offset = MAX (mux->max_offset, mux->current_offset); + } else { + /* upstream sent no newsegment event or only one in a non-BYTE format */ + } + + mux->render_start_tag = FALSE; + } + + buffer = gst_buffer_make_metadata_writable (buffer); + + if (GST_BUFFER_OFFSET (buffer) != GST_BUFFER_OFFSET_NONE) { + GST_LOG_OBJECT (mux, "Adjusting buffer offset from %" G_GINT64_FORMAT + " to %" G_GINT64_FORMAT, GST_BUFFER_OFFSET (buffer), + GST_BUFFER_OFFSET (buffer) + mux->start_tag_size); + GST_BUFFER_OFFSET (buffer) += mux->start_tag_size; + } + + length = GST_BUFFER_SIZE (buffer); + + gst_buffer_set_caps (buffer, GST_PAD_CAPS (mux->srcpad)); + ret = gst_pad_push (mux->srcpad, buffer); + + mux->current_offset += length; + mux->max_offset = MAX (mux->max_offset, mux->current_offset); + + return ret; +} + +static gboolean +gst_tag_mux_sink_event (GstPad * pad, GstEvent * event) +{ + GstTagMux *mux; + gboolean result; + + mux = GST_TAG_MUX (gst_pad_get_parent (pad)); + result = FALSE; + + switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_TAG:{ + GstTagList *tags; + + gst_event_parse_tag (event, &tags); + + GST_INFO_OBJECT (mux, "Got tag event: %" GST_PTR_FORMAT, tags); + + if (mux->event_tags != NULL) { + gst_tag_list_insert (mux->event_tags, tags, GST_TAG_MERGE_REPLACE); + } else { + mux->event_tags = gst_tag_list_copy (tags); + } + + GST_INFO_OBJECT (mux, "Event tags are now: %" GST_PTR_FORMAT, + mux->event_tags); + + /* just drop the event, we'll push a new tag event in render_start_tag */ + gst_event_unref (event); + result = TRUE; + break; + } + case GST_EVENT_NEWSEGMENT:{ + GstFormat fmt; + gint64 start; + + gst_event_parse_new_segment (event, NULL, NULL, &fmt, &start, NULL, NULL); + + if (fmt != GST_FORMAT_BYTES) { + GST_WARNING_OBJECT (mux, "dropping newsegment event in %s format", + gst_format_get_name (fmt)); + gst_event_unref (event); + break; + } + + if (mux->render_start_tag) { + /* we have not rendered the tag yet, which means that we don't know + * how large it is going to be yet, so we can't adjust the offsets + * here at this point and need to cache the newsegment event for now + * (also, there could be tag events coming after this newsegment event + * and before the first buffer). */ + if (mux->newsegment_ev) { + GST_WARNING_OBJECT (mux, "discarding old cached newsegment event"); + gst_event_unref (mux->newsegment_ev); + } + + GST_LOG_OBJECT (mux, "caching newsegment event for later"); + mux->newsegment_ev = event; + } else { + GST_DEBUG_OBJECT (mux, "got newsegment event, adjusting offsets"); + gst_pad_push_event (mux->srcpad, + gst_tag_mux_adjust_event_offsets (mux, event)); + gst_event_unref (event); + + mux->current_offset = start; + mux->max_offset = MAX (mux->max_offset, mux->current_offset); + } + event = NULL; + result = TRUE; + break; + } + case GST_EVENT_EOS:{ + if (mux->render_end_tag) { + GstFlowReturn ret; + + GST_INFO_OBJECT (mux, "Adding tags to stream"); + ret = gst_tag_mux_render_end_tag (mux); + if (ret != GST_FLOW_OK) { + GST_DEBUG_OBJECT (mux, "flow: %s", gst_flow_get_name (ret)); + return ret; + } + + mux->render_end_tag = FALSE; + } + + /* Now forward EOS */ + result = gst_pad_event_default (pad, event); + break; + } + default: + result = gst_pad_event_default (pad, event); + break; + } + + gst_object_unref (mux); + + return result; +} + + +static GstStateChangeReturn +gst_tag_mux_change_state (GstElement * element, GstStateChange transition) +{ + GstTagMux *mux; + GstStateChangeReturn result; + + mux = GST_TAG_MUX (element); + + result = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); + if (result != GST_STATE_CHANGE_SUCCESS) { + return result; + } + + switch (transition) { + case GST_STATE_CHANGE_PAUSED_TO_READY:{ + if (mux->newsegment_ev) { + gst_event_unref (mux->newsegment_ev); + mux->newsegment_ev = NULL; + } + if (mux->event_tags) { + gst_tag_list_free (mux->event_tags); + mux->event_tags = NULL; + } + mux->start_tag_size = 0; + mux->end_tag_size = 0; + mux->render_start_tag = TRUE; + mux->render_end_tag = TRUE; + mux->current_offset = 0; + mux->max_offset = 0; + break; + } + default: + break; + } + + return result; +} diff --git a/gst/id3tag/gsttagmux.h b/gst/id3tag/gsttagmux.h new file mode 100644 index 00000000..c13a7326 --- /dev/null +++ b/gst/id3tag/gsttagmux.h @@ -0,0 +1,79 @@ +/* GStreamer tag muxer base class + * + * Copyright (C) 2006 Christophe Fergeau + * Copyright (C) 2006 Tim-Philipp Müller + * Copyright (C) 2009 Pioneers of the Inevitable + * + * 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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef GST_TAG_MUX_H +#define GST_TAG_MUX_H + +#include + +G_BEGIN_DECLS + +typedef struct _GstTagMux GstTagMux; +typedef struct _GstTagMuxClass GstTagMuxClass; + +/* Definition of structure storing data for this element. */ +struct _GstTagMux { + GstElement element; + + GstPad *srcpad; + GstPad *sinkpad; + GstTagList *event_tags; /* tags received from upstream elements */ + GstTagList *final_tags; /* Final set of tags used for muxing */ + gsize start_tag_size; + gsize end_tag_size; + gboolean render_start_tag; + gboolean render_end_tag; + + gint64 current_offset; + gint64 max_offset; + + GstEvent *newsegment_ev; /* cached newsegment event from upstream */ +}; + +/* Standard definition defining a class for this element. */ +struct _GstTagMuxClass { + GstElementClass parent_class; + + /* vfuncs */ + GstBuffer * (*render_start_tag) (GstTagMux * mux, GstTagList * tag_list); + GstBuffer * (*render_end_tag) (GstTagMux * mux, GstTagList * tag_list); +}; + +/* Standard macros for defining types for this element. */ +#define GST_TYPE_TAG_MUX \ + (gst_tag_mux_get_type()) +#define GST_TAG_MUX(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_TAG_MUX,GstTagMux)) +#define GST_TAG_MUX_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_TAG_MUX,GstTagMuxClass)) +#define GST_IS_TAG_MUX(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_TAG_MUX)) +#define GST_IS_TAG_MUX_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TAG_MUX)) + +/* Standard function returning type information. */ +GType gst_tag_mux_get_type (void); + +G_END_DECLS + +#endif + diff --git a/gst/id3tag/id3tag.c b/gst/id3tag/id3tag.c new file mode 100644 index 00000000..0e040f7e --- /dev/null +++ b/gst/id3tag/id3tag.c @@ -0,0 +1,1194 @@ +/* GStreamer ID3v2 tag writer + * + * Copyright (C) 2006 Christophe Fergeau + * Copyright (C) 2006-2009 Tim-Philipp Müller + * Copyright (C) 2009 Pioneers of the Inevitable + * + * 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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include "id3tag.h" +#include + +#include + +GST_DEBUG_CATEGORY_EXTERN (gst_id3tag_debug); +#define GST_CAT_DEFAULT gst_id3tag_debug + +#define ID3V2_APIC_PICTURE_OTHER 0 +#define ID3V2_APIC_PICTURE_FILE_ICON 1 + +/* ======================================================================== */ + +typedef GString GstByteWriter; + +static inline GstByteWriter * +gst_byte_writer_new (guint size) +{ + return (GstByteWriter *) g_string_sized_new (size); +} + +static inline guint +gst_byte_writer_get_length (GstByteWriter * w) +{ + return ((GString *) w)->len; +} + +static inline void +gst_byte_writer_write_bytes (GstByteWriter * w, const guint8 * data, guint len) +{ + g_string_append_len ((GString *) w, (const gchar *) data, len); +} + +static inline void +gst_byte_writer_write_uint8 (GstByteWriter * w, guint8 val) +{ + guint8 data[1]; + + GST_WRITE_UINT8 (data, val); + gst_byte_writer_write_bytes (w, data, 1); +} + +static inline void +gst_byte_writer_write_uint16 (GstByteWriter * w, guint16 val) +{ + guint8 data[2]; + + GST_WRITE_UINT16_BE (data, val); + gst_byte_writer_write_bytes (w, data, 2); +} + +static inline void +gst_byte_writer_write_uint32 (GstByteWriter * w, guint32 val) +{ + guint8 data[4]; + + GST_WRITE_UINT32_BE (data, val); + gst_byte_writer_write_bytes (w, data, 4); +} + +static inline void +gst_byte_writer_write_uint32_syncsafe (GstByteWriter * w, guint32 val) +{ + guint8 data[4]; + + data[0] = (guint8) ((val >> 21) & 0x7f); + data[1] = (guint8) ((val >> 14) & 0x7f); + data[2] = (guint8) ((val >> 7) & 0x7f); + data[3] = (guint8) ((val >> 0) & 0x7f); + gst_byte_writer_write_bytes (w, data, 4); +} + +static void +gst_byte_writer_copy_bytes (GstByteWriter * w, guint8 * dest, guint offset, + gint size) +{ + guint length; + + length = gst_byte_writer_get_length (w); + + if (size == -1) + size = length - offset; + +#if GLIB_CHECK_VERSION(2,16,0) + g_warn_if_fail (length >= (offset + size)); +#endif + + memcpy (dest, w->str + offset, MIN (size, length - offset)); +} + +static inline void +gst_byte_writer_free (GstByteWriter * w) +{ + g_string_free (w, TRUE); +} + +/* ======================================================================== */ + +/* +typedef enum { + GST_ID3V2_FRAME_FLAG_NONE = 0, + GST_ID3V2_FRAME_FLAG_ +} GstID3v2FrameMsgFlags; +*/ + +typedef struct +{ + gchar id[5]; + guint32 len; /* Length encoded in the header; this is the + total length - header size */ + guint16 flags; + GstByteWriter *writer; + gboolean dirty; /* TRUE if frame header needs updating */ +} GstId3v2Frame; + +typedef struct +{ + GArray *frames; + guint major_version; /* The 3 in v2.3.0 */ +} GstId3v2Tag; + +typedef void (*GstId3v2AddTagFunc) (GstId3v2Tag * tag, const GstTagList * list, + const gchar * gst_tag, guint num_tags, const gchar * data); + +#define ID3V2_ENCODING_UTF8 0x03 + +static gboolean id3v2_tag_init (GstId3v2Tag * tag, guint major_version); +static void id3v2_tag_unset (GstId3v2Tag * tag); + +static void id3v2_frame_init (GstId3v2Frame * frame, + const gchar * frame_id, guint16 flags); +static void id3v2_frame_unset (GstId3v2Frame * frame); +static void id3v2_frame_finish (GstId3v2Tag * tag, GstId3v2Frame * frame); +static guint id3v2_frame_get_size (GstId3v2Tag * tag, GstId3v2Frame * frame); + +static void id3v2_tag_add_text_frame (GstId3v2Tag * tag, + const gchar * frame_id, gchar ** strings, int num_strings); + +static gboolean +id3v2_tag_init (GstId3v2Tag * tag, guint major_version) +{ + if (major_version != 3 && major_version != 4) + return FALSE; + + tag->major_version = major_version; + tag->frames = g_array_new (TRUE, TRUE, sizeof (GstId3v2Frame)); + + return TRUE; +} + +static void +id3v2_tag_unset (GstId3v2Tag * tag) +{ + guint i; + + for (i = 0; i < tag->frames->len; ++i) + id3v2_frame_unset (&g_array_index (tag->frames, GstId3v2Frame, i)); + + g_array_free (tag->frames, TRUE); + memset (tag, 0, sizeof (GstId3v2Tag)); +} + +#ifndef GST_ROUND_UP_1024 +#define GST_ROUND_UP_1024(num) (((num)+1023)&~1023) +#endif + +static GstBuffer * +id3v2_tag_to_buffer (GstId3v2Tag * tag) +{ + GstByteWriter *w; + GstBuffer *buf; + guint8 *dest; + guint i, size, offset, size_frames = 0; + + GST_DEBUG ("Creating buffer for ID3v2 tag containing %d frames", + tag->frames->len); + + for (i = 0; i < tag->frames->len; ++i) { + GstId3v2Frame *frame = &g_array_index (tag->frames, GstId3v2Frame, i); + + id3v2_frame_finish (tag, frame); + size_frames += id3v2_frame_get_size (tag, frame); + } + + size = GST_ROUND_UP_1024 (10 + size_frames); + + w = gst_byte_writer_new (10); + gst_byte_writer_write_uint8 (w, 'I'); + gst_byte_writer_write_uint8 (w, 'D'); + gst_byte_writer_write_uint8 (w, '3'); + gst_byte_writer_write_uint8 (w, tag->major_version); + gst_byte_writer_write_uint8 (w, 0); /* micro version */ + gst_byte_writer_write_uint8 (w, 0); /* flags */ + gst_byte_writer_write_uint32_syncsafe (w, size - 10); + + buf = gst_buffer_new_and_alloc (size); + dest = GST_BUFFER_DATA (buf); + gst_byte_writer_copy_bytes (w, dest, 0, 10); + offset = 10; + + for (i = 0; i < tag->frames->len; ++i) { + GstId3v2Frame *frame = &g_array_index (tag->frames, GstId3v2Frame, i); + + gst_byte_writer_copy_bytes (frame->writer, dest + offset, 0, -1); + offset += id3v2_frame_get_size (tag, frame); + } + + /* Zero out any additional space in our buffer as padding. */ + memset (dest + offset, 0, size - offset); + + gst_byte_writer_free (w); + + return buf; +} + +static inline void +id3v2_frame_write_bytes (GstId3v2Frame * frame, const guint8 * data, guint len) +{ + gst_byte_writer_write_bytes (frame->writer, data, len); + frame->dirty = TRUE; +} + +static inline void +id3v2_frame_write_uint8 (GstId3v2Frame * frame, guint8 val) +{ + gst_byte_writer_write_uint8 (frame->writer, val); + frame->dirty = TRUE; +} + +static inline void +id3v2_frame_write_uint16 (GstId3v2Frame * frame, guint16 val) +{ + gst_byte_writer_write_uint16 (frame->writer, val); + frame->dirty = TRUE; +} + +static inline void +id3v2_frame_write_uint32 (GstId3v2Frame * frame, guint32 val) +{ + gst_byte_writer_write_uint32 (frame->writer, val); + frame->dirty = TRUE; +} + +static inline void +id3v2_frame_write_uint32_syncsafe (GstId3v2Frame * frame, guint32 val) +{ + guint8 data[4]; + + data[0] = (guint8) ((val >> 21) & 0x7f); + data[1] = (guint8) ((val >> 14) & 0x7f); + data[2] = (guint8) ((val >> 7) & 0x7f); + data[3] = (guint8) ((val >> 0) & 0x7f); + gst_byte_writer_write_bytes (frame->writer, data, 4); + frame->dirty = TRUE; +} + +static void +id3v2_frame_init (GstId3v2Frame * frame, const gchar * frame_id, guint16 flags) +{ + g_assert (strlen (frame_id) == 4); /* we only handle 2.3.0/2.4.0 */ + memcpy (frame->id, frame_id, 4 + 1); + frame->flags = flags; + frame->len = 0; + frame->writer = gst_byte_writer_new (64); + id3v2_frame_write_bytes (frame, (const guint8 *) frame->id, 4); + id3v2_frame_write_uint32 (frame, 0); /* size, set later */ + id3v2_frame_write_uint16 (frame, frame->flags); +} + +static void +id3v2_frame_finish (GstId3v2Tag * tag, GstId3v2Frame * frame) +{ + if (frame->dirty) { + frame->len = frame->writer->len - 10; + GST_LOG ("[%s] %u bytes", frame->id, frame->len); + if (tag->major_version == 3) { + GST_WRITE_UINT32_BE (frame->writer->str + 4, frame->len); + } else { + /* Version 4 uses a syncsafe int here */ + GST_WRITE_UINT8 (frame->writer->str + 4, (frame->len >> 21) & 0x7f); + GST_WRITE_UINT8 (frame->writer->str + 5, (frame->len >> 14) & 0x7f); + GST_WRITE_UINT8 (frame->writer->str + 6, (frame->len >> 7) & 0x7f); + GST_WRITE_UINT8 (frame->writer->str + 7, (frame->len >> 0) & 0x7f); + } + frame->dirty = FALSE; + } +} + +static guint +id3v2_frame_get_size (GstId3v2Tag * tag, GstId3v2Frame * frame) +{ + id3v2_frame_finish (tag, frame); + return gst_byte_writer_get_length (frame->writer); +} + +static void +id3v2_frame_unset (GstId3v2Frame * frame) +{ + gst_byte_writer_free (frame->writer); + memset (frame, 0, sizeof (GstId3v2Frame)); +} + +static void +id3v2_tag_add_text_frame (GstId3v2Tag * tag, const gchar * frame_id, + gchar ** strings_utf8, int num_strings) +{ + GstId3v2Frame frame; + guint len, i; + + if (num_strings < 1 || strings_utf8 == NULL || strings_utf8[0] == NULL) { + GST_LOG ("Not adding text frame, no strings"); + return; + } + + id3v2_frame_init (&frame, frame_id, 0); + id3v2_frame_write_uint8 (&frame, ID3V2_ENCODING_UTF8); + + GST_LOG ("Adding text frame %s with %d strings", frame_id, num_strings); + + for (i = 0; i < num_strings; ++i) { + len = strlen (strings_utf8[i]); + g_return_if_fail (g_utf8_validate (strings_utf8[i], len, NULL)); + + /* write NUL terminator as well */ + id3v2_frame_write_bytes (&frame, (const guint8 *) strings_utf8[i], len + 1); + + /* only v2.4.0 supports multiple strings per frame (according to the + * earlier specs tag readers should just ignore everything after the first + * string, but we probably shouldn't write anything there, just in case + * tag readers that only support the old version are not expecting + * more data after the first string) */ + if (tag->major_version < 4) + break; + } + + if (i < num_strings - 1) { + GST_WARNING ("Only wrote one of multiple string values for text frame %s " + "- ID3v2 supports multiple string values only since v2.4.0, but writing" + "v2.%u.0 tag", frame_id, tag->major_version); + } + + g_array_append_val (tag->frames, frame); +} + +/* ====================================================================== */ + +static void +add_text_tag (GstId3v2Tag * id3v2tag, const GstTagList * list, + const gchar * tag, guint num_tags, const gchar * frame_id) +{ + gchar **strings; + guint n, i; + + GST_LOG ("Adding '%s' frame", frame_id); + + strings = g_new0 (gchar *, num_tags + 1); + for (n = 0, i = 0; n < num_tags; ++n) { + if (gst_tag_list_get_string_index (list, tag, n, &strings[i]) && + strings[i] != NULL) { + GST_LOG ("%s: %s[%u] = '%s'", frame_id, tag, i, strings[i]); + ++i; + } + } + + if (strings[0] != NULL) { + id3v2_tag_add_text_frame (id3v2tag, frame_id, strings, i); + } else { + GST_WARNING ("Empty list for tag %s, skipping", tag); + } + + g_strfreev (strings); +} + +static void +add_id3v2frame_tag (GstId3v2Tag * id3v2tag, const GstTagList * list, + const gchar * tag, guint num_tags, const gchar * unused) +{ + guint i; + + for (i = 0; i < num_tags; ++i) { + const GValue *val; + GstBuffer *buf; + + val = gst_tag_list_get_value_index (list, tag, i); + buf = (GstBuffer *) gst_value_get_mini_object (val); + + if (buf && GST_BUFFER_CAPS (buf)) { + GstStructure *s; + gint version = 0; + + s = gst_caps_get_structure (GST_BUFFER_CAPS (buf), 0); + /* We can only add it if this private buffer is for the same ID3 version, + because we don't understand the contents at all. */ + if (s && gst_structure_get_int (s, "version", &version) && + version == id3v2tag->major_version) { + GstId3v2Frame frame; + gchar frame_id[5]; + guint16 flags; + guint8 *data = GST_BUFFER_DATA (buf); + gint size = GST_BUFFER_SIZE (buf); + + if (size < 10) /* header size */ + return; + + /* We only reach here if the frame version matches the muxer. Since the + muxer only does v2.3 or v2.4, the frame must be one of those - and + so the frame header is the same format */ + memcpy (frame_id, data, 4); + frame_id[4] = 0; + flags = GST_READ_UINT16_BE (data + 8); + + id3v2_frame_init (&frame, frame_id, flags); + id3v2_frame_write_bytes (&frame, data + 10, size - 10); + + g_array_append_val (id3v2tag->frames, frame); + GST_DEBUG ("Added unparsed tag with %d bytes", size); + } else { + GST_WARNING ("Discarding unrecognised ID3 tag for different ID3 " + "version"); + } + } + } +} + +static void +add_text_tag_v4 (GstId3v2Tag * id3v2tag, const GstTagList * list, + const gchar * tag, guint num_tags, const gchar * frame_id) +{ + if (id3v2tag->major_version == 4) + add_text_tag (id3v2tag, list, tag, num_tags, frame_id); + else { + GST_WARNING ("Cannot serialise tag '%s' in ID3v2.%d", frame_id, + id3v2tag->major_version); + } +} + +static void +add_count_or_num_tag (GstId3v2Tag * id3v2tag, const GstTagList * list, + const gchar * tag, guint num_tags, const gchar * frame_id) +{ + static const struct + { + const gchar *gst_tag; + const gchar *corr_count; /* corresponding COUNT tag (if number) */ + const gchar *corr_num; /* corresponding NUMBER tag (if count) */ + } corr[] = { + { + GST_TAG_TRACK_NUMBER, GST_TAG_TRACK_COUNT, NULL}, { + GST_TAG_TRACK_COUNT, NULL, GST_TAG_TRACK_NUMBER}, { + GST_TAG_ALBUM_VOLUME_NUMBER, GST_TAG_ALBUM_VOLUME_COUNT, NULL}, { + GST_TAG_ALBUM_VOLUME_COUNT, NULL, GST_TAG_ALBUM_VOLUME_NUMBER} + }; + guint idx; + + for (idx = 0; idx < G_N_ELEMENTS (corr); ++idx) { + if (strcmp (corr[idx].gst_tag, tag) == 0) + break; + } + + g_assert (idx < G_N_ELEMENTS (corr)); + g_assert (frame_id && strlen (frame_id) == 4); + + if (corr[idx].corr_num == NULL) { + guint number; + + /* number tag */ + if (gst_tag_list_get_uint_index (list, tag, 0, &number)) { + gchar *tag_str; + guint count; + + if (gst_tag_list_get_uint_index (list, corr[idx].corr_count, 0, &count)) + tag_str = g_strdup_printf ("%u/%u", number, count); + else + tag_str = g_strdup_printf ("%u", number); + + GST_DEBUG ("Setting %s to %s (frame_id = %s)", tag, tag_str, frame_id); + + id3v2_tag_add_text_frame (id3v2tag, frame_id, &tag_str, 1); + g_free (tag_str); + } + } else if (corr[idx].corr_count == NULL) { + guint count; + + /* count tag */ + if (gst_tag_list_get_uint_index (list, corr[idx].corr_num, 0, &count)) { + GST_DEBUG ("%s handled with %s, skipping", tag, corr[idx].corr_num); + } else if (gst_tag_list_get_uint_index (list, tag, 0, &count)) { + gchar *tag_str = g_strdup_printf ("0/%u", count); + GST_DEBUG ("Setting %s to %s (frame_id = %s)", tag, tag_str, frame_id); + + id3v2_tag_add_text_frame (id3v2tag, frame_id, &tag_str, 1); + g_free (tag_str); + } + } + + if (num_tags > 1) { + GST_WARNING ("more than one %s, can only handle one", tag); + } +} + +static void +add_comment_tag (GstId3v2Tag * id3v2tag, const GstTagList * list, + const gchar * tag, guint num_tags, const gchar * unused) +{ + guint n; + + GST_LOG ("Adding comment frames"); + for (n = 0; n < num_tags; ++n) { + gchar *s = NULL; + + if (gst_tag_list_get_string_index (list, tag, n, &s) && s != NULL) { + gchar *desc = NULL, *val = NULL, *lang = NULL; + int desclen, vallen; + GstId3v2Frame frame; + + id3v2_frame_init (&frame, "COMM", 0); + id3v2_frame_write_uint8 (&frame, ID3V2_ENCODING_UTF8); + + if (strcmp (tag, GST_TAG_COMMENT) == 0 || + !gst_tag_parse_extended_comment (s, &desc, &lang, &val, TRUE)) { + /* create dummy description fields */ + desc = g_strdup ("Comment"); + val = g_strdup (s); + } + + /* If we don't have a valid language, match what taglib does for + unknown languages */ + if (!lang || strlen (lang) < 3) + lang = g_strdup ("XXX"); + + desclen = strlen (desc); + g_return_if_fail (g_utf8_validate (desc, desclen, NULL)); + vallen = strlen (val); + g_return_if_fail (g_utf8_validate (val, vallen, NULL)); + + GST_LOG ("%s[%u] = '%s' (%s|%s|%s)", tag, n, s, GST_STR_NULL (desc), + GST_STR_NULL (lang), GST_STR_NULL (val)); + + id3v2_frame_write_bytes (&frame, (const guint8 *) lang, 3); + /* write description and value, each including NULL terminator */ + id3v2_frame_write_bytes (&frame, (const guint8 *) desc, desclen + 1); + id3v2_frame_write_bytes (&frame, (const guint8 *) val, vallen + 1); + + g_free (lang); + g_free (desc); + g_free (val); + + g_array_append_val (id3v2tag->frames, frame); + } + g_free (s); + } +} + +static void +add_image_tag (GstId3v2Tag * id3v2tag, const GstTagList * list, + const gchar * tag, guint num_tags, const gchar * unused) +{ + guint n; + + for (n = 0; n < num_tags; ++n) { + const GValue *val; + GstBuffer *image; + + GST_DEBUG ("image %u/%u", n + 1, num_tags); + + val = gst_tag_list_get_value_index (list, tag, n); + image = (GstBuffer *) gst_value_get_mini_object (val); + + if (GST_IS_BUFFER (image) && GST_BUFFER_SIZE (image) > 0 && + GST_BUFFER_CAPS (image) != NULL && + !gst_caps_is_empty (GST_BUFFER_CAPS (image))) { + const gchar *mime_type; + GstStructure *s; + + s = gst_caps_get_structure (GST_BUFFER_CAPS (image), 0); + mime_type = gst_structure_get_name (s); + if (mime_type != NULL) { + const gchar *desc; + GstId3v2Frame frame; + + /* APIC frame specifies "-->" if we're providing a URL to the image + rather than directly embedding it */ + if (strcmp (mime_type, "text/uri-list") == 0) + mime_type = "-->"; + + GST_DEBUG ("Attaching picture of %u bytes and mime type %s", + GST_BUFFER_SIZE (image), mime_type); + + id3v2_frame_init (&frame, "APIC", 0); + id3v2_frame_write_uint8 (&frame, ID3V2_ENCODING_UTF8); + id3v2_frame_write_bytes (&frame, (const guint8 *) mime_type, + strlen (mime_type) + 1); + + /* FIXME set image type properly from caps */ + if (strcmp (tag, GST_TAG_PREVIEW_IMAGE) == 0) + id3v2_frame_write_uint8 (&frame, ID3V2_APIC_PICTURE_FILE_ICON); + else + id3v2_frame_write_uint8 (&frame, ID3V2_APIC_PICTURE_OTHER); + + desc = gst_structure_get_string (s, "image-description"); + if (!desc) + desc = ""; + id3v2_frame_write_bytes (&frame, (const guint8 *) desc, + strlen (desc) + 1); + + g_array_append_val (id3v2tag->frames, frame); + } + } else { + GST_WARNING ("NULL image or no caps on image buffer (%p, caps=%" + GST_PTR_FORMAT ")", image, (image) ? GST_BUFFER_CAPS (image) : NULL); + } + } +} + +static void +add_musicbrainz_tag (GstId3v2Tag * id3v2tag, const GstTagList * list, + const gchar * tag, guint num_tags, const gchar * data) +{ + static const struct + { + const gchar gst_tag[28]; + const gchar spec_id[28]; + const gchar realworld_id[28]; + } mb_ids[] = { + { + GST_TAG_MUSICBRAINZ_ARTISTID, "MusicBrainz Artist Id", + "musicbrainz_artistid"}, { + GST_TAG_MUSICBRAINZ_ALBUMID, "MusicBrainz Album Id", "musicbrainz_albumid"}, { + GST_TAG_MUSICBRAINZ_ALBUMARTISTID, "MusicBrainz Album Artist Id", + "musicbrainz_albumartistid"}, { + GST_TAG_MUSICBRAINZ_TRMID, "MusicBrainz TRM Id", "musicbrainz_trmid"}, { + GST_TAG_CDDA_MUSICBRAINZ_DISCID, "MusicBrainz DiscID", + "musicbrainz_discid"}, { + /* the following one is more or less made up, there seems to be little + * evidence that any popular application is actually putting this info + * into TXXX frames; the first one comes from a musicbrainz wiki 'proposed + * tags' page, the second one is analogue to the vorbis/ape/flac tag. */ + GST_TAG_CDDA_CDDB_DISCID, "CDDB DiscID", "discid"} + }; + guint i, idx; + + idx = (guint8) data[0]; + g_assert (idx < G_N_ELEMENTS (mb_ids)); + + for (i = 0; i < num_tags; ++i) { + gchar *id_str; + + if (gst_tag_list_get_string_index (list, tag, 0, &id_str) && id_str) { + /* add two frames, one with the ID the musicbrainz.org spec mentions + * and one with the ID that applications use in the real world */ + GstId3v2Frame frame1, frame2; + + GST_DEBUG ("Setting '%s' to '%s'", mb_ids[idx].spec_id, id_str); + + id3v2_frame_init (&frame1, "TXXX", 0); + id3v2_frame_write_uint8 (&frame1, ID3V2_ENCODING_UTF8); + id3v2_frame_write_bytes (&frame1, (const guint8 *) mb_ids[idx].spec_id, + strlen (mb_ids[idx].spec_id) + 1); + id3v2_frame_write_bytes (&frame1, (const guint8 *) id_str, + strlen (id_str) + 1); + g_array_append_val (id3v2tag->frames, frame1); + + id3v2_frame_init (&frame2, "TXXX", 0); + id3v2_frame_write_uint8 (&frame2, ID3V2_ENCODING_UTF8); + id3v2_frame_write_bytes (&frame2, + (const guint8 *) mb_ids[idx].realworld_id, + strlen (mb_ids[idx].realworld_id) + 1); + id3v2_frame_write_bytes (&frame2, (const guint8 *) id_str, + strlen (id_str) + 1); + g_array_append_val (id3v2tag->frames, frame2); + + g_free (id_str); + } + } +} + +static void +add_unique_file_id_tag (GstId3v2Tag * id3v2tag, const GstTagList * list, + const gchar * tag, guint num_tags, const gchar * unused) +{ + const gchar *origin = "http://musicbrainz.org"; + gchar *id_str = NULL; + + if (gst_tag_list_get_string_index (list, tag, 0, &id_str) && id_str) { + GstId3v2Frame frame; + + GST_LOG ("Adding %s (%s): %s", tag, origin, id_str); + + id3v2_frame_init (&frame, "UFID", 0); + id3v2_frame_write_bytes (&frame, (const guint8 *) origin, + strlen (origin) + 1); + id3v2_frame_write_bytes (&frame, (const guint8 *) id_str, + strlen (id_str) + 1); + g_array_append_val (id3v2tag->frames, frame); + + g_free (id_str); + } +} + +static void +add_date_tag (GstId3v2Tag * id3v2tag, const GstTagList * list, + const gchar * tag, guint num_tags, const gchar * unused) +{ + guint n; + guint i = 0; + const gchar *frame_id; + gchar **strings; + + if (id3v2tag->major_version == 3) + frame_id = "TYER"; + else + frame_id = "TDRC"; + + GST_LOG ("Adding date frame"); + + strings = g_new0 (gchar *, num_tags + 1); + for (n = 0; n < num_tags; ++n) { + GDate *date = NULL; + + if (gst_tag_list_get_date_index (list, tag, n, &date) && date != NULL) { + GDateYear year; + gchar *s; + + year = g_date_get_year (date); + if (year > 500 && year < 2100) { + s = g_strdup_printf ("%u", year); + GST_LOG ("%s[%u] = '%s'", tag, n, s); + strings[i] = s; + i++; + } else { + GST_WARNING ("invalid year %u, skipping", year); + } + + g_date_free (date); + } + } + + if (strings[0] != NULL) { + id3v2_tag_add_text_frame (id3v2tag, frame_id, strings, i); + } else { + GST_WARNING ("Empty list for tag %s, skipping", tag); + } + + g_strfreev (strings); +} + +static void +add_encoder_tag (GstId3v2Tag * id3v2tag, const GstTagList * list, + const gchar * tag, guint num_tags, const gchar * unused) +{ + guint n; + gchar **strings; + int i = 0; + + /* ENCODER_VERSION is either handled with the ENCODER tag or not at all */ + if (strcmp (tag, GST_TAG_ENCODER_VERSION) == 0) + return; + + strings = g_new0 (gchar *, num_tags + 1); + for (n = 0; n < num_tags; ++n) { + gchar *encoder = NULL; + + if (gst_tag_list_get_string_index (list, tag, n, &encoder) && encoder) { + guint encoder_version; + gchar *s; + + if (gst_tag_list_get_uint_index (list, GST_TAG_ENCODER_VERSION, n, + &encoder_version) && encoder_version > 0) { + s = g_strdup_printf ("%s %u", encoder, encoder_version); + } else { + s = g_strdup (encoder); + } + + GST_LOG ("encoder[%u] = '%s'", n, s); + strings[i] = s; + i++; + g_free (encoder); + } + } + + if (strings[0] != NULL) { + id3v2_tag_add_text_frame (id3v2tag, "TSSE", strings, i); + } else { + GST_WARNING ("Empty list for tag %s, skipping", tag); + } + + g_strfreev (strings); +} + +static void +add_uri_tag (GstId3v2Tag * id3v2tag, const GstTagList * list, + const gchar * tag, guint num_tags, const gchar * frame_id) +{ + gchar *url = NULL; + + g_assert (frame_id != NULL); + + /* URI tags are limited to one of each per taglist */ + if (gst_tag_list_get_string_index (list, tag, 0, &url) && url != NULL) { + guint url_len; + + url_len = strlen (url); + if (url_len > 0 && gst_uri_is_valid (url)) { + GstId3v2Frame frame; + + id3v2_frame_init (&frame, frame_id, 0); + id3v2_frame_write_bytes (&frame, (const guint8 *) url, strlen (url) + 1); + g_array_append_val (id3v2tag->frames, frame); + } else { + GST_WARNING ("Tag %s does not contain a valid URI (%s)", tag, url); + } + + g_free (url); + } +} + +static void +add_relative_volume_tag (GstId3v2Tag * id3v2tag, const GstTagList * list, + const gchar * tag, guint num_tags, const gchar * unused) +{ + const char *gain_tag_name; + const char *peak_tag_name; + gdouble peak_val; + gdouble gain_val; + const char *identification; + guint16 peak_int; + gint16 gain_int; + guint8 peak_bits; + GstId3v2Frame frame; + gchar *frame_id; + + /* figure out tag names and the identification string to use */ + if (strcmp (tag, GST_TAG_TRACK_PEAK) == 0 || + strcmp (tag, GST_TAG_TRACK_GAIN) == 0) { + gain_tag_name = GST_TAG_TRACK_GAIN; + peak_tag_name = GST_TAG_TRACK_PEAK; + identification = "track"; + GST_DEBUG ("adding track relative-volume frame"); + } else { + gain_tag_name = GST_TAG_ALBUM_GAIN; + peak_tag_name = GST_TAG_ALBUM_PEAK; + identification = "album"; + + if (id3v2tag->major_version == 3) { + GST_WARNING ("Cannot store replaygain album gain data in ID3v2.3"); + return; + } + GST_DEBUG ("adding album relative-volume frame"); + } + + /* find the value for the paired tag (gain, if this is peak, and + * vice versa). if both tags exist, only write the frame when + * we're processing the peak tag. + */ + if (strcmp (tag, GST_TAG_TRACK_PEAK) == 0 || + strcmp (tag, GST_TAG_ALBUM_PEAK) == 0) { + + gst_tag_list_get_double (list, tag, &peak_val); + + if (gst_tag_list_get_tag_size (list, gain_tag_name) > 0) { + gst_tag_list_get_double (list, gain_tag_name, &gain_val); + GST_DEBUG ("setting volume adjustment %g", gain_val); + gain_int = (gint16) (gain_val * 512.0); + } else + gain_int = 0; + + /* copying mutagen: always write as 16 bits for sanity. */ + peak_int = (short) (peak_val * G_MAXSHORT); + peak_bits = 16; + } else { + gst_tag_list_get_double (list, tag, &gain_val); + GST_DEBUG ("setting volume adjustment %g", gain_val); + + gain_int = (gint16) (gain_val * 512.0); + peak_bits = 0; + peak_int = 0; + + if (gst_tag_list_get_tag_size (list, peak_tag_name) != 0) { + GST_DEBUG + ("both gain and peak tags exist, not adding frame this time around"); + return; + } + } + + if (id3v2tag->major_version == 4) { + /* 2.4: Use RVA2 tag */ + frame_id = "RVA2"; + } else { + /* 2.3: Use XRVA tag - this is experimental, but useful in the real world. + This version only officially supports the 'RVAD' tag, but that appears + to not be widely implemented in reality. */ + frame_id = "XRVA"; + } + + id3v2_frame_init (&frame, frame_id, 0); + id3v2_frame_write_bytes (&frame, (const guint8 *) identification, + strlen (identification) + 1); + id3v2_frame_write_uint8 (&frame, 0x01); /* Master volume */ + id3v2_frame_write_uint16 (&frame, gain_int); + id3v2_frame_write_uint8 (&frame, peak_bits); + if (peak_bits) + id3v2_frame_write_uint16 (&frame, peak_int); + + g_array_append_val (id3v2tag->frames, frame); +} + +/* id3demux produces these for frames it cannot parse */ +#define GST_ID3_DEMUX_TAG_ID3V2_FRAME "private-id3v2-frame" + +static const struct +{ + const gchar *gst_tag; + const GstId3v2AddTagFunc func; + const gchar *data; +} add_funcs[] = { + { + /* Simple text tags */ + GST_TAG_ARTIST, add_text_tag, "TPE1"}, { + GST_TAG_TITLE, add_text_tag, "TIT2"}, { + GST_TAG_ALBUM, add_text_tag, "TALB"}, { + GST_TAG_COPYRIGHT, add_text_tag, "TCOP"}, { + GST_TAG_COMPOSER, add_text_tag, "TCOM"}, { + GST_TAG_GENRE, add_text_tag, "TCON"}, { + + /* Private frames */ + GST_ID3_DEMUX_TAG_ID3V2_FRAME, add_id3v2frame_tag, NULL}, { + + /* Track and album numbers */ + GST_TAG_TRACK_NUMBER, add_count_or_num_tag, "TRCK"}, { + GST_TAG_TRACK_COUNT, add_count_or_num_tag, "TRCK"}, { + GST_TAG_ALBUM_VOLUME_NUMBER, add_count_or_num_tag, "TPOS"}, { + GST_TAG_ALBUM_VOLUME_COUNT, add_count_or_num_tag, "TPOS"}, { + + /* Comment tags */ + GST_TAG_COMMENT, add_comment_tag, NULL}, { + GST_TAG_EXTENDED_COMMENT, add_comment_tag, NULL}, { + + /* Images */ + GST_TAG_IMAGE, add_image_tag, NULL}, { + GST_TAG_PREVIEW_IMAGE, add_image_tag, NULL}, { + + /* Misc user-defined text tags for IDs (and UFID frame) */ + GST_TAG_MUSICBRAINZ_ARTISTID, add_musicbrainz_tag, "\000"}, { + GST_TAG_MUSICBRAINZ_ALBUMID, add_musicbrainz_tag, "\001"}, { + GST_TAG_MUSICBRAINZ_ALBUMARTISTID, add_musicbrainz_tag, "\002"}, { + GST_TAG_MUSICBRAINZ_TRMID, add_musicbrainz_tag, "\003"}, { + GST_TAG_CDDA_MUSICBRAINZ_DISCID, add_musicbrainz_tag, "\004"}, { + GST_TAG_CDDA_CDDB_DISCID, add_musicbrainz_tag, "\005"}, { + GST_TAG_MUSICBRAINZ_TRACKID, add_unique_file_id_tag, NULL}, { + + /* Info about encoder */ + GST_TAG_ENCODER, add_encoder_tag, NULL}, { + GST_TAG_ENCODER_VERSION, add_encoder_tag, NULL}, { + + /* URIs */ + GST_TAG_COPYRIGHT_URI, add_uri_tag, "WCOP"}, { + GST_TAG_LICENSE_URI, add_uri_tag, "WCOP"}, { + + /* Up to here, all the frame ids and contents have been the same between + versions 2.3 and 2.4. The rest of them differ... */ + /* Date (in ID3v2.3, this is a TYER tag. In v2.4, it's a TDRC tag */ + GST_TAG_DATE, add_date_tag, NULL}, { + + /* Replaygain data (not really supported in 2.3, we use an experimental + tag there) */ + GST_TAG_TRACK_PEAK, add_relative_volume_tag, NULL}, { + GST_TAG_TRACK_GAIN, add_relative_volume_tag, NULL}, { + GST_TAG_ALBUM_PEAK, add_relative_volume_tag, NULL}, { + GST_TAG_ALBUM_GAIN, add_relative_volume_tag, NULL}, { + + /* Sortable version of various tags. These are all v2.4 ONLY */ + GST_TAG_ARTIST_SORTNAME, add_text_tag_v4, "TSOP"}, { + GST_TAG_ALBUM_SORTNAME, add_text_tag_v4, "TSOA"}, { + GST_TAG_TITLE_SORTNAME, add_text_tag_v4, "TSOT"} +}; + +static void +foreach_add_tag (const GstTagList * list, const gchar * tag, gpointer userdata) +{ + GstId3v2Tag *id3v2tag = (GstId3v2Tag *) userdata; + guint num_tags, i; + + num_tags = gst_tag_list_get_tag_size (list, tag); + + GST_LOG ("Processing tag %s (num=%u)", tag, num_tags); + + if (num_tags > 1 && gst_tag_is_fixed (tag)) { + GST_WARNING ("Multiple occurences of fixed tag '%s', ignoring some", tag); + num_tags = 1; + } + + for (i = 0; i < G_N_ELEMENTS (add_funcs); ++i) { + if (strcmp (add_funcs[i].gst_tag, tag) == 0) { + add_funcs[i].func (id3v2tag, list, tag, num_tags, add_funcs[i].data); + break; + } + } + + if (i == G_N_ELEMENTS (add_funcs)) { + GST_WARNING ("Unsupported tag '%s' - not written", tag); + } +} + +GstBuffer * +gst_id3mux_render_v2_tag (GstTagMux * mux, GstTagList * taglist, int version) +{ + GstId3v2Tag tag; + GstBuffer *buf; + + if (!id3v2_tag_init (&tag, version)) { + GST_WARNING_OBJECT (mux, "Unsupported version %d", version); + return NULL; + } + + /* Render the tag */ + gst_tag_list_foreach (taglist, foreach_add_tag, &tag); + +#if 0 + /* Do we want to add our own signature to the tag somewhere? */ + { + gchar *tag_producer_str; + + tag_producer_str = g_strdup_printf ("(GStreamer id3v2mux %s, using " + "taglib %u.%u)", VERSION, TAGLIB_MAJOR_VERSION, TAGLIB_MINOR_VERSION); + add_one_txxx_tag (id3v2tag, "tag_encoder", tag_producer_str); + g_free (tag_producer_str); + } +#endif + + /* Create buffer with tag */ + buf = id3v2_tag_to_buffer (&tag); + gst_buffer_set_caps (buf, GST_PAD_CAPS (mux->srcpad)); + GST_LOG_OBJECT (mux, "tag size = %d bytes", GST_BUFFER_SIZE (buf)); + + id3v2_tag_unset (&tag); + + return buf; +} + +#define ID3_V1_TAG_SIZE 128 + +typedef void (*GstId3v1WriteFunc) (const GstTagList * list, + const gchar * gst_tag, guint8 * dst, int len); + +static void +latin1_convert (const GstTagList * list, const gchar * tag, + guint8 * dst, int maxlen) +{ + gchar *str; + gsize len; + gchar *latin1; + + if (!gst_tag_list_get_string (list, tag, &str)) + return; + + /* Convert to Latin-1 (ISO-8859-1), replacing unrepresentable characters + with '?' */ + latin1 = g_convert_with_fallback (str, -1, "ISO-8859-1", "UTF-8", "?", + NULL, &len, NULL); + + if (latin1) { + len = MIN (len, maxlen); + memcpy (dst, latin1, len); + g_free (latin1); + } + + g_free (str); +} + +static void +date_v1_convert (const GstTagList * list, const gchar * tag, + guint8 * dst, int maxlen) +{ + GDate *date; + + /* Only one date supported */ + if (gst_tag_list_get_date_index (list, tag, 0, &date) && date != NULL) { + GDateYear year = g_date_get_year (date); + /* Check for plausible year */ + if (year > 500 && year < 2100) { + gchar str[5]; + g_snprintf (str, 5, "%.4u", year); + memcpy (dst, str, 4); + } else { + GST_WARNING ("invalid year %u, skipping", year); + } + + g_date_free (date); + } +} + +static void +genre_v1_convert (const GstTagList * list, const gchar * tag, + guint8 * dst, int maxlen) +{ + gchar *str; + int genreidx = -1; + guint i, max; + + /* We only support one genre */ + if (!gst_tag_list_get_string_index (list, tag, 0, &str)) + return; + + max = gst_tag_id3_genre_count (); + + for (i = 0; i < max; i++) { + const gchar *genre = gst_tag_id3_genre_get (i); + if (g_str_equal (str, genre)) { + genreidx = i; + break; + } + } + + if (genreidx >= 0 && genreidx <= 127) + *dst = (guint8) genreidx; + + g_free (str); +} + +static void +track_number_convert (const GstTagList * list, const gchar * tag, + guint8 * dst, int maxlen) +{ + guint tracknum; + + /* We only support one track number */ + if (!gst_tag_list_get_uint_index (list, tag, 0, &tracknum)) + return; + + if (tracknum <= 127) + *dst = (guint8) tracknum; +} + +static const struct +{ + const gchar *gst_tag; + const gint offset; + const gint length; + const GstId3v1WriteFunc func; +} v1_funcs[] = { + { + GST_TAG_TITLE, 3, 30, latin1_convert}, { + GST_TAG_ARTIST, 33, 30, latin1_convert}, { + GST_TAG_ALBUM, 63, 30, latin1_convert}, { + GST_TAG_DATE, 93, 4, date_v1_convert}, { + GST_TAG_COMMENT, 97, 28, latin1_convert}, { + /* Note: one-byte gap here */ + GST_TAG_TRACK_NUMBER, 126, 1, track_number_convert}, { + GST_TAG_GENRE, 127, 1, genre_v1_convert} +}; + +GstBuffer * +gst_id3mux_render_v1_tag (GstTagMux * mux, GstTagList * taglist) +{ + GstBuffer *buf = gst_buffer_new_and_alloc (ID3_V1_TAG_SIZE); + guint8 *data = GST_BUFFER_DATA (buf); + int i; + + memset (data, 0, ID3_V1_TAG_SIZE); + + data[0] = 'T'; + data[1] = 'A'; + data[2] = 'G'; + + for (i = 0; i < G_N_ELEMENTS (v1_funcs); i++) { + v1_funcs[i].func (taglist, v1_funcs[i].gst_tag, data + v1_funcs[i].offset, + v1_funcs[i].length); + } + + gst_buffer_set_caps (buf, GST_PAD_CAPS (mux->srcpad)); + return buf; +} diff --git a/gst/id3tag/id3tag.h b/gst/id3tag/id3tag.h new file mode 100644 index 00000000..1fb59376 --- /dev/null +++ b/gst/id3tag/id3tag.h @@ -0,0 +1,32 @@ +/* GStreamer ID3v2 tag writer + * Copyright (C) 2009 Tim-Philipp Müller + * + * 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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include "gsttagmux.h" + +G_BEGIN_DECLS + +#define ID3_VERSION_2_3 3 +#define ID3_VERSION_2_4 4 + +GstBuffer * gst_id3mux_render_v2_tag (GstTagMux * mux, GstTagList * taglist, + int version); +GstBuffer * gst_id3mux_render_v1_tag (GstTagMux * mux, GstTagList * taglist); + +G_END_DECLS + -- cgit v1.2.1 From e9eae335f1164c6d57b18d5038c6df2835bfd563 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 18 May 2009 23:21:47 +0200 Subject: sdpdemux: rework RTCP sending and RTP receiving When we are dealing with multiast, create the udp src and sink elements pointing to the multicast addresses. When we are doing unicast, receive data on the local ports and don't send RTCP because we don't know where we have to send it. Fixes #583188 --- gst/sdp/gstsdpdemux.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++----- gst/sdp/gstsdpdemux.h | 1 + 2 files changed, 70 insertions(+), 7 deletions(-) diff --git a/gst/sdp/gstsdpdemux.c b/gst/sdp/gstsdpdemux.c index be34a22a..4deac870 100644 --- a/gst/sdp/gstsdpdemux.c +++ b/gst/sdp/gstsdpdemux.c @@ -51,6 +51,22 @@ #include #endif +#ifdef G_OS_WIN32 +#ifdef _MSC_VER +#include +#endif +/* ws2_32.dll has getaddrinfo and freeaddrinfo on Windows XP and later. + * * minwg32 headers check WINVER before allowing the use of these */ +#ifndef WINVER +#define WINVER 0x0501 +#endif +#include +#else +#include +#include +#include +#endif + #include #include #include @@ -348,6 +364,39 @@ gst_sdp_demux_stream_free (GstSDPDemux * demux, GstSDPStream * stream) g_free (stream); } +static gboolean +is_multicast_address (const gchar * host_name) +{ + struct addrinfo hints; + struct addrinfo *ai; + struct addrinfo *res; + gboolean ret = FALSE; + int err; + + memset (&hints, 0, sizeof (hints)); + hints.ai_socktype = SOCK_DGRAM; + + g_return_val_if_fail (host_name, FALSE); + + if ((err = getaddrinfo (host_name, NULL, &hints, &res)) < 0) + return FALSE; + + for (ai = res; !ret && ai; ai = ai->ai_next) { + if (ai->ai_family == AF_INET) + ret = + IN_MULTICAST (ntohl (((struct sockaddr_in *) ai->ai_addr)-> + sin_addr.s_addr)); + else + ret = + IN6_IS_ADDR_MULTICAST (&((struct sockaddr_in6 *) ai-> + ai_addr)->sin6_addr); + } + + freeaddrinfo (res); + + return ret; +} + static GstSDPStream * gst_sdp_demux_create_stream (GstSDPDemux * demux, GstSDPMessage * sdp, gint idx) { @@ -395,6 +444,7 @@ gst_sdp_demux_create_stream (GstSDPDemux * demux, GstSDPMessage * sdp, gint idx) stream->destination = conn->address; stream->ttl = conn->ttl; + stream->multicast = is_multicast_address (stream->destination); stream->rtp_port = gst_sdp_media_get_port (media); if ((rtcp = gst_sdp_media_get_attribute_val (media, "rtcp"))) { @@ -885,18 +935,24 @@ start_session_failure: static gboolean gst_sdp_demux_stream_configure_udp (GstSDPDemux * demux, GstSDPStream * stream) { - gchar *uri, *name; + gchar *uri, *name, *destination; GstPad *pad; GST_DEBUG_OBJECT (demux, "creating UDP sources for multicast"); + /* if the destination is not a multicast address, we just want to listen on + * our local ports */ + if (!stream->multicast) + destination = "0.0.0.0"; + else + destination = stream->destination; + /* creating UDP source */ if (stream->rtp_port != -1) { - GST_DEBUG_OBJECT (demux, "receiving RTP from %s:%d", stream->destination, + GST_DEBUG_OBJECT (demux, "receiving RTP from %s:%d", destination, stream->rtp_port); - uri = g_strdup_printf ("udp://%s:%d", stream->destination, - stream->rtp_port); + uri = g_strdup_printf ("udp://%s:%d", destination, stream->rtp_port); stream->udpsrc[0] = gst_element_make_from_uri (GST_URI_SRC, uri, NULL); g_free (uri); if (stream->udpsrc[0] == NULL) @@ -933,10 +989,9 @@ gst_sdp_demux_stream_configure_udp (GstSDPDemux * demux, GstSDPStream * stream) /* creating another UDP source */ if (stream->rtcp_port != -1) { - GST_DEBUG_OBJECT (demux, "receiving RTCP from %s:%d", stream->destination, + GST_DEBUG_OBJECT (demux, "receiving RTCP from %s:%d", destination, stream->rtcp_port); - uri = - g_strdup_printf ("udp://%s:%d", stream->destination, stream->rtcp_port); + uri = g_strdup_printf ("udp://%s:%d", destination, stream->rtcp_port); stream->udpsrc[1] = gst_element_make_from_uri (GST_URI_SRC, uri, NULL); g_free (uri); if (stream->udpsrc[1] == NULL) @@ -988,6 +1043,13 @@ gst_sdp_demux_stream_configure_udp_sink (GstSDPDemux * demux, if (stream->udpsink == NULL) goto no_sink_element; + /* we clear all destinations because we don't really know where to send the + * RTCP to and we want to avoid sending it to our own ports. + * FIXME when we get an RTCP packet from the sender, we could look at its + * source port and address and try to send RTCP there. */ + if (!stream->multicast) + g_signal_emit_by_name (stream->udpsink, "clear"); + /* no sync needed */ g_object_set (G_OBJECT (stream->udpsink), "sync", FALSE, NULL); /* no async state changes needed */ diff --git a/gst/sdp/gstsdpdemux.h b/gst/sdp/gstsdpdemux.h index 0ae60742..32a53293 100644 --- a/gst/sdp/gstsdpdemux.h +++ b/gst/sdp/gstsdpdemux.h @@ -68,6 +68,7 @@ struct _GstSDPStream { gchar *destination; guint ttl; + gboolean multicast; /* our udp sink back to the server */ GstElement *udpsink; -- cgit v1.2.1 From 3fb997111fcb3b7886e2879298afafe65eca1a49 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Thu, 21 May 2009 21:35:32 +0100 Subject: win32: Update the win32 config.h --- win32/common/config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/win32/common/config.h b/win32/common/config.h index 71a8018e..7b973465 100644 --- a/win32/common/config.h +++ b/win32/common/config.h @@ -24,7 +24,7 @@ #define GST_LICENSE "LGPL" /* package name in plugins */ -#define GST_PACKAGE_NAME "GStreamer Bad Plug-ins source release" +#define GST_PACKAGE_NAME "GStreamer Bad Plug-ins CVS/prerelease" /* package origin */ #define GST_PACKAGE_ORIGIN "Unknown package origin" @@ -199,7 +199,7 @@ #undef USE_POISONING /* Version number of package */ -#define VERSION "0.10.12" +#define VERSION "0.10.12.1" /* Define to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel and VAX). */ -- cgit v1.2.1 From b6e891bbdad221105daecdef83098a2585d0f039 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Mon, 18 May 2009 23:38:59 +0100 Subject: dtsdec: Reconcile element code with a52dec changes Re-work the dtsdec element code to unify it with changes made it a52dec, including support for reverse playback and dynamic channel negotiation on the source pad. --- ext/dts/gstdtsdec.c | 489 +++++++++++++++++++++++++++++++++++----------------- ext/dts/gstdtsdec.h | 32 ++-- 2 files changed, 348 insertions(+), 173 deletions(-) diff --git a/ext/dts/gstdtsdec.c b/ext/dts/gstdtsdec.c index 5b85a803..08695936 100644 --- a/ext/dts/gstdtsdec.c +++ b/ext/dts/gstdtsdec.c @@ -1,5 +1,6 @@ /* GStreamer DTS decoder plugin based on libdtsdec * Copyright (C) 2004 Ronald Bultje + * Copyright (C) 2009 Jan Schmidt * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -84,43 +85,46 @@ typedef struct dts_state_s dca_state_t; #include #include -GST_DEBUG_CATEGORY_STATIC (dtsdec_debug); -#define GST_CAT_DEFAULT (dtsdec_debug) - static const GstElementDetails gst_dtsdec_details = GST_ELEMENT_DETAILS ("DTS audio decoder", "Codec/Decoder/Audio", "Decodes DTS audio streams", + "Jan Schmidt \n" "Ronald Bultje "); +#if defined(LIBDTS_FIXED) || defined(LIBDCA_FIXED) +#define SAMPLE_WIDTH 16 +#elif defined (LIBDTS_DOUBLE) || defined(LIBDCA_DOUBLE) +#define SAMPLE_WIDTH 64 +#else +#define SAMPLE_WIDTH 32 +#endif + +GST_DEBUG_CATEGORY_STATIC (dtsdec_debug); +#define GST_CAT_DEFAULT (dtsdec_debug) + enum { ARG_0, ARG_DRC }; + static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_STATIC_CAPS ("audio/x-dts;" "audio/x-private1-dts") + GST_STATIC_CAPS ("audio/x-dts; audio/x-private1-dts") ); #if defined(LIBDTS_FIXED) || defined(LIBDCA_FIXED) #define DTS_CAPS "audio/x-raw-int, " \ "endianness = (int) " G_STRINGIFY (G_BYTE_ORDER) ", " \ "signed = (boolean) true, " \ - "width = (int) 16, " \ + "width = (int) " G_STRINGIFY (SAMPLE_WIDTH) ", " \ "depth = (int) 16" -#define SAMPLE_WIDTH 16 -#elif defined(LIBDTS_DOUBLE) || defined(LIBDCA_DOUBLE) -#define DTS_CAPS "audio/x-raw-float, " \ - "endianness = (int) " G_STRINGIFY (G_BYTE_ORDER) ", " \ - "width = (int) 64" -#define SAMPLE_WIDTH 64 #else #define DTS_CAPS "audio/x-raw-float, " \ "endianness = (int) " G_STRINGIFY (G_BYTE_ORDER) ", " \ - "width = (int) 32" -#define SAMPLE_WIDTH 32 + "width = (int) " G_STRINGIFY (SAMPLE_WIDTH) #endif static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", @@ -135,6 +139,7 @@ GST_BOILERPLATE (GstDtsDec, gst_dtsdec, GstElement, GST_TYPE_ELEMENT); static gboolean gst_dtsdec_sink_setcaps (GstPad * pad, GstCaps * caps); static gboolean gst_dtsdec_sink_event (GstPad * pad, GstEvent * event); static GstFlowReturn gst_dtsdec_chain (GstPad * pad, GstBuffer * buf); +static GstFlowReturn gst_dtsdec_chain_raw (GstPad * pad, GstBuffer * buf); static GstStateChangeReturn gst_dtsdec_change_state (GstElement * element, GstStateChange transition); @@ -155,7 +160,7 @@ gst_dtsdec_base_init (gpointer g_class) gst_static_pad_template_get (&src_factory)); gst_element_class_set_details (element_class, &gst_dtsdec_details); - GST_DEBUG_CATEGORY_INIT (dtsdec_debug, "dtsdec", 0, "DTS audio decoder"); + GST_DEBUG_CATEGORY_INIT (dtsdec_debug, "dtsdec", 0, "DTS/DCA audio decoder"); } static void @@ -202,6 +207,7 @@ gst_dtsdec_class_init (GstDtsDecClass * klass) static void gst_dtsdec_init (GstDtsDec * dtsdec, GstDtsDecClass * g_class) { + /* create the sink and src pads */ dtsdec->sinkpad = gst_pad_new_from_static_template (&sink_factory, "sink"); gst_pad_set_setcaps_function (dtsdec->sinkpad, GST_DEBUG_FUNCPTR (gst_dtsdec_sink_setcaps)); @@ -212,10 +218,12 @@ gst_dtsdec_init (GstDtsDec * dtsdec, GstDtsDecClass * g_class) gst_element_add_pad (GST_ELEMENT (dtsdec), dtsdec->sinkpad); 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); + dtsdec->request_channels = DCA_CHANNEL; dtsdec->dynamic_range_compression = FALSE; + + gst_segment_init (&dtsdec->segment, GST_FORMAT_UNDEFINED); } static gint @@ -317,6 +325,105 @@ gst_dtsdec_channels (uint32_t flags, GstAudioChannelPosition ** pos) return chans; } +static void +clear_queued (GstDtsDec * dec) +{ + g_list_foreach (dec->queued, (GFunc) gst_mini_object_unref, NULL); + g_list_free (dec->queued); + dec->queued = NULL; +} + +static GstFlowReturn +flush_queued (GstDtsDec * dec) +{ + GstFlowReturn ret = GST_FLOW_OK; + + while (dec->queued) { + GstBuffer *buf = GST_BUFFER_CAST (dec->queued->data); + + GST_LOG_OBJECT (dec, "pushing buffer %p, timestamp %" + GST_TIME_FORMAT ", duration %" GST_TIME_FORMAT, buf, + GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)), + GST_TIME_ARGS (GST_BUFFER_DURATION (buf))); + + /* iterate ouput queue an push downstream */ + ret = gst_pad_push (dec->srcpad, buf); + + dec->queued = g_list_delete_link (dec->queued, dec->queued); + } + return ret; +} + +static GstFlowReturn +gst_dtsdec_drain (GstDtsDec * dec) +{ + GstFlowReturn ret = GST_FLOW_OK; + + if (dec->segment.rate < 0.0) { + /* if we have some queued frames for reverse playback, flush + * them now */ + ret = flush_queued (dec); + } + return ret; +} + +static GstFlowReturn +gst_dtsdec_push (GstDtsDec * dtsdec, + GstPad * srcpad, int flags, sample_t * samples, GstClockTime timestamp) +{ + GstBuffer *buf; + int chans, n, c; + GstFlowReturn result; + + flags &= (DCA_CHANNEL_MASK | DCA_LFE); + chans = gst_dtsdec_channels (flags, NULL); + if (!chans) { + GST_ELEMENT_ERROR (GST_ELEMENT (dtsdec), STREAM, DECODE, (NULL), + ("Invalid channel flags: %d", flags)); + return GST_FLOW_ERROR; + } + + result = + gst_pad_alloc_buffer_and_set_caps (srcpad, 0, + 256 * chans * (SAMPLE_WIDTH / 8), GST_PAD_CAPS (srcpad), &buf); + if (result != GST_FLOW_OK) + return result; + + for (n = 0; n < 256; n++) { + for (c = 0; c < chans; c++) { + ((sample_t *) GST_BUFFER_DATA (buf))[n * chans + c] = + samples[c * 256 + n]; + } + } + GST_BUFFER_TIMESTAMP (buf) = timestamp; + GST_BUFFER_DURATION (buf) = 256 * GST_SECOND / dtsdec->sample_rate; + + result = GST_FLOW_OK; + if ((buf = gst_audio_buffer_clip (buf, &dtsdec->segment, + dtsdec->sample_rate, (SAMPLE_WIDTH / 8) * chans))) { + /* set discont when needed */ + if (dtsdec->discont) { + GST_LOG_OBJECT (dtsdec, "marking DISCONT"); + GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DISCONT); + dtsdec->discont = FALSE; + } + + if (dtsdec->segment.rate > 0.0) { + GST_DEBUG_OBJECT (dtsdec, + "Pushing buffer with ts %" GST_TIME_FORMAT " duration %" + GST_TIME_FORMAT, GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)), + GST_TIME_ARGS (GST_BUFFER_DURATION (buf))); + + result = gst_pad_push (srcpad, buf); + } else { + /* reverse playback, queue frame till later when we get a discont. */ + GST_DEBUG_OBJECT (dtsdec, "queued frame"); + dtsdec->queued = g_list_prepend (dtsdec->queued, buf); + } + } + return result; +} + static gboolean gst_dtsdec_renegotiate (GstDtsDec * dts) { @@ -360,32 +467,57 @@ gst_dtsdec_sink_event (GstPad * pad, GstEvent * event) switch (GST_EVENT_TYPE (event)) { case GST_EVENT_NEWSEGMENT:{ GstFormat format; - gint64 val; - - gst_event_parse_new_segment (event, NULL, NULL, &format, &val, NULL, - NULL); - if (format != GST_FORMAT_TIME || !GST_CLOCK_TIME_IS_VALID (val)) { - GST_WARNING ("No time in newsegment event %p", event); + gboolean update; + gint64 start, end, pos; + gdouble rate; + + gst_event_parse_new_segment (event, &update, &rate, &format, &start, &end, + &pos); + + /* drain queued buffers before activating the segment so that we can clip + * against the old segment first */ + gst_dtsdec_drain (dtsdec); + + if (format != GST_FORMAT_TIME || !GST_CLOCK_TIME_IS_VALID (start)) { + GST_WARNING ("No time in newsegment event %p (format is %s)", + event, gst_format_get_name (format)); + gst_event_unref (event); + dtsdec->sent_segment = FALSE; + /* set some dummy values, FIXME: do proper conversion */ + dtsdec->time = start = pos = 0; + format = GST_FORMAT_TIME; + end = -1; } else { - dtsdec->current_ts = val; + dtsdec->time = start; + dtsdec->sent_segment = TRUE; + ret = gst_pad_push_event (dtsdec->srcpad, event); } - if (dtsdec->cache) { - gst_buffer_unref (dtsdec->cache); - dtsdec->cache = NULL; - } - ret = gst_pad_event_default (pad, event); + gst_segment_set_newsegment (&dtsdec->segment, update, rate, format, start, + end, pos); break; } + case GST_EVENT_TAG: + ret = gst_pad_push_event (dtsdec->srcpad, event); + break; + case GST_EVENT_EOS: + gst_dtsdec_drain (dtsdec); + ret = gst_pad_push_event (dtsdec->srcpad, event); + break; + case GST_EVENT_FLUSH_START: + ret = gst_pad_push_event (dtsdec->srcpad, event); + break; case GST_EVENT_FLUSH_STOP: if (dtsdec->cache) { gst_buffer_unref (dtsdec->cache); dtsdec->cache = NULL; } - ret = gst_pad_event_default (pad, event); + clear_queued (dtsdec); + gst_segment_init (&dtsdec->segment, GST_FORMAT_UNDEFINED); + ret = gst_pad_push_event (dtsdec->srcpad, event); break; default: - ret = gst_pad_event_default (pad, event); + ret = gst_pad_push_event (dtsdec->srcpad, event); break; } @@ -393,24 +525,6 @@ gst_dtsdec_sink_event (GstPad * pad, GstEvent * event) return ret; } -static gboolean -gst_dtsdec_sink_setcaps (GstPad * pad, GstCaps * caps) -{ - GstDtsDec *dts = GST_DTSDEC (gst_pad_get_parent (pad)); - GstStructure *structure; - - structure = gst_caps_get_structure (caps, 0); - - if (structure && gst_structure_has_name (structure, "audio/x-private1-dts")) - dts->dvdmode = TRUE; - else - dts->dvdmode = FALSE; - - gst_object_unref (dts); - - return TRUE; -} - static void gst_dtsdec_update_streaminfo (GstDtsDec * dts) { @@ -419,6 +533,7 @@ gst_dtsdec_update_streaminfo (GstDtsDec * dts) taglist = gst_tag_list_new (); gst_tag_list_add (taglist, GST_TAG_MERGE_APPEND, + GST_TAG_AUDIO_CODEC, "DTS DCA", GST_TAG_BITRATE, (guint) dts->bit_rate, NULL); gst_element_found_tags_for_pad (GST_ELEMENT (dts), dts->srcpad, taglist); @@ -428,29 +543,37 @@ static GstFlowReturn gst_dtsdec_handle_frame (GstDtsDec * dts, guint8 * data, guint length, gint flags, gint sample_rate, gint bit_rate) { + gint channels, i, num_blocks; gboolean need_renegotiation = FALSE; - gint channels, num_blocks; - GstBuffer *out; - gint i, s, c, num_c; - sample_t *samples; - GstFlowReturn result = GST_FLOW_OK; - /* go over stream properties, update caps/streaminfo if needed */ + /* go over stream properties, renegotiate or update streaminfo if needed */ if (dts->sample_rate != sample_rate) { need_renegotiation = TRUE; dts->sample_rate = sample_rate; } - dts->stream_channels = flags; + if (flags) { + dts->stream_channels = flags & (DCA_CHANNEL_MASK | DCA_LFE); + } if (bit_rate != dts->bit_rate) { dts->bit_rate = bit_rate; gst_dtsdec_update_streaminfo (dts); } - if (dts->request_channels == DCA_CHANNEL) { + /* If we haven't had an explicit number of channels chosen through properties + * at this point, choose what to downmix to now, based on what the peer will + * accept - this allows a52dec to do downmixing in preference to a + * downstream element such as audioconvert. + * FIXME: Add the property back in for forcing output channels. + */ + if (dts->request_channels != DCA_CHANNEL) { + flags = dts->request_channels; + } else if (dts->flag_update) { GstCaps *caps; + dts->flag_update = FALSE; + caps = gst_pad_get_allowed_caps (dts->srcpad); if (caps && gst_caps_get_size (caps) > 0) { GstCaps *copy = gst_caps_copy_nth (caps, 0); @@ -472,38 +595,38 @@ gst_dtsdec_handle_frame (GstDtsDec * dts, guint8 * data, flags ? gst_dtsdec_channels (flags, NULL) : 6); gst_structure_get_int (structure, "channels", &channels); if (channels <= 6) - dts->request_channels = dts_channels[channels - 1]; + flags = dts_channels[channels - 1]; else - dts->request_channels = dts_channels[5]; + flags = dts_channels[5]; gst_caps_unref (copy); } else if (flags) { - dts->request_channels = dts->stream_channels; + flags = dts->stream_channels; } else { - dts->request_channels = DCA_3F2R | DCA_LFE; + flags = DCA_3F2R | DCA_LFE; } if (caps) gst_caps_unref (caps); + } else { + flags = dts->using_channels; } - /* process */ - flags = dts->request_channels | DCA_ADJUST_LEVEL; + flags |= DCA_ADJUST_LEVEL; dts->level = 1; - if (dca_frame (dts->state, data, &flags, &dts->level, dts->bias)) { - GST_WARNING ("dts_frame error"); + GST_WARNING_OBJECT (dts, "dts_frame error"); + dts->discont = TRUE; return GST_FLOW_OK; } - channels = flags & (DCA_CHANNEL_MASK | DCA_LFE); - if (dts->using_channels != channels) { need_renegotiation = TRUE; dts->using_channels = channels; } - if (need_renegotiation == TRUE) { + /* negotiate if required */ + if (need_renegotiation) { GST_DEBUG ("dtsdec: sample_rate:%d stream_chans:0x%x using_chans:0x%x", dts->sample_rate, dts->stream_channels, dts->using_channels); if (!gst_dtsdec_renegotiate (dts)) { @@ -520,107 +643,60 @@ gst_dtsdec_handle_frame (GstDtsDec * dts, guint8 * data, num_blocks = dca_blocks_num (dts->state); for (i = 0; i < num_blocks; i++) { if (dca_block (dts->state)) { - GST_WARNING ("dts_block error %d", i); - continue; - } - - samples = dca_samples (dts->state); - num_c = gst_dtsdec_channels (dts->using_channels, NULL); - - result = gst_pad_alloc_buffer_and_set_caps (dts->srcpad, 0, - (SAMPLE_WIDTH / 8) * 256 * num_c, GST_PAD_CAPS (dts->srcpad), &out); - - if (result != GST_FLOW_OK) - break; + /* Ignore errors, but mark a discont */ + GST_WARNING_OBJECT (dts, "dts_block error %d", i); + dts->discont = TRUE; + } else { + GstFlowReturn ret; - GST_BUFFER_TIMESTAMP (out) = dts->current_ts; - GST_BUFFER_DURATION (out) = GST_SECOND * 256 / dts->sample_rate; - dts->current_ts += GST_BUFFER_DURATION (out); - - /* libdts returns buffers in 256-sample-blocks per channel, - * we want interleaved. And we need to copy anyway... */ - data = GST_BUFFER_DATA (out); - for (s = 0; s < 256; s++) { - for (c = 0; c < num_c; c++) { - *(sample_t *) data = samples[s + c * 256]; - data += (SAMPLE_WIDTH / 8); - } + /* push on */ + ret = gst_dtsdec_push (dts, dts->srcpad, dts->using_channels, + dts->samples, dts->time); + if (ret != GST_FLOW_OK) + return ret; } - - /* push on */ - result = gst_pad_push (dts->srcpad, out); - - if (result != GST_FLOW_OK) - break; + dts->time += GST_SECOND * 256 / dts->sample_rate; } - return result; + return GST_FLOW_OK; } -static GstFlowReturn -gst_dtsdec_chain_raw (GstPad * pad, GstBuffer * buf) +static gboolean +gst_dtsdec_sink_setcaps (GstPad * pad, GstCaps * caps) { - GstDtsDec *dts; - guint8 *data; - gint size; - gint length, flags, sample_rate, bit_rate, frame_length; - GstFlowReturn result = GST_FLOW_OK; - - dts = GST_DTSDEC (GST_PAD_PARENT (pad)); - - if (dts->cache) { - buf = gst_buffer_join (dts->cache, buf); - dts->cache = NULL; - } + GstDtsDec *dts = GST_DTSDEC (gst_pad_get_parent (pad)); + GstStructure *structure; - data = GST_BUFFER_DATA (buf); - size = GST_BUFFER_SIZE (buf); - length = 0; - while (size >= 7) { - length = dca_syncinfo (dts->state, data, &flags, - &sample_rate, &bit_rate, &frame_length); - if (length == 0) { - /* shift window to re-find sync */ - data++; - size--; - } else if (length <= size) { - GST_DEBUG ("Sync: frame size %d", length); - result = gst_dtsdec_handle_frame (dts, data, length, - flags, sample_rate, bit_rate); - if (result != GST_FLOW_OK) { - size = 0; - break; - } - size -= length; - data += length; - } else { - GST_LOG ("Not enough data available (needed %d had %d)", length, size); - break; - } - } + structure = gst_caps_get_structure (caps, 0); - /* keep cache */ - if (length == 0) { - GST_LOG ("No sync found"); - } - if (size > 0) { - dts->cache = gst_buffer_create_sub (buf, - GST_BUFFER_SIZE (buf) - size, size); - } + if (structure && gst_structure_has_name (structure, "audio/x-private1-dts")) + dts->dvdmode = TRUE; + else + dts->dvdmode = FALSE; - gst_buffer_unref (buf); + gst_object_unref (dts); - return result; + return TRUE; } - static GstFlowReturn gst_dtsdec_chain (GstPad * pad, GstBuffer * buf) { - GstFlowReturn res = GST_FLOW_OK; + GstFlowReturn ret = GST_FLOW_OK; GstDtsDec *dts = GST_DTSDEC (GST_PAD_PARENT (pad)); gint first_access; + if (GST_BUFFER_IS_DISCONT (buf)) { + GST_LOG_OBJECT (dts, "received DISCONT"); + gst_dtsdec_drain (dts); + /* clear cache on discont and mark a discont in the element */ + if (dts->cache) { + gst_buffer_unref (dts->cache); + dts->cache = NULL; + } + dts->discont = TRUE; + } + if (dts->dvdmode) { gint size = GST_BUFFER_SIZE (buf); guint8 *data = GST_BUFFER_DATA (buf); @@ -644,8 +720,8 @@ gst_dtsdec_chain (GstPad * pad, GstBuffer * buf) subbuf = gst_buffer_create_sub (buf, offset, len); GST_BUFFER_TIMESTAMP (subbuf) = GST_CLOCK_TIME_NONE; - res = gst_dtsdec_chain_raw (pad, subbuf); - if (res != GST_FLOW_OK) + ret = gst_dtsdec_chain_raw (pad, subbuf); + if (ret != GST_FLOW_OK) goto done; offset += len; @@ -655,21 +731,20 @@ gst_dtsdec_chain (GstPad * pad, GstBuffer * buf) subbuf = gst_buffer_create_sub (buf, offset, len); GST_BUFFER_TIMESTAMP (subbuf) = GST_BUFFER_TIMESTAMP (buf); - res = gst_dtsdec_chain_raw (pad, subbuf); + ret = gst_dtsdec_chain_raw (pad, subbuf); } } else { - /* first_access = 0 or 1, so if there's a timestamp it applies - * to the first byte */ + /* first_access = 0 or 1, so if there's a timestamp it applies to the first byte */ subbuf = gst_buffer_create_sub (buf, offset, size - offset); GST_BUFFER_TIMESTAMP (subbuf) = GST_BUFFER_TIMESTAMP (buf); - res = gst_dtsdec_chain_raw (pad, subbuf); + ret = gst_dtsdec_chain_raw (pad, subbuf); } } else { - res = gst_dtsdec_chain_raw (pad, buf); + ret = gst_dtsdec_chain_raw (pad, buf); } done: - return res; + return ret; /* ERRORS */ not_enough_data: @@ -684,7 +759,97 @@ bad_first_access_parameter: ("Bad first_access parameter (%d) in buffer", first_access)); return GST_FLOW_ERROR; } +} + +static GstFlowReturn +gst_dtsdec_chain_raw (GstPad * pad, GstBuffer * buf) +{ + GstDtsDec *dts; + guint8 *data; + gint size; + gint length = 0, flags, sample_rate, bit_rate, frame_length; + GstFlowReturn result = GST_FLOW_OK; + + dts = GST_DTSDEC (GST_PAD_PARENT (pad)); + + if (!dts->sent_segment) { + GstSegment segment; + + /* Create a basic segment. Usually, we'll get a new-segment sent by + * another element that will know more information (a demuxer). If we're + * just looking at a raw AC3 stream, we won't - so we need to send one + * here, but we don't know much info, so just send a minimal TIME + * new-segment event + */ + gst_segment_init (&segment, GST_FORMAT_TIME); + gst_pad_push_event (dts->srcpad, gst_event_new_new_segment (FALSE, + segment.rate, segment.format, segment.start, + segment.duration, segment.start)); + dts->sent_segment = TRUE; + } + + /* merge with cache, if any. Also make sure timestamps match */ + if (GST_BUFFER_TIMESTAMP_IS_VALID (buf)) { + dts->time = GST_BUFFER_TIMESTAMP (buf); + GST_DEBUG_OBJECT (dts, + "Received buffer with ts %" GST_TIME_FORMAT " duration %" + GST_TIME_FORMAT, GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)), + GST_TIME_ARGS (GST_BUFFER_DURATION (buf))); + } + + if (dts->cache) { + buf = gst_buffer_join (dts->cache, buf); + dts->cache = NULL; + } + data = GST_BUFFER_DATA (buf); + size = GST_BUFFER_SIZE (buf); + + /* find and read header */ + bit_rate = dts->bit_rate; + sample_rate = dts->sample_rate; + flags = 0; + while (size >= 7) { + length = dca_syncinfo (dts->state, data, &flags, + &sample_rate, &bit_rate, &frame_length); + + if (length == 0) { + /* shift window to re-find sync */ + data++; + size--; + } else if (length <= size) { + GST_DEBUG ("Sync: frame size %d", length); + if (flags != dts->prev_flags) + dts->flag_update = TRUE; + dts->prev_flags = flags; + + result = gst_dtsdec_handle_frame (dts, data, length, + flags, sample_rate, bit_rate); + if (result != GST_FLOW_OK) { + size = 0; + break; + } + size -= length; + data += length; + } else { + GST_LOG ("Not enough data available (needed %d had %d)", length, size); + break; + } + } + + /* keep cache */ + if (length == 0) { + GST_LOG ("No sync found"); + } + + if (size > 0) { + dts->cache = gst_buffer_create_sub (buf, + GST_BUFFER_SIZE (buf) - size, size); + } + + gst_buffer_unref (buf); + + return result; } static GstStateChangeReturn @@ -705,13 +870,14 @@ gst_dtsdec_change_state (GstElement * element, GstStateChange transition) dts->samples = dca_samples (dts->state); dts->bit_rate = -1; dts->sample_rate = -1; - dts->stream_channels = 0; - /* FIXME force stereo for now */ - dts->request_channels = DCA_CHANNEL; - dts->using_channels = 0; + dts->stream_channels = DCA_CHANNEL; + dts->using_channels = DCA_CHANNEL; dts->level = 1; dts->bias = 0; - dts->current_ts = 0; + dts->time = 0; + dts->sent_segment = FALSE; + dts->flag_update = TRUE; + gst_segment_init (&dts->segment, GST_FORMAT_UNDEFINED); break; case GST_STATE_CHANGE_PAUSED_TO_PLAYING: break; @@ -730,6 +896,7 @@ gst_dtsdec_change_state (GstElement * element, GstStateChange transition) gst_buffer_unref (dts->cache); dts->cache = NULL; } + clear_queued (dts); break; case GST_STATE_CHANGE_READY_TO_NULL: dca_free (dts->state); diff --git a/ext/dts/gstdtsdec.h b/ext/dts/gstdtsdec.h index 5222c687..a7c8f718 100644 --- a/ext/dts/gstdtsdec.h +++ b/ext/dts/gstdtsdec.h @@ -43,15 +43,22 @@ struct _GstDtsDec { GstElement element; /* pads */ - GstPad *sinkpad; - GstPad *srcpad; + GstPad *sinkpad; + GstPad *srcpad; + GstSegment segment; + + gboolean dvdmode; + gboolean sent_segment; + gboolean discont; + gboolean flag_update; + gboolean prev_flags; /* stream properties */ - gint bit_rate; - gint sample_rate; - gint stream_channels; - gint request_channels; - gint using_channels; + gint bit_rate; + gint sample_rate; + gint stream_channels; + gint request_channels; + gint using_channels; /* decoding properties */ sample_t level; @@ -63,13 +70,14 @@ struct _GstDtsDec { #else dts_state_t *state; #endif - gboolean dvdmode; + /* Data left over from the previous buffer */ - GstBuffer *cache; - - /* keep track of time */ - GstClockTime current_ts; + GstBuffer *cache; + GstClockTime time; + + /* reverse playback */ + GList *queued; }; struct _GstDtsDecClass { -- cgit v1.2.1 From ab80a4fa411e85380ee5da3e7f7abc1553053628 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Fri, 22 May 2009 00:16:19 +0200 Subject: rtpbin: Implement releasing of rtcp src pad See #561752 --- gst/rtpmanager/gstrtpbin.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c index 7d3b9823..4db28f73 100644 --- a/gst/rtpmanager/gstrtpbin.c +++ b/gst/rtpmanager/gstrtpbin.c @@ -2338,8 +2338,13 @@ pad_failed: static void remove_rtcp (GstRtpBin * rtpbin, GstRtpBinSession * session, GstPad * pad) { - g_warning ("gstrtpbin: releasing pad %s:%s is not implemented", - GST_DEBUG_PAD_NAME (pad)); + gst_pad_set_active (pad, FALSE); + gst_element_remove_pad (GST_ELEMENT (rtpbin), pad); + + if (session->send_rtcp_src) { + gst_element_release_request_pad (session->session, session->send_rtcp_src); + session->send_rtcp_src = NULL; + } } /* If the requested name is NULL we should create a name with -- cgit v1.2.1 From b831c9b434046ea7e8c6cc757607c67f7f7656dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Fri, 22 May 2009 00:34:36 +0200 Subject: rtpbin: Implement release of the recv rtcp pad See #561752 --- gst/rtpmanager/gstrtpbin.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c index 4db28f73..b4e61ac2 100644 --- a/gst/rtpmanager/gstrtpbin.c +++ b/gst/rtpmanager/gstrtpbin.c @@ -2176,8 +2176,18 @@ link_failed: static void remove_recv_rtcp (GstRtpBin * rtpbin, GstRtpBinSession * session, GstPad * pad) { - g_warning ("gstrtpbin: releasing pad %s:%s is not implemented", - GST_DEBUG_PAD_NAME (pad)); + gst_pad_set_active (pad, FALSE); + gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin), pad); + + if (session->sync_src) { + /* releasing the request pad should also unref the sync pad */ + gst_object_unref (session->sync_src); + session->sync_src = NULL; + } + if (session->recv_rtcp_sink) { + gst_element_release_request_pad (session->session, session->recv_rtcp_sink); + session->recv_rtcp_sink = NULL; + } } /* Create a pad for sending RTP for the session in @name. Must be called with @@ -2339,7 +2349,7 @@ static void remove_rtcp (GstRtpBin * rtpbin, GstRtpBinSession * session, GstPad * pad) { gst_pad_set_active (pad, FALSE); - gst_element_remove_pad (GST_ELEMENT (rtpbin), pad); + gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin), pad); if (session->send_rtcp_src) { gst_element_release_request_pad (session->session, session->send_rtcp_src); -- cgit v1.2.1 From 65d55e6b13c41f3ca6ff5e4e39fbd7ec990e8d0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Fri, 22 May 2009 00:44:51 +0200 Subject: rtpbin: Implement releasing of rtp send pads --- gst/rtpmanager/gstrtpbin.c | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c index b4e61ac2..a1411e10 100644 --- a/gst/rtpmanager/gstrtpbin.c +++ b/gst/rtpmanager/gstrtpbin.c @@ -348,6 +348,7 @@ struct _GstRtpBinSession GstPad *sync_src; GstPad *send_rtp_sink; GstPad *send_rtp_src; + GstPad *send_rtp_src_ghost; GstPad *send_rtcp_src; }; @@ -2196,7 +2197,7 @@ remove_recv_rtcp (GstRtpBin * rtpbin, GstRtpBinSession * session, GstPad * pad) static GstPad * create_send_rtp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name) { - GstPad *result, *srcghost; + GstPad *result; gchar *gname; guint sessid; GstRtpBinSession *session; @@ -2240,10 +2241,10 @@ create_send_rtp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name) klass = GST_ELEMENT_GET_CLASS (rtpbin); gname = g_strdup_printf ("send_rtp_src_%d", sessid); templ = gst_element_class_get_pad_template (klass, "send_rtp_src_%d"); - srcghost = + session->send_rtp_src_ghost = gst_ghost_pad_new_from_template (gname, session->send_rtp_src, templ); - gst_pad_set_active (srcghost, TRUE); - gst_element_add_pad (GST_ELEMENT_CAST (rtpbin), srcghost); + gst_pad_set_active (session->send_rtp_src_ghost, TRUE); + gst_element_add_pad (GST_ELEMENT_CAST (rtpbin), session->send_rtp_src_ghost); g_free (gname); return result; @@ -2281,8 +2282,26 @@ no_srcpad: static void remove_send_rtp (GstRtpBin * rtpbin, GstRtpBinSession * session, GstPad * pad) { - g_warning ("gstrtpbin: releasing pad %s:%s is not implemented", - GST_DEBUG_PAD_NAME (pad)); + if (session->send_rtp_src_ghost) { + gst_pad_set_active (session->send_rtp_src_ghost, FALSE); + gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin), + session->send_rtp_src_ghost); + session->send_rtp_src_ghost = NULL; + } + + if (session->send_rtp_src) { + gst_object_unref (session->send_rtp_src); + session->send_rtp_src = NULL; + } + + if (session->send_rtp_sink) { + gst_element_release_request_pad (GST_ELEMENT_CAST (session->session), + session->send_rtp_sink); + session->send_rtp_sink = NULL; + } + + gst_pad_set_active (pad, FALSE); + gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin), pad); } /* Create a pad for sending RTCP for the session in @name. Must be called with -- cgit v1.2.1 From 4424fd3c93ab2f2b9590a3b0c461c16d01f8a00a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Fri, 22 May 2009 00:51:53 +0200 Subject: rtpbin: Implement relasing of the rtp recv pad --- gst/rtpmanager/gstrtpbin.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c index a1411e10..075776ee 100644 --- a/gst/rtpmanager/gstrtpbin.c +++ b/gst/rtpmanager/gstrtpbin.c @@ -2081,8 +2081,23 @@ link_failed: static void remove_recv_rtp (GstRtpBin * rtpbin, GstRtpBinSession * session, GstPad * pad) { - g_warning ("gstrtpbin: releasing pad %s:%s is not implemented", - GST_DEBUG_PAD_NAME (pad)); + if (session->demux_newpad_sig) { + g_signal_handler_disconnect (session->demux, session->demux_newpad_sig); + session->demux_newpad_sig = 0; + } + + if (session->recv_rtp_src) { + gst_object_unref (session->recv_rtp_src); + session->recv_rtp_src = NULL; + } + + if (session->recv_rtp_sink) { + gst_element_release_request_pad (session->session, session->recv_rtp_sink); + session->recv_rtp_sink = NULL; + } + + gst_pad_set_active (pad, FALSE); + gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin), pad); } /* Create a pad for receiving RTCP for the session in @name. Must be called with -- cgit v1.2.1 From fb59348dbe0dfd5b6cb0596a031e5c437265e85d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Fri, 22 May 2009 01:03:55 +0200 Subject: rtpbin: Free session if request pads are released Free the session when all the request pads are released. Don't mess with the session list in free_session as it is called from a foreach on that list. Set the state of the upstream element to NULL first. See #561752 --- gst/rtpmanager/gstrtpbin.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c index 075776ee..11cc2dd9 100644 --- a/gst/rtpmanager/gstrtpbin.c +++ b/gst/rtpmanager/gstrtpbin.c @@ -554,8 +554,8 @@ free_session (GstRtpBinSession * sess) GST_DEBUG_OBJECT (bin, "freeing session %p", sess); - gst_element_set_state (sess->session, GST_STATE_NULL); gst_element_set_state (sess->demux, GST_STATE_NULL); + gst_element_set_state (sess->session, GST_STATE_NULL); if (sess->recv_rtp_sink != NULL) { gst_element_release_request_pad (sess->session, sess->recv_rtp_sink); @@ -589,8 +589,6 @@ free_session (GstRtpBinSession * sess) g_mutex_free (sess->lock); g_hash_table_destroy (sess->ptmap); - bin->sessions = g_slist_remove (bin->sessions, sess); - g_free (sess); } @@ -2512,6 +2510,13 @@ gst_rtp_bin_release_pad (GstElement * element, GstPad * pad) } else if (session->send_rtcp_src == target) { remove_rtcp (rtpbin, session, pad); } + + /* no more request pads, free the complete session */ + if (session->recv_rtp_sink == NULL && session->recv_rtcp_sink == NULL && + session->send_rtp_sink == NULL && session->send_rtcp_src == NULL) { + rtpbin->sessions = g_slist_remove (rtpbin->sessions, session); + free_session (session); + } GST_RTP_BIN_UNLOCK (rtpbin); gst_object_unref (target); -- cgit v1.2.1 From b3aeee2bf281225495b09216ec3d796e6330c9e1 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 22 May 2009 01:12:57 +0200 Subject: rtpbin: use the right lock for the sessions Use the right lock when iterating the sessions. --- gst/rtpmanager/gstrtpbin.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c index 11cc2dd9..9ab50888 100644 --- a/gst/rtpmanager/gstrtpbin.c +++ b/gst/rtpmanager/gstrtpbin.c @@ -1555,6 +1555,8 @@ gst_rtp_bin_set_sdes_string (GstRtpBin * bin, GstRTCPSDESType type, if (type < 0 || type > 8) return; + GST_RTP_BIN_LOCK (bin); + GST_OBJECT_LOCK (bin); g_free (bin->sdes[type]); bin->sdes[type] = g_strdup (data); @@ -1563,6 +1565,8 @@ gst_rtp_bin_set_sdes_string (GstRtpBin * bin, GstRTCPSDESType type, for (item = bin->sessions; item; item = g_slist_next (item)) g_object_set (item->data, name, bin->sdes[type], NULL); GST_OBJECT_UNLOCK (bin); + + GST_RTP_BIN_UNLOCK (bin); } static gchar * -- cgit v1.2.1 From 451ca5dbc059b369de56cf1a8906f5bd5dc89943 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Fri, 22 May 2009 01:16:11 +0200 Subject: rtpbin: Keep jb signals handler Keep the signal handlers so they can be disconnected at release time See #561752 --- gst/rtpmanager/gstrtpbin.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c index 9ab50888..977fd787 100644 --- a/gst/rtpmanager/gstrtpbin.c +++ b/gst/rtpmanager/gstrtpbin.c @@ -297,6 +297,9 @@ struct _GstRtpBinStream /* the jitterbuffer of the SSRC */ GstElement *buffer; + gulong buffer_handlesync_sig; + gulong buffer_ptreq_sig; + gulong buffer_ntpstop_sig; /* the PT demuxer of the SSRC */ GstElement *demux; @@ -1096,9 +1099,10 @@ create_stream (GstRtpBinSession * session, guint32 ssrc) session->streams = g_slist_prepend (session->streams, stream); /* provide clock_rate to the jitterbuffer when needed */ - g_signal_connect (buffer, "request-pt-map", + stream->buffer_ptreq_sig = g_signal_connect (buffer, "request-pt-map", (GCallback) pt_map_requested, session); - g_signal_connect (buffer, "on-npt-stop", (GCallback) on_npt_stop, stream); + stream->buffer_ntpstop_sig = g_signal_connect (buffer, "on-npt-stop", + (GCallback) on_npt_stop, stream); /* configure latency and packet lost */ g_object_set (buffer, "latency", session->bin->latency, NULL); @@ -1950,7 +1954,7 @@ new_ssrc_pad_found (GstElement * element, guint ssrc, GstPad * pad, /* connect to the RTCP sync signal from the jitterbuffer */ GST_DEBUG_OBJECT (rtpbin, "connecting sync signal"); - g_signal_connect (stream->buffer, + stream->buffer_handlesync_sig = g_signal_connect (stream->buffer, "handle-sync", (GCallback) gst_rtp_bin_handle_sync, stream); /* connect to the new-pad signal of the payload demuxer, this will expose the -- cgit v1.2.1 From c5ab83a1cbfb5cae17717a3fe08d9f339181d813 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Fri, 22 May 2009 01:43:50 +0200 Subject: rtpbin: Implement releasing the streams See #561752 --- gst/rtpmanager/gstrtpbin.c | 74 +++++++++++++++++++++++++++++++++------------- 1 file changed, 53 insertions(+), 21 deletions(-) diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c index 977fd787..7e14a0d9 100644 --- a/gst/rtpmanager/gstrtpbin.c +++ b/gst/rtpmanager/gstrtpbin.c @@ -335,6 +335,7 @@ struct _GstRtpBinSession /* the SSRC demuxer */ GstElement *demux; gulong demux_newpad_sig; + gulong demux_padremoved_sig; GMutex *lock; @@ -471,6 +472,45 @@ on_npt_stop (GstElement * jbuf, GstRtpBinStream * stream) stream->session->id, stream->ssrc); } +/* must be called with the SESSION lock */ +static GstRtpBinStream * +find_stream_by_ssrc (GstRtpBinSession * session, guint32 ssrc) +{ + GSList *walk; + + for (walk = session->streams; walk; walk = g_slist_next (walk)) { + GstRtpBinStream *stream = (GstRtpBinStream *) walk->data; + + if (stream->ssrc == ssrc) + return stream; + } + return NULL; +} + +static void +ssrc_demux_pad_removed (GstElement * element, GstPad * pad, + GstRtpBinSession * session) +{ + guint ssrc; + GstRtpBinStream *stream = NULL; + gchar *name; + gint res; + + name = gst_pad_get_name (pad); + res = sscanf (name, "src_%d", &ssrc); + g_free (name); + + if (res != 1) + return; + + GST_RTP_SESSION_LOCK (session); + if ((stream = find_stream_by_ssrc (session, ssrc))) { + session->streams = g_slist_remove (session->streams, stream); + free_stream (stream); + } + GST_RTP_SESSION_UNLOCK (session); +} + /* create a session with the given id. Must be called with RTP_BIN_LOCK */ static GstRtpBinSession * create_session (GstRtpBin * rtpbin, gint id) @@ -595,22 +635,6 @@ free_session (GstRtpBinSession * sess) g_free (sess); } -#if 0 -static GstRtpBinStream * -find_stream_by_ssrc (GstRtpBinSession * session, guint32 ssrc) -{ - GSList *walk; - - for (walk = session->streams; walk; walk = g_slist_next (walk)) { - GstRtpBinStream *stream = (GstRtpBinStream *) walk->data; - - if (stream->ssrc == ssrc) - return stream; - } - return NULL; -} -#endif - /* get the payload type caps for the specific payload @pt in @session */ static GstCaps * get_pt_map (GstRtpBinSession * session, guint pt) @@ -1139,14 +1163,18 @@ free_stream (GstRtpBinStream * stream) session = stream->session; - gst_element_set_state (stream->buffer, GST_STATE_NULL); + g_signal_handler_disconnect (stream->demux, stream->demux_newpad_sig); + g_signal_handler_disconnect (stream->demux, stream->demux_ptreq_sig); + g_signal_handler_disconnect (stream->buffer, stream->buffer_handlesync_sig); + g_signal_handler_disconnect (stream->buffer, stream->buffer_ptreq_sig); + g_signal_handler_disconnect (stream->buffer, stream->buffer_ntpstop_sig); + gst_element_set_state (stream->demux, GST_STATE_NULL); + gst_element_set_state (stream->buffer, GST_STATE_NULL); gst_bin_remove (GST_BIN_CAST (session->bin), stream->buffer); gst_bin_remove (GST_BIN_CAST (session->bin), stream->demux); - session->streams = g_slist_remove (session->streams, stream); - g_free (stream); } @@ -2046,6 +2074,8 @@ create_recv_rtp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name) /* connect to the new-ssrc-pad signal of the SSRC demuxer */ session->demux_newpad_sig = g_signal_connect (session->demux, "new-ssrc-pad", (GCallback) new_ssrc_pad_found, session); + session->demux_padremoved_sig = g_signal_connect (session->demux, + "pad-removed", (GCallback) ssrc_demux_pad_removed, session); GST_DEBUG_OBJECT (rtpbin, "ghosting session sink pad"); result = @@ -2091,12 +2121,14 @@ remove_recv_rtp (GstRtpBin * rtpbin, GstRtpBinSession * session, GstPad * pad) g_signal_handler_disconnect (session->demux, session->demux_newpad_sig); session->demux_newpad_sig = 0; } - + if (session->demux_padremoved_sig) { + g_signal_handler_disconnect (session->demux, session->demux_padremoved_sig); + session->demux_padremoved_sig = 0; + } if (session->recv_rtp_src) { gst_object_unref (session->recv_rtp_src); session->recv_rtp_src = NULL; } - if (session->recv_rtp_sink) { gst_element_release_request_pad (session->session, session->recv_rtp_sink); session->recv_rtp_sink = NULL; -- cgit v1.2.1 From 27f1e03661e2e9fb0862ccdf18b100c89481a718 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Fri, 22 May 2009 01:04:02 +0100 Subject: m4: fix 'suspicious cache value id' warnings in gst-fionread.m4 And update common to pull in a related fix from there. --- common | 2 +- m4/gst-fionread.m4 | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/common b/common index 6ab11d17..888e0a26 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 6ab11d17cb8e4d1ed755da7accac9630d567a097 +Subproject commit 888e0a268b60904dd208b672a3c57f1ff7d9786c diff --git a/m4/gst-fionread.m4 b/m4/gst-fionread.m4 index dff19df9..603aa457 100644 --- a/m4/gst-fionread.m4 +++ b/m4/gst-fionread.m4 @@ -1,7 +1,7 @@ AC_DEFUN([GST_CHECK_FIONREAD], [ AC_MSG_CHECKING(for FIONREAD in sys/ioctl.h) - AC_CACHE_VAL(GST_FIONREAD_IN_SYS_IOCTL, [ + AC_CACHE_VAL(_cv_gst_fionread_in_sys_ioctl, [ AC_TRY_COMPILE([ #include #include @@ -9,18 +9,18 @@ AC_DEFUN([GST_CHECK_FIONREAD], [ int x = FIONREAD; if ( x ) return 0; - ], GST_FIONREAD_IN_SYS_IOCTL="yes",GST_FIONREAD_IN_SYS_IOCTL="no") + ], _cv_gst_fionread_in_sys_ioctl="yes",_cv_gst_fionread_in_sys_ioctl="no") ]) - AC_MSG_RESULT($GST_FIONREAD_IN_SYS_IOCTL) + AC_MSG_RESULT($_cv_gst_fionread_in_sys_ioctl) - if test "$GST_FIONREAD_IN_SYS_IOCTL" = "yes"; then + if test "$_cv_gst_fionread_in_sys_ioctl" = "yes"; then AC_DEFINE([HAVE_FIONREAD_IN_SYS_IOCTL], 1, [FIONREAD ioctl found in sys/ioclt.h]) else AC_MSG_CHECKING(for FIONREAD in sys/filio.h) - AC_CACHE_VAL(GST_FIONREAD_IN_SYS_FILIO, [ + AC_CACHE_VAL(_cv_gst_fionread_in_sys_filio, [ AC_TRY_COMPILE([ #include #include @@ -28,12 +28,12 @@ if ( x ) int x = FIONREAD; if ( x ) return 0; - ], GST_FIONREAD_IN_SYS_FILIO="yes",GST_FIONREAD_IN_SYS_FILIO="no") + ], _cv_gst_fionread_in_sys_filio="yes",_cv_gst_fionread_in_sys_filio="no") ]) - AC_MSG_RESULT($GST_FIONREAD_IN_SYS_FILIO) + AC_MSG_RESULT($_cv_gst_fionread_in_sys_filio) - if test "$GST_FIONREAD_IN_SYS_FILIO" = "yes"; then + if test "$_cv_gst_fionread_in_sys_filio" = "yes"; then AC_DEFINE([HAVE_FIONREAD_IN_SYS_FILIO], 1, [FIONREAD ioctl found in sys/filio.h]) fi -- cgit v1.2.1 From 02bff8754b34a3d5f596f26c8dd7e83ae356130f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Fri, 22 May 2009 01:27:09 +0100 Subject: id3tag: register GType of the base class with a less generic name .. so we can easily move the base class into -base later without causing GType name conflicts. --- gst/id3tag/gsttagmux.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gst/id3tag/gsttagmux.c b/gst/id3tag/gsttagmux.c index bfa4e1bc..257f82bb 100644 --- a/gst/id3tag/gsttagmux.c +++ b/gst/id3tag/gsttagmux.c @@ -55,7 +55,12 @@ gst_tag_mux_iface_init (GType tag_type) g_type_add_interface_static (tag_type, GST_TYPE_TAG_SETTER, &tag_setter_info); } -GST_BOILERPLATE_FULL (GstTagMux, gst_tag_mux, +/* make sure to register a less generic type so we can easily move this + * GstTagMux base class into -base without causing GType name conflicts */ +typedef GstTagMux GstID3TagMux; +typedef GstTagMuxClass GstID3TagMuxClass; + +GST_BOILERPLATE_FULL (GstID3TagMux, gst_tag_mux, GstElement, GST_TYPE_ELEMENT, gst_tag_mux_iface_init); -- cgit v1.2.1 From ae09a20cd011cc466def485cf8819ba7cf7e5cd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Fri, 22 May 2009 01:29:33 +0100 Subject: win32: update config.h --- win32/common/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win32/common/config.h b/win32/common/config.h index 7b973465..ca6ae1c6 100644 --- a/win32/common/config.h +++ b/win32/common/config.h @@ -24,7 +24,7 @@ #define GST_LICENSE "LGPL" /* package name in plugins */ -#define GST_PACKAGE_NAME "GStreamer Bad Plug-ins CVS/prerelease" +#define GST_PACKAGE_NAME "GStreamer Bad Plug-ins git/prerelease" /* package origin */ #define GST_PACKAGE_ORIGIN "Unknown package origin" -- cgit v1.2.1 From fdaeae57c90ebd1fa001f398be6fec9050129781 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Fri, 22 May 2009 09:51:29 +0100 Subject: id3tag: change GType to GstId3Tag so it doesn't conflict with the id3tag plugin in -ugly --- gst/id3tag/gstid3tag.c | 14 +++++++------- gst/id3tag/gstid3tag.h | 12 ++++++------ gst/id3tag/gsttagmux.c | 6 +++--- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/gst/id3tag/gstid3tag.c b/gst/id3tag/gstid3tag.c index f67d781f..98b05d0d 100644 --- a/gst/id3tag/gstid3tag.c +++ b/gst/id3tag/gstid3tag.c @@ -76,7 +76,7 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_ALWAYS, GST_STATIC_CAPS ("application/x-id3")); -GST_BOILERPLATE (GstID3Tag, gst_id3tag, GstTagMux, GST_TYPE_TAG_MUX); +GST_BOILERPLATE (GstId3Tag, gst_id3tag, GstTagMux, GST_TYPE_TAG_MUX); static GstBuffer *gst_id3tag_render_v2_tag (GstTagMux * mux, GstTagList * taglist); @@ -107,7 +107,7 @@ gst_id3tag_base_init (gpointer g_class) } static void -gst_id3tag_class_init (GstID3TagClass * klass) +gst_id3tag_class_init (GstId3TagClass * klass) { GObjectClass *gobject_class = (GObjectClass *) klass; @@ -137,7 +137,7 @@ gst_id3tag_class_init (GstID3TagClass * klass) } static void -gst_id3tag_init (GstID3Tag * id3mux, GstID3TagClass * id3mux_class) +gst_id3tag_init (GstId3Tag * id3mux, GstId3TagClass * id3mux_class) { id3mux->write_v1 = DEFAULT_WRITE_V1; id3mux->write_v2 = DEFAULT_WRITE_V2; @@ -149,7 +149,7 @@ static void gst_id3tag_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { - GstID3Tag *mux = GST_ID3TAG (object); + GstId3Tag *mux = GST_ID3TAG (object); switch (prop_id) { case ARG_WRITE_V1: @@ -171,7 +171,7 @@ static void gst_id3tag_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { - GstID3Tag *mux = GST_ID3TAG (object); + GstId3Tag *mux = GST_ID3TAG (object); switch (prop_id) { case ARG_WRITE_V1: @@ -192,7 +192,7 @@ gst_id3tag_get_property (GObject * object, guint prop_id, static GstBuffer * gst_id3tag_render_v2_tag (GstTagMux * mux, GstTagList * taglist) { - GstID3Tag *id3mux = GST_ID3TAG (mux); + GstId3Tag *id3mux = GST_ID3TAG (mux); if (id3mux->write_v2) return gst_id3mux_render_v2_tag (mux, taglist, id3mux->v2_major_version); @@ -203,7 +203,7 @@ gst_id3tag_render_v2_tag (GstTagMux * mux, GstTagList * taglist) static GstBuffer * gst_id3tag_render_v1_tag (GstTagMux * mux, GstTagList * taglist) { - GstID3Tag *id3mux = GST_ID3TAG (mux); + GstId3Tag *id3mux = GST_ID3TAG (mux); if (id3mux->write_v1) return gst_id3mux_render_v1_tag (mux, taglist); diff --git a/gst/id3tag/gstid3tag.h b/gst/id3tag/gstid3tag.h index 6b33df25..60643594 100644 --- a/gst/id3tag/gstid3tag.h +++ b/gst/id3tag/gstid3tag.h @@ -28,10 +28,10 @@ G_BEGIN_DECLS -typedef struct _GstID3Tag GstID3Tag; -typedef struct _GstID3TagClass GstID3TagClass; +typedef struct _GstId3Tag GstId3Tag; +typedef struct _GstId3TagClass GstId3TagClass; -struct _GstID3Tag { +struct _GstId3Tag { GstTagMux tagmux; gboolean write_v1; @@ -40,16 +40,16 @@ struct _GstID3Tag { gint v2_major_version; }; -struct _GstID3TagClass { +struct _GstId3TagClass { GstTagMuxClass tagmux_class; }; #define GST_TYPE_ID3TAG \ (gst_id3tag_get_type()) #define GST_ID3TAG(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ID3TAG,GstID3Tag)) + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ID3TAG,GstId3Tag)) #define GST_ID3TAG_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ID3TAG,GstID3TagClass)) + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ID3TAG,GstId3TagClass)) #define GST_IS_ID3TAG(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ID3TAG)) #define GST_IS_ID3TAG_CLASS(klass) \ diff --git a/gst/id3tag/gsttagmux.c b/gst/id3tag/gsttagmux.c index 257f82bb..3b7ff119 100644 --- a/gst/id3tag/gsttagmux.c +++ b/gst/id3tag/gsttagmux.c @@ -57,10 +57,10 @@ gst_tag_mux_iface_init (GType tag_type) /* make sure to register a less generic type so we can easily move this * GstTagMux base class into -base without causing GType name conflicts */ -typedef GstTagMux GstID3TagMux; -typedef GstTagMuxClass GstID3TagMuxClass; +typedef GstTagMux GstId3TagMux; +typedef GstTagMuxClass GstId3TagMuxClass; -GST_BOILERPLATE_FULL (GstID3TagMux, gst_tag_mux, +GST_BOILERPLATE_FULL (GstId3TagMux, gst_tag_mux, GstElement, GST_TYPE_ELEMENT, gst_tag_mux_iface_init); -- cgit v1.2.1 From e5b1c976c4dbbea82d0bc1f0de7c0bf4b6d1705d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Fri, 22 May 2009 09:54:57 +0100 Subject: id3tag: canonicalise function names --- gst/id3tag/gstid3tag.c | 38 +++++++++++++++++++------------------- gst/id3tag/gstid3tag.h | 4 ++-- gst/id3tag/id3tag.c | 4 ++-- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/gst/id3tag/gstid3tag.c b/gst/id3tag/gstid3tag.c index 98b05d0d..9c8072c0 100644 --- a/gst/id3tag/gstid3tag.c +++ b/gst/id3tag/gstid3tag.c @@ -56,8 +56,8 @@ #include -GST_DEBUG_CATEGORY (gst_id3tag_debug); -#define GST_CAT_DEFAULT gst_id3tag_debug +GST_DEBUG_CATEGORY (gst_id3_tag_debug); +#define GST_CAT_DEFAULT gst_id3_tag_debug enum { @@ -76,20 +76,20 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_ALWAYS, GST_STATIC_CAPS ("application/x-id3")); -GST_BOILERPLATE (GstId3Tag, gst_id3tag, GstTagMux, GST_TYPE_TAG_MUX); +GST_BOILERPLATE (GstId3Tag, gst_id3_tag, GstTagMux, GST_TYPE_TAG_MUX); -static GstBuffer *gst_id3tag_render_v2_tag (GstTagMux * mux, +static GstBuffer *gst_id3_tag_render_v2_tag (GstTagMux * mux, GstTagList * taglist); -static GstBuffer *gst_id3tag_render_v1_tag (GstTagMux * mux, +static GstBuffer *gst_id3_tag_render_v1_tag (GstTagMux * mux, GstTagList * taglist); -static void gst_id3tag_set_property (GObject * object, guint prop_id, +static void gst_id3_tag_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); -static void gst_id3tag_get_property (GObject * object, guint prop_id, +static void gst_id3_tag_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); static void -gst_id3tag_base_init (gpointer g_class) +gst_id3_tag_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); @@ -102,17 +102,17 @@ gst_id3tag_base_init (gpointer g_class) "Michael Smith , " "Tim-Philipp Müller "); - GST_DEBUG_CATEGORY_INIT (gst_id3tag_debug, "id3tag", 0, + GST_DEBUG_CATEGORY_INIT (gst_id3_tag_debug, "id3tag", 0, "ID3 v1 and v2 tag muxer"); } static void -gst_id3tag_class_init (GstId3TagClass * klass) +gst_id3_tag_class_init (GstId3TagClass * klass) { GObjectClass *gobject_class = (GObjectClass *) klass; - gobject_class->set_property = gst_id3tag_set_property; - gobject_class->get_property = gst_id3tag_get_property; + gobject_class->set_property = gst_id3_tag_set_property; + gobject_class->get_property = gst_id3_tag_get_property; g_object_class_install_property (gobject_class, ARG_WRITE_V1, g_param_spec_boolean ("write-v1", "Write id3v1 tag", @@ -131,13 +131,13 @@ gst_id3tag_class_init (GstId3TagClass * klass) G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); GST_TAG_MUX_CLASS (klass)->render_start_tag = - GST_DEBUG_FUNCPTR (gst_id3tag_render_v2_tag); + GST_DEBUG_FUNCPTR (gst_id3_tag_render_v2_tag); - GST_TAG_MUX_CLASS (klass)->render_end_tag = gst_id3tag_render_v1_tag; + GST_TAG_MUX_CLASS (klass)->render_end_tag = gst_id3_tag_render_v1_tag; } static void -gst_id3tag_init (GstId3Tag * id3mux, GstId3TagClass * id3mux_class) +gst_id3_tag_init (GstId3Tag * id3mux, GstId3TagClass * id3mux_class) { id3mux->write_v1 = DEFAULT_WRITE_V1; id3mux->write_v2 = DEFAULT_WRITE_V2; @@ -146,7 +146,7 @@ gst_id3tag_init (GstId3Tag * id3mux, GstId3TagClass * id3mux_class) } static void -gst_id3tag_set_property (GObject * object, guint prop_id, +gst_id3_tag_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { GstId3Tag *mux = GST_ID3TAG (object); @@ -168,7 +168,7 @@ gst_id3tag_set_property (GObject * object, guint prop_id, } static void -gst_id3tag_get_property (GObject * object, guint prop_id, +gst_id3_tag_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GstId3Tag *mux = GST_ID3TAG (object); @@ -190,7 +190,7 @@ gst_id3tag_get_property (GObject * object, guint prop_id, } static GstBuffer * -gst_id3tag_render_v2_tag (GstTagMux * mux, GstTagList * taglist) +gst_id3_tag_render_v2_tag (GstTagMux * mux, GstTagList * taglist) { GstId3Tag *id3mux = GST_ID3TAG (mux); @@ -201,7 +201,7 @@ gst_id3tag_render_v2_tag (GstTagMux * mux, GstTagList * taglist) } static GstBuffer * -gst_id3tag_render_v1_tag (GstTagMux * mux, GstTagList * taglist) +gst_id3_tag_render_v1_tag (GstTagMux * mux, GstTagList * taglist) { GstId3Tag *id3mux = GST_ID3TAG (mux); diff --git a/gst/id3tag/gstid3tag.h b/gst/id3tag/gstid3tag.h index 60643594..a9a1ad1c 100644 --- a/gst/id3tag/gstid3tag.h +++ b/gst/id3tag/gstid3tag.h @@ -45,7 +45,7 @@ struct _GstId3TagClass { }; #define GST_TYPE_ID3TAG \ - (gst_id3tag_get_type()) + (gst_id3_tag_get_type()) #define GST_ID3TAG(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ID3TAG,GstId3Tag)) #define GST_ID3TAG_CLASS(klass) \ @@ -55,7 +55,7 @@ struct _GstId3TagClass { #define GST_IS_ID3TAG_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ID3TAG)) -GType gst_id3tag_get_type (void); +GType gst_id3_tag_get_type (void); G_END_DECLS diff --git a/gst/id3tag/id3tag.c b/gst/id3tag/id3tag.c index 0e040f7e..a39e2a8e 100644 --- a/gst/id3tag/id3tag.c +++ b/gst/id3tag/id3tag.c @@ -25,8 +25,8 @@ #include -GST_DEBUG_CATEGORY_EXTERN (gst_id3tag_debug); -#define GST_CAT_DEFAULT gst_id3tag_debug +GST_DEBUG_CATEGORY_EXTERN (gst_id3_tag_debug); +#define GST_CAT_DEFAULT gst_id3_tag_debug #define ID3V2_APIC_PICTURE_OTHER 0 #define ID3V2_APIC_PICTURE_FILE_ICON 1 -- cgit v1.2.1 From 9618c437842818896eb39d2306865ab968adb546 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Fri, 22 May 2009 09:55:20 +0100 Subject: autotools: move -Wno-portability for automake to configure.ac --- autogen.sh | 2 +- configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/autogen.sh b/autogen.sh index f334a566..61fb4d7c 100755 --- a/autogen.sh +++ b/autogen.sh @@ -84,7 +84,7 @@ tool_run "$autoheader" echo timestamp > stamp-h.in 2> /dev/null tool_run "$autoconf" -tool_run "$automake" "-a -c -Wno-portability" +tool_run "$automake" "-a -c" # if enable exists, add an -enable option for each of the lines in that file if test -f enable; then diff --git a/configure.ac b/configure.ac index b2d485ca..3112582a 100644 --- a/configure.ac +++ b/configure.ac @@ -10,7 +10,7 @@ AC_INIT(GStreamer Bad Plug-ins, 0.10.12.1, AG_GST_INIT dnl initialize automake -AM_INIT_AUTOMAKE +AM_INIT_AUTOMAKE([-Wno-portability]) dnl define PACKAGE_VERSION_* variables AS_VERSION -- cgit v1.2.1 From 580b20d6cc155b21e7b0f74f0e4fd28af2c7ce41 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 21 May 2009 16:00:46 +0200 Subject: mpegtsdemux: fix memleaks and refcounts Use correct constants for PID_type so that we clear the right filter. provide_clock must return a ref to a clock. --- gst/mpegdemux/gstmpegtsdemux.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gst/mpegdemux/gstmpegtsdemux.c b/gst/mpegdemux/gstmpegtsdemux.c index cad385d0..6438e880 100644 --- a/gst/mpegdemux/gstmpegtsdemux.c +++ b/gst/mpegdemux/gstmpegtsdemux.c @@ -382,8 +382,8 @@ gst_mpegts_demux_reset (GstMpegTSDemux * demux) case PID_TYPE_ELEMENTARY: gst_pes_filter_uninit (&stream->filter); break; - case PID_PROGRAM_ASSOCIATION_TABLE: - case PID_CONDITIONAL_ACCESS_TABLE: + case PID_TYPE_PROGRAM_ASSOCIATION: + case PID_TYPE_CONDITIONAL_ACCESS: case PID_TYPE_PROGRAM_MAP: gst_section_filter_uninit (&stream->section_filter); break; @@ -2620,8 +2620,7 @@ gst_mpegts_demux_provide_clock (GstElement * element) "MpegTSClock", NULL); demux->clock_base = GST_CLOCK_TIME_NONE; } - - return demux->clock; + return gst_object_ref (demux->clock); } return NULL; -- cgit v1.2.1 From 58c59d7953e58e262e6eba7fc9906227e68552c6 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 22 May 2009 11:59:17 +0200 Subject: rtpbin: unref requests pads after releasing --- gst/rtpmanager/gstrtpbin.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c index 7e14a0d9..e4892d49 100644 --- a/gst/rtpmanager/gstrtpbin.c +++ b/gst/rtpmanager/gstrtpbin.c @@ -2131,6 +2131,7 @@ remove_recv_rtp (GstRtpBin * rtpbin, GstRtpBinSession * session, GstPad * pad) } if (session->recv_rtp_sink) { gst_element_release_request_pad (session->session, session->recv_rtp_sink); + gst_object_unref (session->recv_rtp_sink); session->recv_rtp_sink = NULL; } @@ -2240,6 +2241,7 @@ remove_recv_rtcp (GstRtpBin * rtpbin, GstRtpBinSession * session, GstPad * pad) } if (session->recv_rtcp_sink) { gst_element_release_request_pad (session->session, session->recv_rtcp_sink); + gst_object_unref (session->recv_rtcp_sink); session->recv_rtcp_sink = NULL; } } @@ -2350,6 +2352,7 @@ remove_send_rtp (GstRtpBin * rtpbin, GstRtpBinSession * session, GstPad * pad) if (session->send_rtp_sink) { gst_element_release_request_pad (GST_ELEMENT_CAST (session->session), session->send_rtp_sink); + gst_object_unref (session->send_rtp_sink); session->send_rtp_sink = NULL; } @@ -2425,6 +2428,7 @@ remove_rtcp (GstRtpBin * rtpbin, GstRtpBinSession * session, GstPad * pad) if (session->send_rtcp_src) { gst_element_release_request_pad (session->session, session->send_rtcp_src); + gst_object_unref (session->send_rtcp_src); session->send_rtcp_src = NULL; } } -- cgit v1.2.1 From 142840432ba6c9641f134a1599a76f0c60dd7b5f Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 22 May 2009 12:20:13 +0200 Subject: rtpbin: set target state on new elements Set the state on newly added elements to the state of the parent. Add some debug info and do some cleanups --- gst/rtpmanager/gstrtpbin.c | 57 ++++++++++++++++++++++++++++++---------------- 1 file changed, 37 insertions(+), 20 deletions(-) diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c index e4892d49..5c0948c6 100644 --- a/gst/rtpmanager/gstrtpbin.c +++ b/gst/rtpmanager/gstrtpbin.c @@ -518,6 +518,7 @@ create_session (GstRtpBin * rtpbin, gint id) GstRtpBinSession *sess; GstElement *session, *demux; gint i; + GstState target; if (!(session = gst_element_factory_make ("gstrtpsession", NULL))) goto no_session; @@ -566,11 +567,16 @@ create_session (GstRtpBin * rtpbin, gint id) g_signal_connect (sess->session, "on-sender-timeout", (GCallback) on_sender_timeout, sess); - /* FIXME, change state only to what's needed */ gst_bin_add (GST_BIN_CAST (rtpbin), session); - gst_element_set_state (session, GST_STATE_PLAYING); gst_bin_add (GST_BIN_CAST (rtpbin), demux); - gst_element_set_state (demux, GST_STATE_PLAYING); + + GST_OBJECT_LOCK (rtpbin); + target = GST_STATE_TARGET (rtpbin); + GST_OBJECT_UNLOCK (rtpbin); + + /* change state only to what's needed */ + gst_element_set_state (demux, target); + gst_element_set_state (session, target); return sess; @@ -589,12 +595,8 @@ no_demux: } static void -free_session (GstRtpBinSession * sess) +free_session (GstRtpBinSession * sess, GstRtpBin * bin) { - GstRtpBin *bin; - - bin = sess->bin; - GST_DEBUG_OBJECT (bin, "freeing session %p", sess); gst_element_set_state (sess->demux, GST_STATE_NULL); @@ -848,8 +850,9 @@ get_client (GstRtpBin * bin, guint8 len, guint8 * data, gboolean * created) } static void -free_client (GstRtpBinClient * client) +free_client (GstRtpBinClient * client, GstRtpBin * bin) { + GST_DEBUG_OBJECT (bin, "freeing client %p", client); g_slist_free (client->streams); g_free (client->cname); g_free (client); @@ -1105,6 +1108,8 @@ create_stream (GstRtpBinSession * session, guint32 ssrc) { GstElement *buffer, *demux; GstRtpBinStream *stream; + GstRtpBin *rtpbin; + GstState target; if (!(buffer = gst_element_factory_make ("gstrtpjitterbuffer", NULL))) goto no_jitterbuffer; @@ -1112,9 +1117,11 @@ create_stream (GstRtpBinSession * session, guint32 ssrc) if (!(demux = gst_element_factory_make ("gstrtpptdemux", NULL))) goto no_demux; + rtpbin = session->bin; + stream = g_new0 (GstRtpBinStream, 1); stream->ssrc = ssrc; - stream->bin = session->bin; + stream->bin = rtpbin; stream->session = session; stream->buffer = buffer; stream->demux = demux; @@ -1129,17 +1136,23 @@ create_stream (GstRtpBinSession * session, guint32 ssrc) (GCallback) on_npt_stop, stream); /* configure latency and packet lost */ - g_object_set (buffer, "latency", session->bin->latency, NULL); - g_object_set (buffer, "do-lost", session->bin->do_lost, NULL); + g_object_set (buffer, "latency", rtpbin->latency, NULL); + g_object_set (buffer, "do-lost", rtpbin->do_lost, NULL); - gst_bin_add (GST_BIN_CAST (session->bin), buffer); - gst_element_set_state (buffer, GST_STATE_PLAYING); - gst_bin_add (GST_BIN_CAST (session->bin), demux); - gst_element_set_state (demux, GST_STATE_PLAYING); + gst_bin_add (GST_BIN_CAST (rtpbin), demux); + gst_bin_add (GST_BIN_CAST (rtpbin), buffer); /* link stuff */ gst_element_link (buffer, demux); + GST_OBJECT_LOCK (rtpbin); + target = GST_STATE_TARGET (rtpbin); + GST_OBJECT_UNLOCK (rtpbin); + + /* from sink to source */ + gst_element_set_state (demux, target); + gst_element_set_state (buffer, target); + return stream; /* ERRORS */ @@ -1512,11 +1525,11 @@ gst_rtp_bin_dispose (GObject * object) rtpbin = GST_RTP_BIN (object); GST_DEBUG_OBJECT (object, "freeing sessions"); - g_slist_foreach (rtpbin->sessions, (GFunc) free_session, NULL); + g_slist_foreach (rtpbin->sessions, (GFunc) free_session, rtpbin); g_slist_free (rtpbin->sessions); rtpbin->sessions = NULL; GST_DEBUG_OBJECT (object, "freeing clients"); - g_slist_foreach (rtpbin->clients, (GFunc) free_client, NULL); + g_slist_foreach (rtpbin->clients, (GFunc) free_client, rtpbin); g_slist_free (rtpbin->clients); rtpbin->clients = NULL; @@ -2494,7 +2507,7 @@ gst_rtp_bin_request_new_pad (GstElement * element, pad_name = g_strdup (name); } - GST_DEBUG ("Trying to request a pad with name %s", pad_name); + GST_DEBUG_OBJECT (rtpbin, "Trying to request a pad with name %s", pad_name); /* figure out the template */ if (templ == gst_element_class_get_pad_template (klass, "recv_rtp_sink_%d")) { @@ -2542,6 +2555,9 @@ gst_rtp_bin_release_pad (GstElement * element, GstPad * pad) g_return_if_fail (target); GST_RTP_BIN_LOCK (rtpbin); + GST_DEBUG_OBJECT (rtpbin, "Trying to release pad %s:%s", + GST_DEBUG_PAD_NAME (target)); + if (!(session = find_session_by_pad (rtpbin, target))) goto unknown_pad; @@ -2558,8 +2574,9 @@ gst_rtp_bin_release_pad (GstElement * element, GstPad * pad) /* no more request pads, free the complete session */ if (session->recv_rtp_sink == NULL && session->recv_rtcp_sink == NULL && session->send_rtp_sink == NULL && session->send_rtcp_src == NULL) { + GST_DEBUG_OBJECT (rtpbin, "no more pads for session %p", session); rtpbin->sessions = g_slist_remove (rtpbin->sessions, session); - free_session (session); + free_session (session, rtpbin); } GST_RTP_BIN_UNLOCK (rtpbin); -- cgit v1.2.1 From 300f02af2aaacdc2c32d2f4be61635882e5c495c Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 22 May 2009 12:23:27 +0200 Subject: tests: add rtpbin unit test Add the beginnings of an rtpbin unit test Add some more stuff to .gitignore --- tests/check/Makefile.am | 1 + tests/check/elements/.gitignore | 2 + tests/check/elements/rtpbin.c | 94 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 97 insertions(+) create mode 100644 tests/check/elements/rtpbin.c diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am index 8d3e3839..bf216c12 100644 --- a/tests/check/Makefile.am +++ b/tests/check/Makefile.am @@ -92,6 +92,7 @@ check_PROGRAMS = \ elements/camerabin \ elements/legacyresample \ elements/qtmux \ + elements/rtpbin \ elements/selector \ elements/mxfdemux \ elements/mxfmux \ diff --git a/tests/check/elements/.gitignore b/tests/check/elements/.gitignore index 8b69efb6..091fb4e5 100644 --- a/tests/check/elements/.gitignore +++ b/tests/check/elements/.gitignore @@ -18,6 +18,7 @@ souphttpsrc rganalysis rglimiter rgvolume +rtpbin selector spectrum timidity @@ -26,3 +27,4 @@ wavpackdec wavpackenc wavpackparse x264enc +y4menc diff --git a/tests/check/elements/rtpbin.c b/tests/check/elements/rtpbin.c new file mode 100644 index 00000000..b98e1b5f --- /dev/null +++ b/tests/check/elements/rtpbin.c @@ -0,0 +1,94 @@ +/* GStreamer + * + * unit test for gstrtpbin + * + * Copyright (C) <2009> Wim Taymans + * + * 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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include + +GST_START_TEST (test_cleanup_send) +{ + GstElement *rtpbin; + GstPad *rtp_sink, *rtp_src; + GObject *session; + + rtpbin = gst_element_factory_make ("gstrtpbin", "rtpbin"); + + rtp_sink = gst_element_get_request_pad (rtpbin, "send_rtp_sink_0"); + fail_unless (rtp_sink != NULL); + ASSERT_OBJECT_REFCOUNT (rtp_sink, "rtp_sink", 2); + + rtp_src = gst_element_get_static_pad (rtpbin, "send_rtp_src_0"); + fail_unless (rtp_src != NULL); + ASSERT_OBJECT_REFCOUNT (rtp_src, "rtp_src", 2); + + /* we should be able to get an internal session 0 now */ + g_signal_emit_by_name (rtpbin, "get-internal-session", 0, &session); + fail_unless (session != NULL); + g_object_unref (session); + + gst_element_release_request_pad (rtpbin, rtp_sink); + ASSERT_OBJECT_REFCOUNT (rtp_sink, "rtp_sink", 1); + ASSERT_OBJECT_REFCOUNT (rtp_src, "rtp_src", 1); + + /* the session should be gone now */ + g_signal_emit_by_name (rtpbin, "get-internal-session", 0, &session); + fail_unless (session == NULL); + + /* the other pad should be gone too now */ + fail_unless (gst_element_get_static_pad (rtpbin, "send_rtp_src_0") == NULL); + + /* unref the request pad and the static pad */ + gst_object_unref (rtp_sink); + gst_object_unref (rtp_src); + + gst_object_unref (rtpbin); +} + +GST_END_TEST; + + +Suite * +gstrtpbin_suite (void) +{ + Suite *s = suite_create ("gstrtpbin"); + TCase *tc_chain = tcase_create ("general"); + + suite_add_tcase (s, tc_chain); + tcase_add_test (tc_chain, test_cleanup_send); + + return s; +} + +int +main (int argc, char **argv) +{ + int nf; + + Suite *s = gstrtpbin_suite (); + SRunner *sr = srunner_create (s); + + gst_check_init (&argc, &argv); + + srunner_run_all (sr, CK_NORMAL); + nf = srunner_ntests_failed (sr); + srunner_free (sr); + + return nf; +} -- cgit v1.2.1 From 50d9bc92fb3914cc2128f204bed7a7dd43360f5a Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 22 May 2009 13:44:17 +0200 Subject: tests: add more rtpbin tests --- tests/check/elements/rtpbin.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/tests/check/elements/rtpbin.c b/tests/check/elements/rtpbin.c index b98e1b5f..d14d316e 100644 --- a/tests/check/elements/rtpbin.c +++ b/tests/check/elements/rtpbin.c @@ -25,15 +25,17 @@ GST_START_TEST (test_cleanup_send) { GstElement *rtpbin; - GstPad *rtp_sink, *rtp_src; + GstPad *rtp_sink, *rtp_src, *rtcp_src; GObject *session; rtpbin = gst_element_factory_make ("gstrtpbin", "rtpbin"); + /* request session 0 */ rtp_sink = gst_element_get_request_pad (rtpbin, "send_rtp_sink_0"); fail_unless (rtp_sink != NULL); ASSERT_OBJECT_REFCOUNT (rtp_sink, "rtp_sink", 2); + /* this static pad should be created automatically now */ rtp_src = gst_element_get_static_pad (rtpbin, "send_rtp_src_0"); fail_unless (rtp_src != NULL); ASSERT_OBJECT_REFCOUNT (rtp_src, "rtp_src", 2); @@ -43,20 +45,40 @@ GST_START_TEST (test_cleanup_send) fail_unless (session != NULL); g_object_unref (session); + /* get the send RTCP pad too */ + rtcp_src = gst_element_get_request_pad (rtpbin, "send_rtcp_src_0"); + fail_unless (rtcp_src != NULL); + ASSERT_OBJECT_REFCOUNT (rtcp_src, "rtcp_src", 2); + gst_element_release_request_pad (rtpbin, rtp_sink); + /* we should only have our refs to the pads now */ + ASSERT_OBJECT_REFCOUNT (rtp_sink, "rtp_sink", 1); + ASSERT_OBJECT_REFCOUNT (rtp_src, "rtp_src", 1); + ASSERT_OBJECT_REFCOUNT (rtcp_src, "rtp_src", 2); + + /* the other pad should be gone now */ + fail_unless (gst_element_get_static_pad (rtpbin, "send_rtp_src_0") == NULL); + + /* internal session should still be there */ + g_signal_emit_by_name (rtpbin, "get-internal-session", 0, &session); + fail_unless (session != NULL); + g_object_unref (session); + + /* release the RTCP pad */ + gst_element_release_request_pad (rtpbin, rtcp_src); + /* we should only have our refs to the pads now */ ASSERT_OBJECT_REFCOUNT (rtp_sink, "rtp_sink", 1); ASSERT_OBJECT_REFCOUNT (rtp_src, "rtp_src", 1); + ASSERT_OBJECT_REFCOUNT (rtcp_src, "rtp_src", 1); /* the session should be gone now */ g_signal_emit_by_name (rtpbin, "get-internal-session", 0, &session); fail_unless (session == NULL); - /* the other pad should be gone too now */ - fail_unless (gst_element_get_static_pad (rtpbin, "send_rtp_src_0") == NULL); - /* unref the request pad and the static pad */ gst_object_unref (rtp_sink); gst_object_unref (rtp_src); + gst_object_unref (rtcp_src); gst_object_unref (rtpbin); } -- cgit v1.2.1 From d48dcb04998835469d15cba23e455c61dfb1a80c Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 22 May 2009 13:45:15 +0200 Subject: rtpsession: reuse source code for SDES Reuse the RTPSource object property instead of duplicating code. --- gst/rtpmanager/gstrtpsession.c | 60 ++---------------------------------------- 1 file changed, 2 insertions(+), 58 deletions(-) diff --git a/gst/rtpmanager/gstrtpsession.c b/gst/rtpmanager/gstrtpsession.c index 035d82a8..c33fdfc6 100644 --- a/gst/rtpmanager/gstrtpsession.c +++ b/gst/rtpmanager/gstrtpsession.c @@ -323,63 +323,6 @@ on_ssrc_active (RTPSession * session, RTPSource * src, GstRtpSession * sess) src->ssrc); } -static GstStructure * -source_get_sdes_structure (RTPSource * src) -{ - GstStructure *result; - GValue val = { 0 }; - gchar *str; - - result = gst_structure_empty_new ("GstRTPSessionSDES"); - - gst_structure_set (result, "ssrc", G_TYPE_UINT, src->ssrc, NULL); - - g_value_init (&val, G_TYPE_STRING); - str = rtp_source_get_sdes_string (src, GST_RTCP_SDES_CNAME); - if (str) { - g_value_take_string (&val, str); - gst_structure_set_value (result, "cname", &val); - } - str = rtp_source_get_sdes_string (src, GST_RTCP_SDES_NAME); - if (str) { - g_value_take_string (&val, str); - gst_structure_set_value (result, "name", &val); - } - str = rtp_source_get_sdes_string (src, GST_RTCP_SDES_EMAIL); - if (str) { - g_value_take_string (&val, str); - gst_structure_set_value (result, "email", &val); - } - str = rtp_source_get_sdes_string (src, GST_RTCP_SDES_PHONE); - if (str) { - g_value_take_string (&val, str); - gst_structure_set_value (result, "phone", &val); - } - str = rtp_source_get_sdes_string (src, GST_RTCP_SDES_LOC); - if (str) { - g_value_take_string (&val, str); - gst_structure_set_value (result, "location", &val); - } - str = rtp_source_get_sdes_string (src, GST_RTCP_SDES_TOOL); - if (str) { - g_value_take_string (&val, str); - gst_structure_set_value (result, "tool", &val); - } - str = rtp_source_get_sdes_string (src, GST_RTCP_SDES_NOTE); - if (str) { - g_value_take_string (&val, str); - gst_structure_set_value (result, "note", &val); - } - str = rtp_source_get_sdes_string (src, GST_RTCP_SDES_PRIV); - if (str) { - g_value_take_string (&val, str); - gst_structure_set_value (result, "priv", &val); - } - g_value_unset (&val); - - return result; -} - static void on_ssrc_sdes (RTPSession * session, RTPSource * src, GstRtpSession * sess) { @@ -388,8 +331,9 @@ on_ssrc_sdes (RTPSession * session, RTPSource * src, GstRtpSession * sess) /* convert the new SDES info into a message */ RTP_SESSION_LOCK (session); - s = source_get_sdes_structure (src); + g_object_get (src, "sdes", &s, NULL); RTP_SESSION_UNLOCK (session); + m = gst_message_new_custom (GST_MESSAGE_ELEMENT, GST_OBJECT (sess), s); gst_element_post_message (GST_ELEMENT_CAST (sess), m); -- cgit v1.2.1 From a0b6202baf717f4a5aa74907f6bc8a3ec7e614c5 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 22 May 2009 13:47:30 +0200 Subject: rtpsource: add RTP and RTCP source address Add the RTP and RTCP sender addresses in the stats structure. --- gst/rtpmanager/rtpsource.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/gst/rtpmanager/rtpsource.c b/gst/rtpmanager/rtpsource.c index a40d974f..6a3dc604 100644 --- a/gst/rtpmanager/rtpsource.c +++ b/gst/rtpmanager/rtpsource.c @@ -188,12 +188,50 @@ rtp_source_finalize (GObject * object) G_OBJECT_CLASS (rtp_source_parent_class)->finalize (object); } +#define MAX_ADDRESS 64 +static void +make_address_string (GstNetAddress * addr, gchar * dest, gulong n) +{ + switch (gst_netaddress_get_net_type (addr)) { + case GST_NET_TYPE_IP4: + { + guint32 address; + guint16 port; + + gst_netaddress_get_ip4_address (addr, &address, &port); + + g_snprintf (dest, n, "%d.%d.%d.%d:%d", (address >> 24) & 0xff, + (address >> 16) & 0xff, (address >> 8) & 0xff, address & 0xff, port); + break; + } + case GST_NET_TYPE_IP6: + { + guint8 address[16]; + guint16 port; + + gst_netaddress_get_ip6_address (addr, address, &port); + + g_snprintf (dest, n, "[%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x]:%d", + (address[0] << 8) | address[1], (address[2] << 8) | address[3], + (address[4] << 8) | address[5], (address[6] << 8) | address[7], + (address[8] << 8) | address[9], (address[10] << 8) | address[11], + (address[12] << 8) | address[13], (address[14] << 8) | address[15], + port); + break; + } + default: + dest[0] = 0; + break; + } +} + static GstStructure * rtp_source_create_stats (RTPSource * src) { GstStructure *s; gboolean is_sender = src->is_sender; gboolean internal = src->internal; + gchar address_str[MAX_ADDRESS]; /* common data for all types of sources */ s = gst_structure_new ("application/x-rtp-source-stats", @@ -204,6 +242,16 @@ rtp_source_create_stats (RTPSource * src) "is-csrc", G_TYPE_BOOLEAN, src->is_csrc, "is-sender", G_TYPE_BOOLEAN, is_sender, NULL); + /* add address and port */ + if (src->have_rtp_from) { + make_address_string (&src->rtp_from, address_str, sizeof (address_str)); + gst_structure_set (s, "rtp-from", G_TYPE_STRING, address_str, NULL); + } + if (src->have_rtcp_from) { + make_address_string (&src->rtcp_from, address_str, sizeof (address_str)); + gst_structure_set (s, "rtcp-from", G_TYPE_STRING, address_str, NULL); + } + if (internal) { /* our internal source */ if (is_sender) { -- cgit v1.2.1 From 1c85da2d2bfc85722522e3c257271de2f97f734c Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 22 May 2009 15:36:17 +0200 Subject: rtpbin: don't warn when getting request pads twice Allow getting the request pads multiple times, just return the previously created pads. --- gst/rtpmanager/gstrtpbin.c | 86 ++++++++++++++++++---------------------------- 1 file changed, 34 insertions(+), 52 deletions(-) diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c index 5c0948c6..bcd363b0 100644 --- a/gst/rtpmanager/gstrtpbin.c +++ b/gst/rtpmanager/gstrtpbin.c @@ -347,13 +347,17 @@ struct _GstRtpBinSession /* the pads of the session */ GstPad *recv_rtp_sink; + GstPad *recv_rtp_sink_ghost; GstPad *recv_rtp_src; GstPad *recv_rtcp_sink; + GstPad *recv_rtcp_sink_ghost; GstPad *sync_src; GstPad *send_rtp_sink; + GstPad *send_rtp_sink_ghost; GstPad *send_rtp_src; GstPad *send_rtp_src_ghost; GstPad *send_rtcp_src; + GstPad *send_rtcp_src_ghost; }; /* Manages the RTP streams that come from one client and should therefore be @@ -2034,7 +2038,7 @@ no_stream: static GstPad * create_recv_rtp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name) { - GstPad *result, *sinkdpad; + GstPad *sinkdpad; guint sessid; GstRtpBinSession *session; GstPadLinkReturn lres; @@ -2056,8 +2060,8 @@ create_recv_rtp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name) } /* check if pad was requested */ - if (session->recv_rtp_sink != NULL) - goto existed; + if (session->recv_rtp_sink_ghost != NULL) + return session->recv_rtp_sink_ghost; GST_DEBUG_OBJECT (rtpbin, "getting RTP sink pad"); /* get recv_rtp pad and store */ @@ -2091,12 +2095,12 @@ create_recv_rtp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name) "pad-removed", (GCallback) ssrc_demux_pad_removed, session); GST_DEBUG_OBJECT (rtpbin, "ghosting session sink pad"); - result = + session->recv_rtp_sink_ghost = gst_ghost_pad_new_from_template (name, session->recv_rtp_sink, templ); - gst_pad_set_active (result, TRUE); - gst_element_add_pad (GST_ELEMENT_CAST (rtpbin), result); + gst_pad_set_active (session->recv_rtp_sink_ghost, TRUE); + gst_element_add_pad (GST_ELEMENT_CAST (rtpbin), session->recv_rtp_sink_ghost); - return result; + return session->recv_rtp_sink_ghost; /* ERRORS */ no_name: @@ -2109,12 +2113,6 @@ create_error: /* create_session already warned */ return NULL; } -existed: - { - g_warning ("gstrtpbin: recv_rtp pad already requested for session %d", - sessid); - return NULL; - } pad_failed: { g_warning ("gstrtpbin: failed to get session pad"); @@ -2150,6 +2148,7 @@ remove_recv_rtp (GstRtpBin * rtpbin, GstRtpBinSession * session, GstPad * pad) gst_pad_set_active (pad, FALSE); gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin), pad); + session->recv_rtp_sink_ghost = NULL; } /* Create a pad for receiving RTCP for the session in @name. Must be called with @@ -2159,7 +2158,6 @@ static GstPad * create_recv_rtcp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name) { - GstPad *result; guint sessid; GstRtpBinSession *session; GstPad *sinkdpad; @@ -2182,8 +2180,8 @@ create_recv_rtcp (GstRtpBin * rtpbin, GstPadTemplate * templ, } /* check if pad was requested */ - if (session->recv_rtcp_sink != NULL) - goto existed; + if (session->recv_rtcp_sink_ghost != NULL) + return session->recv_rtcp_sink_ghost; /* get recv_rtp pad and store */ GST_DEBUG_OBJECT (rtpbin, "getting RTCP sink pad"); @@ -2205,12 +2203,13 @@ create_recv_rtcp (GstRtpBin * rtpbin, GstPadTemplate * templ, if (lres != GST_PAD_LINK_OK) goto link_failed; - result = + session->recv_rtcp_sink_ghost = gst_ghost_pad_new_from_template (name, session->recv_rtcp_sink, templ); - gst_pad_set_active (result, TRUE); - gst_element_add_pad (GST_ELEMENT_CAST (rtpbin), result); + gst_pad_set_active (session->recv_rtcp_sink_ghost, TRUE); + gst_element_add_pad (GST_ELEMENT_CAST (rtpbin), + session->recv_rtcp_sink_ghost); - return result; + return session->recv_rtcp_sink_ghost; /* ERRORS */ no_name: @@ -2223,12 +2222,6 @@ create_error: /* create_session already warned */ return NULL; } -existed: - { - g_warning ("gstrtpbin: recv_rtcp pad already requested for session %d", - sessid); - return NULL; - } pad_failed: { g_warning ("gstrtpbin: failed to get session pad"); @@ -2244,6 +2237,7 @@ link_failed: static void remove_recv_rtcp (GstRtpBin * rtpbin, GstRtpBinSession * session, GstPad * pad) { + session->recv_rtcp_sink_ghost = NULL; gst_pad_set_active (pad, FALSE); gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin), pad); @@ -2265,7 +2259,6 @@ remove_recv_rtcp (GstRtpBin * rtpbin, GstRtpBinSession * session, GstPad * pad) static GstPad * create_send_rtp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name) { - GstPad *result; gchar *gname; guint sessid; GstRtpBinSession *session; @@ -2285,8 +2278,8 @@ create_send_rtp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name) } /* check if pad was requested */ - if (session->send_rtp_sink != NULL) - goto existed; + if (session->send_rtp_sink_ghost != NULL) + return session->send_rtp_sink_ghost; /* get send_rtp pad and store */ session->send_rtp_sink = @@ -2294,10 +2287,10 @@ create_send_rtp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name) if (session->send_rtp_sink == NULL) goto pad_failed; - result = + session->send_rtp_sink_ghost = gst_ghost_pad_new_from_template (name, session->send_rtp_sink, templ); - gst_pad_set_active (result, TRUE); - gst_element_add_pad (GST_ELEMENT_CAST (rtpbin), result); + gst_pad_set_active (session->send_rtp_sink_ghost, TRUE); + gst_element_add_pad (GST_ELEMENT_CAST (rtpbin), session->send_rtp_sink_ghost); /* get srcpad */ session->send_rtp_src = @@ -2315,7 +2308,7 @@ create_send_rtp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name) gst_element_add_pad (GST_ELEMENT_CAST (rtpbin), session->send_rtp_src_ghost); g_free (gname); - return result; + return session->send_rtp_sink_ghost; /* ERRORS */ no_name: @@ -2328,12 +2321,6 @@ create_error: /* create_session already warned */ return NULL; } -existed: - { - g_warning ("gstrtpbin: send_rtp pad already requested for session %d", - sessid); - return NULL; - } pad_failed: { g_warning ("gstrtpbin: failed to get session pad for session %d", sessid); @@ -2369,6 +2356,7 @@ remove_send_rtp (GstRtpBin * rtpbin, GstRtpBinSession * session, GstPad * pad) session->send_rtp_sink = NULL; } + session->send_rtp_sink_ghost = NULL; gst_pad_set_active (pad, FALSE); gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin), pad); } @@ -2379,7 +2367,6 @@ remove_send_rtp (GstRtpBin * rtpbin, GstRtpBinSession * session, GstPad * pad) static GstPad * create_rtcp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name) { - GstPad *result; guint sessid; GstRtpBinSession *session; @@ -2393,8 +2380,8 @@ create_rtcp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name) goto no_session; /* check if pad was requested */ - if (session->send_rtcp_src != NULL) - goto existed; + if (session->send_rtcp_src_ghost != NULL) + return session->send_rtcp_src_ghost; /* get rtcp_src pad and store */ session->send_rtcp_src = @@ -2402,12 +2389,12 @@ create_rtcp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name) if (session->send_rtcp_src == NULL) goto pad_failed; - result = + session->send_rtcp_src_ghost = gst_ghost_pad_new_from_template (name, session->send_rtcp_src, templ); - gst_pad_set_active (result, TRUE); - gst_element_add_pad (GST_ELEMENT_CAST (rtpbin), result); + gst_pad_set_active (session->send_rtcp_src_ghost, TRUE); + gst_element_add_pad (GST_ELEMENT_CAST (rtpbin), session->send_rtcp_src_ghost); - return result; + return session->send_rtcp_src_ghost; /* ERRORS */ no_name: @@ -2420,12 +2407,6 @@ no_session: g_warning ("gstrtpbin: session with id %d does not exist", sessid); return NULL; } -existed: - { - g_warning ("gstrtpbin: send_rtcp_src pad already requested for session %d", - sessid); - return NULL; - } pad_failed: { g_warning ("gstrtpbin: failed to get rtcp pad for session %d", sessid); @@ -2436,6 +2417,7 @@ pad_failed: static void remove_rtcp (GstRtpBin * rtpbin, GstRtpBinSession * session, GstPad * pad) { + session->send_rtcp_src_ghost = NULL; gst_pad_set_active (pad, FALSE); gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin), pad); -- cgit v1.2.1 From 51c07ac6263916858c638eb9cc91021c29a15e0f Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 22 May 2009 15:37:29 +0200 Subject: tests: more rtpbin checks --- tests/check/elements/rtpbin.c | 113 ++++++++++++++++++++++++------------------ 1 file changed, 64 insertions(+), 49 deletions(-) diff --git a/tests/check/elements/rtpbin.c b/tests/check/elements/rtpbin.c index d14d316e..60ebd7af 100644 --- a/tests/check/elements/rtpbin.c +++ b/tests/check/elements/rtpbin.c @@ -27,58 +27,73 @@ GST_START_TEST (test_cleanup_send) GstElement *rtpbin; GstPad *rtp_sink, *rtp_src, *rtcp_src; GObject *session; + gint count = 2; rtpbin = gst_element_factory_make ("gstrtpbin", "rtpbin"); - /* request session 0 */ - rtp_sink = gst_element_get_request_pad (rtpbin, "send_rtp_sink_0"); - fail_unless (rtp_sink != NULL); - ASSERT_OBJECT_REFCOUNT (rtp_sink, "rtp_sink", 2); - - /* this static pad should be created automatically now */ - rtp_src = gst_element_get_static_pad (rtpbin, "send_rtp_src_0"); - fail_unless (rtp_src != NULL); - ASSERT_OBJECT_REFCOUNT (rtp_src, "rtp_src", 2); - - /* we should be able to get an internal session 0 now */ - g_signal_emit_by_name (rtpbin, "get-internal-session", 0, &session); - fail_unless (session != NULL); - g_object_unref (session); - - /* get the send RTCP pad too */ - rtcp_src = gst_element_get_request_pad (rtpbin, "send_rtcp_src_0"); - fail_unless (rtcp_src != NULL); - ASSERT_OBJECT_REFCOUNT (rtcp_src, "rtcp_src", 2); - - gst_element_release_request_pad (rtpbin, rtp_sink); - /* we should only have our refs to the pads now */ - ASSERT_OBJECT_REFCOUNT (rtp_sink, "rtp_sink", 1); - ASSERT_OBJECT_REFCOUNT (rtp_src, "rtp_src", 1); - ASSERT_OBJECT_REFCOUNT (rtcp_src, "rtp_src", 2); - - /* the other pad should be gone now */ - fail_unless (gst_element_get_static_pad (rtpbin, "send_rtp_src_0") == NULL); - - /* internal session should still be there */ - g_signal_emit_by_name (rtpbin, "get-internal-session", 0, &session); - fail_unless (session != NULL); - g_object_unref (session); - - /* release the RTCP pad */ - gst_element_release_request_pad (rtpbin, rtcp_src); - /* we should only have our refs to the pads now */ - ASSERT_OBJECT_REFCOUNT (rtp_sink, "rtp_sink", 1); - ASSERT_OBJECT_REFCOUNT (rtp_src, "rtp_src", 1); - ASSERT_OBJECT_REFCOUNT (rtcp_src, "rtp_src", 1); - - /* the session should be gone now */ - g_signal_emit_by_name (rtpbin, "get-internal-session", 0, &session); - fail_unless (session == NULL); - - /* unref the request pad and the static pad */ - gst_object_unref (rtp_sink); - gst_object_unref (rtp_src); - gst_object_unref (rtcp_src); + while (count--) { + /* request session 0 */ + rtp_sink = gst_element_get_request_pad (rtpbin, "send_rtp_sink_0"); + fail_unless (rtp_sink != NULL); + ASSERT_OBJECT_REFCOUNT (rtp_sink, "rtp_sink", 2); + + /* request again */ + rtp_sink = gst_element_get_request_pad (rtpbin, "send_rtp_sink_0"); + fail_unless (rtp_sink != NULL); + ASSERT_OBJECT_REFCOUNT (rtp_sink, "rtp_sink", 3); + gst_object_unref (rtp_sink); + + /* this static pad should be created automatically now */ + rtp_src = gst_element_get_static_pad (rtpbin, "send_rtp_src_0"); + fail_unless (rtp_src != NULL); + ASSERT_OBJECT_REFCOUNT (rtp_src, "rtp_src", 2); + + /* we should be able to get an internal session 0 now */ + g_signal_emit_by_name (rtpbin, "get-internal-session", 0, &session); + fail_unless (session != NULL); + g_object_unref (session); + + /* get the send RTCP pad too */ + rtcp_src = gst_element_get_request_pad (rtpbin, "send_rtcp_src_0"); + fail_unless (rtcp_src != NULL); + ASSERT_OBJECT_REFCOUNT (rtcp_src, "rtcp_src", 2); + + /* second time */ + rtcp_src = gst_element_get_request_pad (rtpbin, "send_rtcp_src_0"); + fail_unless (rtcp_src != NULL); + ASSERT_OBJECT_REFCOUNT (rtcp_src, "rtcp_src", 3); + gst_object_unref (rtcp_src); + + gst_element_release_request_pad (rtpbin, rtp_sink); + /* we should only have our refs to the pads now */ + ASSERT_OBJECT_REFCOUNT (rtp_sink, "rtp_sink", 1); + ASSERT_OBJECT_REFCOUNT (rtp_src, "rtp_src", 1); + ASSERT_OBJECT_REFCOUNT (rtcp_src, "rtp_src", 2); + + /* the other pad should be gone now */ + fail_unless (gst_element_get_static_pad (rtpbin, "send_rtp_src_0") == NULL); + + /* internal session should still be there */ + g_signal_emit_by_name (rtpbin, "get-internal-session", 0, &session); + fail_unless (session != NULL); + g_object_unref (session); + + /* release the RTCP pad */ + gst_element_release_request_pad (rtpbin, rtcp_src); + /* we should only have our refs to the pads now */ + ASSERT_OBJECT_REFCOUNT (rtp_sink, "rtp_sink", 1); + ASSERT_OBJECT_REFCOUNT (rtp_src, "rtp_src", 1); + ASSERT_OBJECT_REFCOUNT (rtcp_src, "rtp_src", 1); + + /* the session should be gone now */ + g_signal_emit_by_name (rtpbin, "get-internal-session", 0, &session); + fail_unless (session == NULL); + + /* unref the request pad and the static pad */ + gst_object_unref (rtp_sink); + gst_object_unref (rtp_src); + gst_object_unref (rtcp_src); + } gst_object_unref (rtpbin); } -- cgit v1.2.1 From 9353ceb53049a2fe31a6b986d039dc64208779df Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 22 May 2009 15:45:19 +0200 Subject: rtpbin: use our ghostpads instead of its target Since we keep a reference to our ghostpads, we can use them to track sessions. This avoid us having to mess with the target of the ghostpad. --- gst/rtpmanager/gstrtpbin.c | 90 +++++++++++++++++++++++----------------------- 1 file changed, 46 insertions(+), 44 deletions(-) diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c index bcd363b0..f7d7e54a 100644 --- a/gst/rtpmanager/gstrtpbin.c +++ b/gst/rtpmanager/gstrtpbin.c @@ -398,9 +398,10 @@ find_session_by_pad (GstRtpBin * rtpbin, GstPad * pad) for (walk = rtpbin->sessions; walk; walk = g_slist_next (walk)) { GstRtpBinSession *sess = (GstRtpBinSession *) walk->data; - if ((sess->recv_rtp_sink == pad) || - (sess->recv_rtcp_sink == pad) || - (sess->send_rtp_sink == pad) || (sess->send_rtcp_src == pad)) + if ((sess->recv_rtp_sink_ghost == pad) || + (sess->recv_rtcp_sink_ghost == pad) || + (sess->send_rtp_sink_ghost == pad) + || (sess->send_rtcp_src_ghost == pad)) return sess; } return NULL; @@ -2126,7 +2127,7 @@ link_failed: } static void -remove_recv_rtp (GstRtpBin * rtpbin, GstRtpBinSession * session, GstPad * pad) +remove_recv_rtp (GstRtpBin * rtpbin, GstRtpBinSession * session) { if (session->demux_newpad_sig) { g_signal_handler_disconnect (session->demux, session->demux_newpad_sig); @@ -2145,10 +2146,12 @@ remove_recv_rtp (GstRtpBin * rtpbin, GstRtpBinSession * session, GstPad * pad) gst_object_unref (session->recv_rtp_sink); session->recv_rtp_sink = NULL; } - - gst_pad_set_active (pad, FALSE); - gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin), pad); - session->recv_rtp_sink_ghost = NULL; + if (session->recv_rtp_sink_ghost) { + gst_pad_set_active (session->recv_rtp_sink_ghost, FALSE); + gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin), + session->recv_rtp_sink_ghost); + session->recv_rtp_sink_ghost = NULL; + } } /* Create a pad for receiving RTCP for the session in @name. Must be called with @@ -2235,12 +2238,14 @@ link_failed: } static void -remove_recv_rtcp (GstRtpBin * rtpbin, GstRtpBinSession * session, GstPad * pad) +remove_recv_rtcp (GstRtpBin * rtpbin, GstRtpBinSession * session) { - session->recv_rtcp_sink_ghost = NULL; - gst_pad_set_active (pad, FALSE); - gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin), pad); - + if (session->recv_rtcp_sink_ghost) { + gst_pad_set_active (session->recv_rtcp_sink_ghost, FALSE); + gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin), + session->recv_rtcp_sink_ghost); + session->recv_rtcp_sink_ghost = NULL; + } if (session->sync_src) { /* releasing the request pad should also unref the sync pad */ gst_object_unref (session->sync_src); @@ -2335,7 +2340,7 @@ no_srcpad: } static void -remove_send_rtp (GstRtpBin * rtpbin, GstRtpBinSession * session, GstPad * pad) +remove_send_rtp (GstRtpBin * rtpbin, GstRtpBinSession * session) { if (session->send_rtp_src_ghost) { gst_pad_set_active (session->send_rtp_src_ghost, FALSE); @@ -2343,22 +2348,22 @@ remove_send_rtp (GstRtpBin * rtpbin, GstRtpBinSession * session, GstPad * pad) session->send_rtp_src_ghost); session->send_rtp_src_ghost = NULL; } - if (session->send_rtp_src) { gst_object_unref (session->send_rtp_src); session->send_rtp_src = NULL; } - if (session->send_rtp_sink) { gst_element_release_request_pad (GST_ELEMENT_CAST (session->session), session->send_rtp_sink); gst_object_unref (session->send_rtp_sink); session->send_rtp_sink = NULL; } - - session->send_rtp_sink_ghost = NULL; - gst_pad_set_active (pad, FALSE); - gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin), pad); + if (session->send_rtp_sink_ghost) { + gst_pad_set_active (session->send_rtp_sink_ghost, FALSE); + gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin), + session->send_rtp_sink_ghost); + session->send_rtp_sink_ghost = NULL; + } } /* Create a pad for sending RTCP for the session in @name. Must be called with @@ -2415,12 +2420,14 @@ pad_failed: } static void -remove_rtcp (GstRtpBin * rtpbin, GstRtpBinSession * session, GstPad * pad) +remove_rtcp (GstRtpBin * rtpbin, GstRtpBinSession * session) { - session->send_rtcp_src_ghost = NULL; - gst_pad_set_active (pad, FALSE); - gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin), pad); - + if (session->send_rtcp_src_ghost) { + gst_pad_set_active (session->send_rtcp_src_ghost, FALSE); + gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin), + session->send_rtcp_src_ghost); + session->send_rtcp_src_ghost = NULL; + } if (session->send_rtcp_src) { gst_element_release_request_pad (session->session, session->send_rtcp_src); gst_object_unref (session->send_rtcp_src); @@ -2526,51 +2533,46 @@ gst_rtp_bin_release_pad (GstElement * element, GstPad * pad) { GstRtpBinSession *session; GstRtpBin *rtpbin; - GstPad *target = NULL; g_return_if_fail (GST_IS_GHOST_PAD (pad)); g_return_if_fail (GST_IS_RTP_BIN (element)); rtpbin = GST_RTP_BIN (element); - target = gst_ghost_pad_get_target (GST_GHOST_PAD (pad)); - g_return_if_fail (target); - GST_RTP_BIN_LOCK (rtpbin); GST_DEBUG_OBJECT (rtpbin, "Trying to release pad %s:%s", - GST_DEBUG_PAD_NAME (target)); + GST_DEBUG_PAD_NAME (pad)); - if (!(session = find_session_by_pad (rtpbin, target))) + if (!(session = find_session_by_pad (rtpbin, pad))) goto unknown_pad; - if (session->recv_rtp_sink == target) { - remove_recv_rtp (rtpbin, session, pad); - } else if (session->recv_rtcp_sink == target) { - remove_recv_rtcp (rtpbin, session, pad); - } else if (session->send_rtp_sink == target) { - remove_send_rtp (rtpbin, session, pad); - } else if (session->send_rtcp_src == target) { - remove_rtcp (rtpbin, session, pad); + if (session->recv_rtp_sink_ghost == pad) { + remove_recv_rtp (rtpbin, session); + } else if (session->recv_rtcp_sink_ghost == pad) { + remove_recv_rtcp (rtpbin, session); + } else if (session->send_rtp_sink_ghost == pad) { + remove_send_rtp (rtpbin, session); + } else if (session->send_rtcp_src_ghost == pad) { + remove_rtcp (rtpbin, session); } /* no more request pads, free the complete session */ - if (session->recv_rtp_sink == NULL && session->recv_rtcp_sink == NULL && - session->send_rtp_sink == NULL && session->send_rtcp_src == NULL) { + if (session->recv_rtp_sink_ghost == NULL + && session->recv_rtcp_sink_ghost == NULL + && session->send_rtp_sink_ghost == NULL + && session->send_rtcp_src_ghost == NULL) { GST_DEBUG_OBJECT (rtpbin, "no more pads for session %p", session); rtpbin->sessions = g_slist_remove (rtpbin->sessions, session); free_session (session, rtpbin); } GST_RTP_BIN_UNLOCK (rtpbin); - gst_object_unref (target); - return; /* ERROR */ unknown_pad: { GST_RTP_BIN_UNLOCK (rtpbin); - gst_object_unref (target); g_warning ("gstrtpbin: %s:%s is not one of our request pads", GST_DEBUG_PAD_NAME (pad)); return; -- cgit v1.2.1 From 0d014baaa4c61010c98c6899cd2338da1423014b Mon Sep 17 00:00:00 2001 From: Ali Sabil Date: Fri, 22 May 2009 16:35:20 +0200 Subject: ssrcdemux: emit signal when pads are removed Add action signal to clear an SSRC in the ssrc demuxer. Add signal to notify of removed ssrc. See #554839 --- gst/rtpmanager/gstrtpbin-marshal.list | 1 + gst/rtpmanager/gstrtpssrcdemux.c | 74 +++++++++++++++++++++++++++++++++++ gst/rtpmanager/gstrtpssrcdemux.h | 6 ++- 3 files changed, 80 insertions(+), 1 deletion(-) diff --git a/gst/rtpmanager/gstrtpbin-marshal.list b/gst/rtpmanager/gstrtpbin-marshal.list index c4bc0bb2..ed73e43b 100644 --- a/gst/rtpmanager/gstrtpbin-marshal.list +++ b/gst/rtpmanager/gstrtpbin-marshal.list @@ -3,5 +3,6 @@ BOXED:UINT BOXED:UINT,UINT OBJECT:UINT VOID:UINT,OBJECT +VOID:UINT VOID:UINT,UINT VOID:OBJECT,OBJECT diff --git a/gst/rtpmanager/gstrtpssrcdemux.c b/gst/rtpmanager/gstrtpssrcdemux.c index b9a279c2..6a305d8e 100644 --- a/gst/rtpmanager/gstrtpssrcdemux.c +++ b/gst/rtpmanager/gstrtpssrcdemux.c @@ -97,6 +97,8 @@ static GstElementDetails gst_rtp_ssrc_demux_details = { enum { SIGNAL_NEW_SSRC_PAD, + SIGNAL_REMOVED_SSRC_PAD, + SIGNAL_CLEAR_SSRC, LAST_SIGNAL }; @@ -112,6 +114,9 @@ static void gst_rtp_ssrc_demux_finalize (GObject * object); static GstStateChangeReturn gst_rtp_ssrc_demux_change_state (GstElement * element, GstStateChange transition); +static void gst_rtp_ssrc_demux_clear_ssrc (GstRtpSsrcDemux * demux, + guint32 ssrc); + /* sinkpad stuff */ static GstFlowReturn gst_rtp_ssrc_demux_chain (GstPad * pad, GstBuffer * buf); static gboolean gst_rtp_ssrc_demux_sink_event (GstPad * pad, GstEvent * event); @@ -245,9 +250,11 @@ gst_rtp_ssrc_demux_class_init (GstRtpSsrcDemuxClass * klass) { GObjectClass *gobject_klass; GstElementClass *gstelement_klass; + GstRtpSsrcDemuxClass *gstrtpssrcdemux_klass; gobject_klass = (GObjectClass *) klass; gstelement_klass = (GstElementClass *) klass; + gstrtpssrcdemux_klass = (GstRtpSsrcDemuxClass *) klass; gobject_klass->dispose = GST_DEBUG_FUNCPTR (gst_rtp_ssrc_demux_dispose); gobject_klass->finalize = GST_DEBUG_FUNCPTR (gst_rtp_ssrc_demux_finalize); @@ -267,8 +274,38 @@ gst_rtp_ssrc_demux_class_init (GstRtpSsrcDemuxClass * klass) NULL, NULL, gst_rtp_bin_marshal_VOID__UINT_OBJECT, G_TYPE_NONE, 2, G_TYPE_UINT, GST_TYPE_PAD); + /** + * GstRtpSsrcDemux::removed-ssrc-pad: + * @demux: the object which received the signal + * @ssrc: the SSRC of the pad + * @pad: the removed pad. + * + * Emited when a SSRC pad has been removed. + */ + gst_rtp_ssrc_demux_signals[SIGNAL_REMOVED_SSRC_PAD] = + g_signal_new ("removed-ssrc-pad", + G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (GstRtpSsrcDemuxClass, removed_ssrc_pad), + NULL, NULL, gst_rtp_bin_marshal_VOID__UINT_OBJECT, + G_TYPE_NONE, 2, G_TYPE_UINT, GST_TYPE_PAD); + + /** + * GstRtpSsrcDemux::clear-ssrc: + * @demux: the object which received the signal + * @ssrc: the SSRC of the pad + * + * Action signal to remove the pad for SSRC. + */ + gst_rtp_ssrc_demux_signals[SIGNAL_CLEAR_SSRC] = + g_signal_new ("clear-ssrc", + G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, + G_STRUCT_OFFSET (GstRtpSsrcDemuxClass, clear_ssrc), + NULL, NULL, gst_rtp_bin_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); + gstelement_klass->change_state = GST_DEBUG_FUNCPTR (gst_rtp_ssrc_demux_change_state); + gstrtpssrcdemux_klass->clear_ssrc = + GST_DEBUG_FUNCPTR (gst_rtp_ssrc_demux_clear_ssrc); GST_DEBUG_CATEGORY_INIT (gst_rtp_ssrc_demux_debug, "rtpssrcdemux", 0, "RTP SSRC demuxer"); @@ -342,6 +379,43 @@ gst_rtp_ssrc_demux_finalize (GObject * object) G_OBJECT_CLASS (parent_class)->finalize (object); } +static void +gst_rtp_ssrc_demux_clear_ssrc (GstRtpSsrcDemux * demux, guint32 ssrc) +{ + GstRtpSsrcDemuxPad *dpad; + + GST_PAD_LOCK (demux); + dpad = find_demux_pad_for_ssrc (demux, ssrc); + if (dpad != NULL) + goto unknown_pad; + + GST_DEBUG_OBJECT (demux, "clearing pad for SSRC %08x", ssrc); + + demux->srcpads = g_slist_remove (demux->srcpads, dpad); + GST_PAD_UNLOCK (demux); + + gst_pad_set_active (dpad->rtp_pad, FALSE); + gst_pad_set_active (dpad->rtcp_pad, FALSE); + + g_signal_emit (G_OBJECT (demux), + gst_rtp_ssrc_demux_signals[SIGNAL_REMOVED_SSRC_PAD], 0, ssrc, + dpad->rtp_pad); + + gst_element_remove_pad (GST_ELEMENT_CAST (demux), dpad->rtp_pad); + gst_element_remove_pad (GST_ELEMENT_CAST (demux), dpad->rtcp_pad); + + g_free (dpad); + + return; + + /* ERRORS */ +unknown_pad: + { + g_warning ("unknown SSRC %08x", ssrc); + return; + } +} + static gboolean gst_rtp_ssrc_demux_sink_event (GstPad * pad, GstEvent * event) { diff --git a/gst/rtpmanager/gstrtpssrcdemux.h b/gst/rtpmanager/gstrtpssrcdemux.h index d89472af..d5a13caf 100644 --- a/gst/rtpmanager/gstrtpssrcdemux.h +++ b/gst/rtpmanager/gstrtpssrcdemux.h @@ -50,7 +50,11 @@ struct _GstRtpSsrcDemuxClass GstElementClass parent_class; /* signals */ - void (*new_ssrc_pad) (GstElement *element, guint32 ssrc, GstPad *pad); + void (*new_ssrc_pad) (GstRtpSsrcDemux *demux, guint32 ssrc, GstPad *pad); + void (*removed_ssrc_pad) (GstRtpSsrcDemux *demux, guint32 ssrc, GstPad *pad); + + /* actions */ + void (*clear_ssrc) (GstRtpSsrcDemux *demux, guint32 ssrc); }; GType gst_rtp_ssrc_demux_get_type (void); -- cgit v1.2.1 From e8423da78eea949f8223da5c27ea36544a3a6c5b Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 22 May 2009 16:41:19 +0200 Subject: rtpbin: add to new signal to remove SSRC pads --- gst/rtpmanager/gstrtpbin.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c index f7d7e54a..017ffc02 100644 --- a/gst/rtpmanager/gstrtpbin.c +++ b/gst/rtpmanager/gstrtpbin.c @@ -493,27 +493,18 @@ find_stream_by_ssrc (GstRtpBinSession * session, guint32 ssrc) } static void -ssrc_demux_pad_removed (GstElement * element, GstPad * pad, +ssrc_demux_pad_removed (GstElement * element, guint ssrc, GstPad * pad, GstRtpBinSession * session) { - guint ssrc; GstRtpBinStream *stream = NULL; - gchar *name; - gint res; - - name = gst_pad_get_name (pad); - res = sscanf (name, "src_%d", &ssrc); - g_free (name); - - if (res != 1) - return; GST_RTP_SESSION_LOCK (session); - if ((stream = find_stream_by_ssrc (session, ssrc))) { + if ((stream = find_stream_by_ssrc (session, ssrc))) session->streams = g_slist_remove (session->streams, stream); - free_stream (stream); - } GST_RTP_SESSION_UNLOCK (session); + + if (stream) + free_stream (stream); } /* create a session with the given id. Must be called with RTP_BIN_LOCK */ @@ -2093,7 +2084,7 @@ create_recv_rtp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name) session->demux_newpad_sig = g_signal_connect (session->demux, "new-ssrc-pad", (GCallback) new_ssrc_pad_found, session); session->demux_padremoved_sig = g_signal_connect (session->demux, - "pad-removed", (GCallback) ssrc_demux_pad_removed, session); + "removed-ssrc-pad", (GCallback) ssrc_demux_pad_removed, session); GST_DEBUG_OBJECT (rtpbin, "ghosting session sink pad"); session->recv_rtp_sink_ghost = -- cgit v1.2.1 From 0444aa33747e0f8c2a59d682668b4b41b7ac23e3 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Wed, 20 May 2009 16:46:49 +0200 Subject: mpegvideoparse: Detect interlaced content and set it on outgoing caps. I also added the parsing of all the other bits in the sequence extension header in case we need it later. --- gst/mpegvideoparse/mpegpacketiser.c | 7 +++++++ gst/mpegvideoparse/mpegpacketiser.h | 2 ++ gst/mpegvideoparse/mpegvideoparse.c | 1 + 3 files changed, 10 insertions(+) diff --git a/gst/mpegvideoparse/mpegpacketiser.c b/gst/mpegvideoparse/mpegpacketiser.c index 447c50ae..0312680e 100644 --- a/gst/mpegvideoparse/mpegpacketiser.c +++ b/gst/mpegvideoparse/mpegpacketiser.c @@ -498,6 +498,9 @@ mpeg_util_parse_extension_packet (MPEGSeqHdr * hdr, guint8 * data, guint8 * end) case MPEG_PACKET_EXT_SEQUENCE: { /* Parse a Sequence Extension */ + guint8 profile_level; + gboolean low_delay; + guint8 chroma_format; guint8 horiz_size_ext, vert_size_ext; guint8 fps_n_ext, fps_d_ext; @@ -505,8 +508,12 @@ mpeg_util_parse_extension_packet (MPEGSeqHdr * hdr, guint8 * data, guint8 * end) /* need at least 10 bytes, minus 4 for the start code 000001b5 */ return FALSE; + profile_level = ((data[0] << 4) & 0xf0) | ((data[1]) >> 4); + hdr->progressive = data[1] & 0x08; + chroma_format = (data[1] >> 2) & 0x03; horiz_size_ext = ((data[1] << 1) & 0x02) | ((data[2] >> 7) & 0x01); vert_size_ext = (data[2] >> 5) & 0x03; + low_delay = data[5] >> 7; fps_n_ext = (data[5] >> 5) & 0x03; fps_d_ext = data[5] & 0x1f; diff --git a/gst/mpegvideoparse/mpegpacketiser.h b/gst/mpegvideoparse/mpegpacketiser.h index 426b13aa..549ca621 100644 --- a/gst/mpegvideoparse/mpegpacketiser.h +++ b/gst/mpegvideoparse/mpegpacketiser.h @@ -76,6 +76,8 @@ struct MPEGSeqHdr gint width, height; /* Framerate */ gint fps_n, fps_d; + + gboolean progressive; }; struct MPEGPictureHdr diff --git a/gst/mpegvideoparse/mpegvideoparse.c b/gst/mpegvideoparse/mpegvideoparse.c index 3c930179..2a7f9153 100644 --- a/gst/mpegvideoparse/mpegvideoparse.c +++ b/gst/mpegvideoparse/mpegvideoparse.c @@ -261,6 +261,7 @@ mpegvideoparse_handle_sequence (MpegVideoParse * mpegvideoparse, "height", G_TYPE_INT, new_hdr.height, "framerate", GST_TYPE_FRACTION, new_hdr.fps_n, new_hdr.fps_d, "pixel-aspect-ratio", GST_TYPE_FRACTION, new_hdr.par_w, new_hdr.par_h, + "interlaced", G_TYPE_BOOLEAN, !new_hdr.progressive, "codec_data", GST_TYPE_BUFFER, seq_buf, NULL); GST_DEBUG ("New mpegvideoparse caps: %" GST_PTR_FORMAT, caps); -- cgit v1.2.1 From 1a98c66f4a446a496b1362542da8eda887498103 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Fri, 22 May 2009 16:56:52 -0700 Subject: adpcmdec: Add new plugin for ms-adpcm decoding. --- common | 2 +- configure.ac | 2 + gst/adpcmdec/Makefile.am | 12 ++ gst/adpcmdec/adpcmdec.c | 452 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 467 insertions(+), 1 deletion(-) create mode 100644 gst/adpcmdec/Makefile.am create mode 100644 gst/adpcmdec/adpcmdec.c diff --git a/common b/common index 888e0a26..6ab11d17 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 888e0a268b60904dd208b672a3c57f1ff7d9786c +Subproject commit 6ab11d17cb8e4d1ed755da7accac9630d567a097 diff --git a/configure.ac b/configure.ac index 3112582a..eb624b8f 100644 --- a/configure.ac +++ b/configure.ac @@ -251,6 +251,7 @@ dnl *** plug-ins to include *** dnl these are all the gst plug-ins, compilable without additional libs AG_GST_CHECK_PLUGIN(aacparse) +AG_GST_CHECK_PLUGIN(adpcmdec) AG_GST_CHECK_PLUGIN(aiffparse) AG_GST_CHECK_PLUGIN(amrparse) AG_GST_CHECK_PLUGIN(autoconvert) @@ -1560,6 +1561,7 @@ common/shave-libtool gst-plugins-bad.spec gst/Makefile gst/aacparse/Makefile +gst/adpcmdec/Makefile gst/aiffparse/Makefile gst/amrparse/Makefile gst/autoconvert/Makefile diff --git a/gst/adpcmdec/Makefile.am b/gst/adpcmdec/Makefile.am new file mode 100644 index 00000000..5c60ad4f --- /dev/null +++ b/gst/adpcmdec/Makefile.am @@ -0,0 +1,12 @@ +plugin_LTLIBRARIES = libgstadpcmdec.la + +# sources used to compile this plug-in +libgstadpcmdec_la_SOURCES = adpcmdec.c + +# flags used to compile this plugin +# add other _CFLAGS and _LIBS as needed +libgstadpcmdec_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) +libgstadpcmdec_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) +libgstadpcmdec_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) +libgstadpcmdec_la_LIBTOOLFLAGS = --tag=disable-static + diff --git a/gst/adpcmdec/adpcmdec.c b/gst/adpcmdec/adpcmdec.c new file mode 100644 index 00000000..c58dc5d8 --- /dev/null +++ b/gst/adpcmdec/adpcmdec.c @@ -0,0 +1,452 @@ +/* GStreamer + * Copyright (C) 2009 Pioneers of the Inevitable + * + * Authors: Michael Smith + * + * 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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +/* Based on MS-ADPCM decoder in libsndfile, + Copyright (C) 1999-2002 Erik de Castro Lopo +#include + +#define GST_TYPE_ADPCM_DEC \ + (adpcmdec_get_type ()) + +#define GST_ADPCM_DEC(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_ADPCM_DEC, ADPCMDec)) + +#define GST_CAT_DEFAULT adpcmdec_debug +GST_DEBUG_CATEGORY_STATIC (adpcmdec_debug); + +static const GstElementDetails adpcmdec_details = +GST_ELEMENT_DETAILS ("MS-ADPCM decoder", + "Codec/Decoder/Audio", + "Decode MS AD-PCM audio", + "Pioneers of the Inevitable output_caps = gst_caps_new_simple ("audio/x-raw-int", + "rate", G_TYPE_INT, dec->rate, + "channels", G_TYPE_INT, dec->channels, + "width", G_TYPE_INT, 16, + "depth", G_TYPE_INT, 16, + "endianness", G_TYPE_INT, G_BYTE_ORDER, + "signed", G_TYPE_BOOLEAN, TRUE, NULL); + + if (dec->output_caps) { + gst_pad_set_caps (dec->srcpad, dec->output_caps); + } + + dec->is_setup = TRUE; + dec->timestamp = GST_CLOCK_TIME_NONE; + dec->adapter = gst_adapter_new (); + dec->out_samples = 0; + + return gst_pad_push_event (dec->srcpad, gst_event_new_new_segment (FALSE, + 1.0, GST_FORMAT_TIME, 0, -1, 0)); +} + +static void +adpcmdec_teardown (ADPCMDec * dec) +{ + if (dec->output_caps) { + gst_caps_unref (dec->output_caps); + dec->output_caps = NULL; + } + if (dec->adapter) { + g_object_unref (dec->adapter); + dec->adapter = NULL; + } + dec->is_setup = FALSE; +} + +static gboolean +adpcmdec_sink_setcaps (GstPad * pad, GstCaps * caps) +{ + ADPCMDec *dec = (ADPCMDec *) gst_pad_get_parent (pad); + GstStructure *structure = gst_caps_get_structure (caps, 0); + + if (!gst_structure_get_int (structure, "block_align", &dec->blocksize)) + return FALSE; + if (!gst_structure_get_int (structure, "rate", &dec->rate)) + return FALSE; + if (!gst_structure_get_int (structure, "channels", &dec->channels)) + return FALSE; + + if (dec->is_setup) + adpcmdec_teardown (dec); + gst_object_unref (dec); + + return TRUE; +} + + +/*===================================================================== + * From libsndfile: + * + * MS ADPCM Block Layout. + * ====================== + * Block is usually 256, 512 or 1024 bytes depending on sample rate. + * For a mono file, the block is laid out as follows: + * byte purpose + * 0 block predictor [0..6] + * 1,2 initial idelta (positive) + * 3,4 sample 1 + * 5,6 sample 0 + * 7..n packed bytecodes + * + * For a stereo file, the block is laid out as follows: + * byte purpose + * 0 block predictor [0..6] for left channel + * 1 block predictor [0..6] for right channel + * 2,3 initial idelta (positive) for left channel + * 4,5 initial idelta (positive) for right channel + * 6,7 sample 1 for left channel + * 8,9 sample 1 for right channel + * 10,11 sample 0 for left channel + * 12,13 sample 0 for right channel + * 14..n packed bytecodes + * + *===================================================================== +*/ +static int AdaptationTable[] = { + 230, 230, 230, 230, 307, 409, 512, 614, + 768, 614, 512, 409, 307, 230, 230, 230 +}; + +static int AdaptCoeff1[] = { + 256, 512, 0, 192, 240, 460, 392 +}; + +static int AdaptCoeff2[] = { + 0, -256, 0, 64, 0, -208, -232 +}; + +static gint16 +read_sample (guint8 * data) +{ + guint16 val = data[0] | (data[1] << 8); + return *((gint16 *) & val); +} + +/* Decode a single block of data from 'data', storing 'n_samples' decoded 16 bit + samples in 'samples'. + + All buffer lengths have been verified by the caller + */ +static gboolean +adpcmdec_decode_ms_block (ADPCMDec * dec, int n_samples, guint8 * data, + gint16 * samples) +{ + gint16 pred[2]; + gint16 idelta[2]; + int idx; /* Current byte offset in 'data' */ + int i; /* Current sample index in 'samples' */ + + /* Read the block header, verify for sanity */ + if (dec->channels == 1) { + pred[0] = data[0]; + idelta[0] = read_sample (data + 1); + samples[1] = read_sample (data + 3); + samples[0] = read_sample (data + 5); + idx = 7; + i = 2; + if (pred[0] < 0 || pred[0] > 6) { + GST_WARNING_OBJECT (dec, "Invalid block predictor"); + return FALSE; + } + } + + else { + pred[0] = data[0]; + pred[1] = data[1]; + idelta[0] = read_sample (data + 2); + idelta[1] = read_sample (data + 4); + samples[2] = read_sample (data + 6); + samples[3] = read_sample (data + 8); + samples[0] = read_sample (data + 10); + samples[1] = read_sample (data + 12); + idx = 14; + i = 4; + if (pred[0] < 0 || pred[0] > 6 || pred[1] < 0 || pred[1] > 6) { + GST_WARNING_OBJECT (dec, "Invalid block predictor"); + return FALSE; + } + } + for (; i < n_samples; i++) { + int chan = i % dec->channels; + int bytecode; + int delta; + int current; + int predict; + if (i % 2 == 0) { + bytecode = (data[idx] >> 4) & 0x0F; + } else { + bytecode = data[idx] & 0x0F; + idx++; + } + + delta = idelta[chan]; + idelta[chan] = (AdaptationTable[bytecode] * delta) >> 8; + if (idelta[chan] < 16) + idelta[chan] = 16; + + /* Bytecode is used above as an index into the table. Below, it's used + as a signed 4-bit value; convert appropriately */ + if (bytecode & 0x8) + bytecode -= 0x10; + + predict = ((samples[i - dec->channels] * AdaptCoeff1[pred[chan]]) + + (samples[i - 2 * dec->channels] * AdaptCoeff2[pred[chan]]) + ) >> 8; + + current = (bytecode * delta) + predict; + + /* Clamp to 16 bits, store decoded sample */ + samples[i] = CLAMP (current, G_MININT16, G_MAXINT16); + } + return TRUE; +} + +static GstFlowReturn +adpcmdec_chain (GstPad * pad, GstBuffer * buf) +{ + ADPCMDec *dec = (ADPCMDec *) gst_pad_get_parent (pad); + GstFlowReturn ret = GST_FLOW_OK; + guint8 *data; + GstBuffer *outbuf = NULL; + GstBuffer *databuf = NULL; + int outsize; + int samples; + gboolean res; + + if (!dec->is_setup) + adpcmdec_setup (dec); + + if (dec->timestamp == GST_CLOCK_TIME_NONE) + dec->timestamp = GST_BUFFER_TIMESTAMP (buf); + + gst_adapter_push (dec->adapter, buf); + + while (gst_adapter_available (dec->adapter) >= dec->blocksize) { + databuf = gst_adapter_take_buffer (dec->adapter, dec->blocksize); + data = GST_BUFFER_DATA (databuf); + + /* Each block has a 3 byte header per channel, plus 4 bytes per channel to + give two initial sample values per channel. Then the remainder gives + two samples per byte */ + samples = (dec->blocksize - 7 * dec->channels) * 2 + 2 * dec->channels; + outsize = 2 * samples; + outbuf = gst_buffer_new_and_alloc (outsize); + + res = adpcmdec_decode_ms_block (dec, samples, data, + (gint16 *) (GST_BUFFER_DATA (outbuf))); + + /* Done with input data, free it */ + gst_buffer_unref (databuf); + + if (!res) { + gst_buffer_unref (outbuf); + GST_WARNING_OBJECT (dec, "Decode of block failed"); + ret = GST_FLOW_ERROR; + goto done; + } + + gst_buffer_set_caps (outbuf, dec->output_caps); + GST_BUFFER_TIMESTAMP (outbuf) = dec->timestamp; + dec->out_samples += samples / dec->channels; + dec->timestamp = + gst_util_uint64_scale_int (dec->out_samples, GST_SECOND, dec->rate); + GST_BUFFER_DURATION (outbuf) = + dec->timestamp - GST_BUFFER_TIMESTAMP (outbuf); + + ret = gst_pad_push (dec->srcpad, outbuf); + if (ret != GST_FLOW_OK) + goto done; + } + +done: + gst_object_unref (dec); + + return ret; +} + +static gboolean +adpcmdec_sink_event (GstPad * pad, GstEvent * event) +{ + ADPCMDec *dec = (ADPCMDec *) gst_pad_get_parent (pad); + gboolean res; + switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_FLUSH_STOP: + gst_adapter_clear (dec->adapter); + /* Fall through */ + default: + res = gst_pad_push_event (dec->srcpad, event); + break; + } + gst_object_unref (dec); + return res; +} + +static GstStateChangeReturn +adpcmdec_change_state (GstElement * element, GstStateChange transition) +{ + GstStateChangeReturn ret; + ADPCMDec *dec = (ADPCMDec *) element; + + switch (transition) { + case GST_STATE_CHANGE_NULL_TO_READY: + break; + case GST_STATE_CHANGE_READY_TO_PAUSED: + break; + case GST_STATE_CHANGE_PAUSED_TO_PLAYING: + break; + default: + break; + } + + ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); + + switch (transition) { + case GST_STATE_CHANGE_PLAYING_TO_PAUSED: + break; + case GST_STATE_CHANGE_PAUSED_TO_READY: + adpcmdec_teardown (dec); + break; + case GST_STATE_CHANGE_READY_TO_NULL: + break; + default: + break; + } + return ret; +} + +static void +adpcmdec_dispose (GObject * obj) +{ + G_OBJECT_CLASS (parent_class)->dispose (obj); +} + +static void +adpcmdec_init (ADPCMDec * dec, ADPCMDecClass * klass) +{ + dec->sinkpad = + gst_pad_new_from_static_template (&adpcmdec_sink_template, "sink"); + gst_pad_set_setcaps_function (dec->sinkpad, + GST_DEBUG_FUNCPTR (adpcmdec_sink_setcaps)); + gst_pad_set_chain_function (dec->sinkpad, GST_DEBUG_FUNCPTR (adpcmdec_chain)); + gst_pad_set_event_function (dec->sinkpad, + GST_DEBUG_FUNCPTR (adpcmdec_sink_event)); + gst_element_add_pad (GST_ELEMENT (dec), dec->sinkpad); + dec->srcpad = + gst_pad_new_from_static_template (&adpcmdec_src_template, "src"); + gst_element_add_pad (GST_ELEMENT (dec), dec->srcpad); +} + +static void +adpcmdec_class_init (ADPCMDecClass * klass) +{ + GObjectClass *gobjectclass = (GObjectClass *) klass; + GstElementClass *gstelement_class = (GstElementClass *) klass; + gobjectclass->dispose = adpcmdec_dispose; + gstelement_class->change_state = adpcmdec_change_state; +} static void + +adpcmdec_base_init (gpointer klass) +{ + GstElementClass *element_class = GST_ELEMENT_CLASS (klass); + gst_element_class_add_pad_template (element_class, + gst_static_pad_template_get (&adpcmdec_sink_template)); + gst_element_class_add_pad_template (element_class, + gst_static_pad_template_get (&adpcmdec_src_template)); + gst_element_class_set_details (element_class, &adpcmdec_details); +} + +static gboolean +plugin_init (GstPlugin * plugin) +{ + GST_DEBUG_CATEGORY_INIT (adpcmdec_debug, "adpcmdec", 0, "ADPCM Decoders"); + if (!gst_element_register (plugin, "msadpcmdec", GST_RANK_PRIMARY, + GST_TYPE_ADPCM_DEC)) { + return FALSE; + } + return TRUE; +} + +GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, "adpcmdec", + "ADPCM decoder", plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, + GST_PACKAGE_ORIGIN); -- cgit v1.2.1 From b8773b13e4b378c10a4726a0bfc3c0eb1658f1b6 Mon Sep 17 00:00:00 2001 From: Christian Schaller Date: Sat, 23 May 2009 13:11:28 +0100 Subject: Update spec file --- gst-plugins-bad.spec.in | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gst-plugins-bad.spec.in b/gst-plugins-bad.spec.in index 94efad25..d9031f54 100644 --- a/gst-plugins-bad.spec.in +++ b/gst-plugins-bad.spec.in @@ -79,9 +79,7 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/gstreamer-%{majorminor}/libgstfreeze.so %{_libdir}/gstreamer-%{majorminor}/libgsth264parse.so %{_libdir}/gstreamer-%{majorminor}/libgstnsf.so -%{_libdir}/gstreamer-%{majorminor}/libgstdeinterlace.so %{_libdir}/gstreamer-%{majorminor}/libgstnuvdemux.so -%{_libdir}/gstreamer-%{majorminor}/libgsty4menc.so %{_libdir}/gstreamer-%{majorminor}/libgstrfbsrc.so %{_libdir}/gstreamer-%{majorminor}/libgstreal.so %{_libdir}/gstreamer-%{majorminor}/libgstmve.so @@ -101,7 +99,6 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/gstreamer-%{majorminor}/libgstselector.so %{_libdir}/gstreamer-%{majorminor}/libgstsubenc.so %{_libdir}/gstreamer-%{majorminor}/libgstoss4audio.so -%{_libdir}/gstreamer-%{majorminor}/libgstdeinterlace2.so %{_libdir}/gstreamer-%{majorminor}/libresindvd.so %{_libdir}/gstreamer-%{majorminor}/libgstaiffparse.so %{_libdir}/gstreamer-%{majorminor}/libgstdccp.so @@ -109,7 +106,6 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/gstreamer-%{majorminor}/libgstmpegtsmux.so %{_libdir}/gstreamer-%{majorminor}/libgstscaletempoplugin.so %{_libdir}/gstreamer-%{majorminor}/libgstmpegdemux.so -%{_libdir}/gstreamer-%{majorminor}/libgstflv.so %{_libdir}/gstreamer-%{majorminor}/libgstjp2k.so %{_libdir}/gstreamer-%{majorminor}/libgstapexsink.so %{_libdir}/gstreamer-%{majorminor}/libgstaacparse.so @@ -126,6 +122,8 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/gstreamer-%{majorminor}/libgstrtpmux.so %{_libdir}/gstreamer-%{majorminor}/libgstsiren.so %{_libdir}/gstreamer-%{majorminor}/libgstxdgmime.so +%{_libdir}/gstreamer-%{majorminor}/libgstadpcmdec.so +%{_libdir}/gstreamer-%{majorminor}/libgstid3tag.so %{_libdir}/gstreamer-%{majorminor}/libgstdebugutilsbad.so %{_includedir}/gstreamer-%{majorminor}/gst/interfaces/photography-enumtypes.h %{_includedir}/gstreamer-%{majorminor}/gst/interfaces/photography.h -- cgit v1.2.1 From 43b755312bca15f74440bc1beba92c21f9ea3ccd Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 25 May 2009 11:18:57 +0200 Subject: x264enc: add multipass-cache-file property Fixes #583627 --- ext/x264/gstx264enc.c | 30 +++++++++++++++++++----------- ext/x264/gstx264enc.h | 2 +- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/ext/x264/gstx264enc.c b/ext/x264/gstx264enc.c index fcafdd3d..0bcd4434 100644 --- a/ext/x264/gstx264enc.c +++ b/ext/x264/gstx264enc.c @@ -76,6 +76,7 @@ enum ARG_PASS, ARG_QUANTIZER, ARG_STATS_FILE, + ARG_MULTIPASS_CACHE_FILE, ARG_BYTE_STREAM, ARG_BITRATE, ARG_VBV_BUF_CAPACITY, @@ -104,7 +105,8 @@ enum #define ARG_THREADS_DEFAULT 1 #define ARG_PASS_DEFAULT 0 #define ARG_QUANTIZER_DEFAULT 21 -#define ARG_STATS_FILE_DEFAULT "x264.log" +#define ARG_MULTIPASS_CACHE_FILE_DEFAULT "x264.log" +#define ARG_STATS_FILE_DEFAULT ARG_MULTIPASS_CACHE_FILE_DEFAULT #define ARG_BYTE_STREAM_DEFAULT FALSE #define ARG_BITRATE_DEFAULT (2 * 1024) #define ARG_VBV_BUF_CAPACITY_DEFAULT 600 @@ -300,8 +302,12 @@ gst_x264_enc_class_init (GstX264EncClass * klass) 1, 50, ARG_QUANTIZER_DEFAULT, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, ARG_STATS_FILE, g_param_spec_string ("stats-file", "Stats File", - "Filename for multipass statistics", + "Filename for multipass statistics (deprecated, use multipass-stats-file)", ARG_STATS_FILE_DEFAULT, G_PARAM_READWRITE)); + g_object_class_install_property (gobject_class, ARG_MULTIPASS_CACHE_FILE, + g_param_spec_string ("multipass-cache-file", "Multipass Cache File", + "Filename for multipass cache file", + ARG_MULTIPASS_CACHE_FILE_DEFAULT, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, ARG_BYTE_STREAM, g_param_spec_boolean ("byte-stream", "Byte Stream", "Generate byte stream format of NALU", @@ -448,7 +454,7 @@ gst_x264_enc_init (GstX264Enc * encoder, GstX264EncClass * klass) encoder->threads = ARG_THREADS_DEFAULT; encoder->pass = ARG_PASS_DEFAULT; encoder->quantizer = ARG_QUANTIZER_DEFAULT; - encoder->stats_file = g_strdup (ARG_STATS_FILE_DEFAULT); + encoder->mp_cache_file = g_strdup (ARG_MULTIPASS_CACHE_FILE_DEFAULT); encoder->byte_stream = ARG_BYTE_STREAM_DEFAULT; encoder->bitrate = ARG_BITRATE_DEFAULT; encoder->vbv_buf_capacity = ARG_VBV_BUF_CAPACITY_DEFAULT; @@ -502,8 +508,8 @@ gst_x264_enc_finalize (GObject * object) { GstX264Enc *encoder = GST_X264_ENC (object); - g_free (encoder->stats_file); - encoder->stats_file = NULL; + g_free (encoder->mp_cache_file); + encoder->mp_cache_file = NULL; g_free (encoder->buffer); encoder->buffer = NULL; g_queue_free (encoder->delay); @@ -637,8 +643,8 @@ gst_x264_enc_init_encoder (GstX264Enc * encoder) encoder->x264param.rc.b_stat_write = 1; break; } - encoder->x264param.rc.psz_stat_in = encoder->stats_file; - encoder->x264param.rc.psz_stat_out = encoder->stats_file; + encoder->x264param.rc.psz_stat_in = encoder->mp_cache_file; + encoder->x264param.rc.psz_stat_out = encoder->mp_cache_file; GST_OBJECT_UNLOCK (encoder); @@ -1110,9 +1116,10 @@ gst_x264_enc_set_property (GObject * object, guint prop_id, encoder->quantizer = g_value_get_uint (value); break; case ARG_STATS_FILE: - if (encoder->stats_file) - g_free (encoder->stats_file); - encoder->stats_file = g_value_dup_string (value); + case ARG_MULTIPASS_CACHE_FILE: + if (encoder->mp_cache_file) + g_free (encoder->mp_cache_file); + encoder->mp_cache_file = g_value_dup_string (value); break; case ARG_BYTE_STREAM: encoder->byte_stream = g_value_get_boolean (value); @@ -1218,7 +1225,8 @@ gst_x264_enc_get_property (GObject * object, guint prop_id, g_value_set_uint (value, encoder->quantizer); break; case ARG_STATS_FILE: - g_value_set_string (value, encoder->stats_file); + case ARG_MULTIPASS_CACHE_FILE: + g_value_set_string (value, encoder->mp_cache_file); break; case ARG_BYTE_STREAM: g_value_set_boolean (value, encoder->byte_stream); diff --git a/ext/x264/gstx264enc.h b/ext/x264/gstx264enc.h index 7cebf112..15ffe65e 100644 --- a/ext/x264/gstx264enc.h +++ b/ext/x264/gstx264enc.h @@ -57,7 +57,7 @@ struct _GstX264Enc guint threads; gint pass; guint quantizer; - gchar *stats_file; + gchar *mp_cache_file; gboolean byte_stream; guint bitrate; gint me; -- cgit v1.2.1 From 1abaa6f78cfa1040bd3d0229ed5b035f3793bea7 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 25 May 2009 13:33:20 +0200 Subject: tests: add receive rtpbin unit test --- tests/check/elements/rtpbin.c | 206 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 206 insertions(+) diff --git a/tests/check/elements/rtpbin.c b/tests/check/elements/rtpbin.c index 60ebd7af..bc30c918 100644 --- a/tests/check/elements/rtpbin.c +++ b/tests/check/elements/rtpbin.c @@ -100,6 +100,211 @@ GST_START_TEST (test_cleanup_send) GST_END_TEST; +typedef struct +{ + guint16 seqnum; + gboolean pad_added; + GstPad *pad; + GMutex *lock; + GCond *cond; + GstPad *sinkpad; + GList *pads; +} CleanupData; + +static void +init_data (CleanupData * data) +{ + data->seqnum = 10; + data->pad_added = FALSE; + data->lock = g_mutex_new (); + data->cond = g_cond_new (); + data->pads = NULL; +} + +static void +clean_data (CleanupData * data) +{ + g_list_foreach (data->pads, (GFunc) gst_object_unref, NULL); + g_list_free (data->pads); + g_mutex_free (data->lock); + g_cond_free (data->cond); +} + +static guint8 rtp_packet[] = { 0x80, 0x60, 0x94, 0xbc, 0x8f, 0x37, 0x4e, 0xb8, + 0x44, 0xa8, 0xf3, 0x7c, 0x06, 0x6a, 0x0c, 0xce, + 0x13, 0x25, 0x19, 0x69, 0x1f, 0x93, 0x25, 0x9d, + 0x2b, 0x82, 0x31, 0x3b, 0x36, 0xc1, 0x3c, 0x13 +}; + +static GstBuffer * +make_rtp_packet (CleanupData * data) +{ + static GstCaps *caps = NULL; + GstBuffer *result; + guint8 *datap; + + if (caps == NULL) { + caps = gst_caps_from_string ("application/x-rtp," + "media=(string)audio, clock-rate=(int)44100, " + "encoding-name=(string)L16, encoding-params=(string)1, channels=(int)1"); + data->seqnum = 0; + } + + result = gst_buffer_new_and_alloc (sizeof (rtp_packet)); + datap = GST_BUFFER_DATA (result); + memcpy (datap, rtp_packet, sizeof (rtp_packet)); + + datap[2] = (data->seqnum >> 8) & 0xff; + datap[3] = data->seqnum & 0xff; + + data->seqnum++; + + gst_buffer_set_caps (result, caps); + + return result; +} + +static GstFlowReturn +dummy_chain (GstPad * pad, GstBuffer * buffer) +{ + gst_buffer_unref (buffer); + + return GST_FLOW_OK; +} + +static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", + GST_PAD_SINK, + GST_PAD_ALWAYS, + GST_STATIC_CAPS ("application/x-rtp")); + + +static GstPad * +make_sinkpad (CleanupData * data) +{ + GstPad *pad; + + pad = gst_pad_new_from_static_template (&sink_factory, "sink"); + + gst_pad_set_chain_function (pad, dummy_chain); + gst_pad_set_active (pad, TRUE); + + data->pads = g_list_prepend (data->pads, pad); + + return pad; +} + +static void +pad_added_cb (GstElement * rtpbin, GstPad * pad, CleanupData * data) +{ + GstPad *sinkpad; + + GST_DEBUG ("pad added %s:%s\n", GST_DEBUG_PAD_NAME (pad)); + + if (GST_PAD_IS_SINK (pad)) + return; + + fail_unless (data->pad_added == FALSE); + + sinkpad = make_sinkpad (data); + fail_unless (gst_pad_link (pad, sinkpad) == GST_PAD_LINK_OK); + + g_mutex_lock (data->lock); + data->pad_added = TRUE; + data->pad = pad; + g_cond_signal (data->cond); + g_mutex_unlock (data->lock); +} + +static void +pad_removed_cb (GstElement * rtpbin, GstPad * pad, CleanupData * data) +{ + GST_DEBUG ("pad removed %s:%s\n", GST_DEBUG_PAD_NAME (pad)); + + if (data->pad != pad) + return; + + fail_unless (data->pad_added == TRUE); + + g_mutex_lock (data->lock); + data->pad_added = FALSE; + g_cond_signal (data->cond); + g_mutex_unlock (data->lock); +} + +GST_START_TEST (test_cleanup_recv) +{ + GstElement *rtpbin; + GstPad *rtp_sink; + CleanupData data; + GstStateChangeReturn ret; + GstFlowReturn res; + GstBuffer *buffer; + gint count = 2; + + init_data (&data); + + rtpbin = gst_element_factory_make ("gstrtpbin", "rtpbin"); + + g_signal_connect (rtpbin, "pad-added", (GCallback) pad_added_cb, &data); + g_signal_connect (rtpbin, "pad-removed", (GCallback) pad_removed_cb, &data); + + ret = gst_element_set_state (rtpbin, GST_STATE_PLAYING); + fail_unless (ret == GST_STATE_CHANGE_SUCCESS); + + while (count--) { + /* request session 0 */ + rtp_sink = gst_element_get_request_pad (rtpbin, "recv_rtp_sink_0"); + fail_unless (rtp_sink != NULL); + ASSERT_OBJECT_REFCOUNT (rtp_sink, "rtp_sink", 2); + + /* no sourcepads are created yet */ + fail_unless (rtpbin->numsinkpads == 1); + fail_unless (rtpbin->numsrcpads == 0); + + buffer = make_rtp_packet (&data); + res = gst_pad_chain (rtp_sink, buffer); + GST_DEBUG ("res %d, %s\n", res, gst_flow_get_name (res)); + fail_unless (res == GST_FLOW_OK); + + buffer = make_rtp_packet (&data); + res = gst_pad_chain (rtp_sink, buffer); + GST_DEBUG ("res %d, %s\n", res, gst_flow_get_name (res)); + fail_unless (res == GST_FLOW_OK); + + /* we wait for the new pad to appear now */ + g_mutex_lock (data.lock); + while (!data.pad_added) + g_cond_wait (data.cond, data.lock); + g_mutex_unlock (data.lock); + + /* sourcepad created now */ + fail_unless (rtpbin->numsinkpads == 1); + fail_unless (rtpbin->numsrcpads == 1); + + /* remove the session */ + gst_element_release_request_pad (rtpbin, rtp_sink); + gst_object_unref (rtp_sink); + + /* pad should be gone now */ + g_mutex_lock (data.lock); + while (data.pad_added) + g_cond_wait (data.cond, data.lock); + g_mutex_unlock (data.lock); + + /* nothing left anymore now */ + fail_unless (rtpbin->numsinkpads == 0); + fail_unless (rtpbin->numsrcpads == 0); + } + + ret = gst_element_set_state (rtpbin, GST_STATE_NULL); + fail_unless (ret == GST_STATE_CHANGE_SUCCESS); + + gst_object_unref (rtpbin); + + clean_data (&data); +} + +GST_END_TEST; Suite * gstrtpbin_suite (void) @@ -109,6 +314,7 @@ gstrtpbin_suite (void) suite_add_tcase (s, tc_chain); tcase_add_test (tc_chain, test_cleanup_send); + tcase_add_test (tc_chain, test_cleanup_recv); return s; } -- cgit v1.2.1 From 269f3ff1a270e1c3cd9b6204c7171d47eb7dfbf1 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 25 May 2009 13:46:29 +0200 Subject: rtpbin: remove ptdemux ghostpads --- gst/rtpmanager/gstrtpbin.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c index 017ffc02..19de4f1b 100644 --- a/gst/rtpmanager/gstrtpbin.c +++ b/gst/rtpmanager/gstrtpbin.c @@ -306,6 +306,8 @@ struct _GstRtpBinStream gulong demux_newpad_sig; gulong demux_ptreq_sig; gulong demux_pt_change_sig; + /* ghostpads from the ptdemuxer */ + GSList *pads; /* if we have calculated a valid unix_delta for this stream */ gboolean have_sync; @@ -1169,6 +1171,7 @@ static void free_stream (GstRtpBinStream * stream) { GstRtpBinSession *session; + GSList *walk; session = stream->session; @@ -1184,6 +1187,14 @@ free_stream (GstRtpBinStream * stream) gst_bin_remove (GST_BIN_CAST (session->bin), stream->buffer); gst_bin_remove (GST_BIN_CAST (session->bin), stream->demux); + for (walk = stream->pads; walk; walk = g_slist_next (walk)) { + GstPad *gpad = GST_PAD_CAST (walk->data); + + gst_pad_set_active (gpad, FALSE); + gst_element_remove_pad (GST_ELEMENT_CAST (session->bin), gpad); + } + g_slist_free (stream->pads); + g_free (stream); } @@ -1880,6 +1891,8 @@ new_payload_found (GstElement * element, guint pt, GstPad * pad, gst_pad_set_active (gpad, TRUE); gst_element_add_pad (GST_ELEMENT_CAST (rtpbin), gpad); + stream->pads = g_slist_prepend (stream->pads, gpad); + GST_RTP_BIN_SHUTDOWN_UNLOCK (rtpbin); return; -- cgit v1.2.1 From 46b4d226ca6ed4efa7574ad7bae46af8c73fc7bd Mon Sep 17 00:00:00 2001 From: Mathias Hasselmann Date: Mon, 25 May 2009 17:24:32 +0200 Subject: neonhttp: add property to support SS cerificates Add a property to support self-signed certificates in neonhttpsrc. This property is FALSE by default. Fixes #511097 --- ext/neon/gstneonhttpsrc.c | 71 +++++++++++++++++++++++++++++++++++------------ ext/neon/gstneonhttpsrc.h | 3 ++ 2 files changed, 57 insertions(+), 17 deletions(-) diff --git a/ext/neon/gstneonhttpsrc.c b/ext/neon/gstneonhttpsrc.c index 739b0132..1af733db 100644 --- a/ext/neon/gstneonhttpsrc.c +++ b/ext/neon/gstneonhttpsrc.c @@ -63,6 +63,7 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src", #define DEFAULT_IRADIO_GENRE NULL #define DEFAULT_IRADIO_URL NULL #define DEFAULT_AUTOMATIC_REDIRECT TRUE +#define DEFAULT_ACCEPT_SELF_SIGNED FALSE #define DEFAULT_NEON_HTTP_DEBUG FALSE enum @@ -76,6 +77,7 @@ enum PROP_IRADIO_GENRE, PROP_IRADIO_URL, PROP_AUTOMATIC_REDIRECT, + PROP_ACCEPT_SELF_SIGNED, #ifndef GST_DISABLE_GST_DEBUG PROP_NEON_HTTP_DEBUG #endif @@ -200,6 +202,12 @@ gst_neonhttp_src_class_init (GstNeonhttpSrcClass * klass) "Automatically follow HTTP redirects (HTTP Status Code 302/303)", TRUE, G_PARAM_READWRITE)); + g_object_class_install_property + (gobject_class, PROP_ACCEPT_SELF_SIGNED, + g_param_spec_boolean ("accept-self-signed", "accept-self-signed", + "Accept self-signed SSL/TLS certificates", + DEFAULT_ACCEPT_SELF_SIGNED, G_PARAM_READWRITE)); + #ifndef GST_DISABLE_GST_DEBUG g_object_class_install_property (gobject_class, PROP_NEON_HTTP_DEBUG, @@ -233,6 +241,7 @@ gst_neonhttp_src_init (GstNeonhttpSrc * src, GstNeonhttpSrcClass * g_class) src->iradio_url = DEFAULT_IRADIO_URL; src->user_agent = g_strdup (DEFAULT_USER_AGENT); src->automatic_redirect = DEFAULT_AUTOMATIC_REDIRECT; + src->accept_self_signed = DEFAULT_ACCEPT_SELF_SIGNED; src->session = NULL; src->request = NULL; @@ -332,28 +341,23 @@ gst_neonhttp_src_set_property (GObject * object, guint prop_id, break; } case PROP_USER_AGENT: - { if (src->user_agent) g_free (src->user_agent); src->user_agent = g_strdup (g_value_get_string (value)); break; - } case PROP_IRADIO_MODE: - { src->iradio_mode = g_value_get_boolean (value); break; - } case PROP_AUTOMATIC_REDIRECT: - { src->automatic_redirect = g_value_get_boolean (value); break; - } + case PROP_ACCEPT_SELF_SIGNED: + src->accept_self_signed = g_value_get_boolean (value); + break; #ifndef GST_DISABLE_GST_DEBUG case PROP_NEON_HTTP_DEBUG: - { src->neon_http_debug = g_value_get_boolean (value); break; - } #endif default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); @@ -401,10 +405,8 @@ gst_neonhttp_src_get_property (GObject * object, guint prop_id, break; } case PROP_USER_AGENT: - { g_value_set_string (value, neonhttpsrc->user_agent); break; - } case PROP_IRADIO_MODE: g_value_set_boolean (value, neonhttpsrc->iradio_mode); break; @@ -420,6 +422,9 @@ gst_neonhttp_src_get_property (GObject * object, guint prop_id, case PROP_AUTOMATIC_REDIRECT: g_value_set_boolean (value, neonhttpsrc->automatic_redirect); break; + case PROP_ACCEPT_SELF_SIGNED: + g_value_set_boolean (value, neonhttpsrc->accept_self_signed); + break; #ifndef GST_DISABLE_GST_DEBUG case PROP_NEON_HTTP_DEBUG: g_value_set_boolean (value, neonhttpsrc->neon_http_debug); @@ -431,6 +436,13 @@ gst_neonhttp_src_get_property (GObject * object, guint prop_id, } } +/* NEON CALLBACK */ +static void +oom_callback () +{ + GST_ERROR ("memory exeception in neon"); +} + static GstFlowReturn gst_neonhttp_src_create (GstPushSrc * psrc, GstBuffer ** outbuf) { @@ -772,6 +784,37 @@ error: } } +static int +ssl_verify_callback (void *data, int failures, const ne_ssl_certificate * cert) +{ + GstNeonhttpSrc *src = GST_NEONHTTP_SRC (data); + + if ((failures & NE_SSL_UNTRUSTED) && + src->accept_self_signed && !ne_ssl_cert_signedby (cert)) { + GST_ELEMENT_INFO (src, RESOURCE, READ, + (NULL), ("Accepting self-signed server certificate")); + + failures &= ~NE_SSL_UNTRUSTED; + } + + if (failures & NE_SSL_NOTYETVALID) + GST_ELEMENT_ERROR (src, RESOURCE, READ, + (NULL), ("Server certificate not valid yet")); + if (failures & NE_SSL_EXPIRED) + GST_ELEMENT_ERROR (src, RESOURCE, READ, + (NULL), ("Server certificate has expired")); + if (failures & NE_SSL_IDMISMATCH) + GST_ELEMENT_ERROR (src, RESOURCE, READ, + (NULL), ("Server certificate doesn't match hostname")); + if (failures & NE_SSL_UNTRUSTED) + GST_ELEMENT_ERROR (src, RESOURCE, READ, + (NULL), ("Server certificate signer not trusted")); + + GST_DEBUG_OBJECT (src, "failures: %d\n", failures); + + return failures; +} + /* Try to send the HTTP request to the Icecast server, and if possible deals with * all the probable redirections (HTTP status code == 302/303) */ @@ -799,6 +842,7 @@ gst_neonhttp_src_send_request_and_redirect (GstNeonhttpSrc * src, } ne_set_session_flag (session, NE_SESSFLAG_ICYPROTO, 1); + ne_ssl_set_verify (session, ssl_verify_callback, src); request = ne_request_create (session, "GET", src->query_string); @@ -1014,13 +1058,6 @@ gst_neonhttp_src_uri_handler_init (gpointer g_iface, gpointer iface_data) iface->set_uri = gst_neonhttp_src_uri_set_uri; } -/* NEON CALLBACK */ -static void -oom_callback () -{ - GST_ERROR ("memory exeception in neon"); -} - /* entry point to initialize the plug-in * initialize the plug-in itself * register the element factories and pad templates diff --git a/ext/neon/gstneonhttpsrc.h b/ext/neon/gstneonhttpsrc.h index 68383485..f88c964c 100644 --- a/ext/neon/gstneonhttpsrc.h +++ b/ext/neon/gstneonhttpsrc.h @@ -71,6 +71,9 @@ struct _GstNeonhttpSrc { /* enable Neon HTTP debug messages */ gboolean neon_http_debug; + /* accept self-signed certificates */ + gboolean accept_self_signed; + gint64 read_position; gboolean seekable; }; -- cgit v1.2.1 From f92f282874addd1091e2d03b25033a12f151eb83 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 25 May 2009 15:21:12 +0200 Subject: mpegtsdemux: Add mapping for HDV private streams --- gst/mpegdemux/gstmpegdefs.h | 2 ++ gst/mpegdemux/gstmpegtsdemux.c | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/gst/mpegdemux/gstmpegdefs.h b/gst/mpegdemux/gstmpegdefs.h index 7f38f4de..d63667d8 100644 --- a/gst/mpegdemux/gstmpegdefs.h +++ b/gst/mpegdemux/gstmpegdefs.h @@ -170,6 +170,8 @@ #define ST_PS_AUDIO_AC3 0x81 #define ST_PS_AUDIO_DTS 0x8a #define ST_PS_AUDIO_LPCM 0x8b +#define ST_HDV_PRIVATE_A0 0xa0 +#define ST_HDV_PRIVATE_A1 0xa1 #define ST_PS_DVD_SUBPICTURE 0xff /* Un-official time-code stream */ diff --git a/gst/mpegdemux/gstmpegtsdemux.c b/gst/mpegdemux/gstmpegtsdemux.c index 6438e880..a4d32e36 100644 --- a/gst/mpegdemux/gstmpegtsdemux.c +++ b/gst/mpegdemux/gstmpegtsdemux.c @@ -620,6 +620,16 @@ gst_mpegts_demux_fill_stream (GstMpegTSStream * stream, guint8 id, caps = gst_caps_new_simple ("private/teletext", NULL); } break; + case ST_HDV_PRIVATE_A0: + template = klass->private_template; + name = g_strdup_printf ("private_%04x", stream->PID); + caps = gst_caps_new_simple ("private/hdv-a0", NULL); + break; + case ST_HDV_PRIVATE_A1: + template = klass->private_template; + name = g_strdup_printf ("private_%04x", stream->PID); + caps = gst_caps_new_simple ("private/hdv-a1", NULL); + break; case ST_PRIVATE_SECTIONS: case ST_MHEG: case ST_DSMCC: -- cgit v1.2.1 From 36cc757bdacbfbeadfce70040fd424b5e7bb2e8b Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 25 May 2009 15:21:52 +0200 Subject: mpegtsdemux: Ignore NULL packets as early as possible. This avoids: * creating a MpegTSStream structure for nothing * processing packet data for nothing --- gst/mpegdemux/gstmpegtsdemux.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gst/mpegdemux/gstmpegtsdemux.c b/gst/mpegdemux/gstmpegtsdemux.c index a4d32e36..cd64a295 100644 --- a/gst/mpegdemux/gstmpegtsdemux.c +++ b/gst/mpegdemux/gstmpegtsdemux.c @@ -2347,7 +2347,7 @@ static FORCE_INLINE GstFlowReturn gst_mpegts_demux_parse_transport_packet (GstMpegTSDemux * demux, const guint8 * data) { - GstFlowReturn ret; + GstFlowReturn ret = GST_FLOW_OK; guint16 PID; GstMpegTSStream *stream; @@ -2357,6 +2357,10 @@ gst_mpegts_demux_parse_transport_packet (GstMpegTSDemux * demux, /* get PID */ PID = ((data[0] & 0x1f) << 8) | data[1]; + /* Skip NULL packets */ + if (G_UNLIKELY (PID == 0x1fff)) + goto beach; + /* get the stream. */ stream = gst_mpegts_demux_get_stream_for_PID (demux, PID); @@ -2387,6 +2391,8 @@ gst_mpegts_demux_parse_transport_packet (GstMpegTSDemux * demux, demux->num_packets = -1; } } + +beach: demux->num_packets++; return ret; -- cgit v1.2.1 From 849ea993587746eff034f5788569e7a991af716b Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 25 May 2009 16:25:42 +0200 Subject: gstpesfilter: Don't skip private streams PES but push them out. The one thing we *DO* need to do for those streams is to skip all the PTS/DTS/Scrambling/DSM/extension/... handling. --- gst/mpegdemux/gstpesfilter.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gst/mpegdemux/gstpesfilter.c b/gst/mpegdemux/gstpesfilter.c index 1295a193..a2a6b764 100644 --- a/gst/mpegdemux/gstpesfilter.c +++ b/gst/mpegdemux/gstpesfilter.c @@ -189,7 +189,8 @@ gst_pes_filter_parse (GstPESFilter * filter) case ID_PROGRAM_STREAM_DIRECTORY: case ID_DSMCC_STREAM: case ID_ITU_TREC_H222_TYPE_E_STREAM: - goto skip; + /* Push directly out */ + goto push_out; case ID_PADDING_STREAM: GST_DEBUG ("skipping padding stream"); goto skip; @@ -404,6 +405,7 @@ gst_pes_filter_parse (GstPESFilter * filter) goto lost_sync; } +push_out: { GstBuffer *out; guint16 consumed; -- cgit v1.2.1 From 410d8f891035656606382c423e57ae289c17a9be Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 25 May 2009 16:27:34 +0200 Subject: gstpesfilter: Don't peek the adapter if we don't have enough data. --- gst/mpegdemux/gstpesfilter.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gst/mpegdemux/gstpesfilter.c b/gst/mpegdemux/gstpesfilter.c index a2a6b764..4285c940 100644 --- a/gst/mpegdemux/gstpesfilter.c +++ b/gst/mpegdemux/gstpesfilter.c @@ -167,6 +167,9 @@ gst_pes_filter_parse (GstPESFilter * filter) avail = MIN (avail, filter->length + 6); } + if (avail < 7) + goto need_more_data; + /* read more data, either the whole packet if there is a length * or whatever we have available if this in an unbounded packet. */ if (!(data = gst_adapter_peek (filter->adapter, avail))) @@ -198,9 +201,6 @@ gst_pes_filter_parse (GstPESFilter * filter) break; } - if (datalen < 1) - goto need_more_data; - filter->pts = filter->dts = -1; /* stuffing bits, first two bits are '10' for mpeg2 pes so this code is -- cgit v1.2.1 From 023af351fba4b22db782b39f4aa8ae75b70cc10f Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 11 May 2009 19:30:34 +0200 Subject: gstpesfilter: Directly use gst_adapter_take_buffer(). --- gst/mpegdemux/gstpesfilter.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/gst/mpegdemux/gstpesfilter.c b/gst/mpegdemux/gstpesfilter.c index 4285c940..b520c766 100644 --- a/gst/mpegdemux/gstpesfilter.c +++ b/gst/mpegdemux/gstpesfilter.c @@ -565,14 +565,8 @@ gst_pes_filter_process (GstPESFilter * filter) ret = GST_FLOW_OK; } else { GstBuffer *out; - guint8 *data; - data = gst_adapter_take (filter->adapter, avail); - - out = gst_buffer_new (); - GST_BUFFER_DATA (out) = data; - GST_BUFFER_SIZE (out) = avail; - GST_BUFFER_MALLOCDATA (out) = data; + out = gst_adapter_take_buffer (filter->adapter, avail); ret = gst_pes_filter_data_push (filter, filter->first, out); filter->first = FALSE; -- cgit v1.2.1 From 707eaf7684a5da186448f99e36174801d185ef36 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 26 May 2009 15:40:52 +0200 Subject: rtpsource: byteswap the port from GstNetAddress Since the port in GstNetAddress is in network order we might need to byteswap it before adding it to the source statistics. --- gst/rtpmanager/rtpsource.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gst/rtpmanager/rtpsource.c b/gst/rtpmanager/rtpsource.c index 6a3dc604..355526ee 100644 --- a/gst/rtpmanager/rtpsource.c +++ b/gst/rtpmanager/rtpsource.c @@ -201,7 +201,8 @@ make_address_string (GstNetAddress * addr, gchar * dest, gulong n) gst_netaddress_get_ip4_address (addr, &address, &port); g_snprintf (dest, n, "%d.%d.%d.%d:%d", (address >> 24) & 0xff, - (address >> 16) & 0xff, (address >> 8) & 0xff, address & 0xff, port); + (address >> 16) & 0xff, (address >> 8) & 0xff, address & 0xff, + g_ntohs (port)); break; } case GST_NET_TYPE_IP6: @@ -216,7 +217,7 @@ make_address_string (GstNetAddress * addr, gchar * dest, gulong n) (address[4] << 8) | address[5], (address[6] << 8) | address[7], (address[8] << 8) | address[9], (address[10] << 8) | address[11], (address[12] << 8) | address[13], (address[14] << 8) | address[15], - port); + g_ntohs (port)); break; } default: -- cgit v1.2.1 From a7cd4b03ad403bb49ac217887544451edcdbc59d Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 22 May 2009 13:07:38 +0100 Subject: dvdspu: Don't accidentally lose the colour palette when flushing the SPU Fixes racy startup on DVDs where it sometimes gets entirely the wrong set of colours in the menus and subtitles. --- gst/dvdspu/gstdvdspu.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/gst/dvdspu/gstdvdspu.c b/gst/dvdspu/gstdvdspu.c index 703c405b..dc606d21 100644 --- a/gst/dvdspu/gstdvdspu.c +++ b/gst/dvdspu/gstdvdspu.c @@ -101,10 +101,12 @@ static GstFlowReturn gst_dvd_spu_subpic_chain (GstPad * pad, GstBuffer * buf); static gboolean gst_dvd_spu_subpic_event (GstPad * pad, GstEvent * event); static void gst_dvd_spu_clear (GstDVDSpu * dvdspu); -static void gst_dvd_spu_flush_spu_info (GstDVDSpu * dvdspu); +static void gst_dvd_spu_flush_spu_info (GstDVDSpu * dvdspu, + gboolean process_events); static void gst_dvd_spu_advance_spu (GstDVDSpu * dvdspu, GstClockTime new_ts); static GstFlowReturn dvdspu_handle_vid_buffer (GstDVDSpu * dvdspu, GstBuffer * buf); +static void gst_dvd_spu_handle_dvd_event (GstDVDSpu * dvdspu, GstEvent * event); static void gst_dvd_spu_base_init (gpointer gclass) @@ -179,7 +181,8 @@ gst_dvd_spu_init (GstDVDSpu * dvdspu, GstDVDSpuClass * gclass) static void gst_dvd_spu_clear (GstDVDSpu * dvdspu) { - gst_dvd_spu_flush_spu_info (dvdspu); + gst_dvd_spu_flush_spu_info (dvdspu, FALSE); + gst_segment_init (&dvdspu->subp_seg, GST_FORMAT_UNDEFINED); gst_buffer_replace (&dvdspu->ref_frame, NULL); gst_buffer_replace (&dvdspu->pending_frame, NULL); @@ -223,15 +226,13 @@ gst_dvd_spu_finalize (GObject * object) /* With SPU lock held, clear the queue of SPU packets */ static void -gst_dvd_spu_flush_spu_info (GstDVDSpu * dvdspu) +gst_dvd_spu_flush_spu_info (GstDVDSpu * dvdspu, gboolean process_events) { SpuPacket *packet; SpuState *state = &dvdspu->spu_state; GST_INFO_OBJECT (dvdspu, "Flushing SPU information"); - gst_segment_init (&dvdspu->subp_seg, GST_FORMAT_UNDEFINED); - if (dvdspu->partial_spu) { gst_buffer_unref (dvdspu->partial_spu); dvdspu->partial_spu = NULL; @@ -239,10 +240,15 @@ gst_dvd_spu_flush_spu_info (GstDVDSpu * dvdspu) packet = (SpuPacket *) g_queue_pop_head (dvdspu->pending_spus); while (packet != NULL) { - if (packet->buf) + if (packet->buf) { gst_buffer_unref (packet->buf); - if (packet->event) - gst_event_unref (packet->event); + g_assert (packet->event == NULL); + } else if (packet->event) { + if (process_events) + gst_dvd_spu_handle_dvd_event (dvdspu, packet->event); + else + gst_event_unref (packet->event); + } g_free (packet); packet = (SpuPacket *) g_queue_pop_head (dvdspu->pending_spus); } @@ -1386,7 +1392,8 @@ gst_dvd_spu_subpic_event (GstPad * pad, GstEvent * event) goto done; case GST_EVENT_FLUSH_STOP: DVD_SPU_LOCK (dvdspu); - gst_dvd_spu_flush_spu_info (dvdspu); + gst_segment_init (&dvdspu->subp_seg, GST_FORMAT_UNDEFINED); + gst_dvd_spu_flush_spu_info (dvdspu, TRUE); DVD_SPU_UNLOCK (dvdspu); /* We don't forward flushes on the spu pad */ -- cgit v1.2.1 From f8fef34fcb60372fba15ef28bbc2d905a0ec18b8 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Wed, 20 May 2009 19:31:24 +0100 Subject: states: Ignore the camerabin for the states test It accesses the video device, which isn't generally desirable for the state test. --- tests/check/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am index bf216c12..393e032a 100644 --- a/tests/check/Makefile.am +++ b/tests/check/Makefile.am @@ -13,7 +13,7 @@ TESTS_ENVIRONMENT = \ $(REGISTRY_ENVIRONMENT) \ GST_PLUGIN_SYSTEM_PATH= \ GST_PLUGIN_PATH=$(top_builddir)/gst:$(top_builddir)/sys:$(top_builddir)/ext:$(top_builddir)/../gst-ffmpeg/ext/ffmpeg:$(top_builddir)/../gst-plugins-good/gst:$(top_builddir)/../gst-plugins-good/sys:$(top_builddir)/../gst-plugins-good/ext:$(top_builddir)/../gst-plugins-ugly/gst:$(top_builddir)/../gst-plugins-ugly/sys:$(top_builddir)/../gst-plugins-ugly/ext:$(GSTPB_PLUGINS_DIR):$(GST_PLUGINS_DIR) \ - STATE_IGNORE_ELEMENTS="alsaspdifsink apexsink cdaudio dc1394src dccpclientsrc dccpclientsink dccpserversrc dccpserversink dvbsrc dvbbasebin dfbvideosink festival nassink rsndvdbin sdlaudiosink sdlvideosink vcdsrc rfbsrc" + STATE_IGNORE_ELEMENTS="alsaspdifsink apexsink camerabin cdaudio dc1394src dccpclientsrc dccpclientsink dccpserversrc dccpserversink dvbsrc dvbbasebin dfbvideosink festival nassink rsndvdbin sdlaudiosink sdlvideosink vcdsrc rfbsrc" plugindir = $(libdir)/gstreamer-@GST_MAJORMINOR@ -- cgit v1.2.1 From 462419f279a8ff865a570795462028fd9435f6a8 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Thu, 21 May 2009 11:10:13 +0100 Subject: resindvd: Minor change to inline a function in the demuxer --- ext/resindvd/gstmpegdemux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/resindvd/gstmpegdemux.c b/ext/resindvd/gstmpegdemux.c index b360bdcc..8e513469 100644 --- a/ext/resindvd/gstmpegdemux.c +++ b/ext/resindvd/gstmpegdemux.c @@ -1861,7 +1861,7 @@ need_data: } } -static gboolean +static inline gboolean gst_flups_demux_is_pes_sync (guint32 sync) { return ((sync & 0xfc) == 0xbc) || -- cgit v1.2.1 From 59a3abfdf346d2b428057d23fc69f5ef7c3b659f Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 22 May 2009 14:02:38 +0100 Subject: resindvd: Try a different approach to segment filling. Restore the old segment update behaviour, and instead extend the close segment stop time if the SCR (last_stop) overruns the calculated stop position. --- ext/resindvd/gstmpegdemux.c | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/ext/resindvd/gstmpegdemux.c b/ext/resindvd/gstmpegdemux.c index 8e513469..8ea82b44 100644 --- a/ext/resindvd/gstmpegdemux.c +++ b/ext/resindvd/gstmpegdemux.c @@ -495,8 +495,10 @@ gst_flups_demux_send_segment_updates (GstFluPSDemux * demux, if (stream->last_ts + stream->segment_thresh < new_time) { #if 0 g_print ("Segment update to pad %s time %" GST_TIME_FORMAT " stop now %" - GST_TIME_FORMAT "\n", GST_PAD_NAME (stream->pad), - GST_TIME_ARGS (new_time), GST_TIME_ARGS (demux->src_segment.stop)); + GST_TIME_FORMAT " last_stop %" GST_TIME_FORMAT "\n", + GST_PAD_NAME (stream->pad), GST_TIME_ARGS (new_time), + GST_TIME_ARGS (demux->src_segment.stop), + GST_TIME_ARGS (demux->src_segment.last_stop)); #endif GST_DEBUG_OBJECT (demux, "Segment update to pad %s time %" GST_TIME_FORMAT, @@ -524,6 +526,10 @@ gst_flups_demux_send_segment_close (GstFluPSDemux * demux) { gint id; GstEvent *event = NULL; + GstClockTime stop = demux->src_segment.stop; + + if (demux->src_segment.last_stop != -1 && demux->src_segment.last_stop > stop) + stop = demux->src_segment.last_stop; for (id = 0; id < GST_FLUPS_DEMUX_MAX_STREAMS; id++) { GstFluPSStream *stream = demux->streams[id]; @@ -534,23 +540,23 @@ gst_flups_demux_send_segment_close (GstFluPSDemux * demux) if (stream->last_seg_start != GST_CLOCK_TIME_NONE && stream->last_seg_start > start) start = stream->last_seg_start; + #if 0 g_print ("Segment close to pad %s start %" GST_TIME_FORMAT " stop %" GST_TIME_FORMAT "\n", GST_PAD_NAME (stream->pad), GST_TIME_ARGS (start), - GST_TIME_ARGS (demux->src_segment.stop)); + GST_TIME_ARGS (stop)); #endif - if (start > demux->src_segment.stop) { + if (start > stop) { g_print ("Problem on pad %s with start %" GST_TIME_FORMAT " > stop %" GST_TIME_FORMAT "\n", gst_object_get_name (GST_OBJECT (stream->pad)), - GST_TIME_ARGS (start), GST_TIME_ARGS (demux->src_segment.stop)); + GST_TIME_ARGS (start), GST_TIME_ARGS (stop)); } event = gst_event_new_new_segment_full (TRUE, demux->src_segment.rate, demux->src_segment.applied_rate, GST_FORMAT_TIME, start, - demux->src_segment.stop, - demux->src_segment.time + (start - demux->src_segment.start)); + stop, demux->src_segment.time + (start - demux->src_segment.start)); if (event) gst_pad_push_event (stream->pad, event); } @@ -872,8 +878,12 @@ gst_flups_demux_sink_event (GstPad * pad, GstEvent * event) else demux->scr_adjust = -GSTTIME_TO_MPEGTIME (-adjust); - if (stop != -1) + if (stop != -1) { stop = start + dur; + if (demux->src_segment.last_stop != -1 + && demux->src_segment.last_stop > stop) + stop = demux->src_segment.last_stop; + } GST_DEBUG_OBJECT (demux, "sending new segment: update %d rate %g format %d, start: %" @@ -1362,12 +1372,8 @@ gst_flups_demux_parse_pack_start (GstFluPSDemux * demux) new_time = MPEGTIME_TO_GSTTIME (scr_adjusted); if (new_time != GST_CLOCK_TIME_NONE) { // g_print ("SCR now %" GST_TIME_FORMAT "\n", GST_TIME_ARGS (new_time)); - if (new_time > GST_SECOND / 2) - new_time -= GST_SECOND / 2; - else - new_time = 0; + gst_segment_set_last_stop (&demux->src_segment, GST_FORMAT_TIME, new_time); gst_flups_demux_send_segment_updates (demux, new_time); - demux->src_segment.last_stop = new_time; } /* Reset the bytes_since_scr value to count the data remaining in the -- cgit v1.2.1 From 19d450a16425ea7844c9970a9ca325236897780b Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Mon, 25 May 2009 00:25:07 +0100 Subject: resindvd: Fix subpicture timing in some cases Make sure we send events to all pads. Unmark the notlinked flag on freshly selected pads to ensure they get data. --- ext/resindvd/gstmpegdemux.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/resindvd/gstmpegdemux.c b/ext/resindvd/gstmpegdemux.c index 8ea82b44..281b13f3 100644 --- a/ext/resindvd/gstmpegdemux.c +++ b/ext/resindvd/gstmpegdemux.c @@ -572,7 +572,7 @@ gst_flups_demux_send_event (GstFluPSDemux * demux, GstEvent * event) for (id = 0; id < GST_FLUPS_DEMUX_MAX_STREAMS; id++) { GstFluPSStream *stream = demux->streams[id]; - if (stream && !stream->notlinked) { + if (stream) { (void) gst_event_ref (event); if (!gst_pad_push_event (stream->pad, event)) { @@ -739,6 +739,8 @@ gst_flups_demux_handle_dvd_event (GstFluPSDemux * demux, GstEvent * event) "event", G_TYPE_STRING, "select-pad", NULL); GstEvent *sel_event = gst_event_new_custom (GST_EVENT_CUSTOM_DOWNSTREAM, s); + + temp->notlinked = FALSE; gst_pad_push_event (temp->pad, sel_event); gst_event_ref (event); -- cgit v1.2.1 From 471640e3f34bcce673966a587ac726ad660b2bb2 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Wed, 20 May 2009 08:50:37 +0100 Subject: mpegtsdemux: Add mapping for DVD and Bluray subpicture streams. Add output subpicture pads for DVD (video/x-dvd-subpicture) and Bluray PGS (subpicture/x-pgs) streams. Remove an unused variable from the PES filter. --- gst/mpegdemux/gstmpegdefs.h | 2 ++ gst/mpegdemux/gstmpegtsdemux.c | 28 +++++++++++++++++++++++++--- gst/mpegdemux/gstmpegtsdemux.h | 1 + gst/mpegdemux/gstpesfilter.h | 2 -- 4 files changed, 28 insertions(+), 5 deletions(-) diff --git a/gst/mpegdemux/gstmpegdefs.h b/gst/mpegdemux/gstmpegdefs.h index d63667d8..7ad1e25c 100644 --- a/gst/mpegdemux/gstmpegdefs.h +++ b/gst/mpegdemux/gstmpegdefs.h @@ -173,6 +173,8 @@ #define ST_HDV_PRIVATE_A0 0xa0 #define ST_HDV_PRIVATE_A1 0xa1 #define ST_PS_DVD_SUBPICTURE 0xff +/* Blu-ray PGS subpictures */ +#define ST_BD_PGS_SUBPICTURE 0x90 /* Un-official time-code stream */ #define ST_PS_TIMECODE 0xd2 diff --git a/gst/mpegdemux/gstmpegtsdemux.c b/gst/mpegdemux/gstmpegtsdemux.c index cd64a295..ef0de2c8 100644 --- a/gst/mpegdemux/gstmpegtsdemux.c +++ b/gst/mpegdemux/gstmpegtsdemux.c @@ -157,6 +157,10 @@ enum "audio/x-dts" \ ) +/* Can also use the subpicture pads for text subtitles? */ +#define SUBPICTURE_CAPS \ + GST_STATIC_CAPS ("subpicture/x-pgs; video/x-dvd-subpicture") + static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, @@ -175,6 +179,12 @@ GST_STATIC_PAD_TEMPLATE ("audio_%04x", GST_PAD_SOMETIMES, AUDIO_CAPS); +static GstStaticPadTemplate subpicture_template = +GST_STATIC_PAD_TEMPLATE ("subpicture_%04x", + GST_PAD_SRC, + GST_PAD_SOMETIMES, + SUBPICTURE_CAPS); + static GstStaticPadTemplate private_template = GST_STATIC_PAD_TEMPLATE ("private_%04x", GST_PAD_SRC, @@ -250,10 +260,14 @@ gst_mpegts_demux_base_init (GstMpegTSDemuxClass * klass) klass->sink_template = gst_static_pad_template_get (&sink_template); klass->video_template = gst_static_pad_template_get (&video_template); klass->audio_template = gst_static_pad_template_get (&audio_template); + klass->subpicture_template = + gst_static_pad_template_get (&subpicture_template); klass->private_template = gst_static_pad_template_get (&private_template); gst_element_class_add_pad_template (element_class, klass->video_template); gst_element_class_add_pad_template (element_class, klass->audio_template); + gst_element_class_add_pad_template (element_class, + klass->subpicture_template); gst_element_class_add_pad_template (element_class, klass->private_template); gst_element_class_add_pad_template (element_class, klass->sink_template); @@ -675,6 +689,14 @@ gst_mpegts_demux_fill_stream (GstMpegTSStream * stream, guint8 id, caps = gst_caps_new_simple ("audio/x-lpcm", NULL); break; case ST_PS_DVD_SUBPICTURE: + template = klass->subpicture_template; + name = g_strdup_printf ("subpicture_%04x", stream->PID); + caps = gst_caps_new_simple ("video/x-dvd-subpicture", NULL); + break; + case ST_BD_PGS_SUBPICTURE: + template = klass->subpicture_template; + name = g_strdup_printf ("subpicture_%04x", stream->PID); + caps = gst_caps_new_simple ("subpicture/x-pgs", NULL); break; default: break; @@ -992,8 +1014,8 @@ gst_mpegts_demux_data_cb (GstPESFilter * filter, gboolean first, goto unknown_type; GST_DEBUG_OBJECT (demux, - "New stream 0x%04x of type %d with caps %" GST_PTR_FORMAT, stream->PID, - stream->stream_type, GST_PAD_CAPS (stream->pad)); + "New stream 0x%04x of type 0x%02x with caps %" GST_PTR_FORMAT, + stream->PID, stream->stream_type, GST_PAD_CAPS (stream->pad)); srcpad = stream->pad; @@ -1017,7 +1039,7 @@ gst_mpegts_demux_data_cb (GstPESFilter * filter, gboolean first, unknown_type: { GST_DEBUG_OBJECT (demux, "got unknown stream id 0x%02x, type 0x%02x", - filter->id, filter->type); + filter->id, stream->stream_type); gst_buffer_unref (buffer); return gst_mpegts_demux_combine_flows (demux, stream, GST_FLOW_NOT_LINKED); } diff --git a/gst/mpegdemux/gstmpegtsdemux.h b/gst/mpegdemux/gstmpegtsdemux.h index dad2b023..fde68926 100644 --- a/gst/mpegdemux/gstmpegtsdemux.h +++ b/gst/mpegdemux/gstmpegtsdemux.h @@ -228,6 +228,7 @@ struct _GstMpegTSDemuxClass { GstPadTemplate * sink_template; GstPadTemplate * video_template; GstPadTemplate * audio_template; + GstPadTemplate * subpicture_template; GstPadTemplate * private_template; }; diff --git a/gst/mpegdemux/gstpesfilter.h b/gst/mpegdemux/gstpesfilter.h index b35d8746..ccc8461d 100644 --- a/gst/mpegdemux/gstpesfilter.h +++ b/gst/mpegdemux/gstpesfilter.h @@ -84,8 +84,6 @@ struct _GstPESFilter { gboolean unbounded_packet; guint16 length; - guint8 type; - gint64 pts; gint64 dts; }; -- cgit v1.2.1 From e1d778e559a402f0b4ebe2b84978f3542807a630 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Thu, 21 May 2009 00:41:47 +0100 Subject: mpegdemux: Add support for outputting sub-picture streams found in files. Output subpicture streams when they are found on the private stream ID. Don't strip off the first byte of such packets when pushing. --- gst/mpegdemux/gstmpegdemux.c | 39 +++++++++++++++++++++++++++++++-------- gst/mpegdemux/gstmpegdemux.h | 1 + 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/gst/mpegdemux/gstmpegdemux.c b/gst/mpegdemux/gstmpegdemux.c index 439bb563..552bae5a 100644 --- a/gst/mpegdemux/gstmpegdemux.c +++ b/gst/mpegdemux/gstmpegdemux.c @@ -39,6 +39,7 @@ * Fluendo, S.L. All Rights Reserved. * * Contributor(s): Wim Taymans + * Jan Schmidt */ #ifdef HAVE_CONFIG_H @@ -177,6 +178,13 @@ static GstStaticPadTemplate audio_template = "audio/x-private1-ac3;" "audio/x-private1-dts;" "audio/ac3") ); +static GstStaticPadTemplate subpicture_template = +GST_STATIC_PAD_TEMPLATE ("subpicture_%02x", + GST_PAD_SRC, + GST_PAD_SOMETIMES, + GST_STATIC_CAPS ("video/x-dvd-subpicture") + ); + static GstStaticPadTemplate private_template = GST_STATIC_PAD_TEMPLATE ("private_%d", GST_PAD_SRC, @@ -250,10 +258,14 @@ gst_flups_demux_base_init (GstFluPSDemuxClass * klass) klass->sink_template = gst_static_pad_template_get (&sink_template); klass->video_template = gst_static_pad_template_get (&video_template); klass->audio_template = gst_static_pad_template_get (&audio_template); + klass->subpicture_template = + gst_static_pad_template_get (&subpicture_template); klass->private_template = gst_static_pad_template_get (&private_template); gst_element_class_add_pad_template (element_class, klass->video_template); gst_element_class_add_pad_template (element_class, klass->audio_template); + gst_element_class_add_pad_template (element_class, + klass->subpicture_template); gst_element_class_add_pad_template (element_class, klass->private_template); gst_element_class_add_pad_template (element_class, klass->sink_template); @@ -404,6 +416,9 @@ gst_flups_demux_create_stream (GstFluPSDemux * demux, gint id, gint stream_type) caps = gst_caps_new_simple ("audio/x-private1-lpcm", NULL); break; case ST_PS_DVD_SUBPICTURE: + template = klass->subpicture_template; + name = g_strdup_printf ("subpicture_%02x", id); + caps = gst_caps_new_simple ("video/x-dvd-subpicture", NULL); break; case ST_GST_AUDIO_RAWA52: template = klass->audio_template; @@ -1839,18 +1854,26 @@ gst_flups_demux_data_cb (GstPESFilter * filter, gboolean first, } if (G_LIKELY (stream_type == -1)) { - /* new id */ + /* new id is in the first byte */ id = data[offset++]; - /* Number of audio frames in this packet */ - nframes = data[offset++]; - - GST_DEBUG_OBJECT (demux, "private type 0x%02x, %d frames", id, - nframes); - - datalen -= 2; + datalen--; /* and remap */ stream_type = demux->psm[id]; + + /* Now, if it's a subpicture stream - no more, otherwise + * take the first byte too, since it's the frame count in audio + * streams and our backwards compat convention is to strip it off */ + if (stream_type != ST_PS_DVD_SUBPICTURE) { + /* Number of audio frames in this packet */ + nframes = data[offset++]; + datalen--; + GST_DEBUG_OBJECT (demux, "private type 0x%02x, %d frames", id, + nframes); + } else { + GST_DEBUG_OBJECT (demux, "private type 0x%02x, stream type %d", id, + stream_type); + } } } if (stream_type == -1) diff --git a/gst/mpegdemux/gstmpegdemux.h b/gst/mpegdemux/gstmpegdemux.h index ef175f76..29bc1dfd 100644 --- a/gst/mpegdemux/gstmpegdemux.h +++ b/gst/mpegdemux/gstmpegdemux.h @@ -149,6 +149,7 @@ struct _GstFluPSDemuxClass GstPadTemplate *sink_template; GstPadTemplate *video_template; GstPadTemplate *audio_template; + GstPadTemplate *subpicture_template; GstPadTemplate *private_template; }; -- cgit v1.2.1 From f7eefea47cf770107672d07189843554b10b9c6f Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Thu, 21 May 2009 11:13:54 +0100 Subject: mpegdemux: Add sparse stream filling. First stab at sending new-segment events to effect sparse stream updates. --- gst/mpegdemux/gstmpegdemux.c | 93 ++++++++++++++++++++++++++++++++++++++++++++ gst/mpegdemux/gstmpegdemux.h | 4 ++ 2 files changed, 97 insertions(+) diff --git a/gst/mpegdemux/gstmpegdemux.c b/gst/mpegdemux/gstmpegdemux.c index 552bae5a..3f298fb6 100644 --- a/gst/mpegdemux/gstmpegdemux.c +++ b/gst/mpegdemux/gstmpegdemux.c @@ -57,6 +57,9 @@ #define SCAN_SCR_SZ 12 #define SCAN_PTS_SZ 80 +#define SEGMENT_THRESHOLD (300*GST_MSECOND) +#define VIDEO_SEGMENT_THRESHOLD (500*GST_MSECOND) + typedef enum { SCAN_SCR, @@ -217,6 +220,10 @@ static inline gboolean gst_flups_demux_scan_forward_ts (GstFluPSDemux * demux, static inline gboolean gst_flups_demux_scan_backward_ts (GstFluPSDemux * demux, guint64 * pos, SCAN_MODE mode, guint64 * rts); +static void gst_flups_demux_send_segment_updates (GstFluPSDemux * demux, + GstClockTime new_time); +static void gst_flups_demux_clear_times (GstFluPSDemux * demux); + static GstElementClass *parent_class = NULL; /*static guint gst_flups_demux_signals[LAST_SIGNAL] = { 0 };*/ @@ -352,6 +359,7 @@ gst_flups_demux_create_stream (GstFluPSDemux * demux, gint id, gint stream_type) gchar *name; GstFluPSDemuxClass *klass = GST_FLUPS_DEMUX_GET_CLASS (demux); GstCaps *caps; + GstClockTime threshold = SEGMENT_THRESHOLD; name = NULL; template = NULL; @@ -380,6 +388,7 @@ gst_flups_demux_create_stream (GstFluPSDemux * demux, gint id, gint stream_type) caps = gst_caps_new_simple ("video/mpeg", "mpegversion", G_TYPE_INT, mpeg_version, "systemstream", G_TYPE_BOOLEAN, FALSE, NULL); + threshold = VIDEO_SEGMENT_THRESHOLD; break; } case ST_AUDIO_MPEG1: @@ -399,6 +408,7 @@ gst_flups_demux_create_stream (GstFluPSDemux * demux, gint id, gint stream_type) template = klass->video_template; name = g_strdup_printf ("video_%02x", id); caps = gst_caps_new_simple ("video/x-h264", NULL); + threshold = VIDEO_SEGMENT_THRESHOLD; break; case ST_PS_AUDIO_AC3: template = klass->audio_template; @@ -439,6 +449,7 @@ gst_flups_demux_create_stream (GstFluPSDemux * demux, gint id, gint stream_type) stream->notlinked = FALSE; stream->type = stream_type; stream->pad = gst_pad_new_from_template (template, name); + stream->segment_thresh = threshold; gst_pad_set_event_function (stream->pad, GST_DEBUG_FUNCPTR (gst_flups_demux_src_event)); gst_pad_set_query_function (stream->pad, @@ -574,6 +585,20 @@ gst_flups_demux_send_data (GstFluPSDemux * demux, GstFluPSStream * stream, GST_TIME_ARGS (demux->src_segment.last_stop), GST_TIME_ARGS (MPEGTIME_TO_GSTTIME (demux->current_scr))); + if (demux->src_segment.last_stop != GST_CLOCK_TIME_NONE) { + GstClockTime new_time = demux->base_time + demux->src_segment.last_stop; + + if (stream->last_ts == GST_CLOCK_TIME_NONE || stream->last_ts < new_time) { +#if 0 + g_print ("last_ts update on pad %s to time %" GST_TIME_FORMAT "\n", + GST_PAD_NAME (stream->pad), GST_TIME_ARGS (cur_scr_time)); +#endif + stream->last_ts = new_time; + } + + gst_flups_demux_send_segment_updates (demux, new_time); + } + /* Set the buffer discont flag, and clear discont state on the stream */ if (stream->discont) { GST_DEBUG_OBJECT (demux, "marking discont buffer"); @@ -746,11 +771,75 @@ gst_flups_demux_flush (GstFluPSDemux * demux) gst_adapter_clear (demux->adapter); gst_adapter_clear (demux->rev_adapter); gst_pes_filter_drain (&demux->filter); + gst_flups_demux_clear_times (demux); demux->adapter_offset = G_MAXUINT64; demux->current_scr = G_MAXUINT64; demux->bytes_since_scr = 0; } +static void +gst_flups_demux_clear_times (GstFluPSDemux * demux) +{ + gint id; + + /* Clear the last ts for all streams */ + for (id = 0; id < GST_FLUPS_DEMUX_MAX_STREAMS; id++) { + GstFluPSStream *stream = demux->streams[id]; + + if (stream) { + stream->last_seg_start = stream->last_ts = GST_CLOCK_TIME_NONE; + } + } +} + +static void +gst_flups_demux_send_segment_updates (GstFluPSDemux * demux, + GstClockTime new_time) +{ + /* Advance all lagging streams by sending a segment update */ + gint id; + GstEvent *event = NULL; + + /* FIXME: Handle reverse playback */ + + if (new_time > demux->src_segment.stop) + return; + + for (id = 0; id < GST_FLUPS_DEMUX_MAX_STREAMS; id++) { + GstFluPSStream *stream = demux->streams[id]; + + if (stream) { + if (stream->last_ts == GST_CLOCK_TIME_NONE || + stream->last_ts < demux->src_segment.start) + stream->last_ts = demux->src_segment.start; + if (stream->last_ts + stream->segment_thresh < new_time) { +#if 0 + g_print ("Segment update to pad %s time %" GST_TIME_FORMAT " stop now %" + GST_TIME_FORMAT "\n", GST_PAD_NAME (stream->pad), + GST_TIME_ARGS (new_time), GST_TIME_ARGS (demux->src_segment.stop)); +#endif + GST_DEBUG_OBJECT (demux, + "Segment update to pad %s time %" GST_TIME_FORMAT, + GST_PAD_NAME (stream->pad), GST_TIME_ARGS (new_time)); + if (event == NULL) { + event = gst_event_new_new_segment_full (TRUE, + demux->src_segment.rate, demux->src_segment.applied_rate, + GST_FORMAT_TIME, new_time, + demux->src_segment.stop, + demux->src_segment.time + (new_time - demux->src_segment.start)); + } + gst_event_ref (event); + gst_pad_push_event (stream->pad, event); + stream->last_seg_start = stream->last_ts = new_time; + stream->need_segment = FALSE; + } + } + } + + if (event) + gst_event_unref (event); +} + static void gst_flups_demux_close_segment (GstFluPSDemux * demux) { @@ -762,6 +851,10 @@ gst_flups_demux_close_segment (GstFluPSDemux * demux) &demux->src_segment); #endif + /* FIXME: Need to send a different segment-close to each pad where the + * last_seg_start != clock_time_none, as that indicates a sparse-stream + * event was sent there */ + /* Close the current segment for a linear playback */ if (demux->src_segment.rate >= 0) { /* for forward playback, we played from start to last_stop */ diff --git a/gst/mpegdemux/gstmpegdemux.h b/gst/mpegdemux/gstmpegdemux.h index 29bc1dfd..29b3d5e5 100644 --- a/gst/mpegdemux/gstmpegdemux.h +++ b/gst/mpegdemux/gstmpegdemux.h @@ -86,6 +86,10 @@ struct _GstFluPSStream gint type; gint size_bound; + GstClockTime segment_thresh; + GstClockTime last_seg_start; + GstClockTime last_ts; + gboolean discont; gboolean notlinked; gboolean need_segment; -- cgit v1.2.1 From 78cd406a76c71b2ebe5457e838471cd209afd6d0 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Thu, 21 May 2009 15:22:58 +0100 Subject: dvdspu: Add a simple default colour table. When we're not provided with a palette in advance, draw with a grey colour or two, instead of YUV green. --- gst/dvdspu/gstdvdspu.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gst/dvdspu/gstdvdspu.c b/gst/dvdspu/gstdvdspu.c index dc606d21..45e64cd0 100644 --- a/gst/dvdspu/gstdvdspu.c +++ b/gst/dvdspu/gstdvdspu.c @@ -79,6 +79,13 @@ GST_STATIC_PAD_TEMPLATE ("subpicture", GST_STATIC_CAPS ("video/x-dvd-subpicture") ); +static const guint32 default_clut[16] = { + 0xb48080, 0x248080, 0x628080, 0xd78080, + 0x808080, 0x808080, 0x808080, 0x808080, + 0x808080, 0x808080, 0x808080, 0x808080, + 0x808080, 0x808080, 0x808080, 0x808080 +}; + GST_BOILERPLATE (GstDVDSpu, gst_dvd_spu, GstElement, GST_TYPE_ELEMENT); static void gst_dvd_spu_dispose (GObject * object); @@ -183,6 +190,7 @@ gst_dvd_spu_clear (GstDVDSpu * dvdspu) { gst_dvd_spu_flush_spu_info (dvdspu, FALSE); gst_segment_init (&dvdspu->subp_seg, GST_FORMAT_UNDEFINED); + memcpy (dvdspu->spu_state.current_clut, default_clut, sizeof (guint32) * 16); gst_buffer_replace (&dvdspu->ref_frame, NULL); gst_buffer_replace (&dvdspu->pending_frame, NULL); -- cgit v1.2.1 From 4e847cb4acd356112f56a101132d8438abe9fa03 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Wed, 20 May 2009 08:55:40 +0100 Subject: dvdspu: Add simple PGS handler that dumps the packet info Add setcaps logic on the subpicture sink pad for configuring which subpicture format is arriving. Add the first piece of PGS subpicture handling by dumping the stream contents out to the terminal as the packets arrive. Add some more debug. Don't calculate the running time for our subpicture packets twice, once is enough. --- gst/dvdspu/Makefile.am | 4 +- gst/dvdspu/gstdvdspu.c | 216 ++++++++++++++++-------- gst/dvdspu/gstdvdspu.h | 8 + gst/dvdspu/gstspu-pgs.c | 434 ++++++++++++++++++++++++++++++++++++++++++++++++ gst/dvdspu/gstspu-pgs.h | 60 +++++++ 5 files changed, 648 insertions(+), 74 deletions(-) create mode 100644 gst/dvdspu/gstspu-pgs.c create mode 100644 gst/dvdspu/gstspu-pgs.h diff --git a/gst/dvdspu/Makefile.am b/gst/dvdspu/Makefile.am index 4d75f76c..2edd6e5e 100644 --- a/gst/dvdspu/Makefile.am +++ b/gst/dvdspu/Makefile.am @@ -1,13 +1,13 @@ plugin_LTLIBRARIES = libgstdvdspu.la -libgstdvdspu_la_SOURCES = gstdvdspu.c gstdvdspu-render.c +libgstdvdspu_la_SOURCES = gstdvdspu.c gstdvdspu-render.c gstspu-pgs.c libgstdvdspu_la_CFLAGS = $(GST_CFLAGS) libgstdvdspu_la_LIBADD = $(GST_LIBS) libgstdvdspu_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstdvdspu_la_LIBTOOLFLAGS = --tag=disable-static -noinst_HEADERS = gstdvdspu.h +noinst_HEADERS = gstdvdspu.h gstspu-pgs.h EXTRA_DIST = Notes.txt diff --git a/gst/dvdspu/gstdvdspu.c b/gst/dvdspu/gstdvdspu.c index 45e64cd0..b340f92f 100644 --- a/gst/dvdspu/gstdvdspu.c +++ b/gst/dvdspu/gstdvdspu.c @@ -32,11 +32,14 @@ # include #endif +#include + #include #include #include "gstdvdspu.h" +#include "gstspu-pgs.h" #define DUMP_DCSQ 0 @@ -73,10 +76,10 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", ); static GstStaticPadTemplate subpic_sink_factory = -GST_STATIC_PAD_TEMPLATE ("subpicture", + GST_STATIC_PAD_TEMPLATE ("subpicture", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_STATIC_CAPS ("video/x-dvd-subpicture") + GST_STATIC_CAPS ("video/x-dvd-subpicture; subpicture/x-pgs") ); static const guint32 default_clut[16] = { @@ -106,6 +109,7 @@ static void gst_dvd_spu_redraw_still (GstDVDSpu * dvdspu, gboolean force); static void gst_dvd_spu_check_still_updates (GstDVDSpu * dvdspu); static GstFlowReturn gst_dvd_spu_subpic_chain (GstPad * pad, GstBuffer * buf); static gboolean gst_dvd_spu_subpic_event (GstPad * pad, GstEvent * event); +static gboolean gst_dvd_spu_subpic_set_caps (GstPad * pad, GstCaps * caps); static void gst_dvd_spu_clear (GstDVDSpu * dvdspu); static void gst_dvd_spu_flush_spu_info (GstDVDSpu * dvdspu, @@ -173,7 +177,8 @@ gst_dvd_spu_init (GstDVDSpu * dvdspu, GstDVDSpuClass * gclass) gst_pad_new_from_static_template (&subpic_sink_factory, "subpicture"); gst_pad_set_chain_function (dvdspu->subpic_sinkpad, gst_dvd_spu_subpic_chain); gst_pad_set_event_function (dvdspu->subpic_sinkpad, gst_dvd_spu_subpic_event); - gst_pad_use_fixed_caps (dvdspu->subpic_sinkpad); + gst_pad_set_setcaps_function (dvdspu->subpic_sinkpad, + gst_dvd_spu_subpic_set_caps); gst_element_add_pad (GST_ELEMENT (dvdspu), dvdspu->videosinkpad); gst_element_add_pad (GST_ELEMENT (dvdspu), dvdspu->subpic_sinkpad); @@ -1192,10 +1197,66 @@ gst_dvd_spu_check_still_updates (GstDVDSpu * dvdspu) } } +static void +submit_new_spu_packet (GstDVDSpu * dvdspu, GstBuffer * buf) +{ + SpuPacket *spu_packet; + GstClockTime ts; + GstClockTime run_ts = GST_CLOCK_TIME_NONE; + + GST_DEBUG_OBJECT (dvdspu, + "Complete subpicture buffer of %u bytes with TS %" GST_TIME_FORMAT, + GST_BUFFER_SIZE (buf), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf))); + + /* Decide whether to pass this buffer through to the rendering code */ + ts = GST_BUFFER_TIMESTAMP (buf); + if (GST_CLOCK_TIME_IS_VALID (ts)) { + if (ts < (GstClockTime) dvdspu->subp_seg.start) { + GstClockTimeDiff diff = dvdspu->subp_seg.start - ts; + + /* Buffer starts before segment, see if we can calculate a running time */ + run_ts = + gst_segment_to_running_time (&dvdspu->subp_seg, GST_FORMAT_TIME, + dvdspu->subp_seg.start); + if (run_ts >= (GstClockTime) diff) + run_ts -= diff; + else + run_ts = GST_CLOCK_TIME_NONE; /* No running time possible for this subpic */ + } else { + /* TS within segment, convert to running time */ + run_ts = + gst_segment_to_running_time (&dvdspu->subp_seg, GST_FORMAT_TIME, ts); + } + } + + if (GST_CLOCK_TIME_IS_VALID (run_ts)) { + /* Complete SPU packet, push it onto the queue for processing when + * video packets come past */ + spu_packet = g_new0 (SpuPacket, 1); + spu_packet->buf = buf; + + /* Store the activation time of this buffer in running time */ + spu_packet->event_ts = run_ts; + GST_INFO_OBJECT (dvdspu, + "Pushing SPU buf with TS %" GST_TIME_FORMAT " running time %" + GST_TIME_FORMAT, GST_TIME_ARGS (ts), + GST_TIME_ARGS (spu_packet->event_ts)); + + g_queue_push_tail (dvdspu->pending_spus, spu_packet); + + /* In a still frame condition, advance the SPU to make sure the state is + * up to date */ + gst_dvd_spu_check_still_updates (dvdspu); + } else { + gst_buffer_unref (buf); + } +} + static GstFlowReturn gst_dvd_spu_subpic_chain (GstPad * pad, GstBuffer * buf) { GstDVDSpu *dvdspu = (GstDVDSpu *) (gst_object_get_parent (GST_OBJECT (pad))); + GstFlowReturn ret = GST_FLOW_OK; g_return_val_if_fail (dvdspu != NULL, GST_FLOW_ERROR); @@ -1210,6 +1271,11 @@ gst_dvd_spu_subpic_chain (GstPad * pad, GstBuffer * buf) GST_BUFFER_TIMESTAMP (buf)); } + if (GST_BUFFER_IS_DISCONT (buf) && dvdspu->partial_spu) { + gst_buffer_unref (dvdspu->partial_spu); + dvdspu->partial_spu = NULL; + } + if (dvdspu->partial_spu != NULL) { dvdspu->partial_spu = gst_buffer_join (dvdspu->partial_spu, buf); } else { @@ -1221,85 +1287,55 @@ gst_dvd_spu_subpic_chain (GstPad * pad, GstBuffer * buf) gst_buffer_unref (buf); } - if (dvdspu->partial_spu != NULL && GST_BUFFER_SIZE (dvdspu->partial_spu) > 4) { - guint16 packet_size; - guint8 *data; + if (dvdspu->partial_spu == NULL) + goto done; - data = GST_BUFFER_DATA (dvdspu->partial_spu); - packet_size = GST_READ_UINT16_BE (data); - - if (packet_size == GST_BUFFER_SIZE (dvdspu->partial_spu)) { - SpuPacket *spu_packet; - GstClockTime ts; - GstClockTime run_ts = GST_CLOCK_TIME_NONE; - - GST_DEBUG_OBJECT (dvdspu, - "Complete subpicture buffer of %u bytes with TS %" GST_TIME_FORMAT, - GST_BUFFER_SIZE (dvdspu->partial_spu), - GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (dvdspu->partial_spu))); - - /* Decide whether to pass this buffer through to the rendering code */ - ts = GST_BUFFER_TIMESTAMP (dvdspu->partial_spu); - if (GST_CLOCK_TIME_IS_VALID (ts)) { - if (ts < (GstClockTime) dvdspu->subp_seg.start) { - GstClockTimeDiff diff = dvdspu->subp_seg.start - ts; - - /* Buffer starts before segment, see if we can calculate a running time */ - run_ts = - gst_segment_to_running_time (&dvdspu->subp_seg, GST_FORMAT_TIME, - dvdspu->subp_seg.start); - if (run_ts >= (GstClockTime) diff) - run_ts -= diff; - else - run_ts = GST_CLOCK_TIME_NONE; /* No running time possible for this subpic */ + switch (dvdspu->spu_input_type) { + case SPU_INPUT_TYPE_VOBSUB: + if (GST_BUFFER_SIZE (dvdspu->partial_spu) > 4) { + guint16 packet_size; + guint8 *data; + + data = GST_BUFFER_DATA (dvdspu->partial_spu); + packet_size = GST_READ_UINT16_BE (data); + + if (packet_size == GST_BUFFER_SIZE (dvdspu->partial_spu)) { + submit_new_spu_packet (dvdspu, dvdspu->partial_spu); + dvdspu->partial_spu = NULL; + } else if (packet_size < GST_BUFFER_SIZE (dvdspu->partial_spu)) { + /* Somehow we collected too much - something is wrong. Drop the + * packet entirely and wait for a new one */ + GST_DEBUG_OBJECT (dvdspu, "Discarding invalid SPU buffer of size %u", + GST_BUFFER_SIZE (dvdspu->partial_spu)); + + gst_buffer_unref (dvdspu->partial_spu); + dvdspu->partial_spu = NULL; } else { - /* TS within segment, convert to running time */ - run_ts = - gst_segment_to_running_time (&dvdspu->subp_seg, GST_FORMAT_TIME, - ts); + GST_LOG_OBJECT (dvdspu, + "SPU buffer claims to be of size %u. Collected %u so far.", + packet_size, GST_BUFFER_SIZE (dvdspu->partial_spu)); } } - - if (GST_CLOCK_TIME_IS_VALID (run_ts)) { - /* Complete SPU packet, push it onto the queue for processing when - * video packets come past */ - spu_packet = g_new0 (SpuPacket, 1); - spu_packet->buf = dvdspu->partial_spu; - - /* Store the activation time of this buffer in running time */ - spu_packet->event_ts = - gst_segment_to_running_time (&dvdspu->subp_seg, GST_FORMAT_TIME, - ts); - GST_INFO_OBJECT (dvdspu, - "Pushing SPU buf with TS %" GST_TIME_FORMAT " running time %" - GST_TIME_FORMAT, GST_TIME_ARGS (ts), - GST_TIME_ARGS (spu_packet->event_ts)); - - g_queue_push_tail (dvdspu->pending_spus, spu_packet); - dvdspu->partial_spu = NULL; - - /* In a still frame condition, advance the SPU to make sure the state is - * up to date */ - gst_dvd_spu_check_still_updates (dvdspu); - } else { - gst_buffer_unref (dvdspu->partial_spu); - dvdspu->partial_spu = NULL; - } - } else if (packet_size < GST_BUFFER_SIZE (dvdspu->partial_spu)) { - /* Somehow we collected too much - something is wrong. Drop the - * packet entirely and wait for a new one */ - GST_DEBUG_OBJECT (dvdspu, "Discarding invalid SPU buffer of size %u", - GST_BUFFER_SIZE (dvdspu->partial_spu)); - + break; + case SPU_INPUT_TYPE_PGS: + gstspu_dump_pgs_buffer (dvdspu->partial_spu); gst_buffer_unref (dvdspu->partial_spu); dvdspu->partial_spu = NULL; - } + break; + default: + GST_ERROR_OBJECT (dvdspu, "Input type not configured before SPU passing"); + goto caps_not_set; } +done: DVD_SPU_UNLOCK (dvdspu); - gst_object_unref (dvdspu); - return GST_FLOW_OK; + return ret; +caps_not_set: + GST_ELEMENT_ERROR (dvdspu, RESOURCE, NO_SPACE_LEFT, + (_("Subpicture format was not configured before data flow")), (NULL)); + ret = GST_FLOW_ERROR; + goto done; } static gboolean @@ -1388,8 +1424,11 @@ gst_dvd_spu_subpic_event (GstPad * pad, GstEvent * event) GST_TIME_ARGS (stop), GST_TIME_ARGS (time)); DVD_SPU_LOCK (dvdspu); + gst_segment_set_newsegment_full (&dvdspu->subp_seg, update, rate, arate, format, start, stop, time); + GST_LOG_OBJECT (dvdspu, "Subpicture segment now: %" GST_SEGMENT_FORMAT, + &dvdspu->subp_seg); DVD_SPU_UNLOCK (dvdspu); gst_event_unref (event); @@ -1424,6 +1463,39 @@ done: return res; } +static gboolean +gst_dvd_spu_subpic_set_caps (GstPad * pad, GstCaps * caps) +{ + GstDVDSpu *dvdspu = GST_DVD_SPU (gst_pad_get_parent (pad)); + gboolean res = FALSE; + GstStructure *s; + SpuInputType input_type; + + s = gst_caps_get_structure (caps, 0); + + if (gst_structure_has_name (s, "video/x-dvd-subpicture")) { + input_type = SPU_INPUT_TYPE_VOBSUB; + } else if (gst_structure_has_name (s, "subpicture/x-pgs")) { + input_type = SPU_INPUT_TYPE_PGS; + } else { + goto done; + } + + DVD_SPU_LOCK (dvdspu); + if (dvdspu->spu_input_type != input_type) { + GST_INFO_OBJECT (dvdspu, "Incoming SPU packet type changed to %u", + input_type); + gst_dvd_spu_flush_spu_info (dvdspu, TRUE); + dvdspu->spu_input_type = input_type; + } + + DVD_SPU_UNLOCK (dvdspu); + res = TRUE; +done: + gst_object_unref (dvdspu); + return res; +} + static GstStateChangeReturn gst_dvd_spu_change_state (GstElement * element, GstStateChange transition) { diff --git a/gst/dvdspu/gstdvdspu.h b/gst/dvdspu/gstdvdspu.h index dfc51f9e..1bbc7d3a 100644 --- a/gst/dvdspu/gstdvdspu.h +++ b/gst/dvdspu/gstdvdspu.h @@ -45,6 +45,7 @@ typedef struct SpuPixCtrlI SpuPixCtrlI; typedef struct SpuLineCtrlI SpuLineCtrlI; typedef struct SpuColour SpuColour; typedef enum SpuStateFlags SpuStateFlags; +typedef enum SpuInputType SpuInputType; typedef struct SpuState SpuState; typedef struct SpuPacket SpuPacket; typedef enum SpuCmd SpuCmd; @@ -106,6 +107,12 @@ enum SpuStateFlags { SPU_STATE_FORCED_ONLY = 0x100 }; +enum SpuInputType { + SPU_INPUT_TYPE_NONE = 0x00, + SPU_INPUT_TYPE_VOBSUB = 0x01, + SPU_INPUT_TYPE_PGS = 0x02 +}; + #define SPU_STATE_FLAGS_MASK (0xff) struct SpuState { @@ -198,6 +205,7 @@ struct _GstDVDSpu { GstSegment subp_seg; SpuState spu_state; + SpuInputType spu_input_type; /* GQueue of SpuBuf structures */ GQueue *pending_spus; diff --git a/gst/dvdspu/gstspu-pgs.c b/gst/dvdspu/gstspu-pgs.c new file mode 100644 index 00000000..de6a4151 --- /dev/null +++ b/gst/dvdspu/gstspu-pgs.c @@ -0,0 +1,434 @@ +#include +#include +#include +#include + +#include +#include + +#include "gstspu-pgs.h" + +const struct PgsFrameRateEntry +{ + guint8 id; + guint fps_n; + guint fps_d; +} PgsFrameRates[] = { + { + 64, 30000, 1001} /* 29.97 FPS */ +}; + +gboolean in_presentation_segment = FALSE; +guint8 *rle_data = NULL; +guint32 rle_data_size = 0, rle_data_used = 0; +PgsPaletteEntry palette[256]; + +static void +dump_bytes (guint8 * data, guint16 len) +{ + gint i; + + /* Dump the numbers */ + for (i = 0; i < len; i++) { + g_print ("0x%02x ", data[i]); + if (!((i + 1) % 16)) + g_print ("\n"); + } + if (len > 0 && (i % 16)) + g_print ("\n"); +} + +static void +dump_rle_data (guint8 * data, guint32 len) +{ + guint8 *end = data + len; + guint16 obj_w, obj_h; + gint i; + guint x = 0; + + if (data + 4 > end) + return; + + /* RLE data: */ + obj_w = GST_READ_UINT16_BE (data); + obj_h = GST_READ_UINT16_BE (data + 2); + data += 4; + g_print ("RLE image is %ux%u\n", obj_w, obj_h); + + while (data < end) { + guint8 pal_id; + guint16 run_len; + + if (data[0] != 0) { + // g_print ("data 0x%02x\n", data[0]); + pal_id = *data++; + run_len = 1; + } else { + data++; + + if (data + 1 > end) + return; + switch (data[0] & 0xC0) { + case 0x00: + //g_print ("data 0x%02x\n", data[0]); + run_len = (data[0] & 0x3f); + if (run_len > 0) + pal_id = 0; + data++; + break; + case 0x40: + if (data + 2 > end) + return; + //g_print ("data 0x%02x 0x%02x\n", data[0], data[1]); + run_len = ((data[0] << 8) | data[1]) & 0x3fff; + if (run_len > 0) + pal_id = 0; + data += 2; + break; + case 0x80: + if (data + 2 > end) + return; + //g_print ("data 0x%02x 0x%02x\n", data[0], data[1]); + run_len = (data[0] & 0x3f); + pal_id = data[1]; + data += 2; + break; + case 0xC0: + if (data + 3 > end) + return; + //g_print ("data 0x%02x 0x%02x 0x%02x\n", data[0], data[1], data[2]); + run_len = ((data[0] << 8) | data[1]) & 0x3fff; + pal_id = data[2]; + data += 3; + break; + } + } + +#if 1 + if (palette[pal_id].A) { + for (i = 0; i < run_len; i++) + g_print ("%02x ", pal_id); + } else { + for (i = 0; i < run_len; i++) + g_print (" "); + } + x += run_len; + if (!run_len || x > obj_w) { + g_print ("\n"); + x = 0; + } +#else + g_print ("Run x: %d pix: %d col: %d\n", x, run_len, pal_id); + x += run_len; + if (x >= obj_w) + x = 0; +#endif + + }; + + g_print ("\n"); +} + +static int +parse_presentation_segment (guint8 type, guint8 * payload, guint16 len) +{ + guint8 *end = payload + len; + guint16 vid_w, vid_h; + gint8 vid_fps; + guint16 composition_desc_no; + guint8 composition_desc_state; + guint8 pres_seg_flags; + guint8 palette_id; + guint8 n_objects; + gint i; + + /* Parse video descriptor */ + if (payload + 5 > end) + return 0; + vid_w = GST_READ_UINT16_BE (payload); + vid_h = GST_READ_UINT16_BE (payload + 2); + vid_fps = payload[4]; + payload += 5; + + /* Parse composition descriptor */ + if (payload + 3 > end) + return 0; + composition_desc_no = GST_READ_UINT16_BE (payload); + composition_desc_state = payload[2]; + payload += 3; + + /* Parse other bits */ + if (payload + 3 > end) + return 0; + + pres_seg_flags = payload[0]; + palette_id = payload[1]; + n_objects = payload[2]; + payload += 3; + + g_print ("Video width %u height %u fps code %u\n", vid_w, vid_h, vid_fps); + g_print + ("Composition num %u state %u flags 0x%02x palette id %u n_objects %u\n", + composition_desc_no, composition_desc_state, pres_seg_flags, palette_id, + n_objects); + + for (i = 0; i < (gint) n_objects; i++) { + guint16 obj_id; + guint8 win_id; + guint8 obj_flags; + guint16 x, y; + + if (payload + 8 > end) + break; + obj_id = GST_READ_UINT16_BE (payload); + win_id = payload[2]; + obj_flags = payload[3]; + x = GST_READ_UINT16_BE (payload + 4); + y = GST_READ_UINT16_BE (payload + 6); + payload += 8; + + g_print ("Composition object %d Object ID %u Window ID %u flags 0x%02x " + "x %u y %u\n", i, obj_id, win_id, obj_flags, x, y); + + if (obj_flags & PGS_COMP_OBJECT_FLAG_CROPPED) { + guint16 crop_x, crop_y, crop_w, crop_h; + if (payload + 8 > end) + break; + + crop_x = GST_READ_UINT16_BE (payload); + crop_y = GST_READ_UINT16_BE (payload + 2); + crop_w = GST_READ_UINT16_BE (payload + 4); + crop_h = GST_READ_UINT16_BE (payload + 6); + payload += 8; + + g_print ("Cropping window x %u y %u w %u h %u\n", + crop_x, crop_y, crop_w, crop_h); + } + } + + if (payload != end) { + g_print ("%u bytes left over:\n", end - payload); + dump_bytes (payload, end - payload); + } + + return 0; +} + +static int +parse_set_palette (guint8 type, guint8 * payload, guint16 len) +{ + const gint PGS_PALETTE_ENTRY_SIZE = 5; + guint8 *end = payload + len; + guint8 palette_id; + guint8 palette_version; + gint n_entries, i; + + if (len < 2) /* Palette command too short */ + return 0; + palette_id = payload[0]; + palette_version = payload[1]; + payload += 2; + + n_entries = (len - 2) / PGS_PALETTE_ENTRY_SIZE; + + g_print ("Palette ID %u version %u. %d entries\n", + palette_id, palette_version, n_entries); + for (i = 0; i < n_entries; i++) { + guint8 n, Y, Cb, Cr, A; + n = payload[0]; + palette[n].n = n; + palette[n].Y = Y = payload[1]; + palette[n].Cb = Cb = payload[2]; + palette[n].Cr = Cr = payload[3]; + palette[n].A = A = payload[4]; + + g_print ("Entry %3d: Y %3d Cb %3d Cr %3d A %3d ", n, Y, Cb, Cr, A); + if (((i + 1) % 2) == 0) + g_print ("\n"); + + payload += PGS_PALETTE_ENTRY_SIZE; + } + for (i = n_entries; i < 256; i++) { + palette[i].n = i; + palette[i].A = 0; + } + + if (n_entries > 0 && (i % 2)) + g_print ("\n"); + + if (payload != end) { + g_print ("%u bytes left over:\n", end - payload); + dump_bytes (payload, end - payload); + } + + return 0; +} + +static int +parse_set_window (guint8 type, guint8 * payload, guint16 len) +{ + guint8 *end = payload + len; + guint8 win_id, win_ver; + guint16 x, y, w, h; + + if (payload + 10 > end) + return 0; + + dump_bytes (payload, len); + + /* FIXME: This is just a guess as to what the numbers mean: */ + win_id = payload[0]; + win_ver = payload[1]; + x = GST_READ_UINT16_BE (payload + 2); + y = GST_READ_UINT16_BE (payload + 4); + w = GST_READ_UINT16_BE (payload + 6); + h = GST_READ_UINT16_BE (payload + 8); + payload += 10; + + g_print ("Win ID %u version %d x %d y %d w %d h %d\n", + win_id, win_ver, x, y, w, h); + + if (payload != end) { + g_print ("%u bytes left over:\n", end - payload); + dump_bytes (payload, end - payload); + } + + return 0; +} + +static int +parse_set_object_data (guint8 type, guint8 * payload, guint16 len) +{ + guint8 *end = payload + len; + guint16 obj_id; + guint8 obj_ver, obj_flags; + + if (payload + 4 > end) + return 0; + obj_id = GST_READ_UINT16_BE (payload); + obj_ver = payload[2]; + obj_flags = payload[3]; + payload += 4; + + g_print ("Object ID %d ver %u flags 0x%02x\n", obj_id, obj_ver, obj_flags); + + if (obj_flags & PGS_OBJECT_UPDATE_FLAG_START_RLE) { + + if (payload + 3 > end) + return 0; + + rle_data_size = GST_READ_UINT24_BE (payload); + payload += 3; + + g_print ("%d bytes of RLE data, of %d bytes total.\n", + end - payload, rle_data_size); + + rle_data = g_realloc (rle_data, rle_data_size); + rle_data_used = end - payload; + memcpy (rle_data, payload, end - payload); + payload = end; + } else { + g_print ("%d bytes of additional RLE data\n", end - payload); + if (rle_data_size < rle_data_used + end - payload) + return 0; + + memcpy (rle_data + rle_data_used, payload, end - payload); + rle_data_used += end - payload; + payload = end; + } + + if (rle_data_size == rle_data_used) + dump_rle_data (rle_data, rle_data_size); + + if (payload != end) { + g_print ("%u bytes left over:\n", end - payload); + dump_bytes (payload, end - payload); + } + + return 0; +} + +static int +parse_pgs_packet (guint8 type, guint8 * payload, guint16 len) +{ + int ret = 0; + + if (!in_presentation_segment && type != PGS_COMMAND_PRESENTATION_SEGMENT) { + g_print ("Expected BEGIN PRESENTATION SEGMENT command. " + "Got command type 0x%02x len %u. Skipping\n", type, len); + return 0; + } + + switch (type) { + case PGS_COMMAND_PRESENTATION_SEGMENT: + g_print ("*******************************************\n" + "Begin PRESENTATION_SEGMENT (0x%02x) packet len %u\n", type, len); + in_presentation_segment = TRUE; + ret = parse_presentation_segment (type, payload, len); + break; + case PGS_COMMAND_SET_OBJECT_DATA: + g_print ("*** Set Object Data (0x%02x) packet len %u\n", type, len); + ret = parse_set_object_data (type, payload, len); + break; + case PGS_COMMAND_SET_PALETTE: + g_print ("*** Set Palette (0x%02x) packet len %u\n", type, len); + ret = parse_set_palette (type, payload, len); + break; + case PGS_COMMAND_SET_WINDOW: + g_print ("*** Set Window command (0x%02x) packet len %u\n", type, len); + ret = parse_set_window (type, payload, len); + break; + case PGS_COMMAND_INTERACTIVE_SEGMENT: + g_print ("*** Interactive Segment command(0x%02x) packet len %u\n", + type, len); + dump_bytes (payload, len); + break; + case PGS_COMMAND_END_DISPLAY: + g_print ("*** End Display command (0x%02x) packet len %u\n", type, len); + in_presentation_segment = FALSE; + break; + default: + g_print ("*** Unknown command: type 0x%02x len %u. Skipping\n", type, + len); + break; + } + g_print ("\n"); + + return ret; +} + +gint +gstspu_dump_pgs_buffer (GstBuffer * buf) +{ + guint8 *pos, *end; + guint8 type; + guint16 packet_len; + + pos = GST_BUFFER_DATA (buf); + end = pos + GST_BUFFER_SIZE (buf); + + /* Need at least 3 bytes */ + if (pos + 3 > end) { + g_print ("Not enough bytes to be a PGS packet\n"); + return -1; + } + + do { + type = *pos++; + packet_len = GST_READ_UINT16_BE (pos); + pos += 2; + + if (pos + packet_len > end) { + g_print ("Invalid packet length %u (only have %u bytes)\n", packet_len, + end - pos); + return -1; + } + + if (parse_pgs_packet (type, pos, packet_len)) + return -1; + + pos += packet_len; + } while (pos + 3 <= end); + + return (pos - GST_BUFFER_DATA (buf)); +} diff --git a/gst/dvdspu/gstspu-pgs.h b/gst/dvdspu/gstspu-pgs.h new file mode 100644 index 00000000..db943071 --- /dev/null +++ b/gst/dvdspu/gstspu-pgs.h @@ -0,0 +1,60 @@ +/* GStreamer Sub-Picture Unit - PGS handling + * Copyright (C) 2009 Jan Schmidt + * + * 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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __GSTSPU_PGS_H__ +#define __GSTSPU_PGS_H__ + +typedef enum PgsCommandType { + PGS_COMMAND_SET_PALETTE = 0x14, + PGS_COMMAND_SET_OBJECT_DATA = 0x15, + PGS_COMMAND_PRESENTATION_SEGMENT = 0x16, + PGS_COMMAND_SET_WINDOW = 0x17, + PGS_COMMAND_INTERACTIVE_SEGMENT = 0x18, + + PGS_COMMAND_END_DISPLAY = 0x80, + + PGS_COMMAND_INVALID = 0xFFFF +} PgsCommandType; + +typedef enum PgsPresSegmentFlags { + PGS_PRES_SEGMENT_FLAG_UPDATE_PALETTE = 0x80 +} PgsPresSegmentFlags; + +typedef enum PgsCompObjectFlags { + PGS_COMP_OBJECT_FLAG_CROPPED = 0x80, + PGS_COMP_OBJECT_FLAG_FORCED = 0x40 +} PgsCompObjectFlags; + +typedef enum PgsObjectUpdateFlags { + /* Set in an object_update if this is the beginning of new RLE data. + * If not set, the data is a continuation to be appended */ + PGS_OBJECT_UPDATE_FLAG_START_RLE = 0x80 +} PgsObjectUpdateFlags; + +typedef struct PgsPaletteEntry { + guint8 n; + guint8 Y; + guint8 Cb; + guint8 Cr; + guint8 A; +} PgsPaletteEntry; + +gint gstspu_dump_pgs_buffer (GstBuffer *buf); + +#endif -- cgit v1.2.1 From 871287ba2adb1295fb990aa78cfb01fb5a3e3d4f Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Thu, 21 May 2009 23:45:43 +0100 Subject: dvdspu: Collect entire PGS packets and queue as events Collect fragmented PGS packets and submit as complete events for processing at the correct moment. --- gst/dvdspu/gstdvdspu.c | 67 +++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 56 insertions(+), 11 deletions(-) diff --git a/gst/dvdspu/gstdvdspu.c b/gst/dvdspu/gstdvdspu.c index b340f92f..69bc3c99 100644 --- a/gst/dvdspu/gstdvdspu.c +++ b/gst/dvdspu/gstdvdspu.c @@ -931,11 +931,15 @@ gst_dvd_spu_setup_cmd_blk (GstDVDSpu * dvdspu, guint16 cmd_blk_offset, } static void -gst_dvd_spu_handle_new_spu_buf (GstDVDSpu * dvdspu, SpuPacket * packet) +gst_dvd_spu_handle_new_vobsub_buf (GstDVDSpu * dvdspu, SpuPacket * packet) { guint8 *start, *end; SpuState *state = &dvdspu->spu_state; +#if DUMP_DCSQ + gst_dvd_spu_dump_dcsq (dvdspu, packet->event_ts, packet->buf); +#endif + if (G_UNLIKELY (GST_BUFFER_SIZE (packet->buf) < 4)) goto invalid; @@ -1127,12 +1131,20 @@ gst_dvd_spu_advance_spu (GstDVDSpu * dvdspu, GstClockTime new_ts) packet->buf ? "buffer" : "event"); if (packet->buf) { -#if DUMP_DCSQ - gst_dvd_spu_dump_dcsq (dvdspu, packet->event_ts, packet->buf); -#endif - gst_dvd_spu_handle_new_spu_buf (dvdspu, packet); - } - if (packet->event) + switch (dvdspu->spu_input_type) { + case SPU_INPUT_TYPE_VOBSUB: + gst_dvd_spu_handle_new_vobsub_buf (dvdspu, packet); + break; + case SPU_INPUT_TYPE_PGS: + gstspu_dump_pgs_buffer (packet->buf); + gst_buffer_unref (packet->buf); + break; + default: + g_assert_not_reached (); + break; + } + g_assert (packet->event == NULL); + } else if (packet->event) gst_dvd_spu_handle_dvd_event (dvdspu, packet->event); g_free (packet); @@ -1277,6 +1289,9 @@ gst_dvd_spu_subpic_chain (GstPad * pad, GstBuffer * buf) } if (dvdspu->partial_spu != NULL) { + if (GST_BUFFER_TIMESTAMP_IS_VALID (buf)) + GST_WARNING_OBJECT (dvdspu, + "Joining subpicture buffer with timestamp to previous"); dvdspu->partial_spu = gst_buffer_join (dvdspu->partial_spu, buf); } else { /* If we don't yet have a buffer, wait for one with a timestamp, @@ -1317,11 +1332,41 @@ gst_dvd_spu_subpic_chain (GstPad * pad, GstBuffer * buf) } } break; - case SPU_INPUT_TYPE_PGS: - gstspu_dump_pgs_buffer (dvdspu->partial_spu); - gst_buffer_unref (dvdspu->partial_spu); - dvdspu->partial_spu = NULL; + case SPU_INPUT_TYPE_PGS:{ + /* Collect until we have a command buffer that ends exactly at the size + * we've collected */ + guint8 packet_type; + guint16 packet_size; + guint8 *data = GST_BUFFER_DATA (dvdspu->partial_spu); + guint8 *end = data + GST_BUFFER_SIZE (dvdspu->partial_spu); + + /* FIXME: There's no need to walk the command set each time. We can set a + * marker and resume where we left off next time */ + while (data != end) { + if (data + 3 > end) + break; + packet_type = *data++; + packet_size = GST_READ_UINT16_BE (data); + data += 2; + if (data + packet_size > end) + break; + data += packet_size; + if (packet_type == PGS_COMMAND_END_DISPLAY && data != end) { + /* Extra cruft on the end of the packet -> assume invalid */ + gst_buffer_unref (dvdspu->partial_spu); + dvdspu->partial_spu = NULL; + break; + } + } + + if (dvdspu->partial_spu && data == end) { + g_print ("Complete packet of size %u\n", + GST_BUFFER_SIZE (dvdspu->partial_spu)); + submit_new_spu_packet (dvdspu, dvdspu->partial_spu); + dvdspu->partial_spu = NULL; + } break; + } default: GST_ERROR_OBJECT (dvdspu, "Input type not configured before SPU passing"); goto caps_not_set; -- cgit v1.2.1 From 293a976532b8fc66fd90c07d2cb9cf23e0b21d3e Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 22 May 2009 10:15:44 +0100 Subject: dvdspu: Make the PGS dumping less verbose --- gst/dvdspu/gstspu-pgs.c | 45 +++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/gst/dvdspu/gstspu-pgs.c b/gst/dvdspu/gstspu-pgs.c index de6a4151..719a5d1d 100644 --- a/gst/dvdspu/gstspu-pgs.c +++ b/gst/dvdspu/gstspu-pgs.c @@ -23,6 +23,8 @@ guint8 *rle_data = NULL; guint32 rle_data_size = 0, rle_data_used = 0; PgsPaletteEntry palette[256]; +#define DUMP_FULL_IMAGE 0 + static void dump_bytes (guint8 * data, guint16 len) { @@ -43,8 +45,6 @@ dump_rle_data (guint8 * data, guint32 len) { guint8 *end = data + len; guint16 obj_w, obj_h; - gint i; - guint x = 0; if (data + 4 > end) return; @@ -104,24 +104,30 @@ dump_rle_data (guint8 * data, guint32 len) } } +#if DUMP_FULL_IMAGE + { + gint i; + guint x = 0; #if 1 - if (palette[pal_id].A) { - for (i = 0; i < run_len; i++) - g_print ("%02x ", pal_id); - } else { - for (i = 0; i < run_len; i++) - g_print (" "); - } - x += run_len; - if (!run_len || x > obj_w) { - g_print ("\n"); - x = 0; - } + if (palette[pal_id].A) { + for (i = 0; i < run_len; i++) + g_print ("%02x ", pal_id); + } else { + for (i = 0; i < run_len; i++) + g_print (" "); + } + x += run_len; + if (!run_len || x > obj_w) { + g_print ("\n"); + x = 0; + } #else - g_print ("Run x: %d pix: %d col: %d\n", x, run_len, pal_id); - x += run_len; - if (x >= obj_w) - x = 0; + g_print ("Run x: %d pix: %d col: %d\n", x, run_len, pal_id); + x += run_len; + if (x >= obj_w) + x = 0; +#endif + } #endif }; @@ -413,6 +419,8 @@ gstspu_dump_pgs_buffer (GstBuffer * buf) return -1; } + g_print ("Begin dumping command buffer of size %u ts %" GST_TIME_FORMAT "\n", + end - pos, GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf))); do { type = *pos++; packet_len = GST_READ_UINT16_BE (pos); @@ -430,5 +438,6 @@ gstspu_dump_pgs_buffer (GstBuffer * buf) pos += packet_len; } while (pos + 3 <= end); + g_print ("End dumping command buffer with %u bytes remaining\n", end - pos); return (pos - GST_BUFFER_DATA (buf)); } -- cgit v1.2.1 From e0e5975462029694199f5de4e0d3918886df9a68 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 22 May 2009 11:12:52 +0100 Subject: dvdspu: Add copyright header and includes to the PGS handler --- gst/dvdspu/gstspu-pgs.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/gst/dvdspu/gstspu-pgs.c b/gst/dvdspu/gstspu-pgs.c index 719a5d1d..b4bbdc33 100644 --- a/gst/dvdspu/gstspu-pgs.c +++ b/gst/dvdspu/gstspu-pgs.c @@ -1,9 +1,26 @@ -#include -#include -#include -#include +/* GStreamer Sub-Picture Unit - PGS handling + * Copyright (C) 2009 Jan Schmidt + * + * 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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +#ifdef HAVE_CONFIG_H +# include +#endif -#include +#include #include #include "gstspu-pgs.h" -- cgit v1.2.1 From 7e20e3be45cc3548cabb1752996c68dd25c76870 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 22 May 2009 11:13:59 +0100 Subject: dvdspu: Move a bunch of vobsub specific logic to a separate file. Start separating out the vobsub logic in preparation for creating separate renderer objects for each subpicture format. --- gst/dvdspu/Makefile.am | 4 +- gst/dvdspu/gstdvdspu.c | 341 +--------------------------------------- gst/dvdspu/gstspu-vobsub.c | 377 +++++++++++++++++++++++++++++++++++++++++++++ gst/dvdspu/gstspu-vobsub.h | 25 +++ 4 files changed, 406 insertions(+), 341 deletions(-) create mode 100644 gst/dvdspu/gstspu-vobsub.c create mode 100644 gst/dvdspu/gstspu-vobsub.h diff --git a/gst/dvdspu/Makefile.am b/gst/dvdspu/Makefile.am index 2edd6e5e..20cfe03c 100644 --- a/gst/dvdspu/Makefile.am +++ b/gst/dvdspu/Makefile.am @@ -1,13 +1,13 @@ plugin_LTLIBRARIES = libgstdvdspu.la -libgstdvdspu_la_SOURCES = gstdvdspu.c gstdvdspu-render.c gstspu-pgs.c +libgstdvdspu_la_SOURCES = gstdvdspu.c gstdvdspu-render.c gstspu-vobsub.c gstspu-pgs.c libgstdvdspu_la_CFLAGS = $(GST_CFLAGS) libgstdvdspu_la_LIBADD = $(GST_LIBS) libgstdvdspu_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstdvdspu_la_LIBTOOLFLAGS = --tag=disable-static -noinst_HEADERS = gstdvdspu.h gstspu-pgs.h +noinst_HEADERS = gstdvdspu.h gstspu-pgs.h gstspu-vobsub.h EXTRA_DIST = Notes.txt diff --git a/gst/dvdspu/gstdvdspu.c b/gst/dvdspu/gstdvdspu.c index 69bc3c99..c9c116e8 100644 --- a/gst/dvdspu/gstdvdspu.c +++ b/gst/dvdspu/gstdvdspu.c @@ -39,18 +39,14 @@ #include #include "gstdvdspu.h" +#include "gstspu-vobsub.h" #include "gstspu-pgs.h" -#define DUMP_DCSQ 0 - extern void gst_dvd_spu_render_spu (GstDVDSpu * dvdspu, GstBuffer * buf); GST_DEBUG_CATEGORY (dvdspu_debug); #define GST_CAT_DEFAULT dvdspu_debug -/* Convert an STM offset in the SPU sequence to a GStreamer timestamp */ -#define STM_TO_GST(stm) ((GST_MSECOND * 1024 * (stm)) / 90) - /* Filter signals and args */ enum { @@ -708,267 +704,6 @@ gst_dvd_spu_redraw_still (GstDVDSpu * dvdspu, gboolean force) } } -static void -gst_dvd_spu_parse_chg_colcon (GstDVDSpu * dvdspu, guint8 * data, guint8 * end) -{ - SpuState *state = &dvdspu->spu_state; - guint8 *cur; - gint16 n_entries; - gint16 i; - - /* Clear any existing chg colcon info */ - state->n_line_ctrl_i = 0; - if (state->line_ctrl_i != NULL) { - g_free (state->line_ctrl_i); - state->line_ctrl_i = NULL; - } - GST_DEBUG_OBJECT (dvdspu, "Change Color & Contrast. Pixel data = %d bytes", - (gint16) (end - data)); - - /* Count the number of entries we'll need */ - n_entries = 0; - for (cur = data; cur < end;) { - guint8 n_changes; - guint32 code; - - if (cur + 4 > end) - break; - - code = GST_READ_UINT32_BE (cur); - if (code == 0x0fffffff) - break; /* Termination code */ - - n_changes = CLAMP ((cur[2] >> 4), 1, 8); - cur += 4 + (6 * n_changes); - - if (cur > end) - break; /* Invalid entry overrunning buffer */ - - n_entries++; - } - - state->n_line_ctrl_i = n_entries; - state->line_ctrl_i = g_new (SpuLineCtrlI, n_entries); - - cur = data; - for (i = 0; i < n_entries; i++) { - SpuLineCtrlI *cur_line_ctrl = state->line_ctrl_i + i; - guint8 n_changes = CLAMP ((cur[2] >> 4), 1, 8); - guint8 c; - - cur_line_ctrl->n_changes = n_changes; - cur_line_ctrl->top = ((cur[0] << 8) & 0x300) | cur[1]; - cur_line_ctrl->bottom = ((cur[2] << 8) & 0x300) | cur[3]; - - GST_LOG_OBJECT (dvdspu, "ChgColcon Entry %d Top: %d Bottom: %d Changes: %d", - i, cur_line_ctrl->top, cur_line_ctrl->bottom, n_changes); - cur += 4; - - for (c = 0; c < n_changes; c++) { - SpuPixCtrlI *cur_pix_ctrl = cur_line_ctrl->pix_ctrl_i + c; - - cur_pix_ctrl->left = ((cur[0] << 8) & 0x300) | cur[1]; - cur_pix_ctrl->palette = GST_READ_UINT32_BE (cur + 2); - GST_LOG_OBJECT (dvdspu, " %d: left: %d palette 0x%x", c, - cur_pix_ctrl->left, cur_pix_ctrl->palette); - cur += 6; - } - } -} - -static void -gst_dvd_spu_exec_cmd_blk (GstDVDSpu * dvdspu, guint8 * data, guint8 * end) -{ - SpuState *state = &dvdspu->spu_state; - - while (data < end) { - guint8 cmd; - - cmd = data[0]; - - switch (cmd) { - case SPU_CMD_FSTA_DSP: - GST_DEBUG_OBJECT (dvdspu, " Forced Display"); - state->flags |= SPU_STATE_FORCED_DSP; - data += 1; - break; - case SPU_CMD_DSP: - GST_DEBUG_OBJECT (dvdspu, " Display On"); - state->flags |= SPU_STATE_DISPLAY; - data += 1; - break; - case SPU_CMD_STP_DSP: - GST_DEBUG_OBJECT (dvdspu, " Display Off"); - state->flags &= ~(SPU_STATE_FORCED_DSP | SPU_STATE_DISPLAY); - data += 1; - break; - case SPU_CMD_SET_COLOR:{ - if (G_UNLIKELY (data + 3 >= end)) - return; /* Invalid SET_COLOR cmd at the end of the blk */ - - state->main_idx[3] = data[1] >> 4; - state->main_idx[2] = data[1] & 0x0f; - state->main_idx[1] = data[2] >> 4; - state->main_idx[0] = data[2] & 0x0f; - - state->main_pal_dirty = TRUE; - - GST_DEBUG_OBJECT (dvdspu, - " Set Color bg %u pattern %u emph-1 %u emph-2 %u", - state->main_idx[0], state->main_idx[1], state->main_idx[2], - state->main_idx[3]); - data += 3; - break; - } - case SPU_CMD_SET_ALPHA:{ - if (G_UNLIKELY (data + 3 >= end)) - return; /* Invalid SET_ALPHA cmd at the end of the blk */ - - state->main_alpha[3] = data[1] >> 4; - state->main_alpha[2] = data[1] & 0x0f; - state->main_alpha[1] = data[2] >> 4; - state->main_alpha[0] = data[2] & 0x0f; - - state->main_pal_dirty = TRUE; - - GST_DEBUG_OBJECT (dvdspu, - " Set Alpha bg %u pattern %u emph-1 %u emph-2 %u", - state->main_alpha[0], state->main_alpha[1], state->main_alpha[2], - state->main_alpha[3]); - data += 3; - break; - } - case SPU_CMD_SET_DAREA:{ - SpuRect *r = &state->disp_rect; - - if (G_UNLIKELY (data + 7 >= end)) - return; /* Invalid SET_DAREA cmd at the end of the blk */ - - r->top = ((data[4] & 0x3f) << 4) | ((data[5] & 0xe0) >> 4); - r->left = ((data[1] & 0x3f) << 4) | ((data[2] & 0xf0) >> 4); - r->right = ((data[2] & 0x03) << 8) | data[3]; - r->bottom = ((data[5] & 0x03) << 8) | data[6]; - - GST_DEBUG_OBJECT (dvdspu, - " Set Display Area top %u left %u bottom %u right %u", r->top, - r->left, r->bottom, r->right); - - data += 7; - break; - } - case SPU_CMD_DSPXA:{ - if (G_UNLIKELY (data + 5 >= end)) - return; /* Invalid SET_DSPXE cmd at the end of the blk */ - - state->pix_data[0] = GST_READ_UINT16_BE (data + 1); - state->pix_data[1] = GST_READ_UINT16_BE (data + 3); - /* Store a reference to the current command buffer, as that's where - * we'll need to take our pixel data from */ - gst_buffer_replace (&state->pix_buf, state->buf); - - GST_DEBUG_OBJECT (dvdspu, " Set Pixel Data Offsets top: %u bot: %u", - state->pix_data[0], state->pix_data[1]); - - data += 5; - break; - } - case SPU_CMD_CHG_COLCON:{ - guint16 field_size; - - GST_DEBUG_OBJECT (dvdspu, " Set Color & Contrast Change"); - if (G_UNLIKELY (data + 3 >= end)) - return; /* Invalid CHG_COLCON cmd at the end of the blk */ - - data++; - field_size = GST_READ_UINT16_BE (data); - - if (G_UNLIKELY (data + field_size >= end)) - return; /* Invalid CHG_COLCON cmd at the end of the blk */ - - gst_dvd_spu_parse_chg_colcon (dvdspu, data + 2, data + field_size); - state->line_ctrl_i_pal_dirty = TRUE; - data += field_size; - break; - } - case SPU_CMD_END: - default: - GST_DEBUG_OBJECT (dvdspu, " END"); - data = end; - break; - } - } -} - -static void -gst_dvd_spu_finish_spu_buf (GstDVDSpu * dvdspu) -{ - SpuState *state = &dvdspu->spu_state; - - state->next_ts = state->base_ts = GST_CLOCK_TIME_NONE; - gst_buffer_replace (&state->buf, NULL); - - GST_DEBUG_OBJECT (dvdspu, "Finished SPU buffer"); -} - -static gboolean -gst_dvd_spu_setup_cmd_blk (GstDVDSpu * dvdspu, guint16 cmd_blk_offset, - guint8 * start, guint8 * end) -{ - SpuState *state = &dvdspu->spu_state; - guint16 delay; - guint8 *cmd_blk = start + cmd_blk_offset; - - if (G_UNLIKELY (cmd_blk + 5 >= end)) - return FALSE; /* No valid command block to read */ - - delay = GST_READ_UINT16_BE (cmd_blk); - state->next_ts = state->base_ts + STM_TO_GST (delay); - state->cur_cmd_blk = cmd_blk_offset; - - GST_DEBUG_OBJECT (dvdspu, "Setup CMD Block @ %u with TS %" GST_TIME_FORMAT, - state->cur_cmd_blk, GST_TIME_ARGS (state->next_ts)); - return TRUE; -} - -static void -gst_dvd_spu_handle_new_vobsub_buf (GstDVDSpu * dvdspu, SpuPacket * packet) -{ - guint8 *start, *end; - SpuState *state = &dvdspu->spu_state; - -#if DUMP_DCSQ - gst_dvd_spu_dump_dcsq (dvdspu, packet->event_ts, packet->buf); -#endif - - if (G_UNLIKELY (GST_BUFFER_SIZE (packet->buf) < 4)) - goto invalid; - - if (state->buf != NULL) { - gst_buffer_unref (state->buf); - state->buf = NULL; - } - state->buf = packet->buf; - state->base_ts = packet->event_ts; - - start = GST_BUFFER_DATA (state->buf); - end = start + GST_BUFFER_SIZE (state->buf); - - /* Configure the first command block in this buffer as our initial blk */ - state->cur_cmd_blk = GST_READ_UINT16_BE (start + 2); - gst_dvd_spu_setup_cmd_blk (dvdspu, state->cur_cmd_blk, start, end); - /* Clear existing chg-colcon info */ - state->n_line_ctrl_i = 0; - if (state->line_ctrl_i != NULL) { - g_free (state->line_ctrl_i); - state->line_ctrl_i = NULL; - } - return; - -invalid: - /* Invalid buffer */ - gst_dvd_spu_finish_spu_buf (dvdspu); -} - static void gst_dvd_spu_handle_dvd_event (GstDVDSpu * dvdspu, GstEvent * event) { @@ -1055,51 +790,6 @@ gst_dvd_spu_handle_dvd_event (GstDVDSpu * dvdspu, GstEvent * event) gst_event_unref (event); } -#if DUMP_DCSQ -static void -gst_dvd_spu_dump_dcsq (GstDVDSpu * dvdspu, - GstClockTime start_ts, GstBuffer * spu_buf) -{ - guint16 cmd_blk_offset; - guint16 next_blk; - guint8 *start, *end; - - start = GST_BUFFER_DATA (spu_buf); - end = start + GST_BUFFER_SIZE (spu_buf); - - g_return_if_fail (start != NULL); - - /* First command */ - next_blk = GST_READ_UINT16_BE (start + 2); - cmd_blk_offset = 0; - - /* Loop through all commands */ - g_print ("SPU begins @ %" GST_TIME_FORMAT " offset %u\n", - GST_TIME_ARGS (start_ts), next_blk); - - while (cmd_blk_offset != next_blk) { - guint8 *data; - GstClockTime cmd_blk_ts; - - cmd_blk_offset = next_blk; - - if (G_UNLIKELY (start + cmd_blk_offset + 5 >= end)) - break; /* No valid command to read */ - - data = start + cmd_blk_offset; - - cmd_blk_ts = start_ts + STM_TO_GST (GST_READ_UINT16_BE (data)); - next_blk = GST_READ_UINT16_BE (data + 2); - - g_print ("Cmd Blk @ offset %u next %u ts %" GST_TIME_FORMAT "\n", - cmd_blk_offset, next_blk, GST_TIME_ARGS (cmd_blk_ts)); - - data += 4; - gst_dvd_spu_exec_cmd_blk (dvdspu, data, end); - } -} -#endif - /* Advance the SPU packet/command queue to a time. new_ts is in running time */ static void gst_dvd_spu_advance_spu (GstDVDSpu * dvdspu, GstClockTime new_ts) @@ -1107,9 +797,6 @@ gst_dvd_spu_advance_spu (GstDVDSpu * dvdspu, GstClockTime new_ts) SpuState *state = &dvdspu->spu_state; while (state->next_ts == GST_CLOCK_TIME_NONE || state->next_ts <= new_ts) { - guint8 *start, *cmd_blk, *end; - guint16 next_blk; - if (state->buf == NULL) { GstClockTime vid_run_ts; @@ -1159,31 +846,7 @@ gst_dvd_spu_advance_spu (GstDVDSpu * dvdspu, GstClockTime new_ts) * next cmd */ g_assert (state->buf != NULL); - GST_DEBUG_OBJECT (dvdspu, "Executing cmd blk with TS %" GST_TIME_FORMAT - " @ offset %u", GST_TIME_ARGS (state->next_ts), state->cur_cmd_blk); - - start = GST_BUFFER_DATA (state->buf); - end = start + GST_BUFFER_SIZE (state->buf); - - cmd_blk = start + state->cur_cmd_blk; - - if (G_UNLIKELY (cmd_blk + 5 >= end)) { - /* Invalid. Finish the buffer and loop again */ - gst_dvd_spu_finish_spu_buf (dvdspu); - continue; - } - - gst_dvd_spu_exec_cmd_blk (dvdspu, cmd_blk + 4, end); - - next_blk = GST_READ_UINT16_BE (cmd_blk + 2); - if (next_blk != state->cur_cmd_blk) { - /* Advance to the next block of commands */ - gst_dvd_spu_setup_cmd_blk (dvdspu, next_blk, start, end); - } else { - /* Next Block points to the current block, so we're finished with this - * SPU buffer */ - gst_dvd_spu_finish_spu_buf (dvdspu); - } + gst_dvdspu_vobsub_execute_event (dvdspu); } } diff --git a/gst/dvdspu/gstspu-vobsub.c b/gst/dvdspu/gstspu-vobsub.c new file mode 100644 index 00000000..c13d9ab0 --- /dev/null +++ b/gst/dvdspu/gstspu-vobsub.c @@ -0,0 +1,377 @@ +/* GStreamer Sub-Picture Unit - VobSub/DVD handling + * Copyright (C) 2009 Jan Schmidt + * + * 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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#include + +#include "gstdvdspu.h" +#include "gstspu-vobsub.h" + +GST_DEBUG_CATEGORY_EXTERN (dvdspu_debug); +#define GST_CAT_DEFAULT dvdspu_debug + +/* Define to dump out a text description of the incoming SPU commands */ +#define DUMP_DCSQ 0 + +/* Convert an STM offset in the SPU sequence to a GStreamer timestamp */ +#define STM_TO_GST(stm) ((GST_MSECOND * 1024 * (stm)) / 90) + +static void +gst_dvd_spu_parse_chg_colcon (GstDVDSpu * dvdspu, guint8 * data, guint8 * end) +{ + SpuState *state = &dvdspu->spu_state; + guint8 *cur; + gint16 n_entries; + gint16 i; + + /* Clear any existing chg colcon info */ + state->n_line_ctrl_i = 0; + if (state->line_ctrl_i != NULL) { + g_free (state->line_ctrl_i); + state->line_ctrl_i = NULL; + } + GST_DEBUG_OBJECT (dvdspu, "Change Color & Contrast. Pixel data = %d bytes", + (gint16) (end - data)); + + /* Count the number of entries we'll need */ + n_entries = 0; + for (cur = data; cur < end;) { + guint8 n_changes; + guint32 code; + + if (cur + 4 > end) + break; + + code = GST_READ_UINT32_BE (cur); + if (code == 0x0fffffff) + break; /* Termination code */ + + n_changes = CLAMP ((cur[2] >> 4), 1, 8); + cur += 4 + (6 * n_changes); + + if (cur > end) + break; /* Invalid entry overrunning buffer */ + + n_entries++; + } + + state->n_line_ctrl_i = n_entries; + state->line_ctrl_i = g_new (SpuLineCtrlI, n_entries); + + cur = data; + for (i = 0; i < n_entries; i++) { + SpuLineCtrlI *cur_line_ctrl = state->line_ctrl_i + i; + guint8 n_changes = CLAMP ((cur[2] >> 4), 1, 8); + guint8 c; + + cur_line_ctrl->n_changes = n_changes; + cur_line_ctrl->top = ((cur[0] << 8) & 0x300) | cur[1]; + cur_line_ctrl->bottom = ((cur[2] << 8) & 0x300) | cur[3]; + + GST_LOG_OBJECT (dvdspu, "ChgColcon Entry %d Top: %d Bottom: %d Changes: %d", + i, cur_line_ctrl->top, cur_line_ctrl->bottom, n_changes); + cur += 4; + + for (c = 0; c < n_changes; c++) { + SpuPixCtrlI *cur_pix_ctrl = cur_line_ctrl->pix_ctrl_i + c; + + cur_pix_ctrl->left = ((cur[0] << 8) & 0x300) | cur[1]; + cur_pix_ctrl->palette = GST_READ_UINT32_BE (cur + 2); + GST_LOG_OBJECT (dvdspu, " %d: left: %d palette 0x%x", c, + cur_pix_ctrl->left, cur_pix_ctrl->palette); + cur += 6; + } + } +} + +static void +gst_dvd_spu_exec_cmd_blk (GstDVDSpu * dvdspu, guint8 * data, guint8 * end) +{ + SpuState *state = &dvdspu->spu_state; + + while (data < end) { + guint8 cmd; + + cmd = data[0]; + + switch (cmd) { + case SPU_CMD_FSTA_DSP: + GST_DEBUG_OBJECT (dvdspu, " Forced Display"); + state->flags |= SPU_STATE_FORCED_DSP; + data += 1; + break; + case SPU_CMD_DSP: + GST_DEBUG_OBJECT (dvdspu, " Display On"); + state->flags |= SPU_STATE_DISPLAY; + data += 1; + break; + case SPU_CMD_STP_DSP: + GST_DEBUG_OBJECT (dvdspu, " Display Off"); + state->flags &= ~(SPU_STATE_FORCED_DSP | SPU_STATE_DISPLAY); + data += 1; + break; + case SPU_CMD_SET_COLOR:{ + if (G_UNLIKELY (data + 3 >= end)) + return; /* Invalid SET_COLOR cmd at the end of the blk */ + + state->main_idx[3] = data[1] >> 4; + state->main_idx[2] = data[1] & 0x0f; + state->main_idx[1] = data[2] >> 4; + state->main_idx[0] = data[2] & 0x0f; + + state->main_pal_dirty = TRUE; + + GST_DEBUG_OBJECT (dvdspu, + " Set Color bg %u pattern %u emph-1 %u emph-2 %u", + state->main_idx[0], state->main_idx[1], state->main_idx[2], + state->main_idx[3]); + data += 3; + break; + } + case SPU_CMD_SET_ALPHA:{ + if (G_UNLIKELY (data + 3 >= end)) + return; /* Invalid SET_ALPHA cmd at the end of the blk */ + + state->main_alpha[3] = data[1] >> 4; + state->main_alpha[2] = data[1] & 0x0f; + state->main_alpha[1] = data[2] >> 4; + state->main_alpha[0] = data[2] & 0x0f; + + state->main_pal_dirty = TRUE; + + GST_DEBUG_OBJECT (dvdspu, + " Set Alpha bg %u pattern %u emph-1 %u emph-2 %u", + state->main_alpha[0], state->main_alpha[1], state->main_alpha[2], + state->main_alpha[3]); + data += 3; + break; + } + case SPU_CMD_SET_DAREA:{ + SpuRect *r = &state->disp_rect; + + if (G_UNLIKELY (data + 7 >= end)) + return; /* Invalid SET_DAREA cmd at the end of the blk */ + + r->top = ((data[4] & 0x3f) << 4) | ((data[5] & 0xe0) >> 4); + r->left = ((data[1] & 0x3f) << 4) | ((data[2] & 0xf0) >> 4); + r->right = ((data[2] & 0x03) << 8) | data[3]; + r->bottom = ((data[5] & 0x03) << 8) | data[6]; + + GST_DEBUG_OBJECT (dvdspu, + " Set Display Area top %u left %u bottom %u right %u", r->top, + r->left, r->bottom, r->right); + + data += 7; + break; + } + case SPU_CMD_DSPXA:{ + if (G_UNLIKELY (data + 5 >= end)) + return; /* Invalid SET_DSPXE cmd at the end of the blk */ + + state->pix_data[0] = GST_READ_UINT16_BE (data + 1); + state->pix_data[1] = GST_READ_UINT16_BE (data + 3); + /* Store a reference to the current command buffer, as that's where + * we'll need to take our pixel data from */ + gst_buffer_replace (&state->pix_buf, state->buf); + + GST_DEBUG_OBJECT (dvdspu, " Set Pixel Data Offsets top: %u bot: %u", + state->pix_data[0], state->pix_data[1]); + + data += 5; + break; + } + case SPU_CMD_CHG_COLCON:{ + guint16 field_size; + + GST_DEBUG_OBJECT (dvdspu, " Set Color & Contrast Change"); + if (G_UNLIKELY (data + 3 >= end)) + return; /* Invalid CHG_COLCON cmd at the end of the blk */ + + data++; + field_size = GST_READ_UINT16_BE (data); + + if (G_UNLIKELY (data + field_size >= end)) + return; /* Invalid CHG_COLCON cmd at the end of the blk */ + + gst_dvd_spu_parse_chg_colcon (dvdspu, data + 2, data + field_size); + state->line_ctrl_i_pal_dirty = TRUE; + data += field_size; + break; + } + case SPU_CMD_END: + default: + GST_DEBUG_OBJECT (dvdspu, " END"); + data = end; + break; + } + } +} + +static void +gst_dvd_spu_finish_spu_buf (GstDVDSpu * dvdspu) +{ + SpuState *state = &dvdspu->spu_state; + + state->next_ts = state->base_ts = GST_CLOCK_TIME_NONE; + gst_buffer_replace (&state->buf, NULL); + + GST_DEBUG_OBJECT (dvdspu, "Finished SPU buffer"); +} + +static gboolean +gst_dvd_spu_setup_cmd_blk (GstDVDSpu * dvdspu, guint16 cmd_blk_offset, + guint8 * start, guint8 * end) +{ + SpuState *state = &dvdspu->spu_state; + guint16 delay; + guint8 *cmd_blk = start + cmd_blk_offset; + + if (G_UNLIKELY (cmd_blk + 5 >= end)) + return FALSE; /* No valid command block to read */ + + delay = GST_READ_UINT16_BE (cmd_blk); + state->next_ts = state->base_ts + STM_TO_GST (delay); + state->cur_cmd_blk = cmd_blk_offset; + + GST_DEBUG_OBJECT (dvdspu, "Setup CMD Block @ %u with TS %" GST_TIME_FORMAT, + state->cur_cmd_blk, GST_TIME_ARGS (state->next_ts)); + return TRUE; +} + +#if DUMP_DCSQ +static void +gst_dvd_spu_dump_dcsq (GstDVDSpu * dvdspu, + GstClockTime start_ts, GstBuffer * spu_buf) +{ + guint16 cmd_blk_offset; + guint16 next_blk; + guint8 *start, *end; + + start = GST_BUFFER_DATA (spu_buf); + end = start + GST_BUFFER_SIZE (spu_buf); + + g_return_if_fail (start != NULL); + + /* First command */ + next_blk = GST_READ_UINT16_BE (start + 2); + cmd_blk_offset = 0; + + /* Loop through all commands */ + g_print ("SPU begins @ %" GST_TIME_FORMAT " offset %u\n", + GST_TIME_ARGS (start_ts), next_blk); + + while (cmd_blk_offset != next_blk) { + guint8 *data; + GstClockTime cmd_blk_ts; + + cmd_blk_offset = next_blk; + + if (G_UNLIKELY (start + cmd_blk_offset + 5 >= end)) + break; /* No valid command to read */ + + data = start + cmd_blk_offset; + + cmd_blk_ts = start_ts + STM_TO_GST (GST_READ_UINT16_BE (data)); + next_blk = GST_READ_UINT16_BE (data + 2); + + g_print ("Cmd Blk @ offset %u next %u ts %" GST_TIME_FORMAT "\n", + cmd_blk_offset, next_blk, GST_TIME_ARGS (cmd_blk_ts)); + + data += 4; + gst_dvd_spu_exec_cmd_blk (dvdspu, data, end); + } +} +#endif + +void +gst_dvd_spu_handle_new_vobsub_buf (GstDVDSpu * dvdspu, SpuPacket * packet) +{ + guint8 *start, *end; + SpuState *state = &dvdspu->spu_state; + +#if DUMP_DCSQ + gst_dvd_spu_dump_dcsq (dvdspu, packet->event_ts, packet->buf); +#endif + + if (G_UNLIKELY (GST_BUFFER_SIZE (packet->buf) < 4)) + goto invalid; + + if (state->buf != NULL) { + gst_buffer_unref (state->buf); + state->buf = NULL; + } + state->buf = packet->buf; + state->base_ts = packet->event_ts; + + start = GST_BUFFER_DATA (state->buf); + end = start + GST_BUFFER_SIZE (state->buf); + + /* Configure the first command block in this buffer as our initial blk */ + state->cur_cmd_blk = GST_READ_UINT16_BE (start + 2); + gst_dvd_spu_setup_cmd_blk (dvdspu, state->cur_cmd_blk, start, end); + /* Clear existing chg-colcon info */ + state->n_line_ctrl_i = 0; + if (state->line_ctrl_i != NULL) { + g_free (state->line_ctrl_i); + state->line_ctrl_i = NULL; + } + return; + +invalid: + /* Invalid buffer */ + gst_dvd_spu_finish_spu_buf (dvdspu); +} + +void +gst_dvdspu_vobsub_execute_event (GstDVDSpu * dvdspu) +{ + guint8 *start, *cmd_blk, *end; + guint16 next_blk; + SpuState *state = &dvdspu->spu_state; + + GST_DEBUG_OBJECT (dvdspu, "Executing cmd blk with TS %" GST_TIME_FORMAT + " @ offset %u", GST_TIME_ARGS (state->next_ts), state->cur_cmd_blk); + + start = GST_BUFFER_DATA (state->buf); + end = start + GST_BUFFER_SIZE (state->buf); + + cmd_blk = start + state->cur_cmd_blk; + + if (G_UNLIKELY (cmd_blk + 5 >= end)) { + /* Invalid. Finish the buffer and loop again */ + gst_dvd_spu_finish_spu_buf (dvdspu); + return; + } + + gst_dvd_spu_exec_cmd_blk (dvdspu, cmd_blk + 4, end); + + next_blk = GST_READ_UINT16_BE (cmd_blk + 2); + if (next_blk != state->cur_cmd_blk) { + /* Advance to the next block of commands */ + gst_dvd_spu_setup_cmd_blk (dvdspu, next_blk, start, end); + } else { + /* Next Block points to the current block, so we're finished with this + * SPU buffer */ + gst_dvd_spu_finish_spu_buf (dvdspu); + } +} diff --git a/gst/dvdspu/gstspu-vobsub.h b/gst/dvdspu/gstspu-vobsub.h new file mode 100644 index 00000000..f600e7d7 --- /dev/null +++ b/gst/dvdspu/gstspu-vobsub.h @@ -0,0 +1,25 @@ +/* GStreamer Sub-Picture Unit - VobSub/DVD handling + * Copyright (C) 2009 Jan Schmidt + * + * 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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +#ifndef __GSTSPU_VOBSUB_H__ +#define __GSTSPU_VOBSUB_H__ + +void gst_dvd_spu_handle_new_vobsub_buf (GstDVDSpu * dvdspu, SpuPacket * packet); +void gst_dvdspu_vobsub_execute_event (GstDVDSpu *dvdspu); + +#endif -- cgit v1.2.1 From b68a05dbfab9bc6c43b6b4744749778bc38d18be Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Sat, 23 May 2009 23:19:05 +0100 Subject: gstspu: Implement PGS rendering and alpha blending Refactor the DVD subpicture compositing, switching it to 8-bit alpha calculations. Reuse some of the resulting code to implement PGS subpicture blending. Implement parsing and collecting of composition objects properly, but assuming a single active window and colour palette for now. I need more PGS samples. --- gst/dvdspu/Makefile.am | 2 +- gst/dvdspu/gstdvdspu-render.c | 515 ++------------------------------- gst/dvdspu/gstdvdspu.c | 226 +++++++-------- gst/dvdspu/gstdvdspu.h | 136 ++------- gst/dvdspu/gstspu-common.h | 56 ++++ gst/dvdspu/gstspu-pgs.c | 590 ++++++++++++++++++++++++++++---------- gst/dvdspu/gstspu-pgs.h | 104 +++++-- gst/dvdspu/gstspu-vobsub-render.c | 536 ++++++++++++++++++++++++++++++++++ gst/dvdspu/gstspu-vobsub.c | 252 ++++++++++++---- gst/dvdspu/gstspu-vobsub.h | 89 +++++- 10 files changed, 1533 insertions(+), 973 deletions(-) create mode 100644 gst/dvdspu/gstspu-common.h create mode 100644 gst/dvdspu/gstspu-vobsub-render.c diff --git a/gst/dvdspu/Makefile.am b/gst/dvdspu/Makefile.am index 20cfe03c..07a66357 100644 --- a/gst/dvdspu/Makefile.am +++ b/gst/dvdspu/Makefile.am @@ -1,7 +1,7 @@ plugin_LTLIBRARIES = libgstdvdspu.la -libgstdvdspu_la_SOURCES = gstdvdspu.c gstdvdspu-render.c gstspu-vobsub.c gstspu-pgs.c +libgstdvdspu_la_SOURCES = gstdvdspu.c gstdvdspu-render.c gstspu-vobsub.c gstspu-vobsub-render.c gstspu-pgs.c libgstdvdspu_la_CFLAGS = $(GST_CFLAGS) libgstdvdspu_la_LIBADD = $(GST_LIBS) diff --git a/gst/dvdspu/gstdvdspu-render.c b/gst/dvdspu/gstdvdspu-render.c index a8dadee2..7731aed4 100644 --- a/gst/dvdspu/gstdvdspu-render.c +++ b/gst/dvdspu/gstdvdspu-render.c @@ -1,5 +1,6 @@ /* GStreamer DVD Sub-Picture Unit * Copyright (C) 2007 Fluendo S.A. + * Copyright (C) 2009 Jan Schmidt * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -29,338 +30,38 @@ GST_DEBUG_CATEGORY_EXTERN (dvdspu_debug); #define GST_CAT_DEFAULT dvdspu_debug -static void -dvdspu_recalc_palette (GstDVDSpu * dvdspu, - SpuColour * dest, guint8 * idx, guint8 * alpha) -{ - SpuState *state = &dvdspu->spu_state; - gint i; - - for (i = 0; i < 4; i++, dest++) { - guint32 col = state->current_clut[idx[i]]; - - dest->Y = (guint16) ((col >> 16) & 0xff) * alpha[i]; - /* U/V are stored as V/U in the clut words, so switch them */ - dest->U = (guint16) (col & 0xff) * alpha[i]; - dest->V = (guint16) ((col >> 8) & 0xff) * alpha[i]; - dest->A = alpha[i]; - } -} - -/* Recalculate the main, HL & ChgCol palettes */ -static void -dvdspu_update_palettes (GstDVDSpu * dvdspu, SpuState * state) -{ - gint16 l, c; - guint8 index[4]; /* Indices for the palette */ - guint8 alpha[4]; /* Alpha values the palette */ - - if (state->main_pal_dirty) { - dvdspu_recalc_palette (dvdspu, state->main_pal, state->main_idx, - state->main_alpha); - - /* Need to refresh the hl_ctrl info copies of the main palette too */ - memcpy (state->hl_ctrl_i.pix_ctrl_i[0].pal_cache, state->main_pal, - 4 * sizeof (SpuColour)); - memcpy (state->hl_ctrl_i.pix_ctrl_i[2].pal_cache, state->main_pal, - 4 * sizeof (SpuColour)); - - state->main_pal_dirty = FALSE; - } - - if (state->hl_pal_dirty) { - dvdspu_recalc_palette (dvdspu, state->hl_ctrl_i.pix_ctrl_i[1].pal_cache, - state->hl_idx, state->hl_alpha); - state->hl_pal_dirty = FALSE; - } - - /* Update the offset positions for the highlight region */ - if (state->hl_rect.top != -1) { - state->hl_ctrl_i.top = state->hl_rect.top; - state->hl_ctrl_i.bottom = state->hl_rect.bottom; - state->hl_ctrl_i.n_changes = 3; - state->hl_ctrl_i.pix_ctrl_i[0].left = 0; - state->hl_ctrl_i.pix_ctrl_i[1].left = state->hl_rect.left; - state->hl_ctrl_i.pix_ctrl_i[2].left = state->hl_rect.right + 1; - } - - if (state->line_ctrl_i_pal_dirty) { - GST_LOG_OBJECT (dvdspu, "Updating chg-col-con palettes"); - for (l = 0; l < state->n_line_ctrl_i; l++) { - SpuLineCtrlI *cur_line_ctrl = state->line_ctrl_i + l; - - for (c = 0; c < cur_line_ctrl->n_changes; c++) { - SpuPixCtrlI *cur = cur_line_ctrl->pix_ctrl_i + c; - - index[3] = (cur->palette >> 28) & 0x0f; - index[2] = (cur->palette >> 24) & 0x0f; - index[1] = (cur->palette >> 20) & 0x0f; - index[0] = (cur->palette >> 16) & 0x0f; - - alpha[3] = (cur->palette >> 12) & 0x0f; - alpha[2] = (cur->palette >> 8) & 0x0f; - alpha[1] = (cur->palette >> 4) & 0x0f; - alpha[0] = (cur->palette) & 0x0f; - dvdspu_recalc_palette (dvdspu, cur->pal_cache, index, alpha); - } - } - state->line_ctrl_i_pal_dirty = FALSE; - } -} - -static void -dvdspu_clear_comp_buffers (SpuState * state) +void +gstspu_clear_comp_buffers (SpuState * state) { - /* The area to clear is the line inside the disp_rect, each entry 2 bytes, + /* The area to clear is the line inside the disp_rect, each entry 4 bytes, * of the sub-sampled UV planes. */ - gint16 left = state->disp_rect.left / 2; - gint16 right = state->disp_rect.right / 2; - gint16 uv_width = 2 * (right - left + 1); + gint16 left = state->comp_left / 2; + gint16 right = state->comp_right / 2; + gint16 uv_width = sizeof (guint32) * (right - left + 1); memset (state->comp_bufs[0] + left, 0, uv_width); memset (state->comp_bufs[1] + left, 0, uv_width); memset (state->comp_bufs[2] + left, 0, uv_width); - - state->comp_last_x[0] = -1; - state->comp_last_x[1] = -1; -} - -static inline guint8 -dvdspu_get_nibble (SpuState * state, guint16 * rle_offset) -{ - guint8 ret; - - if (G_UNLIKELY (*rle_offset >= state->max_offset)) - return 0; /* Overran the buffer */ - - ret = GST_BUFFER_DATA (state->pix_buf)[(*rle_offset) / 2]; - - /* If the offset is even, we shift the answer down 4 bits, otherwise not */ - if (*rle_offset & 0x01) - ret &= 0x0f; - else - ret = ret >> 4; - - (*rle_offset)++; - return ret; } -static guint16 -dvdspu_get_rle_code (SpuState * state, guint16 * rle_offset) -{ - guint16 code; - - code = dvdspu_get_nibble (state, rle_offset); - if (code < 0x4) { /* 4 .. f */ - code = (code << 4) | dvdspu_get_nibble (state, rle_offset); - if (code < 0x10) { /* 1x .. 3x */ - code = (code << 4) | dvdspu_get_nibble (state, rle_offset); - if (code < 0x40) { /* 04x .. 0fx */ - code = (code << 4) | dvdspu_get_nibble (state, rle_offset); - } - } - } - return code; -} - -static inline void -dvdspu_draw_rle_run (SpuState * state, gint16 x, gint16 end, SpuColour * colour) -{ -#if 0 - GST_LOG ("Y: %d x: %d end %d col %d %d %d %d", - state->cur_Y, x, end, colour->Y, colour->U, colour->V, colour->A); -#endif - - if (colour->A != 0) { - guint8 inv_A = 0xf - colour->A; - - /* FIXME: This could be more efficient */ - while (x < end) { - state->out_Y[x] = (inv_A * state->out_Y[x] + colour->Y) / 0xf; - state->out_U[x / 2] += colour->U; - state->out_V[x / 2] += colour->V; - state->out_A[x / 2] += colour->A; - x++; - } - /* Update the compositing buffer so we know how much to blend later */ - *(state->comp_last_x_ptr) = end; - } -} - -static inline gint16 -rle_end_x (guint16 rle_code, gint16 x, gint16 end) -{ - /* run length = rle_code >> 2 */ - if (G_UNLIKELY (((rle_code >> 2) == 0))) - return end; - else - return MIN (end, x + (rle_code >> 2)); -} - -static void dvdspu_render_line_with_chgcol (SpuState * state, - guint8 * planes[3], guint16 * rle_offset); -static gboolean dvdspu_update_chgcol (SpuState * state); - -static void -dvdspu_render_line (SpuState * state, guint8 * planes[3], guint16 * rle_offset) -{ - gint16 x, next_x, end, rle_code; - SpuColour *colour; - - /* Check for special case of chg_col info to use (either highlight or - * ChgCol command */ - if (state->cur_chg_col != NULL) { - if (dvdspu_update_chgcol (state)) { - /* Check the top & bottom, because we might not be within the region yet */ - if (state->cur_Y >= state->cur_chg_col->top && - state->cur_Y <= state->cur_chg_col->bottom) { - dvdspu_render_line_with_chgcol (state, planes, rle_offset); - return; - } - } - } - - /* No special case. Render as normal */ - - /* Set up our output pointers */ - state->out_Y = planes[0]; - state->out_U = state->comp_bufs[0]; - state->out_V = state->comp_bufs[1]; - state->out_A = state->comp_bufs[2]; - /* We always need to start our RLE decoding byte_aligned */ - *rle_offset = GST_ROUND_UP_2 (*rle_offset); - - x = state->disp_rect.left; - end = state->disp_rect.right + 1; - while (x < end) { - rle_code = dvdspu_get_rle_code (state, rle_offset); - colour = &state->main_pal[rle_code & 3]; - next_x = rle_end_x (rle_code, x, end); - /* Now draw the run between [x,next_x) */ - dvdspu_draw_rle_run (state, x, next_x, colour); - x = next_x; - } -} - -static gboolean -dvdspu_update_chgcol (SpuState * state) -{ - if (state->cur_chg_col == NULL) - return FALSE; - - if (state->cur_Y <= state->cur_chg_col->bottom) - return TRUE; - - while (state->cur_chg_col < state->cur_chg_col_end) { - if (state->cur_Y >= state->cur_chg_col->top && - state->cur_Y <= state->cur_chg_col->bottom) { -#if 0 - g_print ("Stopped @ entry %d with top %d bottom %d, cur_y %d", - (gint16) (state->cur_chg_col - state->line_ctrl_i), - state->cur_chg_col->top, state->cur_chg_col->bottom, y); -#endif - return TRUE; - } - state->cur_chg_col++; - } - - /* Finished all our cur_chg_col entries. Use the main palette from here on */ - state->cur_chg_col = NULL; - return FALSE; -} - -static void -dvdspu_render_line_with_chgcol (SpuState * state, guint8 * planes[3], - guint16 * rle_offset) -{ - SpuLineCtrlI *chg_col = state->cur_chg_col; - - gint16 x, next_x, disp_end, rle_code, run_end; - SpuColour *colour; - SpuPixCtrlI *cur_pix_ctrl; - SpuPixCtrlI *next_pix_ctrl; - SpuPixCtrlI *end_pix_ctrl; - SpuPixCtrlI dummy_pix_ctrl; - gint16 cur_reg_end; - gint i; - - state->out_Y = planes[0]; - state->out_U = state->comp_bufs[0]; - state->out_V = state->comp_bufs[1]; - state->out_A = state->comp_bufs[2]; - - /* We always need to start our RLE decoding byte_aligned */ - *rle_offset = GST_ROUND_UP_2 (*rle_offset); - - /* Our run will cover the display rect */ - x = state->disp_rect.left; - disp_end = state->disp_rect.right + 1; - - /* Work out the first pixel control info, which may point to the dummy entry if - * the global palette/alpha need using initally */ - cur_pix_ctrl = chg_col->pix_ctrl_i; - end_pix_ctrl = chg_col->pix_ctrl_i + chg_col->n_changes; - - if (cur_pix_ctrl->left != 0) { - next_pix_ctrl = cur_pix_ctrl; - cur_pix_ctrl = &dummy_pix_ctrl; - for (i = 0; i < 4; i++) /* Copy the main palette to our dummy entry */ - dummy_pix_ctrl.pal_cache[i] = state->main_pal[i]; - } else { - next_pix_ctrl = cur_pix_ctrl + 1; - } - if (next_pix_ctrl < end_pix_ctrl) - cur_reg_end = next_pix_ctrl->left; - else - cur_reg_end = disp_end; - - /* Render stuff */ - while (x < disp_end) { - rle_code = dvdspu_get_rle_code (state, rle_offset); - next_x = rle_end_x (rle_code, x, disp_end); - - /* Now draw the run between [x,next_x), crossing palette regions as needed */ - while (x < next_x) { - run_end = MIN (next_x, cur_reg_end); - - if (G_LIKELY (x < run_end)) { - colour = &cur_pix_ctrl->pal_cache[rle_code & 3]; - dvdspu_draw_rle_run (state, x, run_end, colour); - x = run_end; - } - - if (x >= cur_reg_end) { - /* Advance to next region */ - cur_pix_ctrl = next_pix_ctrl; - next_pix_ctrl++; - - if (next_pix_ctrl < end_pix_ctrl) - cur_reg_end = next_pix_ctrl->left; - else - cur_reg_end = disp_end; - } - } - } -} - -static void -dvdspu_blend_comp_buffers (SpuState * state, guint8 * planes[3]) +void +gstspu_blend_comp_buffers (SpuState * state, guint8 * planes[3]) { gint16 uv_end; gint16 left, x; guint8 *out_U; guint8 *out_V; - guint16 *in_U; - guint16 *in_V; - guint16 *in_A; - gint16 comp_last_x = MAX (state->comp_last_x[0], state->comp_last_x[1]); + guint32 *in_U; + guint32 *in_V; + guint32 *in_A; + gint16 comp_last_x = state->comp_right; - if (comp_last_x < state->disp_rect.left) + if (comp_last_x < state->comp_left) return; /* Didn't draw in the comp buffers, nothing to do... */ #if 0 - GST_LOG ("Blending comp buffers from disp_rect.left %d to x=%d", - state->disp_rect.left, comp_last_x); + GST_LOG ("Blending comp buffers from x=%d to x=%d", + state->comp_left, state->comp_right); #endif /* Set up the output pointers */ @@ -376,188 +77,18 @@ dvdspu_blend_comp_buffers (SpuState * state, guint8 * planes[3]) * drawn in the render_line function, divided by 2 (rounding up) to account * for UV sub-sampling */ uv_end = (comp_last_x + 1) / 2; - left = state->disp_rect.left / 2; + left = state->comp_left / 2; for (x = left; x < uv_end; x++) { - guint16 tmp; - guint16 inv_A = (4 * 0xf) - in_A[x]; - + guint32 tmp; /* Each entry in the compositing buffer is 4 summed pixels, so the - * inverse alpha is (4 * 0x0f) - in_A[x] */ + * inverse alpha is (4 * 0xff) - in_A[x] */ + guint16 inv_A = (4 * 0xff) - in_A[x]; + tmp = in_U[x] + inv_A * out_U[x]; - out_U[x] = (guint8) (tmp / (4 * 0xf)); + out_U[x] = (guint8) (tmp / (4 * 0xff)); tmp = in_V[x] + inv_A * out_V[x]; - out_V[x] = (guint8) (tmp / (4 * 0xf)); - } -} - -void -gst_dvd_spu_render_spu (GstDVDSpu * dvdspu, GstBuffer * buf) -{ - SpuState *state = &dvdspu->spu_state; - guint8 *planes[3]; /* YUV frame pointers */ - gint y, last_y; - - /* Set up our initial state */ - if (G_UNLIKELY (state->pix_buf == NULL)) - return; - - /* Store the start of each plane */ - planes[0] = GST_BUFFER_DATA (buf); - planes[1] = planes[0] + (state->Y_height * state->Y_stride); - planes[2] = planes[1] + (state->UV_height * state->UV_stride); - - /* Sanity check */ - g_return_if_fail (planes[2] + (state->UV_height * state->UV_stride) <= - GST_BUFFER_DATA (buf) + GST_BUFFER_SIZE (buf)); - - GST_DEBUG ("Rendering SPU. disp_rect %d,%d to %d,%d. hl_rect %d,%d to %d,%d", - state->disp_rect.left, state->disp_rect.top, - state->disp_rect.right, state->disp_rect.bottom, - state->hl_rect.left, state->hl_rect.top, - state->hl_rect.right, state->hl_rect.bottom); - - GST_DEBUG ("vid_disp %d,%d", state->vid_width, state->vid_height); - - /* When reading RLE data, we track the offset in nibbles... */ - state->cur_offsets[0] = state->pix_data[0] * 2; - state->cur_offsets[1] = state->pix_data[1] * 2; - state->max_offset = GST_BUFFER_SIZE (state->pix_buf) * 2; - - /* Update all the palette caches */ - dvdspu_update_palettes (dvdspu, state); - - /* Set up HL or Change Color & Contrast rect tracking */ - if (state->hl_rect.top != -1) { - state->cur_chg_col = &state->hl_ctrl_i; - state->cur_chg_col_end = state->cur_chg_col + 1; - } else if (state->n_line_ctrl_i > 0) { - state->cur_chg_col = state->line_ctrl_i; - state->cur_chg_col_end = state->cur_chg_col + state->n_line_ctrl_i; - } else - state->cur_chg_col = NULL; - - /* We start rendering from the first line of the display rect */ - y = state->disp_rect.top; - /* start_y is always an even number and we render lines in pairs from there, - * accumulating 2 lines of chroma then blending it. We might need to render a - * single line at the end if the display rect ends on an even line too. */ - last_y = (state->disp_rect.bottom - 1) & ~(0x01); - - /* center the image when display rectangle exceeds the video width */ - if (state->vid_width < state->disp_rect.right) { - gint diff, disp_width; - - disp_width = state->disp_rect.left - state->disp_rect.right; - diff = (disp_width - state->vid_width) / 2; - - /* fixme, this is not used yet */ - state->clip_rect.left = state->disp_rect.left + diff; - state->clip_rect.right = state->disp_rect.right - diff; - - GST_DEBUG ("clipping width to %d,%d", state->clip_rect.left, - state->clip_rect.right); - } else { - state->clip_rect.left = state->disp_rect.left; - state->clip_rect.right = state->disp_rect.right; - } - - /* for the height, chop off the bottom bits of the diplay rectangle because we - * assume the picture is in the lower part. We should better check where it - * is and do something more clever. */ - state->clip_rect.bottom = state->disp_rect.bottom; - if (state->vid_height < state->disp_rect.bottom) { - state->clip_rect.top = state->disp_rect.bottom - state->vid_height; - GST_DEBUG ("clipping height to %d,%d", state->clip_rect.top, - state->clip_rect.bottom); - } else { - state->clip_rect.top = state->disp_rect.top; - /* Update our plane references to the first line of the disp_rect */ - planes[0] += state->Y_stride * y; - planes[1] += state->UV_stride * (y / 2); - planes[2] += state->UV_stride * (y / 2); - } - - for (state->cur_Y = y; state->cur_Y <= last_y; state->cur_Y++) { - gboolean clip; - - clip = (state->cur_Y < state->clip_rect.top - || state->cur_Y > state->clip_rect.bottom); - - /* Reset the compositing buffer */ - dvdspu_clear_comp_buffers (state); - /* Render even line */ - state->comp_last_x_ptr = state->comp_last_x; - dvdspu_render_line (state, planes, &state->cur_offsets[0]); - if (!clip) { - /* Advance the luminance output pointer */ - planes[0] += state->Y_stride; - } - state->cur_Y++; - - /* Render odd line */ - state->comp_last_x_ptr = state->comp_last_x + 1; - dvdspu_render_line (state, planes, &state->cur_offsets[1]); - /* Blend the accumulated UV compositing buffers onto the output */ - dvdspu_blend_comp_buffers (state, planes); - - if (!clip) { - /* Update all the output pointers */ - planes[0] += state->Y_stride; - planes[1] += state->UV_stride; - planes[2] += state->UV_stride; - } - } - if (state->cur_Y == state->disp_rect.bottom) { - g_assert ((state->disp_rect.bottom & 0x01) == 0); - - /* Render a remaining lone last even line. y already has the correct value - * after the above loop exited. */ - dvdspu_clear_comp_buffers (state); - state->comp_last_x_ptr = state->comp_last_x; - dvdspu_render_line (state, planes, &state->cur_offsets[0]); - dvdspu_blend_comp_buffers (state, planes); + out_V[x] = (guint8) (tmp / (4 * 0xff)); } - - /* for debugging purposes, draw a faint rectangle at the edges of the disp_rect */ -#if 0 - do { - guint8 *cur; - gint16 pos; - - cur = GST_BUFFER_DATA (buf) + state->Y_stride * state->disp_rect.top; - for (pos = state->disp_rect.left + 1; pos < state->disp_rect.right; pos++) - cur[pos] = (cur[pos] / 2) + 0x8; - cur = GST_BUFFER_DATA (buf) + state->Y_stride * state->disp_rect.bottom; - for (pos = state->disp_rect.left + 1; pos < state->disp_rect.right; pos++) - cur[pos] = (cur[pos] / 2) + 0x8; - cur = GST_BUFFER_DATA (buf) + state->Y_stride * state->disp_rect.top; - for (pos = state->disp_rect.top; pos <= state->disp_rect.bottom; pos++) { - cur[state->disp_rect.left] = (cur[state->disp_rect.left] / 2) + 0x8; - cur[state->disp_rect.right] = (cur[state->disp_rect.right] / 2) + 0x8; - cur += state->Y_stride; - } - } while (0); -#endif - /* For debugging purposes, draw a faint rectangle around the highlight rect */ -#if 0 - if (state->hl_rect.top != -1) { - guint8 *cur; - gint16 pos; - - cur = GST_BUFFER_DATA (buf) + state->Y_stride * state->hl_rect.top; - for (pos = state->hl_rect.left + 1; pos < state->hl_rect.right; pos++) - cur[pos] = (cur[pos] / 2) + 0x8; - cur = GST_BUFFER_DATA (buf) + state->Y_stride * state->hl_rect.bottom; - for (pos = state->hl_rect.left + 1; pos < state->hl_rect.right; pos++) - cur[pos] = (cur[pos] / 2) + 0x8; - cur = GST_BUFFER_DATA (buf) + state->Y_stride * state->hl_rect.top; - for (pos = state->hl_rect.top; pos <= state->hl_rect.bottom; pos++) { - cur[state->hl_rect.left] = (cur[state->hl_rect.left] / 2) + 0x8; - cur[state->hl_rect.right] = (cur[state->hl_rect.right] / 2) + 0x8; - cur += state->Y_stride; - } - } -#endif } diff --git a/gst/dvdspu/gstdvdspu.c b/gst/dvdspu/gstdvdspu.c index c9c116e8..f5fce4bc 100644 --- a/gst/dvdspu/gstdvdspu.c +++ b/gst/dvdspu/gstdvdspu.c @@ -39,10 +39,6 @@ #include #include "gstdvdspu.h" -#include "gstspu-vobsub.h" -#include "gstspu-pgs.h" - -extern void gst_dvd_spu_render_spu (GstDVDSpu * dvdspu, GstBuffer * buf); GST_DEBUG_CATEGORY (dvdspu_debug); #define GST_CAT_DEFAULT dvdspu_debug @@ -111,6 +107,7 @@ static void gst_dvd_spu_clear (GstDVDSpu * dvdspu); static void gst_dvd_spu_flush_spu_info (GstDVDSpu * dvdspu, gboolean process_events); static void gst_dvd_spu_advance_spu (GstDVDSpu * dvdspu, GstClockTime new_ts); +static void gstspu_render (GstDVDSpu * dvdspu, GstBuffer * buf); static GstFlowReturn dvdspu_handle_vid_buffer (GstDVDSpu * dvdspu, GstBuffer * buf); static void gst_dvd_spu_handle_dvd_event (GstDVDSpu * dvdspu, GstEvent * event); @@ -119,11 +116,11 @@ static void gst_dvd_spu_base_init (gpointer gclass) { static GstElementDetails element_details = - GST_ELEMENT_DETAILS ("Fluendo DVD Player Sub-picture Overlay", - "Mixer/Video/Overlay/DVD", - "Parses the DVD Sub-Picture command stream and renders the SPU overlay " + GST_ELEMENT_DETAILS ("GStreamer Sub-picture Overlay", + "Mixer/Video/Overlay/DVD/Bluray", + "Parses Sub-Picture command streams and renders the SPU overlay " "onto the video as it passes through", - "Jan Schmidt "); + "Jan Schmidt "); GstElementClass *element_class = GST_ELEMENT_CLASS (gclass); gst_element_class_add_pad_template (element_class, @@ -191,7 +188,8 @@ gst_dvd_spu_clear (GstDVDSpu * dvdspu) { gst_dvd_spu_flush_spu_info (dvdspu, FALSE); gst_segment_init (&dvdspu->subp_seg, GST_FORMAT_UNDEFINED); - memcpy (dvdspu->spu_state.current_clut, default_clut, sizeof (guint32) * 16); + + dvdspu->spu_input_type = SPU_INPUT_TYPE_NONE; gst_buffer_replace (&dvdspu->ref_frame, NULL); gst_buffer_replace (&dvdspu->pending_frame, NULL); @@ -235,10 +233,11 @@ gst_dvd_spu_finalize (GObject * object) /* With SPU lock held, clear the queue of SPU packets */ static void -gst_dvd_spu_flush_spu_info (GstDVDSpu * dvdspu, gboolean process_events) +gst_dvd_spu_flush_spu_info (GstDVDSpu * dvdspu, gboolean keep_events) { SpuPacket *packet; SpuState *state = &dvdspu->spu_state; + GQueue tmp_q = G_QUEUE_INIT; GST_INFO_OBJECT (dvdspu, "Flushing SPU information"); @@ -252,40 +251,34 @@ gst_dvd_spu_flush_spu_info (GstDVDSpu * dvdspu, gboolean process_events) if (packet->buf) { gst_buffer_unref (packet->buf); g_assert (packet->event == NULL); + g_free (packet); } else if (packet->event) { - if (process_events) - gst_dvd_spu_handle_dvd_event (dvdspu, packet->event); - else + if (keep_events) { + g_queue_push_tail (&tmp_q, packet); + } else { gst_event_unref (packet->event); + g_free (packet); + } } - g_free (packet); packet = (SpuPacket *) g_queue_pop_head (dvdspu->pending_spus); } + /* Push anything we decided to keep back onto the pending_spus list */ + for (packet = g_queue_pop_head (&tmp_q); packet != NULL; + packet = g_queue_pop_head (&tmp_q)) + g_queue_push_tail (dvdspu->pending_spus, packet); - if (state->buf) { - gst_buffer_unref (state->buf); - state->buf = NULL; - } - if (state->pix_buf) { - gst_buffer_unref (state->pix_buf); - state->pix_buf = NULL; - } - - state->base_ts = state->next_ts = GST_CLOCK_TIME_NONE; state->flags &= ~(SPU_STATE_FLAGS_MASK); - state->pix_data[0] = 0; - state->pix_data[1] = 0; - - state->hl_rect.top = -1; - state->hl_rect.bottom = -1; - - state->disp_rect.top = -1; - state->disp_rect.bottom = -1; + state->next_ts = GST_CLOCK_TIME_NONE; - state->n_line_ctrl_i = 0; - if (state->line_ctrl_i != NULL) { - g_free (state->line_ctrl_i); - state->line_ctrl_i = NULL; + switch (dvdspu->spu_input_type) { + case SPU_INPUT_TYPE_VOBSUB: + gstspu_vobsub_flush (dvdspu); + break; + case SPU_INPUT_TYPE_PGS: + gstspu_pgs_flush (dvdspu); + break; + default: + break; } } @@ -357,7 +350,7 @@ gst_dvd_spu_video_set_caps (GstPad * pad, GstCaps * caps) state->UV_stride = GST_ROUND_UP_4 (state->Y_stride / 2); for (i = 0; i < 3; i++) { state->comp_bufs[i] = g_realloc (state->comp_bufs[i], - sizeof (guint16) * state->UV_stride); + sizeof (guint32) * state->UV_stride); } } DVD_SPU_UNLOCK (dvdspu); @@ -629,7 +622,7 @@ dvdspu_handle_vid_buffer (GstDVDSpu * dvdspu, GstBuffer * buf) /* Render the SPU overlay onto the buffer */ buf = gst_buffer_make_writable (buf); - gst_dvd_spu_render_spu (dvdspu, buf); + gstspu_render (dvdspu, buf); } else { if (using_ref == FALSE) { /* Not going to draw anything on this frame, just store a reference @@ -658,6 +651,22 @@ no_ref_frame: return GST_FLOW_OK; } + +static void +gstspu_render (GstDVDSpu * dvdspu, GstBuffer * buf) +{ + switch (dvdspu->spu_input_type) { + case SPU_INPUT_TYPE_VOBSUB: + gstspu_vobsub_render (dvdspu, buf); + break; + case SPU_INPUT_TYPE_PGS: + gstspu_pgs_render (dvdspu, buf); + break; + default: + break; + } +} + /* With SPU LOCK */ static void gst_dvd_spu_redraw_still (GstDVDSpu * dvdspu, gboolean force) @@ -681,7 +690,7 @@ gst_dvd_spu_redraw_still (GstDVDSpu * dvdspu, gboolean force) GST_BUFFER_DURATION (buf) = GST_CLOCK_TIME_NONE; /* Render the SPU overlay onto the buffer */ - gst_dvd_spu_render_spu (dvdspu, buf); + gstspu_render (dvdspu, buf); gst_buffer_replace (&dvdspu->pending_frame, buf); gst_buffer_unref (buf); } else if (force) { @@ -707,87 +716,44 @@ gst_dvd_spu_redraw_still (GstDVDSpu * dvdspu, gboolean force) static void gst_dvd_spu_handle_dvd_event (GstDVDSpu * dvdspu, GstEvent * event) { - const gchar *event_type; const GstStructure *structure = gst_event_get_structure (event); - SpuState *state = &dvdspu->spu_state; + const gchar *event_type = gst_structure_get_string (structure, "event"); gboolean hl_change = FALSE; - event_type = gst_structure_get_string (structure, "event"); GST_INFO_OBJECT (dvdspu, "DVD event of type %s on subp pad OOB=%d", event_type, (GST_EVENT_TYPE (event) == GST_EVENT_CUSTOM_DOWNSTREAM_OOB)); - if (strcmp (event_type, "dvd-spu-clut-change") == 0) { - gchar prop_name[32]; - gint i; - gint entry; - - for (i = 0; i < 16; i++) { - g_snprintf (prop_name, 32, "clut%02d", i); - if (!gst_structure_get_int (structure, prop_name, &entry)) - entry = 0; - state->current_clut[i] = (guint32) entry; - } - - state->main_pal_dirty = TRUE; - state->hl_pal_dirty = TRUE; - state->line_ctrl_i_pal_dirty = TRUE; - hl_change = TRUE; - } else if (strcmp (event_type, "dvd-spu-highlight") == 0) { - gint val; - - if (gst_structure_get_int (structure, "palette", &val)) { - state->hl_idx[3] = ((guint32) (val) >> 28) & 0x0f; - state->hl_idx[2] = ((guint32) (val) >> 24) & 0x0f; - state->hl_idx[1] = ((guint32) (val) >> 20) & 0x0f; - state->hl_idx[0] = ((guint32) (val) >> 16) & 0x0f; - - state->hl_alpha[3] = ((guint32) (val) >> 12) & 0x0f; - state->hl_alpha[2] = ((guint32) (val) >> 8) & 0x0f; - state->hl_alpha[1] = ((guint32) (val) >> 4) & 0x0f; - state->hl_alpha[0] = ((guint32) (val) >> 0) & 0x0f; - - state->hl_pal_dirty = TRUE; - } - if (gst_structure_get_int (structure, "sx", &val)) - state->hl_rect.left = (gint16) val; - if (gst_structure_get_int (structure, "sy", &val)) - state->hl_rect.top = (gint16) val; - if (gst_structure_get_int (structure, "ex", &val)) - state->hl_rect.right = (gint16) val; - if (gst_structure_get_int (structure, "ey", &val)) - state->hl_rect.bottom = (gint16) val; - - GST_INFO_OBJECT (dvdspu, "Highlight rect is now (%d,%d) to (%d,%d)", - state->hl_rect.left, state->hl_rect.top, - state->hl_rect.right, state->hl_rect.bottom); - hl_change = TRUE; - } else if (strcmp (event_type, "dvd-spu-reset-highlight") == 0) { - if (state->hl_rect.top != -1 || state->hl_rect.bottom != -1) - hl_change = TRUE; - state->hl_rect.top = -1; - state->hl_rect.bottom = -1; - GST_INFO_OBJECT (dvdspu, "Highlight off"); - } else if (strcmp (event_type, "dvd-set-subpicture-track") == 0) { - gboolean forced_only; - - if (gst_structure_get_boolean (structure, "forced-only", &forced_only)) { - gboolean was_forced = (state->flags & SPU_STATE_FORCED_ONLY); - - if (forced_only) - state->flags |= SPU_STATE_FORCED_ONLY; - else - state->flags &= ~(SPU_STATE_FORCED_ONLY); - - if ((was_forced && !forced_only) || (!was_forced && forced_only)) - hl_change = TRUE; - } + switch (dvdspu->spu_input_type) { + case SPU_INPUT_TYPE_VOBSUB: + hl_change = gstspu_vobsub_handle_dvd_event (dvdspu, event); + break; + case SPU_INPUT_TYPE_PGS: + hl_change = gstspu_pgs_handle_dvd_event (dvdspu, event); + break; + default: + break; } - if (hl_change && (state->flags & SPU_STATE_STILL_FRAME)) { + if (hl_change && (dvdspu->spu_state.flags & SPU_STATE_STILL_FRAME)) { gst_dvd_spu_redraw_still (dvdspu, FALSE); } +} - gst_event_unref (event); +static gboolean +gstspu_execute_event (GstDVDSpu * dvdspu) +{ + switch (dvdspu->spu_input_type) { + case SPU_INPUT_TYPE_VOBSUB: + return gstspu_vobsub_execute_event (dvdspu); + break; + case SPU_INPUT_TYPE_PGS: + return gstspu_pgs_execute_event (dvdspu); + break; + default: + g_assert_not_reached (); + break; + } + return FALSE; } /* Advance the SPU packet/command queue to a time. new_ts is in running time */ @@ -796,8 +762,15 @@ gst_dvd_spu_advance_spu (GstDVDSpu * dvdspu, GstClockTime new_ts) { SpuState *state = &dvdspu->spu_state; + if (G_UNLIKELY (dvdspu->spu_input_type == SPU_INPUT_TYPE_NONE)) + return; + while (state->next_ts == GST_CLOCK_TIME_NONE || state->next_ts <= new_ts) { - if (state->buf == NULL) { + GST_DEBUG_OBJECT (dvdspu, + "Advancing SPU from TS %" GST_TIME_FORMAT " to %" GST_TIME_FORMAT, + GST_TIME_ARGS (state->next_ts), GST_TIME_ARGS (new_ts)); + + if (!gstspu_execute_event (dvdspu)) { GstClockTime vid_run_ts; /* No current command buffer, try and get one */ @@ -820,11 +793,11 @@ gst_dvd_spu_advance_spu (GstDVDSpu * dvdspu, GstClockTime new_ts) if (packet->buf) { switch (dvdspu->spu_input_type) { case SPU_INPUT_TYPE_VOBSUB: - gst_dvd_spu_handle_new_vobsub_buf (dvdspu, packet); + gstspu_vobsub_handle_new_buf (dvdspu, packet->event_ts, + packet->buf); break; case SPU_INPUT_TYPE_PGS: - gstspu_dump_pgs_buffer (packet->buf); - gst_buffer_unref (packet->buf); + gstspu_pgs_handle_new_buf (dvdspu, packet->event_ts, packet->buf); break; default: g_assert_not_reached (); @@ -837,16 +810,6 @@ gst_dvd_spu_advance_spu (GstDVDSpu * dvdspu, GstClockTime new_ts) g_free (packet); continue; } - - GST_DEBUG_OBJECT (dvdspu, - "Advancing SPU from TS %" GST_TIME_FORMAT " to %" GST_TIME_FORMAT, - GST_TIME_ARGS (state->next_ts), GST_TIME_ARGS (new_ts)); - - /* If we get here, we have an SPU buffer, and it's time to process the - * next cmd */ - g_assert (state->buf != NULL); - - gst_dvdspu_vobsub_execute_event (dvdspu); } } @@ -1005,6 +968,7 @@ gst_dvd_spu_subpic_chain (GstPad * pad, GstBuffer * buf) /* FIXME: There's no need to walk the command set each time. We can set a * marker and resume where we left off next time */ + /* FIXME: Move the packet parsing and sanity checking into the format-specific modules */ while (data != end) { if (data + 3 > end) break; @@ -1014,7 +978,8 @@ gst_dvd_spu_subpic_chain (GstPad * pad, GstBuffer * buf) if (data + packet_size > end) break; data += packet_size; - if (packet_type == PGS_COMMAND_END_DISPLAY && data != end) { + /* 0x80 is the END command for PGS packets */ + if (packet_type == 0x80 && data != end) { /* Extra cruft on the end of the packet -> assume invalid */ gst_buffer_unref (dvdspu->partial_spu); dvdspu->partial_spu = NULL; @@ -1023,7 +988,8 @@ gst_dvd_spu_subpic_chain (GstPad * pad, GstBuffer * buf) } if (dvdspu->partial_spu && data == end) { - g_print ("Complete packet of size %u\n", + GST_DEBUG_OBJECT (dvdspu, + "Have complete PGS packet of size %u. Enqueueing.", GST_BUFFER_SIZE (dvdspu->partial_spu)); submit_new_spu_packet (dvdspu, dvdspu->partial_spu); dvdspu->partial_spu = NULL; @@ -1071,7 +1037,8 @@ gst_dvd_spu_subpic_event (GstPad * pad, GstEvent * event) DVD_SPU_LOCK (dvdspu); if (GST_EVENT_IS_SERIALIZED (event)) { SpuPacket *spu_packet = g_new0 (SpuPacket, 1); - + GST_DEBUG_OBJECT (dvdspu, + "Enqueueing DVD event on subpicture pad for later"); spu_packet->event = event; g_queue_push_tail (dvdspu->pending_spus, spu_packet); } else { @@ -1146,6 +1113,7 @@ gst_dvd_spu_subpic_event (GstPad * pad, GstEvent * event) gst_event_unref (event); goto done; case GST_EVENT_FLUSH_STOP: + GST_DEBUG_OBJECT (dvdspu, "Have flush-stop event on SPU pad"); DVD_SPU_LOCK (dvdspu); gst_segment_init (&dvdspu->subp_seg, GST_FORMAT_UNDEFINED); gst_dvd_spu_flush_spu_info (dvdspu, TRUE); @@ -1193,8 +1161,8 @@ gst_dvd_spu_subpic_set_caps (GstPad * pad, GstCaps * caps) if (dvdspu->spu_input_type != input_type) { GST_INFO_OBJECT (dvdspu, "Incoming SPU packet type changed to %u", input_type); - gst_dvd_spu_flush_spu_info (dvdspu, TRUE); dvdspu->spu_input_type = input_type; + gst_dvd_spu_flush_spu_info (dvdspu, TRUE); } DVD_SPU_UNLOCK (dvdspu); @@ -1228,8 +1196,8 @@ gst_dvd_spu_change_state (GstElement * element, GstStateChange transition) gboolean gst_dvd_spu_plugin_init (GstPlugin * plugin) { - GST_DEBUG_CATEGORY_INIT (dvdspu_debug, "gstdvdspu", - 0, "DVD Sub-picture Overlay decoder/renderer"); + GST_DEBUG_CATEGORY_INIT (dvdspu_debug, "gstspu", + 0, "Sub-picture Overlay decoder/renderer"); return gst_element_register (plugin, "dvdspu", GST_RANK_NONE, GST_TYPE_DVD_SPU); diff --git a/gst/dvdspu/gstdvdspu.h b/gst/dvdspu/gstdvdspu.h index 1bbc7d3a..22b48d1d 100644 --- a/gst/dvdspu/gstdvdspu.h +++ b/gst/dvdspu/gstdvdspu.h @@ -16,11 +16,15 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -#ifndef __DVD_SPU_H__ -#define __DVD_SPU_H__ +#ifndef __GST_DVD_SPU_H__ +#define __GST_DVD_SPU_H__ #include +#include "gstspu-common.h" +#include "gstspu-vobsub.h" +#include "gstspu-pgs.h" + G_BEGIN_DECLS #define GST_TYPE_DVD_SPU \ @@ -37,64 +41,16 @@ G_BEGIN_DECLS #define DVD_SPU_LOCK(s) g_mutex_lock ((s)->spu_lock); #define DVD_SPU_UNLOCK(s) g_mutex_unlock ((s)->spu_lock); -typedef struct _GstDVDSpu GstDVDSpu; typedef struct _GstDVDSpuClass GstDVDSpuClass; -typedef struct SpuRect SpuRect; -typedef struct SpuPixCtrlI SpuPixCtrlI; -typedef struct SpuLineCtrlI SpuLineCtrlI; -typedef struct SpuColour SpuColour; typedef enum SpuStateFlags SpuStateFlags; typedef enum SpuInputType SpuInputType; -typedef struct SpuState SpuState; typedef struct SpuPacket SpuPacket; -typedef enum SpuCmd SpuCmd; - -/* Describe the limits of a rectangle */ -struct SpuRect { - gint16 left; - gint16 top; - gint16 right; - gint16 bottom; -}; - -/* Store a pre-multiplied colour value. The YUV fields hold the YUV values - * multiplied by the 8-bit alpha, to save computing it while rendering */ -struct SpuColour { - guint16 Y; - guint16 U; - guint16 V; - guint8 A; -}; - -/* Pixel Control Info from a Change Color Contrast command */ -struct SpuPixCtrlI { - gint16 left; - guint32 palette; - - /* Pre-multiplied palette values, updated as - * needed */ - SpuColour pal_cache[4]; -}; -struct SpuLineCtrlI { - guint8 n_changes; /* 1 to 8 */ - SpuPixCtrlI pix_ctrl_i[8]; - - gint16 top; - gint16 bottom; -}; - -enum SpuCmd { - SPU_CMD_FSTA_DSP = 0x00, /* Forced Display */ - SPU_CMD_DSP = 0x01, /* Display Start */ - SPU_CMD_STP_DSP = 0x02, /* Display Off */ - SPU_CMD_SET_COLOR = 0x03, /* Set the color indexes for the palette */ - SPU_CMD_SET_ALPHA = 0x04, /* Set the alpha indexes for the palette */ - SPU_CMD_SET_DAREA = 0x05, /* Set the display area for the SPU */ - SPU_CMD_DSPXA = 0x06, /* Pixel data addresses */ - SPU_CMD_CHG_COLCON = 0x07, /* Change Color & Contrast */ - SPU_CMD_END = 0xff +enum SpuInputType { + SPU_INPUT_TYPE_NONE = 0x00, + SPU_INPUT_TYPE_VOBSUB = 0x01, + SPU_INPUT_TYPE_PGS = 0x02 }; enum SpuStateFlags { @@ -107,79 +63,23 @@ enum SpuStateFlags { SPU_STATE_FORCED_ONLY = 0x100 }; -enum SpuInputType { - SPU_INPUT_TYPE_NONE = 0x00, - SPU_INPUT_TYPE_VOBSUB = 0x01, - SPU_INPUT_TYPE_PGS = 0x02 -}; - #define SPU_STATE_FLAGS_MASK (0xff) struct SpuState { GstClockTime next_ts; /* Next event TS in running time */ - - GstClockTime base_ts; /* base TS for cmd blk delays in running time */ - GstBuffer *buf; /* Current SPU packet we're executing commands from */ - guint16 cur_cmd_blk; /* Offset into the buf for the current cmd block */ - SpuStateFlags flags; - - /* Top + Bottom field offsets in the buffer. 0 = not set */ - guint16 pix_data[2]; - GstBuffer *pix_buf; /* Current SPU packet the pix_data references */ - - SpuRect disp_rect; - SpuRect clip_rect; - SpuRect hl_rect; - - guint32 current_clut[16]; /* Colour lookup table from incoming events */ - - guint8 main_idx[4]; /* Indices for current main palette */ - guint8 main_alpha[4]; /* Alpha values for main palette */ - - guint8 hl_idx[4]; /* Indices for current highlight palette */ - guint8 hl_alpha[4]; /* Alpha values for highlight palette */ - - /* Pre-multiplied colour palette for the main palette */ - SpuColour main_pal[4]; - gboolean main_pal_dirty; - - /* Line control info for rendering the highlight palette */ - SpuLineCtrlI hl_ctrl_i; - gboolean hl_pal_dirty; /* Indicates that the HL palette info needs refreshing */ - - /* LineCtrlI Info from a Change Color & Contrast command */ - SpuLineCtrlI *line_ctrl_i; - gint16 n_line_ctrl_i; - gboolean line_ctrl_i_pal_dirty; /* Indicates that the palettes for the line_ctrl_i - * need recalculating */ - - /* Rendering state vars below */ - guint16 *comp_bufs[3]; /* Compositing buffers for U+V & A */ - gint16 comp_last_x[2]; /* Maximum X values we rendered into the comp buffer (odd & even) */ - gint16 *comp_last_x_ptr; /* Ptr to the current comp_last_x value to be updated by the render */ + + gint fps_n, fps_d; gint16 vid_width, vid_height; gint16 Y_stride, UV_stride; gint16 Y_height, UV_height; - gint fps_n, fps_d; - - /* Current Y Position */ - gint16 cur_Y; - - /* Current offset in nibbles into the pix_data */ - guint16 cur_offsets[2]; - guint16 max_offset; - - /* current ChgColCon Line Info */ - SpuLineCtrlI *cur_chg_col; - SpuLineCtrlI *cur_chg_col_end; + guint32 *comp_bufs[3]; /* Compositing buffers for U+V & A */ + guint16 comp_left; + guint16 comp_right; - /* Output position tracking */ - guint8 *out_Y; - guint16 *out_U; - guint16 *out_V; - guint16 *out_A; + SpuVobsubState vobsub; + SpuPgsState pgs; }; /* Structure used to store the queue of pending SPU packets. The start_ts is @@ -229,4 +129,4 @@ GType gst_dvd_spu_get_type (void); G_END_DECLS -#endif /* __DVD_SPU_H__ */ +#endif /* __GST_DVD_SPU_H__ */ diff --git a/gst/dvdspu/gstspu-common.h b/gst/dvdspu/gstspu-common.h new file mode 100644 index 00000000..206e8820 --- /dev/null +++ b/gst/dvdspu/gstspu-common.h @@ -0,0 +1,56 @@ +/* GStreamer DVD Sub-Picture Unit + * Copyright (C) 2007 Fluendo S.A. + * + * 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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +#ifndef __GSTSPU_COMMON_H__ +#define __GSTSPU_COMMON_H__ + +#include + +G_BEGIN_DECLS + +/* FIXME: Move this back to gstdvdspu.h when the renderers no longer use it: */ +typedef struct _GstDVDSpu GstDVDSpu; + +typedef struct SpuState SpuState; +typedef struct SpuColour SpuColour; +typedef struct SpuRect SpuRect; + +/* Describe the limits of a rectangle */ +struct SpuRect { + gint16 left; + gint16 top; + gint16 right; + gint16 bottom; +}; + +/* Store a pre-multiplied colour value. The YUV fields hold the YUV values + * multiplied by the 8-bit alpha, to save computing it while rendering */ +struct SpuColour { + guint16 Y; + guint16 U; + guint16 V; + guint8 A; +}; + +void gstspu_clear_comp_buffers (SpuState * state); +void gstspu_blend_comp_buffers (SpuState * state, guint8 * planes[3]); + + +G_END_DECLS + +#endif /* __GSTSPU_COMMON_H__ */ diff --git a/gst/dvdspu/gstspu-pgs.c b/gst/dvdspu/gstspu-pgs.c index b4bbdc33..a79e694e 100644 --- a/gst/dvdspu/gstspu-pgs.c +++ b/gst/dvdspu/gstspu-pgs.c @@ -23,6 +23,7 @@ #include #include +#include "gstdvdspu.h" #include "gstspu-pgs.h" const struct PgsFrameRateEntry @@ -35,12 +36,32 @@ const struct PgsFrameRateEntry 64, 30000, 1001} /* 29.97 FPS */ }; -gboolean in_presentation_segment = FALSE; -guint8 *rle_data = NULL; -guint32 rle_data_size = 0, rle_data_used = 0; -PgsPaletteEntry palette[256]; +typedef enum PgsCommandType PgsCommandType; +enum PgsCommandType +{ + PGS_COMMAND_SET_PALETTE = 0x14, + PGS_COMMAND_SET_OBJECT_DATA = 0x15, + PGS_COMMAND_PRESENTATION_SEGMENT = 0x16, + PGS_COMMAND_SET_WINDOW = 0x17, + PGS_COMMAND_INTERACTIVE_SEGMENT = 0x18, + + PGS_COMMAND_END_DISPLAY = 0x80, + + PGS_COMMAND_INVALID = 0xFFFF +}; + +static gint gstspu_exec_pgs_buffer (GstDVDSpu * dvdspu, GstBuffer * buf); + +#define DUMP_CMDS 0 #define DUMP_FULL_IMAGE 0 +#define DUMP_FULL_PALETTE 0 + +#if DUMP_CMDS +#define PGS_DUMP(...) g_print(__VA_ARGS__) +#else +#define PGS_DUMP(...) +#endif static void dump_bytes (guint8 * data, guint16 len) @@ -49,19 +70,20 @@ dump_bytes (guint8 * data, guint16 len) /* Dump the numbers */ for (i = 0; i < len; i++) { - g_print ("0x%02x ", data[i]); + PGS_DUMP ("0x%02x ", data[i]); if (!((i + 1) % 16)) - g_print ("\n"); + PGS_DUMP ("\n"); } if (len > 0 && (i % 16)) - g_print ("\n"); + PGS_DUMP ("\n"); } static void -dump_rle_data (guint8 * data, guint32 len) +dump_rle_data (GstDVDSpu * dvdspu, guint8 * data, guint32 len) { guint8 *end = data + len; guint16 obj_w, obj_h; + guint x = 0; if (data + 4 > end) return; @@ -70,42 +92,36 @@ dump_rle_data (guint8 * data, guint32 len) obj_w = GST_READ_UINT16_BE (data); obj_h = GST_READ_UINT16_BE (data + 2); data += 4; - g_print ("RLE image is %ux%u\n", obj_w, obj_h); + PGS_DUMP ("RLE image is %ux%u\n", obj_w, obj_h); while (data < end) { guint8 pal_id; guint16 run_len; - if (data[0] != 0) { - // g_print ("data 0x%02x\n", data[0]); - pal_id = *data++; + pal_id = *data++; + if (pal_id != 0) { + // PGS_DUMP ("data 0x%02x\n", data[0]); run_len = 1; } else { - data++; - if (data + 1 > end) return; switch (data[0] & 0xC0) { case 0x00: - //g_print ("data 0x%02x\n", data[0]); + //PGS_DUMP ("data 0x%02x\n", data[0]); run_len = (data[0] & 0x3f); - if (run_len > 0) - pal_id = 0; data++; break; case 0x40: if (data + 2 > end) return; - //g_print ("data 0x%02x 0x%02x\n", data[0], data[1]); + //PGS_DUMP ("data 0x%02x 0x%02x\n", data[0], data[1]); run_len = ((data[0] << 8) | data[1]) & 0x3fff; - if (run_len > 0) - pal_id = 0; data += 2; break; case 0x80: if (data + 2 > end) return; - //g_print ("data 0x%02x 0x%02x\n", data[0], data[1]); + //PGS_DUMP ("data 0x%02x 0x%02x\n", data[0], data[1]); run_len = (data[0] & 0x3f); pal_id = data[1]; data += 2; @@ -113,7 +129,7 @@ dump_rle_data (guint8 * data, guint32 len) case 0xC0: if (data + 3 > end) return; - //g_print ("data 0x%02x 0x%02x 0x%02x\n", data[0], data[1], data[2]); + //PGS_DUMP ("data 0x%02x 0x%02x 0x%02x\n", data[0], data[1], data[2]); run_len = ((data[0] << 8) | data[1]) & 0x3fff; pal_id = data[2]; data += 3; @@ -124,113 +140,302 @@ dump_rle_data (guint8 * data, guint32 len) #if DUMP_FULL_IMAGE { gint i; - guint x = 0; #if 1 - if (palette[pal_id].A) { + if (dvdspu->spu_state.pgs.palette[pal_id].A) { + guint8 val = dvdspu->spu_state.pgs.palette[pal_id].A; for (i = 0; i < run_len; i++) - g_print ("%02x ", pal_id); + PGS_DUMP ("%02x ", val); } else { for (i = 0; i < run_len; i++) - g_print (" "); - } - x += run_len; - if (!run_len || x > obj_w) { - g_print ("\n"); - x = 0; + PGS_DUMP (" "); } + if (!run_len || (x + run_len) > obj_w) + PGS_DUMP ("\n"); #else - g_print ("Run x: %d pix: %d col: %d\n", x, run_len, pal_id); - x += run_len; - if (x >= obj_w) - x = 0; + PGS_DUMP ("Run x: %d pix: %d col: %d\n", x, run_len, pal_id); #endif } #endif + x += run_len; + if (!run_len || x > obj_w) + x = 0; }; - g_print ("\n"); + PGS_DUMP ("\n"); +} + +static void +pgs_composition_object_render (PgsCompositionObject * obj, SpuState * state, + GstBuffer * dest_buf) +{ + SpuColour *colour; + guint8 *planes[3]; /* YUV frame pointers */ + guint8 *data, *end; + guint16 obj_w, obj_h; + guint x, y, i, max_x; + + if (G_UNLIKELY (obj->rle_data == NULL || obj->rle_data_size == 0 + || obj->rle_data_used != obj->rle_data_size)) + return; + + data = obj->rle_data; + end = data + obj->rle_data_used; + + if (data + 4 > end) + return; + + /* FIXME: Calculate and use the cropping window for the output, as the + * intersection of the crop rectangle for this object (if any) and the + * window specified by the object's window_id */ + + /* Store the start of each plane */ + planes[0] = GST_BUFFER_DATA (dest_buf); + planes[1] = planes[0] + (state->Y_height * state->Y_stride); + planes[2] = planes[1] + (state->UV_height * state->UV_stride); + + /* Sanity check */ + g_return_if_fail (planes[2] + (state->UV_height * state->UV_stride) <= + GST_BUFFER_DATA (dest_buf) + GST_BUFFER_SIZE (dest_buf)); + + x = obj->x; + y = obj->y; + + planes[0] += state->Y_stride * y; + planes[1] += state->UV_stride * (y / 2); + planes[2] += state->UV_stride * (y / 2); + + /* RLE data: */ + obj_w = GST_READ_UINT16_BE (data); + obj_h = GST_READ_UINT16_BE (data + 2); + data += 4; + + max_x = x + obj_w; + + state->comp_left = x; + state->comp_right = max_x; + + gstspu_clear_comp_buffers (state); + + while (data < end) { + guint8 pal_id; + guint16 run_len; + + pal_id = *data++; + if (pal_id != 0) { + run_len = 1; + } else { + if (data + 1 > end) + return; + switch (data[0] & 0xC0) { + case 0x00: + run_len = (data[0] & 0x3f); + data++; + break; + case 0x40: + if (data + 2 > end) + return; + run_len = ((data[0] << 8) | data[1]) & 0x3fff; + data += 2; + break; + case 0x80: + if (data + 2 > end) + return; + run_len = (data[0] & 0x3f); + pal_id = data[1]; + data += 2; + break; + case 0xC0: + if (data + 3 > end) + return; + run_len = ((data[0] << 8) | data[1]) & 0x3fff; + pal_id = data[2]; + data += 3; + break; + } + } + + colour = &state->pgs.palette[pal_id]; + if (colour->A) { + guint32 inv_A = 0xff - colour->A; + + for (i = 0; i < run_len; i++) { + planes[0][x] = (inv_A * planes[0][x] + colour->Y) / 0xff; + + state->comp_bufs[0][x / 2] += colour->U; + state->comp_bufs[1][x / 2] += colour->V; + state->comp_bufs[2][x / 2] += colour->A; + x++; + } + } else { + x += run_len; + } + + if (!run_len || x > max_x) { + x = state->pgs.win_x; + planes[0] += state->Y_stride; + + if (y % 2) { + gstspu_blend_comp_buffers (state, planes); + gstspu_clear_comp_buffers (state); + + planes[1] += state->UV_stride; + planes[2] += state->UV_stride; + } + y++; + } + } + + if (y % 2) + gstspu_blend_comp_buffers (state, planes); +} + +static void +pgs_composition_object_clear (PgsCompositionObject * obj) +{ + if (obj->rle_data) { + g_free (obj->rle_data); + obj->rle_data = NULL; + } + obj->rle_data_size = obj->rle_data_used = 0; +} + +static void +pgs_presentation_segment_set_object_count (PgsPresentationSegment * ps, + guint8 n_objects) +{ + if (ps->objects == NULL) { + ps->objects = + g_array_sized_new (FALSE, TRUE, sizeof (PgsCompositionObject), + n_objects); + g_array_set_size (ps->objects, n_objects); + return; + } + + /* Clear memory in any extraneous objects */ + if (ps->objects->len > n_objects) { + guint i; + for (i = n_objects; i < ps->objects->len; i++) { + PgsCompositionObject *cur = + &g_array_index (ps->objects, PgsCompositionObject, i); + pgs_composition_object_clear (cur); + } + } + + g_array_set_size (ps->objects, n_objects); + + if (n_objects == 0) { + g_array_free (ps->objects, TRUE); + ps->objects = NULL; + } +} + +static PgsCompositionObject * +pgs_presentation_segment_find_object (PgsPresentationSegment * ps, + guint16 obj_id) +{ + guint i; + if (ps->objects == NULL) + return NULL; + + for (i = 0; i < ps->objects->len; i++) { + PgsCompositionObject *cur = + &g_array_index (ps->objects, PgsCompositionObject, i); + if (cur->id == obj_id) + return cur; + } + + return NULL; } static int -parse_presentation_segment (guint8 type, guint8 * payload, guint16 len) +parse_presentation_segment (GstDVDSpu * dvdspu, guint8 type, guint8 * payload, + guint16 len) { guint8 *end = payload + len; - guint16 vid_w, vid_h; - gint8 vid_fps; - guint16 composition_desc_no; - guint8 composition_desc_state; - guint8 pres_seg_flags; - guint8 palette_id; - guint8 n_objects; + PgsPresentationSegment *ps = &dvdspu->spu_state.pgs.pres_seg; + guint8 n_objects, palette_id; gint i; /* Parse video descriptor */ if (payload + 5 > end) return 0; - vid_w = GST_READ_UINT16_BE (payload); - vid_h = GST_READ_UINT16_BE (payload + 2); - vid_fps = payload[4]; + + ps->vid_w = GST_READ_UINT16_BE (payload); + ps->vid_h = GST_READ_UINT16_BE (payload + 2); + ps->vid_fps_code = payload[4]; payload += 5; /* Parse composition descriptor */ if (payload + 3 > end) return 0; - composition_desc_no = GST_READ_UINT16_BE (payload); - composition_desc_state = payload[2]; + ps->composition_no = GST_READ_UINT16_BE (payload); + ps->composition_state = payload[2]; payload += 3; /* Parse other bits */ if (payload + 3 > end) return 0; - pres_seg_flags = payload[0]; + ps->flags = payload[0]; + palette_id = payload[1]; n_objects = payload[2]; payload += 3; - g_print ("Video width %u height %u fps code %u\n", vid_w, vid_h, vid_fps); - g_print - ("Composition num %u state %u flags 0x%02x palette id %u n_objects %u\n", - composition_desc_no, composition_desc_state, pres_seg_flags, palette_id, + if (ps->flags & PGS_PRES_SEGMENT_FLAG_UPDATE_PALETTE) + ps->palette_id = palette_id; + + PGS_DUMP ("Video width %u height %u fps code %u\n", ps->vid_w, ps->vid_h, + ps->vid_fps_code); + PGS_DUMP + ("Composition num %u state 0x%02x flags 0x%02x palette id %u n_objects %u\n", + ps->composition_no, ps->composition_state, ps->flags, ps->palette_id, n_objects); + pgs_presentation_segment_set_object_count (ps, n_objects); + for (i = 0; i < (gint) n_objects; i++) { - guint16 obj_id; - guint8 win_id; - guint8 obj_flags; - guint16 x, y; + PgsCompositionObject *obj = + &g_array_index (ps->objects, PgsCompositionObject, i); if (payload + 8 > end) break; - obj_id = GST_READ_UINT16_BE (payload); - win_id = payload[2]; - obj_flags = payload[3]; - x = GST_READ_UINT16_BE (payload + 4); - y = GST_READ_UINT16_BE (payload + 6); + obj->id = GST_READ_UINT16_BE (payload); + obj->win_id = payload[2]; + obj->flags = payload[3]; + obj->x = GST_READ_UINT16_BE (payload + 4); + obj->y = GST_READ_UINT16_BE (payload + 6); + obj->rle_data_size = obj->rle_data_used = 0; + payload += 8; - g_print ("Composition object %d Object ID %u Window ID %u flags 0x%02x " - "x %u y %u\n", i, obj_id, win_id, obj_flags, x, y); + PGS_DUMP ("Composition object %d Object ID %u Window ID %u flags 0x%02x " + "x %u y %u\n", i, obj->id, obj->win_id, obj->flags, obj->x, obj->y); - if (obj_flags & PGS_COMP_OBJECT_FLAG_CROPPED) { - guint16 crop_x, crop_y, crop_w, crop_h; + if (obj->flags & PGS_COMPOSITION_OBJECT_FLAG_CROPPED) { if (payload + 8 > end) break; - crop_x = GST_READ_UINT16_BE (payload); - crop_y = GST_READ_UINT16_BE (payload + 2); - crop_w = GST_READ_UINT16_BE (payload + 4); - crop_h = GST_READ_UINT16_BE (payload + 6); + obj->crop_x = GST_READ_UINT16_BE (payload); + obj->crop_y = GST_READ_UINT16_BE (payload + 2); + obj->crop_w = GST_READ_UINT16_BE (payload + 4); + obj->crop_h = GST_READ_UINT16_BE (payload + 6); + payload += 8; - g_print ("Cropping window x %u y %u w %u h %u\n", - crop_x, crop_y, crop_w, crop_h); + PGS_DUMP ("Cropping window x %u y %u w %u h %u\n", + obj->crop_x, obj->crop_y, obj->crop_w, obj->crop_h); } + + if (obj->flags & ~(PGS_COMPOSITION_OBJECT_FLAG_CROPPED | + PGS_COMPOSITION_OBJECT_FLAG_FORCED)) + g_warning ("PGS Composition Object has unknown flags: 0x%02x", + obj->flags); } if (payload != end) { - g_print ("%u bytes left over:\n", end - payload); + g_warning ("PGS Composition Object: %d bytes not consumed", end - payload); dump_bytes (payload, end - payload); } @@ -238,8 +443,11 @@ parse_presentation_segment (guint8 type, guint8 * payload, guint16 len) } static int -parse_set_palette (guint8 type, guint8 * payload, guint16 len) +parse_set_palette (GstDVDSpu * dvdspu, guint8 type, guint8 * payload, + guint16 len) { + SpuState *state = &dvdspu->spu_state; + const gint PGS_PALETTE_ENTRY_SIZE = 5; guint8 *end = payload + len; guint8 palette_id; @@ -254,33 +462,40 @@ parse_set_palette (guint8 type, guint8 * payload, guint16 len) n_entries = (len - 2) / PGS_PALETTE_ENTRY_SIZE; - g_print ("Palette ID %u version %u. %d entries\n", + PGS_DUMP ("Palette ID %u version %u. %d entries\n", palette_id, palette_version, n_entries); + for (i = 0; i < 256; i++) + state->pgs.palette[i].A = 0; for (i = 0; i < n_entries; i++) { - guint8 n, Y, Cb, Cr, A; + guint8 n, Y, U, V, A; n = payload[0]; - palette[n].n = n; - palette[n].Y = Y = payload[1]; - palette[n].Cb = Cb = payload[2]; - palette[n].Cr = Cr = payload[3]; - palette[n].A = A = payload[4]; + Y = payload[1]; + U = payload[2]; + V = payload[3]; + A = payload[4]; - g_print ("Entry %3d: Y %3d Cb %3d Cr %3d A %3d ", n, Y, Cb, Cr, A); +#if DUMP_FULL_PALETTE + PGS_DUMP ("Entry %3d: Y %3d U %3d V %3d A %3d ", n, Y, U, V, A); if (((i + 1) % 2) == 0) - g_print ("\n"); + PGS_DUMP ("\n"); +#endif + + /* Premultiply the palette entries by the alpha */ + state->pgs.palette[n].Y = Y * A; + state->pgs.palette[n].U = U * A; + state->pgs.palette[n].V = V * A; + state->pgs.palette[n].A = A; payload += PGS_PALETTE_ENTRY_SIZE; } - for (i = n_entries; i < 256; i++) { - palette[i].n = i; - palette[i].A = 0; - } +#if DUMP_FULL_PALETTE if (n_entries > 0 && (i % 2)) - g_print ("\n"); + PGS_DUMP ("\n"); +#endif if (payload != end) { - g_print ("%u bytes left over:\n", end - payload); + g_warning ("PGS Set Palette: %d bytes not consumed", end - payload); dump_bytes (payload, end - payload); } @@ -288,11 +503,12 @@ parse_set_palette (guint8 type, guint8 * payload, guint16 len) } static int -parse_set_window (guint8 type, guint8 * payload, guint16 len) +parse_set_window (GstDVDSpu * dvdspu, guint8 type, guint8 * payload, + guint16 len) { + SpuState *state = &dvdspu->spu_state; guint8 *end = payload + len; guint8 win_id, win_ver; - guint16 x, y, w, h; if (payload + 10 > end) return 0; @@ -302,17 +518,18 @@ parse_set_window (guint8 type, guint8 * payload, guint16 len) /* FIXME: This is just a guess as to what the numbers mean: */ win_id = payload[0]; win_ver = payload[1]; - x = GST_READ_UINT16_BE (payload + 2); - y = GST_READ_UINT16_BE (payload + 4); - w = GST_READ_UINT16_BE (payload + 6); - h = GST_READ_UINT16_BE (payload + 8); + state->pgs.win_x = GST_READ_UINT16_BE (payload + 2); + state->pgs.win_y = GST_READ_UINT16_BE (payload + 4); + state->pgs.win_w = GST_READ_UINT16_BE (payload + 6); + state->pgs.win_h = GST_READ_UINT16_BE (payload + 8); payload += 10; - g_print ("Win ID %u version %d x %d y %d w %d h %d\n", - win_id, win_ver, x, y, w, h); + PGS_DUMP ("Win ID %u version %d x %d y %d w %d h %d\n", + win_id, win_ver, state->pgs.win_x, state->pgs.win_y, state->pgs.win_w, + state->pgs.win_h); if (payload != end) { - g_print ("%u bytes left over:\n", end - payload); + g_warning ("PGS Set Window: %d bytes not consumed", end - payload); dump_bytes (payload, end - payload); } @@ -320,51 +537,60 @@ parse_set_window (guint8 type, guint8 * payload, guint16 len) } static int -parse_set_object_data (guint8 type, guint8 * payload, guint16 len) +parse_set_object_data (GstDVDSpu * dvdspu, guint8 type, guint8 * payload, + guint16 len) { + SpuPgsState *pgs_state = &dvdspu->spu_state.pgs; + PgsCompositionObject *obj; guint8 *end = payload + len; guint16 obj_id; - guint8 obj_ver, obj_flags; + guint8 obj_ver, flags; if (payload + 4 > end) return 0; + obj_id = GST_READ_UINT16_BE (payload); obj_ver = payload[2]; - obj_flags = payload[3]; + flags = payload[3]; payload += 4; - g_print ("Object ID %d ver %u flags 0x%02x\n", obj_id, obj_ver, obj_flags); + obj = pgs_presentation_segment_find_object (&(pgs_state->pres_seg), obj_id); - if (obj_flags & PGS_OBJECT_UPDATE_FLAG_START_RLE) { + PGS_DUMP ("Object ID %d ver %u flags 0x%02x\n", obj_id, obj_ver, flags); + + if (flags & PGS_OBJECT_UPDATE_FLAG_START_RLE) { + obj->rle_data_ver = obj_ver; if (payload + 3 > end) return 0; - rle_data_size = GST_READ_UINT24_BE (payload); + obj->rle_data_size = GST_READ_UINT24_BE (payload); payload += 3; - g_print ("%d bytes of RLE data, of %d bytes total.\n", - end - payload, rle_data_size); + PGS_DUMP ("%d bytes of RLE data, of %d bytes total.\n", + end - payload, obj->rle_data_size); - rle_data = g_realloc (rle_data, rle_data_size); - rle_data_used = end - payload; - memcpy (rle_data, payload, end - payload); + obj->rle_data = g_realloc (obj->rle_data, obj->rle_data_size); + obj->rle_data_used = end - payload; + memcpy (obj->rle_data, payload, end - payload); payload = end; } else { - g_print ("%d bytes of additional RLE data\n", end - payload); - if (rle_data_size < rle_data_used + end - payload) - return 0; - - memcpy (rle_data + rle_data_used, payload, end - payload); - rle_data_used += end - payload; - payload = end; + PGS_DUMP ("%d bytes of additional RLE data\n", end - payload); + /* Check that the data chunk is for this object version, and fits in the buffer */ + if (obj->rle_data_ver == obj_ver && + obj->rle_data_used + end - payload <= obj->rle_data_size) { + + memcpy (obj->rle_data + obj->rle_data_used, payload, end - payload); + obj->rle_data_used += end - payload; + payload = end; + } } - if (rle_data_size == rle_data_used) - dump_rle_data (rle_data, rle_data_size); + if (obj->rle_data_size == obj->rle_data_used) + dump_rle_data (dvdspu, obj->rle_data, obj->rle_data_size); if (payload != end) { - g_print ("%u bytes left over:\n", end - payload); + g_warning ("PGS Set Object Data: %d bytes not consumed", end - payload); dump_bytes (payload, end - payload); } @@ -372,56 +598,61 @@ parse_set_object_data (guint8 type, guint8 * payload, guint16 len) } static int -parse_pgs_packet (guint8 type, guint8 * payload, guint16 len) +parse_pgs_packet (GstDVDSpu * dvdspu, guint8 type, guint8 * payload, + guint16 len) { + SpuPgsState *pgs_state = &dvdspu->spu_state.pgs; int ret = 0; - if (!in_presentation_segment && type != PGS_COMMAND_PRESENTATION_SEGMENT) { - g_print ("Expected BEGIN PRESENTATION SEGMENT command. " + if (!pgs_state->in_presentation_segment + && type != PGS_COMMAND_PRESENTATION_SEGMENT) { + PGS_DUMP ("Expected BEGIN PRESENTATION SEGMENT command. " "Got command type 0x%02x len %u. Skipping\n", type, len); return 0; } switch (type) { case PGS_COMMAND_PRESENTATION_SEGMENT: - g_print ("*******************************************\n" + PGS_DUMP ("*******************************************\n" "Begin PRESENTATION_SEGMENT (0x%02x) packet len %u\n", type, len); - in_presentation_segment = TRUE; - ret = parse_presentation_segment (type, payload, len); + pgs_state->in_presentation_segment = + pgs_state->have_presentation_segment = TRUE; + ret = parse_presentation_segment (dvdspu, type, payload, len); break; case PGS_COMMAND_SET_OBJECT_DATA: - g_print ("*** Set Object Data (0x%02x) packet len %u\n", type, len); - ret = parse_set_object_data (type, payload, len); + PGS_DUMP ("*** Set Object Data (0x%02x) packet len %u\n", type, len); + ret = parse_set_object_data (dvdspu, type, payload, len); break; case PGS_COMMAND_SET_PALETTE: - g_print ("*** Set Palette (0x%02x) packet len %u\n", type, len); - ret = parse_set_palette (type, payload, len); + PGS_DUMP ("*** Set Palette (0x%02x) packet len %u\n", type, len); + ret = parse_set_palette (dvdspu, type, payload, len); break; case PGS_COMMAND_SET_WINDOW: - g_print ("*** Set Window command (0x%02x) packet len %u\n", type, len); - ret = parse_set_window (type, payload, len); + PGS_DUMP ("*** Set Window command (0x%02x) packet len %u\n", type, len); + ret = parse_set_window (dvdspu, type, payload, len); break; case PGS_COMMAND_INTERACTIVE_SEGMENT: - g_print ("*** Interactive Segment command(0x%02x) packet len %u\n", + PGS_DUMP ("*** Interactive Segment command(0x%02x) packet len %u\n", type, len); dump_bytes (payload, len); break; case PGS_COMMAND_END_DISPLAY: - g_print ("*** End Display command (0x%02x) packet len %u\n", type, len); - in_presentation_segment = FALSE; + PGS_DUMP ("*** End Display command (0x%02x) packet len %u\n", type, + len); + pgs_state->in_presentation_segment = FALSE; break; default: - g_print ("*** Unknown command: type 0x%02x len %u. Skipping\n", type, - len); + g_warning ("Unknown PGS command: type 0x%02x len %u", type, len); + dump_bytes (payload, len); break; } - g_print ("\n"); + PGS_DUMP ("\n"); return ret; } gint -gstspu_dump_pgs_buffer (GstBuffer * buf) +gstspu_exec_pgs_buffer (GstDVDSpu * dvdspu, GstBuffer * buf) { guint8 *pos, *end; guint8 type; @@ -432,11 +663,11 @@ gstspu_dump_pgs_buffer (GstBuffer * buf) /* Need at least 3 bytes */ if (pos + 3 > end) { - g_print ("Not enough bytes to be a PGS packet\n"); + PGS_DUMP ("Not enough bytes to be a PGS packet\n"); return -1; } - g_print ("Begin dumping command buffer of size %u ts %" GST_TIME_FORMAT "\n", + PGS_DUMP ("Begin dumping command buffer of size %u ts %" GST_TIME_FORMAT "\n", end - pos, GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf))); do { type = *pos++; @@ -444,17 +675,88 @@ gstspu_dump_pgs_buffer (GstBuffer * buf) pos += 2; if (pos + packet_len > end) { - g_print ("Invalid packet length %u (only have %u bytes)\n", packet_len, + PGS_DUMP ("Invalid packet length %u (only have %u bytes)\n", packet_len, end - pos); return -1; } - if (parse_pgs_packet (type, pos, packet_len)) + if (parse_pgs_packet (dvdspu, type, pos, packet_len)) return -1; pos += packet_len; } while (pos + 3 <= end); - g_print ("End dumping command buffer with %u bytes remaining\n", end - pos); + PGS_DUMP ("End dumping command buffer with %u bytes remaining\n", end - pos); return (pos - GST_BUFFER_DATA (buf)); } + +void +gstspu_pgs_handle_new_buf (GstDVDSpu * dvdspu, GstClockTime event_ts, + GstBuffer * buf) +{ + SpuState *state = &dvdspu->spu_state; + + state->next_ts = event_ts; + state->pgs.pending_cmd = buf; +} + +gboolean +gstspu_pgs_execute_event (GstDVDSpu * dvdspu) +{ + SpuState *state = &dvdspu->spu_state; + + if (state->pgs.pending_cmd) { + gstspu_exec_pgs_buffer (dvdspu, state->pgs.pending_cmd); + gst_buffer_unref (state->pgs.pending_cmd); + state->pgs.pending_cmd = NULL; + } + + state->next_ts = GST_CLOCK_TIME_NONE; + + state->flags &= ~SPU_STATE_DISPLAY; + if (state->pgs.have_presentation_segment) { + if (state->pgs.pres_seg.objects && state->pgs.pres_seg.objects->len > 0) + state->flags |= SPU_STATE_DISPLAY; + } + return FALSE; +} + +void +gstspu_pgs_render (GstDVDSpu * dvdspu, GstBuffer * buf) +{ + SpuState *state = &dvdspu->spu_state; + PgsPresentationSegment *ps = &state->pgs.pres_seg; + guint i; + + if (ps->objects == NULL) + return; + + for (i = 0; i < ps->objects->len; i++) { + PgsCompositionObject *cur = + &g_array_index (ps->objects, PgsCompositionObject, i); + pgs_composition_object_render (cur, state, buf); + } +} + +gboolean +gstspu_pgs_handle_dvd_event (GstDVDSpu * dvdspu, GstEvent * event) +{ + return FALSE; +} + +void +gstspu_pgs_flush (GstDVDSpu * dvdspu) +{ + SpuPgsState *pgs_state = &dvdspu->spu_state.pgs; + + if (pgs_state->pending_cmd) { + gst_buffer_unref (pgs_state->pending_cmd); + pgs_state->pending_cmd = NULL; + } + + pgs_state->have_presentation_segment = FALSE; + pgs_state->in_presentation_segment = FALSE; + pgs_presentation_segment_set_object_count (&pgs_state->pres_seg, 0); + + pgs_state->win_x = pgs_state->win_y = pgs_state->win_w = pgs_state->win_h = 0; +} diff --git a/gst/dvdspu/gstspu-pgs.h b/gst/dvdspu/gstspu-pgs.h index db943071..164f4d81 100644 --- a/gst/dvdspu/gstspu-pgs.h +++ b/gst/dvdspu/gstspu-pgs.h @@ -20,41 +20,87 @@ #ifndef __GSTSPU_PGS_H__ #define __GSTSPU_PGS_H__ -typedef enum PgsCommandType { - PGS_COMMAND_SET_PALETTE = 0x14, - PGS_COMMAND_SET_OBJECT_DATA = 0x15, - PGS_COMMAND_PRESENTATION_SEGMENT = 0x16, - PGS_COMMAND_SET_WINDOW = 0x17, - PGS_COMMAND_INTERACTIVE_SEGMENT = 0x18, +#include "gstspu-common.h" - PGS_COMMAND_END_DISPLAY = 0x80, +typedef struct SpuPgsState SpuPgsState; +typedef enum PgsCompositionObjectFlags PgsCompositionObjectFlags; +typedef enum PgsPresentationSegmentFlags PgsPresentationSegmentFlags; +typedef enum PgsObjectUpdateFlags PgsObjectUpdateFlags; - PGS_COMMAND_INVALID = 0xFFFF -} PgsCommandType; +typedef struct PgsPresentationSegment PgsPresentationSegment; +typedef struct PgsCompositionObject PgsCompositionObject; -typedef enum PgsPresSegmentFlags { - PGS_PRES_SEGMENT_FLAG_UPDATE_PALETTE = 0x80 -} PgsPresSegmentFlags; +enum PgsPresentationSegmentFlags +{ + PGS_PRES_SEGMENT_FLAG_UPDATE_PALETTE = 0x80 +}; -typedef enum PgsCompObjectFlags { - PGS_COMP_OBJECT_FLAG_CROPPED = 0x80, - PGS_COMP_OBJECT_FLAG_FORCED = 0x40 -} PgsCompObjectFlags; +enum PgsCompositionObjectFlags +{ + PGS_COMPOSITION_OBJECT_FLAG_CROPPED = 0x80, + PGS_COMPOSITION_OBJECT_FLAG_FORCED = 0x40 +}; -typedef enum PgsObjectUpdateFlags { +enum PgsObjectUpdateFlags +{ /* Set in an object_update if this is the beginning of new RLE data. * If not set, the data is a continuation to be appended */ - PGS_OBJECT_UPDATE_FLAG_START_RLE = 0x80 -} PgsObjectUpdateFlags; - -typedef struct PgsPaletteEntry { - guint8 n; - guint8 Y; - guint8 Cb; - guint8 Cr; - guint8 A; -} PgsPaletteEntry; - -gint gstspu_dump_pgs_buffer (GstBuffer *buf); + PGS_OBJECT_UPDATE_FLAG_START_RLE = 0x80, + PGS_OBJECT_UPDATE_FLAG_END_RLE = 0x40 /* This one is a guess */ +}; + +struct PgsPresentationSegment +{ + guint16 composition_no; + guint8 composition_state; + + PgsPresentationSegmentFlags flags; + + guint8 palette_id; + + guint16 vid_w, vid_h; + guint8 vid_fps_code; + + GArray *objects; +}; + +struct PgsCompositionObject +{ + guint16 id; + guint8 version; + PgsCompositionObjectFlags flags; + + guint8 win_id; + + guint8 rle_data_ver; + guint8 *rle_data; + guint32 rle_data_size; + guint32 rle_data_used; + + /* Top left corner of this object */ + guint16 x, y; + + /* Only valid if PGS_COMPOSITION_OBJECT_FLAG_CROPPED is set */ + guint16 crop_x, crop_y, crop_w, crop_h; +}; + +struct SpuPgsState { + GstBuffer *pending_cmd; + + gboolean in_presentation_segment; + gboolean have_presentation_segment; + + PgsPresentationSegment pres_seg; + + SpuColour palette[256]; + + guint16 win_x, win_y, win_w, win_h; +}; + +void gstspu_pgs_handle_new_buf (GstDVDSpu * dvdspu, GstClockTime event_ts, GstBuffer *buf); +gboolean gstspu_pgs_execute_event (GstDVDSpu *dvdspu); +void gstspu_pgs_render (GstDVDSpu *dvdspu, GstBuffer *buf); +gboolean gstspu_pgs_handle_dvd_event (GstDVDSpu *dvdspu, GstEvent *event); +void gstspu_pgs_flush (GstDVDSpu *dvdspu); #endif diff --git a/gst/dvdspu/gstspu-vobsub-render.c b/gst/dvdspu/gstspu-vobsub-render.c new file mode 100644 index 00000000..07abff22 --- /dev/null +++ b/gst/dvdspu/gstspu-vobsub-render.c @@ -0,0 +1,536 @@ +/* GStreamer DVD Sub-Picture Unit + * Copyright (C) 2007 Fluendo S.A. + * Copyright (C) 2009 Jan Schmidt + * + * 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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#include + +#include "gstdvdspu.h" + +GST_DEBUG_CATEGORY_EXTERN (dvdspu_debug); +#define GST_CAT_DEFAULT dvdspu_debug + +static void +gstspu_vobsub_recalc_palette (GstDVDSpu * dvdspu, + SpuColour * dest, guint8 * idx, guint8 * alpha) +{ + SpuState *state = &dvdspu->spu_state; + gint i; + + for (i = 0; i < 4; i++, dest++) { + guint32 col = state->vobsub.current_clut[idx[i]]; + + /* Convert incoming 4-bit alpha to 8 bit for blending */ + dest->A = (alpha[i] << 4) | alpha[i]; + dest->Y = ((guint16) ((col >> 16) & 0xff)) * dest->A; + /* U/V are stored as V/U in the clut words, so switch them */ + dest->V = ((guint16) ((col >> 8) & 0xff)) * dest->A; + dest->U = ((guint16) (col & 0xff)) * dest->A; + } +} + +/* Recalculate the main, HL & ChgCol palettes */ +static void +gstspu_vobsub_update_palettes (GstDVDSpu * dvdspu, SpuState * state) +{ + guint8 index[4]; /* Indices for the palette */ + guint8 alpha[4]; /* Alpha values the palette */ + + if (state->vobsub.main_pal_dirty) { + gstspu_vobsub_recalc_palette (dvdspu, state->vobsub.main_pal, + state->vobsub.main_idx, state->vobsub.main_alpha); + + /* Need to refresh the hl_ctrl info copies of the main palette too */ + memcpy (state->vobsub.hl_ctrl_i.pix_ctrl_i[0].pal_cache, + state->vobsub.main_pal, 4 * sizeof (SpuColour)); + memcpy (state->vobsub.hl_ctrl_i.pix_ctrl_i[2].pal_cache, + state->vobsub.main_pal, 4 * sizeof (SpuColour)); + + state->vobsub.main_pal_dirty = FALSE; + } + + if (state->vobsub.hl_pal_dirty) { + gstspu_vobsub_recalc_palette (dvdspu, + state->vobsub.hl_ctrl_i.pix_ctrl_i[1].pal_cache, state->vobsub.hl_idx, + state->vobsub.hl_alpha); + state->vobsub.hl_pal_dirty = FALSE; + } + + /* Update the offset positions for the highlight region */ + if (state->vobsub.hl_rect.top != -1) { + state->vobsub.hl_ctrl_i.top = state->vobsub.hl_rect.top; + state->vobsub.hl_ctrl_i.bottom = state->vobsub.hl_rect.bottom; + state->vobsub.hl_ctrl_i.n_changes = 3; + state->vobsub.hl_ctrl_i.pix_ctrl_i[0].left = 0; + state->vobsub.hl_ctrl_i.pix_ctrl_i[1].left = state->vobsub.hl_rect.left; + state->vobsub.hl_ctrl_i.pix_ctrl_i[2].left = + state->vobsub.hl_rect.right + 1; + } + + if (state->vobsub.line_ctrl_i_pal_dirty) { + gint16 l, c; + GST_LOG_OBJECT (dvdspu, "Updating chg-col-con palettes"); + for (l = 0; l < state->vobsub.n_line_ctrl_i; l++) { + SpuVobsubLineCtrlI *cur_line_ctrl = state->vobsub.line_ctrl_i + l; + + for (c = 0; c < cur_line_ctrl->n_changes; c++) { + SpuVobsubPixCtrlI *cur = cur_line_ctrl->pix_ctrl_i + c; + + index[3] = (cur->palette >> 28) & 0x0f; + index[2] = (cur->palette >> 24) & 0x0f; + index[1] = (cur->palette >> 20) & 0x0f; + index[0] = (cur->palette >> 16) & 0x0f; + + alpha[3] = (cur->palette >> 12) & 0x0f; + alpha[2] = (cur->palette >> 8) & 0x0f; + alpha[1] = (cur->palette >> 4) & 0x0f; + alpha[0] = (cur->palette) & 0x0f; + gstspu_vobsub_recalc_palette (dvdspu, cur->pal_cache, index, alpha); + } + } + state->vobsub.line_ctrl_i_pal_dirty = FALSE; + } +} + +static inline guint8 +gstspu_vobsub_get_nibble (SpuState * state, guint16 * rle_offset) +{ + guint8 ret; + + if (G_UNLIKELY (*rle_offset >= state->vobsub.max_offset)) + return 0; /* Overran the buffer */ + + ret = GST_BUFFER_DATA (state->vobsub.pix_buf)[(*rle_offset) / 2]; + + /* If the offset is even, we shift the answer down 4 bits, otherwise not */ + if (*rle_offset & 0x01) + ret &= 0x0f; + else + ret = ret >> 4; + + (*rle_offset)++; + return ret; +} + +static guint16 +gstspu_vobsub_get_rle_code (SpuState * state, guint16 * rle_offset) +{ + guint16 code; + + code = gstspu_vobsub_get_nibble (state, rle_offset); + if (code < 0x4) { /* 4 .. f */ + code = (code << 4) | gstspu_vobsub_get_nibble (state, rle_offset); + if (code < 0x10) { /* 1x .. 3x */ + code = (code << 4) | gstspu_vobsub_get_nibble (state, rle_offset); + if (code < 0x40) { /* 04x .. 0fx */ + code = (code << 4) | gstspu_vobsub_get_nibble (state, rle_offset); + } + } + } + return code; +} + +static inline void +gstspu_vobsub_draw_rle_run (SpuState * state, gint16 x, gint16 end, + SpuColour * colour) +{ +#if 0 + GST_LOG ("Y: %d x: %d end %d col %d %d %d %d", + state->vobsub.cur_Y, x, end, colour->Y, colour->U, colour->V, colour->A); +#endif + + if (colour->A != 0) { + guint32 inv_A = 0xff - colour->A; + + /* FIXME: This could be more efficient */ + while (x < end) { + state->vobsub.out_Y[x] = + (inv_A * state->vobsub.out_Y[x] + colour->Y) / 0xff; + state->vobsub.out_U[x / 2] += colour->U; + state->vobsub.out_V[x / 2] += colour->V; + state->vobsub.out_A[x / 2] += colour->A; + x++; + } + /* Update the compositing buffer so we know how much to blend later */ + *(state->vobsub.comp_last_x_ptr) = end; + } +} + +static inline gint16 +rle_end_x (guint16 rle_code, gint16 x, gint16 end) +{ + /* run length = rle_code >> 2 */ + if (G_UNLIKELY (((rle_code >> 2) == 0))) + return end; + else + return MIN (end, x + (rle_code >> 2)); +} + +static void gstspu_vobsub_render_line_with_chgcol (SpuState * state, + guint8 * planes[3], guint16 * rle_offset); +static gboolean gstspu_vobsub_update_chgcol (SpuState * state); + +static void +gstspu_vobsub_render_line (SpuState * state, guint8 * planes[3], + guint16 * rle_offset) +{ + gint16 x, next_x, end, rle_code; + SpuColour *colour; + + /* Check for special case of chg_col info to use (either highlight or + * ChgCol command */ + if (state->vobsub.cur_chg_col != NULL) { + if (gstspu_vobsub_update_chgcol (state)) { + /* Check the top & bottom, because we might not be within the region yet */ + if (state->vobsub.cur_Y >= state->vobsub.cur_chg_col->top && + state->vobsub.cur_Y <= state->vobsub.cur_chg_col->bottom) { + gstspu_vobsub_render_line_with_chgcol (state, planes, rle_offset); + return; + } + } + } + + /* No special case. Render as normal */ + + /* Set up our output pointers */ + state->vobsub.out_Y = planes[0]; + state->vobsub.out_U = state->comp_bufs[0]; + state->vobsub.out_V = state->comp_bufs[1]; + state->vobsub.out_A = state->comp_bufs[2]; + /* We always need to start our RLE decoding byte_aligned */ + *rle_offset = GST_ROUND_UP_2 (*rle_offset); + + x = state->vobsub.disp_rect.left; + end = state->vobsub.disp_rect.right + 1; + while (x < end) { + rle_code = gstspu_vobsub_get_rle_code (state, rle_offset); + colour = &state->vobsub.main_pal[rle_code & 3]; + next_x = rle_end_x (rle_code, x, end); + /* Now draw the run between [x,next_x) */ + gstspu_vobsub_draw_rle_run (state, x, next_x, colour); + x = next_x; + } +} + +static gboolean +gstspu_vobsub_update_chgcol (SpuState * state) +{ + if (state->vobsub.cur_chg_col == NULL) + return FALSE; + + if (state->vobsub.cur_Y <= state->vobsub.cur_chg_col->bottom) + return TRUE; + + while (state->vobsub.cur_chg_col < state->vobsub.cur_chg_col_end) { + if (state->vobsub.cur_Y >= state->vobsub.cur_chg_col->top && + state->vobsub.cur_Y <= state->vobsub.cur_chg_col->bottom) { +#if 0 + g_print ("Stopped @ entry %d with top %d bottom %d, cur_y %d", + (gint16) (state->vobsub.cur_chg_col - state->vobsub.line_ctrl_i), + state->vobsub.cur_chg_col->top, state->vobsub.cur_chg_col->bottom, y); +#endif + return TRUE; + } + state->vobsub.cur_chg_col++; + } + + /* Finished all our cur_chg_col entries. Use the main palette from here on */ + state->vobsub.cur_chg_col = NULL; + return FALSE; +} + +static void +gstspu_vobsub_render_line_with_chgcol (SpuState * state, guint8 * planes[3], + guint16 * rle_offset) +{ + SpuVobsubLineCtrlI *chg_col = state->vobsub.cur_chg_col; + + gint16 x, next_x, disp_end, rle_code, run_end; + SpuColour *colour; + SpuVobsubPixCtrlI *cur_pix_ctrl; + SpuVobsubPixCtrlI *next_pix_ctrl; + SpuVobsubPixCtrlI *end_pix_ctrl; + SpuVobsubPixCtrlI dummy_pix_ctrl; + gint16 cur_reg_end; + gint i; + + state->vobsub.out_Y = planes[0]; + state->vobsub.out_U = state->comp_bufs[0]; + state->vobsub.out_V = state->comp_bufs[1]; + state->vobsub.out_A = state->comp_bufs[2]; + + /* We always need to start our RLE decoding byte_aligned */ + *rle_offset = GST_ROUND_UP_2 (*rle_offset); + + /* Our run will cover the display rect */ + x = state->vobsub.disp_rect.left; + disp_end = state->vobsub.disp_rect.right + 1; + + /* Work out the first pixel control info, which may point to the dummy entry if + * the global palette/alpha need using initally */ + cur_pix_ctrl = chg_col->pix_ctrl_i; + end_pix_ctrl = chg_col->pix_ctrl_i + chg_col->n_changes; + + if (cur_pix_ctrl->left != 0) { + next_pix_ctrl = cur_pix_ctrl; + cur_pix_ctrl = &dummy_pix_ctrl; + for (i = 0; i < 4; i++) /* Copy the main palette to our dummy entry */ + dummy_pix_ctrl.pal_cache[i] = state->vobsub.main_pal[i]; + } else { + next_pix_ctrl = cur_pix_ctrl + 1; + } + if (next_pix_ctrl < end_pix_ctrl) + cur_reg_end = next_pix_ctrl->left; + else + cur_reg_end = disp_end; + + /* Render stuff */ + while (x < disp_end) { + rle_code = gstspu_vobsub_get_rle_code (state, rle_offset); + next_x = rle_end_x (rle_code, x, disp_end); + + /* Now draw the run between [x,next_x), crossing palette regions as needed */ + while (x < next_x) { + run_end = MIN (next_x, cur_reg_end); + + if (G_LIKELY (x < run_end)) { + colour = &cur_pix_ctrl->pal_cache[rle_code & 3]; + gstspu_vobsub_draw_rle_run (state, x, run_end, colour); + x = run_end; + } + + if (x >= cur_reg_end) { + /* Advance to next region */ + cur_pix_ctrl = next_pix_ctrl; + next_pix_ctrl++; + + if (next_pix_ctrl < end_pix_ctrl) + cur_reg_end = next_pix_ctrl->left; + else + cur_reg_end = disp_end; + } + } + } +} + +static void +gstspu_vobsub_blend_comp_buffers (SpuState * state, guint8 * planes[3]) +{ + state->comp_left = state->vobsub.disp_rect.left; + state->comp_right = + MAX (state->vobsub.comp_last_x[0], state->vobsub.comp_last_x[1]); + + gstspu_blend_comp_buffers (state, planes); +} + +void +gstspu_vobsub_clear_comp_buffers (SpuState * state) +{ + state->comp_left = state->vobsub.disp_rect.left; + state->comp_right = state->vobsub.disp_rect.right; + + gstspu_clear_comp_buffers (state); + + state->vobsub.comp_last_x[0] = -1; + state->vobsub.comp_last_x[1] = -1; +} + +void +gstspu_vobsub_render (GstDVDSpu * dvdspu, GstBuffer * buf) +{ + SpuState *state = &dvdspu->spu_state; + guint8 *planes[3]; /* YUV frame pointers */ + gint y, last_y; + + /* Set up our initial state */ + if (G_UNLIKELY (state->vobsub.pix_buf == NULL)) + return; + + /* Store the start of each plane */ + planes[0] = GST_BUFFER_DATA (buf); + planes[1] = planes[0] + (state->Y_height * state->Y_stride); + planes[2] = planes[1] + (state->UV_height * state->UV_stride); + + /* Sanity check */ + g_return_if_fail (planes[2] + (state->UV_height * state->UV_stride) <= + GST_BUFFER_DATA (buf) + GST_BUFFER_SIZE (buf)); + + GST_DEBUG ("Rendering SPU. disp_rect %d,%d to %d,%d. hl_rect %d,%d to %d,%d", + state->vobsub.disp_rect.left, state->vobsub.disp_rect.top, + state->vobsub.disp_rect.right, state->vobsub.disp_rect.bottom, + state->vobsub.hl_rect.left, state->vobsub.hl_rect.top, + state->vobsub.hl_rect.right, state->vobsub.hl_rect.bottom); + + GST_DEBUG ("vid_disp %d,%d", state->vid_width, state->vid_height); + + /* When reading RLE data, we track the offset in nibbles... */ + state->vobsub.cur_offsets[0] = state->vobsub.pix_data[0] * 2; + state->vobsub.cur_offsets[1] = state->vobsub.pix_data[1] * 2; + state->vobsub.max_offset = GST_BUFFER_SIZE (state->vobsub.pix_buf) * 2; + + /* Update all the palette caches */ + gstspu_vobsub_update_palettes (dvdspu, state); + + /* Set up HL or Change Color & Contrast rect tracking */ + if (state->vobsub.hl_rect.top != -1) { + state->vobsub.cur_chg_col = &state->vobsub.hl_ctrl_i; + state->vobsub.cur_chg_col_end = state->vobsub.cur_chg_col + 1; + } else if (state->vobsub.n_line_ctrl_i > 0) { + state->vobsub.cur_chg_col = state->vobsub.line_ctrl_i; + state->vobsub.cur_chg_col_end = + state->vobsub.cur_chg_col + state->vobsub.n_line_ctrl_i; + } else + state->vobsub.cur_chg_col = NULL; + + /* We start rendering from the first line of the display rect */ + y = state->vobsub.disp_rect.top; + /* start_y is always an even number and we render lines in pairs from there, + * accumulating 2 lines of chroma then blending it. We might need to render a + * single line at the end if the display rect ends on an even line too. */ + last_y = (state->vobsub.disp_rect.bottom - 1) & ~(0x01); + + /* center the image when display rectangle exceeds the video width */ + if (state->vid_width < state->vobsub.disp_rect.right) { + gint diff, disp_width; + + disp_width = state->vobsub.disp_rect.left - state->vobsub.disp_rect.right; + diff = (disp_width - state->vid_width) / 2; + + /* fixme, this is not used yet */ + state->vobsub.clip_rect.left = state->vobsub.disp_rect.left + diff; + state->vobsub.clip_rect.right = state->vobsub.disp_rect.right - diff; + + GST_DEBUG ("clipping width to %d,%d", state->vobsub.clip_rect.left, + state->vobsub.clip_rect.right); + } else { + state->vobsub.clip_rect.left = state->vobsub.disp_rect.left; + state->vobsub.clip_rect.right = state->vobsub.disp_rect.right; + } + + /* for the height, chop off the bottom bits of the diplay rectangle because we + * assume the picture is in the lower part. We should better check where it + * is and do something more clever. */ + state->vobsub.clip_rect.bottom = state->vobsub.disp_rect.bottom; + if (state->vid_height < state->vobsub.disp_rect.bottom) { + state->vobsub.clip_rect.top = + state->vobsub.disp_rect.bottom - state->vid_height; + GST_DEBUG ("clipping height to %d,%d", state->vobsub.clip_rect.top, + state->vobsub.clip_rect.bottom); + } else { + state->vobsub.clip_rect.top = state->vobsub.disp_rect.top; + /* Update our plane references to the first line of the disp_rect */ + planes[0] += state->Y_stride * y; + planes[1] += state->UV_stride * (y / 2); + planes[2] += state->UV_stride * (y / 2); + } + + for (state->vobsub.cur_Y = y; state->vobsub.cur_Y <= last_y; + state->vobsub.cur_Y++) { + gboolean clip; + + clip = (state->vobsub.cur_Y < state->vobsub.clip_rect.top + || state->vobsub.cur_Y > state->vobsub.clip_rect.bottom); + + /* Reset the compositing buffer */ + gstspu_clear_comp_buffers (state); + /* Render even line */ + state->vobsub.comp_last_x_ptr = state->vobsub.comp_last_x; + gstspu_vobsub_render_line (state, planes, &state->vobsub.cur_offsets[0]); + if (!clip) { + /* Advance the luminance output pointer */ + planes[0] += state->Y_stride; + } + state->vobsub.cur_Y++; + + /* Render odd line */ + state->vobsub.comp_last_x_ptr = state->vobsub.comp_last_x + 1; + gstspu_vobsub_render_line (state, planes, &state->vobsub.cur_offsets[1]); + /* Blend the accumulated UV compositing buffers onto the output */ + gstspu_vobsub_blend_comp_buffers (state, planes); + + if (!clip) { + /* Update all the output pointers */ + planes[0] += state->Y_stride; + planes[1] += state->UV_stride; + planes[2] += state->UV_stride; + } + } + if (state->vobsub.cur_Y == state->vobsub.disp_rect.bottom) { + g_assert ((state->vobsub.disp_rect.bottom & 0x01) == 0); + + /* Render a remaining lone last even line. y already has the correct value + * after the above loop exited. */ + gstspu_clear_comp_buffers (state); + state->vobsub.comp_last_x_ptr = state->vobsub.comp_last_x; + gstspu_vobsub_render_line (state, planes, &state->vobsub.cur_offsets[0]); + gstspu_vobsub_blend_comp_buffers (state, planes); + } + + /* for debugging purposes, draw a faint rectangle at the edges of the disp_rect */ +#if 0 + do { + guint8 *cur; + gint16 pos; + + cur = GST_BUFFER_DATA (buf) + state->Y_stride * state->vobsub.disp_rect.top; + for (pos = state->vobsub.disp_rect.left + 1; + pos < state->vobsub.disp_rect.right; pos++) + cur[pos] = (cur[pos] / 2) + 0x8; + cur = + GST_BUFFER_DATA (buf) + + state->Y_stride * state->vobsub.disp_rect.bottom; + for (pos = state->vobsub.disp_rect.left + 1; + pos < state->vobsub.disp_rect.right; pos++) + cur[pos] = (cur[pos] / 2) + 0x8; + cur = GST_BUFFER_DATA (buf) + state->Y_stride * state->vobsub.disp_rect.top; + for (pos = state->vobsub.disp_rect.top; + pos <= state->vobsub.disp_rect.bottom; pos++) { + cur[state->vobsub.disp_rect.left] = + (cur[state->vobsub.disp_rect.left] / 2) + 0x8; + cur[state->vobsub.disp_rect.right] = + (cur[state->vobsub.disp_rect.right] / 2) + 0x8; + cur += state->Y_stride; + } + } while (0); +#endif + /* For debugging purposes, draw a faint rectangle around the highlight rect */ +#if 0 + if (state->hl_rect.top != -1) { + guint8 *cur; + gint16 pos; + + cur = GST_BUFFER_DATA (buf) + state->Y_stride * state->hl_rect.top; + for (pos = state->hl_rect.left + 1; pos < state->hl_rect.right; pos++) + cur[pos] = (cur[pos] / 2) + 0x8; + cur = GST_BUFFER_DATA (buf) + state->Y_stride * state->hl_rect.bottom; + for (pos = state->hl_rect.left + 1; pos < state->hl_rect.right; pos++) + cur[pos] = (cur[pos] / 2) + 0x8; + cur = GST_BUFFER_DATA (buf) + state->Y_stride * state->hl_rect.top; + for (pos = state->hl_rect.top; pos <= state->hl_rect.bottom; pos++) { + cur[state->hl_rect.left] = (cur[state->hl_rect.left] / 2) + 0x8; + cur[state->hl_rect.right] = (cur[state->hl_rect.right] / 2) + 0x8; + cur += state->Y_stride; + } + } +#endif +} diff --git a/gst/dvdspu/gstspu-vobsub.c b/gst/dvdspu/gstspu-vobsub.c index c13d9ab0..1757feb7 100644 --- a/gst/dvdspu/gstspu-vobsub.c +++ b/gst/dvdspu/gstspu-vobsub.c @@ -36,6 +36,21 @@ GST_DEBUG_CATEGORY_EXTERN (dvdspu_debug); /* Convert an STM offset in the SPU sequence to a GStreamer timestamp */ #define STM_TO_GST(stm) ((GST_MSECOND * 1024 * (stm)) / 90) +typedef enum SpuVobsubCmd SpuVobsubCmd; + +enum SpuVobsubCmd +{ + SPU_CMD_FSTA_DSP = 0x00, /* Forced Display */ + SPU_CMD_DSP = 0x01, /* Display Start */ + SPU_CMD_STP_DSP = 0x02, /* Display Off */ + SPU_CMD_SET_COLOR = 0x03, /* Set the color indexes for the palette */ + SPU_CMD_SET_ALPHA = 0x04, /* Set the alpha indexes for the palette */ + SPU_CMD_SET_DAREA = 0x05, /* Set the display area for the SPU */ + SPU_CMD_DSPXA = 0x06, /* Pixel data addresses */ + SPU_CMD_CHG_COLCON = 0x07, /* Change Color & Contrast */ + SPU_CMD_END = 0xff +}; + static void gst_dvd_spu_parse_chg_colcon (GstDVDSpu * dvdspu, guint8 * data, guint8 * end) { @@ -45,10 +60,10 @@ gst_dvd_spu_parse_chg_colcon (GstDVDSpu * dvdspu, guint8 * data, guint8 * end) gint16 i; /* Clear any existing chg colcon info */ - state->n_line_ctrl_i = 0; - if (state->line_ctrl_i != NULL) { - g_free (state->line_ctrl_i); - state->line_ctrl_i = NULL; + state->vobsub.n_line_ctrl_i = 0; + if (state->vobsub.line_ctrl_i != NULL) { + g_free (state->vobsub.line_ctrl_i); + state->vobsub.line_ctrl_i = NULL; } GST_DEBUG_OBJECT (dvdspu, "Change Color & Contrast. Pixel data = %d bytes", (gint16) (end - data)); @@ -75,12 +90,12 @@ gst_dvd_spu_parse_chg_colcon (GstDVDSpu * dvdspu, guint8 * data, guint8 * end) n_entries++; } - state->n_line_ctrl_i = n_entries; - state->line_ctrl_i = g_new (SpuLineCtrlI, n_entries); + state->vobsub.n_line_ctrl_i = n_entries; + state->vobsub.line_ctrl_i = g_new (SpuVobsubLineCtrlI, n_entries); cur = data; for (i = 0; i < n_entries; i++) { - SpuLineCtrlI *cur_line_ctrl = state->line_ctrl_i + i; + SpuVobsubLineCtrlI *cur_line_ctrl = state->vobsub.line_ctrl_i + i; guint8 n_changes = CLAMP ((cur[2] >> 4), 1, 8); guint8 c; @@ -93,7 +108,7 @@ gst_dvd_spu_parse_chg_colcon (GstDVDSpu * dvdspu, guint8 * data, guint8 * end) cur += 4; for (c = 0; c < n_changes; c++) { - SpuPixCtrlI *cur_pix_ctrl = cur_line_ctrl->pix_ctrl_i + c; + SpuVobsubPixCtrlI *cur_pix_ctrl = cur_line_ctrl->pix_ctrl_i + c; cur_pix_ctrl->left = ((cur[0] << 8) & 0x300) | cur[1]; cur_pix_ctrl->palette = GST_READ_UINT32_BE (cur + 2); @@ -134,17 +149,17 @@ gst_dvd_spu_exec_cmd_blk (GstDVDSpu * dvdspu, guint8 * data, guint8 * end) if (G_UNLIKELY (data + 3 >= end)) return; /* Invalid SET_COLOR cmd at the end of the blk */ - state->main_idx[3] = data[1] >> 4; - state->main_idx[2] = data[1] & 0x0f; - state->main_idx[1] = data[2] >> 4; - state->main_idx[0] = data[2] & 0x0f; + state->vobsub.main_idx[3] = data[1] >> 4; + state->vobsub.main_idx[2] = data[1] & 0x0f; + state->vobsub.main_idx[1] = data[2] >> 4; + state->vobsub.main_idx[0] = data[2] & 0x0f; - state->main_pal_dirty = TRUE; + state->vobsub.main_pal_dirty = TRUE; GST_DEBUG_OBJECT (dvdspu, " Set Color bg %u pattern %u emph-1 %u emph-2 %u", - state->main_idx[0], state->main_idx[1], state->main_idx[2], - state->main_idx[3]); + state->vobsub.main_idx[0], state->vobsub.main_idx[1], + state->vobsub.main_idx[2], state->vobsub.main_idx[3]); data += 3; break; } @@ -152,22 +167,22 @@ gst_dvd_spu_exec_cmd_blk (GstDVDSpu * dvdspu, guint8 * data, guint8 * end) if (G_UNLIKELY (data + 3 >= end)) return; /* Invalid SET_ALPHA cmd at the end of the blk */ - state->main_alpha[3] = data[1] >> 4; - state->main_alpha[2] = data[1] & 0x0f; - state->main_alpha[1] = data[2] >> 4; - state->main_alpha[0] = data[2] & 0x0f; + state->vobsub.main_alpha[3] = data[1] >> 4; + state->vobsub.main_alpha[2] = data[1] & 0x0f; + state->vobsub.main_alpha[1] = data[2] >> 4; + state->vobsub.main_alpha[0] = data[2] & 0x0f; - state->main_pal_dirty = TRUE; + state->vobsub.main_pal_dirty = TRUE; GST_DEBUG_OBJECT (dvdspu, " Set Alpha bg %u pattern %u emph-1 %u emph-2 %u", - state->main_alpha[0], state->main_alpha[1], state->main_alpha[2], - state->main_alpha[3]); + state->vobsub.main_alpha[0], state->vobsub.main_alpha[1], + state->vobsub.main_alpha[2], state->vobsub.main_alpha[3]); data += 3; break; } case SPU_CMD_SET_DAREA:{ - SpuRect *r = &state->disp_rect; + SpuRect *r = &state->vobsub.disp_rect; if (G_UNLIKELY (data + 7 >= end)) return; /* Invalid SET_DAREA cmd at the end of the blk */ @@ -188,14 +203,14 @@ gst_dvd_spu_exec_cmd_blk (GstDVDSpu * dvdspu, guint8 * data, guint8 * end) if (G_UNLIKELY (data + 5 >= end)) return; /* Invalid SET_DSPXE cmd at the end of the blk */ - state->pix_data[0] = GST_READ_UINT16_BE (data + 1); - state->pix_data[1] = GST_READ_UINT16_BE (data + 3); - /* Store a reference to the current command buffer, as that's where + state->vobsub.pix_data[0] = GST_READ_UINT16_BE (data + 1); + state->vobsub.pix_data[1] = GST_READ_UINT16_BE (data + 3); + /* Store a reference to the current command buffer, as that's where * we'll need to take our pixel data from */ - gst_buffer_replace (&state->pix_buf, state->buf); + gst_buffer_replace (&state->vobsub.pix_buf, state->vobsub.buf); GST_DEBUG_OBJECT (dvdspu, " Set Pixel Data Offsets top: %u bot: %u", - state->pix_data[0], state->pix_data[1]); + state->vobsub.pix_data[0], state->vobsub.pix_data[1]); data += 5; break; @@ -214,7 +229,7 @@ gst_dvd_spu_exec_cmd_blk (GstDVDSpu * dvdspu, guint8 * data, guint8 * end) return; /* Invalid CHG_COLCON cmd at the end of the blk */ gst_dvd_spu_parse_chg_colcon (dvdspu, data + 2, data + field_size); - state->line_ctrl_i_pal_dirty = TRUE; + state->vobsub.line_ctrl_i_pal_dirty = TRUE; data += field_size; break; } @@ -232,8 +247,8 @@ gst_dvd_spu_finish_spu_buf (GstDVDSpu * dvdspu) { SpuState *state = &dvdspu->spu_state; - state->next_ts = state->base_ts = GST_CLOCK_TIME_NONE; - gst_buffer_replace (&state->buf, NULL); + state->next_ts = state->vobsub.base_ts = GST_CLOCK_TIME_NONE; + gst_buffer_replace (&state->vobsub.buf, NULL); GST_DEBUG_OBJECT (dvdspu, "Finished SPU buffer"); } @@ -250,11 +265,11 @@ gst_dvd_spu_setup_cmd_blk (GstDVDSpu * dvdspu, guint16 cmd_blk_offset, return FALSE; /* No valid command block to read */ delay = GST_READ_UINT16_BE (cmd_blk); - state->next_ts = state->base_ts + STM_TO_GST (delay); - state->cur_cmd_blk = cmd_blk_offset; + state->next_ts = state->vobsub.base_ts + STM_TO_GST (delay); + state->vobsub.cur_cmd_blk = cmd_blk_offset; GST_DEBUG_OBJECT (dvdspu, "Setup CMD Block @ %u with TS %" GST_TIME_FORMAT, - state->cur_cmd_blk, GST_TIME_ARGS (state->next_ts)); + state->vobsub.cur_cmd_blk, GST_TIME_ARGS (state->next_ts)); return TRUE; } @@ -304,36 +319,37 @@ gst_dvd_spu_dump_dcsq (GstDVDSpu * dvdspu, #endif void -gst_dvd_spu_handle_new_vobsub_buf (GstDVDSpu * dvdspu, SpuPacket * packet) +gstspu_vobsub_handle_new_buf (GstDVDSpu * dvdspu, GstClockTime event_ts, + GstBuffer * buf) { guint8 *start, *end; SpuState *state = &dvdspu->spu_state; #if DUMP_DCSQ - gst_dvd_spu_dump_dcsq (dvdspu, packet->event_ts, packet->buf); + gst_dvd_spu_dump_dcsq (dvdspu, event_ts, buf); #endif - if (G_UNLIKELY (GST_BUFFER_SIZE (packet->buf) < 4)) + if (G_UNLIKELY (GST_BUFFER_SIZE (buf) < 4)) goto invalid; - if (state->buf != NULL) { - gst_buffer_unref (state->buf); - state->buf = NULL; + if (state->vobsub.buf != NULL) { + gst_buffer_unref (state->vobsub.buf); + state->vobsub.buf = NULL; } - state->buf = packet->buf; - state->base_ts = packet->event_ts; + state->vobsub.buf = buf; + state->vobsub.base_ts = event_ts; - start = GST_BUFFER_DATA (state->buf); - end = start + GST_BUFFER_SIZE (state->buf); + start = GST_BUFFER_DATA (state->vobsub.buf); + end = start + GST_BUFFER_SIZE (state->vobsub.buf); /* Configure the first command block in this buffer as our initial blk */ - state->cur_cmd_blk = GST_READ_UINT16_BE (start + 2); - gst_dvd_spu_setup_cmd_blk (dvdspu, state->cur_cmd_blk, start, end); + state->vobsub.cur_cmd_blk = GST_READ_UINT16_BE (start + 2); + gst_dvd_spu_setup_cmd_blk (dvdspu, state->vobsub.cur_cmd_blk, start, end); /* Clear existing chg-colcon info */ - state->n_line_ctrl_i = 0; - if (state->line_ctrl_i != NULL) { - g_free (state->line_ctrl_i); - state->line_ctrl_i = NULL; + state->vobsub.n_line_ctrl_i = 0; + if (state->vobsub.line_ctrl_i != NULL) { + g_free (state->vobsub.line_ctrl_i); + state->vobsub.line_ctrl_i = NULL; } return; @@ -342,36 +358,156 @@ invalid: gst_dvd_spu_finish_spu_buf (dvdspu); } -void -gst_dvdspu_vobsub_execute_event (GstDVDSpu * dvdspu) +gboolean +gstspu_vobsub_execute_event (GstDVDSpu * dvdspu) { guint8 *start, *cmd_blk, *end; guint16 next_blk; SpuState *state = &dvdspu->spu_state; + if (state->vobsub.buf == NULL) + return FALSE; + GST_DEBUG_OBJECT (dvdspu, "Executing cmd blk with TS %" GST_TIME_FORMAT - " @ offset %u", GST_TIME_ARGS (state->next_ts), state->cur_cmd_blk); + " @ offset %u", GST_TIME_ARGS (state->next_ts), + state->vobsub.cur_cmd_blk); - start = GST_BUFFER_DATA (state->buf); - end = start + GST_BUFFER_SIZE (state->buf); + start = GST_BUFFER_DATA (state->vobsub.buf); + end = start + GST_BUFFER_SIZE (state->vobsub.buf); - cmd_blk = start + state->cur_cmd_blk; + cmd_blk = start + state->vobsub.cur_cmd_blk; if (G_UNLIKELY (cmd_blk + 5 >= end)) { /* Invalid. Finish the buffer and loop again */ gst_dvd_spu_finish_spu_buf (dvdspu); - return; + return FALSE; } gst_dvd_spu_exec_cmd_blk (dvdspu, cmd_blk + 4, end); next_blk = GST_READ_UINT16_BE (cmd_blk + 2); - if (next_blk != state->cur_cmd_blk) { + if (next_blk != state->vobsub.cur_cmd_blk) { /* Advance to the next block of commands */ gst_dvd_spu_setup_cmd_blk (dvdspu, next_blk, start, end); } else { /* Next Block points to the current block, so we're finished with this * SPU buffer */ gst_dvd_spu_finish_spu_buf (dvdspu); + return FALSE; + } + + return TRUE; +} + +gboolean +gstspu_vobsub_handle_dvd_event (GstDVDSpu * dvdspu, GstEvent * event) +{ + const gchar *event_type; + const GstStructure *structure = gst_event_get_structure (event); + SpuState *state = &dvdspu->spu_state; + gboolean hl_change = FALSE; + + event_type = gst_structure_get_string (structure, "event"); + + if (strcmp (event_type, "dvd-spu-clut-change") == 0) { + gchar prop_name[32]; + gint i; + gint entry; + + for (i = 0; i < 16; i++) { + g_snprintf (prop_name, 32, "clut%02d", i); + if (!gst_structure_get_int (structure, prop_name, &entry)) + entry = 0; + state->vobsub.current_clut[i] = (guint32) entry; + } + + state->vobsub.main_pal_dirty = TRUE; + state->vobsub.hl_pal_dirty = TRUE; + state->vobsub.line_ctrl_i_pal_dirty = TRUE; + hl_change = TRUE; + } else if (strcmp (event_type, "dvd-spu-highlight") == 0) { + gint val; + + if (gst_structure_get_int (structure, "palette", &val)) { + state->vobsub.hl_idx[3] = ((guint32) (val) >> 28) & 0x0f; + state->vobsub.hl_idx[2] = ((guint32) (val) >> 24) & 0x0f; + state->vobsub.hl_idx[1] = ((guint32) (val) >> 20) & 0x0f; + state->vobsub.hl_idx[0] = ((guint32) (val) >> 16) & 0x0f; + + state->vobsub.hl_alpha[3] = ((guint32) (val) >> 12) & 0x0f; + state->vobsub.hl_alpha[2] = ((guint32) (val) >> 8) & 0x0f; + state->vobsub.hl_alpha[1] = ((guint32) (val) >> 4) & 0x0f; + state->vobsub.hl_alpha[0] = ((guint32) (val) >> 0) & 0x0f; + + state->vobsub.hl_pal_dirty = TRUE; + } + if (gst_structure_get_int (structure, "sx", &val)) + state->vobsub.hl_rect.left = (gint16) val; + if (gst_structure_get_int (structure, "sy", &val)) + state->vobsub.hl_rect.top = (gint16) val; + if (gst_structure_get_int (structure, "ex", &val)) + state->vobsub.hl_rect.right = (gint16) val; + if (gst_structure_get_int (structure, "ey", &val)) + state->vobsub.hl_rect.bottom = (gint16) val; + + GST_INFO_OBJECT (dvdspu, "Highlight rect is now (%d,%d) to (%d,%d)", + state->vobsub.hl_rect.left, state->vobsub.hl_rect.top, + state->vobsub.hl_rect.right, state->vobsub.hl_rect.bottom); + hl_change = TRUE; + } else if (strcmp (event_type, "dvd-spu-reset-highlight") == 0) { + if (state->vobsub.hl_rect.top != -1 || state->vobsub.hl_rect.bottom != -1) + hl_change = TRUE; + state->vobsub.hl_rect.top = -1; + state->vobsub.hl_rect.bottom = -1; + GST_INFO_OBJECT (dvdspu, "Highlight off"); + } else if (strcmp (event_type, "dvd-set-subpicture-track") == 0) { + gboolean forced_only; + + if (gst_structure_get_boolean (structure, "forced-only", &forced_only)) { + gboolean was_forced = (state->flags & SPU_STATE_FORCED_ONLY); + + if (forced_only) + state->flags |= SPU_STATE_FORCED_ONLY; + else + state->flags &= ~(SPU_STATE_FORCED_ONLY); + + if (was_forced != forced_only) + hl_change = TRUE; + } + } + + gst_event_unref (event); + + return hl_change; +} + +void +gstspu_vobsub_flush (GstDVDSpu * dvdspu) +{ + SpuState *state = &dvdspu->spu_state; + + if (state->vobsub.buf) { + gst_buffer_unref (state->vobsub.buf); + state->vobsub.buf = NULL; + } + if (state->vobsub.pix_buf) { + gst_buffer_unref (state->vobsub.pix_buf); + state->vobsub.pix_buf = NULL; + } + + state->vobsub.base_ts = GST_CLOCK_TIME_NONE; + state->vobsub.pix_data[0] = 0; + state->vobsub.pix_data[1] = 0; + + state->vobsub.hl_rect.top = -1; + state->vobsub.hl_rect.bottom = -1; + + state->vobsub.disp_rect.top = -1; + state->vobsub.disp_rect.bottom = -1; + + state->vobsub.n_line_ctrl_i = 0; + if (state->vobsub.line_ctrl_i != NULL) { + g_free (state->vobsub.line_ctrl_i); + state->vobsub.line_ctrl_i = NULL; } } diff --git a/gst/dvdspu/gstspu-vobsub.h b/gst/dvdspu/gstspu-vobsub.h index f600e7d7..9b4196bc 100644 --- a/gst/dvdspu/gstspu-vobsub.h +++ b/gst/dvdspu/gstspu-vobsub.h @@ -16,10 +16,95 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + #ifndef __GSTSPU_VOBSUB_H__ #define __GSTSPU_VOBSUB_H__ -void gst_dvd_spu_handle_new_vobsub_buf (GstDVDSpu * dvdspu, SpuPacket * packet); -void gst_dvdspu_vobsub_execute_event (GstDVDSpu *dvdspu); +#include "gstspu-common.h" + +typedef struct SpuVobsubState SpuVobsubState; +typedef struct SpuVobsubPixCtrlI SpuVobsubPixCtrlI; +typedef struct SpuVobsubLineCtrlI SpuVobsubLineCtrlI; + +/* Pixel Control Info from a Change Color Contrast command */ +struct SpuVobsubPixCtrlI { + gint16 left; + guint32 palette; + + /* Pre-multiplied palette values, updated as + * needed */ + SpuColour pal_cache[4]; +}; + +struct SpuVobsubLineCtrlI { + guint8 n_changes; /* 1 to 8 */ + SpuVobsubPixCtrlI pix_ctrl_i[8]; + + gint16 top; + gint16 bottom; +}; + +struct SpuVobsubState { + GstClockTime base_ts; /* base TS for cmd blk delays in running time */ + GstBuffer *buf; /* Current SPU packet we're executing commands from */ + guint16 cur_cmd_blk; /* Offset into the buf for the current cmd block */ + + /* Top + Bottom field offsets in the buffer. 0 = not set */ + guint16 pix_data[2]; + GstBuffer *pix_buf; /* Current SPU packet the pix_data references */ + + SpuRect disp_rect; + SpuRect clip_rect; + SpuRect hl_rect; + + guint32 current_clut[16]; /* Colour lookup table from incoming events */ + + guint8 main_idx[4]; /* Indices for current main palette */ + guint8 main_alpha[4]; /* Alpha values for main palette */ + + guint8 hl_idx[4]; /* Indices for current highlight palette */ + guint8 hl_alpha[4]; /* Alpha values for highlight palette */ + + /* Pre-multiplied colour palette for the main palette */ + SpuColour main_pal[4]; + gboolean main_pal_dirty; + + /* Line control info for rendering the highlight palette */ + SpuVobsubLineCtrlI hl_ctrl_i; + gboolean hl_pal_dirty; /* Indicates that the HL palette info needs refreshing */ + + /* LineCtrlI Info from a Change Color & Contrast command */ + SpuVobsubLineCtrlI *line_ctrl_i; + gint16 n_line_ctrl_i; + gboolean line_ctrl_i_pal_dirty; /* Indicates that the palettes for the line_ctrl_i + * need recalculating */ + + /* Rendering state vars below */ + gint16 comp_last_x[2]; /* Maximum X values we rendered into the comp buffer (odd & even) */ + gint16 *comp_last_x_ptr; /* Ptr to the current comp_last_x value to be updated by the render */ + + /* Current Y Position */ + gint16 cur_Y; + + /* Current offset in nibbles into the pix_data */ + guint16 cur_offsets[2]; + guint16 max_offset; + + /* current ChgColCon Line Info */ + SpuVobsubLineCtrlI *cur_chg_col; + SpuVobsubLineCtrlI *cur_chg_col_end; + + /* Output position tracking */ + guint8 *out_Y; + guint32 *out_U; + guint32 *out_V; + guint32 *out_A; +}; + +void gstspu_vobsub_handle_new_buf (GstDVDSpu * dvdspu, GstClockTime event_ts, GstBuffer *buf); +gboolean gstspu_vobsub_execute_event (GstDVDSpu *dvdspu); +void gstspu_vobsub_render (GstDVDSpu *dvdspu, GstBuffer *buf); +gboolean gstspu_vobsub_handle_dvd_event (GstDVDSpu *dvdspu, GstEvent *event); +void gstspu_vobsub_flush (GstDVDSpu *dvdspu); #endif -- cgit v1.2.1 From d850556ffe9362a98c20e4037f2b7c034016fd49 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Tue, 26 May 2009 17:19:35 +0100 Subject: Automatic update of common submodule From 6ab11d1 to c572721 --- common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common b/common index 6ab11d17..c5727215 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 6ab11d17cb8e4d1ed755da7accac9630d567a097 +Subproject commit c57272152d5c40617fab305d839db1b1fefe0ea0 -- cgit v1.2.1 From 606daecf70a6c197af06bcec2f2f3551ea2508e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Tue, 26 May 2009 18:43:18 +0100 Subject: dvdspu: fix printf formats to avoid compiler warnings --- gst/dvdspu/gstspu-pgs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gst/dvdspu/gstspu-pgs.c b/gst/dvdspu/gstspu-pgs.c index a79e694e..d1d4de18 100644 --- a/gst/dvdspu/gstspu-pgs.c +++ b/gst/dvdspu/gstspu-pgs.c @@ -435,7 +435,7 @@ parse_presentation_segment (GstDVDSpu * dvdspu, guint8 type, guint8 * payload, } if (payload != end) { - g_warning ("PGS Composition Object: %d bytes not consumed", end - payload); + g_warning ("PGS Composition Object: %ld bytes not consumed", end - payload); dump_bytes (payload, end - payload); } @@ -495,7 +495,7 @@ parse_set_palette (GstDVDSpu * dvdspu, guint8 type, guint8 * payload, #endif if (payload != end) { - g_warning ("PGS Set Palette: %d bytes not consumed", end - payload); + g_warning ("PGS Set Palette: %ld bytes not consumed", end - payload); dump_bytes (payload, end - payload); } @@ -529,7 +529,7 @@ parse_set_window (GstDVDSpu * dvdspu, guint8 type, guint8 * payload, state->pgs.win_h); if (payload != end) { - g_warning ("PGS Set Window: %d bytes not consumed", end - payload); + g_warning ("PGS Set Window: %ld bytes not consumed", end - payload); dump_bytes (payload, end - payload); } @@ -590,7 +590,7 @@ parse_set_object_data (GstDVDSpu * dvdspu, guint8 type, guint8 * payload, dump_rle_data (dvdspu, obj->rle_data, obj->rle_data_size); if (payload != end) { - g_warning ("PGS Set Object Data: %d bytes not consumed", end - payload); + g_warning ("PGS Set Object Data: %ld bytes not consumed", end - payload); dump_bytes (payload, end - payload); } -- cgit v1.2.1 From b46059291736f78e7a86bb5bd1e91c9a6025113f Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Tue, 26 May 2009 18:47:32 +0100 Subject: mpegdemux: Only treat streams from 0xa0 to 0xaf as LPCM, not 0xa0..0xbf Don't treat some streams (Private Stream 2) as LPCM when they're not. Fixes playback of files that have private streams in them now that the PES filter emits such packets. --- gst/mpegdemux/gstmpegdemux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/mpegdemux/gstmpegdemux.c b/gst/mpegdemux/gstmpegdemux.c index 3f298fb6..ce1d0978 100644 --- a/gst/mpegdemux/gstmpegdemux.c +++ b/gst/mpegdemux/gstmpegdemux.c @@ -1414,7 +1414,7 @@ gst_flups_demux_reset_psm (GstFluPSDemux * demux) FILL_TYPE (0x40, 0x7f, -1); FILL_TYPE (0x80, 0x87, ST_PS_AUDIO_AC3); FILL_TYPE (0x88, 0x9f, ST_PS_AUDIO_DTS); - FILL_TYPE (0xa0, 0xbf, ST_PS_AUDIO_LPCM); + FILL_TYPE (0xa0, 0xaf, ST_PS_AUDIO_LPCM); FILL_TYPE (0xbd, 0xbd, -1); FILL_TYPE (0xc0, 0xdf, ST_AUDIO_MPEG1); FILL_TYPE (0xe0, 0xef, ST_GST_VIDEO_MPEG1_OR_2); -- cgit v1.2.1 From 8f70498c898a65d0938e3e104e91662ff5b693c3 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Tue, 26 May 2009 19:38:54 +0100 Subject: resindvd: LPCM streams are only from 0xa0 to 0xaf. Fix the same bug as the previous commit, but in resindvd's copy of mpegdemux. --- ext/resindvd/gstmpegdemux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/resindvd/gstmpegdemux.c b/ext/resindvd/gstmpegdemux.c index 281b13f3..5ab26107 100644 --- a/ext/resindvd/gstmpegdemux.c +++ b/ext/resindvd/gstmpegdemux.c @@ -1162,7 +1162,7 @@ gst_flups_demux_reset_psm (GstFluPSDemux * demux) FILL_TYPE (0x40, 0x7f, -1); FILL_TYPE (0x80, 0x87, ST_PS_AUDIO_AC3); FILL_TYPE (0x88, 0x9f, ST_PS_AUDIO_DTS); - FILL_TYPE (0xa0, 0xbf, ST_PS_AUDIO_LPCM); + FILL_TYPE (0xa0, 0xaf, ST_PS_AUDIO_LPCM); FILL_TYPE (0xbd, 0xbd, -1); FILL_TYPE (0xc0, 0xdf, ST_AUDIO_MPEG1); FILL_TYPE (0xe0, 0xef, ST_GST_VIDEO_MPEG1_OR_2); -- cgit v1.2.1