handle new media

Original commit message from CVS:
handle new media
parent 5c315f3b
2004-08-27 Thomas Vander Stichele <thomas at apestaart dot org>
patch by: Zaheer Abbas Merali
* ext/ogg/gstoggmux.c:
* ext/vorbis/vorbisenc.c:
* ext/vorbis/vorbisenc.h:
handle NEWMEDIA
2004-08-26 Arwed v. Merkatz <v.merkatz@gmx.net>
* gst/matroska/ebml-write.c: (gst_ebml_write_float),
......
......@@ -100,6 +100,7 @@ struct _GstOggMux
GstOggPad *delta_pad; /* when a delta frame is detected on a stream, we mark
pages as delta frames up to the page that has the
keyframe */
guint16 newmediacount;
};
typedef enum
......@@ -238,6 +239,7 @@ gst_ogg_mux_get_sink_event_masks (GstPad * pad)
{
static const GstEventMask gst_ogg_mux_sink_event_masks[] = {
{GST_EVENT_EOS, 0},
{GST_EVENT_DISCONTINUOUS, 0},
{0,}
};
......@@ -268,7 +270,7 @@ gst_ogg_mux_init (GstOggMux * ogg_mux)
ogg_mux->max_page_delay = DEFAULT_MAX_PAGE_DELAY;
ogg_mux->delta_pad = NULL;
ogg_mux->newmediacount = 0;
gst_element_set_loop_function (GST_ELEMENT (ogg_mux), gst_ogg_mux_loop);
}
......@@ -429,6 +431,18 @@ gst_ogg_mux_next_buffer (GstOggPad * pad)
{
gint64 value = 0;
if (GST_EVENT_DISCONT_NEW_MEDIA (event)) {
/* only handle if its not first new media event */
if (ogg_mux->newmediacount++ > 0) {
ogg_mux->next_ts = 0;
ogg_mux->offset = 0;
ogg_mux->pulling = NULL;
pad->offset = 0;
GST_DEBUG_OBJECT (ogg_mux, "received new media event");
gst_pad_event_default (pad->pad, event);
break;
}
}
if (gst_event_discont_get_value (event, GST_FORMAT_TIME, &value)) {
GST_DEBUG_OBJECT (ogg_mux,
"got discont of %" G_GUINT64_FORMAT " on pad %s:%s",
......
......@@ -473,6 +473,7 @@ gst_vorbisenc_init (VorbisEnc * vorbisenc)
vorbisenc->eos = FALSE;
vorbisenc->header_sent = FALSE;
vorbisenc->newmediacount = 0;
vorbisenc->tags = gst_tag_list_new ();
/* we're chained and we can deal with events */
......@@ -808,6 +809,20 @@ gst_vorbisenc_chain (GstPad * pad, GstData * _data)
}
gst_pad_event_default (pad, event);
return;
case GST_EVENT_DISCONTINUOUS:
if (GST_EVENT_DISCONT_NEW_MEDIA (event)) {
/* only do for new media events after the first one */
if (vorbisenc->newmediacount++ > 0) {
vorbisenc->setup = FALSE;
vorbisenc->header_sent = FALSE;
gst_tag_list_free (vorbisenc->tags);
vorbisenc->tags = gst_tag_list_new ();
vorbisenc->eos = FALSE;
gst_vorbisenc_setup (vorbisenc);
}
gst_pad_event_default (pad, event);
break;
}
default:
gst_pad_event_default (pad, event);
return;
......
......@@ -77,6 +77,7 @@ struct _VorbisEnc {
gboolean setup;
gboolean header_sent;
gchar *last_message;
guint16 newmediacount;
};
struct _VorbisEncClass {
......
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gst-plugins 0.7.6\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-08-02 13:00+0200\n"
"POT-Creation-Date: 2004-08-27 14:17+0200\n"
"PO-Revision-Date: 2004-03-18 14:16+0200\n"
"Last-Translator: Petri Jooste <rkwjpj@puk.ac.za>\n"
"Language-Team: Afrikaans <i18n@af.org.za>\n"
......@@ -136,7 +136,7 @@ msgstr "OSS-toestel \"%s\" is reeds in gebruik deur 'n ander program."
msgid "Could not access device \"%s\", check its permissions."
msgstr "Kon nie toegang kry tot toestel \"%s\" nie, kyk na toegangsregte."
#: sys/oss/gstosselement.c:743 sys/v4l/v4l_calls.c:167
#: sys/oss/gstosselement.c:743 sys/v4l/v4l_calls.c:168
#, c-format
msgid "Device \"%s\" does not exist."
msgstr "Toestel \"%s\" bestaan nie."
......@@ -255,11 +255,11 @@ msgstr "Radio"
msgid "Monitor"
msgstr "Monitor"
#: sys/v4l/v4l_calls.c:158
#: sys/v4l/v4l_calls.c:159
msgid "No device specified."
msgstr "Geen toestel gespesifiseer"
#: sys/v4l/v4l_calls.c:171 sys/v4l2/v4l2_calls.c:397
#: sys/v4l/v4l_calls.c:172 sys/v4l2/v4l2_calls.c:397
#, c-format
msgid "Could not open device \"%s\" for reading and writing."
msgstr "Kon nie toestel \"%s\" oopmaak vir lees en skryf nie."
......
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gst-plugins-0.8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-08-02 13:00+0200\n"
"POT-Creation-Date: 2004-08-27 14:17+0200\n"
"PO-Revision-Date: 2004-03-19 18:29+0200\n"
"Last-Translator: Metin Amiroff <metin@karegen.com>\n"
"Language-Team: Azerbaijani <translation-team-az@lists.sourceforge.net>\n"
......@@ -137,7 +137,7 @@ msgstr "\"%s\" OSS avadanlığı başqa bir proqram tərəfindən istifadədədi
msgid "Could not access device \"%s\", check its permissions."
msgstr "\"%s\" avadanlığına yetişə bilmədi, səlahiyyətlərini yoxlayın."
#: sys/oss/gstosselement.c:743 sys/v4l/v4l_calls.c:167
#: sys/oss/gstosselement.c:743 sys/v4l/v4l_calls.c:168
#, c-format
msgid "Device \"%s\" does not exist."
msgstr "\"%s\" avadanlığı mövcud deyil."
......@@ -256,11 +256,11 @@ msgstr "Radio"
msgid "Monitor"
msgstr "Monitor"
#: sys/v4l/v4l_calls.c:158
#: sys/v4l/v4l_calls.c:159
msgid "No device specified."
msgstr "Avadanlıq bildirilməyib."
#: sys/v4l/v4l_calls.c:171 sys/v4l2/v4l2_calls.c:397
#: sys/v4l/v4l_calls.c:172 sys/v4l2/v4l2_calls.c:397
#, c-format
msgid "Could not open device \"%s\" for reading and writing."
msgstr "\"%s\" avadanlığı oxuma və yazma üçün açıla bilmədi."
......
......@@ -8,14 +8,15 @@ msgid ""
msgstr ""
"Project-Id-Version: gst-plugins 0.8.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-08-02 13:00+0200\n"
"POT-Creation-Date: 2004-08-27 14:17+0200\n"
"PO-Revision-Date: 2004-08-08 22:58+0200\n"
"Last-Translator: Miloslav Trmac <mitr@volny.cz>\n"
"Language-Team: Czech <translation-team-cs@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"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"
"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/audiofile/gstafsink.c:346 ext/sndfile/gstsf.c:621
#, c-format
......@@ -70,8 +71,13 @@ msgstr "Žádný nebo neplatný vstup zvuku, proud AVI bude poškozen."
#: gst-libs/gst/play/play.c:110
#, c-format
msgid "The %s element could not be found. This element is essential for playback. Please install the right plug-in and verify that it works by running 'gst-inspect %s'"
msgstr "Element %s nelze najít. Tento element je pro přehrávání nutný. Nainstalujte prosím potřebný modul a ověřte, že funguje, spuštěním 'gst-inspect %s'"
msgid ""
"The %s element could not be found. This element is essential for playback. "
"Please install the right plug-in and verify that it works by running 'gst-"
"inspect %s'"
msgstr ""
"Element %s nelze najít. Tento element je pro přehrávání nutný. Nainstalujte "
"prosím potřebný modul a ověřte, že funguje, spuštěním 'gst-inspect %s'"
#: gst-libs/gst/play/play.c:139
msgid ""
......@@ -136,7 +142,7 @@ msgstr "Zařízení OSS \"%s\" již používá jiný program."
msgid "Could not access device \"%s\", check its permissions."
msgstr "Nemohu přistupovat k zařízení \"%s\", zkontrolujte jeho oprávnění."
#: sys/oss/gstosselement.c:743 sys/v4l/v4l_calls.c:167
#: sys/oss/gstosselement.c:743 sys/v4l/v4l_calls.c:168
#, c-format
msgid "Device \"%s\" does not exist."
msgstr "Zařízení \"%s\" neexistuje."
......@@ -255,11 +261,11 @@ msgstr "Rádio"
msgid "Monitor"
msgstr "Monitor"
#: sys/v4l/v4l_calls.c:158
#: sys/v4l/v4l_calls.c:159
msgid "No device specified."
msgstr "Nezadáno zařízení."
#: sys/v4l/v4l_calls.c:171 sys/v4l2/v4l2_calls.c:397
#: sys/v4l/v4l_calls.c:172 sys/v4l2/v4l2_calls.c:397
#, c-format
msgid "Could not open device \"%s\" for reading and writing."
msgstr "Nemohu otevřít zařízení \"%s\" pro čtení a zápis."
......
......@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gst-plugins 0.8.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-08-02 13:00+0200\n"
"POT-Creation-Date: 2004-08-27 14:17+0200\n"
"PO-Revision-Date: 2004-04-26 10:41-0400\n"
"Last-Translator: Gareth Owen <gowen72@yahoo.com>\n"
"Language-Team: English (British) <en_gb@li.org>\n"
......@@ -134,7 +134,7 @@ msgstr "OSS device \"%s\" is already in use by another program."
msgid "Could not access device \"%s\", check its permissions."
msgstr "Could not access device \"%s\", check its permissions."
#: sys/oss/gstosselement.c:743 sys/v4l/v4l_calls.c:167
#: sys/oss/gstosselement.c:743 sys/v4l/v4l_calls.c:168
#, c-format
msgid "Device \"%s\" does not exist."
msgstr "Device \"%s\" does not exist."
......@@ -254,11 +254,11 @@ msgstr "Radio"
msgid "Monitor"
msgstr "Monitor"
#: sys/v4l/v4l_calls.c:158
#: sys/v4l/v4l_calls.c:159
msgid "No device specified."
msgstr "No device specified."
#: sys/v4l/v4l_calls.c:171 sys/v4l2/v4l2_calls.c:397
#: sys/v4l/v4l_calls.c:172 sys/v4l2/v4l2_calls.c:397
#, c-format
msgid "Could not open device \"%s\" for reading and writing."
msgstr "Could not open device \"%s\" for reading and writing."
......
......@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gst-plugins 0.8.2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-08-02 13:00+0200\n"
"POT-Creation-Date: 2004-08-27 14:17+0200\n"
"PO-Revision-Date: 2004-07-18 11:03+0200\n"
"Last-Translator: Laszlo Dvornik <dvornik@invitel.hu>\n"
"Language-Team: Hungarian <translation-team-hu@lists.sourceforge.net>\n"
......@@ -135,7 +135,7 @@ msgid "Could not access device \"%s\", check its permissions."
msgstr ""
"Nem lehet hozzáférni a(z) \"%s\" eszközhöz, ellenőrizze a jogosultságait."
#: sys/oss/gstosselement.c:743 sys/v4l/v4l_calls.c:167
#: sys/oss/gstosselement.c:743 sys/v4l/v4l_calls.c:168
#, c-format
msgid "Device \"%s\" does not exist."
msgstr "A(z) \"%s\" eszköz nem létezik."
......@@ -255,11 +255,11 @@ msgstr "Rádió"
msgid "Monitor"
msgstr "Monitor"
#: sys/v4l/v4l_calls.c:158
#: sys/v4l/v4l_calls.c:159
msgid "No device specified."
msgstr "Nincs megadva eszköz."
#: sys/v4l/v4l_calls.c:171 sys/v4l2/v4l2_calls.c:397
#: sys/v4l/v4l_calls.c:172 sys/v4l2/v4l2_calls.c:397
#, c-format
msgid "Could not open device \"%s\" for reading and writing."
msgstr "Nem lehet olvasásra és írásra megnyitni a(z) \"%s\" eszközt."
......
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gst-plugins 0.8.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-08-02 13:00+0200\n"
"POT-Creation-Date: 2004-08-27 14:17+0200\n"
"PO-Revision-Date: 2004-08-05 16:26+0200\n"
"Last-Translator: Elros Cyriatan <cyriatan@fastmail.fm>\n"
"Language-Team: Dutch <vertaling@nl.linux.org>\n"
......@@ -68,8 +68,14 @@ msgstr "Geen of ongeldig invoergeluid, AVI-stroom zal slecht zijn."
#: gst-libs/gst/play/play.c:110
#, c-format
msgid "The %s element could not be found. This element is essential for playback. Please install the right plug-in and verify that it works by running 'gst-inspect %s'"
msgstr "Het %s element kon niet worden gevonden. Dit element is essentieel om af te spelen. Installeer alstublieft de juiste plug-in en controleer dat die werkt door 'gst-inspect %s' uit te voeren"
msgid ""
"The %s element could not be found. This element is essential for playback. "
"Please install the right plug-in and verify that it works by running 'gst-"
"inspect %s'"
msgstr ""
"Het %s element kon niet worden gevonden. Dit element is essentieel om af te "
"spelen. Installeer alstublieft de juiste plug-in en controleer dat die werkt "
"door 'gst-inspect %s' uit te voeren"
#: gst-libs/gst/play/play.c:139
msgid ""
......@@ -132,9 +138,10 @@ msgstr "OSS-apparaat \"%s\" is al in gebruik door een ander programma."
#: sys/oss/gstosselement.c:732 sys/oss/gstosselement.c:736
#, c-format
msgid "Could not access device \"%s\", check its permissions."
msgstr "Kon geen toegang krijgen tot apparaat \"%s\", controleer de toegangsrechten."
msgstr ""
"Kon geen toegang krijgen tot apparaat \"%s\", controleer de toegangsrechten."
#: sys/oss/gstosselement.c:743 sys/v4l/v4l_calls.c:167
#: sys/oss/gstosselement.c:743 sys/v4l/v4l_calls.c:168
#, c-format
msgid "Device \"%s\" does not exist."
msgstr "Apparaat \"%s\" bestaat niet."
......@@ -253,11 +260,11 @@ msgstr "Radio"
msgid "Monitor"
msgstr "Bijhouden"
#: sys/v4l/v4l_calls.c:158
#: sys/v4l/v4l_calls.c:159
msgid "No device specified."
msgstr "Geen apparaat opgegeven."
#: sys/v4l/v4l_calls.c:171 sys/v4l2/v4l2_calls.c:397
#: sys/v4l/v4l_calls.c:172 sys/v4l2/v4l2_calls.c:397
#, c-format
msgid "Could not open device \"%s\" for reading and writing."
msgstr "Kon apparaat \"%s\" niet openen voor lezen en schrijven."
......
......@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gst-plugins 0.8.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-08-02 13:00+0200\n"
"POT-Creation-Date: 2004-08-27 14:17+0200\n"
"PO-Revision-Date: 2004-08-07 20:29+0200\n"
"Last-Translator: Laurent Dhima <laurenti@alblinux.net>\n"
"Language-Team: Albanian <begraj@hotmail.com>\n"
......@@ -67,8 +67,14 @@ msgstr "Input audio i gabuar ose mungon, stream AVI mund të jetë i dëmtuar."
#: gst-libs/gst/play/play.c:110
#, c-format
msgid "The %s element could not be found. This element is essential for playback. Please install the right plug-in and verify that it works by running 'gst-inspect %s'"
msgstr "E pamundur gjetja e elementit %s. Ky element është thelbësor për playback. Ju lutem instaloni plug-in e duhur dhe kontrollo funksionimin duke ekzekutuar 'gst-inspect %s'"
msgid ""
"The %s element could not be found. This element is essential for playback. "
"Please install the right plug-in and verify that it works by running 'gst-"
"inspect %s'"
msgstr ""
"E pamundur gjetja e elementit %s. Ky element është thelbësor për playback. "
"Ju lutem instaloni plug-in e duhur dhe kontrollo funksionimin duke "
"ekzekutuar 'gst-inspect %s'"
#: gst-libs/gst/play/play.c:139
msgid ""
......@@ -133,7 +139,7 @@ msgstr "Dispozitivi OSS \"%s\" është duke u përdorur nga një tjetër program
msgid "Could not access device \"%s\", check its permissions."
msgstr "E pamundur futja në dispozitivin \"%s\", kontrollo të drejtat e tij."
#: sys/oss/gstosselement.c:743 sys/v4l/v4l_calls.c:167
#: sys/oss/gstosselement.c:743 sys/v4l/v4l_calls.c:168
#, c-format
msgid "Device \"%s\" does not exist."
msgstr "Dispozitivi \"%s\" nuk ekziston."
......@@ -252,11 +258,11 @@ msgstr "Radio"
msgid "Monitor"
msgstr "Ekrani"
#: sys/v4l/v4l_calls.c:158
#: sys/v4l/v4l_calls.c:159
msgid "No device specified."
msgstr "Nuk është përcaktuar asnjë dispozitiv."
#: sys/v4l/v4l_calls.c:171 sys/v4l2/v4l2_calls.c:397
#: sys/v4l/v4l_calls.c:172 sys/v4l2/v4l2_calls.c:397
#, c-format
msgid "Could not open device \"%s\" for reading and writing."
msgstr "E pamundur hapja e dispozitivit \"%s\" për lexim dhe shkrim."
......
......@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gst-plugins 0.7.6\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-08-02 13:00+0200\n"
"POT-Creation-Date: 2004-08-27 14:17+0200\n"
"PO-Revision-Date: 2004-03-13 00:18+0100\n"
"Last-Translator: Danilo Segan <dsegan@gmx.net>\n"
"Language-Team: Serbian <gnu@prevod.org>\n"
......@@ -138,7 +138,7 @@ msgstr "OSS уређај „%s“ већ користи неки програм.
msgid "Could not access device \"%s\", check its permissions."
msgstr "Не могу да приступим уређају „%s“, проверите његова овлашћења."
#: sys/oss/gstosselement.c:743 sys/v4l/v4l_calls.c:167
#: sys/oss/gstosselement.c:743 sys/v4l/v4l_calls.c:168
#, c-format
msgid "Device \"%s\" does not exist."
msgstr "Не постоји уређај „%s“."
......@@ -257,11 +257,11 @@ msgstr "Радио"
msgid "Monitor"
msgstr "Праћење"
#: sys/v4l/v4l_calls.c:158
#: sys/v4l/v4l_calls.c:159
msgid "No device specified."
msgstr "Уређај није наведен."
#: sys/v4l/v4l_calls.c:171 sys/v4l2/v4l2_calls.c:397
#: sys/v4l/v4l_calls.c:172 sys/v4l2/v4l2_calls.c:397
#, c-format
msgid "Could not open device \"%s\" for reading and writing."
msgstr "Не могу да отворим уређај „%s“ ради читања и уписа."
......
This diff is collapsed.
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gst-plugins 0.8.2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-08-03 17:41+0200\n"
"POT-Creation-Date: 2004-08-27 14:17+0200\n"
"PO-Revision-Date: 2004-08-03 15:40+0200\n"
"Last-Translator: Maxim V. Dziumanenko <mvd@mylinux.com.ua>\n"
"Language-Team: Ukrainian <translation-team-uk@lists.sourceforge.net>\n"
......@@ -139,7 +139,7 @@ msgstr ""
"Не вдається отримати доступ до пристрою \"%s\", перевірте права доступу до "
"нього."
#: sys/oss/gstosselement.c:743 sys/v4l/v4l_calls.c:167
#: sys/oss/gstosselement.c:743 sys/v4l/v4l_calls.c:168
#, c-format
msgid "Device \"%s\" does not exist."
msgstr "Пристрій \"%s\" не існує."
......@@ -259,11 +259,11 @@ msgstr "Радіо"
msgid "Monitor"
msgstr "Монітор"
#: sys/v4l/v4l_calls.c:158
#: sys/v4l/v4l_calls.c:159
msgid "No device specified."
msgstr "Пристрій не вказано."
#: sys/v4l/v4l_calls.c:171 sys/v4l2/v4l2_calls.c:397
#: sys/v4l/v4l_calls.c:172 sys/v4l2/v4l2_calls.c:397
#, c-format
msgid "Could not open device \"%s\" for reading and writing."
msgstr "Не вдається відкрити пристрій \"%s\" для читання чи запису."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment