Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Backend - Engine
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
286
Merge Requests
38
CI / CD
Security & Compliance
Packages
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Backend - Engine
Commits
e39b692a
Commit
e39b692a
authored
3 minutes ago
by
Mark Harding
Browse files
Options
Download
(feat): return status of overall video
parent
9ebb0a19
epic/transcoder-improvements
1 merge request
!414
WIP: New transcoder
Pipeline
#101967302
running with stages
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
2 deletions
+8
-2
Controllers/api/v2/media/video.php
View file @
e39b692a
...
...
@@ -23,6 +23,7 @@ class video implements Interfaces\Api, Interfaces\ApiIgnorePam
public
function
get
(
$pages
)
{
$videoManager
=
Di
::
_
()
->
get
(
'Media\Video\Manager'
);
$transcodeStates
=
Di
::
_
()
->
get
(
'Media\Video\Transcoder\TranscodeStates'
);
$video
=
$videoManager
->
get
(
$pages
[
0
]);
...
...
@@ -30,6 +31,7 @@ class video implements Interfaces\Api, Interfaces\ApiIgnorePam
'entity'
=>
$video
->
export
(),
'sources'
=>
Factory
::
exportable
(
$videoManager
->
getSources
(
$video
)),
'poster'
=>
$video
->
getIconUrl
(),
'transcode_status'
=>
$transcodeStates
->
getStatus
(
$video
),
// Currently not efficient as no caching
]);
}
...
...
This diff is collapsed.
Core/Media/MediaProvider.php
View file @
e39b692a
...
...
@@ -84,6 +84,10 @@ class MediaProvider extends Provider
return
new
Video\Transcoder\Manager
();
},
[
'useFactory'
=>
false
]);
$this
->
di
->
bind
(
'Media\Video\Transcoder\TranscodeStates'
,
function
(
$di
)
{
return
new
Video\Transcoder\TranscodeStates
();
},
[
'useFactory'
=>
false
]);
$this
->
di
->
bind
(
'Media\Video\Transcode\TranscodeStorage'
,
function
(
$di
)
{
return
new
Video\Transcoder\TranscodeStorage\S3Storage
();
},
[
'useFactory'
=>
false
]);
...
...
This diff is collapsed.
Core/Media/Video/Manager.php
View file @
e39b692a
...
...
@@ -76,7 +76,7 @@ class Manager
$sources
=
[];
foreach
(
$transcodes
as
$transcode
)
{
if
(
$transcode
->
getStatus
()
!=
'completed'
)
{
if
(
$transcode
->
getStatus
()
!=
Transcoder\TranscodeStates
::
COMPLETED
)
{
continue
;
}
if
(
$transcode
->
getProfile
()
instanceof
Transcoder\TranscodeProfiles\Thumbnails
)
{
...
...
This diff is collapsed.
Core/Media/Video/Transcoder/Transcode.php
View file @
e39b692a
...
...
@@ -79,7 +79,7 @@ class Transcode
*/
public
function
setProfile
(
TranscodeProfiles\TranscodeProfileInterface
$profile
)
:
self
{
if
(
$profile
->
isProOnly
()
&&
!
$this
->
video
->
getOwnerEntity
()
->
isPro
())
{
if
(
$profile
->
isProOnly
()
&&
$this
->
video
&&
!
$this
->
video
->
getOwnerEntity
()
->
isPro
())
{
throw
new
TranscodeProfiles\UnavailableTranscodeProfileException
();
}
$this
->
profile
=
$profile
;
...
...
This diff is collapsed.
Please
register
or
sign in
to comment