Project

General

Profile

Actions

Support Request #5857

closed

Wrong duration for empty streams

Added by hidden over 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Customer:
VW
Department:
FORSCHUNG
Requester's Priority:
Normal
Support Level:
3rd Level
Resolution:
Product Issue Opened
Platform:
Windows 7 64bit
Topic:
FileLibrary::Reader
FAQ Links:

Description

Hallo ADTF Support Team,

Nach Empfehlung in #5281<https://support.digitalwerk.net/issues/5281#change-24908> versuche ich nun, die ADTF File Library zu nutzen. In der aktuellen Version beta-0.4.0 scheint es aber ein Problem bei der Berechnung der Duration zu geben, wenn die Datei einen leeren Stream enthält.

Datei adtf_file_reader.cpp:

std::chrono::microseconds Reader::getDuration() const
{
    std::vector<Stream> streams = getStreams();
    std::chrono::microseconds first_time = std::chrono::microseconds::max();
    std::chrono::microseconds last_time = std::chrono::microseconds::min();
    for (const auto& current_stream : streams)
    {
        if (current_stream.timestamp_of_first_item < first_time)
        {
            first_time = current_stream.timestamp_of_first_item;
        }
        if (current_stream.timestamp_of_last_item > last_time)
        {
            last_time = current_stream.timestamp_of_last_item;
        }
    }
    return std::chrono::microseconds(last_time - first_time);
}

Ist ein Stream leer, hat dieser in unserer ADTF 2 Datei eine Null für timestamp_of_first_item. Die getDuration Funktion nutzt den deswegen immer für first_time genutzt. Das führt natürlich zu einer falschen Gesamtdauer.

Lösung

CDIFHD-44 erstellt.
Workaround ist im Moment leider nur selber eine getDuration Methode zu Implementieren über getStreams.
Streams bei denen item_count == 0 ist dabei ignorieren.

Actions #2

Updated by hidden over 5 years ago

  • Project changed from Public Support to 20
  • Status changed from New to In Progress
  • Topic set to FileLibrary::DatProcessing
  • Customer set to VW
  • Department set to FORSCHUNG
  • Affected Products ADTF File Library 0.4.0 (BETA) added
  • Platform Windows 7 64bit added
Actions #3

Updated by hidden over 5 years ago

  • Topic changed from FileLibrary::DatProcessing to FileLibrary::Reader
  • Support Level changed from 2nd Level to 3rd Level
Actions #4

Updated by hidden over 5 years ago

Update: in der DAT Datei scheint ein Filter die sample time für ein Sample auf 0 zu setzen. Zur Berechnung der Dauer wird scheinbar diese Sample Time, und nicht die Chunk Time genutzt.

Actions #5

Updated by hidden about 5 years ago

Danke für den Bugreport! Ich habe dafür das Produktticket CDIFHD-44 erstellt. Workaround ist im Moment leider nur selber eine getDuration Methode zu Implementieren über getStreams. Streams bei denen item_count == 0 ist dabei ignorieren.

Grüße,

Martin

Actions #6

Updated by hidden about 5 years ago

Hallo Martin,

Alles klar- das habe ich auch schon gemacht (Open Source ist da echt vorteilhaft :P).

Viele Grüße,
Paul

Actions #7

Updated by hidden about 5 years ago

  • Project changed from 20 to Public Support
  • Subject changed from Problem mit ADTF File Library to Wrong duration for empty streams
  • Description updated (diff)
  • Status changed from In Progress to To Be Closed
  • Private changed from Yes to No
  • Resolution set to Product Issue Opened
  • Product Issue Numbers set to https://www.cip.audi.de/jira/browse/CDIFHD-44
Actions #8

Updated by hidden about 5 years ago

  • Status changed from To Be Closed to Closed
Actions

Also available in: Atom PDF