After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 613920 - audioparsers: Add bitrate calculation to baseparse
audioparsers: Add bitrate calculation to baseparse
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 0.10.19
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-03-25 15:21 UTC by Arun Raghavan
Modified: 2010-03-25 15:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
audioparsers: Add bitrate calculation to baseparse (8.34 KB, patch)
2010-03-25 15:21 UTC, Arun Raghavan
committed Details | Review
aacparse: Fix bitrate calculation (3.29 KB, patch)
2010-03-25 15:23 UTC, Arun Raghavan
committed Details | Review
flacparse: Make bitrate estimation more accurate (2.02 KB, patch)
2010-03-25 15:23 UTC, Arun Raghavan
committed Details | Review

Description Arun Raghavan 2010-03-25 15:21:45 UTC
Created attachment 157068 [details] [review]
audioparsers: Add bitrate calculation to baseparse

The following patch makes baseparse keep a running average of the stream bitrate, as well as the minimum and maximum bitrates. Subclasses can define a vfunc to make sure that per-frame overhead from the container is not accounted
for in the bitrate calculation.

I'm also attaching patches for aacparse and flacparse which might have per-frame overhead from the container to account for.
Comment 1 Arun Raghavan 2010-03-25 15:23:08 UTC
Created attachment 157069 [details] [review]
aacparse: Fix bitrate calculation
Comment 2 Arun Raghavan 2010-03-25 15:23:43 UTC
Created attachment 157073 [details] [review]
flacparse: Make bitrate estimation more accurate
Comment 3 Sebastian Dröge (slomo) 2010-03-25 15:58:53 UTC
commit 76f5d96e064253617510b59005861159c061ffa7
Author: Arun Raghavan <arun.raghavan@collabora.co.uk>
Date:   Thu Mar 25 12:55:02 2010 +0000

    flacparse: Make bitrate estimation more accurate
    
    This implements the get_frame_overhead() vfunc so that baseparse can
    make more accurate bitrate estimates.

commit 599401a7f9d0f4fb59ba0cc2d3717dd0b863f132
Author: Arun Raghavan <arun.raghavan@collabora.co.uk>
Date:   Thu Mar 25 11:48:46 2010 +0000

    aacparse: Fix bitrate calculation
    
    This patch adds the get_frame_overhead() vfunc so that baseparse can
    accurately calculate the min/avg/max bitrates for aacparse.
    
    Note: The bitrate was being incorrectly calculated for ADTS streams
    (it's not in the header as the code suggests).

commit 88c1e425676745ef32cb5ccc5e9db62083e29f1f
Author: Arun Raghavan <arun.raghavan@collabora.co.uk>
Date:   Thu Mar 25 11:22:58 2010 +0000

    audioparsers: Add bitrate calculation to baseparse
    
    This makes baseparse keep a running average of the stream bitrate, as
    well as the minimum and maximum bitrates. Subclasses can override a
    vfunc to make sure that per-frame overhead from the container is not
    accounted for in the bitrate calculation.
    
    We take care not to override the bitrate, minimum-bitrate, and
    maximum-bitrate tags if they have been posted upstream. We also
    rate-limit the emission of bitrate so that it is only triggered by a
    change of >10 kbps.