[Kdenlive-devel] Removing some warnings

Marco Gittler g.marco at freenet.de
Sun Jun 1 16:16:11 UTC 2008


hi

@Fran García

what is the warning that make a:
          //Mlt::Consumer *consumer = new Mlt::Consumer( profile ,
"sdl_preview");
-        m_mltConsumer = new Mlt::Consumer(*m_mltProfile ,
"sdl_preview"); //consumer;
+        m_mltConsumer = new Mlt::Consumer(*m_mltProfile ,

needed ?

i have no warning there.

jb fixed now also the stdio.h and kthumb warning/error.

regards marco

Am Samstag, 31. Mai 2008 schrieb Fran García:
> Hi,
>
> I think I removed some of the warnings in the kde4 version, I'd like to
> know what you think.
>
> Here are the patches:
>
> For renderer.cpp (all the warnings here were for conversion to char*)
>
> Index: src/renderer.cpp
> ===================================================================
> --- src/renderer.cpp	(revisión: 2205)
> +++ src/renderer.cpp	(copia de trabajo)
> @@ -78,7 +78,7 @@
>       //if (rendererName == "clip")
>       {
>           //Mlt::Consumer *consumer = new Mlt::Consumer( profile ,
> "sdl_preview");
> -        m_mltConsumer = new Mlt::Consumer(*m_mltProfile ,
> "sdl_preview"); //consumer;
> +        m_mltConsumer = new Mlt::Consumer(*m_mltProfile ,
> (char*)"sdl_preview"); //consumer;
>           m_mltConsumer->set("resize", 1);
>           m_mltConsumer->set("window_id", winid);
>           m_mltConsumer->set("terminate_on_pause", 1);
> @@ -88,8 +88,8 @@
>           m_mltConsumer->set("frequency", 48000);
>           m_externalwinid = extid;
>           m_winid = winid;
> -        m_mltConsumer->listen("consumer-frame-show", this,
> (mlt_listener) consumer_frame_show);
> -        Mlt::Producer *producer = new Mlt::Producer(*m_mltProfile ,
> "westley-xml", "<westley><playlist><producer mlt_service=\"colour\"
> colour=\"blue\" in=\"0\" out=\"25\" /></playlist></westley>");
> +        m_mltConsumer->listen((char*)"consumer-frame-show", this,
> (mlt_listener) consumer_frame_show);
> +        Mlt::Producer *producer = new Mlt::Producer(*m_mltProfile ,
> (char*)"westley-xml", (char*)"<westley><playlist><producer
> mlt_service=\"colour\" colour=\"blue\" in=\"0\" out=\"25\"
> /></playlist></westley>");
>           m_mltProducer = producer;
>           m_mltConsumer->connect(*m_mltProducer);
>           m_mltProducer->set_speed(0.0);
> @@ -143,17 +143,17 @@
>       m_mltProfile = NULL;
>
>       m_mltProfile = new Mlt::Profile((char*) profile.toUtf8().data());
> -    m_mltConsumer = new Mlt::Consumer(*m_mltProfile , "sdl_preview");
> //consumer;
> +    m_mltConsumer = new Mlt::Consumer(*m_mltProfile ,
> (char*)"sdl_preview"); //consumer;
>       m_mltConsumer->set("resize", 1);
>       m_mltConsumer->set("window_id", m_winid);
>       m_mltConsumer->set("terminate_on_pause", 1);
> -    m_mltConsumer->listen("consumer-frame-show", this, (mlt_listener)
> consumer_frame_show);
> +    m_mltConsumer->listen((char*)"consumer-frame-show", this,
> (mlt_listener) consumer_frame_show);
>       m_mltConsumer->set("rescale", "nearest");
>       m_mltConsumer->set("progressive", 1);
>       m_mltConsumer->set("audio_buffer", 1024);
>       m_mltConsumer->set("frequency", 48000);
>
> -    Mlt::Producer *producer = new Mlt::Producer(*m_mltProfile ,
> "westley-xml", (char *) scene.toUtf8().data());
> +    Mlt::Producer *producer = new Mlt::Producer(*m_mltProfile ,
> (char*)"westley-xml", (char *) scene.toUtf8().data());
>       m_mltProducer = producer;
>       m_mltConsumer->connect(*m_mltProducer);
>       m_mltProducer->set_speed(0.0);
> @@ -387,7 +387,7 @@
>       //kDebug() << "////////////\n" << doc.toString() <<
> "////////////////\n";
>       char *tmp = decodedString(doc.toString());
>
> -    Mlt::Producer producer(*m_mltProfile, "westley-xml", tmp);
> +    Mlt::Producer producer(*m_mltProfile, (char*)"westley-xml", tmp);
>       delete[] tmp;
>
>       if (producer.is_blank()) {
> @@ -404,7 +404,7 @@
>       filePropertyMap["filename"] = url.path();
>       filePropertyMap["duration"] =
> QString::number(producer.get_playtime());
>       kDebug() << "///////  PRODUCER: " << url.path() << " IS: " <<
> producer.get_playtime();
> -    Mlt::Filter m_convert(*m_mltProfile, "avcolour_space");
> +    Mlt::Filter m_convert(*m_mltProfile, (char*)"avcolour_space");
>       m_convert.set("forced", mlt_image_rgb24a);
>       producer.attach(m_convert);
>       Mlt::Frame * frame = producer.get_frame();
> @@ -562,7 +562,7 @@
>       }
>
>       char *tmp = decodedString(playlist);
> -    m_mltProducer = new Mlt::Producer(*m_mltProfile, "westley-xml", tmp);
> +    m_mltProducer = new Mlt::Producer(*m_mltProfile,
> (char*)"westley-xml", tmp);
>       delete[] tmp;
>       if (!m_mltProducer || !m_mltProducer->is_valid()) kDebug() << "
> WARNING - - - - -INVALID PLAYLIST: " << tmp;
>       //m_mltProducer->optimise();
> @@ -1025,7 +1025,7 @@
>       doc.appendChild(doc.importNode(element, true));
>       QString resource = doc.toString();
>       char *tmp = decodedString(resource);
> -    Mlt::Producer clip(*m_mltProfile, "westley-xml", tmp);
> +    Mlt::Producer clip(*m_mltProfile, (char*)"westley-xml", tmp);
>       //clip.set_in_and_out(in.frames(m_fps), out.frames(m_fps));
>       delete[] tmp;
>       trackPlaylist.insert_at((int) position.frames(m_fps), clip, 1);
> @@ -1654,7 +1654,7 @@
>
>   void Render::mltSavePlaylist() {
>       kWarning() << "// UPDATING PLAYLIST TO DISK++++++++++++++++";
> -    Mlt::Consumer fileConsumer(*m_mltProfile, "westley");
> +    Mlt::Consumer fileConsumer(*m_mltProfile, (char*)"westley");
>       fileConsumer.set("resource", "/tmp/playlist.westley");
>
>       Mlt::Service service(m_mltProducer->get_service());
>
>
> For kthumb.cpp:
>
>
> Index: src/kthumb.cpp
> ===================================================================
> --- src/kthumb.cpp	(revisión: 2205)
> +++ src/kthumb.cpp	(copia de trabajo)
> @@ -74,7 +74,7 @@
>
>
>       if (KdenliveSettings::normaliseaudiothumbs()) {
> -        Mlt::Filter m_convert(prof, "volume");
> +        Mlt::Filter m_convert(prof, (char*)"volume");
>           m_convert.set("gain", "normalise");
>           m_producer.attach(m_convert);
>       }
> @@ -234,7 +234,7 @@
>       westley.appendChild(doc.importNode(xml, true));
>       char *tmp = Render::decodedString(doc.toString());
>       kDebug() << " - - - UPDATING THMB, XML: " << doc.toString();
> -    Mlt::Producer producer(profile, "westley-xml", tmp);
> +    Mlt::Producer producer(profile, (char*)"westley-xml", tmp);
>       delete[] tmp;
>
>       if (producer.is_blank()) {
> @@ -246,7 +246,7 @@
>
>   QPixmap KThumb::getFrame(Mlt::Producer* producer, int frame, int
> width, int height) {
>       Mlt::Profile profile((char*)
> KdenliveSettings::current_profile().data());
> -    Mlt::Filter m_convert(profile, "avcolour_space");
> +    Mlt::Filter m_convert(profile, (char*)"avcolour_space");
>       m_convert.set("forced", mlt_image_rgb24a);
>       producer->attach(m_convert);
>       if (frame > -1)
> @@ -393,7 +393,7 @@
>   void KThumb::customEvent(QEvent * event) {
>       if (event->type() == 10005) {
>           ProgressEvent* p = (ProgressEvent*) event;
> -        m_clipManager->setThumbsProgress(m_url, p->value());
> +        m_clipManager->setThumbsProgress(m_url.url(), p->value());
>       }
>   }
>
>
>
>
>
> The last change in kthumb was not for a warning, but an error, it kept
> telling me that using the tostring for kurl was deprecated, what exact
> versions of kde and qt are you guys using?
>
> And effectstackedit:
> Here the compiler complained about deleting a void* was undefined. As
> far as I can tell, doing that cast to char* should do the trick, but I
> don't really know well the code so maybe I did something stupid with that!
>
> Index: src/effectstackedit.cpp
> ===================================================================
> --- src/effectstackedit.cpp	(revisión: 2205)
> +++ src/effectstackedit.cpp	(copia de trabajo)
> @@ -239,7 +239,7 @@
>           delete w;
>       }
>       foreach(void *p, uiItems) {
> -        delete p;
> +        delete (char*)p;
>       }
>       uiItems.clear();
>       items.clear();
>
>
> Saludos,
>    Fran García
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Kdenlive-devel mailing list
> Kdenlive-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/kdenlive-devel



-- 
"Nicht jedem. Es soll sogar Frauen geben, die nicht einmal Unix richtig
schreiben können (oder wollen)." - "Na und? Was braucht eine Frau Unix,
Hauptsache, sie kann kochen..." - Rasmus Plewe in de.alt.sysadmin.recovery




More information about the Kdenlive mailing list