| 1 | package Bb::Collaborate::V3::Recording::File; | ||||||||||||||||||||||||||||
| 2 | 1 | ▶ | use warnings; use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 3 | |||||||||||||||||||||||||||||
| 4 | 1 | ▶ | use Mouse; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||
| 6 | 1 | extends 'Bb::Collaborate::V3'; | |||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||
| 8 | 1 | ▶ | use Scalar::Util; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | 1 | ▶ | use Carp; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||
| 11 | 1 | ▶ | use Elive::Util; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | =head1 NAME | ||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||
| 15 | Bb::Collaborate::V3::Recording::File - Collaborate Recording File response class | ||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||
| 17 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||
| 19 | This class is used to return responses to recording conversion requests. | ||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||
| 21 | =cut | ||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||
| 23 | 1 | has 'recordingId' => (is => 'rw', isa => 'Int', required => 1); | |||||||||||||||||||||||||||
| 24 | 1 | __PACKAGE__->primary_key('recordingId'); | |||||||||||||||||||||||||||
| 25 | 1 | __PACKAGE__->entity_name('RecordingFile'); | |||||||||||||||||||||||||||
| 26 | 1 | __PACKAGE__->params(format => 'Str'); | |||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||
| 28 | 1 | has 'recordingStatus' => (is => 'rw', isa => 'Str', required => 1); | |||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||
| 30 | =head2 convert_recording | ||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||
| 32 | Bb::Collaborate::V3::RecordingFile->convert_recording( recording_id => $recording_id, format => 'mp4' ); | ||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||
| 34 | =cut | ||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||
| 36 | 0 | ▶ | sub convert_recording { | ||||||||||||||||||||||||||
|
Subroutine
convert_recording: not called CC=9 SCAR=42.5
Pod
documented
| |||||||||||||||||||||||||||||
| 37 | 0 | my ($class, %opt) = @_; | |||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||
| 39 | 0 | ▶ | my $connection = $opt{connection} || $class->connection | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$opt{'connection'} || $class->connection
MC/DC0%0/2
$opt{'connection'} || $class->connection
$opt{'connection'}
$class->connection
Truth table0%0/3
A || B
A= $opt{'connection'}B= $class->connection
| |||||||||||||||||||||||||||||
| 40 | or croak "Not connected"; | ||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||
| 42 | 0 | ▶ | my $recording_id = $opt{recording_id} || $opt{recordingId}; | ||||||||||||||||||||||||||
|
Condition0%0/3
$opt{'recording_id'} || $opt{'recordingId'}
MC/DC0%0/2
$opt{'recording_id'} || $opt{'recordingId'}
$opt{'recording_id'}
$opt{'recordingId'}
Truth table0%0/3
A || B
A= $opt{'recording_id'}B= $opt{'recordingId'}
| |||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||
| 44 | 0 | ▶ | $recording_id ||= $class->recordingId | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$recording_id ||= $class->recordingId
MC/DC0%0/2
$recording_id ||= $class->recordingId
$recording_id
$class->recordingId
Truth table0%0/3
A ||= B
A= $recording_idB= $class->recordingId
| |||||||||||||||||||||||||||||
| 45 | if ref($class); | ||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||
| 47 | 0 | ▶ | croak "unable to determine recording_id" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 48 | unless $recording_id; | ||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||
| 50 | 0 | ▶ | my $format = $opt{format} || 'mp3'; | ||||||||||||||||||||||||||
|
Condition0%0/2
$opt{'format'} || 'mp3'
MC/DC0%0/1
$opt{'format'} || 'mp3'
$opt{'format'}
Truth table0%0/2
A
A= $opt{'format'}
| |||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||
| 52 | 0 | ▶ | my $command = $opt{command} || 'ConvertRecording'; | ||||||||||||||||||||||||||
|
Condition0%0/2
$opt{'command'} || 'ConvertRecording'
MC/DC0%0/1
$opt{'command'} || 'ConvertRecording'
$opt{'command'}
Truth table0%0/2
A
A= $opt{'command'}
| |||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||
| 54 | 0 | my $params = $class->_freeze({recordingId => $recording_id, format => $format}); | |||||||||||||||||||||||||||
| 55 | 0 | my $som = $connection->call( $command, => %$params); | |||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||
| 57 | 0 | my $results = $class->_get_results( $som, $connection ); | |||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||
| 59 | 0 | ▶ | use YAML::Syck; die "thats all I've got @{[ YAML::Syck::Dump($results) ]}"; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.6
| |||||||||||||||||||||||||||||
| 60 | } | ||||||||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||||||
| 62 | 1 | 1; | |||||||||||||||||||||||||||