<commit_before>/*
 * (C) Copyright 2013 Kurento (http://kurento.org/)
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Lesser General Public License
 * (LGPL) version 2.1 which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/lgpl-2.1.html
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 */

namespace java com.kurento.kms.thrift.api
namespace cpp kurento
namespace * Kurento

const i32 VERSION = 3;

const i32 GARBAGE_PERIOD = 120; //Activation period of the distributed garbage collector in seconds

typedef i64 KmsMediaObjectId

//Reserved for internal errors caused by miss-behavior of the media server
exception KmsMediaServerException {
  1: string description,
  2: i32 errorCode
}

enum KmsMediaPadDirection {
  SINK,
  SRC
}

enum KmsMediaType {
  AUDIO,
  VIDEO,
  DATA
}

struct KmsMediaElement {
  1: string elementType
}

struct KmsMediaPipeline {
}

struct KmsMediaPad {
  1: KmsMediaPadDirection direction,
  2: KmsMediaType mediaType,
  3: string mediaDescription //subtype of media. Useful for "data" KmsMediaType. Ex. location, accelerometer, etc.
}

struct KmsMediaMixer {
  1: string mixerType //type of mixer indicating mixing style.
}

union KmsMediaObjectType {
  1: optional KmsMediaPipeline pipeline,
  2: optional KmsMediaElement element,
  3: optional KmsMediaPad pad,
  4: optional KmsMediaMixer mixer
}

//class simulating a "parent" of all MediaObjects. Useful for consolidating methods
struct KmsMediaObjectRef {
  1: KmsMediaObjectId id, //This may be a union of the rest of types, so that it works on common calls
  2: string token,
  3: KmsMediaObjectType objectType
}

struct KmsMediaParams {
  1: string dataType,
  2: optional binary data
}

struct KmsMediaCommand {
  1: string name,
  2: optional KmsMediaParams params
}

typedef KmsMediaParams KmsMediaCommandResult

service KmsMediaServerService {
  i32 getVersion();

  /////////////////////////////////////////////////////////////////////////////////
  //Common methods for all media objects<commit_msg>Proposal to make mandatory Params in Command<commit_after>/*
 * (C) Copyright 2013 Kurento (http://kurento.org/)
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Lesser General Public License
 * (LGPL) version 2.1 which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/lgpl-2.1.html
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 */

namespace java com.kurento.kms.thrift.api
namespace cpp kurento
namespace * Kurento

const i32 VERSION = 3;

const i32 GARBAGE_PERIOD = 120; //Activation period of the distributed garbage collector in seconds

typedef i64 KmsMediaObjectId

//Reserved for internal errors caused by miss-behavior of the media server
exception KmsMediaServerException {
  1: string description,
  2: i32 errorCode
}

enum KmsMediaPadDirection {
  SINK,
  SRC
}

enum KmsMediaType {
  AUDIO,
  VIDEO,
  DATA
}

struct KmsMediaElement {
  1: string elementType
}

struct KmsMediaPipeline {
}

struct KmsMediaPad {
  1: KmsMediaPadDirection direction,
  2: KmsMediaType mediaType,
  3: string mediaDescription //subtype of media. Useful for "data" KmsMediaType. Ex. location, accelerometer, etc.
}

struct KmsMediaMixer {
  1: string mixerType //type of mixer indicating mixing style.
}

union KmsMediaObjectType {
  1: optional KmsMediaPipeline pipeline,
  2: optional KmsMediaElement element,
  3: optional KmsMediaPad pad,
  4: optional KmsMediaMixer mixer
}

//class simulating a "parent" of all MediaObjects. Useful for consolidating methods
struct KmsMediaObjectRef {
  1: KmsMediaObjectId id, //This may be a union of the rest of types, so that it works on common calls
  2: string token,
  3: KmsMediaObjectType objectType
}

struct KmsMediaParams {
  1: string dataType,
  2: optional binary data
}

struct KmsMediaCommand {
  1: string name,
  2: KmsMediaParams params
}

typedef KmsMediaParams KmsMediaCommandResult

service KmsMediaServerService {
  i32 getVersion();

  /////////////////////////////////////////////////////////////////////////////////
  //Common methods for all media objects
{'fraction_non_alphanumeric': 0.09560723514211886, 'fraction_numerical': 0.017226528854435832, 'mean_word_length': 3.52729044834308, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2349622', 'n_tokens_mistral': 1374, 'n_tokens_neox': 1325, 'n_words': 530}