gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] /srv/bzr/gnash/trunk r9944: {Audio, Video}DecoderGst.cpp:


From: Bastiaan Jacques
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r9944: {Audio, Video}DecoderGst.cpp: don't unref a buffer owned by the bin, even
Date: Mon, 06 Oct 2008 23:13:37 +0200
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9944
committer: Bastiaan Jacques <address@hidden>
branch nick: trunk
timestamp: Mon 2008-10-06 23:13:37 +0200
message:
  {Audio,Video}DecoderGst.cpp: don't unref a buffer owned by the bin, even
  if pushing failed.
  
  VideoDecoderGst.cpp: Handle VP6A correctly.
  
  MediaParserGst.{cpp,h}: Comment fixes.
modified:
  libmedia/gst/AudioDecoderGst.cpp
  libmedia/gst/MediaParserGst.cpp
  libmedia/gst/MediaParserGst.h
  libmedia/gst/VideoDecoderGst.cpp
    ------------------------------------------------------------
    revno: 9942.1.1
    committer: Bastiaan Jacques <address@hidden>
    branch nick: gst-release
    timestamp: Mon 2008-10-06 20:43:42 +0200
    message:
      Comment fixes. Copyright year is 2008.
    modified:
      libmedia/gst/MediaParserGst.cpp
      libmedia/gst/MediaParserGst.h
      libmedia/gst/VideoDecoderGst.cpp
    ------------------------------------------------------------
    revno: 9942.1.2
    committer: Bastiaan Jacques <address@hidden>
    branch nick: gst-release
    timestamp: Mon 2008-10-06 21:00:01 +0200
    message:
      Make alpha vp6 work
    modified:
      libmedia/gst/VideoDecoderGst.cpp
    ------------------------------------------------------------
    revno: 9942.1.3
    committer: Bastiaan Jacques <address@hidden>
    branch nick: gst-release
    timestamp: Mon 2008-10-06 21:15:58 +0200
    message:
      Don't unref buffer when the push failed; the bin still owns it.
    modified:
      libmedia/gst/VideoDecoderGst.cpp
    ------------------------------------------------------------
    revno: 9942.1.4
    committer: Bastiaan Jacques <address@hidden>
    branch nick: gst-release
    timestamp: Mon 2008-10-06 21:17:38 +0200
    message:
      Don't unref buffer when the push failed; the bin still owns it.
    modified:
      libmedia/gst/AudioDecoderGst.cpp
    ------------------------------------------------------------
    revno: 9942.1.5
    committer: Bastiaan Jacques <address@hidden>
    branch nick: gst-release
    timestamp: Mon 2008-10-06 21:57:02 +0200
    message:
      Refresh.
=== modified file 'libmedia/gst/AudioDecoderGst.cpp'
--- a/libmedia/gst/AudioDecoderGst.cpp  2008-10-06 16:18:37 +0000
+++ b/libmedia/gst/AudioDecoderGst.cpp  2008-10-06 19:17:38 +0000
@@ -198,7 +198,6 @@
     bool success = swfdec_gst_decoder_push(&_decoder, gstbuf);
     if (!success) {
         log_error(_("AudioDecoderGst: buffer push failed."));
-        gst_buffer_unref(gstbuf);
         return 0;
     }
 

=== modified file 'libmedia/gst/MediaParserGst.cpp'
--- a/libmedia/gst/MediaParserGst.cpp   2008-10-06 15:51:41 +0000
+++ b/libmedia/gst/MediaParserGst.cpp   2008-10-06 18:43:42 +0000
@@ -1,6 +1,6 @@
 // MediaParserFfmpeg.cpp: FFMPG media parsers, for Gnash
 //
-//   Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+//   Copyright (C) 2008 Free Software Foundation, Inc.
 //
 // 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

=== modified file 'libmedia/gst/MediaParserGst.h'
--- a/libmedia/gst/MediaParserGst.h     2008-10-05 00:08:38 +0000
+++ b/libmedia/gst/MediaParserGst.h     2008-10-06 18:43:42 +0000
@@ -1,6 +1,6 @@
 // MediaParserGst.h: gstreamer media parsers, for Gnash
 // 
-//   Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+//   Copyright (C) 2008 Free Software Foundation, Inc.
 // 
 // 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

=== modified file 'libmedia/gst/VideoDecoderGst.cpp'
--- a/libmedia/gst/VideoDecoderGst.cpp  2008-10-06 08:52:36 +0000
+++ b/libmedia/gst/VideoDecoderGst.cpp  2008-10-06 19:15:58 +0000
@@ -28,8 +28,6 @@
 namespace gnash {
 namespace media {
 
-// gstappsrc -> decodebin -> (decoder) -> ffmpegcolorspace -> gstappsink (with 
rgb caps)
-
 // TODO: implement proper seeking.
 
 VideoDecoderGst::VideoDecoderGst(GstCaps* caps)
@@ -55,8 +53,12 @@
                                       NULL);
       break;
     case VIDEO_CODEC_VP6:
+      caps = gst_caps_new_simple ("video/x-vp6-flash",
+                                      "width", G_TYPE_INT, width,
+                                      "height", G_TYPE_INT, height,     
+                                      NULL);
     case VIDEO_CODEC_VP6A:
-      caps = gst_caps_new_simple ("video/x-vp6-flash",
+      caps = gst_caps_new_simple ("video/x-vp6-alpha",
                                       "width", G_TYPE_INT, width,
                                       "height", G_TYPE_INT, height,     
                                       NULL);
@@ -92,16 +94,13 @@
 void
 VideoDecoderGst::setup(GstCaps* srccaps)
 {
-    GstCaps* sinkcaps;
- 
-
     if (!srccaps) {
         throw MediaException(_("VideoDecoderGst: internal error (caps creation 
failed)"));      
     }
 
-    sinkcaps = gst_caps_new_simple ("video/x-raw-rgb", "bpp", G_TYPE_INT, 24,
-                                                       "depth", G_TYPE_INT, 24,
-                                                       NULL);
+    GstCaps* sinkcaps = gst_caps_new_simple ("video/x-raw-rgb", "bpp", 
G_TYPE_INT, 24,
+                                             "depth", G_TYPE_INT, 24,
+                                             NULL);
     if (!sinkcaps) {
         throw MediaException(_("VideoDecoderGst: internal error (caps creation 
failed)"));      
     }
@@ -128,7 +127,7 @@
         buffer = gst_buffer_new();
 
         GST_BUFFER_DATA(buffer) = const_cast<uint8_t*>(frame.data());
-        GST_BUFFER_SIZE(buffer) = frame.dataSize();    
+        GST_BUFFER_SIZE(buffer) = frame.dataSize();
         GST_BUFFER_OFFSET(buffer) = frame.frameNum();
         GST_BUFFER_TIMESTAMP(buffer) = GST_CLOCK_TIME_NONE;
         GST_BUFFER_DURATION(buffer) = GST_CLOCK_TIME_NONE;
@@ -137,7 +136,6 @@
     bool success = swfdec_gst_decoder_push(&_decoder, buffer);
     if (!success) {
         log_error(_("VideoDecoderGst: buffer push failed."));
-        gst_buffer_unref(buffer);
     }
 }
   


reply via email to

[Prev in Thread] Current Thread [Next in Thread]