Skip to content

Can't read my mf4 file #3

Open
Open

Description

@JochnGst

I don't know if this repo is still maintained but I give a try.

I started with a console program that read a mf4 file

using (StreamReader sr = new StreamReader(@"D:\...\104746_001.mf4"))
{
      ASAM.MDF.Libary.Mdf mdf = new ASAM.MDF.Libary.Mdf(sr.BaseStream);     
}

First of all I got a FormatExeption in the by reading the HeaderBlock. I don't know we it's so strict that size must be greater than 4 but compared with "https://pypi.org/project/asammdf/#files"
there is no problem by reading.

Secound point I want to read the Channels of my file, but when I see it correct. You create a DataGroupCollection but don't fill it with data from stream. Is this right?

        public Mdf(Stream stream)
        {
            if (stream == null)
                throw new ArgumentNullException("stream");
            if (!stream.CanSeek)
                throw new ArgumentException("stream");

            Data = stream;
            Data.Position = 0;

            DataGroups = new DataGroupCollection(this);
            IDBlock = IdentificationBlock.Read(this, stream);
            HDBlock = HeaderBlock.Read(this, stream);
        }

Activity

  1. XTOCON commented on May 8, 2022

    @XTOCON

    Dear,
    I have the exact same issue reading a standard MF4 file:
    block.cs line 34 checks a size which has to be larger than 4 which is not the case for these mf4 files
    Could you please share some insight in this issue or fix this bug?
    Any support would be much appreciated
    Thank you
    Christophe

  2. ChrisH1108 commented on Apr 27, 2023

    @ChrisH1108

    Hello,
    I have also the same problem. Is there any solution available?
    I use a file created by Morphee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions