[haiku-commits] haiku: hrev52493 - src/add-ons/media/plugins/ffmpeg

  • From: waddlesplash@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 4 Nov 2018 12:03:16 -0500 (EST)

hrev52493 adds 2 changesets to branch 'master'
old head: 8850049390db266138177ee0158d00155ca46a57
new head: ce402e82f271eef27be305a94b596935dc85cd47
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=ce402e82f271+%5E8850049390db

----------------------------------------------------------------------------

9e2c056c278f: ffmpeg: fix timestamp tracing
  
  Use ffmpeg functions to format the timestamps.
  
  Change-Id: Idd51feb22fc6c5a70e177604eb995ae2d8601cd4
  Reviewed-on: https://review.haiku-os.org/663
  Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

ce402e82f271: ffmpeg: remove deprecated comment.
  
  This field is deprecated.
  
  Change-Id: I18c3b89ef7438c61b464aaf8bebc1484bf479d6b
  Reviewed-on: https://review.haiku-os.org/664
  Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

                             [ Adrien Destugues <pulkomandy@xxxxxxxxxxxxx> ]

----------------------------------------------------------------------------

3 files changed, 7 insertions(+), 11 deletions(-)
src/add-ons/media/plugins/ffmpeg/AVCodecDecoder.cpp | 11 ++++++-----
src/add-ons/media/plugins/ffmpeg/AVCodecDecoder.h   |  1 +
src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp |  6 ------

############################################################################

Commit:      9e2c056c278f92fd412ed840e5776f2f00942fc9
URL:         https://git.haiku-os.org/haiku/commit/?id=9e2c056c278f
Author:      Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Date:        Sun Nov  4 08:21:20 2018 UTC
Committer:   waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Sun Nov  4 17:03:13 2018 UTC

ffmpeg: fix timestamp tracing

Use ffmpeg functions to format the timestamps.

Change-Id: Idd51feb22fc6c5a70e177604eb995ae2d8601cd4
Reviewed-on: https://review.haiku-os.org/663
Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

----------------------------------------------------------------------------

diff --git a/src/add-ons/media/plugins/ffmpeg/AVCodecDecoder.cpp 
b/src/add-ons/media/plugins/ffmpeg/AVCodecDecoder.cpp
index 12f8d36cb9..aa462137f8 100644
--- a/src/add-ons/media/plugins/ffmpeg/AVCodecDecoder.cpp
+++ b/src/add-ons/media/plugins/ffmpeg/AVCodecDecoder.cpp
@@ -1589,11 +1589,12 @@ AVCodecDecoder::_UpdateMediaHeaderForVideoFrame()
                fHeader.u.raw_video.pixel_width_aspect,
                fHeader.u.raw_video.pixel_height_aspect);
 
-       TRACE("[v] start_time=%02d:%02d.%02d field_sequence=%lu\n",
-               int((fHeader.start_time / 60000000) % 60),
-               int((fHeader.start_time / 1000000) % 60),
-               int((fHeader.start_time / 10000) % 100),
-               fHeader.u.raw_video.field_sequence);
+       char timestamp[AV_TS_MAX_STRING_SIZE];
+       av_ts_make_time_string(timestamp,
+               fRawDecodedPicture->best_effort_timestamp, 
&fCodecContext->time_base);
+
+       TRACE("[v] start_time=%s field_sequence=%lu\n",
+               timestamp, fHeader.u.raw_video.field_sequence);
 }
 
 
diff --git a/src/add-ons/media/plugins/ffmpeg/AVCodecDecoder.h 
b/src/add-ons/media/plugins/ffmpeg/AVCodecDecoder.h
index 52b8e40132..322cda65f6 100644
--- a/src/add-ons/media/plugins/ffmpeg/AVCodecDecoder.h
+++ b/src/add-ons/media/plugins/ffmpeg/AVCodecDecoder.h
@@ -25,6 +25,7 @@ extern "C" {
        #include "imgutils.h"
        #include "swresample.h"
        #include "swscale.h"
+       #include "timestamp.h"
 }
 
 

############################################################################

Revision:    hrev52493
Commit:      ce402e82f271eef27be305a94b596935dc85cd47
URL:         https://git.haiku-os.org/haiku/commit/?id=ce402e82f271
Author:      Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Date:        Sun Nov  4 08:25:07 2018 UTC
Committer:   waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Sun Nov  4 17:03:13 2018 UTC

ffmpeg: remove deprecated comment.

This field is deprecated.

Change-Id: I18c3b89ef7438c61b464aaf8bebc1484bf479d6b
Reviewed-on: https://review.haiku-os.org/664
Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

----------------------------------------------------------------------------

diff --git a/src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp 
b/src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp
index 0ca162b6c1..463272c2a3 100644
--- a/src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp
+++ b/src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp
@@ -682,12 +682,6 @@ StreamBase::GetNextChunk(const void** chunkBuffer,
                return ret;
        }
 
-       // NOTE: AVPacket has a field called "convergence_duration", for which
-       // the documentation is quite interesting. It sounds like it could be
-       // used to know the time until the next I-Frame in streams that don't
-       // let you know the position of keyframes in another way (like through
-       // the index).
-
        // According to libavformat documentation, fPacket is valid until the
        // next call to av_read_frame(). This is what we want and we can share
        // the memory with the least overhead.


Other related posts:

  • » [haiku-commits] haiku: hrev52493 - src/add-ons/media/plugins/ffmpeg - waddlesplash