9 Commits

Author SHA1 Message Date
Quentin Renard
a7292eff12 Added error recognition flags 2025-09-23 14:15:49 +02:00
Quentin Renard
9363923192 Added disposition flags 2025-08-07 17:18:52 +02:00
Maizer
15c6928fe3 Add AVPixFmtDescriptor to retrieve flags for AVPixelFormat (#154)
* 1. Adds hardware_frames_constraints to retrieve valid HWPixelFormats and SWPixelFormats for specific hardware frame configurations.

2. Implements a HardwareFramesConstraints method in hardware_device_context to obtain these constraints for a given hardware frames context.

* Add AVPixFmtDescriptor to retrieve flags for AVPixelFormat

feat(PixelFormat): Expose `AVPixFmtDescriptor` via `Descriptor()` method

This commit introduces support for `AVPixFmtDescriptor`, which provides
detailed information about an `AVPixelFormat`, including its flags.

A new `Descriptor()` method has been added to the `PixelFormat` type
(or class) to retrieve its corresponding `AVPixFmtDescriptor`. This allows
for easier access to extended properties of pixel formats.
2025-05-23 16:01:02 +02:00
Quentin Renard
25626ad96a Added filter flags 2024-12-23 15:34:00 +01:00
Quentin Renard
8bf2b046a2 Added format/codec context private data + options 2024-12-10 16:46:30 +01:00
Quentin Renard
b5db8fb22f Added Classer + now logs returns a Classer + tests are now done in astiav package 2024-02-28 18:05:36 +01:00
Cacsjep
f836d58883 Implementation for SWS scale (#33)
* Draft implementation for SWS scale

* Update go.mod

* Revert "Update go.mod"

This reverts commit 760fb8c427.

* Renaming to AllocSwsContext and remove ChangeResolution this should handled by users

* update example to use new name and remove ChangeResolution

* Follow scaling example from libav, update readme, improve sws

Change scaling example to an similar libav example
Update readme
Add func to UpdateScalingParameters
Rename AllocSwsContext to SwsGetContext
Using a type for scaling algos/flags

* Fix Errors in scale example

* Review Changes

Now using sws context flags
Restructer sws context and adding ned simpler methods to update the ctx
Update the example
Update the test

* Correctly handle error for buffer alloc in PrepareDestinationFrameForScaling

* Add more getter and setter for sws

Get/Set source w,h,pixfmt
Get/Set dst w,h,pixfmt
Get/Set sws flags

* Adding resolution get/set

* Use CachedContext when updating sws ctx

* Review changes

Reorder flags, and update them
# Update Example
Use renaming function to create sws context
Clean up
Use new framdata image funcs
# Sws scale context
New way to update the context
Use sws_scale_frame instead of sws_scale
Reordering funcs for get and set
# Sws sclate context flag
Add "Flag" for algo name
# Update sws test

* fix fmt error args bug

* Review Changes

Simpfy sws update
Use c.int for sws flags
update test
2024-01-30 10:25:15 +01:00
Cacsjep
767f28bc3d Implementation for HW Context (#32)
* Adding HW Context

* Check for hw pixel format and transfer data on ReciveFrame when its hw pixel format

* Remove hw_decoding example and update demuxing_dec example

* unref hw_device_ctx, and improve example

Unref correctly hw_device_ctx on free
decoding example has now a flag for hw decoding
Use error on hw context because its good to know the error that happen
Add a method to list supported hw codecs so user could check if system has a specif hwcodec before the create a hw context

* Fix test to use err, and update hw with device to also return error

* revert changes in demux example

* Add/Modify according to review

Seperate Hardware Device Context and Test
Renaming HW to Hardware
Create dedicated hardware_decoding Example
Update Readme
Add TransferHardwareData to frame.go
Add SetHardwareDeviceContext to codec_context.go

* Review changes

add HardwareConfigs to codec
create codec_hardware_config
create codec_hardware_config_method_flag
update example
update flags
better error handling in TransferHardwareData
update CreateHardwareDeviceContext, better null handling
remove hw ctx test because it fails when no nvidia is present
some reordering of conss in hardware_device_type

* Minor tweaks (review changes)

HardwareConfigs only returns a slice an no error anymore
remove if HardwareDeviceType checking in codec.go this should be done by user
order codec hw_config_method_flags constants alphabetically
some small changes in example
##  hardware_device_context.go
change link
update optionsC
2024-01-24 18:23:12 +01:00
Quentin Renard
477b147104 Initial commit 2022-02-13 19:08:18 +01:00