Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AV_NOPTS_VALUE removed #55

Closed
ispysoftware opened this issue Aug 4, 2017 · 9 comments
Closed

AV_NOPTS_VALUE removed #55

ispysoftware opened this issue Aug 4, 2017 · 9 comments

Comments

@ispysoftware
Copy link
Sponsor

Any reason?

@Ruslan-B
Copy link
Owner

Ruslan-B commented Aug 4, 2017

Context?

@ispysoftware
Copy link
Sponsor Author

in public unsafe struct AVPacket:

///

Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will be presented to the user. Can be AV_NOPTS_VALUE if it is not stored in the file. pts MUST be larger or equal to dts as presentation cannot happen before decompression, unless one wants to view hex dumps. Some formats misuse the terms dts and pts/cts to mean something different. Such timestamps must be converted to true pts/dts before they are stored in AVPacket.
public long @pts;

  • cant set it to AV_NOPTS_VALUE as AV_NOPTS_VALUE doesn't exist anymore

@Ruslan-B
Copy link
Owner

Ruslan-B commented Aug 4, 2017

It is in place actually as malformed macro:
// public static AV_NOPTS_VALUE = ((int64_t)UINT64_C(0x8000000000000000));
My macro parser is quite limed. Thus at the moment you need to define this constant yourself.

@ispysoftware
Copy link
Sponsor Author

ispysoftware commented Aug 4, 2017

yes i saw that, uncommenting it doesn't work as int64_t can't be resolved - any idea how to set it?

@ispysoftware
Copy link
Sponsor Author

ispysoftware commented Aug 4, 2017

It used to be

public const ulong AV_NOPTS_VALUE = 0x8000000000000000;

which seems to be working - this missing value threw about 60 exceptions in my project - might be worth adding it back in..

@Ruslan-B
Copy link
Owner

Ruslan-B commented Aug 4, 2017

You know that all this code is auto generated aren't you? Thus in case you would like to have this value here there are two options:

  • contribute try to fix in original C header (by some reason they put in place this double cast).
  • contribute good generic fix to macro parser to my progect as adding/fixing stuff by hands is not an option.
    Beside, you still going to have small amount of macroses based on inline functions they never worked and next time ffmpeg developers desided to use one this constant will be gone.
    To summarize I will do it with pleasure when CppSharp project will add macro preprocessor api.

@Ruslan-B Ruslan-B closed this as completed Aug 4, 2017
@ispysoftware
Copy link
Sponsor Author

ispysoftware commented Aug 4, 2017 via email

@Ruslan-B
Copy link
Owner

Ruslan-B commented Aug 4, 2017

Any way I'll try to improve macro parser but I cannot promise any backward compatibility connected with ffmpeg api changes either this specific constraint being resolved.

@Ruslan-B
Copy link
Owner

Ruslan-B commented Oct 1, 2017

I implemented generic fix for macro functions in #63 thus AV_NOPTS_VALUE is now available.
The nuget package is also updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants