gephex--main--0.4--patch-1855

[email protected]
Newsgroups gmane.comp.video.gephex.devel
Message-ID <[email protected]>
Archive: [email protected]
New revision: gephex--main--0.4--patch-1855

--
Revision: gephex--main--0.4--patch-1855
Archive: [email protected]
Creator: The Gephex Source Archive <[email protected]>
Date: Sat Mar  5 13:34:57 CET 2005
Standard-date: 2005-03-05 12:34:57 GMT
Modified-files: NEWS doc/documentation.xml
    modules/src/frbinmodule/ffmpegdriver.cpp
    qtgui/src/gui/base/picmanager.cpp
    qtgui/src/gui/dialogs/changesdialogimpl.cpp
    qtgui/src/gui/editor/grapheditor.cpp
New-patches: [email protected]/gephex--georg--0.4--patch-398
    [email protected]/gephex--georg--0.4--patch-399
    [email protected]/gephex--georg--0.4--patch-400
    [email protected]/gephex--georg--0.4--patch-401
    [email protected]/gephex--georg--0.4--patch-402
    [email protected]/gephex--main--0.4--patch-1855
Summary: [MERGE-REQUEST] Updated ffmpeg driver (now works with newer ffmpeg versions), updated changes dialog, changed color of midi type
Keywords: 

Patches applied:

 * [email protected]/gephex--georg--0.4--patch-398
   Changed ffmpegdriver to work with both old and new ffmpeg av_seek_frame interface

 * [email protected]/gephex--georg--0.4--patch-399
   Fixed typo in documentation, updated changesdialog

 * [email protected]/gephex--georg--0.4--patch-400
   Gui now opens property view on left click on a module (bug #97)

 * [email protected]/gephex--georg--0.4--patch-401
   Updated NEWS and changes dialog

 * [email protected]/gephex--georg--0.4--patch-402
   Changed color of midi type in graph editor

* added files

    {arch}/gephex/gephex--georg/gephex--georg--0.4/[email protected]/patch-log/patch-398
    {arch}/gephex/gephex--georg/gephex--georg--0.4/[email protected]/patch-log/patch-399
    {arch}/gephex/gephex--georg/gephex--georg--0.4/[email protected]/patch-log/patch-400
    {arch}/gephex/gephex--georg/gephex--georg--0.4/[email protected]/patch-log/patch-401
    {arch}/gephex/gephex--georg/gephex--georg--0.4/[email protected]/patch-log/patch-402
    {arch}/gephex/gephex--main/gephex--main--0.4/[email protected]/patch-log/patch-1855

* modified files

--- orig/NEWS
+++ mod/NEWS
@@ -7,7 +7,7 @@
 
   * some usability improvements
 
-  * fixed bugs #79, #81, #82, #83, #84, #86, #87, #89, #96, #100
+  * fixed bugs #79, #81, #82, #83, #84, #86, #87, #89, #96, #97, #100
 
 0.4.2:
 ------


--- orig/doc/documentation.xml
+++ mod/doc/documentation.xml
@@ -585,7 +585,7 @@
    <citetitle>let us know</citetitle></ulink>!
  </para>
 
-We are looking for people to improve gephex on mac os x.
+We are looking for people to improve gephex on Mac OS X.
 Important areas that need work: 
 
  <itemizedlist>


--- orig/modules/src/frbinmodule/ffmpegdriver.cpp
+++ mod/modules/src/frbinmodule/ffmpegdriver.cpp
@@ -1,6 +1,6 @@
 /* This source file is a part of the GePhex Project.
 
- Copyright (C) 2001-2004
+ Copyright (C) 2001-2005
 
  Georg Seidel <[email protected]> 
  Martin Bayer <[email protected]> 
@@ -51,6 +51,8 @@
 static void close_stream(AVFormatContext* av_fc, int stream_index);
 static void dump_stream_info(AVFormatContext *s);
 
+static int seek_to_second(AVFormatContext* st, int stream_index, double sec);
+
 //----------------------------------------------------------------------
 
 static int next_video_frame(AVPacket* pkt, AVFormatContext* fc,
@@ -309,6 +311,9 @@
     std::cout << "start_time: " << m_start_time << " s
";
     std::cout << "fps       : " << m_fps << "
";
 
+    std::cout << "timebase  : " 
+              << video_stream->time_base.num / 
+                     (double)video_stream->time_base.den << "
";
 
     m_frame = avcodec_alloc_frame();
     file_name = filename;
@@ -367,8 +372,6 @@
   {
     assert(av_fc != 0);
 
-    AVStream* video_stream = av_fc->streams[video_stream_index];
-
     double wanted_timestamp = m_start_time + ((double) frame_number) / m_fps;
 
     double frame_duration = 1.0 / m_fps;
@@ -386,8 +389,8 @@
 #endif
 
         // first seek to the nearest keyframe before wanted_timestamp
-        int ret = av_seek_frame(av_fc, video_stream_index,
-                                (int64_t) (wanted_timestamp*AV_TIME_BASE));
+        int ret = seek_to_second(av_fc, video_stream_index, wanted_timestamp);
+
         if (ret < 0)
           {
             std::cerr << "Could not seek
";
@@ -426,6 +429,8 @@
     int dst_pix_fmt = PIX_FMT_RGBA32;
     AVPicture pict;
 
+    AVStream* video_stream = av_fc->streams[video_stream_index];
+
     int cwidth  = video_stream->codec.width;
     int cheight = video_stream->codec.height;
 
@@ -645,8 +650,8 @@
   if (duration_0 <= 0) duration_0 = frame_duration*25;
 
   //  std::cout << "seeking until success...
";
-  int ret = av_seek_frame(av_fc, stream_index,
-                          (int64_t) (duration_0*AV_TIME_BASE) + start_pts);
+
+  int ret = seek_to_second(av_fc, stream_index, duration_0);
 
   int seek_count = 1;
   // decrease duration until seek succeeds
@@ -654,8 +659,7 @@
     {
       //      std::cout << ".
";
       duration_0 -= frame_duration;
-      ret = av_seek_frame(av_fc, stream_index,
-                          (int64_t) (duration_0*AV_TIME_BASE) + start_pts);
+      ret = seek_to_second(av_fc, stream_index, duration_0);
       ++seek_count;
     }
 
@@ -711,3 +715,41 @@
 }
 
 //----------------------------------------------------------------------
+
+// TODO: check whether this number reflects the seek_frame api change
+
+#if LIBAVCODEC_BUILD <= 4721
+
+static int64_t get_timestamp(double ts_sec)
+{
+  return static_cast<int64_t>(ts_sec / AV_TIME_BASE + 0.5);
+}
+
+static int seek_to_second(AVFormatContext* av_fc, int stream_index,
+                          double sec)
+{
+  int64_t ts = get_timestamp(sec);
+
+  return av_seek_frame(av_fc, stream_index, ts);
+}
+
+#else
+
+static int64_t get_timestamp(double ts_sec, const AVRational& time_base)
+{
+  return static_cast<int64_t>(ts_sec*time_base.den /
+                                   static_cast<double>(time_base.num) + 0.5);
+}
+
+static int seek_to_second(AVFormatContext* av_fc, int stream_index,
+                          double sec)
+{
+  AVStream* video_stream = av_fc->streams[stream_index];
+
+  int64_t ts = get_timestamp(sec, video_stream->time_base);
+
+  return av_seek_frame(av_fc, stream_index, ts, AVSEEK_FLAG_BACKWARD);
+}
+#endif
+
+//----------------------------------------------------------------------


--- orig/qtgui/src/gui/base/picmanager.cpp
+++ mod/qtgui/src/gui/base/picmanager.cpp
@@ -41,7 +41,7 @@
         }
       else if (type == "typ_MidiType")
         {
-          return QColor(221, 79, 8);
+          return QColor(255, 255, 0);
         }
       else if (type == "typ_AudioType")
         {


--- orig/qtgui/src/gui/dialogs/changesdialogimpl.cpp
+++ mod/qtgui/src/gui/dialogs/changesdialogimpl.cpp
@@ -34,7 +34,21 @@
 ChangesDialog::ChangesDialog( QWidget* parent,  const char* name, bool modal, WFlags fl )
     : ChangesDialogBase( parent, name, modal, fl )
 {
-  changes_view->setText("<h3>0.4.2:</h3>
"
+  changes_view->setText("<h3>0.4.3:</h3>
"
+"<p>
"
+"<ul><li>support for Mac OS X
"
+"</ul>
"
+"<p>
"
+"<ul><li>ports of almost all effecTV effects
"
+"</ul>
"
+"<p>
"
+"<ul><li>some usability improvements
"
+"</ul>
"
+"<p>
"
+"<ul><li>fixed bugs #79, #81, #82, #83, #84, #86, #87, #89, #96, #97, #100
"
+"</ul>
"
+"<p>
"
+"<h3>0.4.2:</h3>
"
 "<p>
"
 "<ul><li>support for frei0r plugins
"
 "</ul>
"


--- orig/qtgui/src/gui/editor/grapheditor.cpp
+++ mod/qtgui/src/gui/editor/grapheditor.cpp
@@ -485,9 +485,10 @@
       }
   }
 
-  void GraphEditor::nodeWidgetClicked(NodeWidget* /*n*/)
+  void GraphEditor::nodeWidgetClicked(NodeWidget* n)
   {
-	  
+    emit displayProperties(n->getProperties());
+    m_property_id = n->getID();
   }
 
   void GraphEditor::nodeWidgetMoved(NodeWidget* n, const QPoint& pos)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.