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
284
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
05dc7e13
Commit
05dc7e13
authored
2 hours ago
by
Mark Harding
Browse files
Options
Download
(fix): legacy with new transcoder
parent
5b97dadd
epic/transcoder-improvements
1 merge request
!414
New transcoder
Pipeline
#102335124
failed with stages
in 59 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
Controllers/api/v2/media/video.php
View file @
05dc7e13
...
...
@@ -9,8 +9,7 @@ namespace Minds\Controllers\api\v2\media;
use
Minds\Api\Factory
;
use
Minds\Core\Di\Di
;
use
Minds\Core\Media\Proxy\Download
;
use
Minds\Core\Media\Proxy\Resize
;
use
Minds\Core\Media\Video\Transcoder\TranscodeStates
;
use
Minds\Interfaces
;
class
video
implements
Interfaces\Api
,
Interfaces\ApiIgnorePam
...
...
@@ -27,11 +26,18 @@ class video implements Interfaces\Api, Interfaces\ApiIgnorePam
$video
=
$videoManager
->
get
(
$pages
[
0
]);
$sources
=
$videoManager
->
getSources
(
$video
);
$status
=
$transcodeStates
->
getStatus
(
$video
);
// Currently not efficient as no caching
if
(
$status
===
TranscodeStates
::
FAILED
&&
count
(
$sources
))
{
$status
=
TranscodeStates
::
COMPLETED
;
}
Factory
::
response
([
'entity'
=>
$video
->
export
(),
'sources'
=>
Factory
::
exportable
(
$
videoManager
->
getSources
(
$video
)
),
'sources'
=>
Factory
::
exportable
(
$
sources
),
'poster'
=>
$video
->
getIconUrl
(),
'transcode_status'
=>
$
transcodeStates
->
getStatus
(
$video
),
// Currently not efficient as no caching
'transcode_status'
=>
$
status
,
]);
}
...
...
This diff is collapsed.
Core/Media/Video/Manager.php
View file @
05dc7e13
...
...
@@ -89,7 +89,8 @@ class Manager
->
setLabel
(
$transcode
->
getProfile
()
->
getId
())
->
setSize
(
$transcode
->
getProfile
()
->
getHeight
())
->
setSrc
(
implode
(
'/'
,
[
$this
->
config
->
get
(
'transcoder'
)[
'cdn_url'
]
??
'https://cdn-cinemr.minds.com/cinemr_dev'
,
$this
->
config
->
get
(
'transcoder'
)[
'cdn_url'
]
??
'https://cdn-cinemr.minds.com'
,
$this
->
config
->
get
(
'transcoder'
)[
'dir'
],
$transcode
->
getGuid
(),
$transcode
->
getProfile
()
->
getStorageName
()
]));
...
...
This diff is collapsed.
Please
register
or
sign in
to comment