AMF-Connection

 view release on metacpan or  search on metacpan

examples/get-brightcove-videos-metadata.pl  view on Meta::CPAN

                                                                             'childLimit' => '100'
                                                                           },
                                                                           {
                                                                             'fetchLevelEnum' => '3',
                                                                             'contentType' => 'VideoLineupList',
                                                                             'grandchildLimit' => '100',
                                                                             'childLimit' => '100'
                                                                           }
                                                                         ],
                                                         'optimizeFeaturedContent' => 1,
                                                         'lineupRefId' => undef,
                                                         'lineupId' => undef,
                                                         'videoRefId' => undef,
                                                         'videoId' => $videoId, # param 2 - videoId
                                                         'featuredLineupFetchInfo' => {
                                                                                        'fetchLevelEnum' => '4',
                                                                                        'contentType' => 'VideoLineup',
                                                                                        'childLimit' => '100'
                                                                                      }
                                                       }
                                                     ];

my $response = $client->call( $service.'.'.$method, $params );

lib/AMF/Connection.pm  view on Meta::CPAN

	my ($class,$source,$operation,$headers,$body,$destination) = @_;

	return bless( {
		'clientId' => _generateID(),
                'destination' => $destination,
                'messageId' => _generateID(),
                'timestamp' => time() . '00',
                'timeToLive' => 0,
                'headers' => ($headers) ? $headers : {},
                'body' => $body,
                'correlationId' => undef,
                'operation' => $operation,
		'source' => $source # for backwards compatibility - google for it!
                 }, 'flex.messaging.messages.RemotingMessage' );
        };

sub _generateID {
        my $uniqueid;

        if($HASUUID) {
                eval {

lib/AMF/Connection/InputStream.pm  view on Meta::CPAN

# deparse out the next avail AMF entity
# TODO - make sure ref counts are reset/preserved between calls in the scope of the same InputStream - study Storable::AMF API
sub readAMFData {
	my ($class) = @_;

	my $type = $class->readByte();

	# Storable::AMF will take care of deparsing the right AMF format
	$class->{'cursor'}--;

	local $@ = undef;

        my ($obj, $len);
	my $encoding=0;
	if($type == 0x11) {
		$encoding=3;
		$class->{'cursor'}++;
		if ($storable_with_options  == 0
		    || not defined $class->{'options'})
		  {
        	    ($obj, $len) = Storable::AMF3::deparse_amf( substr($class->{'stream'},$class->{'cursor'}));

lib/AMF/Connection/OutputStream.pm  view on Meta::CPAN

sub getStreamData {
	my ($class) = @_;
	
	return $class->{'stream'};
	};

# wrtie an AMF entity
sub writeAMFData {
        my ($class,$encoding,$data) = @_;

	local $@ = undef;

	my $bytes;
        if($encoding == 3 ) {
		if ($storable_with_options  == 0
		    || not defined $class->{'options'})
                  {
		    $bytes = Storable::AMF3::freeze($data);
		  }
		else
		  {



( run in 3.098 seconds using v1.01-cache-2.11-cpan-d80b1682f3f )