Skip to content

Commit

Permalink
move video "formats" to video namespace ; fix documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jygaulier committed Dec 4, 2024
1 parent f0ff41e commit d7da0de
Show file tree
Hide file tree
Showing 22 changed files with 51 additions and 52 deletions.
3 changes: 1 addition & 2 deletions databox/api/src/Command/DocumentationDumperCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

use Alchemy\RenditionFactory\DocumentationDumper as RenditionFactoryDocumentationDumper;


Expand All @@ -33,7 +32,7 @@ protected function configure(): void

protected function execute(InputInterface $input, OutputInterface $output): int
{
$output->writeln('# rendition factory');
$output->writeln('# ' . $this->renditionFactoryDocumentationDumper::getName());
$output->writeln($this->renditionFactoryDocumentationDumper->dump());

return 0;
Expand Down
48 changes: 24 additions & 24 deletions lib/php/rendition-factory-bundle/Resources/config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,53 +46,53 @@ services:
- { name: !php/const Alchemy\RenditionFactory\Transformer\TransformerModuleInterface::TAG }

# Output "formats"
Alchemy\RenditionFactory\Format\JpegFormat:
Alchemy\RenditionFactory\Transformer\Video\Format\JpegFormat:
tags:
- { name: !php/const Alchemy\RenditionFactory\Format\FormatInterface::TAG }
- { name: !php/const Alchemy\RenditionFactory\Transformer\Video\Format\FormatInterface::TAG }

Alchemy\RenditionFactory\Format\MkvFormat:
Alchemy\RenditionFactory\Transformer\Video\Format\MkvFormat:
tags:
- { name: !php/const Alchemy\RenditionFactory\Format\FormatInterface::TAG }
- { name: !php/const Alchemy\RenditionFactory\Transformer\Video\Format\FormatInterface::TAG }

Alchemy\RenditionFactory\Format\Mpeg4Format:
Alchemy\RenditionFactory\Transformer\Video\Format\Mpeg4Format:
tags:
- { name: !php/const Alchemy\RenditionFactory\Format\FormatInterface::TAG }
- { name: !php/const Alchemy\RenditionFactory\Transformer\Video\Format\FormatInterface::TAG }

Alchemy\RenditionFactory\Format\MpegFormat:
Alchemy\RenditionFactory\Transformer\Video\Format\MpegFormat:
tags:
- { name: !php/const Alchemy\RenditionFactory\Format\FormatInterface::TAG }
- { name: !php/const Alchemy\RenditionFactory\Transformer\Video\Format\FormatInterface::TAG }

Alchemy\RenditionFactory\Format\QuicktimeFormat:
Alchemy\RenditionFactory\Transformer\Video\Format\QuicktimeFormat:
tags:
- { name: !php/const Alchemy\RenditionFactory\Format\FormatInterface::TAG }
- { name: !php/const Alchemy\RenditionFactory\Transformer\Video\Format\FormatInterface::TAG }

Alchemy\RenditionFactory\Format\WebmFormat:
Alchemy\RenditionFactory\Transformer\Video\Format\WebmFormat:
tags:
- { name: !php/const Alchemy\RenditionFactory\Format\FormatInterface::TAG }
- { name: !php/const Alchemy\RenditionFactory\Transformer\Video\Format\FormatInterface::TAG }

Alchemy\RenditionFactory\Format\AnimatedGifFormat:
Alchemy\RenditionFactory\Transformer\Video\Format\AnimatedGifFormat:
tags:
- { name: !php/const Alchemy\RenditionFactory\Format\FormatInterface::TAG }
- { name: !php/const Alchemy\RenditionFactory\Transformer\Video\Format\FormatInterface::TAG }

Alchemy\RenditionFactory\Format\AnimatedPngFormat:
Alchemy\RenditionFactory\Transformer\Video\Format\AnimatedPngFormat:
tags:
- { name: !php/const Alchemy\RenditionFactory\Format\FormatInterface::TAG }
- { name: !php/const Alchemy\RenditionFactory\Transformer\Video\Format\FormatInterface::TAG }

Alchemy\RenditionFactory\Format\AnimatedWebpFormat:
Alchemy\RenditionFactory\Transformer\Video\Format\AnimatedWebpFormat:
tags:
- { name: !php/const Alchemy\RenditionFactory\Format\FormatInterface::TAG }
- { name: !php/const Alchemy\RenditionFactory\Transformer\Video\Format\FormatInterface::TAG }

Alchemy\RenditionFactory\Format\WavFormat:
Alchemy\RenditionFactory\Transformer\Video\Format\WavFormat:
tags:
- { name: !php/const Alchemy\RenditionFactory\Format\FormatInterface::TAG }
- { name: !php/const Alchemy\RenditionFactory\Transformer\Video\Format\FormatInterface::TAG }

Alchemy\RenditionFactory\Format\AacFormat:
Alchemy\RenditionFactory\Transformer\Video\Format\AacFormat:
tags:
- { name: !php/const Alchemy\RenditionFactory\Format\FormatInterface::TAG }
- { name: !php/const Alchemy\RenditionFactory\Transformer\Video\Format\FormatInterface::TAG }

Alchemy\RenditionFactory\Format\Mp3Format:
Alchemy\RenditionFactory\Transformer\Video\Format\Mp3Format:
tags:
- { name: !php/const Alchemy\RenditionFactory\Format\FormatInterface::TAG }
- { name: !php/const Alchemy\RenditionFactory\Transformer\Video\Format\FormatInterface::TAG }


Imagine\Imagick\Imagine: ~
Expand Down
4 changes: 2 additions & 2 deletions lib/php/rendition-factory/src/DocumentationDumper.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Alchemy\RenditionFactory;

use Alchemy\RenditionFactory\Format\FormatInterface;
use Alchemy\RenditionFactory\Transformer\Documentation;
use Alchemy\RenditionFactory\Transformer\TransformerModuleInterface;
use Alchemy\RenditionFactory\Transformer\Video\Format\FormatInterface;
use Symfony\Component\Config\Definition\Dumper\YamlReferenceDumper;
use Symfony\Component\DependencyInjection\Attribute\TaggedLocator;
use Symfony\Component\DependencyInjection\ServiceLocator;
Expand Down Expand Up @@ -51,7 +51,7 @@ private function listFormats(): string
}
ksort($formats);

$text = '## Supported formats'."\n";
$text = "## Video transformers output `format`s.\n";
$text .= "| Family | Format | Mime type | Extensions |\n";
$text .= "|-|-|-|-|\n";
foreach ($formats as $familyFormats) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
use Alchemy\RenditionFactory\DTO\InputFileInterface;
use Alchemy\RenditionFactory\DTO\OutputFile;
use Alchemy\RenditionFactory\DTO\OutputFileInterface;
use Alchemy\RenditionFactory\Format\FormatInterface;
use Alchemy\RenditionFactory\Transformer\Documentation;
use Alchemy\RenditionFactory\Transformer\TransformerModuleInterface;
use Alchemy\RenditionFactory\Transformer\Video\FFMpeg\Filter\ResizeFilter;
use Alchemy\RenditionFactory\Transformer\Video\Format\FormatInterface;
use FFMpeg;
use FFMpeg\Coordinate\TimeCode;
use FFMpeg\Format\FormatInterface as FFMpegFormatInterface;
Expand Down Expand Up @@ -74,7 +74,7 @@ public function buildConfiguration(NodeBuilder $builder): void
->arrayNode('options')
->children()
->scalarNode('format')
->info('output format')
->info('output format (see Video transformers output `format`s)')
->end()
->scalarNode('extension')
->info('extension of the output file')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace Alchemy\RenditionFactory\Format;
namespace Alchemy\RenditionFactory\Transformer\Video\Format;

use Alchemy\RenditionFactory\DTO\FamilyEnum;
use Alchemy\RenditionFactory\Format\Audio\Aac;
use Alchemy\RenditionFactory\Transformer\Video\Format\Audio\Aac;

class AacFormat implements FormatInterface
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Alchemy\RenditionFactory\Format;
namespace Alchemy\RenditionFactory\Transformer\Video\Format;

use Alchemy\RenditionFactory\DTO\FamilyEnum;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Alchemy\RenditionFactory\Format;
namespace Alchemy\RenditionFactory\Transformer\Video\Format;

use Alchemy\RenditionFactory\DTO\FamilyEnum;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Alchemy\RenditionFactory\Format;
namespace Alchemy\RenditionFactory\Transformer\Video\Format;

use Alchemy\RenditionFactory\DTO\FamilyEnum;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This file replaces FFMpeg\Format\Audio\aac because alpine lacks libfdk
*/

namespace Alchemy\RenditionFactory\Format\Audio;
namespace Alchemy\RenditionFactory\Transformer\Video\Format\Audio;

use FFMpeg\Format\Audio\DefaultAudio;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Alchemy\RenditionFactory\Format;
namespace Alchemy\RenditionFactory\Transformer\Video\Format;

use Alchemy\RenditionFactory\DTO\FamilyEnum;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Alchemy\RenditionFactory\Format;
namespace Alchemy\RenditionFactory\Transformer\Video\Format;

use Alchemy\RenditionFactory\DTO\FamilyEnum;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Alchemy\RenditionFactory\Format;
namespace Alchemy\RenditionFactory\Transformer\Video\Format;

use Alchemy\RenditionFactory\DTO\FamilyEnum;
use FFMpeg\Format\Video\X264;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Alchemy\RenditionFactory\Format;
namespace Alchemy\RenditionFactory\Transformer\Video\Format;

use Alchemy\RenditionFactory\DTO\FamilyEnum;
use FFMpeg\Format\Audio\Mp3;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Alchemy\RenditionFactory\Format;
namespace Alchemy\RenditionFactory\Transformer\Video\Format;

use Alchemy\RenditionFactory\DTO\FamilyEnum;
use FFMpeg\Format\Video\X264;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Alchemy\RenditionFactory\Format;
namespace Alchemy\RenditionFactory\Transformer\Video\Format;

use Alchemy\RenditionFactory\DTO\FamilyEnum;
use FFMpeg\Format\Video\X264;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Alchemy\RenditionFactory\Format;
namespace Alchemy\RenditionFactory\Transformer\Video\Format;

use Alchemy\RenditionFactory\DTO\FamilyEnum;
use FFMpeg\Format\Video\X264;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Alchemy\RenditionFactory\Format;
namespace Alchemy\RenditionFactory\Transformer\Video\Format;

use Alchemy\RenditionFactory\DTO\FamilyEnum;
use FFMpeg\Format\Audio\Wav;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Alchemy\RenditionFactory\Format;
namespace Alchemy\RenditionFactory\Transformer\Video\Format;

use Alchemy\RenditionFactory\DTO\FamilyEnum;
use FFMpeg\Format\Video\WebM;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Alchemy\RenditionFactory\Config\ModuleOptionsResolver;
use Alchemy\RenditionFactory\Context\TransformationContextInterface;
use Alchemy\RenditionFactory\Format\FormatInterface;
use Alchemy\RenditionFactory\Transformer\Video\Format\FormatInterface;
use FFMpeg;
use Symfony\Component\DependencyInjection\ServiceLocator;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
use Alchemy\RenditionFactory\DTO\InputFileInterface;
use Alchemy\RenditionFactory\DTO\OutputFile;
use Alchemy\RenditionFactory\DTO\OutputFileInterface;
use Alchemy\RenditionFactory\Format\FormatInterface;
use Alchemy\RenditionFactory\Transformer\Documentation;
use Alchemy\RenditionFactory\Transformer\TransformerModuleInterface;
use Alchemy\RenditionFactory\Transformer\Video\Format\FormatInterface;
use FFMpeg;
use FFMpeg\Coordinate\TimeCode;
use FFMpeg\Format\VideoInterface;
Expand Down Expand Up @@ -70,7 +70,7 @@ public function buildConfiguration(NodeBuilder $builder): void
->end()
->scalarNode('format')
->isRequired()
->info('Output format')
->info('output format (see Video transformers output `format`s)')
->example('video-mpeg')
->end()
->scalarNode('extension')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
use Alchemy\RenditionFactory\DTO\InputFileInterface;
use Alchemy\RenditionFactory\DTO\OutputFile;
use Alchemy\RenditionFactory\DTO\OutputFileInterface;
use Alchemy\RenditionFactory\Format\FormatInterface;
use Alchemy\RenditionFactory\Transformer\Documentation;
use Alchemy\RenditionFactory\Transformer\TransformerModuleInterface;
use Alchemy\RenditionFactory\Transformer\Video\Format\FormatInterface;
use FFMpeg;
use Symfony\Component\Config\Definition\Builder\NodeBuilder;
use Symfony\Component\DependencyInjection\Attribute\AutowireLocator;
Expand Down Expand Up @@ -82,7 +82,7 @@ public function buildConfiguration(NodeBuilder $builder): void
->end()
->scalarNode('format')
->isRequired()
->info('Output format')
->info('output format (see Video transformers output `format`s)')
->example('animated-png')
->end()
->scalarNode('extension')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
use Alchemy\RenditionFactory\DTO\InputFileInterface;
use Alchemy\RenditionFactory\DTO\OutputFile;
use Alchemy\RenditionFactory\DTO\OutputFileInterface;
use Alchemy\RenditionFactory\Format\FormatInterface;
use Alchemy\RenditionFactory\Transformer\Documentation;
use Alchemy\RenditionFactory\Transformer\TransformerModuleInterface;
use Alchemy\RenditionFactory\Transformer\Video\Format\FormatInterface;
use FFMpeg\Media\Video;
use Symfony\Component\Config\Definition\Builder\NodeBuilder;
use Symfony\Component\DependencyInjection\Attribute\AutowireLocator;
Expand Down Expand Up @@ -54,7 +54,7 @@ public function buildConfiguration(NodeBuilder $builder): void
->end()
->scalarNode('format')
->isRequired()
->info('Output format')
->info('output format (see Video transformers output `format`s)')
->example('image-jpeg')
->end()
->scalarNode('extension')
Expand Down

0 comments on commit d7da0de

Please sign in to comment.